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
Loading…
See also
- The interface defining it,
HTMLMediaElement. HTMLMediaElement.defaultMutedHTMLMediaElement.volume