Search code examples
htmlfirefoxaudiomp3

MP3 in Audio Tag in Firefox


I have this code that I'm using to play an MP3:

<p>Current Recording<br><br>
<audio controls='controls'><source src='".$rec_url."' type='audio/mp3' />
<a href='".$rec_url."'>Click to Download the Current Recording</a>
</audio></p>

I can see the Audio player in Chrome, and I can download the link in IE8. My problem is I just see a black box with an X in it on Firefox. I don't need to play it in this player in Firefox, I am aware that Firefox doesn't support the playing of MP3s.

But how do I get the link to show up?

Thanks!

UPDATE: This is what I see

enter image description here


Solution

  • I checked the error.code property of the element and then removed the entire tag and replaced it with a link if it had a value of 4.