English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The abort event was triggered when the resource was not fully loaded, but not due to an error.
HTML Audio/Video DOM Reference Manual
A prompt message pops up when the video loading is terminated:
var vid = document.getElementById("myVideo"); vid.onabort = function() { alert("Video load aborted"); };
When audio/An abort event occurs when the video loading is interrupted.
This event occurs when media data download is aborted, not due to an error.
Tip: Events affecting multimedia data loading include:
The numbers in the table indicate the version number of the first browser that supports the event.
event | |||||
---|---|---|---|---|---|
abort | Yes | 9.0 | Yes | Yes | Yes |
Note:Windows 7 in Internet Explorer 11 The abort event is not supported.
In HTML:
<element onabort="myScript">
In JavaScript:
object.onabort=function(){myScript};
In JavaScript, use the addEventListener() method:
object.addEventListener("abort", 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 |