onvolumechange event Event Object Example Execute JavaScript when the volume of the video changes: Try it » More examples are included at the bottom of this article. Definition and Usage The onvolumechange event is triggered when the volume of the video/audio (audio/video) changes. This event can be invoked in the following ways: Increase or decrease the volume Mute or unmute the media player Tip: Use the Audio or Video object's volume property to set or return the volume of the video/audio (audio/video). Browser support The numbers in the table indicate the version number of the first browser to support the event. Events onvolumechange Yes 9.0 Yes Yes Yes Syntax In HTML: < element onvolumechange=" myScript ">Try it In JavaScript: object .onvolumechange=function(){ myScript }; Try it In JavaScript, use the addEventListener() method: object .addEventListener("volumechange", myScript ); Try it Note: Internet Explorer 8 and earlier IE versions do not support addEventListener() method. Technical Details Does it support bubbling: No Is it cancelable: No Event type: Event Supported HTML tags: , More examples Example Execute JavaScript when the volume of the audio changes: Try it » Example Use the volume property to set the volume: document.getElementById("myVideo").volume = 0.2; Try it » Event Object