HTML Audio/Video DOM stalled Event
HTML Audio/Video DOM Reference
Example
If the browser cannot fetch media data, display a message that the media data is unavailable:
var vid = document.getElementById("myVideo");
vid.onstalled = function() {
alert("Media data unavailable");
};
Definition and Usage
The stalled event is triggered when the browser tries to fetch media data but the data is unavailable.
Tip: Events that affect the loading of media data include:
Browser support
The numbers in the table indicate the version number of the first browser to support the event.
| Events | |||||
|---|---|---|---|---|---|
| stalled | Yes | 9.0 | Yes | Yes | Yes |
Syntax
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() method.
Technical Details
| Supported HTML tags: | |
|---|---|
| Supported JavaScript objects: | Audio, Video |
HTML Audio/Video DOM Reference