MediaStreamTrack.getCapabilities()

这篇翻译不完整。请帮忙从英语翻译这篇文章

MediaStreamTrack 接口的 getCapabilities() 方法返回一个  MediaTrackCapabilities 对象,此对象表示每个可调节属性的值或者范围,该特性依赖于平台和user agent.

一旦你知道了浏览器的功能,你的脚本可以通过调用 applyConstraints() 来请求配置为匹配理想或可接受的设置。参考Capabilities and constraints in MediaStream API 以了解受限制属性的具体细节。

语法

var capabilities = MediaStreamTrack.getCapabilities();

参数

没有参数。

返回值

MediaTrackCapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties.

规范

Specification Status Comment
Media Capture and Streams
getConstraints()
Candidate Recommendation Initial definition.

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
getCapabilitiesChrome Full support 66Edge Full support 12Firefox No support NoIE No support NoOpera Full support 53Safari Full support YesWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS Full support YesSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support

文档标签和贡献者

此页面的贡献者: mdnwebdocs-bot, jjc
最后编辑者: mdnwebdocs-bot,