HTML Audio/Video DOMvolumeProperty
HTML Audio/Video DOM Reference
Examples
Set the video volume to 20%:
myVid=document.getElementById("video1");
myVid.volume=0.2;
myVid.volume=0.2;
Try it Yourself »
Definition and Usage
The volume property sets or returns the current volume of the audio/video.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the volume property.
Note:Internet Explorer 8 and earlier versions do not support this property.
Syntax
Set the volume property:
audio|video.volume=volumevalue
Return the volume property:
audio|video.volume
Property Values
| Value | Description |
|---|---|
| volumevalue | Specifies the current volume of the audio/video. Must be a number between 0.0 and 1.0. Example values:
|
Technical Details
| Return value: | A number value indicating the current volume. |
|---|---|
| Default value: | 1.0 |
HTML Audio/Video DOM Reference Other Extensions