可能重复:
Why doesn’t Firefox support mp3 file format in <audio>
我正在使用圆形播放器...在网页中播放mp3文件。 它正在IE和Chrome中播放,但在Firefox中工作。 有解决方案吗 谢谢 这是我的代码
$(document).ready(function(){
var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1",
{
mp3: "11.mp3"
}, {
cssSelectorAncestor: "#cp_container_1",
canplay: function() {
$("#jquery_jplayer_1").jPlayer("play");
},
supplied: "mp3",
swfPath: "js"
})
});
答案 0 :(得分:0)
不确定它是否对您有所帮助。但这是我的建议:
<div id="jquery_jplayer"></div>
<div id="jp_container_1" class="jp-audio">
<div class="jp-type-single">
<div id="jp_interface_1" class="jp-interface all_rounded_corners">
<ul class="jp-controls">
<li><a href="#" class="jp-play pp" tabindex="1">play</a></li>
<li><a href="#" class="jp-pause pp" tabindex="1">pause</a></li>
<li><a href="#" class="jp-previous traverse" tabindex="1">Previous</a></li>
</ul>
<div class="jp-progress" style="display:none;">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
</div>
</div>
</div>
</div>
</div>
这是正确的JS:
$("#jquery_jplayer").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", { mp3: "your-file.mp3" } );
},
swfPath: "http://www.jplayer.org/latest/js/Jplayer.swf",
supplied: "mp3",
volume: 1,
wmode:"window",
solution: "html,flash",
});