From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/htmlmediaelement/audiotracks/index.html | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 files/zh-cn/web/api/htmlmediaelement/audiotracks/index.html (limited to 'files/zh-cn/web/api/htmlmediaelement/audiotracks') 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 +--- +
{{APIRef("HTML DOM")}}
+ +

 HTMLMediaElement.audioTracks 获得可用音频轨道的数量

+ +

语法

+ +
audio|video.audioTracks
+ +

返回值

+ +

AudioTrackList    对象 表示音频/视频的可用音频轨道

+ +

用例

+ +

以audio标签为例

+ +
<audio id='audio'></audio>
+
+ +

调用

+ +
myVid=document.getElementById("audio");
+alert(myVid.audioTracks.length);
+ +

参考文档

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "the-video-element.html#htmlmediaelement", "HTMLMediaElement.audioTracks")}}{{Spec2('HTML WHATWG')}}No change from {{SpecName('HTML5 W3C')}}
+

{{SpecName('HTML5 W3C', "embedded-content-0.html#htmlmediaelement", "HTMLMediaElement.audioTracks")}}

+
{{Spec2('HTML5 W3C')}}Initial definition.
+ +

浏览器支持

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
audioTracks property{{CompatUnknown}}{{CompatGeckoDesktop("33.0")}}[5]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)Firefox OS (Gecko)IE MobileOpera MobileSafari Mobile
audioTracks property{{CompatUnknown}}{{CompatGeckoMobile("33.0")}}[5]{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

还可以看看

+ + -- cgit v1.2.3-54-g00ecf