English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
When the user agent tries to fetch media data, the 'stalled' event will be triggered, but the data unexpectedly cannot be obtained.
HTML Audio/Video DOM Reference Manual
If the browser cannot fetch media data, a prompt indicating that the media data is not available will pop up:
var vid = document.getElementById("myVideo"); vid.onstalled = function() { alert("Media data is not available"); };
The 'stalled' event is triggered when the browser tries to fetch media data but the data is not available.
Hint: Events that affect media data loading include:
The numbers in the table indicate the version number of the first browser that supports the event.
IEFirefoxOperaChromeSafari
In HTML:
<element onstalled="myScript">
In JavaScript:
object.onstalled=function(){myScript};
In JavaScript, use the addEventListener() method:
object.addEventListener("stalled", 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 |