Audio defaultMuted attribute
Example
Set the audio to be muted by default:
document.getElementById("myAudio").defaultMuted = true;
Try it »
Definition and Usage
The defaultMuted attribute sets or returns whether the audio is muted by default.
Setting this attribute only changes the default mute state, not the current one. To change the current mute state, use muted attribute.
Browser support





Only Google Chrome and Safari 6 support the defaultMuted attribute.
Syntax
Return the defaultMuted attribute:
audioObject
.defaultMuted
Set the defaultMuted attribute:
audioObject
.defaultMuted=true|false
Attribute values
| Value | Description |
|---|---|
| true|false | Indicates whether the audio is muted by default.
|
Technical Details
| Return Value: | Boolean. Returns true if the audio is set to be muted by default, otherwise false. |
|---|---|
| Default value: | false |
Audio object