MediaStreamTrack.readyState

翻译不完整。 请帮助我们翻译这篇文章!

MediaStreamTrack.readyState只读属性返回一个枚举的值,该值给出了轨道的状态。

语法

const state = track.readyState

它采用以下值之一:

  • "live"表示输入已连接,并尽最大努力提供实时数据。 在这种情况下,可以使用MediaStreamTrack.enabled属性打开或关闭数据输出。
  • "ended"表示输入不再提供任何数据,也永远不会提供新数据。

技术指标

Specification Status Comment
Media Capture and Streams
MediaStreamTrack.readyState
Candidate Recommendation Initial specification.

浏览器兼容性

Update compatibility data on GitHub
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

看看别的