HTMLMediaElement.controls

The HTMLMediaElement.controls property reflects the controls HTML attribute, which controls whether user interface controls for playing the media item will be displayed.

SyntaxEdit

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

Value

A Boolean. A value of true means controls will be displayed.

ExampleEdit

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

SpecificationsEdit

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'HTMLMediaElement.controls' in that specification.
Living Standard No change from HTML5
HTML5
The definition of 'HTMLMediaElement.controls' in that specification.
Recommendation Initial definition.

Browser compatibilityEdit

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

See alsoEdit

Document Tags and Contributors

 Contributors to this page: markg
 Last updated by: markg,