Latest web development tutorials

HTML Audio / Video DOM muted property

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

Examples

Off video sound:

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

try it"

Definition and Usage

muted property sets or returns the audio / video whether it should be mute (turn off the sound).


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the muted property.

Note: 8 and earlier versions of Internet Explorer does not support this property.


grammar

Setting muted properties:

audio|video .muted=true|false

Back muted attributes:

audio|video .muted

Property Value

描述
true 指示应该关闭音频/视频的声音。
false 默认。指示应该打开音频/视频的声音。

technical details

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


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