The HTMLMediaElement.controls
property reflects the controls
HTML attribute, which controls whether user interface controls for playing the media item will be displayed.
Syntax
var ctrls = video.controls; audio.controls = true;
Value
A Boolean
. A value of true
means controls will be displayed.
Example
var obj = document.createElement('video');
obj.controls = true;
Specifications
Specification | Status | Comment |
HTML Living StandardThe definition of 'HTMLMediaElement.controls' in that specification. | Living Standard | No change from HTML5 |
HTML5The definition of 'HTMLMediaElement.controls' in that specification. | Recommendation | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
controls
|
Chrome
Full support 43 |
Edge
Full support 12 |
Firefox
Full support 3.5 |
IE
Full support 9 |
Opera
Full support Yes |
Safari
Full support 6 |
WebView Android
Full support 43 |
Chrome Android
Full support 43 |
Firefox Android
Full support Yes |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support 4.0 |
Legend
- Full support
- Full support
See also
- The interface defining it,
HTMLMediaElement
.
HTMLMediaElement.controls by Mozilla Contributors is licensed under CC-BY-SA 2.5.