Web/API/HTMLMediaElement/controls

From Get docs


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

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
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