Video volumeProperty
Example
Set the video volume to 20%:
document.getElementById("myVideo").volume = 0.2;
Try it Yourself »
Definition and Usage
The volume property sets or returns the current volume of the video, from 0.0 (mute) to 1.0 (loudest).
Note:The <video> element is new in HTML5.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the volume property.
Note:Internet Explorer 8 and earlier IE versions do not support the <video> element.
Syntax
Return the volume property:
videoObject.volume
Set the volume property:
videoObject.volume=number
Property Values
| Value | Description |
|---|---|
| number | Specifies the current volume of the video. Must be a number between 0.0 and 1.0. Example:
|
Technical Details
| Return Value: | A number representing the volume of the video |
|---|---|
| Default Value: | 1.0 |
Video Object Other Extensions