Firefox Tomorrow

web api instance property

HTMLMediaElement: volume property

View on MDN ↗

The HTMLMediaElement.volume property sets the volume at which the media will be played.

Value

A number between 0 and 1, where 0 is effectively muted, and 1 is the loudest possible value.

Examples

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

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also