Audio defaultMuted attribute
Definition and usage
defaultMuted
Attribute sets or returns whether the audio is muted by default.
Tip:Setting this attribute will only change the default muted state, not the current state. To change the current muted state, please use muted attribute.
Example
Set the audio to be muted by default:
document.getElementById("myAudio").defaultMuted = true;
Syntax
Return the defaultMuted attribute:
audioObject.defaultMuted
Set the defaultMuted attribute:
audioObject.defaultMuted = true|false
Attribute value
Value | Description |
---|---|
true|false |
Define whether the audio is muted by default.
|
Technical Details
Return Value: | Boolean value, returns true if the audio is muted by default, otherwise returns false. |
---|---|
Default Value: | false |
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Not Supported | 11.0 | 6.0 | Support |