Javascript examples for DOM Event:addEventListener
The onloadedmetadata event occurs when meta data for the specified audio/video has been loaded.
Bubbles | No |
---|---|
Cancelable | No |
Supported HTML tags: | <audio> and <video> |
<!DOCTYPE html> <html> <body> <video controls id="myVideo"> <source src="your.mp4" type="video/mp4"> <source src="your.ogg" type="video/ogg"> Your browser does not support HTML5 video. </video>//from w w w . j a v a2s . c o m <script> document.getElementById("myVideo").addEventListener("loadedmetadata", myFunction); function myFunction() { console.log("Meta data for video loaded"); } </script> </body> </html>