javascript - HTML5 video - Waiting event not firing -


I am moving with HTML5 video and custom control and I use the waiting event to ideally display a loading I'm looking at the image but just writing for the console now will do it.

Waiting Event

Playback stopped because the next limit is not available, but the user agent expects that frame at that time Will be available in

I set an example here - & gt;

The video code has been reduced from control here:

  & lt; Video control preload = "meta" & gt; & Lt; Source src = "http://www.tools4movies.com/dvd_catalyst_profile_samples/The%20Amazing%20Spiderman%20tablet.mp4" /> This video has fallback & lt; / Video & gt;   

And here is my event listener for the waiting event.

  var video = document.getElementsByTagName ('video') [0]; Video.addEventListener ('Wait', function () {console.log ('Wait');}, false);   

Is anyone not running this why? The wait event sounds like a sound.

Do you want to display the waiting image during the video buffers for the first time? If so, then you are probably not looking for waiting .

Take a look at this demo:

If you play () without any preloading, you can also copy the cached Wait should look like fire. If you call play () before load () , then you can never see the waiting fire because the next frame is always May be available.

The best process will be to display your image, call load and then canplay or canplaythrough Wait for to see. At that time, hide your image and play () .

Update

Viewing the video in this bake: Chrome waiting is not sending the event, rather the video freeze Sending stalled event immediately after being You probably will need to see how things work on each browser you support. Keep in mind that players like Videogames are very big (~ 142 kb) because they deal with many browser incompatibilities.

Comments