Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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