I've build an web application which plays some songs by using the html5 audio tag. When I'm using FF(firefox) I have to play ogg
files, and on IE I have to play mp3
files.
The problem is that i just moved my webapp on godaddy servers, and the FF doesn't play the sounds anymore. On localhost FF play the sounds, but not on godaddy. Chrome plays the sounds on localhost as on godaddy.
This is the code I've use:
<audio id="ff01" src="/files/hello.ogg"></audio>
<audio id="ie01" src="/files/hello.mp3"></audio>
<button class="btn" onClick="document.getElementById('ff01').play()">FF</button>
<button class="btn" onClick="document.getElementById('ie01').play()">IE</button>
Can you tell me why the Firefox plays the files on localhost
, but not on godaddy
?