Enable controls for an audio:
The controls property sets or returns whether a audio should display standard audio controls.
This property reflects the <audio> controls attribute.
When present, it specifies that the audio controls should be displayed.
Audio controls should include:
Note: The <audio> 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 <audio> element.
Return the controls property:
Set the controls property:
Value | Description |
---|---|
true|false | Specifies whether a audio should have controls displayed, or not
|
Return Value: | A Boolean, returns true if audio controls are displayed, otherwise it returns false |
---|---|
Default Value: | false |
Find out if the audio controls are displayed:
The result of x will be:
HTML reference: HTML <audio> controls attribute