HTML音频标签有没有什么方法可以在Firefox中播放mp3 [英] Is there any way that HTML Audio tag could play mp3 in Firefox

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

问题描述

HTML Audio标签可以在 Firefox中播放 mp3 code>。

解决方案

FF目前仅支持 ogg 格式,所以您必须包括一个ogg格式的副本:

 < audio controls =controls> 
< source src =music.oggtype =audio / ogg/>
< source src =music.mp3type =audio / mpeg/>
您的浏览器不支持音频元素。
< / audio>

为了使用旧的 object 标签用于嵌入你的mp3文件如下:

 < object data =music.mp3type =application / x-mplayer2 width =xxxheight =xxx> 
< param name =filenamevalue =music.mp3>
< / object>

或使用嵌入作为:

 < embed type =application / x-mplayer2src =music.mp3height =xxxwidth =xxx > 


Is there any way that HTML Audio tag could play mp3 in Firefox.

解决方案

FF currently supports only ogg formats, so you've to include a copy with ogg format as well:

<audio controls="controls"> 
    <source src="music.ogg" type="audio/ogg" />
    <source src="music.mp3" type="audio/mpeg" />
    Your browser does not support the audio element.
</audio>

And for sake, use old object tag for embedding you mp3 file as follows:

<object data="music.mp3" type="application/x-mplayer2" width="xxx" height="xxx">
    <param name="filename" value="music.mp3">
</object>

or use embed as:

<embed type="application/x-mplayer2" src="music.mp3" height="xxx" width="xxx" >

这篇关于HTML音频标签有没有什么方法可以在Firefox中播放mp3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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