HTML DOM Video volume Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

Video volume Property

❮ Video Object

Example

Set video volume to 20%:

document.getElementById("myVideo").volume = 0.2;
Try it Yourself »

Definition and Usage

The volume property sets or returns the audio volume of a video, from 0.0 (silent) to 1.0 (loudest).

Note: The <video> element is new in HTML5.


Browser Support

Property
volume Yes 9.0 Yes Yes Yes

Syntax

Return the volume property:

videoObject.volume

Set the volume property:

videoObject.volume = number

Property Values

Value Description
number Specifies the audio volume of the video. Must be a number between 0.0 to 1.0
Example values:
  • 1.0 is highest volume (100%. This is default)
  • 0.5 is half volume (50%)
  • 0.0 is silent (same as mute)

Technical Details

Return Value: A Number, representing the audio volume of the video
Default Value: 1.0

❮ Video Object