+ 3
html audio loop and autoplay
I know this function is limited but what is the best basic workaround for cross-browser <audio> loop and autoplay hidden on a site?
2 Réponses
+ 3
Hi Olivia :)
Try this:
<audio controls>
<source src="audiofile.mp3" type="audio/mpeg">
<source src="audiofile.ogg" type="audio/ogg">
<!-- fallback for non supporting browsers goes here -->
<p>Your browser does not support HTML5 audio, but you can still
<a href="audiofile.mp3">download the music</a>.</p>
</audio>
also if you dont include autoplay or loop in the <audio> tag it wont play/repeat..