HTMLMediaElement: volume property - Web APIs | MDN

Value

A double values must fall between 0 and 1, where 0 is effectively muted and 1 is the loudest possible value.

Examples

js

const obj = document.createElement("audio");
console.log(obj.volume); // 1
obj.volume = 0.75;

Specifications

Specification
HTML
# dom-media-volume-dev

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.