Flowplayer播放列表仅播放第一个剪辑

时间:2012-10-29 20:04:48

标签: javascript flowplayer playlist

我有一个flowplayer设置来播放多个剪辑/视频。但是,情况是它没有按照我打算执行的方式执行。对于我的生活,我无法弄清楚如何在第一个剪辑结束后自动播放第二个和/或后续视频。有什么想法吗?

$f("player", "/flowplayer/flowplayer.commercial-3.2.11.swf", {
key: '#$*******************',
logo: {
    url: 'logo.png',
    fullscreenOnly: false,
    displayTime: 11,
    top: 195,
    left:  400.25,
    fadeSpeed: 1100,
    opacity: 0,
    linkUrl: 'http://www.mysite.com',
    linkWindow: '_blank'

},

clip: {
    autoPlay: true,
    autoBuffering: true,

    onCuepoint: [[00,5000,13000,30000,39000,47000,53000,67000,75000,86000,100000,110000,118000], function(clip, point) {
        info.innerHTML = '<iframe src="cue_player.php?id=3716&time='+ point+'" height="490" width="730" frameborder="0" scrolling="no"></iframe>'
    }],

    // track start event for this clip
    onStart: function(clip) {
        _tracker._trackEvent("Videos", "Play", "");
    },

    // track pause event for this clip. time (in seconds) is also tracked
    onPause: function(clip) {
        _tracker._trackEvent("Videos", "Pause", "", parseInt(this.getTime()));
    },

    // track stop event for this clip. time is also tracked
    onStop: function(clip) {
        _tracker._trackEvent("Videos", "Stop", "", parseInt(this.getTime()));
    },

    // track finish event for this clip
    onFinish: function(clip) {
        _tracker._trackEvent("Videos", "Finish", "");
    },

    provider: 'rtmp'
}, 
playlist:[      {                 
        url: 'first_clip.mp4', 
        start: '0'
        },
        {
            url:'second_clip.mp4',
        }],  

    plugins: {
        rtmp: {
            url: '/flowplayer/flowplayer.rtmp-3.2.10.swf',
            netConnectionUrl: 'rtmp://video.mysite.com/videostream'
        }
    }
}

);

2 个答案:

答案 0 :(得分:0)

我不确定,但似乎第二个对象中悬挂的逗号可能会导致错误,这可能会阻止您想要的内容:

playlist:[      {                 
        url: 'first_clip.mp4', 
        start: '0'
        },
        {
            url:'second_clip.mp4', //does removing this comma help?
        }],  

答案 1 :(得分:0)

好的,所以我终于明白了。这就是我的方式:

playlist:[{                 
    url: 'first_clip.mp4', 
    start: '0'
    },
    {
        url:'second_clip.mp4', //does removing this comma help?
    }],

但解决方案是在文件名前直接放置一个“/ mp4:”。所以现在它看起来像这样并起作用:

playlist:[{                 
    url: 'mp4:first_clip.mp4', 
    start: '0'
    },
    {
        url:'mp4:second_clip.mp4', //does removing this comma help?
    }],

不确定它是否有所作为,但我使用视频服务器而不是网络服务器来提供视频。