MP3 source file

<audio src="/audio/straw bales.mp3" controls="controls" preload="metadata"></audio>
This will show the audio and the controls but won’t autoplay or loop. It will preload the metadata only however some browsers may not take notice of this restriction.
/audio/straw bales.mp3

<audio src="/audio/straw bales.mp3" controls preload="metadata" autoplay loop></audio>
This will add the autoplay and loop parameters to play the item on load and loop the audio from the end.

Browser Support for MP3 audio
Support for the MP3 format audio is restricted to Safari, IE 9 onwards, and Chrome.

Ogg source file
<audio src="/audio/straw bales.ogg" controls="controls" preload="metadata"></audio>
This will show the audio and the controls but won’t autoplay or loop. It will preload the metadata only however some browsers may not take notice of this restriction.
/audio/straw bales.ogg

Browser support for Ogg Vorbis

Support for the Ogg Vorbis format audio is restricted to Firefox, Chrome and Opera

By Rae Allen

Rae Allen is a digital media professional.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.