Web/API/HTMLMediaElement/volume

From Get docs

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

Syntax

var volume ​= video.volume; //1

Value

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

Example

var obj = document.createElement('audio');
console.log(obj.volume); // 1
obj.volume = 0.75;

Specifications

Specification Status Comment
HTML Living StandardThe definition of 'HTMLMediaElement.volume' in that specification. Living Standard  
HTML5The definition of 'HTMLMediaElement.volume' in that specification. Recommendation  

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
volume Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support


See also