PageSourceSearch

https://zgfxy.cn/content/_common/assets/ckplayer/ckplayer.js

js zgfxy.cn collected 2026-10-02 10:37:32 UTC 209,225 bytes, 6,842 lines download raw bytes

1/*
2	软件名称:ckplayer
3	软件版本:X
4	软件作者:http://www.ckplayer.com
5	---------------------------------------------------------------------------------------------
6	开发说明:
7	使用的主要程序语言:javascript(js)及actionscript3.0(as3.0)(as3.0主要用于flashplayer部分的开发,不在该页面呈现)
8	功能:播放视频
9	特点:兼容HTML5-VIDEO(优先)以及FlashPlayer
10	=====================================================================================================================
11*/
12function ckplayerConfig() {
13	return {
14		flashvars: {}, //用来补充flashvars里的对象
15		languagePath: '', //语言包文件地址
16		stylePath: '', //风格包文件地址
17		config: {
18			fullInteractive: true, //是否开启交互功能
19			delay: 30, //延迟加载视频,单位:毫秒
20			timeFrequency: 100, //计算当前播放时间和加载量的时间频率,单位:毫秒
21			autoLoad: true, //视频是否自动加载
22			loadNext: 0, //多段视频预加载的段数,设置成0则全部加载
23			definition: true, //是否使用清晰度组件
24			smartRemove: true, //是否使用智能清理,使用该功能则在多段时当前播放段之前的段都会被清除出内存,减少对内存的使用
25			bufferTime: 200, //缓存区的长度,单位:毫秒,不要小于10
26			click: true, //是否支持屏幕单击暂停
27			doubleClick: true, //是否支持屏幕双击全屏
28			doubleClickInterval: 200, //判断双击的标准,即二次单击间隔的时间差之内判断为是双击,单位:毫秒
29			keyDown: {
30				space: true, //是否启用空格键切换播放/暂停
31				left: true, //是否启用左方向键快退
32				right: true, //是否启用右方向键快进
33				up: true, //是否支持上方向键增加音量
34				down: true //是否支持下方向键减少音量
35			},
36			timeJump: 10, //快进快退时的秒数
37			volumeJump: 0.1, //音量调整的数量,大于0小于1的小数
38			timeScheduleAdjust: 1, //是否可调节调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动
39			previewDefaultLoad: true, //预览图片是否默认加载,优点是鼠标第一次经过进度条即可显示预览图片
40			promptSpotTime: false, //提示点文字是否在前面加上对应时间
41			buttonMode: {
42				player: false, //鼠标在播放器上是否显示可点击形态
43				controlBar: false, //鼠标在控制栏上是否显示可点击形态
44				timeSchedule: true, //鼠标在时间进度条上是否显示可点击形态
45				volumeSchedule: true //鼠标在音量调节栏上是否显示可点击形态
46			},
47			liveAndVod: { //直播+点播=回播功能
48				open: false, //是否开启,开启该功能需要设置flashvars里live=true
49				vodTime: 2, //可以回看的整点数
50				start: 'start' //回看请求参数
51			},
52			errorNum: 3, //错误重连次数
53			playCorrect: false, //是否需要错误修正,这是针对rtmp的
54			timeCorrect: true, //http视频播放时间错误纠正,有些因为视频格式的问题导致视频没有实际播放结束视频文件就返回了stop命令
55			m3u8Definition: { //m3u8自动清晰度时按关键字来进行判断
56				//tags:['200k','110k','400k','600k','1000k']
57			},
58			m3u8MaxBufferLength: 30, //m3u8每次缓冲时间,单位:秒数
59			split: ',', //当视频地址采用字符形式并且需要使用逗号或其它符号来切割数组里定义
60			timeStamp: '', //一个地址,用来请求当前时间戳,用于播放器内部时间效准
61			addCallback: 'adPlay,adPause,playOrPause,videoPlay,videoPause,videoMute,videoEscMute,videoClear,changeVolume,fastBack,fastNext,videoSeek,newVideo,getMetaDate,videoRotation,videoBrightness,videoContrast,videoSaturation,videoHue,videoZoom,videoProportion,videoError,addListener,removeListener,addElement,getElement,deleteElement,animate,animateResume,animatePause,deleteAnimate,changeConfig,getConfig,openUrl,fullScreen,quitFullScreen,switchFull,screenshot,custom,changeControlBarShow,getCurrentSrc'
62			//需要支持的事件
63		},
64		menu: { //版权名称支持
65			ckkey: '',
66			name: '',
67			link: '',
68			version: '',
69			domain: '',
70			more: []
71		},
72		style: { //风格部分内容配置,这里主要配置loading和logo以及广告的部分内容
73			loading: {
74				file: 'data:image/swf;base64,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',
75				align: 'center',
76				vAlign: 'middle',
77				offsetX: -100,
78				offsetY: -40
79			},
80			logo: null,
81			advertisement: { //广告相关的配置
82				time: 5, //广告默认播放时长以及多个广告时每个广告默认播放时间,单位:秒
83				method: 'get', //广告监测地址默认请求方式,get/post
84				videoForce: false, //频广告是否强制播放结束
85				videoVolume: 0.8, //视频音量
86				skipButtonShow: true, //是否显示跳过广告按钮
87				linkButtonShow: true, //是否显示广告链接按钮,如果选择显示,只有在提供了广告链接地址时才会显示
88				muteButtonShow: true, //是否显示跳过广告按钮
89				closeButtonShow: true, //暂停时是否显示关闭广告按钮
90				closeOtherButtonShow: true, //其它广告是否需要关闭广告按钮
91				frontSkipButtonDelay: 0, //前置广告跳过广告按钮延时显示的时间,单位:秒
92				insertSkipButtonDelay: 0, //插入广告跳过广告按钮延时显示的时间,单位:秒
93				endSkipButtonDelay: 0, //后置广告跳过广告按钮延时显示的时间,单位:秒
94				frontStretched: 2, //前置广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高æ—
94¶æ‰è¿›è¡Œç¼©æ”¾ï¼Œ3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
95				insertStretched: 2, //插入广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
96				pauseStretched: 2, //暂停广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
97				endStretched: 2 //结束广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
98			},
99			video: { //视频的默认比例
100				defaultWidth: 4, //宽度
101				defaultHeight: 3 //高度
102			}
103		}
104	};
105}
106!(function() {
107	var javascriptPath = '';
108	! function() {
109		var scriptList = document.scripts,
110			thisPath = scriptList[scriptList.length - 1].src;
111		javascriptPath = thisPath.substring(0, thisPath.lastIndexOf('/') + 1);
112    }();
113
114    var arrKeydownEventListener = [];
115
116	var ckplayer = function(obj) {
117		/*
118			javascript部分开发所用的注释说明:
119			1:初始化-程序调用时即运行的代码部分
120			2:定义样式-定义容器(div,p,canvas等)的样式表,即css
121			3:监听动作-监听元素节点(单击-click,鼠标进入-mouseover,鼠标离开-mouseout,鼠标移动-mousemove等)事件
122			4:监听事件-监听视频的状态(播放,暂停,全屏,音量调节等)事件
123			5:共用函数-这类函数在外部也可以使用
124			6:全局变量-定义成全局使用的变量
125			7:其它相关注释
126			全局变量说明:
127			在本软件中所使用到的全局变量(变量(类型)包括Boolean,String,Int,Object(包含元素对象和变量对象),Array,Function等)
128			下面列出重要的全局变量:
129				V:Object:视频对象
130				VA:Array:视频列表(包括视频地址,类型,清晰度说明)
131				ID:String:视频ID
132				CB:Object:控制栏各元素的集合对象
133				PD:Object:内部视频容器对象
134			---------------------------------------------------------------------------------------------
135			程序开始
136			下面为需要初始化配置的全局变量
137			初始化配置
138			config:全局变量/变量类型:Object/功能:定义一些基本配置
139		*/
140		this.config = {
141			videoClick: true, //是否支持单击播放/暂停动作
142			videoDbClick: true, //是否支持双击全屏/退出全屏动作
143			errorTime: 100, //延迟判断失败的时间,单位:毫秒
144			videoDrawImage: false //是否使用视频drawImage功能,注意,该功能在移动端表现不了
145		};
146		//全局变量/变量类型:Object/功能:播放器默认配置,在外部传递过来相应配置后,则进行相关替换
147		this.varsConfig = {
148			playerID: '', //播放器ID
149			container: '', //视频容器的ID
150			variable: 'ckplayer', //播放函数(变量)名称
151			volume: 0.8, //默认音量,范围0-1
152			poster: '', //封面图片地址
153			autoplay: false, //是否自动播放
154			loop: false, //是否需要循环播放
155			live: false, //是否是直播
156			duration: 0, //指定总时间
157			seek: 0, //默认需要跳转的秒数
158			drag: '', //拖动时支持的前置参数
159			front: '', //前一集按钮动作
160			next: '', //下一集按钮动作
161			loaded: '', //加载播放器后调用的函数
162			flashplayer: false, //设置成true则强制使用flashplayer
163			html5m3u8: false, //PC平台上是否使用h5播放器播放m3u8
164			track: null, //字幕轨道
165			cktrack: null, //ck字幕
166			preview: null, //预览图片对象
167			prompt: null, //提示点功能
168			video: null, //视频地址
169			config: '', //调用配置函数名称
170			type: '', //视频格式
171			crossorigin: '', //设置html5视频的crossOrigin属性
172			crossdomain: '', //安全策略文件地址
173			unescape: false, //默认flashplayer里需要解码
174			mobileCkControls: false, //移动端h5显示控制栏
175			playbackrate: 1, //默认倍速
176			download: false, //是否显示下载按钮
177			debug: false //是否开启调试模式
178		};
179		this.vars = {};
180		//全局变量/变量类型:Object/功能:语言配置
181		this.language = {
182			volume: '音量:',
183			play: '点击播放',
184			pause: '点击暂停',
185			full: '点击全屏',
186			escFull: '退出全屏',
187			mute: '点击静音',
188			escMute: '取消静音',
189			front: '上一集',
190			next: '下一集',
191			definition: '点击选择清晰度',
192			playbackRate: '点击选择速度',
193			error: '加载出错',
194			download: '点击下载视频',
195			downloadText: '下载'
196		};
197		//全局变量/变量类型:Array/功能:右键菜单:[菜单标题,类型(link:链接,default:灰色,function:调用函数,javascript:调用js函数),执行内容(包含链接地址,函数名称),[line(间隔线)]]
198		this.contextMenu = [
199			['ckplayer', 'link', 'http://www.ckplayer.com'],
200			['version:X', 'default', 'line']
201		];
202		//全局变量/变量类型:Array/功能:错误列表
203		this.errorList = [
204			['000', 'Object does not exist'],
205			['001', 'Variables type is not a object'],
206			['002', 'Video object does not exist'],
207			['003', 'Video object format error'],
208			['004', 'Video object format error'],
209			['005', 'Video object format error'],
210			['006', '[error] does not exist '],
211			['007', 'Ajax error'],
212			['008', 'Ajax error'],
213			['009', 'Ajax object format error'],
214			['010', 'Ajax.status:[error]']
215		];
216		//全局变量/变量类型:Array/功能:HTML5变速播放的值数组/如果不需要可以设置成null
217		this.playbackRateArr = [
218			[0.5, '0.5倍'],
219			[1, '正常'],
220			[1.25, '1.25倍'],
221			[1.5, '1.5倍'],
222			[2, '2倍速'],
223			[4, '4倍速']
224		];
225		//全局变量/变量类型:Array/功能:HTML5默认变速播放的值
226		this.playbackRateDefault = 1;
227		//全局变量/变量类型:String/功能:定义logo
228		this.logo = '';
229		//全局变量/变量类型:Boolean/功能:是否加载了播放器
230		this.loaded = false;
231		//全局变量/变量类型:计时器/功能:监听视频加载出错的状态
232		this.timerError = null;
233		//全局变量/变量类型:Boolean/功能:是否出错
234		this.error = false;
235		//全局变量/变量类型:Array/功能:出错地址的数组
236		this.errorUrl = [];
237		//全局变量/变量类型:计时器/功能:监听全屏与非全屏状态
238		this.timerFull = null;
239		//全局变量/变量类型:Boolean/功能:是否全屏状态
240		this.full = false;
241		//全局变量/变量类型:计时器/功能:监听当前的月/日 时=分=秒
242		this.timerTime = null;
243		//全局变量/变量类型:计时器/功能:监听视频加载
244		this.timerBuffer = null;
245		//全局变量/变量类型:Boolean/功能:设置进度按钮及进度条是否跟着时间变化,该属性主要用来在按下进度按钮时暂停进度按钮移动和进度条的长度变化
246		this.isTimeButtonMove = true;
247		//全局变量/变量类型:Boolean/功能:进度栏是否有效,如果是直播,则不需要监听时间让进度按钮和进度条变化
248		this.isTimeButtonDown = false;
249		//全局变量/变量类型:Boolean/功能:用来模拟双击功能的判断
250		this.isClick = false;
251		//全局变量/变量类型:计时器/功能:用来模拟双击功能的计时器
252		this.timerClick = null;
253		//全局变量/变量类型:计时器/功能:旋转loading
254		this.timerLoading = null;
255		//全局变量/变量类型:计时器/功能:监听鼠标在视频上移动显示控制栏
256		this.timerCBar = null;
257		//全局变量/变量类型:Int/功能:播放视频时如果该变量的值大于0,则进行跳转后设置该值为0
258		this.needSeek = 0;
259		//全局变量/变量类型:Int/功能:当前音量
260		this.volume = 0;
261		//全局变量/变量类型:Int/功能:静音时保存临时音量
262		this.volumeTemp = 0;
263		//全局变量/变量类型:Number/功能:当前播放时间
264		this.time = 0;
265		//全局变量/变量类型:Boolean/功能:定义首次调用
266		this.isFirst = true;
267		//全局变量/变量类型:Boolean/功能:是否使用HTML5-VIDEO播放
268		this.html5Video = true;
269		//全局变量/变量类型:Object/功能:记录视频容器节点的x;y
270		this.pdCoor = {
271			x: 0,
272			y: 0
273		};
274		//全局变量/变量类型:String/功能:判断当前使用的播放器类型,html5video或flashplayer
275		this.playerType = '';
276		//全局变量/变量类型:Int/功能:加载进度条的长度
277		this.loadTime = 0;
278		//全局变量/body对象
279		this.body = document.body || document.documentElement;
280		//全局变量/V/播放器
281		this.V = null;
282		//全局变量/保存外部js监听事件数组
283		this.listenerJsArr = [];
284		//全局变量/保存控制栏显示元素的总宽度
285		this.buttonLen = 0;
286		//全局变量/保存控制栏显示元素的数组
287		this.buttonArr = [];
288		//全局变量/保存按钮元素的宽
289		this.buttonWidth = {};
290		//全局变量/保存播放器上新增元件的数组
291		this.elementArr = [];
292		//全局变量/字幕内容
293		this.track = [];
294		//全局变量/字幕索引
295		this.trackIndex = 0;
296		//全局变量/当前显示的字幕内容
297		this.nowTrackShow = {
298			sn: ''
299		};
300		//全局变量/保存字幕元件数组
301		this.trackElement = [];
302		//全局变量/将视频转换为图片
303		this.timerVCanvas = null;
304		//全局变量/animate
305		this.animateArray = [];
306		//全局变量/保存animate的元件
307		this.animateElementArray = [];
308		//全局变量/保存需要在暂停时停止缓动的数组
309		this.animatePauseArray = [];
310		//全局变量/预览图片加载状态/0=没有加载,1=正在加载,2=加载完成
311		this.previewStart = 0;
312		//全局变量/预览图片容器
313		this.previewDiv = null;
314		//全局变量/预览框
315		this.previewTop = null;
316		//全局变量/预览框的宽
317		this.previewWidth = 120;
318		//全局变量/预览图片容器缓动函数
319		this.previewTween = null;
320		//全局变量/是否是m3u8格式,是的话则可以加载hls.js
321		this.isM3u8 = false;
322		//全局变量/保存提示点数组
323		this.promptArr = [];
324		//全局变量/显示提示点文件的容器
325		this.promptElement = null;
326		//配置文件函数
327		this.ckplayerConfig = {};
328		//控制栏是否显示
329		this.showFace = true;
330		//是否监听过h5的错误
331		this.errorAdd = false;
332		//是否发送了错误
333		this.errorSend = false;
334		//控制栏是否隐藏
335		this.controlBarIsShow = true;
336		//字体
337		this.fontFamily = '"Microsoft YaHei"; YaHei; "\5FAE\8F6F\96C5\9ED1"; SimHei; "\9ED1\4F53";Arial';
338		//记录第一次拖动进度按钮时的位置
339		if(obj) {
340			this.embed(obj);
341		}
342	};
343	ckplayer.prototype = {
344		/*
345			主要函数部分开始
346			主接口函数:
347			调用播放器需初始化该函数
348		*/
349		embed: function(c) {
350			//c:Object:是调用接口传递的属性对象
351			if(window.location.href.substr(0, 7) == 'file://') {
352				alert('Please use the HTTP protocol to open the page');
353				return;
354			}
355			if(c == undefined || !c) {
356				this.eject(this.errorList[0]);
357				return;
358			}
359			if(typeof(c) != 'object') {
360				this.eject(this.errorList[1]);
361			}
362			this.vars = this.standardization(this.varsConfig, c);
363			if(!this.vars['mobileCkControls'] && this.isMobile()) {
364				this.vars['flashplayer'] = false;
365				this.showFace = false;
366			}
367			var videoString = this.vars['video'];
368			if(!videoString) {
369				this.eject(this.errorList[2]);
370				return;
371			}
372			if(typeof(videoString) == 'string') {
373				if(videoString.substr(0, 3) == 'CK:' || videoString.substr(0, 3) == 'CE:' || videoString.substr(8, 3) == 'CK:' || videoString.substr(8, 3) == 'CE:') {
374					this.vars['flashplayer'] = true;
375				}
376			}
377			if(this.vars['config']) {
378				this.ckplayerConfig = eval(this.vars['config'] + '()');
379			} else {
380				this.ckplayerConfig = ckplayerConfig();
381			}
382			if((!this.supportVideo() && this.vars['flashplayer'] != '') || (this.vars['flashplayer'] && this.uploadFlash()) || !this.isMsie()) {
383				this.html5Video = false;
384				this.getVideo();
385			} else if(videoString) {
386				//判断视频数据类型
387				this.analysedVideoUrl(videoString);
388				return this;
389			} else {
390				this.eject(this.errorList[2]);
391			}
392		},
393		/*
394			内部函数
395			根据外部传递过来的video开始分析视频地址
396		*/
397		analysedVideoUrl: function(video) {
398			var i = 0,
399				y = 0;
400			var thisTemp = this;
401			//定义全局变量VA:Array:视频列表(包括视频地址,类型,清晰度说明)
402			this.VA = [];
403			if(typeof(video) == 'string') { //如果是字符形式的则判断后缀进行填充
404				if(video.substr(0, 8) != 'website:') {
405					this.VA = [
406						[video, '', '', 0]
407					];
408					var fileExt = this.getFileExt(video);
409					switch(fileExt) {
410						case '.mp4':
411							this.VA[0][1] = 'video/mp4';
412							break;
413						case '.ogg':
414							this.VA[0][1] = 'video/ogg';
415							break;
416						case '.webm':
417							this.VA[0][1] = 'video/webm';
418							break;
419						default:
420							break;
421					}
422					this.getVideo();
423				} else {
424					if(this.html5Video) {
425						var ajaxObj = {
426							url: video.substr(8),
427							success: function(data) {
428								if(data) {
429									thisTemp.analysedUrl(data);
430								} else {
431									thisTemp.eject(thisTemp.errorList[5]);
432									this.VA = video;
433									thisTemp.getVideo();
434								}
435							}
436						};
437						this.ajax(ajaxObj);
438					} else {
439						this.VA = video;
440						this.getVideo();
441					}
442
443				}
444			} else if(typeof(video) == 'object') { //对象或数组
445				if(!this.isUndefined(typeof(video.length))) { //说明是数组
446					if(!this.isUndefined(typeof(video[0].length))) { //说明是数组形式的数组
447						this.VA = video;
448					}
449					this.getVideo();
450				} else {
451					/*
452						如果video格式是对象形式,则分二种
453						如果video对象里包含type,则直接播放
454					*/
455					if(!this.isUndefined(video['type'])) {
456						this.VA.push([video['file'], video['type'], '', 0]);
457						this.getVideo();
458					} else {
459						this.eject(this.errorList[5]);
460					}
461				}
462			} else {
463				this.eject(this.errorList[4]);
464			}
465		},
466		/*
467			对请求到的视频地址进行重新分析
468		*/
469		analysedUrl: function(data) {
470			this.vars = this.standardization(this.vars, data);
471			if(!this.isUndefined(data['video'])) {
472				this.vars['video'] = data['video'];
473			}
474			this.analysedVideoUrl(this.vars['video']);
475		},
476		/*
477			内部函数
478			检查浏览器支持的视频格式,如果是则将支持的视频格式重新分组给播放列表
479		*/
480		getHtml5Video: function() {
481			var va = this.VA;
482			var nva = [];
483			var mobile = false;
484			var video = document.createElement('video');
485			var self = this;
486			var codecs = function(type) {
487				var cod = '';
488				switch(type) {
489					case 'video/mp4':
490						cod = 'avc1.4D401E, mp4a.40.2';
491						break;
492					case 'video/ogg':
493						cod = 'theora, vorbis';
494						break;
495					case 'video/webm':
496						cod = 'vp8.0, vorbis';
497						break;
498					case 'video/3gp':
499						cod = 'vp8.0, avc, MP4V-ES, H.263, avc.h264'
500						break;
501					default:
502						break;
503				}
504				return cod;
505			};
506			var supportType = function(vidType, codType) {
507				if(!video.canPlayType) {
508					this.html5Video = false;
509					return false;
510				}
511				var isSupp = video.canPlayType(vidType + ';codecs="' + codType + '"');
512				if (isSupp == '' && !self.isMsie()) {
513					return false
514				}
515				return vidType && codType;
516			};
517			var getVidType = function (videoUrl) {
518				if (videoUrl) {
519					var suffix = videoUrl.split('.').slice(-1).toString()
520					return 'video/' + suffix;
521				}
522				return '';
523			};
524
525			if(this.vars['flashplayer'] || !this.isMsie()) {
526				this.html5Video = false;
527				return;
528			}
529			if(this.isMobile()) {
530				mobile = true;
531			}
532			for(var i = 0; i < va.length; i++) {
533				var v = va[i];
534				if (v) {
535					if (v[1] == '') {
536						v[1] = getVidType(v[0]);
537					}
538					if(v[1] != '' && !mobile && supportType(v[1], codecs(v[1])) && v[0].substr(0, 4) != 'rtmp') {
539						nva.push(v);
540					}
541					if((this.getFileExt(v[0]) == '.m3u8' || this.vars['type']=='video/m3u8' || this.vars['type']=='m3u8' || v[1]=='video/m3u8' || v[1]=='m3u8') && this.vars['html5m3u8']) {
542						this.isM3u8 = true;
543						nva.push(v);
544					}
545				}
546			}
547			if(nva.length > 0) {
548				this.VA = nva;
549			} else {
550				if(!mobile) {
551					this.html5Video = false;
552				}
553			}
554		},
555		/*
556			内部函数
557			根据视频地址开始构建播放器
558		*/
559		getVideo: function() {
560			//如果存在字幕则加载
561			if(this.V) { //如果播放器已存在,则认为是从newVideo函数发送过来的请求
562				this.changeVideo();
563				return;
564			}
565			if(this.vars['cktrack']) {
566				this.loadTrack();
567			}
568			if(this.supportVideo() && !this.vars['flashplayer']) {
569				this.getHtml5Video(); //判断浏览器支持的视频格式
570			}
571			var thisTemp = this;
572			var v = this.vars;
573			var src = '',
574				source = '',
575				poster = '',
576				loop = '',
577				autoplay = '',
578				track = '';
579			var video = v['video'];
580			var i = 0;
581			this.CD = this.getByElement(v['container']);
582			volume = v['volume'];
583			if(!this.CD) {
584				this.eject(this.errorList[6], v['container']);
585				return false;
586			}
587			//开始构建播放容器
588			var playerID = 'ckplayer' + this.randomString();
589			var playerDiv = document.createElement('div');
590			playerDiv.className = playerID;
591			this.V = undefined;
592			this.CD.innerHTML = '';
593			this.CD.appendChild(playerDiv);
594			this.PD = this.getByElement(playerID); //PD:定义播放器容器对象全局变量
595			this.css(this.CD, {
596				backgroundColor: '#000000',
597				overflow: 'hidden',
598				position: 'relative'
599			});
600			this.css(this.PD, {
601				backgroundColor: '#000000',
602				width: '100%',
603				height: '100%',
604				fontFamily: this.fontFamily
605			});
606			if(this.html5Video) { //如果支持HTML5-VIDEO则默认使用HTML5-VIDEO播放器
607				//禁止播放器容器上鼠标选择文本
608				this.PD.onselectstart = this.PD.ondrag = function() {
609					return false;
610				};
611				//播放容器构建完成并且设置好样式
612				//构建播放器
613				if(this.VA.length == 1) {
614					src = ' src="' + decodeURIComponent(this.VA[0][0]) + '"';
615				} else {
616					var videoArr = this.VA.slice(0);
617					videoArr = this.arrSort(videoArr);
618					for(i = 0; i < videoArr.length; i++) {
619						var type = '';
620						var va = videoArr[i];
621						if(va[1]) {
622							type = ' type="' + va[1] + '"';
623							if(type == ' type="video/m3u8"' || type == ' type="m3u8"') {
624								type = '';
625							}
626						}
627						source += '<source src="' + decodeURIComponent(va[0]) + '"' + type + '>';
628					}
629				}
630				//分析视频地址结束
631				if(v['autoplay']) {
632					autoplay = ' autoplay="autoplay"';
633				}
634				if(v['poster']) {
635					poster = ' poster="' + v['poster'] + '"';
636				}
637				if(v['loop']) {
638					loop = ' loop="loop"';
639				}
640				if(v['seek'] > 0) {
641					this.needSeek = v['seek'];
642				}
643				if(v['track'] != null && v['cktrack'] == null) {
644					var trackArr = v['track'];
645					var trackDefault = '';
646					var defaultHave = false;
647					for(i = 0; i < trackArr.length; i++) {
648						var trackObj = trackArr[i];
649						if(trackObj['default'] && !defaultHave) {
650							trackDefault = ' default';
651							defaultHave = true;
652						} else {
653							trackDefault = '';
654						}
655						track += '<track kind="' + trackObj['kind'] + '" src="' + trackObj['src'] + '" srclang="' + trackObj['srclang'] + '" label="' + trackObj['label'] + '"' + trackDefault + '>';
656					}
657				}
658				var autoLoad = this.ckplayerConfig['config']['autoLoad'];
659				var preload = '';
660				if(!autoLoad) {
661					preload = ' preload="meta"';
662				}
663				var vid = this.randomString();
664				var controls = '';
665				if(!this.showFace) {
666					controls = ' controls="controls"';
667				}
668				var html = '';
669				if(!this.isM3u8) {
670					html = '<video id="' + vid + '"' + src + ' width="100%" height="100%"' + autoplay + poster + loop + preload + controls + ' x5-playsinline="" playsinline="" webkit-playsinline="true">' + source + track + '</video>';
671				} else {
672					html = '<video id="' + vid + '" width="100%" height="100%"' + poster + loop + preload + controls + ' x5-playsinline="" playsinline="" webkit-playsinline="true">' + track + '</video>';
673				}
674				this.PD.innerHTML = html;
675				this.V = this.getByElement('#' + vid); //V:定义播放器对象全局变量
676				if(this.vars['crossorigin']) {
677					this.V.crossOrigin = this.vars['crossorigin'];
678				}
679				try {
680					this.V.volume = volume; //定义音量
681					if(this.playbackRateArr && this.vars['playbackrate'] > -1) {
682						if(this.vars['playbackrate'] < this.playbackRateArr.length) {
683							this.playbackRateDefault = this.vars['playbackrate'];
684						}
685						this.V.playbackRate = this.playbackRateArr[this.playbackRateDefault][0]; //定义倍速
686					}
687				} catch(error) {}
688				this.css(this.V, {
689					width: '100%',
690					height: '100%'
691				});
692				if(this.isM3u8) {
693					var loadJsHandler = function() {
694						thisTemp.embedHls(thisTemp.VA[0][0], v['autoplay']);
695					};
696					this.loadJs(javascriptPath + 'hls/hls.min.js', loadJsHandler);
697				}
698				this.css(this.V, 'backgroundColor', '#000000');
699				//创建一个画布容器
700				if(this.config['videoDrawImage']) {
701					var canvasID = 'vcanvas' + this.randomString();
702					var canvasDiv = document.createElement('div');
703					canvasDiv.className = canvasID;
704					this.PD.appendChild(canvasDiv);
705					this.MD = this.getByElement(canvasID); //定义画布存储容器
706					this.css(this.MD, {
707						backgroundColor: '#000000',
708						width: '100%',
709						height: '100%',
710						position: 'absolute',
711						display: 'none',
712						cursor: 'pointer',
713						left: '0px',
714						top: '0px',
715						zIndex: '10'
716					});
717					var cvid = 'ccanvas' + this.randomString();
718					this.MD.innerHTML = this.newCanvas(cvid, this.PD.offsetWidth, this.PD.offsetHeight);
719					this.MDC = this.getByElement(cvid + '-canvas');
720					this.MDCX = this.MDC.getContext('2d');
721				}
722				this.playerType = 'html5video';
723				//播放器构建完成并且设置好样式
724				//建立播放器的监听函数,包含操作监听及事件监听
725				this.addVEvent();
726				//根据清晰度的值构建清晰度切换按钮
727				if(this.showFace) {
728					this.definition();
729					if(!this.vars['live'] && this.playbackRateArr && this.vars['playbackrate'] > -1) {
730						this.playbackRate();
731					}
732					if(v['autoplay']) {
733						this.loadingStart(true);
734					}
735				}
736				this.playerLoad();
737			} else { //如果不支持HTML5-VIDEO则调用flashplayer
738				this.embedSWF();
739			}
740		},
741		/*
742			内部函数
743			发送播放器加载成功的消息
744		*/
745		playerLoad: function() {
746			var thisTemp = this;
747			if(this.isFirst) {
748				this.isFirst = false;
749				window.setTimeout(function() {
750					thisTemp.loadedHandler();
751				}, 1);
752			}
753		},
754		/*
755			内部函数
756			建立播放器的监听函数,包含操作监听及事件监听
757		*/
758		addVEvent: function() {
759			var thisTemp = this;
760			//监听视频单击事件
761			var eventVideoClick = function(event) {
762				thisTemp.videoClick();
763			};
764			this.addListenerInside('click', eventVideoClick);
765			this.addListenerInside('click', eventVideoClick, this.MDC);
766			//延迟计算加载失败事件
767			this.timerErrorFun();
768			//监听视频加载到元数据事件
769			var eventJudgeIsLive = function(event) {
770				thisTemp.sendJS('loadedmetadata');
771				thisTemp.sendJS('duration', thisTemp.V.duration);
772				thisTemp.judgeIsLive();
773			};
774			this.addListenerInside('loadedmetadata', eventJudgeIsLive);
775			//监听视频播放事件
776			var eventPlaying = function(event) {
777				thisTemp.playingHandler();
778				thisTemp.sendJS('play');
779				thisTemp.sendJS('paused', false);
780			};
781			this.addListenerInside('playing', eventPlaying);
782			//监听视频暂停事件
783			var eventPause = function(event) {
784				thisTemp.pauseHandler();
785				thisTemp.sendJS('pause');
786				thisTemp.sendJS('paused', true);
787			};
788			this.addListenerInside('pause', eventPause);
789			//监听视频播放时间事件
790			var eventTimeupdate = function(event) {
791				if(thisTemp.timerLoading != null) {
792					thisTemp.loadingStart(false);
793				}
794				if(thisTemp.time) {
795					thisTemp.sendJS('time', thisTemp.time);
796				}
797			};
798			this.addListenerInside('timeupdate', eventTimeupdate);
799			//监听视频缓冲事件
800			var eventWaiting = function(event) {
801				thisTemp.loadingStart(true);
802			};
803			this.addListenerInside('waiting', eventWaiting);
804			//监听视频seek开始事件
805			var eventSeeking = function(event) {
806				thisTemp.sendJS('seek', 'start');
807			};
808			this.addListenerInside('seeking', eventSeeking);
809			//监听视频seek结束事件
810			var eventSeeked = function(event) {
811				thisTemp.seekedHandler();
812				thisTemp.sendJS('seek', 'ended');
813			};
814			this.addListenerInside('seeked', eventSeeked);
815			//监听视频播放结束事件
816			var eventEnded = function(event) {
817				thisTemp.endedHandler();
818				thisTemp.sendJS('ended');
819			};
820			this.addListenerInside('ended', eventEnded);
821			//监听视频音量
822			var eventVolumeChange = function(event) {
823				try {
824					thisTemp.volumechangeHandler();
825					thisTemp.sendJS('volume', thisTemp.volume || thisTemp.V.volume);
826				} catch(event) {}
827			};
828			this.addListenerInside('volumechange', eventVolumeChange);
829			//监听全屏事件
830			var eventFullChange = function(event) {
831				var fullState = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
832				thisTemp.sendJS('full', fullState);
833			};
834			this.addListenerInside('fullscreenchange', eventFullChange);
835			this.addListenerInside('webkitfullscreenchange', eventFullChange);
836			this.addListenerInside('mozfullscreenchange', eventFullChange);
837			//建立界面
838			if(this.showFace) {
839				this.interFace();
840			}
841		},
842		/*
843			内部函数
844			重置界面元素
845		*/
846		resetPlayer: function() {
847			this.timeTextHandler();
848			if(this.showFace) {
849				this.timeProgress(0, 1); //改变时间进度条宽
850				this.changeLoad(0);
851				this.initPlayPause(); //判断显示播放或暂停按钮
852				this.definition(); //构建清晰度按钮
853				this.showFrontNext(); //构建上一集下一集按钮
854				this.showDownload(); //构建下载按钮
855				this.deletePrompt(); //删除提示点
856				this.deletePreview(); //删除预览图
857				this.trackHide(); //重置字幕
858				this.resetTrack();
859				this.trackElement = [];
860				this.track = [];
861            }
862		},
863		/*
864			内部函数
865			构建界面元素
866		 */
867		interFace: function() {
868			this.showFace = true;
869			var thisTemp = this;
870			var html = ''; //控制栏内容
871			var i = 0;
872			var bWidth = 38, //按钮的宽
873				bHeight = 38; //按钮的高
874			var bBgColor = '#FFFFFF', //按钮元素默认颜色
875				bOverColor = '#0782F5'; //按钮元素鼠标经过时的颜色
876			var timeInto = this.formatTime(0) + ' / ' + this.formatTime(this.vars['duration']); //时间显示框默认显示内容
877			var randomS = this.randomString(10); //获取一个随机字符串
878			/*
879				以下定义界面各元素的ID,统一以ID结束
880			*/
881			var controlBarBgID = 'controlbgbar' + randomS, //控制栏背景
882				controlBarID = 'controlbar' + randomS, //控制栏容器
883				timeProgressBgID = 'timeprogressbg' + randomS, //播放进度条背景
884				loadProgressID = 'loadprogress' + randomS, //加载进度条
885				timeProgressID = 'timeprogress' + randomS, //播放进度条
886				timeBOBGID = 'timebobg' + randomS, //播放进度按钮容器,该元素为一个透明覆盖在播放进度条上
887				timeBOID = 'timebo' + randomS, //播放进度可拖动按钮外框
888				timeBWID = 'timebw' + randomS, //播放进度可拖动按钮内框
889				timeTextID = 'timetext' + randomS, //时间文本框
890				playID = 'play' + randomS, //播放按钮
891				pauseID = 'pause' + randomS, //暂停按钮
892				frontID = 'front' + randomS, //前一集按钮
893				nextID = 'next' + randomS, //下一集按钮
894				fullID = 'full' + randomS, //全屏按钮
895				escFullID = 'escfull' + randomS, //退出全屏按钮
896				muteID = 'mute' + randomS, //静音按钮
897				downloadID = 'download' + randomS, //下载按钮
898				escMuteID = 'escmute' + randomS, //取消静音按钮
899				volumeID = 'volume' + randomS, //音量调节框容器
900				volumeDbgID = 'volumedbg' + randomS, //音量调节框容器背景
901				volumeBgID = 'volumebg' + randomS, //音量调节框背景层
902				volumeUpID = 'volumeup' + randomS, //音量调节框可变宽度层
903				volumeBOID = 'volumebo' + randomS, //音量调节按钮外框
904				volumeBWID = 'volumebw' + randomS, //音量调节按钮内框
905				definitionID = 'definition' + randomS, //清晰度容器
906				definitionPID = 'definitionp' + randomS, //清晰度列表容器
907				playbackRateID = 'playbackrate' + randomS, //清晰度容器
908				playbackRatePID = 'playbackratep' + randomS, //清晰度列表容器
909				promptBgID = 'promptbg' + randomS, //提示框背景
910				promptID = 'prompt' + randomS, //提示框
911				dlineID = 'dline' + randomS, //分隔线共用前缀
912				menuID = 'menu' + randomS, //右键容器
913				pauseCenterID = 'pausecenter' + randomS, //中间暂停按钮
914				loadingID = 'loading' + randomS, //缓冲
915				errorTextID = 'errortext' + randomS, //错误文本框
916				logoID = 'logo' + randomS; //logo
917			//构建一些PD(播放器容器)里使用的元素
918			var controlBarBg = document.createElement('div'),
919				controlBar = document.createElement('div'),
920				timeProgressBg = document.createElement('div'),
921				timeBoBg = document.createElement('div'),
922				pauseCenter = document.createElement('div'),
923				errorText = document.createElement('div'),
924				promptBg = document.createElement('div'),
925				prompt = document.createElement('div'),
926				menuDiv = document.createElement('div'),
927				definitionP = document.createElement('div'),
928				playbackrateP = document.createElement('div'),
929				loading = document.createElement('div'),
930				logo = document.createElement('div');
931
932			controlBarBg.className = controlBarBgID;
933			controlBar.className = controlBarID;
934			timeProgressBg.className = timeProgressBgID;
935			timeBoBg.className = timeBOBGID;
936			promptBg.className = promptBgID;
937			prompt.className = promptID;
938			menuDiv.className = menuID;
939			definitionP.className = definitionPID;
940			playbackrateP.className = playbackRatePID;
941			pauseCenter.className = pauseCenterID;
942			loading.className = loadingID;
943			logo.className = logoID;
944			errorText.className = errorTextID;
945
946			this.PD.appendChild(controlBarBg);
947			this.PD.appendChild(controlBar);
948			this.PD.appendChild(timeProgressBg);
949			this.PD.appendChild(timeBoBg);
950			this.PD.appendChild(promptBg);
951			this.PD.appendChild(prompt);
952			this.PD.appendChild(definitionP);
953			this.PD.appendChild(playbackrateP);
954			this.PD.appendChild(pauseCenter);
955
956			this.PD.appendChild(loading);
957			this.PD.appendChild(errorText);
958			this.PD.appendChild(logo);
959			this.body.appendChild(menuDiv);
960			//构建一些PD(播放器容器)里使用的元素结束
961
962			if(this.vars['live']) { //如果是直播,时间显示文本框里显示当前系统时间
963				timeInto = this.getNowDate();
964			}
965			//构建控制栏的内容
966			html += '<div class="' + playID + '" data-title="' + thisTemp.language['play'] + '">' + this.newCanvas(playID, bWidth, bHeight) + '</div>'; //播放按钮
967			html += '<div class="' + pauseID + '" data-title="' + thisTemp.language['pause'] + '">' + this.newCanvas(pauseID, bWidth, bHeight) + '</div>'; //暂停按钮
968			html += '<div class="' + dlineID + '-la"></div>'; //分隔线
969			html += '<div class="' + frontID + '" data-title="' + thisTemp.language['front'] + '">' + this.newCanvas(frontID, bWidth, bHeight) + '</div>'; //前一集按钮
970			html += '<div class="' + dlineID + '-lb"></div>'; //分隔线
971			html += '<div class="' + nextID + '" data-title="' + thisTemp.language['next'] + '">' + this.newCanvas(nextID, bWidth, bHeight) + '</div>'; //下一集按钮
972			html += '<div class="' + dlineID + '-lc"></div>'; //分隔线
973
974			html += '<div class="' + timeTextID + '">' + timeInto + '</div>';
974 //时间文本
975			html += '<div class="' + fullID + '" data-title="' + thisTemp.language['full'] + '">' + this.newCanvas(fullID, bWidth, bHeight) + '</div>'; //全屏按钮
976			html += '<div class="' + escFullID + '" data-title="' + thisTemp.language['escFull'] + '">' + this.newCanvas(escFullID, bWidth, bHeight) + '</div>'; //退出全屏按钮
977			html += '<div class="' + dlineID + '-ra"></div>'; //分隔线
978			html += '<div class="' + definitionID + '" data-title="' + thisTemp.language['definition'] + '"></div>'; //清晰度容器
979			html += '<div class="' + dlineID + '-rb"></div>'; //分隔线
980			html += '<div class="' + playbackRateID + '" data-title="' + thisTemp.language['playbackRate'] + '"></div>'; //倍速
981			html += '<div class="' + dlineID + '-rc"></div>'; //分隔线
982			html += '<div class="' + volumeID + '"><div class="' + volumeDbgID + '"><div class="' + volumeBgID + '"><div class="' + volumeUpID + '"></div></div><div class="' + volumeBOID + '"><div class="' + volumeBWID + '"></div></div></div></div>'; //音量调节框,音量调节按钮
983			html += '<div class="' + muteID + '" data-title="' + thisTemp.language['mute'] + '">' + this.newCanvas(muteID, bWidth, bHeight) + '</div>'; //静音按钮
984			html += '<div class="' + escMuteID + '" data-title="' + thisTemp.language['escMute'] + '">' + this.newCanvas(escMuteID, bWidth, bHeight) + '</div>'; //退出静音按钮
985			html += '<div class="' + dlineID + '-rd"></div>'; //分隔线
986			html += '<div class="' + downloadID + '" data-title="' + thisTemp.language['download'] + '">' + thisTemp.language['downloadText'] + '</div>'; //下载按钮
987			html += '<div class="' + dlineID + '-re"></div>'; //分隔线
988			this.getByElement(controlBarID).innerHTML = html;
989			//构建控制栏内容结束
990			//构建进度条内容
991			this.getByElement(timeProgressBgID).innerHTML = '<div class="' + loadProgressID + '"></div><div class="' + timeProgressID + '"></div>';
992			this.getByElement(timeBOBGID).innerHTML = '<div class="' + timeBOID + '"><div class="' + timeBWID + '"></div></div>';
993			//构建进度条内容结束
994			this.getByElement(pauseCenterID).innerHTML = this.newCanvas(pauseCenterID, 80, 80); //构建中间暂停按钮
995			this.getByElement(loadingID).innerHTML = this.newCanvas(loadingID, 60, 60); //构建中间缓冲时显示的图标
996			this.getByElement(errorTextID).innerHTML = this.language['error']; //构建错误时显示的文本框
997			if(this.ckplayerConfig['style']['logo']) {
998				if(this.ckplayerConfig['style']['logo']['file']) {
999					var logoFile = this.ckplayerConfig['style']['logo']['file'];
1000					if(logoFile.substr(0, 15) == 'data:image/png;' || logoFile.substr(0, 15) == 'data:image/jpg;' || logoFile.substr(0, 15) == 'data:image/jpeg;') {
1001						this.getByElement(logoID).innerHTML = '<img src="' + logoFile + '" border="0">'; //构建logo
1002					}
1003				}
1004			} else {
1005				this.getByElement(logoID).innerHTML = this.vars['logo'] || this.logo || ''; //构建logo
1006			}
1007			//CB:Object:全局变量,将一些全局需要用到的元素统一放在CB对象里
1008			var pd = this.PD;
1009			this.CB = {
1010				controlBarBg: this.getByElement(controlBarBgID, pd),
1011				controlBar: this.getByElement(controlBarID, pd),
1012				promptBg: this.getByElement(promptBgID, pd),
1013				prompt: this.getByElement(promptID, pd),
1014				timeProgressBg: this.getByElement(timeProgressBgID, pd),
1015				loadProgress: this.getByElement(loadProgressID, pd),
1016				timeProgress: this.getByElement(timeProgressID, pd),
1017				timeBoBg: this.getByElement(timeBOBGID, pd),
1018				timeButton: this.getByElement(timeBOID, pd),
1019				timeText: this.getByElement(timeTextID, pd),
1020				play: this.getByElement(playID, pd),
1021				front: this.getByElement(frontID, pd),
1022				next: this.getByElement(nextID, pd),
1023				pause: this.getByElement(pauseID, pd),
1024				definition: this.getByElement(definitionID, pd),
1025				definitionP: this.getByElement(definitionPID, pd),
1026				definitionLine: this.getByElement(dlineID + '-rb', pd),
1027				playbackrate: this.getByElement(playbackRateID, pd),
1028				playbackrateP: this.getByElement(playbackRatePID, pd),
1029				playbackrateLine: this.getByElement(dlineID + '-rc', pd),
1030				full: this.getByElement(fullID, pd),
1031				escFull: this.getByElement(escFullID, pd),
1032				mute: this.getByElement(muteID, pd),
1033				escMute: this.getByElement(escMuteID, pd),
1034				volume: this.getByElement(volumeID, pd),
1035				volumeBg: this.getByElement(volumeBgID, pd),
1036				volumeUp: this.getByElement(volumeUpID, pd),
1037				volumeBO: this.getByElement(volumeBOID, pd),
1038				pauseCenter: this.getByElement(pauseCenterID, pd),
1039				menu: this.getByElement(menuID),
1040				loading: this.getByElement(loadingID, pd),
1041				loadingCanvas: this.getByElement(loadingID + '-canvas', pd),
1042				errorText: this.getByElement(errorTextID, pd),
1043				logo: this.getByElement(logoID, pd),
1044				playLine: this.getByElement(dlineID + '-la', pd),
1045				frontLine: this.getByElement(dlineID + '-lb', pd),
1046				nextLine: this.getByElement(dlineID + '-lc', pd),
1047				fullLine: this.getByElement(dlineID + '-ra'),
1048				definitionLine: this.getByElement(dlineID + '-rb', pd),
1049				muteLine: this.getByElement(dlineID + '-rd', pd),
1050				download: this.getByElement(downloadID, pd),
1051				downloadLine: this.getByElement(dlineID + '-re', pd)
1052			};
1053			this.buttonWidth = {
1054				play: bWidth,
1055				full: bWidth,
1056				front: bWidth,
1057				next: bWidth,
1058				mute: bWidth
1059			};
1060			//定义界面元素的样式
1061			//控制栏背景
1062			this.css(controlBarBgID, {
1063				width: '100%',
1064				height: bHeight + 'px',
1065				backgroundColor: '#000000',
1066				position: 'absolute',
1067				bottom: '0px',
1068				filter: 'alpha(opacity:0.8)',
1069				opacity: '0.8',
1070				zIndex: '90'
1071			});
1072			//控制栏容器
1073			this.css(controlBarID, {
1074				width: '100%',
1075				height: bHeight + 'px',
1076				position: 'absolute',
1077				bottom: '0px',
1078				zIndex: '90'
1079			});
1080			//中间暂停按钮
1081			this.css(pauseCenterID, {
1082				width: '80px',
1083				height: '80px',
1084				borderRadius: '50%',
1085				position: 'absolute',
1086				display: 'none',
1087				cursor: 'pointer',
1088				zIndex: '100'
1089			});
1090			//loading
1091			this.css(loadingID, {
1092				width: '60px',
1093				height: '60px',
1094				position: 'absolute',
1095				display: 'none',
1096				zIndex: '100'
1097			});
1098			//出错文本框
1099			this.css(errorTextID, {
1100				width: '120px',
1101				height: '30px',
1102				lineHeight: '30px',
1103				color: '#FFFFFF',
1104				fontSize: '14px',
1105				textAlign: 'center',
1106				position: 'absolute',
1107				display: 'none',
1108				zIndex: '101',
1109				cursor: 'default',
1110				zIndex: '100'
1111			});
1112			//定义logo文字的样式
1113			this.css(logoID, {
1114				height: '30px',
1115				lineHeight: '30px',
1116				color: '#FFFFFF',
1117				fontFamily: 'Arial',
1118				fontSize: '28px',
1119				textAlign: 'center',
1120				position: 'absolute',
1121				float: 'left',
1122				left: '-1000px',
1123				top: '20px',
1124				zIndex: '100',
1125				filter: 'alpha(opacity:0.8)',
1126				opacity: '0.8',
1127				cursor: 'default'
1128			});
1129
1130			this.css(this.CB['loadingCanvas'], {
1131				transform: 'rotate(0deg)',
1132				msTransform: 'rotate(0deg)',
1133				mozTransform: 'rotate(0deg)',
1134				webkitTransform: 'rotate(0deg)',
1135				oTransform: 'rotate(0deg)'
1136			});
1137			//定义提示语的样式
1138			this.css([promptBgID, promptID], {
1139				height: '29px',
1140				lineHeight: '30px',
1141				color: '#FFFFFF',
1142				fontSize: '14px',
1143				textAlign: 'center',
1144				position: 'absolute',
1145				borderRadius: '5px',
1146				paddingLeft: '5px',
1147				paddingRight: '5px',
1148				bottom: '0px',
1149				display: 'none',
1150				zIndex: '95'
1151			});
1152			this.css(promptBgID, {
1153				backgroundColor: '#000000',
1154				filter: 'alpha(opacity:0.5)',
1155				opacity: '0.5'
1156			});
1157			//时间进度条背景容器
1158			this.css(timeProgressBgID, {
1159				width: '100%',
1160				height: '6px',
1161				backgroundColor: '#3F3F3F',
1162				overflow: 'hidden',
1163				position: 'absolute',
1164				bottom: '38px',
1165				zIndex: '88'
1166			});
1167			//加载进度和时间进度
1168			this.css([loadProgressID, timeProgressID], {
1169				width: '1px',
1170				height: '6px',
1171				position: 'absolute',
1172				bottom: '38px',
1173				top: '0px',
1174				zIndex: '91'
1175			});
1176			this.css(loadProgressID, 'backgroundColor', '#6F6F6F');
1177			this.css(timeProgressID, 'backgroundColor', bOverColor);
1178			//时间进度按钮
1179			this.css(timeBOBGID, {
1180				width: '100%',
1181				height: '14px',
1182				overflow: 'hidden',
1183				position: 'absolute',
1184				bottom: '34px',
1185				cursor: 'pointer',
1186				zIndex: '92'
1187			});
1188			this.css(timeBOID, {
1189				width: '14px',
1190				height: '14px',
1191				overflow: 'hidden',
1192				borderRadius: '50%',
1193				backgroundColor: bBgColor,
1194				cursor: 'pointer',
1195				position: 'absolute',
1196				top: '0px',
1197				zIndex: '20'
1198			});
1199			this.css(timeBWID, {
1200				width: '8px',
1201				height: '8px',
1202				overflow: 'hidden',
1203				borderRadius: '50%',
1204				position: 'absolute',
1205				backgroundColor: bOverColor,
1206				left: '3px',
1207				top: '3px'
1208			});
1209			this.css(timeTextID, {
1210				lineHeight: bHeight + 'px',
1211				color: '#FFFFFF',
1212				fontFamily: 'arial',
1213				fontSize: '16px',
1214				paddingLeft: '10px',
1215				float: 'left',
1216				overflow: 'hidden',
1217				cursor: 'default'
1218			});
1219			//分隔线
1220			this.css([dlineID + '-la', dlineID + '-lb', dlineID + '-lc', dlineID + '-ra', dlineID + '-rb', dlineID + '-rc', dlineID + '-rd', dlineID + '-rc', dlineID + '-re'], {
1221				width: '0px',
1222				height: bHeight + 'px',
1223				overflow: 'hidden',
1224				borderLeft: '1px solid #303030',
1225				borderRight: '1px solid #151515',
1226				filter: 'alpha(opacity:0.9)',
1227				opacity: '0.9'
1228			});
1229			this.css([dlineID + '-la', dlineID + '-lb', dlineID + '-lc'], 'float', 'left');
1230			this.css([dlineID + '-ra', dlineID + '-rb', dlineID + '-rc', dlineID + '-rd', dlineID + '-re'], 'float', 'right');
1231			this.css([dlineID + '-lb', dlineID + '-lc', dlineID + '-rb', dlineID + '-rc', dlineID + '-re'], 'display', 'none');
1232			//播放/暂停/上一集/下一集按钮
1233			this.css([playID, pauseID, frontID, nextID], {
1234				width: bWidth + 'px',
1235				height: bHeight + 'px',
1236				float: 'left',
1237				overflow: 'hidden',
1238				cursor: 'pointer'
1239			});
1240			this.css([frontID, nextID], 'display', 'none');
1241			//初始化判断播放/暂停按钮隐藏项
1242			this.initPlayPause();
1243
1244			//设置静音/取消静音的按钮样式
1245			this.css([muteID, escMuteID], {
1246				width: bWidth + 'px',
1247				height: bHeight + 'px',
1248				float: 'right',
1249				overflow: 'hidden',
1250				cursor: 'pointer'
1251			});
1252			if(this.vars['volume'] > 0) {
1253				this.css(escMuteID, 'display', 'none');
1254			} else {
1255				this.css(muteID, 'display', 'none');
1256			}
1257			//音量调节框
1258			this.css([volumeID, volumeDbgID], {
1259				width: '110px',
1260				height: bHeight + 'px',
1261				overflow: 'hidden',
1262				float: 'right'
1263			});
1264			this.css(volumeDbgID, {
1265				position: 'absolute'
1266			});
1267			this.css([volumeBgID, volumeUpID], {
1268				width: '100px',
1269				height: '6px',
1270				overflow: 'hidden',
1271				borderRadius: '5px',
1272				cursor: 'pointer'
1273			});
1274			this.css(volumeBgID, {
1275				position: 'absolute',
1276				top: '16px'
1277			});
1278			this.css(volumeBgID, 'backgroundColor', '#666666');
1279			this.css(volumeUpID, 'backgroundColor', bOverColor);
1280			this.buttonWidth['volume'] = 100;
1281			//音量调节按钮
1282			this.css(volumeBOID, {
1283				width: '12px',
1284				height: '12px',
1285				overflow: 'hidden',
1286				borderRadius: '50%',
1287				position: 'absolute',
1288				backgroundColor: bBgColor,
1289				top: '13px',
1290				left: '0px',
1291				cursor: 'pointer'
1292			});
1293			this.css(volumeBWID, {
1294				width: '6px',
1295				height: '6px',
1296				overflow: 'hidden',
1297				borderRadius: '50%',
1298				position: 'absolute',
1299				backgroundColor: bOverColor,
1300				left: '3px',
1301				top: '3px'
1302			});
1303			//清晰度容器
1304			this.css(definitionID, {
1305				lineHeight: bHeight + 'px',
1306				color: '#FFFFFF',
1307				float: 'right',
1308				fontSize: '14px',
1309				textAlign: 'center',
1310				overflow: 'hidden',
1311				display: 'none',
1312				cursor: 'pointer'
1313			});
1314			this.css(definitionPID, {
1315				lineHeight: (bHeight - 8) + 'px',
1316				color: '#FFFFFF',
1317				overflow: 'hidden',
1318				position: 'absolute',
1319				bottom: '4px',
1320				backgroundColor: '#000000',
1321				textAlign: 'center',
1322				zIndex: '95',
1323				cursor: 'pointer',
1324				display: 'none'
1325			});
1326			//倍速容器
1327			this.css(playbackRateID, {
1328				lineHeight: bHeight + 'px',
1329				color: '#FFFFFF',
1330				float: 'right',
1331				fontSize: '14px',
1332				textAlign: 'center',
1333				overflow: 'hidden',
1334				display: 'none',
1335				cursor: 'pointer'
1336			});
1337			//下载按钮容器
1338			this.css(downloadID, {
1339				lineHeight: bHeight + 'px',
1340				color: '#FFFFFF',
1341				float: 'right',
1342				fontSize: '14px',
1343				textAlign: 'center',
1344				overflow: 'hidden',
1345				width: '80px',
1346				cursor: 'pointer',
1347				display: 'none'
1348			});
1349			this.css(playbackRatePID, {
1350				lineHeight: (bHeight - 8) + 'px',
1351				color: '#FFFFFF',
1352				overflow: 'hidden',
1353				position: 'absolute',
1354				bottom: '4px',
1355				backgroundColor: '#000000',
1356				textAlign: 'center',
1357				zIndex: '95',
1358				cursor: 'pointer',
1359				display: 'none'
1360			});
1361			//设置全屏/退出全屏按钮样式
1362			this.css([fullID, escFullID], {
1363				width: bWidth + 'px',
1364				height: bHeight + 'px',
1365				float: 'right',
1366				overflow: 'hidden',
1367				cursor: 'pointer'
1368			});
1369			this.css(escFullID, 'display', 'none');
1370			//构建各按钮的形状
1371			//播放按钮
1372			var cPlay = this.getByElement(playID + '-canvas').getContext('2d');
1373			var cPlayFillRect = function() {
1374				thisTemp.canvasFill(cPlay, [
1375					[12, 10],
1376					[29, 19],
1377					[12, 28]
1378				]);
1379			};
1380			cPlay.fillStyle = bBgColor;
1381			cPlayFillRect();
1382			var cPlayOver = function(event) {
1383				cPlay.clearRect(0, 0, bWidth, bHeight);
1384				cPlay.fillStyle = bOverColor;
1385				cPlayFillRect();
1386			};
1387			var cPlayOut = function(event) {
1388				cPlay.clearRect(0, 0, bWidth, bHeight);
1389				cPlay.fillStyle = bBgColor;
1390				cPlayFillRect();
1391			};
1392
1393			this.addListenerInside('mouseover', cPlayOver, this.getByElement(playID + '-canvas'));
1394			this.addListenerInside('mouseout', cPlayOut, this.getByElement(playID + '-canvas'));
1395			//暂停按钮
1396			var cPause = this.getByElement(pauseID + '-canvas').getContext('2d');
1397			var cPauseFillRect = function() {
1398				thisTemp.canvasFillRect(cPause, [
1399					[10, 10, 5, 18],
1400					[22, 10, 5, 18]
1401				]);
1402			};
1403			cPause.fillStyle = bBgColor;
1404			cPauseFillRect();
1405			var cPauseOver = function(event) {
1406				cPause.clearRect(0, 0, bWidth, bHeight);
1407				cPause.fillStyle = bOverColor;
1408				cPauseFillRect();
1409			};
1410			var cPauseOut = function(event) {
1411				cPause.clearRect(0, 0, bWidth, bHeight);
1412				cPause.fillStyle = bBgColor;
1413				cPauseFillRect();
1414			};
1415			this.addListenerInside('mouseover', cPauseOver, this.getByElement(pauseID + '-canvas'));
1416			this.addListenerInside('mouseout', cPauseOut, this.getByElement(pauseID + '-canvas'));
1417			//前一集按钮
1418			var cFront = this.getByElement(frontID + '-canvas').getContext('2d');
1419			var cFrontFillRect = function() {
1420				thisTemp.canvasFill(cFront, [
1421					[16, 19],
1422					[30, 10],
1423					[30, 28]
1424				]);
1425				thisTemp.canvasFillRect(cFront, [
1426					[8, 10, 5, 18]
1427				]);
1428			};
1429			cFront.fillStyle = bBgColor;
1430			cFrontFillRect();
1431			var cFrontOver = function(event) {
1432				cFront.clearRect(0, 0, bWidth, bHeight);
1433				cFront.fillStyle = bOverColor;
1434				cFrontFillRect();
1435			};
1436			var cFrontOut = function(event) {
1437				cFront.clearRect(0, 0, bWidth, bHeight);
1438				cFront.fillStyle = bBgColor;
1439				cFrontFillRect();
1440			};
1441
1442			this.addListenerInside('mouseover', cFrontOver, this.getByElement(frontID + '-canvas'));
1443			this.addListenerInside('mouseout', cFrontOut, this.getByElement(frontID + '-canvas'));
1444			//下一集按钮
1445			var cNext = this.getByElement(nextID + '-canvas').getContext('2d');
1446			var cNextFillRect = function() {
1447				thisTemp.canvasFill(cNext, [
1448					[8, 10],
1449					[22, 19],
1450					[8, 28]
1451				]);
1452				thisTemp.canvasFillRect(cNext, [
1453					[25, 10, 5, 18]
1454				]);
1455			};
1456			cNext.fillStyle = bBgColor;
1457			cNextFillRect();
1458			var cNextOver = function(event) {
1459				cNext.clearRect(0, 0, bWidth, bHeight);
1460				cNext.fillStyle = bOverColor;
1461				cNextFillRect();
1462			};
1463			var cNextOut = function(event) {
1464				cNext.clearRect(0, 0, bWidth, bHeight);
1465				cNext.fillStyle = bBgColor;
1466				cNextFillRect();
1467			};
1468			this.addListenerInside('mouseover', cNextOver, this.getByElement(nextID + '-canvas'));
1469			this.addListenerInside('mouseout', cNextOut, this.getByElement(nextID + '-canvas'));
1470			//全屏按钮
1471			var cFull = this.getByElement(fullID + '-canvas').getContext('2d');
1472			var cFullFillRect = function() {
1473				thisTemp.canvasFillRect(cFull, [
1474					[19, 10, 9, 3],
1475					[25, 13, 3, 6],
1476					[10, 19, 3, 9],
1477					[13, 25, 6, 3]
1478				]);
1479			};
1480			cFull.fillStyle = bBgColor;
1481			cFullFillRect();
1482			var cFullOver = function() {
1483				cFull.clearRect(0, 0, bWidth, bHeight);
1484				cFull.fillStyle = bOverColor;
1485				cFullFillRect();
1486			};
1487			var cFullOut = function() {
1488				cFull.clearRect(0, 0, bWidth, bHeight);
1489				cFull.fillStyle = bBgColor;
1490				cFullFillRect();
1491			};
1492			this.addListenerInside('mouseover', cFullOver, this.getByElement(fullID + '-canvas'));
1493			this.addListenerInside('mouseout', cFullOut, this.getByElement(fullID + '-canvas'));
1494			//定义退出全屏按钮样式
1495			var cEscFull = this.getByElement(escFullID + '-canvas').getContext('2d');
1496			var cEscFullFillRect = function() {
1497				thisTemp.canvasFillRect(cEscFull, [
1498					[20, 9, 3, 9],
1499					[23, 15, 6, 3],
1500					[9, 20, 9, 3],
1501					[15, 23, 3, 6]
1502				]);
1503			};
1504			cEscFull.fillStyle = bBgColor;
1505			cEscFullFillRect();
1506
1507			var cEscFullOver = function() {
1508				cEscFull.clearRect(0, 0, bWidth, bHeight);
1509				cEscFull.fillStyle = bOverColor;
1510				cEscFullFillRect();
1511			};
1512			var cEscFullOut = function() {
1513				cEscFull.clearRect(0, 0, bWidth, bHeight);
1514				cEscFull.fillStyle = bBgColor;
1515				cEscFullFillRect();
1516			};
1517			this.addListenerInside('mouseover', cEscFullOver, this.getByElement(escFullID + '-canvas'));
1518			this.addListenerInside('mouseout', cEscFullOut, this.getByElement(escFullID + '-canvas'));
1519			//定义全屏按钮的样式
1520			var cMute = this.getByElement(muteID + '-canvas').getContext('2d');
1521			var cMuteFillRect = function() {
1522				thisTemp.canvasFill(cMute, [
1523					[10, 15],
1524					[15, 15],
1525					[21, 10],
1526					[21, 28],
1527					[15, 23],
1528					[10, 23]
1529				]);
1530				thisTemp.canvasFillRect(cMute, [
1531					[23, 15, 2, 8],
1532					[27, 10, 2, 18]
1533				]);
1534			};
1535			cMute.fillStyle = bBgColor;
1536			cMuteFillRect();
1537			var cMuteOver = function() {
1538				cMute.clearRect(0, 0, bWidth, bHeight);
1539				cMute.fillStyle = bOverColor;
1540				cMuteFillRect();
1541			};
1542			var cMuteOut = function() {
1543				cMute.clearRect(0, 0, bWidth, bHeight);
1544				cMute.fillStyle = bBgColor;
1545				cMuteFillRect();
1546			};
1547			this.addListenerInside('mouseover', cMuteOver, this.getByElement(muteID + '-canvas'));
1548			this.addListenerInside('mouseout', cMuteOut, this.getByElement(muteID + '-canvas'));
1549			//定义退出全屏按钮样式
1550			var cEscMute = this.getByElement(escMuteID + '-canvas').getContext('2d');
1551			var cEscMuteFillRect = function() {
1552				thisTemp.canvasFill(cEscMute, [
1553					[10, 15],
1554					[15, 15],
1555					[21, 10],
1556					[21, 28],
1557					[15, 23],
1558					[10, 23]
1559				]);
1560				thisTemp.canvasFill(cEscMute, [
1561					[23, 13],
1562					[24, 13],
1563					[33, 25],
1564					[32, 25]
1565				]);
1566				thisTemp.canvasFill(cEscMute, [
1567					[32, 13],
1568					[33, 13],
1569					[24, 25],
1570					[23, 25]
1571				]);
1572			};
1573			cEscMute.fillStyle = bBgColor;
1574			cEscMuteFillRect();
1575			var cEscMuteOver = function() {
1576				cEscMute.clearRect(0, 0, bWidth, bHeight);
1577				cEscMute.fillStyle = bOverColor;
1578				cEscMuteFillRect();
1579			};
1580			var cEscMuteOut = function() {
1581				cEscMute.clearRect(0, 0, bWidth, bHeight);
1582				cEscMute.fillStyle = bBgColor;
1583				cEscMuteFillRect();
1584			};
1585			this.addListenerInside('mouseover', cEscMuteOver, this.getByElement(escMuteID + '-canvas'));
1586			this.addListenerInside('mouseout', cEscMuteOut, this.getByElement(escMuteID + '-canvas'));
1587			//定义loading样式
1588			var cLoading = this.getByElement(loadingID + '-canvas').getContext('2d');
1589			var cLoadingFillRect = function() {
1590				cLoading.save();
1591				var grad = cLoading.createLinearGradient(0, 0, 60, 60);
1592				grad.addColorStop(0, bBgColor);
1593				var grad2 = cLoading.createLinearGradient(0, 0, 80, 60);
1594				grad2.addColorStop(1, bOverColor);
1595				var grad3 = cLoading.createLinearGradient(0, 0, 80, 60);
1596				grad3.addColorStop(1, '#FF9900');
1597				var grad4 = cLoading.createLinearGradient(0, 0, 80, 60);
1598				grad4.addColorStop(1, '#CC3300');
1599				cLoading.strokeStyle = grad; //设置描边样式
1600				cLoading.lineWidth = 8; //设置线宽
1601				cLoading.beginPath(); //路径开始
1602				cLoading.arc(30, 30, 25, 0, 0.4 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,
1602顺时针/逆时针)
1603				cLoading.stroke(); //绘制
1604				cLoading.closePath(); //路径结束
1605				cLoading.beginPath(); //路径开始
1606				cLoading.strokeStyle = grad2; //设置描边样式
1607				cLoading.arc(30, 30, 25, 0.5 * Math.PI, 0.9 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
1608				cLoading.stroke(); //绘制
1609				cLoading.beginPath(); //路径开始
1610				cLoading.strokeStyle = grad3; //设置描边样式
1611				cLoading.arc(30, 30, 25, Math.PI, 1.4 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
1612				cLoading.stroke(); //绘制
1613				cLoading.beginPath(); //路径开始
1614				cLoading.strokeStyle = grad4; //设置描边样式
1615				cLoading.arc(30, 30, 25, 1.5 * Math.PI, 1.9 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
1616				cLoading.stroke(); //绘制
1617				cLoading.closePath(); //路径结束
1618				cLoading.restore();
1619			};
1620			cLoading.fillStyle = bBgColor;
1621			cLoadingFillRect();
1622			//定义中间暂停按钮的样式
1623			var cPauseCenter = this.getByElement(pauseCenterID + '-canvas').getContext('2d');
1624			var cPauseCenterFillRect = function() {
1625				thisTemp.canvasFill(cPauseCenter, [
1626					[28, 22],
1627					[59, 38],
1628					[28, 58]
1629				]);
1630				/* 指定几个颜色 */
1631				cPauseCenter.save();
1632				cPauseCenter.lineWidth = 5; //设置线宽
1633				cPauseCenter.beginPath(); //路径开始
1634				cPauseCenter.arc(40, 40, 35, 0, 2 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
1635				cPauseCenter.stroke(); //绘制
1636				cPauseCenter.closePath(); //路径结束
1637				cPauseCenter.restore();
1638			};
1639			cPauseCenter.fillStyle = bBgColor;
1640			cPauseCenter.strokeStyle = bBgColor;
1641			cPauseCenterFillRect();
1642			var cPauseCenterOver = function() {
1643				cPauseCenter.clearRect(0, 0, 80, 80);
1644				cPauseCenter.fillStyle = bOverColor;
1645				cPauseCenter.strokeStyle = bOverColor;
1646				cPauseCenterFillRect();
1647			};
1648			var cPauseCenterOut = function() {
1649				cPauseCenter.clearRect(0, 0, 80, 80);
1650				cPauseCenter.fillStyle = bBgColor;
1651				cPauseCenter.strokeStyle = bBgColor;
1652				cPauseCenterFillRect();
1653			};
1654			this.addListenerInside('mouseover', cPauseCenterOver, this.getByElement(pauseCenterID + '-canvas'));
1655			this.addListenerInside('mouseout', cPauseCenterOut, this.getByElement(pauseCenterID + '-canvas'));
1656
1657			//鼠标经过/离开音量调节按钮
1658			var volumeBOOver = function() {
1659				thisTemp.css(volumeBOID, 'backgroundColor', bOverColor);
1660				thisTemp.css(volumeBWID, 'backgroundColor', bBgColor);
1661			};
1662			var volumeBOOut = function() {
1663				thisTemp.css(volumeBOID, 'backgroundColor', bBgColor);
1664				thisTemp.css(volumeBWID, 'backgroundColor', bOverColor);
1665			};
1666			this.addListenerInside('mouseover', volumeBOOver, this.getByElement(volumeBOID));
1667			this.addListenerInside('mouseout', volumeBOOut, this.getByElement(volumeBOID));
1668			//鼠标经过/离开进度按钮
1669			var timeBOOver = function() {
1670				thisTemp.css(timeBOID, 'backgroundColor', bOverColor);
1671				thisTemp.css(timeBWID, 'backgroundColor', bBgColor);
1672			};
1673			var timeBOOut = function() {
1674				thisTemp.css(timeBOID, 'backgroundColor', bBgColor);
1675				thisTemp.css(timeBWID, 'backgroundColor', bOverColor);
1676			};
1677			this.addListenerInside('mouseover', timeBOOver, this.getByElement(timeBOID));
1678			this.addListenerInside('mouseout', timeBOOut, this.getByElement(timeBOID));
1679
1680			this.addButtonEvent(); //注册按钮及音量调节,进度操作事件
1681			this.newMenu(); //单独设置右键的样式和事件
1682			this.controlBarHide(); //单独注册控制栏隐藏事件
1683			this.keypress(); //单独注册键盘事件
1684			//初始化音量调节框
1685			this.changeVolume(this.vars['volume']);
1686			//初始化判断是否需要显示上一集和下一集按钮
1687			this.showFrontNext();
1688			//初始化判断是否需要显示下载按钮
1689			this.showDownload();
1690			window.setTimeout(function() {
1691				thisTemp.elementCoordinate(); //调整中间暂停按钮/loading的位置/error的位置
1692			}, 100);
1693			this.checkBarWidth();
1694			var resize = function() {
1695				thisTemp.elementCoordinate();
1696				thisTemp.timeUpdateHandler();
1697				thisTemp.changeLoad();
1698				thisTemp.checkBarWidth();
1699				thisTemp.changeElementCoor(); //修改新加元件的坐标
1700				thisTemp.changePrompt();
1701			};
1702			this.addListenerInside('resize', resize, window);
1703		},
1704		/*
1705			内部函数
1706			创建按钮,使用canvas画布
1707		*/
1708		newCanvas: function(id, width, height) {
1709			return '<canvas class="' + id + '-canvas" width="' + width + '" height="' + height + '"></canvas>';
1710		},
1711		/*
1712			内部函数
1713			注册按钮,音量调节框,进度操作框事件
1714		*/
1715		addButtonEvent: function() {
1716			var thisTemp = this;
1717			//定义按钮的单击事件
1718			var playClick = function(event) {
1719				thisTemp.videoPlay();
1720				thisTemp.sendJS('clickEvent', 'actionScript->videoPlay');
1721			};
1722			this.addListenerInside('click', playClick, this.CB['play']);
1723			this.addListenerInside('click', playClick, this.CB['pauseCenter']);
1724			var pauseClick = function(event) {
1725				thisTemp.videoPause();
1726				thisTemp.sendJS('clickEvent', 'actionScript->videoPause');
1727			};
1728			this.addListenerInside('click', pauseClick, this.CB['pause']);
1729			var frontClick = function(event) {
1730				if(thisTemp.vars['front']) {
1731					eval(thisTemp.vars['front'] + '()');
1732					thisTemp.sendJS('clickEvent', 'actionScript->' + thisTemp.vars['front']);
1733				}
1734			};
1735			this.addListenerInside('click', frontClick, this.CB['front']);
1736			var nextClick = function(event) {
1737				if(thisTemp.vars['next']) {
1738					eval(thisTemp.vars['next'] + '()');
1739					thisTemp.sendJS('clickEvent', 'actionScript->' + thisTemp.vars['next']);
1740				}
1741			};
1742			this.addListenerInside('click', nextClick, this.CB['next']);
1743			var muteClick = function(event) {
1744				thisTemp.videoMute();
1745				thisTemp.sendJS('clickEvent', 'actionScript->videoMute');
1746			};
1747			this.addListenerInside('click', muteClick, this.CB['mute']);
1748			var escMuteClick = function(event) {
1749				thisTemp.videoEscMute();
1750				thisTemp.sendJS('clickEvent', 'actionScript->videoEscMute');
1751			};
1752			this.addListenerInside('click', escMuteClick, this.CB['escMute']);
1753			var fullClick = function(event) {
1754				thisTemp.fullScreen();
1755				thisTemp.sendJS('clickEvent', 'actionScript->fullScreen');
1756			};
1757			this.addListenerInside('click', fullClick, this.CB['full']);
1758			var escFullClick = function(event) {
1759				thisTemp.quitFullScreen();
1760				thisTemp.sendJS('clickEvent', 'actionScript->quitFullScreen');
1761			};
1762			this.addListenerInside('click', escFullClick, this.CB['escFull']);
1763			// 定义视频下载事件
1764			var downloadClick = function(event) {
1765				var videoUrl = thisTemp.vars.video;
1766				// 通过分割路径来获取文件名
1767				var urlParts = videoUrl.split('/');
1768				var fileName = urlParts[urlParts.length - 1];
1769
1770				// 创建一个 <a> 元素
1771				var downloadLink = document.createElement('a');
1772
1773				// 设置链接的 href 属性为视频地址
1774				downloadLink.href = videoUrl;
1775
1776				// 设置下载的文件名为从视频地址获取的文件名
1777				downloadLink.download = fileName;
1778
1779				// 触发点击事件来开始下载
1780				downloadLink.click();
1781			};
1782			this.addListenerInside('click', downloadClick, this.CB['download']);
1783			//定义各个按钮的鼠标经过/离开事件
1784			var promptHide = function(event) {
1785				thisTemp.promptShow(false);
1786			};
1787			var playOver = function(event) {
1788				thisTemp.promptShow(thisTemp.CB['play']);
1789			};
1790			this.addListenerInside('mouseover', playOver, this.CB['play']);
1791			this.addListenerInside('mouseout', promptHide, this.CB['play']);
1792			var pauseOver = function(event) {
1793				thisTemp.promptShow(thisTemp.CB['pause']);
1794			};
1795			this.addListenerInside('mouseover', pauseOver, this.CB['pause']);
1796			this.addListenerInside('mouseout', promptHide, this.CB['pause']);
1797			var frontOver = function(event) {
1798				thisTemp.promptShow(thisTemp.CB['front']);
1799			};
1800			this.addListenerInside('mouseover', frontOver, this.CB['front']);
1801			this.addListenerInside('mouseout', promptHide, this.CB['front']);
1802			var nextOver = function(event) {
1803				thisTemp.promptShow(thisTemp.CB['next']);
1804			};
1805			this.addListenerInside('mouseover', nextOver, this.CB['next']);
1806			this.addListenerInside('mouseout', promptHide, this.CB['next']);
1807			var muteOver = function(event) {
1808				thisTemp.promptShow(thisTemp.CB['mute']);
1809			};
1810			this.addListenerInside('mouseover', muteOver, this.CB['mute']);
1811			this.addListenerInside('mouseout', promptHide, this.CB['mute']);
1812			var escMuteOver = function(event) {
1813				thisTemp.promptShow(thisTemp.CB['escMute']);
1814			};
1815			this.addListenerInside('mouseover', escMuteOver, this.CB['escMute']);
1816			this.addListenerInside('mouseout', promptHide, this.CB['escMute']);
1817			var fullOver = function(event) {
1818				thisTemp.promptShow(thisTemp.CB['full']);
1819			};
1820			this.addListenerInside('mouseover', fullOver, this.CB['full']);
1821			this.addListenerInside('mouseout', promptHide, this.CB['full']);
1822			var escFullOver = function(event) {
1823				thisTemp.promptShow(thisTemp.CB['escFull']);
1824			};
1825			this.addListenerInside('mouseover', escFullOver, this.CB['escFull']);
1826			this.addListenerInside('mouseout', promptHide, this.CB['escFull']);
1827			var definitionOver = function(event) {
1828				thisTemp.promptShow(thisTemp.CB['definition']);
1829			};
1830			this.addListenerInside('mouseover', definitionOver, this.CB['definition']);
1831			this.addListenerInside('mouseout', promptHide, this.CB['definition']);
1832			var playbackrateOver = function(event) {
1833				thisTemp.promptShow(thisTemp.CB['playbackrate']);
1834			};
1835			this.addListenerInside('mouseover', playbackrateOver, this.CB['playbackrate']);
1836			this.addListenerInside('mouseout', promptHide, this.CB['playbackrate']);
1837			var downloadHide = function(event) {
1838				thisTemp.promptShow(false);
1839			};
1840			var downloadOver = function(event) {
1841				thisTemp.promptShow(thisTemp.CB['download']);
1842			};
1843			this.addListenerInside('mouseover', downloadOver, this.CB['download']);
1844			this.addListenerInside('mouseout', downloadHide, this.CB['download']);
1845			//定义音量和进度按钮的滑块事件
1846
1847			var volumePrompt = function(vol) {
1848				var volumeBOXY = thisTemp.getCoor(thisTemp.CB['volumeBO']);
1849				var promptObj = {
1850					title: thisTemp.language['volume'] + vol + '%',
1851					x: volumeBOXY['x'] + thisTemp.CB['volumeBO'].offsetWidth * 0.5,
1852					y: volumeBOXY['y']
1853				};
1854				thisTemp.promptShow(false, promptObj);
1855			};
1856			var volumeObj = {
1857				slider: this.CB['volumeBO'],
1858				follow: this.CB['volumeUp'],
1859				refer: this.CB['volumeBg'],
1860				grossValue: 'volume',
1861				pd: true,
1862				startFun: function(vol) {},
1863				monitorFun: function(vol) {
1864					thisTemp.changeVolume(vol * 0.01, false, false);
1865					volumePrompt(vol);
1866				},
1867				endFun: function(vol) {},
1868				overFun: function(vol) {
1869					volumePrompt(vol);
1870				}
1871			};
1872			this.slider(volumeObj);
1873			var volumeClickObj = {
1874				refer: this.CB['volumeBg'],
1875				grossValue: 'volume',
1876				fun: function(vol) {
1877					thisTemp.changeVolume(vol * 0.01, true, true);
1878				}
1879			};
1880			this.progressClick(volumeClickObj);
1881			this.timeButtonMouseDown(); //用单击的函数来判断是否需要建立控制栏监听
1882			//鼠标经过/离开音量调节框时的
1883			var volumeBgMove = function(event) {
1884				var volumeBgXY = thisTemp.getCoor(thisTemp.CB['volumeBg']);
1885				var eventX = thisTemp.client(event)['x'];
1886				var eventVolume = parseInt((eventX - volumeBgXY['x']) * 100 / thisTemp.CB['volumeBg'].offsetWidth);
1887				var buttonPromptObj = {
1888					title: thisTemp.language['volume'] + eventVolume + '%',
1889					x: eventX,
1890					y: volumeBgXY['y']
1891				};
1892				thisTemp.promptShow(false, buttonPromptObj);
1893			};
1894			this.addListenerInside('mousemove', volumeBgMove, this.CB['volumeBg']);
1895			this.addListenerInside('mouseout', promptHide, this.CB['volumeBg']);
1896			this.addListenerInside('mouseout', promptHide, this.CB['volumeBO']);
1897			//注册清晰度相关事件
1898			this.addDefListener();
1899			//注册倍速相关事件
1900			this.addPlaybackrate();
1901		},
1902		/*
1903			内部函数
1904			注册单击视频动作
1905		*/
1906		videoClick: function() {
1907			var thisTemp = this;
1908			var clearTimerClick = function() {
1909				if(thisTemp.timerClick != null) {
1910					if(thisTemp.timerClick.runing) {
1911						thisTemp.timerClick.stop();
1912					}
1913					thisTemp.timerClick = null;
1914				}
1915			};
1916			var timerClickFun = function() {
1917				clearTimerClick();
1918				thisTemp.isClick = false;
1919				thisTemp.playOrPause();
1920
1921			};
1922			clearTimerClick();
1923			if(this.isClick) {
1924				this.isClick = false;
1925				if(thisTemp.config['videoDbClick']) {
1926					if(!this.full) {
1927						thisTemp.fullScreen();
1928					} else {
1929						thisTemp.quitFullScreen();
1930					}
1931				}
1932
1933			} else {
1934				this.isClick = true;
1935				this.timerClick = new this.timer(300, timerClickFun, 1)
1936				//this.timerClick.start();
1937			}
1938
1939		},
1940		/*
1941			内部函数
1942			注册鼠标经过进度滑块的事件
1943		*/
1944		timeButtonMouseDown: function() {
1945			var thisTemp = this;
1946			var timePrompt = function(time) {
1947				if(isNaN(time)) {
1948					time = 0;
1949				}
1950				var timeButtonXY = thisTemp.getCoor(thisTemp.CB['timeButton']);
1951				var promptObj = {
1952					title: thisTemp.formatTime(time),
1953					x: timeButtonXY['x'] - thisTemp.pdCoor['x'] + thisTemp.CB['timeButton'].offsetWidth * 0.5,
1954					y: timeButtonXY['y'] - thisTemp.pdCoor['y']
1955				};
1956				thisTemp.promptShow(false, promptObj);
1957			};
1958			var timeObj = {
1959				slider: this.CB['timeButton'],
1960				follow: this.CB['timeProgress'],
1961				refer: this.CB['timeBoBg'],
1962				grossValue: 'time',
1963				pd: false,
1964				startFun: function(time) {
1965					thisTemp.isTimeButtonMove = false;
1966				},
1967				monitorFun: function(time) {},
1968				endFun: function(time) {
1969					if(thisTemp.V) {
1970						if(thisTemp.V.duration > 0) {
1971							thisTemp.needSeek = 0;
1972							thisTemp.videoSeek(parseInt(time));
1973						}
1974					}
1975				},
1976				overFun: function(time) {
1977					timePrompt(time);
1978				}
1979			};
1980			var timeClickObj = {
1981				refer: this.CB['timeBoBg'],
1982				grossValue: 'time',
1983				fun: function(time) {
1984					if(thisTemp.V) {
1985						if(thisTemp.V.duration > 0) {
1986							thisTemp.needSeek = 0;
1987							thisTemp.videoSeek(parseInt(time));
1988						}
1989					}
1990				}
1991			};
1992			var timeBoBgmousemove = function(event) {
1993				var timeBoBgXY = thisTemp.getCoor(thisTemp.CB['timeBoBg']);
1994				var eventX = thisTemp.client(event)['x'];
1995				var eventTime = parseInt((eventX - timeBoBgXY['x']) * thisTemp.V.duration / thisTemp.CB['timeBoBg'].offsetWidth);
1996				var buttonPromptObj = {
1997					title: thisTemp.formatTime(eventTime),
1998					x: eventX,
1999					y: timeBoBgXY['y']
2000				};
2001				thisTemp.promptShow(false, buttonPromptObj);
2002				var def = false;
2003				if(!thisTemp.isUndefined(thisTemp.CB['definitionP'])) {
2004					if(thisTemp.css(thisTemp.CB['definitionP'], 'display') != 'block') {
2005						def = true;
2006					}
2007				}
2008				if(thisTemp.vars['preview'] != null && def) {
2009					buttonPromptObj['time'] = eventTime;
2010					thisTemp.preview(buttonPromptObj);
2011				}
2012			};
2013			var promptHide = function(event) {
2014				thisTemp.promptShow(false);
2015				if(thisTemp.previewDiv != null) {
2016					thisTemp.css([thisTemp.previewDiv, thisTemp.previewTop], 'display', 'none');
2017				}
2018			};
2019			if(!this.vars['live']) { //如果不是直播
2020				this.isTimeButtonDown = true;
2021				this.addListenerInside('mousemove', timeBoBgmousemove, this.CB['timeBoBg']);
2022				this.addListenerInside('mouseout', promptHide, this.CB['timeBoBg']);
2023			} else {
2024				this.isTimeButtonDown = false;
2025				timeObj['removeListenerInside'] = true;
2026				timeClickObj['removeListenerInside'] = true;
2027			}
2028			this.slider(timeObj);
2029			this.progressClick(timeClickObj);
2030
2031		},
2032		/*
2033			内部函数
2034			注册调节框上单击事件,包含音量调节框和播放时度调节框
2035		*/
2036		progressClick: function(obj) {
2037			/*
2038				refer:参考对象
2039				fun:返回函数
2040				refer:参考元素,即背景
2041				grossValue:调用的参考值类型
2042				pd:
2043			*/
2044			//建立参考元素的mouseClick事件,用来做为鼠标在其上按下时触发的状态
2045			var thisTemp = this;
2046			var referMouseClick = function(event) {
2047				var referX = thisTemp.client(event)['x'] - thisTemp.getCoor(obj['refer'])['x'];
2048				var rWidth = obj['refer'].offsetWidth;
2049				var grossValue = 0;
2050				if(obj['grossValue'] == 'volume') {
2051					grossValue = 100;
2052				} else {
2053					if(thisTemp.V) {
2054						grossValue = thisTemp.V.duration;
2055					}
2056				}
2057				var nowZ = parseInt(referX * grossValue / rWidth);
2058				if(obj['fun']) {
2059					if(obj['grossValue'] === 'time') {
2060						var sliderXY = thisTemp.getCoor(thisTemp.CB['timeButton']);
2061						sliderLeft = sliderXY['x'];
2062						if(!thisTemp.checkSlideLeft(referX, sliderLeft, rWidth)) {
2063							return;
2064						}
2065						var bimeButtonWB = thisTemp.CB['timeButton'].offsetWidth * 0.5;
2066						thisTemp.css(thisTemp.CB['timeButton'], 'left', (referX - bimeButtonWB) + 'px');
2067						thisTemp.css(thisTemp.CB['timeProgress'], 'width', (referX) + 'px');
2068					}
2069					obj['fun'](nowZ);
2070				}
2071			};
2072			if(this.isUndefined(obj['removeListenerInside'])) {
2073				this.addListenerInside('click', referMouseClick, obj['refer']);
2074			} else {
2075				this.removeListenerInside('click', referMouseClick, obj['refer']);
2076			}
2077
2078		},
2079
2080		/*
2081			内部函数
2082			共用的注册滑块事件
2083		*/
2084		slider: function(obj) {
2085			/*
2086				obj={
2087					slider:滑块元素
2088					follow:跟随滑块的元素
2089					refer:参考元素,即背景
2090					grossValue:调用的参考值类型
2091					startFun:开始调用的元素
2092					monitorFun:监听函数
2093					endFun:结束调用的函数
2094					overFun:鼠标放上去后调用的函数
2095					pd:是否需要修正
2096				}
2097			*/
2098			var thisTemp = this;
2099			var clientX = 0,
2100				criterionWidth = 0,
2101				sliderLeft = 0,
2102				referLeft = 0;
2103			var value = 0;
2104			var calculation = function() { //根据滑块的left计算百分比
2105				var sLeft = parseInt(thisTemp.css(obj['slider'], 'left'));
2106				var rWidth = obj['refer'].offsetWidth - obj['slider'].offsetWidth;
2107				var grossValue = 0;
2108				if(thisTemp.isUndefined(sLeft) || isNaN(sLeft)) {
2109					sLeft = 0;
2110				}
2111				if(obj['grossValue'] == 'volume') {
2112					grossValue = 100;
2113				} else {
2114					if(thisTemp.V) {
2115						grossValue = thisTemp.V.duration;
2116					}
2117				}
2118				return parseInt(sLeft * grossValue / rWidth);
2119			};
2120			var mDown = function(event) {
2121				thisTemp.addListenerInside('mousemove', mMove, document);
2122				thisTemp.addListenerInside('mouseup', mUp, document);
2123				var referXY = thisTemp.getCoor(obj['refer']);
2124				var sliderXY = thisTemp.getCoor(obj['slider']);
2125				clientX = thisTemp.client(event)['x'];
2126				referLeft = referXY['x'];
2127				sliderLeft = sliderXY['x'];
2128				criterionWidth = clientX - sliderLeft;
2129				if(obj['startFun']) {
2130					obj['startFun'](calculation());
2131				}
2132			};
2133			var mMove = function(event) {
2134				clientX = thisTemp.client(event)['x'];
2135				var newX = clientX - criterionWidth - referLeft;
2136				if(newX < 0) {
2137					newX = 0;
2138				}
2139				if(newX > obj['refer'].offsetWidth - obj['slider'].offsetWidth) {
2140					newX = obj['refer'].offsetWidth - obj['slider'].offsetWidth;
2141				}
2142				if(obj['slider'] === thisTemp.CB['timeButton']) {
2143					if(!thisTemp.checkSlideLeft(newX, sliderLeft, obj['refer'].offsetWidth)) {
2144						return;
2145					}
2146				}
2147				thisTemp.css(obj['slider'], 'left', newX + 'px');
2148				thisTemp.css(obj['follow'], 'width', (newX + obj['slider'].offsetWidth * 0.5) + 'px');
2149				var nowZ = calculation();
2150				if(obj['monitorFun']) {
2151					obj['monitorFun'](nowZ);
2152				}
2153			};
2154			var mUp = function(event) {
2155				thisTemp.removeListenerInside('mousemove', mMove, document);
2156				thisTemp.removeListenerInside('mouseup', mUp, document);
2157				if(obj['endFun']) {
2158					obj['endFun'](calculation());
2159				}
2160			};
2161			var mOver = function(event) {
2162				if(obj['overFun']) {
2163					obj['overFun'](calculation());
2164				}
2165
2166			};
2167			if(this.isUndefined(obj['removeListenerInside'])) {
2168				this.addListenerInside('mousedown', mDown, obj['slider']);
2169				this.addListenerInside('mouseover', mOver, obj['slider']);
2170			} else {
2171				this.removeListenerInside('mousedown', mDown, obj['slider']);
2172				this.removeListenerInside('mouseover', mOver, obj['slider']);
2173			}
2174		},
2175		/*
2176			内部函数
2177			判断是否可以拖动进度按钮或点击进度栏
2178		*/
2179		checkSlideLeft: function(newX, sliderLeft, refer) {
2180			var timeSA = this.ckplayerConfig['config']['timeScheduleAdjust'];
2181			switch(timeSA) {
2182				case 0:
2183					return false;
2184					break;
2185				case 2:
2186					if(newX < sliderLeft) {
2187						return false;
2188					}
2189					break;
2190				case 3:
2191					if(newX > sliderLeft) {
2192						return false;
2193					}
2194					break;
2195				case 4:
2196					if(!this.timeSliderLeftTemp) {
2197						this.timeSliderLeftTemp = sliderLeft / refer;
2198					}
2199					if(newX < this.timeSliderLeftTemp * refer) {
2200						return false;
2201					}
2202					break;
2203				case 5:
2204					if(!this.timeSliderLeftTemp) {
2205						this.timeSliderLeftTemp = sliderLeft / refer;
2206					} else {
2207						var timeSliderMax = sliderLeft / refer;
2208						if(timeSliderMax > this.timeSliderLeftTemp) {
2209							this.timeSliderLeftTemp = timeSliderMax;
2210						}
2211					}
2212					if(newX > this.timeSliderLeftTemp * refer) {
2213						return false;
2214					}
2215					break;
2216				default:
2217					return true;
2218					break;
2219			}
2220			return true;
2221		},
2222		/*
2223			内部函数
2224			显示loading
2225		*/
2226		loadingStart: function(rot) {
2227			var thisTemp = this;
2228			if(this.isUndefined(rot)) {
2229				rot = true;
2230			}
2231			if(this.showFace) {
2232				this.css(thisTemp.CB['loading'], 'display', 'none');
2233			}
2234			if(this.timerLoading != null) {
2235				if(this.timerLoading.runing) {
2236					this.timerLoading.stop();
2237				}
2238				this.timerLoading = null;
2239			}
2240			var buffer = 0;
2241			var loadingFun = function() {
2242				var nowRotate = '0';
2243				try {
2244					nowRotate = thisTemp.css(thisTemp.CB['loadingCanvas'], 'transform') || thisTemp.css(thisTemp.CB['loadingCanvas'], '-ms-transform') || thisTemp.css(thisTemp.CB['loadingCanvas'], '-moz-transform') || thisTemp.css(thisTemp.CB['loadingCanvas'], '-webkit-transform') || thisTemp.css(thisTemp.CB['loadingCanvas'], '-o-transform') || '0';
2245				} catch(event) {}
2246				nowRotate = parseInt(nowRotate.replace('rotate(', '').replace('deg);', ''));
2247				nowRotate += 4;
2248				if(nowRotate > 360) {
2249					nowRotate = 0;
2250				}
2251				if(thisTemp.showFace) {
2252					thisTemp.css(thisTemp.CB['loadingCanvas'], {
2253						transform: 'rotate(' + nowRotate + 'deg)',
2254						msTransform: 'rotate(' + nowRotate + 'deg)',
2255						mozTransform: 'rotate(' + nowRotate + 'deg)',
2256						webkitTransform: 'rotate(' + nowRotate + 'deg)',
2257						oTransform: 'rotate(' + nowRotate + 'deg)'
2258					});
2259				}
2260				buffer++;
2261				if(buffer >= 99) {
2262					buffer = 99;
2263				}
2264				thisTemp.sendJS('buffer', buffer);
2265			};
2266			if(rot) {
2267				this.timerLoading = new this.timer(10, loadingFun);
2268				//this.timerLoading.start();
2269				if(this.showFace) {
2270					this.css(thisTemp.CB['loading'], 'display', 'block');
2271				}
2272			} else {
2273				thisTemp.sendJS('buffer', 100);
2274			}
2275		},
2276		/*
2277			内部函数
2278			判断是否需要显示上一集和下一集
2279		*/
2280		showFrontNext: function() {
2281			if(!this.showFace) {
2282				return;
2283			}
2284			if(this.vars['front']) {
2285				this.css([this.CB['front'], this.CB['frontLine']], 'display', 'block');
2286			} else {
2287				this.css([this.CB['front'], this.CB['frontLine']], 'display', 'none');
2288			}
2289			if(this.vars['next']) {
2290				this.css([this.CB['next'], this.CB['nextLine']], 'display', 'block');
2291			} else {
2292				this.css([this.CB['next'], this.CB['nextLine']], 'display', 'none');
2293			}
2294		},
2295		/*
2296			内部函数
2297			判断是否显示下载按钮
2298		*/
2299		showDownload: function() {
2300			if(this.vars.download) {
2301				this.css([this.CB['download'], this.CB['downloadLine']], 'display', 'block');
2302			}
2303		},
2304		/*
2305			内部函数
2306			显示提示语
2307		*/
2308		promptShow: function(ele, data) {
2309			if(!this.showFace) {
2310				return;
2311			}
2312			var obj = {};
2313			if(ele || data) {
2314				if(!this.isUndefined(data)) {
2315					obj = data;
2316				} else {
2317					var offsetCoor = this.getCoor(ele);
2318					obj = {
2319						title: this.getDataset(ele, 'title'),
2320						x: offsetCoor['x'] + ele.offsetWidth * 0.5,
2321						y: offsetCoor['y']
2322					};
2323				}
2324				this.CB['prompt'].innerHTML = obj['title'];
2325				this.css(this.CB['prompt'], 'display', 'block');
2326				var promoptWidth = this.getStringLen(obj['title']) * 10;
2327				this.css(this.CB['promptBg'], 'width', promoptWidth + 'px');
2328				this.css(this.CB['prompt'], 'width', promoptWidth + 'px');
2329				promoptWidth += 10;
2330				var x = obj['x'] - (promoptWidth * 0.5);
2331				var y = this.PD.offsetHeight - obj['y'] + 8;
2332				if(x < 0) {
2333					x = 0;
2334				}
2335				if(x > this.PD.offsetWidth - promoptWidth) {
2336					x = this.PD.offsetWidth - promoptWidth;
2337				}
2338				this.css([this.CB['promptBg'], this.CB['prompt']], {
2339					display: 'block',
2340					left: x + 'px',
2341					bottom: y + 'px'
2342				});
2343			} else {
2344				this.css([this.CB['promptBg'], this.CB['prompt']], {
2345					display: 'none'
2346				});
2347			}
2348		},
2349		/*
2350			内部函数
2351			监听错误
2352		*/
2353		timerErrorFun: function() {
2354			var thisTemp = this;
2355			this.errorSend = false;
2356			var clearIntervalError = function(event) {
2357				if(thisTemp.timerError != null) {
2358					if(thisTemp.timerError.runing) {
2359						thisTemp.timerError.stop();
2360					}
2361					thisTemp.timerError = null;
2362				}
2363			};
2364			var errorFun = function(event) {
2365				clearIntervalError();
2366				thisTemp.error = true;
2367				//提取错误播放地址
2368				thisTemp.errorUrl = thisTemp.getVideoUrl();
2369				//提取错误播放地址结束
2370				if(!thisTemp.errorSend) {
2371					thisTemp.errorSend = true;
2372					thisTemp.sendJS('error');
2373				}
2374				if(thisTemp.showFace) {
2375					thisTemp.css(thisTemp.CB['errorText'], 'display', 'block');
2376					thisTemp.css(thisTemp.CB['pauseCenter'], 'display', 'none');
2377					thisTemp.css(thisTemp.CB['loading'], 'display', 'none');
2378				}
2379				thisTemp.V.removeAttribute('poster');
2380				thisTemp.resetPlayer();
2381			};
2382			var errorListenerFun = function(event) {
2383				window.setTimeout(function() {
2384					if(isNaN(thisTemp.V.duration)) {
2385						errorFun(event);
2386					}
2387				}, 500);
2388
2389			};
2390			if(!this.errorAdd) {
2391				this.errorAdd = true;
2392				this.addListenerInside('error', errorListenerFun, this.V);
2393			}
2394			clearIntervalError();
2395			var timerErrorFun = function() {
2396				if(thisTemp.V && parseInt(thisTemp.V.networkState) == 3) {
2397					errorFun();
2398				}
2399			};
2400			this.timerError = new this.timer(this.config['errorTime'], timerErrorFun);
2401			//this.timerError.start();
2402		},
2403		/*
2404			内部函数
2405			构建判断全屏还是非全屏的判断
2406		*/
2407		judgeFullScreen: function() {
2408			var thisTemp = this;
2409			if(this.timerFull != null) {
2410				if(this.timerFull.runing) {
2411					this.timerFull.stop();
2412				}
2413				this.timerFull = null;
2414			}
2415			var fullFun = function() {
2416				thisTemp.isFullScreen();
2417			};
2418			this.timerFull = new this.timer(20, fullFun);
2419		},
2420		/*
2421			内部函数
2422			判断是否是全屏
2423		*/
2424		isFullScreen: function() {
2425			if(!this.showFace) {
2426				return;
2427			}
2428			var fullState = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement;
2429			if(fullState && !this.full) {
2430				this.full = true;
2431				this.sendJS('full', true);
2432				this.elementCoordinate();
2433				this.css(this.CB['full'], 'display', 'none');
2434				this.css(this.CB['escFull'], 'display', 'block');
2435				if(this.vars['live'] == 0) {
2436					this.timeUpdateHandler();
2437				}
2438				this.PD.appendChild(this.CB['menu']);
2439			}
2440			if(!fullState && this.full) {
2441				this.full = false;
2442				this.sendJS('full', false);
2443				this.elementCoordinate();
2444				this.css(this.CB['full'], 'display', 'block');
2445				this.css(this.CB['escFull'], 'display', 'none');
2446				if(this.timerFull != null) {
2447					if(this.timerFull.runing) {
2448						this.timerFull.stop();
2449					}
2450					this.timerFull = null;
2451				}
2452				if(this.vars['live'] == 0) {
2453					this.timeUpdateHandler();
2454				}
2455				this.body.appendChild(this.CB['menu']);
2456			}
2457		},
2458		/*
2459			内部函数
2460			构建右键内容及注册相关动作事件
2461		*/
2462		newMenu: function() {
2463			var thisTemp = this;
2464			var i = 0;
2465			this.css(this.CB['menu'], {
2466				backgroundColor: '#FFFFFF',
2467				padding: '5px',
2468				position: 'absolute',
2469				left: '10px',
2470				top: '20px',
2471				display: 'none',
2472				zIndex: '999',
2473				color: '#A1A9BE',
2474				boxShadow: '2px 2px 3px #AAAAAA'
2475			});
2476			var mArr = this.contextMenu;
2477			var cMenu = this.ckplayerConfig['menu'];
2478			if(cMenu['name']) {
2479				if(cMenu['link']) {
2480					mArr[0] = [cMenu['name'], 'link', cMenu['link']];
2481				} else {
2482					mArr[0] = [cMenu['name'], 'default'];
2483				}
2484			}
2485			if(cMenu['version']) {
2486				mArr[1] = [cMenu['version'], 'default', 'line'];
2487			}
2488			if(cMenu['more']) {
2489				if(typeof(cMenu['more']) == 'object') {
2490					if(cMenu['more'].length > 0) {
2491						var moreArr = cMenu['more'];
2492						for(i = 0; i < moreArr.length; i++) {
2493							var mTemp = moreArr[i];
2494							var arrTemp = [];
2495							if(mTemp['name']) {
2496								arrTemp.push(mTemp['name']);
2497							}
2498							if(mTemp['clickEvent'] && mTemp['clickEvent'] != 'none') {
2499								var eveObj = this.clickEvent(mTemp['clickEvent']);
2500								arrTemp.push(eveObj['type']);
2501								if(eveObj['fun']) {
2502									arrTemp.push(eveObj['fun']);
2503								}
2504								if(eveObj['link']) {
2505									arrTemp.push(eveObj['link']);
2506								}
2507								if(eveObj['target']) {
2508									arrTemp.push(' target="' + eveObj['target'] + '"');
2509								}
2510							}
2511							if(mTemp['separatorBefore']) {
2512								arrTemp.push('line');
2513							}
2514							mArr.push(arrTemp);
2515						}
2516					}
2517				}
2518			}
2519			var html = '';
2520			for(i = 0; i < mArr.length; i++) {
2521				var me = mArr[i];
2522				switch(me[1]) {
2523					case 'default':
2524						html += '<p>' + me[0] + '</p>';
2525						break;
2526					case 'link':
2527						html += '<p><a href="' + me[2] + '"' + me[3] + '>
2527' + me[0] + '</a></p>';
2528						break;
2529					case 'javaScript':
2530						html += '<p><a href="javascript:' + me[2] + '">' + me[0] + '</a></p>';
2531						break;
2532					case 'actionScript':
2533						html += '<p><a href="javascript:' + this.vars['variable'] + me[2].replace('thisTemp', '') + '">' + me[0] + '</a></p>';
2534						break;
2535					default:
2536						break;
2537				}
2538			}
2539			this.CB['menu'].innerHTML = html;
2540			var pArr = this.CB['menu'].childNodes;
2541			for(i = 0; i < pArr.length; i++) {
2542				this.css(pArr[i], {
2543					height: '30px',
2544					lineHeight: '30px',
2545					margin: '0px',
2546					fontFamily: this.fontFamily,
2547					fontSize: '12px',
2548					paddingLeft: '10px',
2549					paddingRight: '30px'
2550				});
2551				if(mArr[i][mArr[i].length - 1] == 'line') {
2552					this.css(pArr[i], 'borderBottom', '1px solid #e9e9e9');
2553				}
2554				var aArr = pArr[i].childNodes;
2555				for(var n = 0; n < aArr.length; n++) {
2556					if(aArr[n].localName == 'a') {
2557						this.css(aArr[n], {
2558							color: '#000000',
2559							textDecoration: 'none'
2560						});
2561					}
2562				}
2563			}
2564			this.PD.oncontextmenu = function(event) {
2565				var eve = event || window.event;
2566				var client = thisTemp.client(event);
2567				if(eve.button == 2) {
2568					eve.returnvalue = false;
2569					var x = client['x'] + thisTemp.pdCoor['x'] - 2;
2570					var y = client['y'] + thisTemp.pdCoor['y'] - 2;
2571					thisTemp.css(thisTemp.CB['menu'], {
2572						display: 'block',
2573						left: x + 'px',
2574						top: y + 'px'
2575					});
2576					return false;
2577				}
2578				return true;
2579			};
2580			var setTimeOutPClose = function() {
2581				if(setTimeOutP) {
2582					window.clearTimeout(setTimeOutP);
2583					setTimeOutP = null;
2584				}
2585			};
2586			var setTimeOutP = null;
2587			var mouseOut = function(event) {
2588				setTimeOutPClose();
2589				setTimeOutP = window.setTimeout(function(event) {
2590					thisTemp.css(thisTemp.CB['menu'], 'display', 'none');
2591				}, 500);
2592			};
2593			this.addListenerInside('mouseout', mouseOut, thisTemp.CB['menu']);
2594			var mouseOver = function(event) {
2595				setTimeOutPClose();
2596			};
2597			this.addListenerInside('mouseover', mouseOver, thisTemp.CB['menu']);
2598
2599		},
2600		/*
2601			内部函数
2602			构建控制栏隐藏事件
2603		*/
2604		controlBarHide: function(hide) {
2605			var thisTemp = this;
2606			var client = {
2607					x: 0,
2608					y: 0
2609				},
2610				oldClient = {
2611					x: 0,
2612					y: 0
2613				};
2614			var cShow = true,
2615				force = false;
2616			var oldCoor = [0, 0];
2617			var controlBarShow = function(show) {
2618				if(show && !cShow && thisTemp.controlBarIsShow) {
2619					cShow = true;
2620					thisTemp.sendJS('controlBar', true);
2621					thisTemp.css(thisTemp.CB['controlBarBg'], 'display', 'block');
2622					thisTemp.css(thisTemp.CB['controlBar'], 'display', 'block');
2623					thisTemp.css(thisTemp.CB['timeProgressBg'], 'display', 'block');
2624					thisTemp.css(thisTemp.CB['timeBoBg'], 'display', 'block');
2625					thisTemp.changeVolume(thisTemp.volume);
2626					thisTemp.changeLoad();
2627					if(!thisTemp.timerBuffer) {
2628						thisTemp.bufferEdHandler();
2629					}
2630				} else {
2631					if(cShow) {
2632						cShow = false;
2633						var paused = thisTemp.getMetaDate()['paused'];
2634						if(force) {
2635							paused = false;
2636						}
2637						if(!paused) {
2638							thisTemp.sendJS('controlBar', false);
2639							thisTemp.css(thisTemp.CB['controlBarBg'], 'display', 'none');
2640							thisTemp.css(thisTemp.CB['controlBar'], 'display', 'none');
2641							thisTemp.css(thisTemp.CB['timeProgressBg'], 'display', 'none');
2642							thisTemp.css(thisTemp.CB['timeBoBg'], 'display', 'none');
2643							thisTemp.promptShow(false);
2644
2645						}
2646					}
2647				}
2648			};
2649			var cbarFun = function(event) {
2650				if(client['x'] == oldClient['x'] && client['y'] == oldClient['y']) {
2651					var cdH = parseInt(thisTemp.CD.offsetHeight);
2652					if((client['y'] < cdH - 50 || client['y'] > cdH - 2) && cShow) {
2653						controlBarShow(false);
2654					}
2655				} else {
2656					if(!cShow) {
2657						controlBarShow(true);
2658					}
2659				}
2660				oldClient = {
2661					x: client['x'],
2662					y: client['y']
2663				}
2664			};
2665			this.timerCBar = new this.timer(2000, cbarFun);
2666			var cdMove = function(event) {
2667				var getClient = thisTemp.client(event);
2668				client['x'] = getClient['x'];
2669				client['y'] = getClient['y'];
2670				if(!cShow) {
2671					controlBarShow(true);
2672				}
2673			};
2674			this.addListenerInside('mousemove', cdMove, thisTemp.CD);
2675			this.addListenerInside('ended', cdMove);
2676			this.addListenerInside('resize', cdMove, window);
2677			if(hide === true) {
2678				cShow = true;
2679				force = true;
2680				controlBarShow(false);
2681			}
2682			if(hide === false) {
2683				cShow = false;
2684				force = true;
2685				controlBarShow(true);
2686			}
2687		},
2688
2689		/*
2690			内部函数
2691			注册键盘按键事件
2692		*/
2693		keypress: function() {
2694            var thisTemp = this;
2695			var keyDown = function(eve) {
2696                var keycode = eve.keyCode || eve.which;
2697				switch(keycode) {
2698                    case 32:
2699						thisTemp.playOrPause();
2700						break;
2701					case 37:
2702						thisTemp.fastBack();
2703						break;
2704					case 39:
2705						thisTemp.fastNext();
2706						break;
2707					case 38:
2708						now = thisTemp.volume + thisTemp.ckplayerConfig['config']['volumeJump'];
2709						thisTemp.changeVolume(now > 1 ? 1 : now);
2710						break;
2711					case 40:
2712						now = thisTemp.volume - thisTemp.ckplayerConfig['config']['volumeJump'];
2713						thisTemp.changeVolume(now < 0 ? 0 : now);
2714						break;
2715					default:
2716						break;
2717				}
2718            };
2719
2720            for (var i = 0; i < arrKeydownEventListener.length; i++) {
2721                this.removeListenerInside('keydown', arrKeydownEventListener[i], window || document)
2722            }
2723            this.addListenerInside('keydown', keyDown, window || document);
2724            arrKeydownEventListener.push(keyDown);
2725		},
2726		/*
2727			内部函数
2728			注册倍速相关
2729		*/
2730		playbackRate: function() {
2731			if(!this.showFace) {
2732				return;
2733			}
2734			var thisTemp = this;
2735			var vArr = this.playbackRateArr;
2736			var html = '';
2737			var nowD = ''; //当前的清晰度
2738			var i = 0;
2739			if(!nowD) {
2740				nowD = vArr[this.playbackRateDefault][1];
2741			}
2742			if(vArr.length > 1) {
2743				var zlen = 0;
2744				for(i = 0; i < vArr.length; i++) {
2745					html = '<p>' + vArr[i][1] + '</p>' + html;
2746					var dlen = this.getStringLen(vArr[i][1]);
2747					if(dlen > zlen) {
2748						zlen = dlen;
2749					}
2750				}
2751				if(html) {
2752					html += '<p>' + nowD + '</p>';
2753				}
2754				this.CB['playbackrate'].innerHTML = nowD;
2755				this.CB['playbackrateP'].innerHTML = html;
2756				this.css([this.CB['playbackrate'], this.CB['playbackrateLine']], 'display', 'block');
2757				var pArr = this.CB['playbackrateP'].childNodes;
2758				for(var i = 0; i < pArr.length; i++) {
2759					var fontColor = '#FFFFFF';
2760					if(pArr[i].innerHTML == nowD) {
2761						fontColor = '#0782F5';
2762					}
2763					this.css(pArr[i], {
2764						color: fontColor,
2765						margin: '0px',
2766						padding: '0px',
2767						fontSize: '14px'
2768					});
2769					if(i < pArr.length - 1) {
2770						this.css(pArr[i], 'borderBottom', '1px solid #282828')
2771					}
2772					var defClick = function(event) {
2773						if(nowD != this.innerHTML) {
2774							thisTemp.css(thisTemp.CB['playbackrateP'], 'display', 'none');
2775							thisTemp.newPlaybackrate(this.innerHTML);
2776							thisTemp.sendJS('clickEvent', 'actionScript->newPlaybackrate');
2777						}
2778					};
2779					this.addListenerInside('click', defClick, pArr[i]);
2780
2781				}
2782				var pW = (zlen * 10) + 20;
2783				this.css(this.CB['playbackrateP'], {
2784					width: pW + 'px'
2785				});
2786				this.css(this.CB['playbackrate'], {
2787					width: pW + 'px'
2788				});
2789				this.buttonWidth['playbackrate'] = this.CB['playbackrate'].offsetWidth;
2790			} else {
2791				this.CB['playbackrate'].innerHTML = '';
2792				this.CB['playbackrateP'].innerHTML = '';
2793				this.css([this.CB['playbackrate'], this.CB['playbackrateLine']], 'display', 'none');
2794			}
2795		},
2796		/*
2797			内部函数
2798			注册切换倍速播放相关事件
2799		*/
2800		addPlaybackrate: function() {
2801			var thisTemp = this;
2802			var setTimeOutP = null;
2803			var defClick = function(event) {
2804				thisTemp.css(thisTemp.CB['playbackrateP'], {
2805					left: thisTemp.getCoor(thisTemp.CB['playbackrate'])['x'] + 'px',
2806					display: 'block'
2807				});
2808			};
2809			this.addListenerInside('click', defClick, this.CB['playbackrate']);
2810			var defMouseOut = function(event) {
2811				if(setTimeOutP) {
2812					window.clearTimeout(setTimeOutP);
2813					setTimeOutP = null;
2814				}
2815				setTimeOutP = window.setTimeout(function(event) {
2816					thisTemp.css(thisTemp.CB['playbackrateP'], 'display', 'none');
2817				}, 500);
2818			};
2819			this.addListenerInside('mouseout', defMouseOut, thisTemp.CB['playbackrateP']);
2820			var defMouseOver = function(event) {
2821				if(setTimeOutP) {
2822					window.clearTimeout(setTimeOutP);
2823					setTimeOutP = null;
2824				}
2825			};
2826			this.addListenerInside('mouseover', defMouseOver, thisTemp.CB['playbackrateP']);
2827		},
2828		/*
2829			内部函数
2830			切换倍速后发生的动作
2831		*/
2832		newPlaybackrate: function(title) {
2833			var vArr = this.playbackRateArr;
2834			var nVArr = [];
2835			var i = 0;
2836			for(i = 0; i < vArr.length; i++) {
2837				var v = vArr[i];
2838				if(v[1] == title) {
2839					this.playbackRateDefault = i;
2840					this.V.playbackRate = v[0];
2841					if(this.showFace) {
2842						this.CB['playbackrate'].innerHTML = v[1];
2843						this.playbackRate();
2844					}
2845					this.sendJS('playbackRate', v);
2846				}
2847			}
2848		},
2849
2850		/*
2851			内部函数
2852			构建清晰度按钮及切换事件(Click事件)
2853		*/
2854		definition: function() {
2855			if(!this.showFace) {
2856				return;
2857			}
2858			var thisTemp = this;
2859			var vArr = this.VA;
2860			var dArr = [];
2861			var html = '';
2862			var nowD = ''; //当前的清晰度
2863			var i = 0;
2864			for(i = 0; i < vArr.length; i++) {
2865				var d = vArr[i][2];
2866				if(dArr.indexOf(d) == -1) {
2867					dArr.push(d);
2868				}
2869				if(this.V) {
2870					if(vArr[i][0] == this.V.currentSrc) {
2871						nowD = d;
2872					}
2873				}
2874			}
2875			if(!nowD) {
2876				nowD = dArr[0];
2877			}
2878			if(dArr.length > 1) {
2879				var zlen = 0;
2880				for(i = dArr.length - 1; i > -1; i--) {
2881					html = '<p>' + dArr[i] + '</p>' + html;
2882					var dlen = this.getStringLen(dArr[i]);
2883					if(dlen > zlen) {
2884						zlen = dlen;
2885					}
2886				}
2887				if(html) {
2888					html += '<p>' + nowD + '</p>';
2889				}
2890				this.CB['definition'].innerHTML = nowD;
2891				this.CB['definitionP'].innerHTML = html;
2892				this.css([this.CB['definition'], this.CB['definitionLine']], 'display', 'block');
2893				var pArr = this.CB['definitionP'].childNodes;
2894				for(var i = 0; i < pArr.length; i++) {
2895					var fontColor = '#FFFFFF';
2896					if(pArr[i].innerHTML == nowD) {
2897						fontColor = '#0782F5';
2898					}
2899					this.css(pArr[i], {
2900						color: fontColor,
2901						margin: '0px',
2902						padding: '0px',
2903						fontSize: '14px'
2904					});
2905					if(i < pArr.length - 1) {
2906						this.css(pArr[i], 'borderBottom', '1px solid #282828')
2907					}
2908					var defClick = function() {
2909						if(nowD != this.innerHTML) {
2910							thisTemp.css(thisTemp.CB['definitionP'], 'display', 'none');
2911							thisTemp.newDefinition(this.innerHTML);
2912						}
2913					};
2914					this.addListenerInside('click', defClick, pArr[i]);
2915
2916				}
2917				var pW = (zlen * 10) + 20;
2918				this.css(this.CB['definitionP'], {
2919					width: pW + 'px'
2920				});
2921				this.css(this.CB['definition'], {
2922					width: pW + 'px'
2923				});
2924				this.buttonWidth['definition'] = this.CB['definition'].offsetWidth;
2925			} else {
2926				this.CB['definition'].innerHTML = '';
2927				this.CB['definitionP'].innerHTML = '';
2928				this.css([this.CB['definition'], this.CB['definitionLine']], 'display', 'none');
2929			}
2930		},
2931		/*
2932			内部函数
2933			注册清晰度相关事件
2934		*/
2935		addDefListener: function() {
2936			var thisTemp = this;
2937			var setTimeOutP = null;
2938			var defClick = function(event) {
2939				thisTemp.css(thisTemp.CB['definitionP'], {
2940					left: thisTemp.getCoor(thisTemp.CB['definition'])['x'] + 'px',
2941					display: 'block'
2942				});
2943			};
2944			this.addListenerInside('click', defClick, this.CB['definition']);
2945			var defMouseOut = function(event) {
2946				if(setTimeOutP) {
2947					window.clearTimeout(setTimeOutP);
2948					setTimeOutP = null;
2949				}
2950				setTimeOutP = window.setTimeout(function(event) {
2951					thisTemp.css(thisTemp.CB['definitionP'], 'display', 'none');
2952				}, 500);
2953			};
2954			this.addListenerInside('mouseout', defMouseOut, thisTemp.CB['definitionP']);
2955			var defMouseOver = function(event) {
2956				if(setTimeOutP) {
2957					window.clearTimeout(setTimeOutP);
2958					setTimeOutP = null;
2959				}
2960			};
2961			this.addListenerInside('mouseover', defMouseOver, thisTemp.CB['definitionP']);
2962		},
2963		/*
2964			内部函数
2965			切换清晰度后发生的动作
2966		*/
2967		newDefinition: function(title) {
2968			var vArr = this.VA;
2969			var nVArr = [];
2970			var i = 0;
2971			for(i = 0; i < vArr.length; i++) {
2972				var v = vArr[i];
2973				if(v[2] == title) {
2974					nVArr.push(v);
2975					this.sendJS('definitionChange', i + '');
2976				}
2977			}
2978			if(nVArr.length < 1) {
2979				return;
2980			}
2981			if(this.V != null && this.needSeek == 0) {
2982				this.needSeek = this.V.currentTime;
2983			}
2984			if(this.getFileExt(nVArr[0][0]) != '.m3u8') {
2985				this.isM3u8 = false;
2986			}
2987			if(!this.isM3u8) {
2988				if(nVArr.length == 1) {
2989					this.V.innerHTML = '';
2990					this.V.src = nVArr[0][0];
2991				} else {
2992					var source = '';
2993					nVArr = this.arrSort(nVArr);
2994					for(i = 0; i < nVArr.length; i++) {
2995						var type = '';
2996						var va = nVArr[i];
2997						if(va[1]) {
2998							type = ' type="' + va[1] + '"';
2999						}
3000						source += '<source src="' + va[0] + '"' + type + '>';
3001					}
3002					this.V.removeAttribute('src');
3003					this.V.innerHTML = source;
3004				}
3005			} else {
3006				this.embedHls(vArr[0][0], this.vars['autoplay']);
3007			}
3008			this.V.autoplay = 'autoplay';
3009			this.V.load();
3010			this.timerErrorFun();
3011		},
3012		/*
3013			内置函数
3014			播放hls
3015		*/
3016		embedHls: function(url, autoplay) {
3017			var thisTemp = this;
3018			if(Hls.isSupported()) {
3019				var hls = new Hls();
3020				hls.loadSource(url);
3021				hls.attachMedia(this.V);
3022				hls.on(Hls.Events.MANIFEST_PARSED, function() {
3023					thisTemp.playerLoad();
3024					if(autoplay) {
3025						thisTemp.videoPlay();
3026					}
3027				});
3028			}
3029		},
3030		/*
3031			内部函数
3032			构建提示点
3033		*/
3034		prompt: function() {
3035			if(!this.showFace) {
3036				return;
3037			}
3038			var thisTemp = this;
3039			var prompt = this.vars['promptSpot'];
3040			if(prompt == null || this.promptArr.length > 0) {
3041				return;
3042			}
3043			var showPrompt = function(event) {
3044				if(thisTemp.promptElement == null) {
3045					var random2 = 'prompte' + thisTemp.randomString(5);
3046					var ele2 = document.createElement('div');
3047					ele2.className = random2;
3048					thisTemp.PD.appendChild(ele2);
3049					thisTemp.promptElement = thisTemp.getByElement(random2);
3050					thisTemp.css(thisTemp.promptElement, {
3051						overflowX: 'hidden',
3052						lineHeight: '22px',
3053						fontSize: '14px',
3054						color: '#FFFFFF',
3055						position: 'absolute',
3056						display: 'block',
3057						zIndex: '90'
3058					});
3059				}
3060				var pcon = thisTemp.getPromptTest();
3061				var pW = pcon['pW'],
3062					pT = pcon['pT'],
3063					pL = parseInt(thisTemp.css(this, 'left')) - parseInt(pW * 0.5);
3064				if(pcon['pL'] > 10) {
3065					pL = pcon['pL'];
3066				}
3067				if(pL < 0) {
3068					pL = 0;
3069				}
3070				thisTemp.css(thisTemp.promptElement, {
3071					width: pW + 'px',
3072					left: (-pW - 10) + 'px',
3073					display: 'block'
3074				});
3075				thisTemp.promptElement.innerHTML = thisTemp.getDataset(this, 'words');
3076				thisTemp.css(thisTemp.promptElement, {
3077					left: pL + 'px',
3078					top: (pT - thisTemp.promptElement.offsetHeight - 10) + 'px'
3079				});
3080			};
3081			var hidePrompt = function(event) {
3082				if(thisTemp.promptElement != null) {
3083					thisTemp.css(thisTemp.promptElement, {
3084						display: 'none'
3085					});
3086				}
3087			};
3088			var i = 0;
3089			for(i = 0; i < prompt.length; i++) {
3090				var pr = prompt[i];
3091				var words = pr['words'];
3092				var time = pr['time'];
3093				var random = 'prompt' + this.randomString(5);
3094				var ele = document.createElement('div');
3095				ele.className = random;
3096				this.CB['timeBoBg'].appendChild(ele);
3097				var div = this.getByElement(random);
3098				div.setAttribute('data-time', time);
3099				div.setAttribute('data-words', words);
3100				this.css(div, {
3101					width: '6px',
3102					height: '6px',
3103					backgroundColor: '#FFFFFF',
3104					position: 'absolute',
3105					top: '4px',
3106					left: '-100px',
3107					display: 'none',
3108					zIndex: '1',
3109					borderRadius: '6px'
3110				});
3111
3112				this.addListenerInside('mouseover', showPrompt, div);
3113				this.addListenerInside('mouseout', hidePrompt, div);
3114				this.promptArr.push(div);
3115			}
3116			this.changePrompt();
3117		},
3118		/*
3119			内部函数
3120			计算提示文本的位置
3121		*/
3122		getPromptTest: function() {
3123			var pW = this.previewWidth,
3124				pT = this.getCoor(this.CB['timeButton'])['y'],
3125				pL = 0;
3126			if(this.previewTop != null) {
3127				pT -= parseInt(this.css(this.previewTop, 'height'));
3128				pL = parseInt(this.css(this.previewTop, 'left'));
3129			} else {
3130				pT -= 35;
3131			}
3132			pL += 2;
3133			if(pL < 0) {
3134				pL = 0;
3135			}
3136			if(pL > this.PD.offsetWidth - pW) {
3137				pL = this.PD.offsetWidth - pW;
3138			}
3139			return {
3140				pW: pW,
3141				pT: pT,
3142				pL: pL
3143			};
3144		},
3145		/*
3146			内部函数
3147			删除提示点
3148		*/
3149		deletePrompt: function() {
3150			var arr = this.promptArr;
3151			if(arr.length > 0) {
3152				for(var i = 0; i < arr.length; i++) {
3153					if(arr[i]) {
3154						this.deleteChild(arr[i]);
3155					}
3156				}
3157			}
3158			this.promptArr = [];
3159		},
3160		/*
3161			内部函数
3162			计算提示点坐标
3163		*/
3164		changePrompt: function() {
3165			if(this.promptArr.length == 0) {
3166				return;
3167			}
3168			var arr = this.promptArr;
3169			var duration = this.getMetaDate()['duration'];
3170			var bw = this.CB['timeBoBg'].offsetWidth;
3171			for(var i = 0; i < arr.length; i++) {
3172				var time = parseInt(this.getDataset(arr[i], 'time'));
3173				var left = parseInt(time * bw / duration) - parseInt(arr[i].offsetWidth * 0.5);
3174				if(left < 0) {
3175					left = 0;
3176				}
3177				if(left > bw - parseInt(arr[i].offsetWidth * 0.5)) {
3178					left = bw - parseInt(arr[i].offsetWidth * 0.5);
3179				}
3180				this.css(arr[i], {
3181					left: left + 'px',
3182					display: 'block'
3183				});
3184			}
3185		},
3186		/*
3187			内部函数
3188			构建预览图片效果
3189		*/
3190		preview: function(obj) {
3191			var thisTemp = this;
3192			var preview = {
3193				file: null,
3194				scale: 0
3195			};
3196			preview = this.standardization(preview, this.vars['preview']);
3197			if(preview['file'] == null || preview['scale'] <= 0) {
3198				return;
3199			}
3200			var srcArr = preview['file'];
3201			if(this.previewStart == 0) { //如果还没有构建,则先进行构建
3202				this.previewStart = 1;
3203				if(srcArr.length > 0) {
3204					var i = 0;
3205					var imgW = 0,
3206						imgH = 0;
3207					var random = thisTemp.randomString(10);
3208					var loadNum = 0;
3209					var loadImg = function(i) {
3210						srcArr[i] = thisTemp.getNewUrl(srcArr[i]);
3211						var n = 0;
3212						var img = new Image();
3213						img.src = srcArr[i];
3214						img.className = random + i;
3215						img.onload = function(event) {
3216							loadNum++;
3217							if(thisTemp.previewDiv == null) { //如果没有建立DIV,则建
3218								imgW = img.width;
3219								imgH = img.height;
3220								thisTemp.previewWidth = parseInt(imgW * 0.1);
3221								var ele = document.createElement('div');
3222								ele.className = random;
3223								thisTemp.PD.appendChild(ele);
3224								thisTemp.previewDiv = thisTemp.getByElement(random);
3225								var eleTop = (obj['y'] - parseInt(imgH * 0.1) + 2);
3226								thisTemp.css(thisTemp.previewDiv, {
3227									width: srcArr.length * imgW * 10 + 'px',
3228									height: parseInt(imgH * 0.1) + 'px',
3229									backgroundColor: '#000000',
3230									position: 'absolute',
3231									left: '0px',
3232									top: eleTop + 'px',
3233									display: 'none',
3234									zIndex: '80'
3235								});
3236								ele.setAttribute('data-x', '0');
3237								ele.setAttribute('data-y', eleTop);
3238								var ele2 = document.createElement('div');
3239								ele2.className = random + 'd2';
3240								thisTemp.PD.appendChild(ele2);
3241								thisTemp.previewTop = thisTemp.getByElement(ele2.className);
3242								thisTemp.css(thisTemp.previewTop, {
3243									width: parseInt(imgW * 0.1) + 'px',
3244									height: parseInt(imgH * 0.1) + 'px',
3245									position: 'absolute',
3246									border: '5px solid ' + thisTemp.css(thisTemp.CB['timeProgress'], 'backgroundColor'),
3247									left: '0px',
3248									top: (obj['y'] - parseInt(imgH * 0.1) + 2) + 'px',
3249									display: 'none',
3250									zIndex: '81'
3251								});
3252								var html = '';
3253								for(n = 0; n < srcArr.length; n++) {
3254									html += thisTemp.newCanvas(random + n, imgW * 10, parseInt(imgH * 0.1))
3255								}
3256								thisTemp.previewDiv.innerHTML = html;
3257							}
3258							thisTemp.previewDiv.appendChild(img);
3259							var cimg = thisTemp.getByElement(img.className);
3260							var canvas = thisTemp.getByElement(img.className + '-canvas');
3261							var context = canvas.getContext('2d');
3262							var sx = 0,
3263								sy = 0,
3264								x = 0,
3265								h = parseInt(imgH * 0.1);
3266							for(n = 0; n < 100; n++) {
3267								x = parseInt(n * imgW * 0.1);
3268								context.drawImage(cimg, sx, sy, parseInt(imgW * 0.1), h, x, 0, parseInt(imgW * 0.1), h);
3269								sx += parseInt(imgW * 0.1);
3270								if(sx >= imgW) {
3271									sx = 0;
3272									sy += h;
3273								}
3274								thisTemp.css(cimg, 'display', 'none');
3275							}
3276							if(loadNum == srcArr.length) {
3277								thisTemp.previewStart = 2;
3278							} else {
3279								i++;
3280								loadImg(i);
3281							}
3282						};
3283					};
3284				}
3285				loadImg(i);
3286				return;
3287			}
3288			if(this.previewStart == 2) {
3289				var isTween = true;
3290				var nowNum = parseInt(obj['time'] / this.vars['preview']['scale']);
3291				var numTotal = parseInt(thisTemp.getMetaDate()['duration'] / this.vars['preview']['scale']);
3292				if(thisTemp.css(thisTemp.previewDiv, 'display') == 'none') {
3293					isTween = false;
3294				}
3295				thisTemp.css(thisTemp.previewDiv, 'display', 'block');
3296				var imgWidth = thisTemp.previewDiv.offsetWidth * 0.01 / srcArr.length;
3297				var left = (imgWidth * nowNum) - obj['x'] + parseInt(imgWidth * 0.5),
3298					top = obj['y'] - thisTemp.previewDiv.offsetHeight;
3299				thisTemp.css(thisTemp.previewDiv, 'top', top + 2 + 'px');
3300				var topLeft = obj['x'] - parseInt(imgWidth * 0.5);
3301				var timepieces = 0;
3302				if(topLeft < 0) {
3303					topLeft = 0;
3304					timepieces = obj['x'] - topLeft - imgWidth * 0.5;
3305				}
3306				if(topLeft > thisTemp.PD.offsetWidth - imgWidth) {
3307					topLeft = thisTemp.PD.offsetWidth - imgWidth;
3308					timepieces = obj['x'] - topLeft - imgWidth * 0.5;
3309				}
3310				if(left < 0) {
3311					left = 0;
3312				}
3313				if(left > numTotal * imgWidth - thisTemp.PD.offsetWidth) {
3314					left = numTotal * imgWidth - thisTemp.PD.offsetWidth;
3315				}
3316				thisTemp.css(thisTemp.previewTop, {
3317					left: topLeft + 'px',
3318					top: top + 2 + 'px',
3319					display: 'block'
3320				});
3321				if(thisTemp.previewTop.offsetHeight > thisTemp.previewDiv.offsetHeight) {
3322					thisTemp.css(thisTemp.previewTop, {
3323						height: thisTemp.previewDiv.offsetHeight - (thisTemp.previewTop.offsetHeight - thisTemp.previewDiv.offsetHeight) + 'px'
3324					});
3325				}
3326				if(this.previewTween != null) {
3327					this.animatePause(this.previewTween);
3328					this.previewTween = null
3329				}
3330				var nowLeft = parseInt(thisTemp.css(thisTemp.previewDiv, 'left'));
3331				var leftC = nowLeft + left;
3332				if(nowLeft == -(left + timepieces)) {
3333					return;
3334				}
3335				if(isTween) {
3336					var obj = {
3337						element: thisTemp.previewDiv,
3338						start: null,
3339						end: -(left + timepieces),
3340						speed: 0.3
3341					};
3342					this.previewTween = this.animate(obj);
3343				} else {
3344					thisTemp.css(thisTemp.previewDiv, 'left', -(left + timepieces) + 'px')
3345				}
3346			}
3347		},
3348		/*
3349			内部函数
3350			删除预览图节点
3351		*/
3352		deletePreview: function() {
3353			if(this.previewDiv != null) {
3354				this.deleteChild(this.previewDiv);
3355				this.previewDiv = null;
3356				this.previewStart = 0;
3357			}
3358		},
3359		/*
3360			内部函数
3361			修改视频地址,属性
3362		*/
3363		changeVideo: function() {
3364			if(!this.html5Video) {
3365				this.getVarsObject();
3366				this.V.newVideo(this.vars);
3367				return;
3368			}
3369			var vArr = this.VA;
3370			var v = this.vars;
3371			var i = 0;
3372			if(vArr.length < 1) {
3373				return;
3374			}
3375			if(this.V != null && this.needSeek == 0) {
3376				this.needSeek = this.V.currentTime;
3377			}
3378			if(v['poster']) {
3379				this.V.poster = v['poster'];
3380			} else {
3381				this.V.removeAttribute('poster');
3382			}
3383			if(v['loop']) {
3384				this.V.loop = 'loop';
3385			} else {
3386				this.V.removeAttribute('loop');
3387			}
3388			if(v['seek'] > 0) {
3389				this.needSeek = v['seek'];
3390			} else {
3391				this.needSeek = 0;
3392			}
3393			if(this.getFileExt(vArr[0][0]) != '.m3u8') {
3394				this.isM3u8 = false;
3395			}
3396			if(!this.isM3u8) {
3397				if(vArr.length == 1) {
3398					this.V.innerHTML = '';
3399					this.V.src = vArr[0][0];
3400				} else {
3401					var source = '';
3402					vArr = this.arrSort(vArr);
3403					for(i = 0; i < vArr.length; i++) {
3404						var type = '';
3405						var va = vArr[i];
3406						if(va[1]) {
3407							type = ' type="' + va[1] + '"';
3408						}
3409						source += '<source src="' + va[0] + '"' + type + '>';
3410					}
3411					this.V.removeAttribute('src');
3412					this.V.innerHTML = source;
3413				}
3414				//分析视频地址结束
3415				if(v['autoplay']) {
3416					this.V.autoplay = 'autoplay';
3417				} else {
3418					this.V.removeAttribute('autoplay');
3419				}
3420				this.V.load();
3421			} else {
3422				this.embedHls(vArr[0][0], v['autoplay']);
3423			}
3424			if(!this.isUndefined(v['volume'])) {
3425				this.changeVolume(v['volume']);
3426			}
3427			this.resetPlayer(); //重置界面元素
3428			this.timerErrorFun();
3429			//如果存在字幕则加载
3430			if(this.vars['cktrack']) {
3431				this.loadTrack();
3432			}
3433		},
3434		/*
3435			内部函数
3436			调整中间暂停按钮,缓冲loading,错误提示文本框的位置
3437		*/
3438		elementCoordinate: function() {
3439			this.pdCoor = this.getXY(this.PD);
3440			this.css(this.CB['pauseCenter'], {
3441				left: parseInt((this.PD.offsetWidth - 80) * 0.5) + 'px',
3442				top: parseInt((this.PD.offsetHeight - 80) * 0.5) + 'px'
3443			});
3444			this.css(this.CB['loading'], {
3445				left: parseInt((this.PD.offsetWidth - 60) * 0.5) + 'px',
3446				top: parseInt((this.PD.offsetHeight - 60) * 0.5) + 'px'
3447			});
3448			this.css(this.CB['errorText'], {
3449				left: parseInt((this.PD.offsetWidth - 120) * 0.5) + 'px',
3450				top: parseInt((this.PD.offsetHeight - 30) * 0.5) + 'px'
3451			});
3452			this.css(this.CB['logo'], {
3453				left: parseInt(this.PD.offsetWidth - this.CB['logo'].offsetWidth - 20) + 'px',
3454				top: '20px'
3455			});
3456			this.checkBarWidth();
3457		},
3458		/*
3459			内部函数
3460			当播放器尺寸变化时,显示和隐藏相关节点
3461		*/
3462		checkBarWidth: function() {
3463			if(!this.showFace) {
3464				return;
3465			}
3466			var controlBarW = this.CB['controlBar'].offsetWidth;
3467			var ele = [];
3468			ele.push([
3469				[this.CB['full'], this.CB['escFull'], this.CB['fullLine']], this.buttonWidth['full'] + 2, 'full'
3470			]);
3471			if(this.vars['front'] != '') {
3472				ele.push([
3473					[this.CB['front'], this.CB['frontLine']], this.buttonWidth['front'] + 2
3474				]);
3475			}
3476			if(this.vars['next'] != '') {
3477				ele.push([
3478					[this.CB['next'], this.CB['nextLine']], this.buttonWidth['next'] + 2
3479				]);
3480			}
3481			if(this.CB['definition'].innerHTML != '') {
3482				ele.push([
3483					[this.CB['definition'], this.CB['definitionLine']], this.buttonWidth['definition'] + 2
3484				]);
3485			}
3486			ele.push([
3487				[this.CB['volume']], this.buttonWidth['volume']
3488			]);
3489			ele.push([
3490				[this.CB['mute'], this.CB['escMute'], this.CB['muteLine']], this.buttonWidth['mute'] + 2, 'mute'
3491			]);
3492			ele.push([
3493				[this.CB['timeText']], this.buttonWidth['timeText']
3494			]);
3495			ele.push([
3496				[this.CB['play'], this.CB['pause'], this.CB['playLine']], this.buttonWidth['play'] + 2, 'play'
3497			]);
3498
3499			var i = 0;
3500			var len = 0;
3501			var isc = true;
3502			//计算所有要显示的节点的总宽度
3503			for(var i = 0; i < ele.length; i++) {
3504				var nlen = ele[i][1];
3505				if(nlen > 2) {
3506					len += nlen;
3507				} else {
3508					isc = false;
3509				}
3510			}
3511			if(isc) {
3512				this.buttonLen = len;
3513				this.buttonArr = ele;
3514			}
3515			len = this.buttonLen;
3516			ele = this.buttonArr;
3517			for(var i = 0; i < ele.length; i++) {
3518				if(len > controlBarW) {
3519					len -= ele[i][1];
3520					this.css(ele[i][0], 'display', 'none');
3521				} else {
3522					this.css(ele[i][0], 'display', 'block');
3523					if(ele[i].length == 3) {
3524						var name = ele[i][2];
3525						switch(name) {
3526							case 'mute':
3527								if(this.volume == 0) {
3528									this.css(this.CB['mute'], 'display', 'none');
3529								} else {
3530									this.css(this.CB['escMute'], 'display', 'none');
3531								}
3532								break;
3533							case 'play':
3534								this.playShow(this.V.paused ? false : true);
3535								break;
3536							case 'full':
3537								if(this.full) {
3538									this.css(this.CB['full'], 'display', 'none');
3539								} else {
3540									this.css(this.CB['escFull'], 'display', 'none');
3541								}
3542								break;
3543						}
3544					}
3545				}
3546			}
3547		},
3548		/*
3549			内部函数
3550			初始化暂停或播放按钮
3551		*/
3552		initPlayPause: function() {
3553			if(!this.showFace) {
3554				return;
3555			}
3556			if(this.vars['autoplay']) {
3557				this.css([this.CB['play'], this.CB['pauseCenter']], 'display', 'none');
3558				this.css(this.CB['pause'], 'display', 'block');
3559			} else {
3560				this.css(this.CB['play'], 'display', 'block');
3561				if(this.css(this.CB['errorText'], 'display') == 'none') {
3562					this.css(this.CB['pauseCenter'], 'display', 'block');
3563				}
3564				this.css(this.CB['pause'], 'display', 'none');
3565			}
3566		},
3567
3568		/*
3569			下面为监听事件
3570			内部函数
3571			监听元数据已加载
3572		*/
3573		loadedHandler: function() {
3574			this.loaded = true;
3575			if(this.vars['loaded'] != '') {
3576				try {
3577					eval(this.vars['loaded'] + '()');
3578				} catch(event) {
3579					this.log(event);
3580				}
3581			}
3582		},
3583		/*
3584			内部函数
3585			监听播放
3586		*/
3587		playingHandler: function() {
3588			this.playShow(true);
3589			if(this.needSeek > 0) {
3590				this.videoSeek(this.needSeek);
3591				this.needSeek = 0;
3592			}
3593			if(this.animatePauseArray.length > 0) {
3594				this.animateResume('pause');
3595			}
3596			if(this.playerType == 'html5video' && this.V != null && this.config['videoDrawImage']) {
3597				this.sendVCanvas();
3598			}
3599		},
3600		/*
3601			内部函数
3602			使用画布附加视频
3603		*/
3604		sendVCanvas: function() {
3605			if(this.timerVCanvas == null) {
3606				this.css(this.V, 'display', 'none');
3607				this.css(this.MD, 'display', 'block');
3608				var thisTemp = this;
3609				var videoCanvas = function() {
3610					if(thisTemp.MDCX.width != thisTemp.PD.offsetWidth) {
3611						thisTemp.MDC.width = thisTemp.PD.offsetWidth;
3612					}
3613					if(thisTemp.MDCX.height != thisTemp.PD.offsetHeight) {
3614						thisTemp.MDC.height = thisTemp.PD.offsetHeight;
3615					}
3616					thisTemp.MDCX.clearRect(0, 0, thisTemp.MDCX.width, thisTemp.MDCX.height);
3617					var coor = thisTemp.getProportionCoor(thisTemp.PD.offsetWidth, thisTemp.PD.offsetHeight, thisTemp.V.videoWidth, thisTemp.V.videoHeight);
3618					thisTemp.MDCX.drawImage(thisTemp.V, 0, 0, thisTemp.V.videoWidth, thisTemp.V.videoHeight, coor['x'], coor['y'], coor['width'], coor['height']);
3619				};
3620				this.timerVCanvas = new this.timer(0, videoCanvas);
3621			}
3622		},
3623		/*
3624			内部函数
3625			监听暂停
3626		*/
3627		pauseHandler: function() {
3628			this.playShow(false);
3629			if(this.animatePauseArray.length > 0) {
3630				this.animatePause('pause');
3631			}
3632			if(this.playerType == 'html5video' && this.V != null && this.config['videoDrawImage']) {
3633				this.stopVCanvas();
3634			}
3635		},
3636		/*
3637			内部函数
3638			停止画布
3639		*/
3640		stopVCanvas: function() {
3641			if(this.timerVCanvas != null) {
3642				this.css(this.V, 'display', 'block');
3643				this.css(this.MD, 'display', 'none');
3644				if(this.timerVCanvas.runing) {
3645					this.timerVCanvas.stop();
3646				}
3647				this.timerVCanvas = null;
3648			}
3649		},
3650		/*
3651			内部函数
3652			根据当前播放还是暂停确认图标显示
3653		*/
3654		playShow: function(b) {
3655			if(!this.showFace) {
3656				return;
3657			}
3658			if(b) {
3659				this.css(this.CB['play'], 'display', 'none');
3660				this.css(this.CB['pauseCenter'], 'display', 'none');
3661				this.css(this.CB['pause'], 'display', 'block');
3662			} else {
3663				this.css(this.CB['play'], 'display', 'block');
3664				if(this.css(this.CB['errorText'], 'display') == 'none') {
3665					this.css(this.CB['pauseCenter'], 'display', 'block');
3666				} else {
3667					this.css(this.CB['pauseCenter'], 'display', 'none');
3668				}
3669				this.css(this.CB['pause'], 'display', 'none');
3670			}
3671		},
3672		/*
3673			内部函数
3674			监听seek结束
3675		*/
3676		seekedHandler: function() {
3677			this.resetTrack();
3678			this.isTimeButtonMove = true;
3679			if(this.V.paused) {
3680				this.videoPlay();
3681			}
3682		},
3683		/*
3684			内部函数
3685			监听播放结束
3686		*/
3687		endedHandler: function() {
3688			if(!this.vars['loop']) {
3689				this.videoPause();
3690			}
3691		},
3692		/*
3693			内部函数
3694			监听音量改变
3695		*/
3696		volumechangeHandler: function() {
3697			if(!this.showFace) {
3698				return;
3699			}
3700			try {
3701				if(this.V.volume > 0) {
3702					this.css(this.CB['mute'], 'display', 'block');
3703					this.css(this.CB['escMute'], 'display', 'none');
3704				} else {
3705					this.css(this.CB['mute'], 'display', 'none');
3706					this.css(this.CB['escMute'], 'display', 'block');
3707				}
3708			} catch(event) {}
3709		},
3710
3711		/*
3712			内部函数
3713			监听播放时间调节进度条
3714		*/
3715		timeUpdateHandler: function() {
3716			var duration = 0;
3717			if(this.playerType == 'html5video') {
3718				try {
3719					duration = this.V.duration;
3720				} catch(event) {}
3721			}
3722			if(duration > 0) {
3723				this.time = this.V.currentTime;
3724				this.timeTextHandler();
3725				this.trackShowHandler();
3726				if(this.isTimeButtonMove) {
3727					this.timeProgress(this.time, duration);
3728				}
3729			}
3730		},
3731		/*
3732			内部函数
3733			按时间改变进度条
3734		*/
3735		timeProgress: function(time, duration) {
3736			if(!this.showFace) {
3737				return;
3738			}
3739			var timeProgressBgW = this.CB['timeProgressBg'].offsetWidth;
3740			var timeBOW = parseInt((time * timeProgressBgW / duration) - (this.CB['timeButton'].offsetWidth * 0.5));
3741			if(timeBOW > timeProgressBgW - this.CB['timeButton'].offsetWidth) {
3742				timeBOW = timeProgressBgW - this.CB['timeButton'].offsetWidth;
3743			}
3744			if(timeBOW < 0) {
3745				timeBOW = 0;
3746			}
3747			this.css(this.CB['timeProgress'], 'width', timeBOW + 'px');
3748			this.css(this.CB['timeButton'], 'left', parseInt(timeBOW) + 'px');
3749		},
3750		/*
3751			内部函数
3752			监听播放时间改变时间显示文本框
3753		*/
3754		timeTextHandler: function() { //显示时间/总时间
3755			if(!this.showFace) {
3756				return;
3757			}
3758			var duration = this.V.duration;
3759			var time = this.V.currentTime;
3760			if(isNaN(duration) || parseInt(duration) < 0.2) {
3761				duration = this.vars['duration'];
3762			}
3763			this.CB['timeText'].innerHTML = this.formatTime(time) + ' / ' + this.formatTime(duration);
3764			if(this.CB['timeText'].offsetWidth > 0) {
3765				this.buttonWidth['timeText'] = this.CB['timeText'].offsetWidth;
3766			}
3767		},
3768		/*
3769			内部函数
3770			监听是否是缓冲状态
3771		*/
3772		bufferEdHandler: function() {
3773			if(!this.showFace || this.playerType == 'flashplayer') {
3774				return;
3775			}
3776			var thisTemp = this;
3777			var clearTimerBuffer = function() {
3778				if(thisTemp.timerBuffer != null) {
3779					if(thisTemp.timerBuffer.runing) {
3780						thisTemp.sendJS('buffer', 100);
3781						thisTemp.timerBuffer.stop();
3782					}
3783					thisTemp.timerBuffer = null;
3784				}
3785			};
3786			clearTimerBuffer();
3787			var bufferFun = function() {
3788				if(thisTemp.V.buffered.length > 0) {
3789					var duration = thisTemp.V.duration;
3790					var len = thisTemp.V.buffered.length;
3791					var bufferStart = thisTemp.V.buffered.start(len - 1);
3792					var bufferEnd = thisTemp.V.buffered.end(len - 1);
3793					var loadTime = bufferStart + bufferEnd;
3794					var loadProgressBgW = thisTemp.CB['timeProgressBg'].offsetWidth;
3795					var timeButtonW = thisTemp.CB['timeButton'].offsetWidth;
3796					var loadW = parseInt((loadTime * loadProgressBgW / duration) + timeButtonW);
3797					if(loadW >= loadProgressBgW) {
3798						loadW = loadProgressBgW;
3799						clearTimerBuffer();
3800					}
3801					thisTemp.changeLoad(loadTime);
3802				}
3803			};
3804			this.timerBuffer = new this.timer(200, bufferFun);
3805		},
3806		/*
3807			内部函数
3808			单独计算加载进度
3809		*/
3810		changeLoad: function(loadTime) {
3811			if(this.V == null) {
3812				return;
3813			}
3814			if(!this.showFace) {
3815				return;
3816			}
3817			var loadProgressBgW = this.CB['timeProgressBg'].offsetWidth;
3818			var timeButtonW = this.CB['timeButton'].offsetWidth;
3819			var duration = this.V.duration;
3820			if(this.isUndefined(loadTime)) {
3821				loadTime = this.loadTime;
3822			} else {
3823				this.loadTime = loadTime;
3824			}
3825			var loadW = parseInt((loadTime * loadProgressBgW / duration) + timeButtonW);
3826			this.css(this.CB['loadProgress'], 'width', loadW + 'px');
3827		},
3828		/*
3829			内部函数
3830			判断是否是直播
3831		*/
3832		judgeIsLive: function() {
3833			var thisTemp = this;
3834			if(this.timerError != null) {
3835				if(this.timerError.runing) {
3836					this.timerError.stop();
3837				}
3838				this.timerError = null;
3839			}
3840			this.error = false;
3841			if(this.showFace) {
3842				this.css(this.CB['errorText'], 'display', 'none');
3843			}
3844			var timeupdate = function(event) {
3845				thisTemp.timeUpdateHandler();
3846			};
3847			if(!this.vars['live']) {
3848				if(this.V != null && this.playerType == 'html5video') {
3849					this.addListenerInside('timeupdate', timeupdate);
3850					thisTemp.timeTextHandler();
3851					thisTemp.prompt(); //添加提示点
3852					window.setTimeout(function() {
3853						thisTemp.bufferEdHandler();
3854					}, 200);
3855				}
3856			} else {
3857				this.removeListenerInside('timeupdate', timeupdate);
3858				if(this.timerTime != null) {
3859					window.clearInterval(this.timerTime);
3860					timerTime = null;
3861				}
3862				if(this.timerTime != null) {
3863					if(this.timerTime.runing) {
3864						this.timerTime.stop();
3865					}
3866					this.timerTime = null;
3867				}
3868				var timeFun = function() {
3869					if(thisTemp.V != null && !thisTemp.V.paused && thisTemp.show
3869Face) {
3870						thisTemp.CB['timeText'].innerHTML = thisTemp.getNowDate();
3871					}
3872				};
3873				this.timerTime = new this.timer(1000, timeFun);
3874				//timerTime.start();
3875			}
3876			this.definition();
3877		},
3878		/*
3879			内部函数
3880			加载字幕
3881		*/
3882		loadTrack: function() {
3883			if(this.playerType == 'flashplayer' || this.vars['flashplayer'] == true) {
3884				return;
3885			}
3886			var thisTemp = this;
3887			var track = this.vars['cktrack'];
3888			var obj = {
3889				method: 'get',
3890				dataType: 'text',
3891				url: track,
3892				charset: 'utf-8',
3893				success: function(data) {
3894					thisTemp.track = thisTemp.parseSrtSubtitles(data);
3895					thisTemp.trackIndex = 0;
3896					thisTemp.nowTrackShow = {
3897						sn: ''
3898					};
3899				}
3900			};
3901			this.ajax(obj);
3902		},
3903		/*
3904			内部函数
3905			重置字幕
3906		*/
3907		resetTrack: function() {
3908			this.trackIndex = 0;
3909			this.nowTrackShow = {
3910				sn: ''
3911			};
3912		},
3913		/*
3914			内部函数
3915			根据时间改变读取显示字幕
3916		*/
3917		trackShowHandler: function() {
3918			if(!this.showFace) {
3919				return;
3920			}
3921			if(this.track.length < 1) {
3922				return;
3923			}
3924			if(this.trackIndex >= this.track.length) {
3925				this.trackIndex = 0;
3926			}
3927			var nowTrack = this.track[this.trackIndex]; //当前编号对应的字幕内容
3928			/*
3929				this.nowTrackShow=当前显示在界面上的内容
3930				如果当前时间正好在nowTrack时间内,则需要判断
3931			*/
3932			if(this.time >= nowTrack['startTime'] && this.time <= nowTrack['endTime']) {
3933				/*
3934				 	如果当前显示的内容不等于当前需要显示的内容时,则需要显示正确的内容
3935				*/
3936				var nowShow = this.nowTrackShow;
3937				if(nowShow['sn'] != nowTrack['sn']) {
3938					this.trackHide();
3939					this.trackShow(nowTrack);
3940				}
3941			} else {
3942				/*
3943				 * 如果当前播放时间不在当前编号字幕内,则需要先清空当前的字幕内容,再显示新的字幕内容
3944				 */
3945				this.trackHide();
3946				this.checkTrack();
3947			}
3948		},
3949		/*
3950			内部函数
3951			显示字幕内容
3952		*/
3953		trackShow: function(track) {
3954			this.nowTrackShow = track;
3955			var arr = track['content'];
3956			for(var i = 0; i < arr.length; i++) {
3957				var obj = {
3958					list: [{
3959						type: 'text',
3960						text: arr[i],
3961						color: '#FFFFFF',
3962						size: 16,
3963						font: this.fontFamily,
3964						lineHeight: 30
3965					}],
3966					position: [1, 2, null, -(arr.length - i) * 30 - 50]
3967				};
3968				var ele = this.addElement(obj);
3969				this.trackElement.push(ele);
3970			}
3971		},
3972		/*
3973			内部函数
3974			隐藏字字幕内容
3975		*/
3976		trackHide: function() {
3977			for(var i = 0; i < this.trackElement.length; i++) {
3978				this.deleteElement(this.trackElement[i]);
3979			}
3980			this.trackElement = [];
3981		},
3982		/*
3983			内部函数
3984			重新计算字幕的编号
3985		*/
3986		checkTrack: function() {
3987			var num = this.trackIndex;
3988			var arr = this.track;
3989			var i = 0;
3990			for(i = num; i < arr.length; i++) {
3991				if(this.time >= arr[i]['startTime'] && this.time <= arr[i]['endTime']) {
3992					this.trackIndex = i;
3993					break;
3994				}
3995			}
3996		},
3997		/*
3998		-----------------------------------------------------------------------------接口函数开始
3999			接口函数
4000			在播放和暂停之间切换
4001		*/
4002		playOrPause: function() {
4003			if(!this.loaded) {
4004				return;
4005			}
4006			if(this.config['videoClick']) {
4007				if(this.V == null) {
4008					return;
4009				}
4010				if(this.playerType == 'flashplayer') {
4011					this.V.playOrPause();
4012					return;
4013                }
4014
4015                if (this.V.paused) {
4016					this.videoPlay();
4017                } else {
4018					this.videoPause();
4019				}
4020			}
4021		},
4022		/*
4023			接口函数
4024			播放动作
4025		*/
4026		videoPlay: function() {
4027			if(!this.loaded) {
4028				return;
4029			}
4030			if(this.playerType == 'flashplayer') {
4031				this.V.videoPlay();
4032				return;
4033            }
4034			this.V.play();
4035		},
4036		/*
4037			接口函数
4038			暂停动作
4039		*/
4040		videoPause: function() {
4041			if(!this.loaded) {
4042				return;
4043			}
4044			if(this.playerType == 'flashplayer') {
4045				this.V.videoPause();
4046				return;
4047            }
4048
4049			this.V.pause();
4050		},
4051		/*
4052			接口函数
4053			跳转时间动作
4054		*/
4055		videoSeek: function(time) {
4056			if(!this.loaded) {
4057				return;
4058			}
4059			if(this.playerType == 'flashplayer') {
4060				this.V.videoSeek(time);
4061				return;
4062			}
4063			var meta = this.getMetaDate();
4064			var duration = meta['duration'];
4065			if(duration > 0 && time > duration) {
4066				time = duration;
4067			}
4068			if(time >= 0) {
4069				this.V.currentTime = time;
4070				this.sendJS('seekTime', time);
4071			}
4072		},
4073		/*
4074			接口函数
4075			调节音量/获取音量
4076		*/
4077		changeVolume: function(vol, bg, button) {
4078			if(this.loaded) {
4079				if(this.playerType == 'flashplayer') {
4080					this.V.changeVolume(time);
4081					return;
4082				}
4083			}
4084			if(isNaN(vol) || this.isUndefined(vol)) {
4085				vol = 0;
4086			}
4087			if(!this.loaded) {
4088				this.vars['volume'] = vol;
4089			}
4090			if(!this.html5Video) {
4091				this.V.changeVolume(vol);
4092				return;
4093			}
4094			try {
4095				if(this.isUndefined(bg)) {
4096					bg = true;
4097				}
4098			} catch(e) {}
4099			try {
4100				if(this.isUndefined(button)) {
4101					button = true;
4102				}
4103			} catch(e) {}
4104			if(!vol) {
4105				vol = 0;
4106			}
4107			if(vol < 0) {
4108				vol = 0;
4109			}
4110			if(vol > 1) {
4111				vol = 1;
4112			}
4113			try {
4114				this.V.volume = vol;
4115			} catch(error) {}
4116			this.volume = vol;
4117			if(bg && this.showFace) {
4118				var bgW = vol * this.CB['volumeBg'].offsetWidth;
4119				if(bgW < 0) {
4120					bgW = 0;
4121				}
4122				if(bgW > this.CB['volumeBg'].offsetWidth) {
4123					bgW = this.CB['volumeBg'].offsetWidth;
4124				}
4125				this.css(this.CB['volumeUp'], 'width', bgW + 'px');
4126			}
4127
4128			if(button && this.showFace) {
4129				var buLeft = parseInt(this.CB['volumeUp'].offsetWidth - (this.CB['volumeBO'].offsetWidth * 0.5));
4130				if(buLeft > this.CB['volumeBg'].offsetWidth - this.CB['volumeBO'].offsetWidth) {
4131					buLeft = this.CB['volumeBg'].offsetWidth - this.CB['volumeBO'].offsetWidth
4132				}
4133				if(buLeft < 0) {
4134					buLeft = 0;
4135				}
4136				this.css(this.CB['volumeBO'], 'left', buLeft + 'px');
4137			}
4138		},
4139		/*
4140			接口函数
4141			静音
4142		*/
4143		videoMute: function() {
4144			if(!this.loaded) {
4145				return;
4146			}
4147			if(this.playerType == 'flashplayer') {
4148				this.V.videoMute();
4149				return;
4150			}
4151			this.volumeTemp = this.V ? (this.V.volume > 0 ? this.V.volume : this.vars['volume']) : this.vars['volume'];
4152			this.changeVolume(0);
4153		},
4154		/*
4155			接口函数
4156			取消静音
4157		*/
4158		videoEscMute: function() {
4159			if(!this.loaded) {
4160				return;
4161			}
4162			if(this.playerType == 'flashplayer') {
4163				this.V.videoEscMute();
4164				return;
4165			}
4166			this.changeVolume(this.volumeTemp > 0 ? this.volumeTemp : this.vars['volume']);
4167		},
4168		/*
4169			接口函数
4170			快退
4171		*/
4172		fastBack: function() {
4173			if(!this.loaded) {
4174				return;
4175			}
4176			if(this.playerType == 'flashplayer') {
4177				this.V.fastBack();
4178				return;
4179			}
4180			var time = this.time - this.ckplayerConfig['config']['timeJump'];
4181			if(time < 0) {
4182				time = 0;
4183			}
4184			this.videoSeek(time);
4185		},
4186		/*
4187			接口函数
4188			快进
4189		*/
4190		fastNext: function() {
4191			if(!this.loaded) {
4192				return;
4193			}
4194			if(this.playerType == 'flashplayer') {
4195				this.V.fastNext();
4196				return;
4197			}
4198			var time = this.time + this.ckplayerConfig['config']['timeJump'];
4199			if(time > this.V.duration) {
4200				time = this.V.duration;
4201			}
4202			this.videoSeek(time);
4203		},
4204		/*
4205			接口函数
4206			获取当前播放的地址
4207		*/
4208		getCurrentSrc:function(){
4209			if(!this.loaded) {
4210				return;
4211			}
4212			if(this.playerType == 'flashplayer') {
4213				return this.V.getCurrentSrc();
4214			}
4215			return this.V.currentSrc;
4216		},
4217		/*
4218			内置函数
4219			全屏/退出全屏动作,该动作只能是用户操作才可以触发ï¼
4219Œæ¯”如用户点击按钮触发该事件
4220		*/
4221		switchFull: function() {
4222			if(this.full) {
4223				this.quitFullScreen();
4224			} else {
4225				this.fullScreen();
4226			}
4227		},
4228		/*
4229			内置函数
4230			全屏动作,该动作只能是用户操作才可以触发,比如用户点击按钮触发该事件
4231		*/
4232		fullScreen: function() {
4233			if(this.html5Video && this.playerType == 'html5video') {
4234				var element = this.PD;
4235				if(element.requestFullscreen) {
4236					element.requestFullscreen();
4237				} else if(element.mozRequestFullScreen) {
4238					element.mozRequestFullScreen();
4239				} else if(element.webkitRequestFullscreen) {
4240					element.webkitRequestFullscreen();
4241				} else if(element.msRequestFullscreen) {
4242					element.msRequestFullscreen();
4243				} else if(element.oRequestFullscreen) {
4244					element.oRequestFullscreen();
4245				}
4246				this.judgeFullScreen();
4247			} else {
4248				//this.V.fullScreen();
4249			}
4250		},
4251		/*
4252			接口函数
4253			退出全屏动作
4254		*/
4255		quitFullScreen: function() {
4256			if(this.html5Video && this.playerType == 'html5video') {
4257				if(document.exitFullscreen) {
4258					document.exitFullscreen();
4259				} else if(document.msExitFullscreen) {
4260					document.msExitFullscreen();
4261				} else if(document.mozCancelFullScreen) {
4262					document.mozCancelFullScreen();
4263				} else if(document.oRequestFullscreen) {
4264					document.oCancelFullScreen();
4265				} else if(document.requestFullscreen) {
4266					document.requestFullscreen();
4267				} else if(document.webkitExitFullscreen) {
4268					document.webkitExitFullscreen();
4269				} else {
4270					this.css(document.documentElement, 'cssText', '');
4271					this.css(document.document.body, 'cssText', '');
4272					this.css(this.PD, 'cssText', '');
4273				}
4274				this.judgeFullScreen();
4275			}
4276		},
4277		/*
4278		 下面列出只有flashplayer里支持的
4279		 */
4280		videoRotation: function(n) {
4281			if(!this.loaded) {
4282				return;
4283			}
4284			if(this.playerType == 'flashplayer') {
4285				this.V.videoRotation(n);
4286				return;
4287			}
4288			if(this.isUndefined(n)) {
4289				n = 0;
4290			}
4291			var tf = this.css(this.V, 'transform');
4292			if(this.isUndefined(tf) && !tf) {
4293				tf = 'rotate(0deg)';
4294			}
4295			var reg = tf.match(/rotate\([^)]+\)/);
4296			reg = reg ? reg[0].replace('rotate(', '').replace('deg)', '') : '';
4297			if(reg == '') {
4298				reg = 0;
4299			} else {
4300				reg = parseInt(reg);
4301			}
4302			if(n == -1) {
4303				reg -= 90;
4304			} else if(n == 1) {
4305				reg += 90;
4306			} else {
4307				if(n != 90 && n != 180 && n != 270 && n != -90 && n != -180 && n != -270) {
4308					reg = 0;
4309				} else {
4310					reg = n;
4311				}
4312			}
4313			n = reg;
4314			tf = tf.replace(/rotate\([^)]+\)/, '') + ' rotate(' + n + 'deg)';
4315			this.css(this.V, 'transform', tf);
4316			return;
4317		},
4318		videoBrightness: function(n) {
4319			if(!this.loaded) {
4320				return;
4321			}
4322			if(this.playerType == 'flashplayer') {
4323				this.V.videoBrightness(n);
4324				return;
4325			}
4326		},
4327		videoContrast: function(n) {
4328			if(!this.loaded) {
4329				return;
4330			}
4331			if(this.playerType == 'flashplayer') {
4332				this.V.videoContrast(n);
4333				return;
4334			}
4335		},
4336		videoSaturation: function(n) {
4337			if(!this.loaded) {
4338				return;
4339			}
4340			if(this.playerType == 'flashplayer') {
4341				this.V.videoSaturation(n);
4342				return;
4343			}
4344		},
4345		videoHue: function(n) {
4346			if(!this.loaded) {
4347				return;
4348			}
4349			if(this.playerType == 'flashplayer') {
4350				this.V.videoHue(n);
4351				return;
4352			}
4353		},
4354		videoZoom: function(n) {
4355			if(!this.loaded) {
4356				return;
4357			}
4358			if(this.playerType == 'flashplayer') {
4359				this.V.videoZoom(n);
4360				return;
4361			}
4362			if(this.isUndefined(n)) {
4363				n = 1;
4364			}
4365			if(n < 0) {
4366				n = 0;
4367			}
4368			if(n > 2) {
4369				n = 2;
4370			}
4371			var tf = this.css(this.V, 'transform');
4372			tf = tf.replace(/scale\([^)]+\)/, '') + ' scale(' + n + ')';
4373			this.css(this.V, 'transform', tf);
4374			return;
4375		},
4376		videoProportion: function(w, h) {
4377			if(!this.loaded) {
4378				return;
4379			}
4380			if(this.playerType == 'flashplayer') {
4381				this.V.videoProportion(w, h);
4382				return;
4383			}
4384		},
4385		adPlay: function() {
4386			if(!this.loaded) {
4387				return;
4388			}
4389			if(this.playerType == 'flashplayer') {
4390				this.V.adPlay();
4391				return;
4392			}
4393		},
4394		adPause: function() {
4395			if(!this.loaded) {
4396				return;
4397			}
4398			if(this.playerType == 'flashplayer') {
4399				this.V.adPause();
4400				return;
4401			}
4402		},
4403		videoError: function(n) {
4404			if(!this.loaded) {
4405				return;
4406			}
4407			if(this.playerType == 'flashplayer') {
4408				this.V.videoError(n);
4409				return;
4410			}
4411		},
4412		changeConfig: function() {
4413			if(!this.loaded) {
4414				return;
4415			}
4416			if(this.playerType == 'flashplayer') {
4417				this.V.changeConfig(arguments);
4418				return;
4419			}
4420			var obj = this.ckplayerConfig;
4421			var arg = arguments;
4422			for(var i = 0; i < arg.length - 1; i++) {
4423				if(obj.hasOwnProperty(arg[i])) {
4424					obj = obj[arg[i]];
4425				} else {
4426					return;
4427				}
4428			}
4429			var val = arg[arg.length - 1];
4430			switch(arg.length) {
4431				case 2:
4432					this.ckplayerConfig[arg[0]] = val;
4433					break;
4434				case 3:
4435					this.ckplayerConfig[arg[0]][arg[1]] = val;
4436					break;
4437				case 4:
4438					this.ckplayerConfig[arg[0]][arg[1]][arg[2]] = val;
4439					break;
4440				case 5:
4441					this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]] = val;
4442					break;
4443				case 6:
4444					this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]] = val;
4445					break;
4446				case 7:
4447					this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]] = val;
4448					break;
4449				case 8:
4450					this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]][arg[6]] = val;
4451					break;
4452				case 9:
4453					this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]][arg[6]][arg[7]] = val;
4454					break;
4455				case 10:
4456					this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]][arg[6]][arg[7]][arg[8]] = val;
4457					break;
4458				default:
4459					return;
4460					break;
4461			}
4462			this.sendJS('configChange', this.ckplayerConfig);
4463		},
4464		custom: function() {
4465			if(!this.loaded) {
4466				return;
4467			}
4468			if(this.playerType == 'flashplayer') {
4469				this.V.custom(arguments);
4470				return;
4471			}
4472		},
4473		getConfig: function() {
4474			if(!this.loaded) {
4475				return null;
4476			}
4477			if(this.playerType == 'flashplayer') {
4478				return this.V.getConfig(arguments);
4479			}
4480		},
4481		openUrl: function(n) {
4482			if(!this.loaded) {
4483				return;
4484			}
4485			if(this.playerType == 'flashplayer') {
4486				this.V.openUrl(n);
4487				return;
4488			}
4489		},
4490		/*
4491			接口函数
4492			清除视频
4493		*/
4494		videoClear: function() {
4495			if(!this.loaded) {
4496				return;
4497			}
4498			if(this.playerType == 'flashplayer') {
4499				this.V.videoClear();
4500				return;
4501			}
4502		},
4503		/*
4504			接口函数
4505			向播放器传递新的视频地址
4506		*/
4507		newVideo: function(c) {
4508			if(this.playerType == 'flashplayer') {
4509				this.V.newVideo(c);
4510				return;
4511			} else {
4512				this.embed(c);
4513			}
4514		},
4515		/*
4516			接口函数
4517			截图
4518		*/
4519		screenshot: function(obj, save, name) {
4520			if(!this.loaded) {
4521				return;
4522			}
4523			if(this.playerType == 'flashplayer') {
4524				try {
4525					this.V.screenshot(obj, save, name);
4526				} catch(error) {
4527					this.log(error);
4528				}
4529				return;
4530			}
4531			if(obj == 'video') {
4532				var newCanvas = document.createElement('canvas');
4533				newCanvas.width = this.V.videoWidth;
4534				newCanvas.height = this.V.videoHeight;
4535				newCanvas.getContext('2d').drawImage(this.V, 0, 0, this.V.videoWidth, this.V.videoHeight);
4536				try {
4537					var base64 = newCanvas.toDataURL('image/jpeg');
4538					this.sendJS('screenshot', {
4539						object: obj,
4540						save: save,
4541						name: name,
4542						base64: base64
4543					});
4544				} catch(error) {
4545					this.log(error);
4546				}
4547			}
4548		},
4549		/*
4550			接口函数
4551			改变播放器尺寸
4552		*/
4553		changeSize: function(w, h) {
4554			if(this.isUndefined(w)) {
4555				w = 0;
4556			}
4557			if(this.isUndefined(h)) {
4558				h = 0;
4559			}
4560			if(w > 0) {
4561				this.css(this.CD, 'width', w + 'px');
4562			}
4563			if(h > 0) {
4564				this.css(this.CD, 'height', h + 'px');
4565			}
4566			if(this.html5Video) {
4567				this.elementCoordinate();
4568			}
4569		},
4570		/*
4571			接口函数
4572			改变视频播放速度
4573		*/
4574		changePlaybackRate: function(n) {
4575			if(this.html5Video) {
4576				var arr = this.playbackRateArr;
4577				n = parseInt(n);
4578				if(n < arr.length) {
4579					this.newPlaybackrate(arr[n][1]);
4580				}
4581			}
4582		},
4583		/*
4584			内部函数
4585			注册控制控制栏显示与隐藏函数
4586		*/
4587		changeControlBarShow: function(show) {
4588			if(!this.loaded) {
4589				return;
4590			}
4591			if(this.playerType == 'flashplayer') {
4592				this.V.changeControlBarShow(show);
4593				return;
4594			}
4595			if(show) {
4596				this.controlBarIsShow = true;
4597				this.controlBarHide(false);
4598			} else {
4599				this.controlBarIsShow = false;
4600				this.controlBarHide(true);
4601			}
4602		},
4603		/*
4604			-----------------------------------------------------------------------
4605			调用flashplayer
4606		*/
4607		embedSWF: function() {
4608			var vid = this.randomString();
4609			var flashvars = this.getFlashVars();
4610			var param = this.getFlashplayerParam();
4611			var flashplayerUrl = 'http://www.macromedia.com/go/getflashplayer';
4612			var html = '',
4613				src = javascriptPath + 'ckplayer.swf';
4614			id = 'id="' + vid + '" name="' + vid + '" ';
4615			html += '<object pluginspage="' + flashplayerUrl + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,3,0,0" width="100%" height="100%" ' + id + ' align="middle">';
4616			html += param['v'];
4617			html += '<param name="movie" value="' + src + '">';
4618			html += '<param name="flashvars" value="' + flashvars + '">';
4619			html += '<embed ' + param['w'] + ' src="' + src + '" flashvars="' + flashvars + '" width="100%" height="100%" ' + id + ' align="middle" type="application/x-shockwave-flash" pluginspage="' + flashplayerUrl + '" />';
4620			html += '</object>';
4621			this.PD.innerHTML = html;
4622			this.V = this.getObjectById(vid); //V:定义播放器对象全局变量
4623			this.playerType = 'flashplayer';
4624			//this.loaded=true;
4625		},
4626		/*
4627			内置函数
4628			将vars对象转换成字符
4629		*/
4630		getFlashVars: function() {
4631			this.getVarsObject();
4632			var v = this.vars;
4633			var z = '';
4634			for(k in v) {
4635				if(k != 'flashplayer' && k != 'container' && v[k] != '') {
4636					if(z != '') {
4637						z += '&';
4638					}
4639					var vk = v[k];
4640					if(vk == true) {
4641						vk = 1;
4642					}
4643					if(vk == false) {
4644						vk = 0;
4645					}
4646					z += k + '=' + vk;
4647				}
4648
4649			}
4650			if(!v.hasOwnProperty('volume') || !v['volume']) {
4651				if(z != '') {
4652					z += '&';
4653				}
4654				z += 'volume=0';
4655			}
4656			return z;
4657		},
4658		/*
4659			内置函数
4660			将vars格式化成flash能接受的对象。再由getFlashVars函数转化成字符串或由newVideo直接使用
4661		*/
4662		getVarsObject: function() {
4663			var v = this.vars;
4664			var f = '',
4665				d = '',
4666				w = ''; //f=视频地址,d=清晰度地址,w=权重,z=最终地址
4667			var arr = this.VA;
4668			var prompt = v['promptSpot'];
4669			var i = 0;
4670			var video = this.vars['video'];
4671			if(typeof(video) == 'object') { //对象或数组
4672				if(!this.isUndefined(typeof(video.length))) { //说明是数组
4673					var arr = video;
4674					for(i = 0; i < arr.length; i++) {
4675						var arr2 = arr[i];
4676						if(arr2) {
4677							if(f != '') {
4678								f += this.ckplayerConfig['config']['split'];
4679								d += ',';
4680								w += ',';
4681								v['type']+=this.ckplayerConfig['config']['split'];
4682							}
4683							f += encodeURIComponent(decodeURIComponent(arr2[0]));
4684							d += arr2[2];
4685							w += arr2[3];
4686							v['type']+=arr2[1].replace('video/','');
4687						}
4688					}
4689				} else {
4690					f = encodeURIComponent(decodeURIComponent(video['file']));
4691					if(!this.isUndefined(video['type'])) {
4692						v['type'] = video['type'];
4693					}
4694					d = '';
4695					w = '';
4696				}
4697			} else {
4698				f = encodeURIComponent(decodeURIComponent(video));
4699			}
4700			if(v['preview'] != null) {
4701				v['previewscale'] = v['preview']['scale'];
4702				v['preview'] = v['preview']['file'].join(',');
4703
4704			}
4705			if(prompt != null) {
4706				v['promptspot'] = '';
4707				v['promptspottime'] = '';
4708				for(i = 0; i < prompt.length; i++) {
4709					if(v['promptspot'] != '') {
4710						v['promptspot'] += ',';
4711						v['promptspottime'] += ',';
4712					}
4713					v['promptspot'] += prompt[i]['words'];
4714					v['promptspottime'] += prompt[i]['time'];
4715				}
4716
4717			}
4718			if(f != '') {
4719				v['video'] = f;
4720				v['definition'] = d;
4721				v['weight'] = w;
4722			}
4723			if(!v['volume']) {
4724				v['volume'] = 0;
4725			}
4726			var newV = {};
4727
4728			for(var k in v) {
4729				if(v[k] != null) {
4730					newV[k] = v[k];
4731				}
4732				if(k == 'type') {
4733					newV[k] = v[k].replace('video/m3u8', 'm3u8');
4734				}
4735			}
4736
4737			this.vars = newV;
4738		},
4739		/*
4740			内置函数
4741			将embedSWF里的param的对象进行转换
4742		*/
4743		getFlashplayerParam: function() {
4744			var w = '',
4745				v = '',
4746				o = {
4747					allowScriptAccess: 'always',
4748					allowFullScreen: true,
4749					quality: 'high',
4750					bgcolor: '#000'
4751				};
4752			for(var e in o) {
4753				w += e + '="' + o[e] + '" ';
4754				v += '<param name="' + e + '" value="' + o[e] + '" />';
4755			}
4756			w = w.replace('movie=', 'src=');
4757			return {
4758				w: w,
4759				v: v
4760			};
4761		},
4762
4763		/*
4764			操作动作结束
4765			-----------------------------------------------------------------------
4766
4767			接口函数
4768			获取元数据部分
4769		*/
4770		getMetaDate: function() {
4771			if(!this.loaded || this.V == null) {
4772				return false;
4773			}
4774			if(this.playerType == 'html5video') {
4775				var duration = 0;
4776				try {
4777					duration = !isNaN(this.V.duration) ? this.V.duration : 0;
4778				} catch(event) {this.log(event);}
4779				var data = {
4780					duration: duration,
4781					volume: this.V.volume,
4782					playbackRate: this.V.playbackRate,
4783					width: this.PD.offsetWidth || this.V.offsetWidth || this.V.width,
4784					height: this.PD.offsetHeight || this.V.offsetHeight || this.V.height,
4785					streamWidth: this.V.videoWidth,
4786					streamHeight: this.V.videoHeight,
4787					videoWidth: this.V.offsetWidth,
4788					videoHeight: this.V.offsetHeight,
4789					paused: this.V.paused
4790				};
4791				return data;
4792			} else {
4793				try{
4794					return this.V.getMetaDate();
4795				}
4796				catch(event){
4797					this.log(event);
4798				}
4799			}
4800			return false;
4801		},
4802		/*
4803			接口函数
4804			取当前提供给播放器播放的视频列表
4805		*/
4806		getVideoUrl: function() {
4807			if(this.playerType == 'flashplayer') {
4808				return this.V.getVideoUrl();
4809			}
4810			var arr = [];
4811			if(this.V.src) {
4812				arr.push(this.V.src);
4813			} else {
4814				var uArr = this.V.childNodes;
4815				for(var i = 0; i < uArr.length; i++) {
4816					arr.push(uArr[i].src);
4817				}
4818			}
4819			return arr;
4820		},
4821		/*
4822			内置函数
4823			格式化函数
4824		*/
4825		clickEvent: function(call) {
4826			if(call == 'none' || call == '' || call == null) {
4827				return {
4828					type: 'none'
4829				};
4830			}
4831			var callArr = call.split('->');
4832			var type = '',
4833				fun = '',
4834				link = '',
4835				target = '';
4836			if(callArr.length == 2) {
4837				var callM = callArr[0];
4838				var callE = callArr[1];
4839				if(!callE) {
4840					return {
4841						type: 'none'
4842					};
4843				}
4844				var val = '';
4845				var eArr = [];
4846				type = callM;
4847				switch(callM) {
4848					case 'actionScript':
4849						//trace(THIS.hasOwnProperty(callE));
4850
4851						if(callE.indexOf('(') > -1) {
4852							eArr = callE.split('(');
4853							callE = eArr[0];
4854							val = eArr[1].replace(')', '');
4855						}
4856						if(val == '') {
4857							fun = 'thisTemp.' + callE + '()';
4858						} else {
4859							fun = 'thisTemp.' + callE + '(' + val + ')';
4860						}
4861						break;
4862					case 'javaScript':
4863						if(callE.substr(0, 11) == '[flashvars]') {
4864							callE = callE.substr(11);
4865							if(this.vars.hasOwnProperty(callE)) {
4866								callE = this.vars[callE];
4867							} else {
4868								break;
4869							}
4870
4871						}
4872						if(callE.indexOf('(') > -1) {
4873							eArr = callE.split('(');
4874							callE = eArr[0];
4875							val = eArr[1].replace(')', '');
4876						}
4877						if(val == '') {
4878							fun = callE + '()';
4879						} else {
4880							fun = callE + '(' + val + ')';
4881						}
4882						break;
4883					case "link":
4884						var callLink = (callE + ',').split(',');
4885						if(callLink[0].substr(0, 11) == '[flashvars]') {
4886							var fl = callLink[0].replace('[flashvars]', '');
4887							if(this.vars.hasOwnProperty(fl)) {
4888								callLink[0] = this.vars[fl];
4889							} else {
4890								break;
4891							}
4892						}
4893						if(!callLink[1]) {
4894							callLink[1] = '_blank';
4895						}
4896						link = callLink[0];
4897						target = callLink[1];
4898						break;
4899				}
4900			}
4901			return {
4902				type: type,
4903				fun: fun,
4904				link: link,
4905				target: target
4906			}
4907		},
4908		/*
4909			内置函数
4910			向播放器界面添加一个文本
4911		*/
4912		addElement: function(attribute) {
4913			var thisTemp = this;
4914			if(this.playerType == 'flashplayer') {
4915				return this.V.addElement(attribute);
4916			}
4917			var i = 0;
4918			var obj = {
4919				list: null,
4920				x: '100%',
4921				y: "50%",
4922				position: null,
4923				alpha: 1,
4924				backgroundColor: '',
4925				backAlpha: 1,
4926				backRadius: 0,
4927				clickEvent: ''
4928			};
4929			obj = this.standardization(obj, attribute);
4930			var list = obj['list'];
4931			if(list == null) {
4932				return '';
4933			}
4934			var id = 'element' + this.randomString(10);
4935			var ele = document.createElement('div');
4936			ele.className = id;
4937			if(obj['x']) {
4938				ele.setAttribute('data-x', obj['x']);
4939			}
4940			if(obj['y']) {
4941				ele.setAttribute('data-y', obj['y']);
4942			}
4943			if(obj['position'] != null) {
4944				ele.setAttribute('data-position', obj['position'].join(','));
4945			}
4946
4947			this.PD.appendChild(ele);
4948			var eid = this.getByElement(id);
4949			this.css(eid, {
4950				position: 'absolute',
4951				filter: 'alpha(opacity:' + obj['alpha'] + ')',
4952				opacity: obj['alpha'].toString(),
4953				width: '800px',
4954				zIndex: '20'
4955			});
4956			var bgid = 'elementbg' + this.randomString(10);
4957			var bgAlpha = obj['alpha'].toString();
4958			var bgColor = obj['backgroundColor'].replace('0x', '#');
4959			var html = '';
4960			var idArr = [];
4961			var clickArr = [];
4962			if(!this.isUndefined(list) && list.length > 0) {
4963				var textObj, returnObj, clickEvent;
4964				for(i = 0; i < list.length; i++) {
4965					var newEleid = 'elementnew' + this.randomString(10);
4966					switch(list[i]['type']) {
4967						case 'image':
4968						case 'png':
4969						case 'jpg':
4970						case 'jpeg':
4971						case 'gif':
4972							textObj = {
4973								type: 'image',
4974								file: '',
4975								radius: 0, //圆角弧度
4976								width: 30, //定义宽,必需要定义
4977								height: 30, //定义高,必需要定义
4978								alpha: 1, //透明度
4979								paddingLeft: 0, //左边距离
4980								paddingRight: 0, //右边距离
4981								paddingTop: 0,
4982								paddingBottom: 0,
4983								marginLeft: 0,
4984								marginRight: 0,
4985								marginTop: 0,
4986								marginBottom: 0,
4987								backgroundColor: '',
4988								clickEvent: ''
4989							};
4990
4991							list[i] = this.standardization(textObj, list[i]);
4992							clickEvent = this.clickEvent(list[i]['clickEvent']);
4993							clickArr.push(clickEvent);
4994							if(clickEvent['type'] == 'link') {
4995								html += '<div class="' + newEleid + '" data-i="' + i + '"><a href="' + clickEvent['link'] + '" target="' + clickEvent['target'] + '"><img class="' + newEleid + '_image" src="' + list[i]['file'] + '" style="border:0;"></a></div>';
4996							} else {
4997								html += '<div class="' + newEleid + '" data-i="' + i + '"><img class="' + newEleid + '_image" src="' + list[i]['file'] + '" style="border:0;"></div>';
4998							}
4999							break;
5000						case 'text':
5001							textObj = {
5002								type: 'text', //说明是文本
5003								text: '', //文本内容
5004								color: '0xFFFFFF',
5005								size: 14,
5006								font: this.fontFamily,
5007								leading: 0,
5008								alpha: 1, //透明度
5009								paddingLeft: 0, //左边距离
5010								paddingRight: 0, //右边距离
5011								paddingTop: 0,
5012								paddingBottom: 0,
5013								marginLeft: 0,
5014								marginRight: 0,
5015								marginTop: 0,
5016								marginBottom: 0,
5017								backgroundColor: '',
5018								backAlpha: 1,
5019								backRadius: 0, //背景圆角弧度,支持数字统一设置,也支持分开设置[30,20,20,50],对应上左,上右,下右,下左
5020								clickEvent: ''
5021							};
5022							list[i] = this.standardization(textObj, list[i]);
5023							clickEvent = this.clickEvent(list[i]['clickEvent']);
5024							clickArr.push(clickEvent);
5025							if(clickEvent['type'] == 'link') {
5026								html += '<div class="' + newEleid + '" data-i="' + i + '"><div class="' + newEleid + '_bg"></div><div class="' + newEleid + '_text"><a href="' + clickEvent['link'] + '" target="' + clickEvent['target'] + '">' + list[i]['text'] + '</a></div></div>';
5027							} else {
5028								html += '<div  class="' + newEleid + '" data-i="' + i + '"><div class="' + newEleid + '_bg"></div><div class="' + newEleid + '_text">' + list[i]['text'] + '</div></div>';
5029							}
5030							break;
5031						default:
5032							break;
5033					}
5034					idArr.push(newEleid);
5035				}
5036			}
5037			var objClickEvent = this.clickEvent(obj['clickEvent']);
5038			/*if(objClickEvent['type']=='link'){
5039				html = '<a href="'+objClickEvent['link']+'" target="'+objClickEvent['target']+'">' + html + '</a>';
5040			}*/
5041			eid.innerHTML = '<div class="' + bgid + '"></div><div class="' + bgid + '_c">' + html + '</div>';
5042			if(objClickEvent['type'] == 'javaScript' || objClickEvent['type'] == 'actionScript') {
5043				var objClickHandler = function() {
5044					eval(objClickEvent['fun']);
5045					thisTemp.sendJS('clickEvent', clk['type'] + '->' + clk['fun'].replace('thisTemp.', '').replace('()', ''));
5046				};
5047				this.addListenerInside('click', objClickHandler, this.getByElement(bgid + '_c'))
5048			}
5049			this.css(bgid + '_c', {
5050				position: 'absolute',
5051				zIndex: '2'
5052			});
5053			for(i = 0; i < idArr.length; i++) {
5054				var clk = clickArr[i];
5055
5056				if(clk['type'] == 'javaScript' || clk['type'] == 'actionScript') {
5057					var clickHandler = function() {
5058						clk = clickArr[this.getAttribute('data-i')];
5059						eval(clk['fun']);
5060						thisTemp.sendJS('clickEvent', clk['type'] + '->' + clk['fun'].replace('thisTemp.', '').replace('()', ''));
5061					};
5062					this.addListenerInside('click', clickHandler, this.getByElement(idArr[i]))
5063				}
5064				switch(list[i]['type']) {
5065					case 'image':
5066					case 'png':
5067					case 'jpg':
5068					case 'jpeg':
5069					case 'gif':
5070						this.css(idArr[i], {
5071							float: 'left',
5072							width: list[i]['width'] + 'px',
5073							height: list[i]['height'] + 'px',
5074							filter: 'alpha(opacity:' + list[i]['alpha'] + ')',
5075							opacity: list[i]['alpha'].toString(),
5076							marginLeft: list[i]['marginLeft'] + 'px',
5077							marginRight: list[i]['marginRight'] + 'px',
5078							marginTop: list[i]['marginTop'] + 'px',
5079							marginBottom: list[i]['marginBottom'] + 'px',
5080							borderRadius: list[i]['radius'] + 'px',
5081							cursor: 'pointer'
5082						});
5083						this.css(idArr[i] + '_image', {
5084							width: list[i]['width'] + 'px',
5085							height: list[i]['height'] + 'px',
5086							borderRadius: list[i]['radius'] + 'px'
5087						});
5088						break;
5089					case 'text':
5090						this.css(idArr[i] + '_text', {
5091							filter: 'alpha(opacity:' + list[i]['alpha'] + ')',
5092							opacity: list[i]['alpha'].toString(),
5093							borderRadius: list[i]['radius'] + 'px',
5094							fontFamily: list[i]['font'],
5095							fontSize: list[i]['size'] + 'px',
5096							color: list[i]['color'].replace('0x', '#'),
5097							lineHeight: list[i]['leading'] > 0 ? list[i]['leading'] + 'px' : '',
5098							paddingLeft: list[i]['paddingLeft'] + 'px',
5099							paddingRight: list[i]['paddingRight'] + 'px',
5100							paddingTop: list[i]['paddingTop'] + 'px',
5101							paddingBottom: list[i]['paddingBottom'] + 'px',
5102							whiteSpace: 'nowrap',
5103							position: 'absolute',
5104							zIndex: '3',
5105							cursor: 'pointer'
5106						});
5107						this.css(idArr[i], {
5108							float: 'left',
5109							width: this.getByElement(idArr[i] + '_text').offsetWidth + 'px',
5110							height: this.getByElement(idArr[i] + '_text').offsetHeight + 'px',
5111							marginLeft: list[i]['marginLeft'] + 'px',
5112							marginRight: list[i]['marginRight'] + 'px',
5113							marginTop: list[i]['marginTop'] + 'px',
5114							marginBottom: list[i]['marginBottom'] + 'px'
5115						});
5116						this.css(idArr[i] + '_bg', {
5117							width: this.getByElement(idArr[i] + '_text').offsetWidth + 'px',
5118							height: this.getByElement(idArr[i] + '_text').offsetHeight + 'px',
5119							filter: 'alpha(opacity:' + list[i]['backAlpha'] + ')',
5120							opacity: list[i]['backAlpha'].toString(),
5121							borderRadius: list[i]['backRadius'] + 'px',
5122							backgroundColor: list[i]['backgroundColor'].replace('0x', '#'),
5123							position: 'absolute',
5124							zIndex: '2'
5125						});
5126						break;
5127					default:
5128						break;
5129				}
5130			}
5131			this.css(bgid, {
5132				width: this.getByElement(bgid + '_c').offsetWidth + 'px',
5133				height: this.getByElement(bgid + '_c').offsetHeight + 'px',
5134				position: 'absolute',
5135				filter: 'alpha(opacity:' + bgAlpha + ')',
5136				opacity: bgAlpha,
5137				backgroundColor: bgColor.replace('0x', '#'),
5138				borderRadius: obj['backRadius'] + 'px',
5139				zIndex: '1'
5140			});
5141			this.css(eid, {
5142				width: this.getByElement(bgid).offsetWidth + 'px',
5143				height: this.getByElement(bgid).offsetHeight + 'px'
5144			});
5145			var eidCoor = this.calculationCoor(eid);
5146			this.css(eid, {
5147				left: eidCoor['x'] + 'px',
5148				top: eidCoor['y'] + 'px'
5149			});
5150
5151			this.elementArr.push(eid.className);
5152			return eid;
5153		},
5154		/*
5155			内置函数
5156			获取元件的属性,包括x,y,width,height,alpha
5157		*/
5158		getElement: function(element) {
5159			if(this.playerType == 'flashplayer') {
5160				return this.V.getElement(element);
5161			}
5162			var ele = element;
5163			if(typeof(element) == 'string') {
5164				ele = this.getByElement(element);
5165			}
5166			var coor = this.getCoor(ele);
5167			return {
5168				x: coor['x'],
5169				y: coor['y'],
5170				width: ele.offsetWidth,
5171				height: ele.offsetHeight,
5172				alpha: !this.isUndefined(this.css(ele, 'opacity')) ? parseFloat(this.css(ele, 'opacity')) : 1
5173			};
5174		},
5175		/*
5176			内置函数
5177			根据节点的x,y计算在播放器里的坐标
5178		*/
5179		calculationCoor: function(ele) {
5180			if(this.playerType == 'flashplayer') {
5181				return this.V.calculationCoor(ele);
5182			}
5183			if(ele == []) {
5184				return;
5185			}
5186			var x, y, position = [];
5187			var w = this.PD.offsetWidth,
5188				h = this.PD.offsetHeight;
5189			var ew = ele.offsetWidth,
5190				eh = ele.offsetHeight;
5191			if(!this.isUndefined(this.getDataset(ele, 'x'))) {
5192				x = this.getDataset(ele, 'x');
5193			}
5194			if(!this.isUndefined(this.getDataset(ele, 'y'))) {
5195				y = this.getDataset(ele, 'y');
5196			}
5197			if(!this.isUndefined(this.getDataset(ele, 'position'))) {
5198				try{
5199					position = this.getDataset(ele, 'position').toString().split(',');
5200				}
5201				catch(event){}
5202			}
5203			if(position.length > 0) {
5204				position.push(null, null, null, null);
5205				var i = 0;
5206				for(i = 0; i < position.length; i++) {
5207					if(this.isUndefined(position[i]) || position[i] == null || position[i] == 'null' || position[i] == '') {
5208						position[i] = null;
5209					} else {
5210						position[i] = parseFloat(position[i]);
5211					}
5212				}
5213
5214				if(position[2] == null) {
5215					switch(position[0]) {
5216						case 0:
5217							x = 0;
5218							break;
5219						case 1:
5220							x = parseInt((w - ew) * 0.5);
5221							break;
5222						default:
5223							x = w - ew;
5224							break;
5225					}
5226				} else {
5227					switch(position[0]) {
5228						case 0:
5229							x = position[2];
5230							break;
5231						case 1:
5232							x = parseInt(w * 0.5) + position[2];
5233							break;
5234						default:
5235							x = w + position[2];
5236							break;
5237					}
5238				}
5239				if(position[3] == null) {
5240					switch(position[1]) {
5241						case 0:
5242							y = 0;
5243							break;
5244						case 1:
5245							y = parseInt((h - eh) * 0.5);
5246							break;
5247						default:
5248							y = h - eh;
5249							break;
5250					}
5251				} else {
5252					switch(position[1]) {
5253						case 0:
5254							y = position[3];
5255							break;
5256						case 1:
5257							y = parseInt(h * 0.5) + position[3];
5258							break;
5259						default:
5260							y = h + position[3];
5261							break;
5262					}
5263				}
5264			} else {
5265				if(x.substring(x.length - 1, x.length) == '%') {
5266					x = Math.floor(parseInt(x.substring(0, x.length - 1)) * w * 0.01);
5267				}
5268				if(y.substring(y.length - 1, y.length) == '%') {
5269					y = Math.floor(parseInt(y.substring(0, y.length - 1)) * h * 0.01);
5270				}
5271			}
5272			return {
5273				x: x,
5274				y: y
5275			}
5276
5277		},
5278		/*
5279			内置函数
5280			修改新增元件的坐标
5281		*/
5282		changeElementCoor: function() {
5283			for(var i = 0; i < this.elementArr.length; i++) {
5284				if(this.getByElement(this.elementArr[i]) != []) {
5285					var c = this.calculationCoor(this.getByElement(this.elementArr[i]));
5286					if(c['x'] && c['y']){
5287						this.css(this.elementArr[i], {
5288							top: c['y'] + 'px',
5289							left: c['x'] + 'px'
5290						});
5291					}
5292				}
5293			}
5294		},
5295		/*
5296			内置函数
5297			缓动效果集
5298		*/
5299		tween: function() {
5300			var Tween = {
5301				None: { //均速运动
5302					easeIn: function(t, b, c, d) {
5303						return c * t / d + b;
5304					},
5305					easeOut: function(t, b, c, d) {
5306						return c * t / d + b;
5307					},
5308					easeInOut: function(t, b, c, d) {
5309						return c * t / d + b;
5310					}
5311				},
5312				Quadratic: {
5313					easeIn: function(t, b, c, d) {
5314						return c * (t /= d) * t + b;
5315					},
5316					easeOut: function(t, b, c, d) {
5317						return -c * (t /= d) * (t - 2) + b;
5318					},
5319					easeInOut: function(t, b, c, d) {
5320						if((t /= d / 2) < 1) return c / 2 * t * t + b;
5321						return -c / 2 * ((--t) * (t - 2) - 1) + b;
5322					}
5323				},
5324				Cubic: {
5325					easeIn: function(t, b, c, d) {
5326						return c * (t /= d) * t * t + b;
5327					},
5328					easeOut: function(t, b, c, d) {
5329						return c * ((t = t / d - 1) * t * t + 1) + b;
5330					},
5331					easeInOut: function(t, b, c, d) {
5332						if((t /= d / 2) < 1) return c / 2 * t * t * t + b;
5333						return c / 2 * ((t -= 2) * t * t + 2) + b;
5334					}
5335				},
5336				Quartic: {
5337					easeIn: function(t, b, c, d) {
5338						return c * (t /= d) * t * t * t + b;
5339					},
5340					easeOut: function(t, b, c, d) {
5341						return -c * ((t = t / d - 1) * t * t * t - 1) + b;
5342					},
5343					easeInOut: function(t, b, c, d) {
5344						if((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
5345						return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
5346					}
5347				},
5348				Quintic: {
5349					easeIn: function(t, b, c, d) {
5350						return c * (t /= d) * t * t * t * t + b;
5351					},
5352					easeOut: function(t, b, c, d) {
5353						return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
5354					},
5355					easeInOut: function(t, b, c, d) {
5356						if((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
5357						return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
5358					}
5359				},
5360				Sine: {
5361					easeIn: function(t, b, c, d) {
5362						return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
5363					},
5364					easeOut: function(t, b, c, d) {
5365						return c * Math.sin(t / d * (Math.PI / 2)) + b;
5366					},
5367					easeInOut: function(t, b, c, d) {
5368						return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
5369					}
5370				},
5371				Exponential: {
5372					easeIn: function(t, b, c, d) {
5373						return(t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
5374					},
5375					easeOut: function(t, b, c, d) {
5376						return(t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
5377					},
5378					easeInOut: function(t, b, c, d) {
5379						if(t == 0) return b;
5380						if(t == d) return b + c;
5381						if((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
5382						return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
5383					}
5384				},
5385				Circular: {
5386					easeIn: function(t, b, c, d) {
5387						return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
5388					},
5389					easeOut: function(t, b, c, d) {
5390						return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
5391					},
5392					easeInOut: function(t, b, c, d) {
5393						if((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
5394						return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
5395					}
5396				},
5397				Elastic: {
5398					easeIn: function(t, b, c, d, a, p) {
5399						if(t == 0) return b;
5400						if((t /= d) == 1) return b + c;
5401						if(!p) p = d * .3;
5402						if(!a || a < Math.abs(c)) {
5403							a = c;
5404							var s = p / 4;
5405						} else var s = p / (2 * Math.PI) * Math.asin(c / a);
5406						return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
5407					},
5408					easeOut: function(t, b, c, d, a, p) {
5409						if(t == 0) return b;
5410						if((t /= d) == 1) return b + c;
5411						if(!p) p = d * .3;
5412						if(!a || a < Math.abs(c)) {
5413							a = c;
5414							var s = p / 4;
5415						} else var s = p / (2 * Math.PI) * Math.asin(c / a);
5416						return(a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b);
5417					},
5418					easeInOut: function(t, b, c, d, a, p) {
5419						if(t == 0) return b;
5420						if((t /= d / 2) == 2) return b + c;
5421						if(!p) p = d * (.3 * 1.5);
5422						if(!a || a < Math.abs(c)) {
5423							a = c;
5424							var s = p / 4;
5425						} else var s = p / (2 * Math.PI) * Math.asin(c / a);
5426						if(t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
5427						return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
5428					}
5429				},
5430				Back: {
5431					easeIn: function(t, b, c, d, s) {
5432						if(s == undefined) s = 1.70158;
5433						return c * (t /= d) * t * ((s + 1) * t - s) + b;
5434					},
5435					easeOut: function(t, b, c, d, s) {
5436						if(s == undefined) s = 1.70158;
5437						return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
5438					},
5439					easeInOut: function(t, b, c, d, s) {
5440						if(s == undefined) s = 1.70158;
5441						if((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
5442						return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
5443					}
5444				},
5445				Bounce: {
5446					easeIn: function(t, b, c, d) {
5447						return c - Tween.Bounce.easeOut(d - t, 0, c, d) + b;
5448					},
5449					easeOut: function(t, b, c, d) {
5450						if((t /= d) < (1 / 2.75)) {
5451							return c * (7.5625 * t * t) + b;
5452						} else if(t < (2 / 2.75)) {
5453							return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
5454						} else if(t < (2.5 / 2.75)) {
5455							return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
5456						} else {
5457							return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
5458						}
5459					},
5460					easeInOut: function(t, b, c, d) {
5461						if(t < d / 2) return Tween.Bounce.easeIn(t * 2, 0, c, d) * .5 + b;
5462						else return Tween.Bounce.easeOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
5463					}
5464				}
5465			};
5466			return Tween;
5467		},
5468		/*
5469			接口函数
5470			缓动效果
5471			ele:Object=需要缓动的对象,
5472			parameter:String=需要改变的属性:x,y,width,height,alpha,
5473			effect:String=效果名称,
5474			start:Int=起始值,
5475			end:Int=结束值,
5476			speed:Number=运动的总秒数,支持小数
5477		*/
5478		animate: function(attribute) {
5479			if(this.playerType == 'flashplayer') {
5480				return this.V.animate(attribute);
5481			}
5482			var thisTemp = this;
5483			var animateId = 'animate_' + this.randomString();
5484			var obj = {
5485				element: null,
5486				parameter: 'x',
5487				static: false,
5488				effect: 'None.easeIn',
5489				start: null,
5490				end: null,
5491				speed: 0,
5492				overStop: false,
5493				pauseStop: false, //暂停播放时缓动是否暂停
5494				callBack: null
5495			};
5496			obj = this.standardization(obj, attribute);
5497			if(obj['element'] == null || obj['speed'] == 0) {
5498				return false;
5499			}
5500			var w = this.PD.offsetWidth,
5501				h = this.PD.offsetHeight;
5502			var effArr = (obj['effect'] + '.').split('.');
5503			var tweenFun = this.tween()[effArr[0]][effArr[1]];
5504			var eleCoor = {
5505				x: 0,
5506				y: 0
5507			};
5508			if(this.isUndefined(tweenFun)) {
5509				return false;
5510			}
5511			//先将该元件从元件数组里删除,让其不再跟随播放器的尺寸改变而改变位置
5512			var def = this.arrIndexOf(this.elementArr, obj['element'].className);
5513			if(def > -1) {
5514				this.elementArr.splice(def, 1);
5515			}
5516			//var run = true;
5517			var css = {};
5518			//对传递的参数进行转化,x和y转化成left,top
5519			var pm = this.getElement(obj['element']); //包含x,y,width,height,alpha属性
5520			var t = 0; //当前时间
5521			var b = 0; //初始值
5522			var c = 0; //变化量
5523			var d = obj['speed'] * 1000; //持续时间
5524			var timerTween = null;
5525			var tweenObj = null;
5526			var start = obj['start'] == null ? '' : obj['start'].toString();
5527			var end = obj['end'] == null ? '' : obj['end'].toString();
5528			switch(obj['parameter']) {
5529				case 'x':
5530					if(obj['start'] == null) {
5531						b = pm['x'];
5532					} else {
5533						if(start.substring(start.length - 1, start.length) == '%') {
5534							b = parseInt(start) * w * 0.01;
5535						} else {
5536							b = parseInt(start);
5537						}
5538
5539					}
5540					if(obj['end'] == null) {
5541						c = pm['x'] - b;
5542					} else {
5543						if(end.substring(end.length - 1, end.length) == '%') {
5544							c = parseInt(end) * w * 0.01 - b;
5545						} else if(end.substring(0, 1) == '-' || end.substring(0, 1) == '+') {
5546							if(typeof(obj['end']) == 'number') {
5547								c = parseInt(obj['end']) - b;
5548							} else {
5549								c = parseInt(end);
5550							}
5551
5552						} else {
5553							c = parseInt(end) - b;
5554						}
5555					}
5556					break;
5557				case 'y':
5558					if(obj['start'] == null) {
5559						b = pm['y'];
5560					} else {
5561						if(start.substring(start.length - 1, start.length) == '%') {
5562							b = parseInt(start) * h * 0.01;
5563						} else {
5564							b = parseInt(start);
5565						}
5566
5567					}
5568					if(obj['end'] == null) {
5569						c = pm['y'] - b;
5570					} else {
5571						if(end.substring(end.length - 1, end.length) == '%') {
5572							c = parseInt(end) * h * 0.01 - b;
5573						} else if(end.substring(0, 1) == '-' || end.substring(0, 1) == '+') {
5574							if(typeof(obj['end']) == 'number') {
5575								c = parseInt(obj['end']) - b;
5576							} else {
5577								c = parseInt(end);
5578							}
5579						} else {
5580							c = parseInt(end) - b;
5581						}
5582					}
5583					break;
5584				case 'alpha':
5585					if(obj['start'] == null) {
5586						b = pm['alpha'] * 100;
5587					} else {
5588						if(start.substring(start.length - 1, start.length) == '%') {
5589							b = parseInt(obj['start']);
5590						} else {
5591							b = parseInt(obj['start'] * 100);
5592						}
5593
5594					}
5595					if(obj['end'] == null) {
5596						c = pm['alpha'] * 100 - b;
5597					} else {
5598						if(end.substring(end.length - 1, end.length) == '%') {
5599							c = parseInt(end) - b;
5600						} else if(end.substring(0, 1) == '-' || end.substring(0, 1) == '+') {
5601							if(typeof(obj['end']) == 'number') {
5602								c = parseInt(obj['end']) * 100 - b;
5603							} else {
5604								c = parseInt(obj['end']) * 100;
5605							}
5606						} else {
5607							c = parseInt(obj['end']) * 100 - b;
5608						}
5609					}
5610					break;
5611			}
5612			var callBack = function() {
5613				var index = thisTemp.arrIndexOf(thisTemp.animateElementArray, animateId);
5614				if(index > -1) {
5615					thisTemp.animateArray.splice(index, 1);
5616					thisTemp.animateElementArray.splice(index, 1);
5617				}
5618				index = thisTemp.arrIndexOf(thisTemp.animatePauseArray, animateId);
5619				if(index > -1) {
5620					thisTemp.animatePauseArray.splice(index, 1);
5621				}
5622				if(obj['callBack'] != null && obj['element'] && obj['callBack'] != 'callBack' && obj['callBack'] != 'tweenX' && obj['tweenY'] != 'callBack' && obj['callBack'] != 'tweenAlpha') {
5623					var cb = eval(obj['callBack']);
5624					cb(obj['element']);
5625					obj['callBack'] = null;
5626				}
5627			};
5628			var stopTween = function() {
5629				if(timerTween != null) {
5630					if(timerTween.runing) {
5631						timerTween.stop();
5632					}
5633					timerTween = null;
5634				}
5635			};
5636			var tweenX = function() {
5637				if(t < d) {
5638					t += 10;
5639					css = {
5640						left: Math.ceil(tweenFun(t, b, c, d)) + 'px'
5641					};
5642					if(obj['static']) {
5643						eleCoor = thisTemp.calculationCoor(obj['element']);
5644						css['top'] = eleCoor['y'] + 'px';
5645					}
5646					thisTemp.css(obj['element'], css);
5647
5648				} else {
5649					stopTween();
5650					thisTemp.elementArr.push(obj['element'].className);
5651					callBack();
5652				}
5653			};
5654			var tweenY = function() {
5655				if(t < d) {
5656					t += 10;
5657					css = {
5658						top: Math.ceil(tweenFun(t, b, c, d)) + 'px'
5659					};
5660					if(obj['static']) {
5661						eleCoor = thisTemp.calculationCoor(obj['element']);
5662						css['left'] = eleCoor['x'] + 'px';
5663					}
5664					thisTemp.css(obj['element'], css);
5665				} else {
5666					stopTween();
5667					thisTemp.elementArr.push(obj['element'].className);
5668					callBack();
5669				}
5670			};
5671			var tweenAlpha = function() {
5672				if(t < d) {
5673					t += 10;
5674					eleCoor = thisTemp.calculationCoor(obj['element']);
5675					var ap = Math.ceil(tweenFun(t, b, c, d)) * 0.01;
5676					css = {
5677						filter: 'alpha(opacity:' + ap + ')',
5678						opacity: ap.toString()
5679					};
5680					if(obj['static']) {
5681						eleCoor = thisTemp.calculationCoor(obj['element']);
5682						css['top'] = eleCoor['y'] + 'px';
5683						css['left'] = eleCoor['x'] + 'px';
5684					}
5685					thisTemp.css(obj['element'], css);
5686				} else {
5687					stopTween();
5688					thisTemp.elementArr.push(obj['element'].className);
5689					callBack();
5690				}
5691			};
5692			switch(obj['parameter']) {
5693				case 'x':
5694					tweenObj = tweenX;
5695					break;
5696				case 'y':
5697					tweenObj = tweenY;
5698					break;
5699				case 'alpha':
5700					tweenObj = tweenAlpha;
5701					break;
5702				default:
5703					break;
5704			}
5705			timerTween = new thisTemp.timer(10, tweenObj);
5706			timerTween.callBackFunction=callBack;
5707			if(obj['overStop']) {
5708				var mouseOver = function() {
5709					if(timerTween != null && timerTween.runing) {
5710						timerTween.stop();
5711					}
5712				};
5713				this.addListenerInside('mouseover', mouseOver, obj['element']);
5714				var mouseOut = function() {
5715					var start = true;
5716					if(obj['pauseStop'] && thisTemp.getMetaDate()['paused']) {
5717						start = false;
5718					}
5719					if(timerTween != null && !timerTween.runing && start) {
5720						timerTween.start();
5721					}
5722				};
5723				this.addListenerInside('mouseout', mouseOut, obj['element']);
5724			}
5725
5726			this.animateArray.push(timerTween);
5727			this.animateElementArray.push(animateId);
5728			if(obj['pauseStop']) {
5729				this.animatePauseArray.push(animateId);
5730			}
5731			return animateId;
5732		},
5733		/*
5734			接口函数函数
5735			继续运行animate
5736		*/
5737		animateResume: function(id) {
5738			if(this.playerType == 'flashplayer') {
5739				this.V.animateResume(this.isUndefined(id) ? '' : id);
5740				return;
5741			}
5742			var arr = [];
5743			if(id != '' && !this.isUndefined(id) && id != 'pause') {
5744				arr.push(id);
5745			} else {
5746				if(id === 'pause') {
5747					arr = this.animatePauseArray;
5748				} else {
5749					arr = this.animateElementArray;
5750				}
5751			}
5752			for(var i = 0; i < arr.length; i++) {
5753				var index = this.arrIndexOf(this.animateElementArray, arr[i]);
5754				if(index > -1) {
5755					this.animateArray[index].start();
5756				}
5757			}
5758
5759		},
5760		/*
5761			接口函数
5762			暂停运行animate
5763		*/
5764		animatePause: function(id) {
5765			if(this.playerType == 'flashplayer') {
5766				this.V.animatePause(this.isUndefined(id) ? '' : id);
5767				return;
5768			}
5769			var arr = [];
5770			if(id != '' && !this.isUndefined(id) && id != 'pause') {
5771				arr.push(id);
5772			} else {
5773				if(id === 'pause') {
5774					arr = this.animatePauseArray;
5775				} else {
5776					arr = this.animateElementArray;
5777				}
5778			}
5779			for(var i = 0; i < arr.length; i++) {
5780				var index = this.arrIndexOf(this.animateElementArray, arr[i]);
5781				if(index > -1) {
5782					this.animateArray[index].stop();
5783				}
5784			}
5785		},
5786		/*
5787			内置函数
5788			根据ID删除数组里对应的内容
5789		*/
5790		deleteAnimate: function(id) {
5791			if(this.playerType == 'flashplayer' && this.V) {
5792				try {
5793					this.V.deleteAnimate(id);
5794				} catch(event) {this.log(event);}
5795				return;
5796			}
5797
5798			var index = this.arrIndexOf(this.animateElementArray, id);
5799			if(index > -1) {
5800				this.animateArray[index].callBackFunction();
5801				this.animateArray.splice(index, 1);
5802				this.animateElementArray.splice(index, 1);
5803			}
5804		},
5805		/*
5806			内置函数
5807			删除外部新建的元件
5808		*/
5809		deleteElement: function(ele) {
5810			if(this.playerType == 'flashplayer' && this.V) {
5811				try {
5812					this.V.deleteElement(ele);
5813				} catch(event) {}
5814				return;
5815			}
5816			//先将该元件从元件数组里删除,让其不再跟随播放器的尺寸改变而改变位置
5817			var def = this.arrIndexOf(this.elementArr, ele.className);
5818			if(def > -1) {
5819				this.elementArr.splice(def, 1);
5820			}
5821			this.deleteAnimate(ele);
5822			this.deleteChild(ele);
5823
5824		},
5825		/*
5826			--------------------------------------------------------------
5827			共用函数部分
5828			以下函数并非只能在本程序中使用,也可以在页面其它项目中使用
5829			根据ID获取元素对象
5830		*/
5831		getByElement: function(obj, parent) {
5832			if(this.isUndefined(parent)) {
5833				parent = document;
5834			}
5835			var num = obj.substr(0, 1);
5836			var res = [];
5837			if(num != '#') {
5838				if(num == '.') {
5839					obj = obj.substr(1, obj.length);
5840				}
5841				if(parent.getElementsByClassName) {
5842					res = parent.getElementsByClassName(obj);
5843				} else {
5844					var reg = new RegExp(' ' + obj + ' ', 'i');
5845					var ele = parent.getElementsByTagName('*');
5846
5847					for(var i = 0; i < ele.length; i++) {
5848						if(reg.test(' ' + ele[i].className + ' ')) {
5849							res.push(ele[i]);
5850						}
5851					}
5852				}
5853
5854				if(res.length > 0) {
5855					return res[0];
5856				} else {
5857					return res;
5858				}
5859			} else {
5860				if(num == '#') {
5861					obj = obj.substr(1, obj.length);
5862				}
5863				return document.getElementById(obj);
5864			}
5865		},
5866		/*
5867		 	共用函数
5868			功能:修改样式或获取指定样式的值,
5869				elem:ID对象或ID对应的字符,如果多个对象一起设置,则可以使用数组
5870				attribute:样式名称或对象,如果是对象,则省略掉value值
5871				value:attribute为样式名称时,定义的样式值
5872				示例一:
5873				this.css(ID,'width','100px');
5874				示例二:
5875				this.css('id','width','100px');
5876				示例三:
5877				this.css([ID1,ID2,ID3],'width','100px');
5878				示例四:
5879				this.css(ID,{
5880					width:'100px',
5881					height:'100px'
5882				});
5883				示例五(获取宽度):
5884				var width=this.css(ID,'width');
5885		*/
5886		css: function(elem, attribute, value) {
5887			var i = 0;
5888			var k = '';
5889			if(typeof(elem) == 'object') { //对象或数组
5890				if(!this.isUndefined(typeof(elem.length))) { //说明是数组
5891					for(i = 0; i < elem.length; i++) {
5892						var el;
5893						if(typeof(elem[i]) == 'string') {
5894							el = this.getByElement(elem[i])
5895						} else {
5896							el = elem[i];
5897						}
5898						if(typeof(attribute) != 'object') {
5899							if(!this.isUndefined(value)) {
5900								el.style[attribute] = value;
5901							}
5902						} else {
5903							for(k in attribute) {
5904								if(!this.isUndefined(attribute[k])) {
5905									el.style[k] = attribute[k];
5906								}
5907							}
5908						}
5909					}
5910					return;
5911				}
5912
5913			}
5914			if(typeof(elem) == 'string') {
5915				elem = this.getByElement(elem);
5916			}
5917
5918			if(typeof(attribute) != 'object') {
5919				if(!this.isUndefined(value)) {
5920					elem.style[attribute] = value;
5921				} else {
5922					if(!this.isUndefined(this.getStyle(elem, attribute))) {
5923						return this.getStyle(elem, attribute);
5924					} else {
5925						return false;
5926					}
5927				}
5928			} else {
5929				for(k in attribute) {
5930					if(!this.isUndefined(attribute[k])) {
5931						elem.style[k] = attribute[k];
5932					}
5933				}
5934			}
5935
5936		},
5937		/*
5938			内置函数
5939			兼容型获取style
5940		*/
5941		getStyle: function(obj, attr) {
5942			if(!this.isUndefined(obj.style[attr])) {
5943				return obj.style[attr];
5944			} else {
5945				if(obj.currentStyle) {
5946					return obj.currentStyle[attr];
5947				} else {
5948					return getComputedStyle(obj, false)[attr];
5949				}
5950			}
5951		},
5952		/*
5953			共用函数
5954			判断变量是否存在或值是否为undefined
5955		*/
5956		isUndefined: function(value) {
5957			try {
5958				if(value == 'undefined' || value == undefined) {
5959					return true;
5960				}
5961			} catch(event) {this.log(event);}
5962			return false;
5963		},
5964		/*
5965		 	共用函数
5966			外部监听函数
5967		*/
5968		addListener: function(name, funName) {
5969			if(name && funName) {
5970				if(this.playerType == 'flashplayer') {
5971					var ff = ''; //定义用来向flashplayer传递的函数字符
5972					if(typeof(funName) == 'function') {
5973						ff = this.getParameterNames(funName);
5974					}
5975					this.V.addListener(name, ff);
5976					return;
5977				}
5978				var have = false;
5979				for(var i = 0; i < this.listenerJsArr.length; i++) {
5980					var arr = this.listenerJsArr[i];
5981					if(arr[0] == name && arr[1] == funName) {
5982						have = true;
5983						break;
5984					}
5985				}
5986				if(!have) {
5987					this.listenerJsArr.push([name, funName]);
5988				}
5989			}
5990		},
5991		/*
5992			共用函数
5993			外部删除监听函数
5994		*/
5995		removeListener: function(name, funName) {
5996			if(name && funName) {
5997				if(this.playerType == 'flashplayer') {
5998					var ff = ''; //定义用来向flashplayer传递的函数字符
5999					if(typeof(funName) == 'function') {
6000						ff = this.getParameterNames(funName);
6001					}
6002					this.V.removeListener(name, ff);
6003					return;
6004				}
6005				for(var i = 0; i < this.listenerJsArr.length; i++) {
6006					var arr = this.listenerJsArr[i];
6007					if(arr[0] == name && arr[1] == funName) {
6008						this.listenerJsArr.splice(i, 1);
6009						break;
6010					}
6011				}
6012			}
6013		},
6014		/*
6015			内部监听函数,调用方式:
6016			this.addListenerInside('click',function(event){},[ID]);
6017			d值为空时,则表示监听当前的视频播放器
6018		*/
6019		addListenerInside: function(e, f, d, t) {
6020			if(this.isUndefined(t)) {
6021				t = false;
6022			}
6023			var o = this.V;
6024			if(!this.isUndefined(d)) {
6025				o = d;
6026			}
6027			if(o.addEventListener) {
6028				try {
6029					o.addEventListener(e, f, t);
6030				} catch(event) {}
6031			} else if(o.attachEvent) {
6032				try {
6033					o.attachEvent('on' + e, f);
6034				} catch(event) {}
6035			} else {
6036				o['on' + e] = f;
6037			}
6038		},
6039		/*
6040			删除内部监听函数,调用方式:
6041			this.removeListenerInside('click',function(event){}[,ID]);
6042			d值为空时,则表示监听当前的视频播放器
6043		*/
6044		removeListenerInside: function(e, f, d, t) {
6045			/*if(this.playerType=='flashplayer' && this.getParameterNames(f) && this.isUndefined(d)) {
6046				return;
6047			}*/
6048			if(this.isUndefined(t)) {
6049				t = false;
6050			}
6051			var o = this.V;
6052			if(!this.isUndefined(d)) {
6053				o = d;
6054			}
6055			if(o.removeEventListener) {
6056				try {
6057					this.addNum--;
6058					o.removeEventListener(e, f, t);
6059				} catch(e) {}
6060			} else if(o.detachEvent) {
6061				try {
6062					o.detachEvent('on' + e, f);
6063				} catch(e) {}
6064			} else {
6065				o['on' + e] = null;
6066			}
6067		},
6068		/*
6069			共用函数
6070			统一分配监听,以达到跟as3同样效果
6071		*/
6072		sendJS: function(name, val) {
6073			var list = this.listenerJsArr;
6074			var obj = {
6075				variable: this.vars['variable']
6076			};
6077			if(this.vars['playerID']) {
6078				obj['playerID'] = this.vars['playerID'];
6079			}
6080			for(var i = 0; i < list.length; i++) {
6081				var arr = list[i];
6082				if(arr[0] == name) {
6083					if(val) {
6084						switch(arr[1].length) {
6085							case 1:
6086								arr[1](val);
6087								break;
6088							case 2:
6089								arr[1](val, obj);
6090								break;
6091							default:
6092								arr[1]();
6093								break;
6094						}
6095
6096					} else {
6097						switch(arr[1].length) {
6098							case 1:
6099								arr[1](obj);
6100								break;
6101							default:
6102								arr[1]();
6103								break;
6104						}
6105
6106					}
6107				}
6108			}
6109		},
6110		/*
6111			共用函数
6112			获取函数名称,如 function ckplayer(){} var fun=ckplayer,则getParameterNames(fun)=ckplayer
6113		*/
6114		getParameterNames: function(fn) {
6115			if(typeof(fn) !== 'function') {
6116				return false;
6117			}
6118			var COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
6119			var code = fn.toString().replace(COMMENTS, '');
6120			var result = code.slice(code.indexOf(' ') + 1, code.indexOf('('));
6121			return result === null ? false : result;
6122		},
6123		/*
6124			共用函数
6125			获取当前本地时间
6126		*/
6127		getNowDate: function() {
6128			var nowDate = new Date();
6129			var month = nowDate.getMonth() + 1;
6130			var date = nowDate.getDate();
6131			var hours = nowDate.getHours();
6132			var minutes = nowDate.getMinutes();
6133			var seconds = nowDate.getSeconds();
6134			var tMonth = '',
6135				tDate = '',
6136				tHours = '',
6137				tMinutes = '',
6138				tSeconds = '',
6139				tSeconds = (seconds < 10) ? '0' + seconds : seconds + '',
6140				tMinutes = (minutes < 10) ? '0' + minutes : minutes + '',
6141				tHours = (hours < 10) ? '0' + hours : hours + '',
6142				tDate = (date < 10) ? '0' + date : date + '',
6143				tMonth = (month < 10) ? '0' + month : month + '';
6144			return tMonth + '/' + tDate + ' ' + tHours + ':' + tMinutes + ':' + tSeconds;
6145		},
6146		/*
6147			共用函数
6148			格式化时分秒
6149			seconds:Int:秒数
6150			ishours:Boolean:是否显示小时,如果设置成false,则会显示如80:20,表示1小时20分钟20秒
6151		*/
6152		formatTime: function(seconds, ishours) {
6153			var tSeconds = '',
6154				tMinutes = '',
6155				tHours = '';
6156			if(isNaN(seconds)) {
6157				seconds = 0;
6158			}
6159			var s = Math.floor(seconds % 60),
6160				m = 0,
6161				h = 0;
6162			if(ishours) {
6163				m = Math.floor(seconds / 60) % 60;
6164				h = Math.floor(seconds / 3600);
6165			} else {
6166				m = Math.floor(seconds / 60);
6167			}
6168			tSeconds = (s < 10) ? '0' + s : s + '';
6169			tMinutes = (m > 0) ? ((m < 10) ? '0' + m + ':' : m + ':') : '00:';
6170			tHours = (h > 0) ? ((h < 10) ? '0' + h + ':' : h + ':') : '';
6171			if(ishours) {
6172				return tHours + tMinutes + tSeconds;
6173			} else {
6174				return tMinutes + tSeconds;
6175			}
6176		},
6177		/*
6178			共用函数
6179			获取一个随机字符
6180			len:随机字符长度
6181		*/
6182		randomString: function(len) {
6183			len = len || 16;
6184			var chars = 'abcdefghijklmnopqrstuvwxyz';
6185			var maxPos = chars.length;
6186			var val = '';
6187			for(i = 0; i < len; i++) {
6188				val += chars.charAt(Math.floor(Math.random() * maxPos));
6189			}
6190			return 'ch' + val;
6191		},
6192		/*
6193			共用函数
6194			获取字符串长度,中文算两,英文数字算1
6195		*/
6196		getStringLen: function(str) {
6197			var len = 0;
6198			for(var i = 0; i < str.length; i++) {
6199				if(str.charCodeAt(i) > 127 || str.charCodeAt(i) == 94) {
6200					len += 2;
6201				} else {
6202					len++;
6203				}
6204			}
6205			return len;
6206		},
6207		/*
6208			内部函数
6209			用来为ajax提供支持
6210		*/
6211		createXHR: function() {
6212			if(window.XMLHttpRequest) {
6213				//IE7+、Firefox、Opera、Chrome 和Safari
6214				return new XMLHttpRequest();
6215			} else if(window.ActiveXObject) {
6216				//IE6 及以下
6217				try {
6218					return new ActiveXObject('Microsoft.XMLHTTP');
6219				} catch(event) {
6220					try {
6221						return new ActiveXObject('Msxml2.XMLHTTP');
6222					} catch(event) {
6223						this.eject(this.errorList[7]);
6224					}
6225				}
6226			} else {
6227				this.eject(this.errorList[8]);
6228			}
6229		},
6230		/*
6231			共用函数
6232			ajax调用
6233		*/
6234		ajax: function(cObj) {
6235			var thisTemp = this;
6236			var callback = null;
6237			var obj = {
6238				method: 'get', //请求类型
6239				dataType: 'json', //请求的数据类型
6240				charset: 'utf-8',
6241				async: false, //true表示异步,false表示同步
6242				url: '',
6243				data: null,
6244				success: null
6245			};
6246			if(typeof(cObj) != 'object') {
6247				this.eject(this.errorList[9]);
6248				return;
6249			}
6250			obj = this.standardization(obj, cObj);
6251			if(obj.dataType === 'json' || obj.dataType === 'text' || obj.dataType === 'html') {
6252				var xhr = this.createXHR();
6253				callback = function() {
6254					//判断http的交互是否成功
6255					if(xhr.status == 200) {
6256						if(obj.success == null) {
6257							return;
6258						}
6259						if(obj.dataType === 'json') {
6260							try {
6261								obj.success(eval('(' + xhr.responseText + ')')); //回调传递参数
6262							} catch(event) {
6263								obj.success(null);
6264							}
6265						} else {
6266							obj.success(xhr.responseText); //回调传递参数
6267						}
6268					} else {
6269						thisTemp.eject(thisTemp.errorList[10], 'Ajax.status:' + xhr.status);
6270					}
6271				};
6272				obj.url = obj.url + '?rand=' + this.randomString(6);
6273				obj.data = this.formatParams(obj.data);
6273 //通过params()将名值对转换成字符串
6274				if(obj.method === 'get' && !this.isUndefined(obj.data)) {
6275					obj.url += obj.url.indexOf('?') == -1 ? '?' + obj.data : '&' + obj.data;
6276				}
6277				if(obj.async === true) { //true表示异步,false表示同步
6278					xhr.onreadystatechange = function() {
6279						if(xhr.readyState == 4) { //判断对象的状态是否交互完成
6280							callback(); //回调
6281						}
6282					};
6283				}
6284				xhr.open(obj.method, obj.url, obj.async);
6285				if(obj.method === 'post') {
6286					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
6287					xhr.setRequestHeader('charset', obj['charset']);
6288					xhr.send(obj.data);
6289				} else {
6290					xhr.send(null); //get方式则填null
6291				}
6292				if(obj.async === false) { //同步
6293					callback();
6294				}
6295
6296			} else if(obj.dataType === 'jsonp') {
6297				var oHead = document.getElementsByTagName('head')[0];
6298				var oScript = document.createElement('script');
6299				var callbackName = 'callback' + new Date().getTime();
6300				var params = this.formatParams(obj.data) + '&callback=' + callbackName; //按时间戳拼接字符串
6301				callback = obj.success;
6302				//拼接好src
6303				oScript.src = obj.url.split('?') + '?' + params;
6304				//插入script标签
6305				oHead.insertBefore(oScript, oHead.firstChild);
6306				//jsonp的回调函数
6307				window[callbackName] = function(json) {
6308					callback(json);
6309					oHead.removeChild(oScript);
6310				};
6311			}
6312		},
6313		/*
6314			内置函数
6315			动态加载js
6316		*/
6317		loadJs: function(path, success) {
6318			var oHead = document.getElementsByTagName('HEAD').item(0);
6319			var oScript = document.createElement('script');
6320			oScript.type = 'text/javascript';
6321			oScript.src = this.getNewUrl(path);
6322			oHead.appendChild(oScript);
6323			oScript.onload = function() {
6324				success();
6325			}
6326		},
6327		/*
6328			共用函数
6329			排除IE6-9
6330		*/
6331		isMsie: function() {
6332			var browser = navigator.appName;
6333			var b_version = navigator.appVersion;
6334			var version = b_version.split(';');
6335			var trim_Version = '';
6336			if(version.length > 1) {
6337				trim_Version = version[1].replace(/[ ]/g, '');
6338			}
6339			if(browser == 'Microsoft Internet Explorer' && (trim_Version == 'MSIE6.0' || trim_Version == 'MSIE7.0' || trim_Version == 'MSIE8.0' || trim_Version == 'MSIE9.0' || trim_Version == 'MSIE10.0')) {
6340				return false;
6341			}
6342			return true;
6343		},
6344		/*
6345			共用函数
6346			判断是否安装了flashplayer
6347		*/
6348		uploadFlash: function() {
6349			var swf;
6350			if(navigator.userAgent.indexOf('MSIE') > 0) {
6351				try {
6352					var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
6353					return true;
6354				} catch(e) {
6355					return false;
6356				}
6357			}
6358			if(navigator.userAgent.indexOf('Firefox') > 0) {
6359				swf = navigator.plugins['Shockwave Flash'];
6360				if(swf) {
6361					return true
6362				} else {
6363					return false;
6364				}
6365			}
6366			return true;
6367		},
6368		/*
6369			共用函数
6370			检测浏览器是否支持HTML5-Video
6371		*/
6372		supportVideo: function() {
6373			if(!this.isMsie()) {
6374				return false;
6375			}
6376			if(!!document.createElement('video').canPlayType) {
6377				var vidTest = document.createElement('video');
6378				var oggTest;
6379				try {
6380					oggTest = vidTest.canPlayType('video/ogg; codecs="theora, vorbis"');
6381				} catch(error) {
6382					oggTest = false;
6383				}
6384				if(!oggTest) {
6385					var h264Test;
6386					try {
6387						h264Test = vidTest.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
6388					} catch(error) {
6389						h264Test = false;
6390					}
6391					if(!h264Test) {
6392						return false;
6393					} else {
6394						if(h264Test == "probably") {
6395							return true;
6396						} else {
6397							return false;
6398						}
6399					}
6400				} else {
6401					if(oggTest == "probably") {
6402						return true;
6403					} else {
6404						return false;
6405					}
6406				}
6407			} else {
6408				return false;
6409			}
6410		},
6411		/*
6412			共用函数
6413			获取属性值
6414		*/
6415		getDataset: function(ele, z) {
6416			try {
6417				return ele.dataset[z];
6418			} catch(error) {
6419				try {
6420					return ele.getAttribute('data-' + z)
6421				} catch(error) {
6422					return false;
6423				}
6424			}
6425		},
6426		/*
6427			共用函数
6428			返回flashplayer的对象
6429		*/
6430		getObjectById: function(id) {
6431			var x = null;
6432			var y = this.getByElement('#' + id);
6433			var r = 'embed';
6434			if(y && y.nodeName == 'OBJECT') {
6435				if(typeof(y.SetVariable) != 'undefined') {
6436					x = y;
6437				} else {
6438					var z = y.getElementsByTagName(r)[0];
6439					if(z) {
6440						x = z;
6441					}
6442				}
6443			}
6444			return x;
6445		},
6446		/*
6447			共用函数
6448			对象转地址字符串
6449		*/
6450		formatParams: function(data) {
6451			var arr = [];
6452			for(var i in data) {
6453				arr.push(encodeURIComponent(i) + '=' + encodeURIComponent(data[i]));
6454			}
6455			return arr.join('&');
6456		},
6457		/*
6458			内置函数
6459			对地址进行冒泡排序
6460		*/
6461		arrSort: function(arr) {
6462			var temp = [];
6463			for(var i = 0; i < arr.length; i++) {
6464				for(var j = 0; j < arr.length - i; j++) {
6465					if(!this.isUndefined(arr[j + 1]) && arr[j][3] < arr[j + 1][3]) {
6466						temp = arr[j + 1];
6467						arr[j + 1] = arr[j];
6468						arr[j] = temp;
6469					}
6470				}
6471			}
6472			return arr;
6473		},
6474		/*
6475			内置函数
6476			判断文件后缀
6477		*/
6478		getFileExt: function(filepath) {
6479			if(filepath != '' && !this.isUndefined(filepath)) {
6480				if(filepath.indexOf('?') > -1) {
6481					filepath = filepath.split('?')[0];
6482				}
6483				var pos = '.' + filepath.replace(/.+\./, '');
6484				return pos;
6485			}
6486			return '';
6487		},
6488		/*
6489			内置函数
6490			判断是否是移动端
6491		*/
6492		isMobile: function() {
6493			if(navigator.userAgent.match(/(iPhone|iPad|iPod|Android|ios)/i)) {
6494				return true;
6495			}
6496			return false;
6497		},
6498		/*
6499			内置函数
6500			搜索字符串str是否包含key
6501		*/
6502		isContains: function(str, key) {
6503			return str.indexOf(key) > -1;
6504		},
6505		/*
6506			内置函数
6507			给地址添加随机数
6508		*/
6509		getNewUrl: function(url) {
6510			if(this.isContains(url, '?')) {
6511				return url += '&' + this.randomString(8) + '=' + this.randomString(8);
6512			} else {
6513				return url += '?' + this.randomString(8) + '=' + this.randomString(8);
6514			}
6515		},
6516		/*
6517			共用函数
6518			获取clientX和clientY
6519		*/
6520		client: function(event) {
6521			var eve = event || window.event;
6522			if(this.isUndefined(eve)) {
6523				eve = {
6524					clientX: 0,
6525					clientY: 0
6526				};
6527			}
6528			return {
6529				x: eve.clientX + (document.documentElement.scrollLeft || this.body.scrollLeft) - this.pdCoor['x'],
6530				y: eve.clientY + (document.documentElement.scrollTop || this.body.scrollTop) - this.pdCoor['y']
6531			}
6532		},
6533		/*
6534			内置函数
6535			获取节点的绝对坐标
6536		*/
6537		getCoor: function(obj) {
6538			var coor = this.getXY(obj);
6539			return {
6540				x: coor['x'] - this.pdCoor['x'],
6541				y: coor['y'] - this.pdCoor['y']
6542			};
6543		},
6544		getXY: function(obj) {
6545			var parObj = obj;
6546			var left = obj.offsetLeft;
6547			var top = obj.offsetTop;
6548			while(parObj = parObj.offsetParent) {
6549				left += parObj.offsetLeft;
6550				top += parObj.offsetTop;
6551			}
6552			return {
6553				x: left,
6554				y: top
6555			};
6556		},
6557		/*
6558			内置函数
6559			删除本对象的所有属性
6560		*/
6561		removeChild: function() {
6562			if(this.playerType == 'html5video') {
6563				//删除计时器
6564				var i = 0;
6565				var timerArr = [this.timerError, this.timerFull, this.timerTime, this.timerBuffer, this.timerClick, this.timerLoading, this.timerCBar, this.timerVCanvas];
6566				for(i = 0; i < timerArr.length; i++) {
6567					if(timerArr[i] != null) {
6568						if(timerArr[i].runing) {
6569							timerArr[i].stop();
6570						}
6571						timerArr[i] = null;
6572					}
6573				}
6574				//删除事件监听
6575				var ltArr = this.listenerJsArr;
6576				for(i = 0; i < ltArr.length; i++) {
6577					this.removeListener(ltArr[i][0], ltArr[i][1]);
6578				}
6579			}
6580			this.playerType == '';
6581			this.V = null;
6582			if(this.showFace) {
6583				this.deleteChild(this.CB['menu']);
6584			}
6585			this.deleteChild(this.PD);
6586			this.CD.innerHTML = '';
6587		},
6588		/*
6589			内置函数
6590			画封闭的图形
6591		*/
6592		canvasFill: function(name, path) {
6593			name.beginPath();
6594			for(var i = 0; i < path.length; i++) {
6595				var d = path[i];
6596				if(i > 0) {
6597					name.lineTo(d[0], d[1]);
6598				} else {
6599					name.moveTo(d[0], d[1]);
6600				}
6601			}
6602			name.closePath();
6603			name.fill();
6604		},
6605		/*
6606			内置函数
6607			画矩形
6608		*/
6609		canvasFillRect: function(name, path) {
6610			for(var i = 0; i < path.length; i++) {
6611				var d = path[i];
6612				name.fillRect(d[0], d[1], d[2], d[3]);
6613			}
6614		},
6615		/*
6616			共用函数
6617			删除容器节点
6618		*/
6619		deleteChild: function(f) {
6620			var def = this.arrIndexOf(this.elementArr, f.className);
6621			if(def > -1) {
6622				this.elementArr.splice(def, 1);
6623			}
6624			var childs = f.childNodes;
6625			for(var i = childs.length - 1; i >= 0; i--) {
6626				f.removeChild(childs[i]);
6627			}
6628
6629			if(f && f != null && f.parentNode) {
6630				try {
6631					if(f.parentNode) {
6632						f.parentNode.removeChild(f);
6633
6634					}
6635
6636				} catch(event) {}
6637			}
6638		},
6639		/*
6640			内置函数
6641		 	根据容器的宽高,内部节点的宽高计算出内部节点的宽高及坐标
6642		*/
6643		getProportionCoor: function(stageW, stageH, vw, vh) {
6644			var w = 0,
6645				h = 0,
6646				x = 0,
6647				y = 0;
6648			if(stageW / stageH < vw / vh) {
6649				w = stageW;
6650				h = w * vh / vw;
6651			} else {
6652				h = stageH;
6653				w = h * vw / vh;
6654			}
6655			x = (stageW - w) * 0.5;
6656			y = (stageH - h) * 0.5;
6657			return {
6658				width: parseInt(w),
6659				height: parseInt(h),
6660				x: parseInt(x),
6661				y: parseInt(y)
6662			};
6663		},
6664		/*
6665			共用函数
6666			将字幕文件内容转换成数组
6667		*/
6668		parseSrtSubtitles: function(srt) {
6669			var subtitles = [];
6670			var textSubtitles = [];
6671			var i = 0;
6672			var arrs = srt.split('\n');
6673			var arr = [];
6674			var delHtmlTag = function(str) {
6675				return str.replace(/<[^>]+>/g, ''); //去掉所有的html标记
6676			};
6677			for(i = 0; i < arrs.length; i++) {
6678				if(arrs[i].replace(/\s/g, '').length > 0) {
6679					arr.push(arrs[i]);
6680				} else {
6681					if(arr.length > 0) {
6682						textSubtitles.push(arr);
6683					}
6684					arr = [];
6685				}
6686			}
6687			for(i = 0; i < textSubtitles.length; ++i) {
6688				var textSubtitle = textSubtitles[i];
6689				if(textSubtitle.length >= 2) {
6690					var sn = textSubtitle[0]; // 字幕的序号
6691					var startTime = this.toSeconds(this.trim(textSubtitle[1].split(' --> ')[0])); // 字幕的开始时间
6692					var endTime = this.toSeconds(this.trim(textSubtitle[1].split(' --> ')[1])); // 字幕的结束时间
6693					var content = [delHtmlTag(textSubtitle[2])]; // 字幕的内容
6694					// 字幕可能有多行
6695					if(textSubtitle.length > 2) {
6696						for(var j = 3; j < textSubtitle.length; j++) {
6697							content.push(delHtmlTag(textSubtitle[j]));
6698						}
6699					}
6700					// 字幕对象
6701					var subtitle = {
6702						sn: sn,
6703						startTime: startTime,
6704						endTime: endTime,
6705						content: content
6706					};
6707					subtitles.push(subtitle);
6708				}
6709			}
6710			return subtitles;
6711		},
6712		/*
6713			共用函数
6714			计时器,该函数模拟as3中的timer原理
6715			time:计时时间,单位:毫秒
6716			fun:接受函数
6717			number:运行次数,不设置则无限运行
6718		*/
6719		timer: function(time, fun, number) {
6720			var thisTemp = this;
6721			this.time = 10; //运行间隔
6722			this.fun = null; //监听函数
6723			this.timeObj = null;
6723 //setInterval对象
6724			this.number = 0; //已运行次数
6725			this.numberTotal = null; //总至需要次数
6726			this.runing = false; //当前状态
6727			this.startFun = function() {
6728				thisTemp.number++;
6729				thisTemp.fun();
6730				if(thisTemp.numberTotal != null && thisTemp.number >= thisTemp.numberTotal) {
6731					thisTemp.stop();
6732				}
6733			};
6734			this.start = function() {
6735				if(!thisTemp.runing) {
6736					thisTemp.runing = true;
6737					thisTemp.timeObj = window.setInterval(thisTemp.startFun, time);
6738				}
6739			};
6740			this.stop = function() {
6741				if(thisTemp.runing) {
6742					thisTemp.runing = false;
6743					window.clearInterval(thisTemp.timeObj);
6744					thisTemp.timeObj = null;
6745				}
6746			};
6747			if(time) {
6748				this.time = time;
6749			}
6750			if(fun) {
6751				this.fun = fun;
6752			}
6753			if(number) {
6754				this.numberTotal = number;
6755			}
6756			this.start();
6757		},
6758		/*
6759			共用函数
6760			将时分秒转换成秒
6761		*/
6762		toSeconds: function(t) {
6763			var s = 0.0;
6764			if(t) {
6765				var p = t.split(':');
6766				for(i = 0; i < p.length; i++) {
6767					s = s * 60 + parseFloat(p[i].replace(',', '.'));
6768				}
6769			}
6770			return s;
6771		},
6772		/*
6773			共用函数
6774			将对象Object标准化
6775		*/
6776		standardization: function(o, n) { //n替换进o
6777			var h = {};
6778			var k;
6779			for(k in o) {
6780				h[k] = o[k];
6781			}
6782			for(k in n) {
6783				var type = typeof(h[k]);
6784				switch(type) {
6785					case 'number':
6786						h[k] = parseFloat(n[k]);
6787						break;
6788					default:
6789						h[k] = n[k];
6790						break;
6791				}
6792
6793			}
6794			return h;
6795		},
6796		/*
6797			共用函数
6798			搜索数组
6799		 */
6800		arrIndexOf: function(arr, key) {
6801			var re = new RegExp(key, ['']);
6802			return(arr.toString().replace(re, '┢').replace(/[^,┢]/g, '')).indexOf('┢');
6803		},
6804		/*
6805			共用函数
6806			去掉空格
6807		 */
6808		trim: function(str) {
6809			if(str!=''){
6810				return str.replace(/(^\s*)|(\s*$)/g, '');
6811			}
6812			return '';
6813		},
6814		/*
6815			共用函数
6816			输出内容到控制台
6817		*/
6818		log: function(val) {
6819			try {
6820				console.log(val);
6821			} catch(e) {}
6822		},
6823		/*
6824			共用函数
6825			弹出提示
6826		*/
6827		eject: function(er, val) {
6828			if(!this.vars['debug']) {
6829				return;
6830			}
6831			var errorVal = er[1];
6832			if(!this.isUndefined(val)) {
6833				errorVal = errorVal.replace('[error]', val);
6834			}
6835			var value = 'error ' + er[0] + ':' + errorVal;
6836			try {
6837				this.log(value);
6838			} catch(e) {}
6839		}
6840	};
6841	window.ckplayer = ckplayer;
6842})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.