HTML Audio/Video DOM waiting Event
Example
//Accessing the element
var vid = document.getElementById("myVideo");
//Creating a function
vid.onwaiting = function() {
alert("The video is waiting");
};
Meaning
The waiting event run when the video stops because it needs to buffer the next frame.
Standard Syntax
HTML:
<element onwaiting="myScript">
JavaScript:
object.onwaiting=function(){myScript};
JavaScript, using the addEventListener() method::
object.addEventListener("waiting", myScript);
Advertisement