0

我在 flowplayer 循环时遇到问题。我尝试了很多不同的东西,但我无法让它循环。它播放一次并停止。

这是代码:

HTML:

<div id="home_fplayer" href="/File/1.mp4"><img alt="" src="/File/ld.jpg" /></div>

JS:

$(document).ready(function () 
{
    $f("home_fplayer", {src:"/js/flowplayer/flowplayer.commercial-3.2.7.swf", wmode: 'opaque'}, 
    {
        key: '#$1432062db092e251814',
        plugins: 
        {
            controls: null
        },
        loop: true,
        clip: 
        {
            autoPlay: true,
            onBeforePause: function(clip) 
            {
               return false;
            },
            onFinish: function () 
            {
                this.play(0);return false;
            },
            onBeforeFinish: function () 
            {
                this.play(0);return false;
            }
        }
    }).ipad();

    $f("home_fplayer").play();
});
4

2 回答 2

1

您需要做的就是将 onBeforeFinish 设置为返回 false:

$(document).ready(function(){
    $f("home_fplayer",{src:"/js/flowplayer/flowplayer.commercial-3.2.7.swf",wmode:'opaque'},
        {
        key: '#$1432062db092e251814',
        plugins:{
            controls: null
        },
        clip:{
            autoPlay: true
        },
        onBeforeFinish:function(){
            return false;
        }
    }).ipad();

    $f("home_fplayer").play();
});
于 2014-02-17T09:32:53.537 回答
0

您可能必须使用播放列表插件来启用循环播放。

于 2012-07-05T23:39:21.077 回答