HTML Audio / Video Event DOM loadeddata
HTML Audio / Video DOM Reference
Examples
Tips of the current frame data are available:
myVid=document.getElementById("video1");
myVid.onloadeddata=alert("Browser has loaded the current frame");
myVid.onloadeddata=alert("Browser has loaded the current frame");
try it"
Definition and Usage
When the data of the current frame is loaded, but there is not enough data to play when you specify the audio / video to the next frame, loadeddata event occurs.
When the audio / video is loading process will be followed by the following events occur:
Browser Support
All major browsers support loadeddata event.
Note: 8 and earlier versions of Internet Explorer does not support the event.
grammar
In HTML:
<audio|video onloadeddata=" SomeJavaScriptCode ">
In JavaScript:
audio|video .onloadeddata= SomeJavaScriptCode ;
Use addEventListener ():
audio|video .addEventListener("loadeddata", function()
{
//SomeJavaScriptCode
}
);
{
//SomeJavaScriptCode
}
);
technical details
以下 HTML 标签支持: | <audio>, <video> |
---|---|
以下 JavaScript 对象支持: | Audio, Video |
More examples
Use onloadeddata attributes on HTML elements
Use addEventListener () to listen for the event loadeddata
HTML Audio / Video DOM Reference