nt(video, 'ended', function () {
  togglePlay.value = "play";
});

addEvent(video, 'canplay', function () {
  video.muted = true;
  ready = true;
  document.querySelector('#duration').innerHTML = asTime(this.duration);

  // note: .webkitSupportsFullscreen is false while the video is loading, so we bind in to the canplay event
  if (video.webkitSupportsFullscreen) {
    fullscreen = document.createElement('input');
    fullscreen.setAttribute('type', 'button');
    fullscreen.setAttribute('value', 'fullscre