HTML onprogress Attribute
Definition and Usage
The onprogress
attribute defines a script to be run when the browser is downloading the specified audio/video.
During the loading process of an audio/video, the following events occur, in this order:
Applies to
The onprogress
attribute is part of the Event Attributes, and can be used on the following elements:
Elements | Event |
---|---|
<audio> | progress |
<video> | progress |
Examples
Audio Example
Run "myFunction" when the audio file is being downloaded:
<audio onprogress="myFunction()">
Try it Yourself »
Video Example
Run "myFunction" when the video is being downloaded:
<video onprogress="myFunction()">
Try it Yourself »
Browser Support
The onprogress
attribute has the following browser support for each element:
Element | |||||
---|---|---|---|---|---|
audio | Yes | 9.0 | Yes | Yes | Yes |
video | Yes | 9.0 | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.