readyState property

Returns the state of the track.

Syntax

JavaScript
state = object.readyState

 

Property values

Type: MediaStreamTrackState

State of the MediaStream track.

ValueCondition
live

The track is active. The output of a track in the live state can be switched on or off using the enabled attribute.

ended

The track has ended. Once a track enters the ended state, it never exits it.

 

See also

MediaStreamTrack

 

 

Show: