HTMLMediaElement.muted
HTMLMediaElement.muted 表示媒体元素是否被静音。
Syntax
var isMuted = audioOrVideo.muted audio.muted = true;
Value
A Boolean (en-US). true 表示被静音, false 表示未被静音。
Example
js
var obj = document.createElement('video');
console.log(obj.muted); // false
Specifications
| Specification |
|---|
| HTML Standard # dom-media-muted-dev |
Browser compatibility
BCD tables only load in the browser
See also
- The interface defining it,
HTMLMediaElement. HTMLMediaElement.defaultMuted(en-US)HTMLMediaElement.volume