We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

HTMLMediaElement.controls

HTMLMediaElement.controls 这个负责控制html中的controlsHTML属性, 它负责控制播放的媒体(视频或音频)的控制条是否显示。.

语法

var ctrls = video.controls;
audio.controls = true;

返回值

类型 Boolean. 是否成功

例子

var obj = document.createElement('video');
obj.controls = true;

规范

Specification Status Comment
HTML Living Standard
HTMLMediaElement.controls
Living Standard No change from HTML5
HTML5
HTMLMediaElement.controls
Recommendation Initial definition.

浏览器兼容

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 3.5 (1.9.1) [1] 9 ? ?
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) ? (Yes) (Yes)

产考文档

文档标签和贡献者

此页面的贡献者: haocity
最后编辑者: haocity,