Created
January 27, 2016 09:02
-
-
Save stormbreakers/c267a9303a81d054c0f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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