Latest web development tutorials

HTML DOM Audio defaultMuted property

Audio Object Reference Audio Object

Examples

The default setting audio mute:

document.getElementById("myAudio").defaultMuted = true;

try it"

Definition and Usage

defaultMuted property sets or returns whether the audio is muted by default.

Setting this property will only change the default mute state, instead of the current. To change the current mute state, use the muted property.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Google Chrome and Safari 6 browser support defaultMuted property.


grammar

Back defaultMuted properties:

audioObject .defaultMuted

Setting defaultMuted properties:

audioObject .defaultMuted=true|false

Property Value

描述
true|false 指示音频默认是否静音。
  • true - 指定音频默认为静音。
  • false - 默认。指定音频默认为不静音。

technical details

return value: Boolean value that, if set the default audio mute returns true, otherwise returns false.
Defaults: false


Audio Object Reference Audio Object