I was writing an html code with the following code:
<audio src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay><embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true"></audio>
I used an <embed>
for those people without <audio>
supported browsers but with or without the embed tag, the audio only plays when the submit button of my random form is pressed although I was expecting audio to play after it has loaded and not after a press of a button.
Just some more background information:
- the /home/user/public_html/ is the path of my file I am using with my web host
- my web host is x10 hosting
- I tried different arrangements of audio and embed arguments and the same result is present
- I also have a back to top button which somehow stops the audio from playing after the submit button is pressed
- I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?
- I have a javascript controlled welcoming pop-up that also comes in action once loaded
So again, how do I make audio play once loaded and not after a press of a submit button?