Turn off sound for a video:
The muted property sets or returns whether the audio output of the video should be muted (sound turned off).
This property reflects the <video> muted attribute.
When present, it specifies that the audio output of the video should be muted.
Note: The <video> element is new in HTML5.
The muted property is supported in all major browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <video> element.
Return the muted property:
Set the muted property:
Value | Description |
---|---|
true|false | Specifies whether the audio output of the video should be muted, or not
|
Return Value: | A Boolean, returns true if the audio output of the video is muted, otherwise it returns false |
---|---|
Default Value: | false |
Find out if the sound is turned off:
The result of x will be:
HTML reference: HTML <video> muted attribute