I am facing an issue with playing an audio file using the audio tag inside the body element. The audio plays perfectly in Chrome once the body has finished loading, but it fails to play in Mozilla Firefox. I even attempted to download the audio file and play it locally, but encountered the same problem.
Below is the code snippet for the audio tag in the HTML:
<audio id="audio" src="http://jPlayer.org/audio/mp3/gbreggae-leadguitar.mp3"></audio>
Additionally, here is the JavaScript code used to play the audio after the body loads:
document.body.onload = function(){
document.getElementById("audio").play();
};