MediaStreamTrack: muted property
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
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
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
muted |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.