Latest web development tutorials

HTML Audio / Video DOM defaultMuted property

HTML audio / video Tag Reference HTML Audio / Video DOM Reference

Examples

Default settings Video muted:

myVid=document.getElementById("video1");
myVid.defaultMuted=true;

try it"

Definition and Usage

defaultMuted property sets or returns the audio / video whether the default muted.

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 Chrome and Safari 6 support defaultMuted property.


grammar

Setting defaultMuted properties:

audio|video .defaultMuted=true|false

Back defaultMuted properties:

audio|video .defaultMuted

Property Value

描述
true 指示音频/视频默认是静音的。
false 默认。指示音频/视频默认不是静音的。

technical details

返回值: 布尔值,true|false
默认值: false


HTML audio / video Tag Reference HTML Audio / Video DOM Reference