Why Isn't Html Audio Autoplay Working
Is this bugged or something? please help me. I am coding a website but it doesn't work. I use Google chrome. Is there a compatibility issue?
Solution 1:
looks like your URL in the isn't working. Remove one .mp3 and it should work for you.
<audioautoplayid="myaudio"allow="autoplay"><sourcesrc="http://soundbible.com/mp3/Fuse Burning-SoundBible.com-1372982430.mp3"type="audio/mpeg"></audio><script>document.getElementById('myaudio').play(); </script>
Solution 2:
If you look at the console when on you browser where your your snippet is running you will be able to see the following error:
Failed to load resource: the server responded with a status of 404 (Not Found)
404 error indicate that the client was able to communicate with a given server, but the server could not find what was requested.
In your case the server couldn't find the specified mp3 file. Looking at the code you have and extra .mp3 in your url so removing that will fix your issue.
<audioautoplayid="myaudio"allow="autoplay"><sourcesrc="http://soundbible.com/mp3/Fuse Burning-SoundBible.com-1372982430.mp3"type="audio/mpeg"></audio><script>document.getElementById('myaudio').play(); </script>
Post a Comment for "Why Isn't Html Audio Autoplay Working"