HTML Audio/Video DOM suspend Event
Example
//Accessing the element
var vid = document.getElementById("myVideo");
//Creating a function
vid.onsuspend = function() {
alert("The loading of the media is suspended");
};
Meaning
The suspend event run when the browser is intentionally not getting media data.
Standard Syntax
HTML:
<element onsuspend="myScript">
JavaScript:
object.onsuspend=function(){myScript};
JavaScript, using the addEventListener() method::
object.addEventListener("suspend", myScript);
Advertisement