HTML Audio/Video DOM muted attribute
Example
Turn off the video sound:
myVid=document.getElementById("video1"); myVid.muted=true;
Definition and Usage
The muted attribute sets or returns whether the audio/video should be muted (sound off).
Browser Support
All major browsers support the muted attribute.
Note:Internet Explorer 8 and earlier browsers do not support this property.
Syntax
Set muted property:
audio|video.muted=true|false
Return muted property:
audio|video.muted
Attribute value
Value | Description |
---|---|
true | Indicates that the audio/video sound should be off. |
false | Default. Indicates that the audio/video sound should be on. |
Technical Details
Return value | Boolean value. true|false |
---|---|
Default value: | false |