MediaStreamTrack.readyState
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.
**MediaStreamTrack.readyState
**只读属性返回一个枚举的值,该值给出了轨道的状态。
语法
const state = track.readyState
值
它采用以下值之一:
"live"
表示输入已连接,并尽最大努力提供实时数据。在这种情况下,可以使用MediaStreamTrack.enabled
属性打开或关闭数据输出。"ended"
表示输入不再提供任何数据,也永远不会提供新数据。
规范
Specification |
---|
Media Capture and Streams # dom-mediastreamtrack-readystate |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
readyState |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.