苹果CMSV10整合ckplayerX3视频播放器

整合教程
1.本帖附件已经整理好了,含ckplayer x3 播放器SDK,下载后直接上传苹果CMS网站根目,然后在苹果CMS新建一个编码为“ckplayer”的播放器
05574-hhmx5b50f2l.png
2.然后点击“播放代码”,复制下面流程说明的“ckplayer.js”粘贴保存即可
05984-t76w64m3wai.png
3.然后就可以在视频也调用这个播放器了
42218-1yy3awq9uqt.png
流程说明
1.新建“ckplayer.js”文件代码如下:

MacPlayer.Html = '<iframe border="0" src="'+maccms.path+'/static/player/ckplayer.html" height="'+MacPlayer.Height+'" width="100%" marginWidth="0" \ frameSpacing="0"\ marginHeight="0"\ frameBorder="0"\ scrolling="no"\ vspale="0"\ id="Player" allowfullscreen="true" ><\/iframe>';MacPlayer.Show();

2.新建“ckplayer.html”文件,代码如下:

<!DOCTYPE html>
<html>
<head>
        <title>ckplayerx3播放器</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=11" />
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
    
        <style type="text/css">
        html,body{width:100%;height:100%; padding:0; margin:0;}
        #playerCnt{width:100%;height:100%;position: relative;}
        </style>
<link rel="stylesheet" type="text/css" href="/static/player/ckplayer/css/ckplayer.css">
<script type="text/javascript" charset="utf-8" src="/static/player/ckplayer/js/ckplayer.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/player/ckplayer/flv.js/flv.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/player/ckplayer/hls.js/hls.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/player/ckplayer/mpegts.js/mpegts.js"></script>
</head>
<body margin margin>
<div id="playerCnt" class="playerCnt"></div>
        <script type="text/javascript">
            var plug="normal";
        var live=false;
        var url=parent.MacPlayer.PlayUrl;
        var urlhz=url.split(".").pop().toLowerCase();
        if(urlhz="m3u8"){plug="hls.js";}else if(urlhz="flv"){plug="flv.js";}else if(urlhz="ts"){plug="mpegts.js";}else if(urlhz="mp4"){plug="";}else{plug="";}
                var videoObject = {
                                container:".playerCnt", //容器的ID或className
                                autoplay:false, //是否自动播放
                                rightBar:true,
                                screenshot:true,
                                smallWindows:true,
                                playbackrateOpen:true,
                                webFull:true,
                                plug:plug,
                                live:live,
                                next:{
                                        link:parent.MacPlayer.PlayLinkNext,
                                        content:".video-next"
                                },
                                menu:[
                                        {
                                                title:"ckplayer",
                                                link:"http://www.ckplayer.com"                
                                        },
                                        {
                                                title:"version:X3",
                                                underline:true
                                        },
                                        {
                                                title:"关于视频",
                                                click:"aboutShow"
                                        }
                                ],
                                information:{
                                        "视频加载:":"{loadTime}秒",
                                        "视频时长:":"{duration}秒",
                                        "视频尺寸:":"{videoWidth}x{videoHeight}",
                                        "视频音量:":"{volume}%",
                                        "视频FPS:":"{fps}",
                                        "音频解码:":"{audioDecodedByteCount} Byte",
                                        "视频解码:":"{videoDecodedByteCount} Byte"
                                },
                                video:url
                        };
                        var player=new ckplayer(videoObject)
        </script>
</body>
</html>

3.将这个两个文件和ckplayer播放器文件夹上传到“/static/player”文件夹,没有下载附件的需要自己去下载ckplayer x3
01386-fcm8k7gu1zb.png
4.然后在苹果CMS添加播放器即可!
ckplayer.rar

  ~  ~  The   End  ~  ~  


 赏 
感谢您的支持,我会继续努力哒!
支付宝收款码
tips
文章二维码 分类标签:营生网文教程
文章标题:苹果CMSV10整合ckplayerX3视频播放器
文章链接:https://zhaojx.fun/archives/418/
最后编辑:2024 年 4 月 17 日 21:53 By 豫见长安
许可协议: 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
(*) 2 + 5 =
快来做第一个评论的人吧~
歌曲封面
0:00