本文介绍了jQuery的jPlayer不能在Safari中第一次运行后重播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

配置和在Firefox 3.6.13,其中全部的寄托都运行流畅运行jPlayer 2.0.0后,在同一code不会在Safari 5.0.3运行。什么我做的是创造jPlayer,聆听了结束-event重新启动它。这里的code:

After configuring and running jPlayer 2.0.0 in Firefox 3.6.13, where everthing runs smooth, the same code doesn't run in Safari 5.0.3. What i am doing is creating the jPlayer, listen for the "ended"-event to restart it. Here's the code:

$(document).ready(function(){
    $("#loopplayer").jPlayer({
        ready: function () {$(this).jPlayer("setMedia", {mp3: "/static/audio/brokentech.mp3"});
        },
        swfPath: "/static/swf",
        supplied: "mp3",
        preload: true,
        });
    $("#loopplayer").bind($.jPlayer.event.ended, function(){
      $(this).jPlayer("play" );
     });
    });

什么在Safari中发生的事情是:进度条显示为NaN的赛道长度,并运行后一度停止。当我删除事件侦听器并重新加载页面,我可以一次(再次为NaN tracklength)曾经我不能够重新启动它运行jPlayer,它运行后。什么毛病我的code或JP2错误?

Whats happening in Safari is: the progress bar shows NaN as length of the track, and it stops after running once. When i remove the event listener and reload the page, i can run the jPlayer once (again with NaN as tracklength), after it has run once i am not able to restart it. Anything wrong with my code or a bug in jP2?

推荐答案

看看这里:

<一个href=\"http://groups.google.com/group/jplayer/tree/browse_frm/month/2010-05/bb4306c1850108b1?rnum=71&_done=/group/jplayer/browse_frm/month/2010-05%3F\" rel=\"nofollow\">http://groups.google.com/group/jplayer/tree/browse_frm/month/2010-05/bb4306c1850108b1?rnum=71&_done=/group/jplayer/browse_frm/month/2010-05%3F

有一些MP3有jPlayer问题,因为文件的投放方式。浏览器不会对gzip压缩的响应正确检索元数据。

There are some mp3s that have problems with jPlayer due to the way files are served. The browser doesn't retrieve metadata correctly on gzipped response.

这篇关于jQuery的jPlayer不能在Safari中第一次运行后重播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 12:28