MediaStreamTrack.readyState

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

Syntax

const 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 property.
  • "ended" which indicates that the input is not giving any more data and will never provide new data.

Specifications

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

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
readyStateChrome Full support YesEdge Full support 12Firefox Full support 50IE No support NoOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 50Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support
Full support
No support
No support

See also