Javascript examples for DOM Event:onvolumechange
Execute a JavaScript when the volume of an audio has been changed:
<!DOCTYPE html> <html> <body> <audio controls onvolumechange="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 w w . j av a 2 s . c om <script> function myFunction() { console.log("The volume has been changed!"); } </script> </body> </html>