Javascript examples for DOM Event:onpause
Execute a JavaScript when an audio has been paused:
<!DOCTYPE html> <html> <body> <audio controls onpause="myFunction()"> <source src="your.ogg" type="audio/ogg"> <source src="your.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>//from w ww .jav a2 s . c om <script> function myFunction() { console.log("The audio was paused"); } </script> </body> </html>