HTML Audio/Video DOM defaultMuted attribute
Instance
Set video to default mute:
myVid = document.getElementById("video1"); myVid.defaultMuted=true;
Definition and Usage
defaultMuted attribute to set or return whether audio/video is muted by default.
Setting this attribute will only change the default muted state, not the current one. To change the current muted state, please use muted attribute.
Browser Support
Only Google Chrome supports the defaultMuted attribute.
Syntax
Set defaultMuted attribute:
audio|video.defaultMuted=true|false
Return defaultMuted attribute:
audio|video.defaultMuted
Attribute value
Value | Description |
---|---|
true | Indicates that audio/video is muted by default. |
false | Default. Indicates that audio/video is not muted by default. |
Technical Details
Return value | Boolean value. true|false |
---|---|
Default value: | false |