Html5 enable us to control and manipulate how your HTML5 audio plays in the browser. There are few attributes in audio that give us control over your playback.
Properties | Description |
---|
autoplay | Tells the browser to start playing the audio as soon as the page loads. |
loop | Loop tells the browser to loop the audio when playing forwards. |
Like controls, both autoplay and loop are Boolean attributes, so you simply include them in the opening audio tag when you want them.
<audio controls loop>
<audio controls autoplay>