HTML Audio/Video DOM controls properties
Instance
Video start control:
myVid=document.getElementById("video1"); myVid.controls=true;
Definition and Usage
The controls attribute sets or returns the standard audio/video controls that the browser should display.
Standard audio/video controls include:
- Play
- Pause
- Progress bar
- Volume
- Fullscreen Switch (for video)
- Subtitles (when available)
- Track (when available)
Browser Support
All major browsers support the controls attribute.
Note:Internet Explorer 8 or earlier browsers do not support this attribute.
Syntax
Set controls attribute:
audio|video.controls=true|false
Return controls attribute:
audio|video.controls
Attribute value
Value | Description |
---|---|
true | Indicates that the control is displayed. |
false | Default. Indicates that the control is not displayed. |
Technical Details
Return value | Boolean value. true|false |
---|---|
Default value: | false |