THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Audio muted Property

Audio Object Reference Audio Object

Example

Turn off sound:

document.getElementById("myAudio").muted = true;
Try it Yourself »

Definition and Usage

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

This property reflects the <audio> muted attribute.

When present, it specifies that the audio output should be muted.

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


Browser Support

Property
muted Yes Yes Yes Yes Yes

Syntax

Return the muted property:

audioObject.muted

Set the muted property:

audioObject.muted=true|false

Property Values

Value Description
true|false Specifies whether the audio output should be muted, or not
  • true - Indicates that the sound should should be turned OFF for the audio
  • false - Default. Indicates that the sound should be turned ON for the audio

Technical Details

Return Value: A Boolean, returns true if the audio output is muted, otherwise it returns false
Default Value: false

More Examples

Example

Find out if the sound is turned off:

var x = document.getElementById("myAudio").muted;

The result of x will be:

true
Try it Yourself »

Related Pages

HTML reference: HTML <audio> muted attribute


Audio Object Reference Audio Object