2013-01-21 94 views
0

可能重複播放MP3:
Why doesn’t Firefox support mp3 file format in <audio>圓玩家無法在Firefox

我使用圓player..to發揮網頁中的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

[Firefox不支持通過HTML5播放MP3(https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats)由於版權問題。 – Blazemonger

回答

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", 
});