HTML Audio/Video DOM stalledEvents

HTML Audio/Video DOM Reference Manual

Example

If the browser cannot fetch media data, display a prompt indicating that the media data is unavailable:

var vid = document.getElementById("myVideo");
vid.onstalled = function() {
alert("Media data unavailable");
};



Definition and Usage

The stalled event fires when the browser attempts to fetch media data but the data is unavailable.

Tip:Events that affect media data loading include:


Browser Support

The numbers in the table indicate the first browser version that supports the event.

Events
stalled Yes 9.0 Yes Yes Yes


Syntax

In HTML:

<element onstalled="myScript">

In JavaScript:

object.onstalled=function(){myScript};

In JavaScript, using the addEventListener() method:

object.addEventListener("stalled", myScript);

Note:Internet Explorer 8 and earlier IE versions do not supportaddEventListener()method.


Technical Details
Supported HTML tags: <audio> and <video>
Supported JavaScript objects: Audio, Video


HTML Audio/Video DOM Reference Manualother extensions