English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The suspend event will be triggered when the media data loading has been suspended
HTML Audio/Video DOM Reference Manual
Pop up a prompt message when the media data is blocked from loading:
var vid = document.getElementById("myVideo"); vid.onsuspend = function() { alert("Media data loading is blocked"); };
The suspend event is triggered when the browser deliberately does not load media data.
The event is triggered when the media data is blocked from loading. It can be triggered after the loading is completed, or due to reasons such as suspension.
Hint: Events that affect media data loading include:
IEFirefoxOperaChromeSafari
In HTML:
<element onsuspend="myScript">
In JavaScript:
object.onsuspend=function(){myScript};
In JavaScript, use the addEventListener() method:
object.addEventListener("suspend", myScript);
Note: Internet Explorer 8 and earlier IE versions do not support addEventListener() Methods.
Technical Details
Supported HTML Tags: | <audio> and <video> |
---|---|
Supported JavaScript Objects: | Audio, Video |