GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

MediaStreamTrack: muted property

Media Capture and Streams

Media Capture and Streams

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

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"MediaStreamTrack: muted property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/muted

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·