ckplayer.com
首页 | 下载 | 帮助手册 | 应用示例 | 论坛
同一个页面调用多个播放器的示例

相关代码及说明
在一个页面里播放多个视频,关键要设置播放容器不能相同,本示例演示是使用了二个容器分别播放二个视频
<div id="a1"></div><div id="a2"></div>
<script type="text/javascript" src="/ckplayer/6.6/ckplayer.js"></script>
<script type="text/javascript">
  var flashvars={
    f:'http://movie.ks.js.cn/flv/other/2014/06/20-2.flv',
    c:0,
    p:2,
    b:0,
    i:'/static/images/letitgo.jpg',
    my_url:encodeURIComponent(window.location.href)
  };
  var video=['http://movie.ks.js.cn/flv/other/1_0.mp4->video/mp4'];
  CKobject.embed('/ckplayer/6.6/ckplayer.swf','a1','ckplayer_a1','100%','100%',false,flashvars,video);
  var flashvars2={
    f:'http://movie.ks.js.cn/flv/other/2014/06/20-2.flv',
    c:0,
    p:2,
    b:0,
    i:'/static/images/letitgo.jpg',
    my_url:encodeURIComponent(window.location.href)
  };
  var video2=['http://movie.ks.js.cn/flv/other/1_0.mp4->video/mp4'];
  CKobject.embed('/ckplayer/6.6/ckplayer.swf','a2','ckplayer_a2','100%','100%',false,flashvars2,video2);
</script>