在Firefox的音频标签中的MP3 [英] MP3 in Audio Tag in Firefox

查看:169
本文介绍了在Firefox的音频标签中的MP3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用这段代码播放MP3:

 < p>当前录制< br> <峰; br> 
< audio controls ='controls'>< source src ='。$ rec_url。'type ='audio / mp3'/>
< a href ='。$ rec_url。'>点击下载当前记录< / a>
< / audio>< / p>

我可以在Chrome中看到音频播放器,我可以在IE8下载链接。我的问题是,我只是看到一个黑色的X在Firefox中。我不需要在Firefox这个播放器中播放它,我知道Firefox不支持播放MP3。



但是我怎样才能得到链接显示出来吗?

谢谢!

更新:这是我看到的

解决方案

我检查了元素的error.code属性,然后删除了整个标签,并用一个链接替换它,如果它的值为4。 b

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

解决方案

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.

这篇关于在Firefox的音频标签中的MP3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆