Skip to content

Commit

Permalink
synced video to playback rate rather than timeupdate event
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Apr 25, 2011
1 parent 0ccf761 commit 3784b06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions video-canvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
}
});

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

// ctx.restore();
ctx.drawImage(video, 0, 0, video.width, video.height, 0, 0, canvas.width, canvas.height);
});
}, 1000 / 15);

addEvent(video, 'ended', function () {
togglePlay.value = "play";
Expand Down Expand Up @@ -92,4 +92,4 @@
}
</script>
</body>
</html>
</html>

0 comments on commit 3784b06

Please sign in to comment.