HTMLMediaElement.autoplay

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

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

语法

...

参数类型

用例

...

html
<...></...>

...

js
Xxx.xxx();

规范

Specification
HTML Standard
# dom-media-autoplay

浏览器兼容性

BCD tables only load in the browser

参见