HTML Audio/Video DOMprogressEvents
HTML Audio/Video DOM Reference Manual
Example
Prompt: Video is downloading:
myVid=document.getElementById("video1");
myVid.onprogress=alert("Downloading video");
myVid.onprogress=alert("Downloading video");
Try it Yourself »
Definition and Usage
When the browser is downloading the specified audio/video, the progress event occurs.
When the audio/video is in the process of loading, the following events occur in sequence:
Browser Support
![]()
![]()
![]()
![]()
![]()
All mainstream browsers support the progress event.
Note:Internet Explorer 8 and earlier versions do not support this event.
Syntax
In HTML:
<audio|video onprogress="SomeJavaScriptCode">
In JavaScript:
audio|video.onprogress=SomeJavaScriptCode;
Using addEventListener():
audio|video.addEventListener("progress", function()
{
//SomeJavaScriptCode
}
);
{
//SomeJavaScriptCode
}
);
Technical Details
| The following HTML tags are supported: | <audio>, <video> |
|---|---|
| The following JavaScript objects are supported: | Audio, Video |

More Examples
Use the onprogress attribute on HTML elements
Use addEventListener() to listen for the progress event
HTML Audio/Video DOM Reference Manualother extensions