HTMLMediaElement.muted

HTMLMediaElement.muted 表示媒体元素是否被静音。

Syntax

var isMuted = audioOrVideo.muted
audio.muted = true;

Value

A Boolean (en-US). true 表示被静音, false 表示未被静音。

Example

var obj = document.createElement('video');
console.log(obj.muted); // false

Specifications

Specification Status Comment
HTML Living Standard
HTMLMediaElement.muted
Living Standard  
HTML5
HTMLMediaElement.muted
Recommendation  

Browser compatibility

BCD tables only load in the browser

See also