ckplayer.com
首页 | 下载 | 帮助手册 | 应用示例 | 论坛
全屏状态下播放下一集
相关代码及说明
本示例是使用的监听函数监听到播放结束则执行newAddress函数实现切换视频的效果
<div id="a1"></div>
<div id="nowTime"></div> <script type="text/javascript" src="/ckplayer/6.6/ckplayer.js"></script> <script type="text/javascript">   function loadedHandler(){     if(CKobject.getObjectById('ckplayer_a1').getType()){       CKobject.getObjectById('ckplayer_a1').addListener('ended',endedHandler);     }     else{       CKobject.getObjectById('ckplayer_a1').addListener('ended','endedHandler');     }   }   function endedHandler(){     CKobject.getObjectById('ckplayer_a1').newAddress('{p->1}{f->http://movie.ks.js.cn/flv/2011/11/8-1.flv}{html5->http://movie.ks.js.cn/flv/other/1_0.mp4->video/mp4}')   }   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',     loaded:'loadedHandler',     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); </script>