HTML Audio/Video DOM progress event
Example
Prompt that the video is downloading:
myVid=document.getElementById("video1"); myVid.onprogress=alert("Starting to load video");
Definition and usage
A progress event occurs when the browser is downloading the specified audio/video.
The following events occur sequentially when the audio/video is loading:
Browser support
All mainstream browsers support the progress event.
Note:Internet Explorer 8 or earlier browsers do not support this event.
Syntax
In HTML:
<audio|video onprogress="SomeJavaScriptCode">
In JavaScript:
audio|video.onprogress=SomeJavaScriptCode;
Use addEventListener():
audio|video.addEventListener("progress", function() { //Some JavaScript Code } );
Technical Details
The following HTML tags are supported: | <audio>, <video> |
---|---|
The following JavaScript objects are supported: | Audio, Video |