MediaStreamTrack: muted property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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.

Note: 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).

Value

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

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

Examples

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

js
let mutedCount = 0;

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

Specifications

Specification
Media Capture and Streams
# dom-mediastreamtrack-muted

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
muted
Chrome – Full support
Chrome 38 (Release date: 2014-10-07)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Partial support
Firefox 59 (Release date: 2018-03-13)
footnote Partial support
footnote Does not currently track the microphone's muted state from the operating system, see bug 1739163.
Opera – Full support
Opera 25 (Release date: 2014-10-15)
footnote Full support
Safari – Full support
Safari 11 (Release date: 2017-09-19)
footnote Full support
Chrome Android – Full support
Chrome Android 38 (Release date: 2014-10-08)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 59 (Release date: 2018-03-13)
footnote Partial support
footnote Does not currently track the microphone's muted state from the operating system, see bug 1739163.
Opera Android – Full support
Opera Android 25 (Release date: 2014-10-16)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11 (Release date: 2017-09-19)
footnote Full support
Samsung Internet – Full support
Samsung Internet 3 (Release date: 2015-04-10)
footnote Full support
WebView Android – Full support
WebView Android 38 (Release date: 2014-10-08)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11 (Release date: 2017-09-19)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support