Firefox上的神秘jPlayer 2.0.0错误

问题描述

| 我的客户在这里有一个页面列出了他的音乐:http://bit.ly/flbgwm。每首歌曲都有由jPlayer 2.0.0支持的播放器。他们在Safari / Chrome中工作,但在Firefox中无法工作,后者使用Flash播放mp3。我无法终生弄清楚发生了什么。 这是其中一首歌曲的代码示例:
<div id=\"jquery_jplayer_1\" class=\"jp-jplayer\"></div>

<div id=\"jquery_jplayer_1\" class=\"jp-jplayer\"></div>
<div class=\"jp-audio\">
    <div class=\"jp-type-single\">
        <div id=\"jp_interface_1\" class=\"jp-interface\">
        <ul class=\"jp-controls\">
            <li><a href=\"#\" class=\"jp-play\" tabindex=\"1\">play</a></li>
            <li><a href=\"#\" class=\"jp-pause\" tabindex=\"1\">pause</a></li>
            <li><a href=\"#\" class=\"jp-stop\" tabindex=\"1\">stop</a></li>
            <li><a href=\"#\" class=\"jp-mute\" tabindex=\"1\">mute</a></li>
            <li><a href=\"#\" class=\"jp-unmute\" tabindex=\"1\">unmute</a></li>
    </ul>
    <div class=\"jp-progress\">
            <div class=\"jp-seek-bar\">
        <div class=\"jp-play-bar\"></div>
        </div>
      </div>
      <div class=\"jp-volume-bar\">
          <div class=\"jp-volume-bar-value\"></div>
      </div>
      <div class=\"jp-current-time\"></div>
      <div class=\"jp-duration\"></div>
                  <a class=\"DownloadLink\" href=\"[My download file]\">download mp3</a>
      </div>
</div>

</div>


<script type=\"text/javascript\">
  $(document).ready( function() {
        $(\"#jquery_jplayer_1\").jPlayer({
            ready: function() {
              $(this).jPlayer(\"setMedia\",{
                    mp3: \"[The mp3 link]\"
                });
            },play: function() {
                $(this).jPlayer(\"pauseOthers\");
            },supplied: \'mp3\',swfPath: \'custom/\',cssSelectorAncestor: \"#jp_interface_1\"
        });
  });
</script>
jPlayer javascript文件和jPlayer swf文件都是最新的,上述路径也是如此。有谁知道为什么此代码无法在Firefox中运行?我找不到与任何其他脚本的任何冲突。 (我正在使用jQuery 1.5.1。)     

解决方法

在这种情况下,它查找相对于SWF文件的音乐,而不是html,因为Firefox使用的是Flash版本。如果您使用相对路径而不是歌曲的http链接,则可能找不到音乐。     

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...