onloadstart Event
Definition and Usage
The onloadstart event occurs when the browser starts to search for the specified audio/video. This is the time when the loading process starts.
The following events occur in the following order during the loading process of audio/video:
Example
Example 1
Execute JavaScript when the video starts loading:
<video onloadstart="myFunction()">
Example 2
Execute JavaScript when the audio starts loading:
<audio onloadstart="myFunction()">
Syntax
In HTML:
<element onloadstart="myScript">
In JavaScript:
object.onloadstart = function(){myScript};
In JavaScript, use the addEventListener() method:
object.addEventListener("loadstart", myScript);
Note:Internet Explorer 8 and earlier versions do not support addEventListener() Method.
Technical Details
Bubbling: | Not Supported |
---|---|
Cancelable: | Not Supported |
Event Type: | ProgressEvent |
Supported HTML Tags: | <audio> and <video> |
DOM Version: | Level 3 Events |
Browser Support
The numbers in the table indicate the first browser version that fully supports this event.
event | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
onloadstart | Support | 9.0 | Support | Support | Support |