Enable controls for a video:
The controls property sets or returns whether a video should display standard video controls.
This property reflects the <video> controls attribute.
When present, it specifies that the video controls should be displayed.
Video controls should include:
Note: The <video> element is new in HTML5.
The controls property is supported in all major browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <video> element.
Return the controls property:
Set the controls property:
Value | Description |
---|---|
true|false | Specifies whether a video should have controls displayed, or not
|
Return Value: | A Boolean, returns true if video controls are displayed, otherwise it returns false |
---|---|
Default Value: | false |
Find out if the video controls are displayed:
The result of x will be:
Enable, disable and check controls status:
HTML reference: HTML <video> controls attribute