I was making a github repository with a HTLM5 file and a mp3 file.
On the html file i writed:
<script>
var audio = new Audio('sound.mp3');
audio.play();
</script>
And then i uploaded in the repository a mp3 file, imagine if the file name was sound.mp3
.
Here’s what the files look like:
index.html
sound.mp3
The problem is that the HTML script i made is not playing the sound on the github page.
I’m 100% sure that i have the volume up but it dosn’t play.
What can i do to make it play the sound in the repository files?
Also i tried using images and looks like the html can get the img file in the repository but not sounds.