首页>飞飞CMS教程>飞飞cms整合ckplayer6.4播放器教程

飞飞cms整合ckplayer6.4播放器教程

小编兔妹 2024-10-23 飞飞CMS教程 17 浏览

①开启 /Lib/Conf/config.php文件

查找

play_player
prepreprepreprepreprepreprepreprepreprepre

加入见下代码

'ckplayer'=>    array('29','ckplayer'),
prepreprepreprepreprepreprepreprepreprepre

②下载ckplayer6.4程序

将下载好的程序解压到  Public/player2.9

在 Public/player2.9/ 文件夹下新建 ckplayer.js 复制见下代码到里面保存就能

function $Showhtml(){
return '<iframe width="100%" height="'+Player.Height+'" src="/Public/player2.9/ckplayer.html" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
}
Player.Show();
if(Player.Second){
$('buffer').style.height = Player.Height-28;
$("buffer").style.display = "block";
setTimeout("Player.BufferHide();",Player.Second*1000);
}
prepreprepreprepreprepreprepreprepreprepre

③在 Public/player2.9/ 文件夹下新建 ckplayer.html 复制也下代码到里面保存就能

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ckplayer</title>
</head>
<body>
<div id="a1"></div>
<script type="text/javascript" src="/Public/player2.9/ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var url = window.parent.frames.Player.Url;
var h = window.parent.frames.Player.Height;
var flashvars={
f:url,         //视频地址
s:0,           //播放模式
c:0,           //是否读取文本配置,0不是,1是
p:1,           //是否自动播放 0不是,1是
e:5,           //视频结束后的动作
d:"http://www.ckplayer.com/down/pause6.1_1.swf", //暂停时播放的广告
u:"",                                            //暂停时如果是图片的话,加个链接地址
l:"http://www.ckplayer.com/down/adv6.1_1.swf",   //前置广告
r:"",                                            //暂停时如果是图片的话,加个链接地址
t:10                                             //前置广告时间
};
var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
CKobject.embedSWF('/Public/player2.9/ckplayer/ckplayer.swf','a1','ckplayer_a1','100%',h,flashvars,params);
var video=[url+'->video/mp4'];
var support=['iPad','iPhone','ios','android+false','msie10+false'];
CKobject.embedHTML5('a1','ckplayer_a1','100%',h,video,flashvars,support);
</script>
</script>
</body>
</html>
prepreprepreprepreprepreprepreprepreprepre

④进入后台-->;加入视频数据-->ckplayer 发布视频就能