I want to autoplay a MP3 audio file and I don't want the player to be visible.
<div id="music"><embed src="Comfortably_Numb.mp3" autostart=true loop=false></div>
When I added display:none
to the audio tag using css, it doesn't play the music at all.
Could someone explain me hot to play the music without displaying the player?
Alternatively you can try the basic thing to get your need,
<audio autoplay loop>
<source src="johann_sebastian_bach_air.mp3">
</audio>
For further reference click here