HTML Audio/Video DOM muted Property
Example
var vid = document.getElementById("myVideo");
function enableMute() {
vid.muted = true;
}
function disableMute() {
vid.muted = false;
}
function checkMute() {
alert(vid.muted);
}
Meaning
The muted property sets or returns whether the audio/video is muted or not.
Return a Boolean value, returns true if the sound is turned OFF, otherwise it returns false.
And the default Value is false.
Standard Syntax
Return the muted property:
audio|video.muted
Set the muted property:
audio|video.muted=true|false
Advertisement
Return Value
| Type | Description |
|---|---|
| true | Specifies that the sound should be turned OFF for the audio/video. |
| false | Default. Specifies that the sound should be turned ON for the audio/video. |