苹果CMS调用吉吉影音方法

发布时间:2020-06-05 10:16:04

苹果CMS调用吉吉影音方法

该方法适用苹果CMS7.x版本,其他版本请自行修改。点击这里下载吉吉影音苹果CMS版

注意在替换相关文件时请先备份。

1、设置

修改文件: \inc\vodplay.xml ,添加吉吉影音播放器。

<player status="1" sort="370" from="jjvod" show="吉吉影音" des="www.jjvod."><tip><![CDATA[无需安装任何插件]]></tip></player>

添加好后,在后台添加影片时就可以选择吉吉影音资源了。

2、修改播放页面模板vodplay.html,在目录\template\..下。

在<script src="{maccms:path}js/player.js"></script>下面添加吉吉播放器调用的js文件

<script src="{maccms:path}js/jjplayer.js"></script>

一定要保证jjplayer.js在player.js后面加载。

3、jjplayer.js代码如下:

var jjvod_w = 650;//播放器宽度var jjvod_h = 520;//播放器高度var jjvod_ad = 'http://player.jjvod./ad.html';//缓冲和暂停广告var jjvod_soft = '/js/jjvod_install.html'; //下载地址,渠道可直接在下载页面设置var jjvod_notice = '/js/notice.html'; //非IE内核提示页面getPlayer2 = getPlayer;getPlayer = function(param1, param2){VideoListJson = [];VideoInfoList = maccms_playlist.split('$$$');for(var i = 0; i < VideoInfoList.length; i++){var vod = VideoInfoList[i].split('$$');VideoListJson[i] = [vod[1], vod[2].split(',')];}    getplay = function(param1, param2) {        var x = VideoListJson,mov,Arr;        if (x.length > 0) { mov = new String(VideoListJson[param1-1][param2]); Arr = mov.split('$');            return [VideoListJson[param1-1][0], Arr[0], Arr[param2]];        } else {            return ['', '', ''];        }    };    playdata = getplay(param1, param2); // 0 -> 集 1 -> 地址var playername= playdata[0];//播放器名称var vodname = playdata[1];//影片名称var url = playdata[2];//播放地址    if(playername=="吉吉影音" || playername=="jjvod"){        addjjvod(url);    }else{        return getPlayer2(param1,param2);    }};function jjvodstatus(offest){    if(document.getElementById('jjvodPlayer').PlayState==3){        document.getElementById('jjad').style.display='none';    }else if(document.getElementById('jjvodPlayer').PlayState==2 || document.getElementById('jjvodPlayer').PlayState==4){        document.getElementById('jjad').style.display='block';    }} //JJVOD代码function addjjvod(url){if(!!window.ActiveXObject || "ActiveXObject" in window){adh=jjvod_h-63;document.write("<div style='position:relative'>");document.write('<div id="jjad" style="position:absolute; z-index:1001"><iframe marginWidth="0" marginHeight="0" src="'+jjvod_ad+'" frameBorder="0" width="'+jjvod_w+'" scrolling="no" height="'+adh+'" id="wdqad" name="wdqad"></iframe></div>');document.write("<object classid='clsid:C56A576C-CC4F-4414-8CB1-9AAC2F535837' width='"+jjvod_w+"' height='"+jjvod_h+"' id='jjvodPlayer' name='jjvodPlayer' one rror=\"document.getElementById('jjvodPlayer').style.display='none';document.getElementById('wdqad').src='"+jjvod_soft+"';\"><PARAM NAME='URL' VALUE='"+url+"'><param name='Autoplay' value='1'></object>");document.write("</div>");setInterval('jjvodstatus()','1000');}else{document.write('<iframe src="'+jjvod_notice+'" frameborder="0" width="640" height="468" scrolling="no"></iframe>');}}

注意如果调用播放器后,网页打开看到的播放器位置有偏差,请自行修改CSS相关样式。

4、后台添加吉吉影音影片资源,如:

BD$jjhd://10014|342bcf5156458e8828f9d56b7882c226a65adf2a|KARA-STEP.avi.mp4|$jjhd
以上问题属网友观点,不代表本站立场,仅供参考!