Latest web development tutorials

HTML Audio / Video DOM stalled event

HTML audio / video Tag Reference HTML Audio / Video DOM Reference

Examples

If your browser can not get the media data, a pop-up information media data is unavailable:

var vid = document.getElementById ( "myVideo");
vid.onstalled = function () {
alert ( "media data is not available");
};



Definition and Usage

stalled event in the browser tries to obtain media data, but the data is not available when triggered.

Tip: Impact event media data load are:


Browser Support

Figures in the table represent the first browser to support this version of events.

event
stalled Yes 9.0 Yes Yes Yes


grammar

In HTML:

<Elementonstalled = "myScript">

In JavaScript:

object .onstalled = function () {myScript };

JavaScript, use the addEventListener () method:

object .addEventListener ( "stalled", myScript );

Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.


technical details
Supported HTML tags: <Audio> and <video>
Supported JavaScript Objects: Audio, Video


HTML audio / video Tag Reference HTML Audio / Video DOM Reference