volumechange
Overview Table
Synchronous | No |
---|---|
Bubbles | No |
Target | dom/Element |
Cancelable | No |
Default action |
The following example implements buttons that change the volume of a video element (v1) by increments of .2 and turn mute on and off. These actions cause the onvolumechange event to be raised.
<button onclick="document.getElementById('v1').volume += 0.2">Volume Up</button>
<button onclick="document.getElementById('v1').volume -= 0.2">Volume Down</button>
<button onclick="document.getElementById('v1').muted = true;">Mute</button>
<button onclick="document.getElementById('v1').muted = false">Unmute</button>
Notes
Remarks
The volume property of the element represents the current volume level. The default playback volume is 1
(100 percent). The playback volume cannot be increased beyond 100 percent. To invoke this event, do one of the following:
- Increase or decrease the volume.
- Mute or unmute the playback.
Syntax
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.9.12
Event handler parameters
- pEvtObj [in]
- Type: ****IHTMLEventObj****
See also
Related pages
- audioApiaudioApi
- audioElementaudioElement
- DocumentDocument
- sourcesource
- videoElementvideoElement
- videoApivideoApi
- WindowWindow
Reference
- volumevolume
- mutedmuted
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]