Skip to content

Instantly share code, notes, and snippets.

@stormbreakers
Created January 27, 2016 09:02
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 stormbreakers/c267a9303a81d054c0f3 to your computer and use it in GitHub Desktop.
Save stormbreakers/c267a9303a81d054c0f3 to your computer and use it in GitHub Desktop.
var video = document.getElementsByTagName('video')[0];
//console.log(video.seekable.start(0));
console.log(video.seekable);
//console.log(video.played.end(0));
var i = setInterval(function() {
if(video.readyState > 0) {
var minutes = parseInt(video.duration / 60, 10);
var seconds = video.duration % 60;
console.log(minutes+':'+seconds);
// (Put the minutes and seconds in the display)
clearInterval(i);
}
console.log('not loaded');
}, 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment