Q:

Can't play audio in Mozilla

I have an audio tag inside body which contains an audio file.I want to play it when the body has finished loading.It plays in chrome but it fails to play in mozilla firefox.I tried to download the file and then play it with the local file but i got similar results.
Here's the audio tag declaration in the html:
<audio id="audio" src="http://jPlayer.org/audio/mp3/gbreggae-leadguitar.mp3"></audio>

And here is the JS used to play the audio after the body loads:
document.body.onload=function(){
             document.getElementById("audio").play();
            };

A:

Use .ogg format, i had same problem and this thing solved my problem.
see below:--
Hope it helps.

<audio id="Green">
        <source src="assets/audio/Green.mp3" </source>
        <source src="assets/audio/Green.ogg">
    </audio>

