Video mutedProperty

Video 对象参考手册Video Object

Example

Turn off the video's sound:

document.getElementById("myVideo").muted = true;

Try it Yourself »

Definition and Usage

The muted property sets or returns whether the video should be muted (sound turned off).

This property reflects the <video> muted attribute.

When the attribute is present, it indicates that the video output is muted.

Note:The <video> element is new in HTML5.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the muted attribute.

Note:Internet Explorer 8 and earlier IE versions do not support the <video> element.


Syntax

Return the muted property:

videoObject.muted

Set the muted property:

videoObject.muted=true|false

Property Values

Value Description
true|false Specifies whether the sound of the video output is muted.
  • true - Indicates that the video sound should be turned off.
  • false - Default. Indicates that the video sound should be turned on.

Technical Details

Return Value: A Boolean value, returns true if the video output is muted, otherwise returns false.
Default Value: false


More Examples

Example

Check whether the sound is turned off:

var x = document.getElementById("myVideo").muted;
xThe result is:
true

Try it Yourself »


Related Pages

HTML Reference:HTML <video> muted Attribute


Video 对象参考手册Video Object Other Extensions