Use the iGloo Custom Element to place an audio loop on your pages.
Example with audio controls:
<audio controls>
<source src="enter your audio .ogg file direct url here" type="audio/ogg">
<source src="enter your audio .mp3 file direct url here" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
You can also add an additional attribute to the audio like autoplay to automatically play the audio and loop to keep playing the audio.
<audio controls autoplay loop>
Example without audio controls (hidden music):
<audio controls autoplay loop style="display:none">
<source src="http://www.alexkatz.me/codepen/music/interlude.ogg" type="audio/ogg">
<source src="http://www.alexkatz.me/codepen/music/interlude.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Comments
0 comments
Article is closed for comments.