Quantcast
Channel: Tell whether video is loaded or not in Javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by aye2m for Tell whether video is loaded or not in Javascript

$
0
0

Use onloadeddata event on the video element. It checks whether the video is loaded or not. See this reference for more information.

The loadeddata event is fired when the frame at the current playback position of the media has finished loading; often the first frame.

var video = document.getElementById("video");video.onloadeddata = function() {    // video is loaded}

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>