HTML Audio / Video DOM progress event
HTML Audio / Video DOM Reference
Examples
Tip video is downloaded in:
myVid=document.getElementById("video1");
myVid.onprogress=alert("Downloading video");
myVid.onprogress=alert("Downloading video");
try it"
Definition and Usage
When the browser is downloading specified audio / video, progress event occurs.
When the audio / video is loading process will be followed by the following events occur:
Browser Support
All major browsers support progress event.
Note: 8 and earlier versions of Internet Explorer does not support the event.
grammar
In HTML:
<audio|video onprogress=" SomeJavaScriptCode ">
In JavaScript:
audio|video .onprogress= SomeJavaScriptCode ;
Use addEventListener ():
audio|video .addEventListener("progress", function()
{
//SomeJavaScriptCode
}
);
{
//SomeJavaScriptCode
}
);
technical details
以下 HTML 标签支持: | <audio>, <video> |
---|---|
以下 JavaScript 对象支持: | Audio, Video |
More examples
Use onprogress attributes on HTML elements
Use addEventListener () to listen for progress events
HTML Audio / Video DOM Reference