HTML DOM Audio muted property
Definition and Usage
muted property sets or returns whether the audio should be muted (turn off the sound).
This property reflects the <audio> muted property.
This attribute specifies the audio is muted.
Note: <audio> elements in HTML5 is new.
Browser Support
All major browsers support the muted property.
Note: Internet Explorer 8 and earlier versions of IE do not support the <audio> element.
grammar
Back muted attributes:
audioObject .muted
Setting muted properties:
audioObject .muted=true|false
Property Value
值 | 描述 |
---|---|
true|false | 指定输出音频是否静音:
|
technical details
return value: | Boolean value that, if the audio output is muted returns true, otherwise returns false. |
---|---|
Default Value: | false |
More examples
Examples
Detecting whether the sound off:
var x = document.getElementById ( "myAudio") muted.;
x The output is:
true
try it"
Related Pages
HTML Reference Manual: HTML <Audio> the muted property
Audio Object