Audio muted attribute
Example
Turn off the audio:
document.getElementById("myAudio").muted = true;
Try it »
Definition and Usage
The muted attribute sets or returns whether the audio should be muted (sound turned off).
This property reflects
This attribute specifies that the audio is muted.
Note:
Browser support





All major browsers support the muted attribute.
Note: Internet Explorer 8 and earlier IE versions are not supported.
Syntax
Return the muted attribute:
audioObject
.muted
Set the muted attribute:
audioObject
.muted=true|false
Attribute values
| Value | Description |
|---|---|
| true|false | Specifies whether the output audio is muted:
|
Technical Details
| Return Value: | Boolean. Returns true if the audio output is muted, otherwise false. |
|---|---|
| Default Value: | false |
More examples
Example
Check whether the sound is turned off:
var x = document.getElementById("myAudio").muted;
x
The output is:
true
Try it »
Related pages
HTML Reference Manual: HTML
Audio object