![]() |
VOOZH | about |
The Audio autoplay property is used for setting or returning whether audio should start playing as soon as it is loaded or not. It can be used to specify that the audio should automatically start playing as soon as it is loaded.
Syntax:
audioObject.autoplay
audioObject.autoplay = true|false
Property Values:
Return Values: It returns a Boolean value, that returns true if the audio automatically starts playing, otherwise it returns false
The below program illustrates the Audio autoplay Property:
Example: Enabling autoplay for audio.
Output:
Supported Browsers: The browser supported by HTML DOM Audio autoplay Property are listed below: