t.querySelector('#position'),
    ready = false,
    controls = document.querySelector('#controls'),
    fullscreen = null;

addEvent(togglePlay, 'click', function () {
  if (ready) {
    video.playbackRate = 0.5;
    if (video.paused) {
      if (video.ended) video.currentTime = 0;
      video.play();
      this.value = "pause";
    } else {
      video.pause();
      this.value = "play";
    }
  }
});

addEvent(video, 'timeupdate', function () {
  position.innerHTML = asTime(this.currentTime);
});

addEve