Javascript examples for DOM Event:onloadedmetadata
Execute a JavaScript when meta data for an audio is loaded:
<!DOCTYPE html> <html> <body> <audio controls onloadedmetadata="myFunction()"> <source src="your.ogg" type="audio/ogg"> <source src="your.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>/*ww w. ja v a2 s.c om*/ <script> function myFunction() { console.log("Meta data for audio loaded"); } </script> </body> </html>