enabled property

bool get enabled

The enabled property of the MediaStreamTrack interface is a Boolean value which is true if the track is allowed to render the source stream or false if it is not. This can be used to intentionally mute a track.

When enabled, a track's data is output from the source to the destination; otherwise, empty frames are output.

In the case of audio, a disabled track generates frames of silence (that is, frames in which every sample's value is 0). For video tracks, every frame is filled entirely with black pixels.

The value of enabled, in essence, represents what a typical user would consider the muting state for a track, whereas the MediaStreamTrack.muted property indicates a state in which the track is temporarily unable to output data, such as a scenario in which frames have been lost in transit.

Note: If the track has been disconnected, the value of this property can be changed, but has no effect.

Implementation

external bool get enabled;
set enabled (bool value)

Implementation

external set enabled(bool value);