MediaStreamTrack.muted

The muted read-only property of the MediaStreamTrack interface returns a Boolean value indicating whether or not the track is currently unable to provide media output.

To implement a way for users to mute and unmute a track, use the enabled property. When a track is disabled by setting enabled to false, it generates only empty frames (audio frames in which every sample is 0, or video frames in which every pixel is black).

Syntax

mutedFlag = MediaStreamTrack.muted;

Value

Boolean which is true if the track is currently muted, or false if the track is currently unmuted.

When possible, avoid polling muted to monitor the track's muting status. Instead, add event listeners for the mute and unmute events.

Example

This example counts the number of tracks in an array of MediaStreamTrack objects which are currently muted.

var mutedCount = 0;

trackList.forEach(function(track) {
  if (track.muted) {
    mutedCount += 1;
  }
});

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'muted' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge Full support 12Firefox Full support 59IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 59Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

Contributors to this page: fscholz, Sheppy, jeremy-french, jpmedley
Last updated by: fscholz,