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/htmlmediaelement/audiotracks | |
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/htmlmediaelement/audiotracks')
-rw-r--r-- | files/zh-cn/web/api/htmlmediaelement/audiotracks/index.html | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/htmlmediaelement/audiotracks/index.html b/files/zh-cn/web/api/htmlmediaelement/audiotracks/index.html new file mode 100644 index 0000000000..59dba0a968 --- /dev/null +++ b/files/zh-cn/web/api/htmlmediaelement/audiotracks/index.html @@ -0,0 +1,110 @@ +--- +title: HTMLMediaElement.audioTracks +slug: Web/API/HTMLMediaElement/audioTracks +translation_of: Web/API/HTMLMediaElement/audioTracks +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p> <strong><code>HTMLMediaElement.audioTracks</code></strong> 获得可用音频轨道的数量</p> + +<h2 id="Syntax" name="Syntax">语法</h2> + +<pre>audio|video.audioTracks</pre> + +<h2 id="返回值">返回值</h2> + +<p>AudioTrackList 对象 表示音频/视频的可用音频轨道</p> + +<h2 id="用例">用例</h2> + +<p>以audio标签为例</p> + +<pre class="brush: html"><audio id='audio'></audio> +</pre> + +<p>调用</p> + +<pre>myVid=document.getElementById("audio"); +alert(<code>myVid.audioTracks</code>.length);</pre> + +<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('HTML WHATWG', "the-video-element.html#htmlmediaelement", "HTMLMediaElement.audioTracks")}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>No change from {{SpecName('HTML5 W3C')}}</td> + </tr> + <tr> + <td> + <p>{{SpecName('HTML5 W3C', "embedded-content-0.html#htmlmediaelement", "HTMLMediaElement.audioTracks")}}</p> + </td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器支持">浏览器支持</h2> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td><code>audioTracks</code> property</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatGeckoDesktop("33.0")}}[5]</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>Firefox OS (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td><code>audioTracks</code> property</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatGeckoMobile("33.0")}}[5]</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="See_Also" name="See_Also">还可以看看</h2> + +<ul> + <li>定义它的接口, {{domxref("HTMLMediaElement")}}.</li> +</ul> |