Oscar d'Aragon
Oscar d'Aragon

Reputation: 1

Audio autoplay not working on GitHub (HTML)

I'm an art student working with HTML for the very first time for a project, so bear with me as I am completely unexperienced. I need to have a sound play in the background of the pages of my website, but the code that works on my computer isn't working on GitHub.

This is what I wrote:

<audio autoplay>
        <source src="stripped.mp3" type="audio/mpeg">
    </audio>

This works perfectly when I open the .html file on my browser from my computer, and the audio does play. However I have uploaded both the .html file and .mp3 file to GitHub, and here, the audio doesn't play.

Has anyone figured out how to deal with this? Thank you so much for your help.

Upvotes: 0

Views: 83

Answers (0)

Related Questions