From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/htmlmediaelement/autoplay/index.html | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 files/zh-cn/web/api/htmlmediaelement/autoplay/index.html (limited to 'files/zh-cn/web/api/htmlmediaelement/autoplay') diff --git a/files/zh-cn/web/api/htmlmediaelement/autoplay/index.html b/files/zh-cn/web/api/htmlmediaelement/autoplay/index.html new file mode 100644 index 0000000000..0da3afbc2c --- /dev/null +++ b/files/zh-cn/web/api/htmlmediaelement/autoplay/index.html @@ -0,0 +1,110 @@ +--- +title: HTMLMediaElement.autoplay +slug: Web/API/HTMLMediaElement/autoplay +translation_of: Web/API/HTMLMediaElement/autoplay +--- +
{{APIRef("HTML DOM")}}
+ +

HTMLMediaElement.autoplay 属性等同于HTML属性中的 {{htmlattrxref("autoplay", "video")}}, 它表示当player下载到足够可以播放的媒体文件时,是否自动播放视频。

+ +

注意: 一些版本的Chrome只支持autostart, 不支持autoplay

+ +

语法

+ +
...
+ +

参数类型

+ +

{{domxref("Boolean")}}

+ +

用例

+ +

...

+ +
<...></...>
+
+ +

...

+ +
Xxx.xxx()
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + +
规范状态备注
{{SpecName('HTML WHATWG', "the-video-element.html#htmlmediaelement", "HTMLMediaElement.autoplay")}}{{Spec2('HTML WHATWG')}}No change from {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5 W3C', "embedded-content-0.html#htmlmediaelement", "HTMLMediaElement.autoplay")}}{{Spec2('HTML5 W3C')}}Initial definition.
+ +

浏览器支持

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9.1")}} [1]{{CompatIE("9")}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)Firefox OS (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

看看这里

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