Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Audio defaultMuted attribute

Audio defaultMuted attribute

Audio Object Reference Audio object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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.
  • true - specifies that the audio is muted by default.
  • false - default. Specifies that the audio is not 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 Reference Audio object