播放器调用

各cms插件大全 均含播放器支持及采集: 飞飞cms2.8插件 | 飞飞cms2.9插件 | 苹果7x插件(asp和php均适合) | 苹果8x插件 | 马克斯一体化插件(已集成吉吉先锋西瓜) | 马克斯支持非ie浏览器的吉吉影音插件 | 光线cms播放器补丁及采集补丁

已支持吉吉播放及采集的完整cms安装包

飞飞cms2.8 | 飞飞cms2.9 | 苹果8 | 苹果7php | 苹果7asp | 马克斯 | 光线cms
js细节讲述:

普通调用马克斯程序(MaxCMS)调用 飞飞影视系统调用 苹果CMS调用 吉吉影音LOGO调用

吉吉采集资源插件

Max采集包| 飞飞CMS2.8采集插件 | 苹果cms采集插件


一、普通调用说明:

<script type="text/javascript">
var jjvod_url = 'jjhd://10014|342bcf5156458e8828f9d56b7882c226a65adf2a|KARA-STEP.avi.mp4';//播放视频地址
var jjvod_w = 650;//播放器宽度
var jjvod_h = 460;//播放器高度
var jjvod_ad = 'http://www.jiji-yingyin.com/waiting.html';//缓冲和暂停调用广告地址,如http://www.abc.com/ad.html
var jjvod_c = 'baidu'; //吉吉影音推广渠道,一般为域名简写,如baidu
</script>
<script type="text/javascript" src="http://down.jiji-yingyin.com/yingyin9/jjplayer.js" charset="utf-8"></script>
        

演示地址:http://www.jiji-yingyin.com/test.html


二、马克斯程序(MaxCMS)调用说明:

郑重提醒:您在修改网站相关文件时,请先备份好相关文件。点击这里下载吉吉影音MAXCMS版


1、配置

找到文件/inc/playerKinds.xml,将以下一行代码加入文件中并保存

<player open="1" sort="100" flag="吉吉影音" des="jjvod-P2P"><intro><![CDATA<[a href="http://www.jiji-yingyin.com" target="_blank">
需要下载吉吉影音JJVOD播放器</a>]]></intro></player>

2、修改模板\template\default\html\play.html

在head部分<script src="/{maxcms:sitepath}js/play.js"></script>的下面加上一行:

<script src="/{maxcms:sitepath}js/jjplay.js"></script>

注意这里jjplay.js是吉吉影音专有的js文件,必须在play.js的后面加载,如果你站改过play.js文件名称,请找对文件位置。

3、jjplay.js代码分析

var jjvod_w = 650;//播放器宽度
var jjvod_h = 500;//播放器高度
var jjvod_ad = 'http://www.jiji-yingyin.com/waiting.html';//缓冲和暂停广告
var jjvod_soft = 'http://down.jiji-yingyin.com/yingyin9/jjplayer_install.html'; //下载地址,渠道可直接在下载页面设置
var jjvod_notice = 'http://down.jiji-yingyin.com/yingyin9/jijiNotIE.html'; //非IE内核提示页面


if(typeof(VideoListJson) == 'undefined'){
    VideoListJson = [];
    VideoInfoList = VideoInfoList.split('$$$');
    for(var i = 0; i < VideoInfoList.length; i++){
        var vod = VideoInfoList[i].split('$$');
        VideoListJson[i] = [vod[0], vod[1].split('#')];
    }
}


viewplay2 = viewplay;
viewplay = function(param1,param2){
	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][0], Arr[0], Arr[1]];
        } else {
            return ['', '', ''];
        }
    };
    var a = VideoListJson[param1][1][param2];
    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 viewplay2(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' onerror=\"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>');
}
}

说明:MAXCMS调用播放器部分用到了viewplay()函数,我们重写了该函数,如果是获取到播放器名称是吉吉影音的则调用该播放器。

3、在后台资源中添加jjvod资源,如:

BD$jjhd://10014|342bcf5156458e8828f9d56b7882c226a65adf2a|KARA-STEP.avi.mp4|$jjhd

三、飞飞PHP影视系统调用吉吉影音播放器方法

飞飞2.8直接下载以下补丁即可,如果你是其他版本请自己修改。
[下载吉吉影音飞飞CMS2.8插件]   [飞飞CMS2.9完整包]

其他版本请参考上面的下载进行手工配置

1、配置

找到你的网站目录\Lib\Conf\Config.php文件,打开后添加吉吉影音播放器在play_player数组中添加一行:

'jjvod'=>    array('00','吉吉影音'),

设置好后,刷新缓存可以在后台添加影片资源的时候看到吉吉影音的选项。

2、将jjvod.js放置到目录\Public\player2.8\中,jjvod.js中的代码如下:

var jjvod_soft = 'http://down.jiji-yingyin.com/yingyin9/jjplayer_install.html';//安装页面
var jjvod_notice = 'http://down.jiji-yingyin.com/yingyin9/jijiNotIE.html';//非IE提示页面

function $Showhtml(){
	var player;
	if(!!window.ActiveXObject || "ActiveXObject" in window){
		player = "<div style='position:relative;left:0;top:0'><div id='jjad' style='position:absolute; z-index:1001;top:0; left:0px; overflow:hidden;'><iframe marginWidth='0' id='wdqad' name='wdqad' marginHeight='0' src='"+Player.Buffer+"' frameBorder='0' width='690' scrolling='no' height='430'></iframe></div><object classid='clsid:C56A576C-CC4F-4414-8CB1-9AAC2F535837' width='690' height='"+Player.Height+"' id='jjvodPlayer' name='jjvodPlayer' onerror=\"document.getElementById('jjvodPlayer').style.display='none';document.getElementById('wdqad').src='"+jjvod_soft+"';\"><PARAM NAME='URL' VALUE='"+Player.Url+"'><param name='Autoplay' value='1'></object></div>";
		setInterval('jjvodstatus()','1000');
	}else{
		player = '<iframe src="'+jjvod_notice+'" frameborder="0" width="640" height="468" scrolling="no"></iframe>';
	}
	return player;
}
Player.Show();


//播放状态控制
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';
    }
}

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

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

BD$jjhd://10014|342bcf5156458e8828f9d56b7882c226a65adf2a|KARA-STEP.avi.mp4|$jjhd

四、苹果CMS调用吉吉影音方法

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

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

1、设置

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

<player status="1" sort="370" from="jjvod" show="吉吉影音" des="www.jiji-yingyin.com"><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://www.jiji-yingyin.com/waiting.html';//缓冲和暂停广告
var jjvod_soft = 'http://down.jiji-yingyin.com/yingyin9/jjplayer_install.html'; //下载地址,渠道可直接在下载页面设置
var jjvod_notice = 'http://down.jiji-yingyin.com/yingyin9/jijiNotIE.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' onerror=\"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

五、吉吉影音LOGO调用: