The read-only property MediaStreamTrack.readyState
returns an enumerated value giving the status of the track.
var state = track.readyState;
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. Specification | Status | Comment |
---|---|---|
Media Capture and Streams The definition of 'MediaStreamTrack.readyState' in that specification. | Candidate Recommendation | Initial specification. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | 12 | 50 | No | Yes | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 50 | ? | ? | Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/readyState