MediaStreamTrack.readyState

The read-only property MediaStreamTrack.readyState returns an enumerated value giving the status of the track.

Syntax

 var state = track.readyState;

Value

It takes one of the following values:

  • "live" which indicates that an input is connected and does its best-effort in providing real-time data. In that case, the output of data can be switched on or off using the MediaStreamTrack.enabled attribute.
  • "ended" which indicates that the input is not giving any more data and will never provide new data. 

Example

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'MediaStreamTrack.readyState' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes1250 No Yes ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes50 ? ? Yes

See also

Document Tags and Contributors

Contributors to this page: connorshea, libbymc, Sheppy, jpmedley, fscholz, teoli
Last updated by: connorshea,