一、兩者的共同點:
1、都能播放flv、mp4、mp3格式的視訊、音頻檔案。 2、都能設定視訊載入前的展示圖檔。 3、都能滿足正常需求。
二、不同點:
1、jaris player完全免費,簡單,無綁定内容,完全能夠滿足一般使用者需求。 2、ckplayer定制化程度高,國産,支援視訊前多個廣告,支援自定義皮膚。但是不完全免費,可以用于商業用途,需要保留其logo和初始載入動畫。
三、jaris player
官網:jarisflvplayer.org
(一)支援兩種頁面:
1、播放欄在右:
2、播放欄在下:
(二)參數表:
source | logoalpha |
This is the actual path of the media that is going to be played. | The transparency percent. values permitted 1 to 100 |
type | logowidth |
The type of file to play, allowable values are: audio, video. | The width in pixels of the logo. |
streamtype | logolink |
The stream type of the file, allowable values are: file, http, rmtp, youtube | A link to a webpage when the logo is click |
server | hardwarescaling |
Used in coordination with rtmp stream servers. | Enable or disable hardware scaling on fullscreen mode, values: false or true |
duration | controls |
Total times in seconds for input media or formatted string in the format hh:mm:ss | To disable the displaying of controls, values: false to hide otherwise defaults to show |
poster | darkcolor |
Screenshot of the video that is displayed before playing. | The darker color of player controls |
aspectratio | brightcolor |
To override original aspect ratio on first time player load. Allowable values: 1:1, 3:2, 4:3, 5:4, 14:9, 14:10, 16:9, 16:10 | The bright color of player controls |
autostart | controlcolor |
A true or false value that indicates to the player if it should auto play the video on load. | The face color of controls |
logo | hovercolor |
An image of your logo. | On mouse hover color for controls |
logoposition | jsapi |
The position of the logo in the player, permitted values are: top left, top right, bottom left and bottom right | Expose events to javascript functions and enable controlling the player from the outside. Set to any value to enable. |
loop | |
Makes the player repeat the playback after it has finished. Set to true or 1 |
(三)快捷鍵:
SPACE | LEFT |
Play or pause video. | Rewind |
TAB | RIGHT |
Switch between different aspect ratios. | Foward |
UP | M |
Raise volume | Mute or unmute volume. |
DOWN | F |
Lower volume | Switch to fullscreen mode |
(四)demo:
js控制:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Jaris FLV Player測試</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="language" content="en"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<script src="./js/swfobject.js" type="text/javascript"></script>
<script src="../js-lib/common.js" type="text/javascript"></script>
<script type="text/javascript">
var flashvarsVideo = {
// source: getContentPath() + "/videos/ad.mp4", // 播放的視訊檔案位址
source: getContentPath() + "/resources/swf/20140424160605219.swf",
type: "video", // 檔案格式,支援兩種格式:audio, video
streamtype: "file", // 檔案流類型:file, http, rmtp, youtube
server: "", // streamtype為rmtp時使用,協調rmtp檔案流的伺服器位址
duration: "52",
poster:"images/zjl.jpg", // 視訊封面圖檔
autostart: "false", // 自動開始播放
logo: "logo.png", // 視訊播放畫面的logo
logoposition: "bottom right", // logo的位置:top bottom right left
logoalpha: "30", // logo的透明度
logowidth: "130", // logo的寬度
logolink: "http://www.baidu.com", // logo點選後連接配接位址
hardwarescaling: "false",
darkcolor: "000000", // 播放畫面的背景顔色
brightcolor: "4c4c4c", // 播放頁面前景色
controlcolor: "FFFFFF", // 工具欄的顔色
hovercolor: "67A8C1", // 滑鼠移動到工具欄按鈕上的顔色
controltype: 1 // 控制類型:0 - 老版本樣式,播放控制在右邊,1-新版本樣式,播放控制在下邊
};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "false", //是否允許全屏播放
allowScriptAccess: "always",
bgcolor: "#000000", // 播放背景色
quality: "high", //視訊畫面品質:high low
wmode: "opaque"
};
var attributes = {
id: "JarisFLVPlayer"
};
swfobject.embedSWF("JarisFLVPlayer.swf", "altContentOne", "576px", "360px", "10.0.0", "expressInstall.swf", flashvarsVideo, params, attributes);
</script>
<style>
html, body {
height: 100%;
}
body {
margin: 0;
}
</style>
</head>
<body>
<br/>
<center>
<h1>明明就</h1>
<div id="altContentOne">
<h1>Jaris FLV Player</h1>
<p>Alternative content</p>
<p><a href="http://www.adobe.com/go/getflashplayer" target="_blank" rel="external nofollow" ><img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player"/></a></p>
</div>
</center>
</body>
</html>
html<object>标簽控制:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml: >
<head>
<title>Demo: New Player Controls - Jaris FLV Player</title>
<!-- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="JarisCMS - Copyright JegoYalu.com. All rights reserved." />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="alternate" title="RSS - Jaris FLV Player" href="http://jarisflvplayer.org/rss" target="_blank" rel="external nofollow" type="application/rss+xml">
<meta name="alexaVerifyID" content="tQJ4nEQk7DQlBuqPvWmdO6OdJ08" />
-->
<!-- <link href="http://jarisflvplayer.org/styles/00-system.css" target="_blank" rel="external nofollow" rel="stylesheet" type="text/css" media="all"/>
<link href="http://jarisflvplayer.org/themes/jarisplayerv2/style.css" target="_blank" rel="external nofollow" rel="stylesheet" type="text/css" media="all"/> -->
<!-- <link rel="shortcut icon" type="image/ico" href="http://jarisflvplayer.org/favicon.ico" target="_blank" rel="external nofollow" /> -->
<!-- <script type="text/JavaScript" src="http://jarisflvplayer.org/themes/jarisplayerv2/curvycorners.js"></script> -->
<!--<script type="text/JavaScript">
curvyCorners.addEvent(window, 'load', initCorners);
function initCorners() {
var settings = {
tl: { radius: 10 },
tr: { radius: 10 },
bl: { radius: 10 },
br: { radius: 10 },
antiAlias: true
}
var settings_menu = {
tl: { radius: 4 },
tr: { radius: 4 },
bl: { radius: 4 },
br: { radius: 4 },
antiAlias: true
}
curvyCorners(settings, "#content-container");
curvyCorners(settings_menu, "#header .menu");
}
</script>-->
<!--
<script type="text/javascript" src="http://jarisflvplayer.org/scripts/00-jquery-1.4.2.min.js"></script>
-->
<!--<script type="text/javascript" src="http://jarisflvplayer.org/scripts/00-jquery-1.8.2.min.js"></script>-->
<!--
<script type="text/javascript"
src="http://jarisflvplayer.org/scripts/01-jquery.textarearesizer.compressed.js"></script>
<script type="text/javascript" src="http://jarisflvplayer.org/scripts/02-system.js"></script>
-->
<script src="../js-lib/common.js" type="text/javascript"></script>
</head>
<body>
<div id="content-container">
<table id="content">
<tr>
<td class="center">
<!--<h1>Demo: New Player Controls</h1>
<div id="tabs-menu">
<ul class="tabs tabs-2">
<li class="first"><span><a href="http://jarisflvplayer.org/demo" target="_blank" rel="external nofollow" >Old Controls</a></span></li>
<li class="first"><span><a class="selected" href="http://jarisflvplayer.org/demo/new-controls" target="_blank" rel="external nofollow" >New
Controls</a></span></li>
</ul>
<div class="clear tabs-clear"></div>
</div>-->
<div class="content">
<table>
<tr>
<td class="content">
<p style="font-size: 16px">
You can give the player the look that better suits your taste with the feature of
custom color controls.
</p>
<hr style="border: 0; border-bottom: dotted 2px #d3d3d3"/>
<h2>Original colors</h2>
<div class="block">
<center>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2"
width="576" height="360"
>
<!--<param name="allowFullscreen" value="false">
<param name="allowScriptAccess" value="always">
<param name="movie" value="JarisFLVPlayer.swf"/>
<param name="bgcolor" value="#000000">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="wmode" value="opaque">
<!–<param name="flashvars"
value="source=http://jaris.sourceforge.net/files/jaris-intro.flv&type=video&duration=52&streamtype=file&poster=http://jarisflvplayer.org/images/poster.png&autostart=false&logo=http://jarisflvplayer.org/images/logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=http://jaris.sourceforge.net&hardwarescaling=false&darkcolor=000000&brightcolor=4c4c4c&controlcolor=FFFFFF&hovercolor=67A8C1&controltype=1">–>
<param name="flashvars"
value="source=videos/af.mp4&type=video&duration=52&streamtype=file&poster=http://jarisflvplayer.org/images/poster.png&autostart=false&logo=http://jarisflvplayer.org/images/logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=http://jaris.sourceforge.net&hardwarescaling=false&darkcolor=000000&brightcolor=4c4c4c&controlcolor=FFFFFF&hovercolor=67A8C1&controltype=1">
<param name="seamlesstabbing" value="false">-->
<embed
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
width="576" height="360"
src="JarisFLVPlayer.swf"
allowfullscreen="true"
allowscriptaccess="always"
bgcolor="#000000"
quality="high"
scale="noscale"
wmode="opaque"
flashvars="source=/exam/videos/ad.mp4&type=video&duration=52&streamtype=file&poster=images/zjl.jpg&autostart=true&logo=logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=logo.png&hardwarescaling=false&controltype=1"
seamlesstabbing="false"
menu="false"
>
<noembed>
</noembed>
</embed>
</object>
</center>
</div>
<h2>White tones</h2>
<div class="block">
<center>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2"
width="576" height="360"
>
<param name="allowFullscreen" value="true">
<param name="allowScriptAccess" value="always">
<param name="movie"
value="http://jarisflvplayer.org/files/JarisFLVPlayer.swf">
<param name="bgcolor" value="#000000">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="wmode" value="opaque">
<param name="flashvars"
value="source=http://jaris.sourceforge.net/files/jaris-intro.flv&type=video&duration=52&streamtype=file&poster=http://jarisflvplayer.org/images/poster.png&autostart=false&logo=http://jarisflvplayer.org/images/logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=http://jaris.sourceforge.net&hardwarescaling=false&darkcolor=D3D3D3&brightcolor=FFFFFF&controlcolor=000000&hovercolor=FF0000&controltype=1&seekcolor=000000">
<param name="seamlesstabbing" value="false">
<embed
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
width="576" height="360"
src="http://jarisflvplayer.org/files/JarisFLVPlayer.swf"
allowfullscreen="true"
allowscriptaccess="always"
bgcolor="#000000"
quality="high"
scale="noscale"
wmode="opaque"
flashvars="source=http://jaris.sourceforge.net/files/jaris-intro.flv&type=video&duration=52&streamtype=file&poster=http://jarisflvplayer.org/images/poster.png&autostart=false&logo=http://jarisflvplayer.org/images/logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=http://jaris.sourceforge.net&hardwarescaling=false&darkcolor=D3D3D3&brightcolor=FFFFFF&controlcolor=000000&hovercolor=FF0000&controltype=1&seekcolor=000000"
seamlesstabbing="false"
>
<noembed>
</noembed>
</embed>
</object>
</center>
</div>
<h2>Blue tones</h2>
<div class="block">
<center>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2"
width="576" height="360"
>
<param name="allowFullscreen" value="true">
<param name="allowScriptAccess" value="always">
<param name="movie"
value="http://jarisflvplayer.org/files/JarisFLVPlayer.swf">
<param name="bgcolor" value="#000000">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="wmode" value="opaque">
<param name="flashvars"
value="source=http://jaris.sourceforge.net/files/jaris-intro.flv&type=video&duration=52&streamtype=file&poster=http://jarisflvplayer.org/images/poster.png&autostart=false&logo=http://jarisflvplayer.org/images/logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=http://jaris.sourceforge.net&hardwarescaling=false&darkcolor=004F9D&brightcolor=008FD5&controlcolor=000000&hovercolor=FFFFFF&controltype=1&seekcolor=FFFFFF">
<param name="seamlesstabbing" value="false">
<embed
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
width="576" height="360"
src="http://jarisflvplayer.org/files/JarisFLVPlayer.swf"
allowfullscreen="true"
allowscriptaccess="always"
bgcolor="#000000"
quality="high"
scale="noscale"
wmode="opaque"
flashvars="source=http://jaris.sourceforge.net/files/jaris-intro.flv&type=video&duration=52&streamtype=file&poster=http://jarisflvplayer.org/images/poster.png&autostart=false&logo=http://jarisflvplayer.org/images/logo.png&logoposition=top left&logoalpha=30&logowidth=130&logolink=http://jaris.sourceforge.net&hardwarescaling=false&darkcolor=004F9D&brightcolor=008FD5&controlcolor=000000&hovercolor=FFFFFF&controltype=1&seekcolor=FFFFFF"
seamlesstabbing="false"
>
<noembed>
</noembed>
</embed>
</object>
</center>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
四、ckplayer
官網:www.ckplayer.com
demo:
最簡單的demo:
<!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>
<script type="text/javascript" src="js/offlights.js"></script>
</head>
<body>
<div id="video" style="position:relative;z-index: 100;width:600px;height:400px;float: left;">
<div id="a1"></div>
</div>
<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var flashvars = {
f: '/exam/videos/af.flv',
c: 0,
b: 1
};
var params = {bgcolor: '#FFF', allowFullScreen: true, allowScriptAccess: 'always'};
CKobject.embedSWF('ckplayer/ckplayer.swf', 'a1', 'ckplayer_a1', '600', '400', flashvars, params);
/*
CKobject.embedSWF(播放器路徑,容器id,播放器id/name,播放器寬,播放器高,flashvars的值,其它定義也可省略);
下面三行是調用html5播放器用到的
*/
var video = ['http://movie.ks.js.cn/flv/other/1_0.mp4->video/mp4', 'http://www.ckplayer.com/webm/0.webm->video/webm', 'http://www.ckplayer.com/webm/0.ogv->video/ogg'];
var support = ['iPad', 'iPhone', 'ios', 'android+false', 'msie10+false'];
CKobject.embedHTML5('video', 'ckplayer_a1', 600, 400, video, flashvars, support);
</script>
</body>
</html>
官方demo及詳細參數說明:
<!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>
<style type="text/css">
body,td,th {
font-size: 14px;
line-height: 26px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
p {
margin-top: 5px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
padding-left: 10px;
}
</style>
<script type="text/javascript" src="js/offlights.js"></script>
</head>
<body>
<div id="video" style="position:relative;z-index: 100;width:600px;height:400px;float: left;"><div id="a1"></div></div>
<!--
上面一行是播放器所在的容器名稱,如果隻調用flash播放器,可以隻用<div id="a1"></div>
-->
<textarea name="statusvalue" rows="15" id="statusvalue" style="width:200px;height:400px;">該處是用來監聽播放器實時傳回的各種狀态,可以根據這裡的狀态實時的控制播放器</textarea>
<textarea name="obj" rows="15" id="obj" style="width:200px;height:400px;">這裡是主動擷取播放器裡的各項狀态值</textarea>
<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
//如果你不需要某項設定,可以直接删除,注意var flashvars的最後一個值後面不能有逗号
var flashvars={
f:'http://movie.ks.js.cn/flv/other/1_0.flv',//視訊位址
a:'',//調用時的參數,隻有當s>0的時候有效
s:'0',//調用方式,0=普通方法(f=視訊位址),1=網址形式,2=xml形式,3=swf形式(s>0時f=網址,配合a來完成對位址的組裝)
c:'0',//是否讀取文本配置,0不是,1是
x:'',//調用xml風格路徑,為空的話将使用ckplayer.js的配置
i:'http://www.ckplayer.com/images/loadimg3.jpg',//初始圖檔位址
d:'http://www.ckplayer.com/down/pause6.1_1.swf|http://www.ckplayer.com/down/pause6.1_2.swf',//暫停時播放的廣告,swf/圖檔,多個用豎線隔開,圖檔要加連結位址,沒有的時候留白就行
u:'',//暫停時如果是圖檔的話,加個連結位址
l:'http://www.ckplayer.com/down/adv6.1_1.swf|http://www.ckplayer.com/down/adv6.1_2.swf',//前置廣告,swf/圖檔/視訊,多個用豎線隔開,圖檔和視訊要加連結位址
r:'',//前置廣告的連結位址,多個用豎線隔開,沒有的留白
t:'10|10',//視訊開始前播放swf/圖檔時的時間,多個用豎線隔開
y:'',//這裡是使用網址形式調用廣告位址時使用,前提是要設定l的值為空
z:'http://www.ckplayer.com/down/buffer.swf',//緩沖廣告,隻能放一個,swf格式
e:'3',//視訊結束後的動作,0是調用js函數,1是循環播放,2是暫停播放并且不調用廣告,3是調用視訊推薦清單的插件,4是清除視訊流并調用js功能和1差不多,5是暫停播放并且調用暫停廣告
v:'80',//預設音量,0-100之間
p:'0',//視訊預設0是暫停,1是播放
h:'0',//播放http視訊流時采用何種拖動方法,=0不使用任意拖動,=1是使用按關鍵幀,=2是按時間點,=3是自動判斷按什麼(如果視訊格式是.mp4就按關鍵幀,.flv就按關鍵時間),=4也是自動判斷(隻要包含字元mp4就按mp4來,隻要包含字元flv就按flv來)
q:'',//視訊流拖動時參考函數,預設是start
m:'0',//預設是否采用點選播放按鈕後再加載視訊,0不是,1是,設定成1時不要有前置廣告
o:'',//當m=1時,可以設定視訊的時間,機關,秒
w:'',//當m=1時,可以設定視訊的總位元組數
g:'',//視訊直接g秒開始播放
j:'',//視訊提前j秒結束
k:'30|60',//提示點時間,如 30|60滑鼠經過進度欄30秒,60秒會提示n指定的相應的文字
n:'這是提示點的功能,如果不需要删除n和j的值|提示點測試60秒',//提示點文字,跟k配合使用,如 提示點1|提示點2
wh:'',//這是6.2新增加的寬高比,可以自己定義視訊的寬高或寬高比如:wh:'4:3',或wh:'1080:720'
ct:'2',//6.2新增加的參數,主要針對有些視訊拖動時時間出錯的修正參數,預設是2,自動修正,1是強制修正,0是強制不修正
//調用播放器的所有參數清單結束
//以下為自定義的播放器參數用來在插件裡引用的
my_url:encodeURIComponent(window.location.href)//本頁面位址
//調用自定義播放器參數結束
};
var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'};//這裡定義播放器的其它參數如背景色(跟flashvars中的b不同),是否支援全屏,是否支援互動
var attributes={id:'ckplayer_a1',name:'ckplayer_a1',menu:'false'};
//下面一行是調用播放器了,括号裡的參數含義:(播放器檔案,要顯示在的div容器,寬,高,需要flash的版本,當使用者沒有該版本的提示,加載初始化參數,加載設定參數如背景,加載attributes參數,主要用來設定播放器的id)
swfobject.embedSWF('ckplayer/ckplayer.swf', 'a1', '600', '400', '10.0.0','ckplayer/expressInstall.swf', flashvars, params, attributes);
/*播放器位址,容器id,寬,高,需要flash插件的版本,flashvars,params,attributes
如果你因為目前的swfobject和你項目中的存在沖突,不想用swfobject.embedSWF調用,也可以用如下代碼進行調用
CKobject.embedSWF('ckplayer/ckplayer.swf','a1','ckplayer_a1','600','400',flashvars,params);
CKobject.embedSWF(播放器路徑,容器id,播放器id/name,播放器寬,播放器高,flashvars的值,其它定義也可省略);
此時可以删除ckplayer.js中的最後一行,互動的部分也要改成CKobject.getObjectById('ckplayer_a1')
*/
//調用ckplayer的flash播放器結束
/*
下面三行是調用html5播放器用到的
var video='視訊位址和類型';
var support='支援的平台或浏覽器核心名稱';
*/
var video=['http://movie.ks.js.cn/flv/other/1_0.mp4->video/mp4','http://www.ckplayer.com/webm/0.webm->video/webm','http://www.ckplayer.com/webm/0.ogv->video/ogg'];
var support=['iPad','iPhone','ios','android+false','msie10+false'];//預設的在ipad,iphone,ios裝置中用html5播放,android,ie10上沒有安裝flash的也調用html5
CKobject.embedHTML5('video','ckplayer_a1',600,400,video,flashvars,support);
/*
如果不想使用html5播放器,隻要把上面三行去掉就可以了
=================================================================
以下代碼并不是播放器裡的,隻是播放器應用時用到的
=================================================================
*/
function playerstop(){
//隻有當調用視訊播放器時設定e=0或4時會有效果
alert('播放完成');
}
var _nn=0;//用來計算實時監聽的條數的,超過100條記錄就要删除,不然會消耗記憶體
var watt=false;
function ckplayer_status(str){
_nn+=1;
if(_nn>200){
_nn=0;
document.getElementById('statusvalue').value='';
}
document.getElementById('statusvalue').value=str+'\n'+document.getElementById('statusvalue').value;
if(str=='video:play'){
if(!watt){
watt=true;
setInterval('getstart()',1000);
}
}
}
function getstart(){
var a=swfobject.getObjectById('ckplayer_a1').ckplayer_getstatus();
var ss='';
for (var k in a){
ss+=k+":"+a[k]+'\n';
}
document.getElementById('obj').innerHTML=ss;
}
function aboutstr(str,f){//檢視str字元裡是否有f
var about=false;
var strarray=new Array();
var farray=new Array();
farray=f.split(",");
if(str){
for(var i=0;i<farray.length;i++){
strarray=str.split(farray[i]);
if(strarray.length>1){
about=true;
break;
}
}
}
return about;
}
function ckadjump(){
alert('你點選了跳過廣告按鈕,注冊成為本站會員,可不用觀看前置廣告');
}
//開關燈
var box = new LightBox();
function closelights(){//關燈
box.Show();
CKobject._K_('video').style.width='940px';
CKobject._K_('video').style.height='550px';
swfobject.getObjectById('ckplayer_a1').width=940;
swfobject.getObjectById('ckplayer_a1').height=550;
}
function openlights(){//開燈
box.Close();
CKobject._K_('video').style.width='600px';
CKobject._K_('video').style.height='400px';
swfobject.getObjectById('ckplayer_a1').width=600;
swfobject.getObjectById('ckplayer_a1').height=400;
}
</script>
<p style="color:#F00">
ckplayer6.3,<a href="help.htm" target="_blank" rel="external nofollow" target="_blank">檢視更新說明</a><br />
<strong><a href="http://www.ckplayer.com/" target="_blank" rel="external nofollow" target="_blank">官網</a>,<a href="http://www.ckplayer.com/manual.php" target="_blank" rel="external nofollow" target="_blank">幫助手冊</a></strong><br />
<strong>如果你是輕按兩下打開該頁面,發現不能播放視訊</strong>(原則上該播放器需要在網站環境中運作),<a href="http://www.ckplayer.com/bbs/forum.php?mod=viewthread&tid=942" target="_blank" rel="external nofollow" >請點選該連結檢視設定方法</a></p>
<p>以下的操作類隻對flash播放器有效</p>
<p>
<input type="button" name="button" id="button" value="暫停前置廣告" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_advpause();" />
<input type="button" name="button" id="button" value="繼續播放前置廣告" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_advpause(false);" />
<input type="button" name="button" id="button" value="跳過廣告" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_advunload();" />
<input type="button" name="button" id="button" value="隐藏控制欄" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_changeface(true);" />
<input type="button" name="button" id="button" value="顯示控制欄" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_changeface();" />
<input type="button" name="button" id="button" value="播放" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_play();" />
<input type="button" name="button" id="button" value="暫停" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_pause();" />
<input type="button" name="button" id="button" value="播放/暫停" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_playorpause();" />
<input type="button" name="button" id="button" value="快進" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_fastnext();" />
<input type="button" name="button" id="button" value="快退" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_fastback();" />
<input type="button" name="button2" id="button2" value="顯示調整插件" onClick="swfobject.getObjectById('ckplayer_a1').ckplayer_plugin('adjustment.swf',true);" />
<input type="button" name="button2" id="button2" value="隐藏調整插件" onClick="swfobject.getObjectById('ckplayer_a1').ckplayer_plugin('adjustment.swf',false);" />
<input type="button" name="button2" id="button2" value="清除視訊" onClick="swfobject.getObjectById('ckplayer_a1').ckplayer_videoclear();" />
</p>
<p>
先設定好要跳轉的秒數:
<input name="seconds" type="text" id="seconds" value="20" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="跳轉" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_seek(document.getElementById('seconds').value);" />
</p>
<p>
先設定好音量(1-100):
<input name="volume" type="text" id="volume" value="20" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_volume(document.getElementById('volume').value);" />
</p>
<p>
亮度(-255-255):
<input name="brightness" type="text" id="brightness" value="200" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_brightness(document.getElementById('brightness').value);" />
0為中間值,向右為亮向左為暗</p>
<p>
對比度(-255-255):
<input name="contrast" type="text" id="contrast" value="200" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_contrast(document.getElementById('contrast').value);" />
127.5為中間值,向右對比鮮明向左對比偏暗</p>
<p>
飽和度(-255-255):
<input name="saturation" type="text" id="saturation" value="200" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_saturation(document.getElementById('saturation').value);" />
1為中間值,0為灰階值(即黑白相片)</p>
<p>
色相(-255-255):
<input name="sethue" type="text" id="sethue" value="200" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_sethue(document.getElementById('sethue').value);" />
0為中間值,向右向左一試便知</p>
<p>
增加寬高:
<input name="wandh" type="text" id="wandh" value="100" size="5" maxlength="5" /><input name="wandh2" type="text" id="wandh2" value="100" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_wandh(document.getElementById('wandh').value,document.getElementById('wandh2').value);" />
大于0,100為正常寬高
</p>
<p>
自由設定寬:
<input name="cw" type="text" id="cw" value="100" size="5" maxlength="5" />
高:
<input name="ch" type="text" id="ch" value="100" size="5" maxlength="5" />
x:
<input name="cx" type="text" id="cx" value="100" size="5" maxlength="5" />
y:
<input name="cy" type="text" id="cy" value="100" size="5" maxlength="5" />
<input type="button" name="button" id="button" value="設定" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_whxy(document.getElementById('cw').value,document.getElementById('ch').value,document.getElementById('cx').value,document.getElementById('cy').value);" />
</p>
<p>
播放新參數位址:
<input name="newaddress" type="text" id="newaddress" value="{f->http://movie.ks.js.cn/flv/2012/02/6-1.flv}" size="60" maxlength="100" />
<input type="button" name="button" id="button" value="跳轉" οnclick="swfobject.getObjectById('ckplayer_a1').ckplayer_newaddress(document.getElementById('newaddress').value);" />
</p>
<p>以下是CKoject函數所能做的一些跟播放器無關的事情</p>
<p id="aboutme"></p>
<script type="text/javascript">
var aboutme='';
aboutme+='平台(浏覽器)核心:'+CKobject.Platform()+'<br />';
aboutme+='浏覽器:'+CKobject.browser()['B']+'<br />';
aboutme+='浏覽器版本:'+CKobject.browser()['V']+'<br />';
aboutme+='是否安裝了flash插件:'+CKobject.Flash()['f']+'<br />';
if(CKobject.Flash()['f']){
aboutme+='flash插件版本:'+CKobject.Flash()['v']+'<br />';
}
CKobject._K_('aboutme').innerHTML=aboutme;
</script>
</body>
</html>
參考: http://jarisflvplayer.org/demo/new-controls http://www.ckplayer.com/nview.php?id=160