Javascript examples for DOM Event:onplaying
Execute a JavaScript when an audio is ready to start after having been paused:
<!DOCTYPE html> <html> <body> <audio controls onplaying="myFunction()"> <source src="your.ogg" type="audio/ogg"> <source src="your.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>// w w w . j a va 2s .c o m <script> function myFunction() { console.log("The audio is now playing"); } </script> </body> </html>