Introducing JW Labs, the innovation hub for online video technology


Created by Jeroen Wijering

« Back to The State of HTML5 Video

Volume API

This page lists JavaScript API support for getting and setting the value of the muted and volume attributes. It also tests if the volumechange event gets fired when one of the two attributes get updated, either through JavaScript or by using the built-in controls.

Browser Get volume/muted Set volume/muted Volumechange event
Firefox 25 working working always firing
Chrome 30 working working always firing
Safari 6 working working always firing
Internet Explorer 9 working working always firing
Internet Explorer 10 working working always firing
Internet Explorer 11 working working always firing
iOS 6 (iPad) -1 - -
iOS 7 (iPad) -1 - -
Android 4.0 (Browser) -2 -2 -2
Android 4.2 (Chrome) -2 -2 -2
Android 4.4 (Chrome) -2 -2 -2

1 Muted always returning false, volume always returning 1.
2 Getters, setters and event work, but the actual video volume does not change.

See the W3C video spec for more details on the media elements API.

Test Tag

Here’s a video tag with some javascript operators:

  • Request the current muted or volume attributes.
  • Toggle the muted attribute or set the volume to 0.1 or 0.9.
  • Check below if changes to the muted or volume state are broadcasted: