Latest web development tutorials

HTML Audio / Video DOM abort event

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

Examples

A message appears when you load the video termination:

var vid = document.getElementById ( "myVideo");
vid.onabort = function () {
alert ( "Video termination load");
};



Definition and Usage

abort event in the audio / video (audio / video) to terminate trigger when loading.

This event is triggered upon termination of download of multimedia data, rather than triggering when an error occurs.

Tip: Impact of multimedia data loading event are:


Browser Support

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

event
abort Yes 9.0 Yes Yes Yes

Note: Windows 7 in the Internet Explorer 11 does not support the abort event.


grammar

In HTML:

<Elementonabort = "myScript">

In JavaScript:

object .onabort = function () {myScript };

JavaScript, use the addEventListener () method:

object .addEventListener ( "abort", 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