1
votes

I was hoping that you can help me with an issue I have been having.

Problem: I am using the HTML5 audio tag to play an mp3 file. I have the exact same file on two different servers and one works and one doesn't. Each browser treats this differently. In Firefox the player doesn't show up, in Chrome in shows and doesn't play, and in IE it works (go figure).

Fiddle: http://jsfiddle.net/dj2ngfag/

From This Sites Editor Uploads (not working):
<a href="http://gv-disprod.cmstemp.com/editoruploads/files/test2.mp3">http://gv-disprod.cmstemp.com/editoruploads/files/test2.mp3</a>
<audio src="http://gv-disprod.cmstemp.com/editoruploads/files/test2.mp3" type="audio/mpeg" controls></audio>
<br />From MP3 Test Site (works):
<a href="http://mp3-test.cmstemp.com/test2.mp3">http://mp3-test.cmstemp.com/test2.mp3</a>
<br />
<audio src="http://mp3-test.cmstemp.com/test2.mp3" type="audio/mpeg" controls></audio>

I have the audio/mpeg mime type set on both servers so I am not sure if its a programming error or something different between the servers.

I appreciate any help that you can give me!

Thanks,

Graham

1
On Firefox, it is working fine. I think It's a Chrome issue.Abdelrahman Wahdan
There should be two audio players in the fiddle. By default Firefox quickly hides the first one. If you visit the audio link separately in a new tab then it does work because it loaded it in the cache.ifthiselsethat

1 Answers

0
votes

Mp3 is partially supported by different browsers that is the reason for it to behave distinctly. Please find the url below which has a chart of audio extensions and support from different browsers.

https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

I hope this might help in clearing the doubt.