HTML Audio/Video DOMloadstartEvents
HTML Audio/Video DOM Reference Manual
Example
Prompt indicating the video has started loading:
myVid=document.getElementById("video1");
myVid.onloadstart=alert("Starting to load video");
myVid.onloadstart=alert("Starting to load video");
Try it Yourself »
Definition and Usage
When the browser begins searching for the specified audio/video, the loadstart event occurs. That is, when the loading process starts.
While the audio/video is in the loading process, the following events occur in sequence:
Browser Support
![]()
![]()
![]()
![]()
![]()
All mainstream browsers support the loadstart event.
Note:Internet Explorer 8 and earlier versions do not support this event.
Syntax
In HTML:
<audio|video onloadstart="SomeJavaScriptCode">
In JavaScript:
audio|video.onloadstart=SomeJavaScriptCode;
Using addEventListener():
audio|video.addEventListener("loadstart", function()
{
//SomeJavaScriptCode
}
);
{
//SomeJavaScriptCode
}
);
Technical Details
| The following HTML tags are supported: | <audio>, <video> |
|---|---|
| The following JavaScript objects are supported: | Audio, Video |

More Examples
Using the onloadstart attribute on HTML elements
Using addEventListener() to listen for the loadstart event
HTML Audio/Video DOM Reference Manualother extensions