|
|
The |
<script>
function myFunction() {
alert("Browser has loaded the current frame");
}
</script>
<video onloadeddata="myFunction()">
The loadeddata event occurs when data for the current frame is loaded, but not enough data to play next frame of the specified audio/video.
During the loading process of an audio/video, the following events occur, in this order:
The numbers in the table specify the first browser version that fully supports the event.
<element onloadeddata="script">
| Value | Description |
|---|---|
| script | The script to be run when data is loaded |
| Supported HTML tags: | <audio> and <video> |
|---|
Play Video.
<!DOCTYPE html>
<html>
<body>
<script>
function myFunction() {
alert('Browser has loaded the current frame');
}
</script>
<video controls onloadeddata="myFunction()">
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
<p>Video courtesy of <a href="https://file-examples.com/wp-content/storage/2017/04/file_example_MP4_480_1_5MG.mp4" target="_blank">Big Buck Bunny</a>.</p>
</body>
</html>
Play Audio.
<!DOCTYPE html>
<html>
<body>
<script>
function myFunction() {
alert('Browser has loaded the current frame');
}
</script>
<audio controls onloadeddata="myFunction()">
<source src="https://file-examples.com/index.php/sample-audio-files/sample-mp3-download/" type="audio/ogg">
<source src="https://file-examples.com/index.php/sample-audio-files/sample-mp3-download/" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</body>
</html>
| html event attributes |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Media Events Attribute |
Uploaded by: | Admin |
Read Articlehttps://develop.horje.com/learn/1434/reference