Reputation: 334
When the HTML5 video goes into buffering mode, i need to detect this and stop an action from happening but then when the video is out of buffering mode i need to resume this action.
So far i have figured out that i can achieve this by using the waiting function as such:
video.on('waiting', function () {
console.log("WAITING")
/*stop action*/
});
What function should i be calling to continue the action after the video is out of waiting (buffering) state?
Upvotes: 3
Views: 1877
Reputation: 1325
I don't know about jQuery, but generally video.on should accept any event name from http://www.w3.org/TR/html5/embedded-content-0.html#mediaevents
According to that page the event "playing" is fired when "Playback is ready to start after having been paused or delayed due to lack of media data."
Therefor the code would be:
video.on('playing', function () {
console.log("PLAYING")
/*play action*/
});
Upvotes: 2