Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playing sound on my website

Tags:

html

embed

I use a code to play background music on my website..

<embed src="1.wav" autostart="true" loop="true"
width="2" height="0">
</embed>

But this code does not play infinite looped music.. Once the sound track gets over it does no repeat.. What should i do to repeat the music again and again..

like image 546
void Avatar asked Nov 04 '22 06:11

void


1 Answers

This is what I have found to work the best... Just replace the 'yoursounds' with the actual file name of your chosing.

<audio autoplay loop controls>
    <source src="yoursound.ogg">
    <source src="yoursound.mp3">
</audio>
like image 192
Nick Avatar answered Nov 08 '22 05:11

Nick