Manipulating the Audio Stream

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.

PropertiesDescription
autoplayTells the browser to start playing the audio as soon as the page loads.
loopLoop 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>
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +