Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get video duration in javascript

const i = setInterval(function() {
	if(video.readyState > 0) {
		var minutes = parseInt(video.duration / 60, 10);
		var seconds = video.duration % 60;
		clearInterval(i);
	}
}, 200);
 
PREVIOUS NEXT
Tagged: #video #duration #javascript
ADD COMMENT
Topic
Name
1+7 =