Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 2, 2014 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/aa5f6f7162ef61b5d614 to your computer and use it in GitHub Desktop.
Save devdays/aa5f6f7162ef61b5d614 to your computer and use it in GitHub Desktop.
Multimedia video timeupdate
cartoon.addEventListener("timeupdate", function () {
var value = 0;
if (cartoon.currentTime > 0) {
value = Math.floor((100 / cartoon.duration) * cartoon.currentTime);
}
progress.style.width = value + "%";
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment