onprogressEvent
Example
Execute JavaScript when the video is downloading:
<video onprogress="myFunction()">
Try it Yourself »
More examples are included at the bottom of this article.
Definition and Usage
The onprogress event is triggered when the browser downloads the specified video/audio (audio/video).
During the download of video/audio (audio/video), the events are triggered in the following order:
Browser Support
The numbers in the table indicate the first browser version that supports this event.
| Event | |||||
|---|---|---|---|---|---|
| onprogress | Yes | 9.0 | Yes | Yes | Yes |
Syntax
In HTML:
<element onprogress="myScript">Try it Yourself
In JavaScript:
object.onprogress=function(){myScript};Try it Yourself
In JavaScript, using the addEventListener() method:
object.addEventListener("progress", myScript);Try it Yourself
Note:Internet Explorer 8 and earlier IE versions do not supportaddEventListener()method.
Technical Details
| Does it support bubbling: | No |
|---|---|
| Can it be cancelled: | No |
| Event type: | Event |
| Supported HTML tags: | <audio>, <video> |

More Examples
Example
Execute JavaScript when the audio is downloading:
<audio onprogress="myFunction()">
Try it Yourself »
Event Object Other Extensions