MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey

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
WHATWG HTML Living Standard
HTMLMediaElement.controls
Living Standard No change from HTML5
HTML5
HTMLMediaElement.controls
Recommendation Initial definition.

浏览器兼容

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,