此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
HTMLMediaElement.muted
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
HTMLMediaElement.muted 表示媒体元素是否被静音。
Syntax
var isMuted = audioOrVideo.muted audio.muted = true;
Value
A Boolean. true 表示被静音, false 表示未被静音。
Example
js
var obj = document.createElement("video");
console.log(obj.muted); // false
Specifications
| Specification |
|---|
| HTML> # dom-media-muted-dev> |
Browser compatibility
Enable JavaScript to view this browser compatibility table.
See also
- The interface defining it,
HTMLMediaElement. HTMLMediaElement.defaultMutedHTMLMediaElement.volume