Heres my code :
<audio loop autoplay> <source src="song.mp3" type = "audio/mpeg"> </audio>
my "song" folder is saved in the same directory as the code file , so that cant be the issue ,the problem is that the song isnt running in the background as i want it to .
its very frustrating cus i havent really found anything in terms of troubleshooting ; can somebody please help!
2
Answers
Your browser does not support the audio element.
If you write a code like above, it will solve all errors that you were facing.
This code:
It could be the browser, it could be the location or it could be the typo you’ve made on "audio/mpeg". Add "controls" so you can check if you can play it that way and check your console for possible errors: