Audio volume Property
Description
The volume property sets or returns the audio volume of an audio, from 0.0 (silent) to 1.0 (loudest).
Browser Support
Property | |||||
---|---|---|---|---|---|
volume | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the volume property:
audioObject.volume
Set the volume property:
audioObject.volume = number
Property Values
Value | Description |
---|---|
number |
Specifies the audio volume of the audio. Must be a number between 0.0 to 1.0 Example values:
|
Technical Details
Return Value: | A Number, representing the audio volume of the audio |
---|---|
Default Value: | 1.0 |
❮ Audio Object