diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/mediastreamtrack/getcapabilities | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/mediastreamtrack/getcapabilities')
-rw-r--r-- | files/zh-cn/web/api/mediastreamtrack/getcapabilities/index.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/mediastreamtrack/getcapabilities/index.html b/files/zh-cn/web/api/mediastreamtrack/getcapabilities/index.html new file mode 100644 index 0000000000..cc44f48f13 --- /dev/null +++ b/files/zh-cn/web/api/mediastreamtrack/getcapabilities/index.html @@ -0,0 +1,52 @@ +--- +title: MediaStreamTrack.getCapabilities() +slug: Web/API/MediaStreamTrack/getCapabilities +tags: + - API + - Media Capture and Streams API + - Media Streams API + - MediaStreamTrack + - getCapabilities + - 媒体API +translation_of: Web/API/MediaStreamTrack/getCapabilities +--- +<p>{{APIRef("Media Capture and Streams")}}</p> + +<p><span class="seoSummary">{{domxref("MediaStreamTrack")}} 接口的 <strong><code>getCapabilities()</code></strong> 方法返回一个 {{domxref('MediaTrackCapabilities')}} 对象,此对象表示每个可调节属性的值或者范围,该特性依赖于平台和{{Glossary("user agent")}}.</span></p> + +<p>一旦你知道了浏览器的功能,你的脚本可以通过调用 {{domxref("MediaStreamTrack.applyConstraints", "applyConstraints()")}} 来请求配置为匹配理想或可接受的设置。参考{{SectionOnPage("/zh-CN/docs/Web/API/Media_Streams_API", "Capabilities and constraints")}} 以了解受限制属性的具体细节。</p> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox">var <em>capabilities</em> = <em>MediaStreamTrack</em>.getCapabilities();</pre> + +<h3 id="参数">参数</h3> + +<p>没有参数。</p> + +<h3 id="返回值"><span style="font-size: 1.714rem; letter-spacing: -0.021em; line-height: 1;">返回值</span></h3> + +<p>A {{domxref('MediaTrackCapabilities')}} object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties.</p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('Media Capture', '#dom-mediastreamtrack-getconstraints', 'getConstraints()')}}</td> + <td>{{Spec2('Media Capture')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("api.MediaStreamTrack.getCapabilities")}}</p> |