【问题标题】:Circle player cannot play mp3 in Firefox [duplicate]Circle 播放器无法在 Firefox 中播放 mp3 [重复]
【发布时间】:2013-01-04 22:49:23
【问题描述】:

可能重复:
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"
})  

});

【问题讨论】:

标签: javascript jquery html


【解决方案1】:

不确定它是否会对您有所帮助。但这是我的建议:

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

【讨论】:

    猜你喜欢
    • 2013-07-21
    • 1970-01-01
    • 1970-01-01
    • 2012-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多