Audio volume attribute
Definition and usage
volume
The volume attribute sets or returns the volume of the audio, ranging from 0.0 (mute) to 1.0 (maximum volume).
Syntax
Return the volume attribute:
audioObject.volume
Set the volume attribute:
audioObject.volume= number
Attribute Value
Value | Description |
---|---|
number |
Specifies the volume of the audio. It must be a number between 0.0 and 1.0. Example Value:
|
Technical Details
Return Value: | A number representing the volume of the audio. |
---|---|
Default Value: | 1.0 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |