PageSourceSearch

https://hongdou.com/en/public/static/ckplayerx/ckplayer/ckplayer.js

js hongdou.com collected 2026-10-04 02:41:00 UTC 274,997 bytes, 8,635 lines download raw bytes

1/*
2	软件名称:ckplayer
3	软件版本:X1
4	软件作者:niandeng
5	软件网站:http://www.ckplayer.com
6	--------------------------------------------------------------------------------------------------------------------
7	开发说明:
8	使用的主要程序语言:javascript(js)及actionscript3.0(as3.0)(as3.0主要用于flashplayer部分的开发,不在该页面呈现)
9	功能:播放视频
10	特点:兼容HTML5-VIDEO(优先)以及FlashPlayer
11	--------------------------------------------------------------------------------------------------------------------
12	使用开源代码部分:
13	1:flashls-http://flashls.org/
14	=====================================================================================================================
15*/
16function ckplayerConfig() {
17	return {
18		flashvars: {},//用来补充flashvars里的对象
19		languagePath: '',//语言包文件地址
20		stylePath: '',//风格包文件地址
21		config: {
22			fullInteractive: true,//是否开启交互功能
23			delay: 30,//延迟加载视频,单位:毫秒
24			timeFrequency: 100,//计算当前播放时间和加载量的时间频率,单位:毫秒
25			autoLoad: true,//视频是否自动加载
26			loadNext: 0,//多段视频预加载的段数,设置成0则全部加载
27			definition: true,//是否使用清晰度组件
28			subtitle:false,//是否使用多字幕切换组件
29			playbackRate:true,//是否使用倍速播放组件
30			smartRemove: true,//是否使用智能清理,使用该功能则在多段时当前播放段之前的段都会被清除出内存,减少对内存的使用
31			bufferTime: 200,//缓存区的长度,单位:毫秒,不要小于10
32			rtmpBufferTime:0,//rtmp视频缓存区长度,单位:毫秒
33			click: true,//是否支持屏幕单击暂停
34			doubleClick: true,//是否支持屏幕双击全屏
35			doubleClickInterval: 200,//判断双击的标准,即二次单击间隔的时间差之内判断为是双击,单位:毫秒
36			keyDown: {
37				space: true,//是否启用空格键切换播放/暂停
38				left: true,//是否启用左方向键快退
39				right: true,//是否启用右方向键快进
40				up: true,//是否支持上方向键增加音量
41				down: true //是否支持下方向键减少音量
42			},
43			timeJump: 10,//快进快退时的秒数
44			volumeJump: 0.1,//音量调整的数量,大于0小于1的小数
45			timeScheduleAdjust: 1,//是否可调节调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动
46			previewDefaultLoad: true,//预览图片是否默认加载,优点是鼠标第一次经过进度条即可显示预览图片
47			promptSpotTime: false,//提示点文字是否在前面加上对应时间
48			buttonMode: {
49				player: false,//鼠标在播放器上是否显示可点击形态
50				controlBar: false,//鼠标在控制栏上是否显示可点击形态
51				timeSchedule: true,//鼠标在时间进度条上是否显示可点击形态
52				volumeSchedule: true //鼠标在音量调节栏上是否显示可点击形态
53			},
54			liveAndVod: { //直播+点播=回播功能
55				open: false,//是否开启,开启该功能需要设置flashvars里live=true
56				vodTime: 2,//可以回看的整点数
57				start: 'start' //回看请求参数
58			},
59			usehardwareeecoder:false,//是否采用硬件加速,只针对flashplayer有效
60			errorNum: 3,//错误重连次数
61			playCorrect: false,//是否需要错误修正,这是针对rtmp的
62			timeCorrect: true,//http视频播放时间错误纠正,有些因为视频格式的问题导致视频没有实际播放结束视频文件就返回了stop命令
63			m3u8Definition: { //m3u8自动清晰度时按关键字来进行判断
64				//tags:['200k','110k','400k','600k','1000k']
65			},
66			m3u8MaxBufferLength: 30,//m3u8每次缓冲时间,单位:秒数
67			split: '|',//当视频地址采用字符形式并且需要使用逗号或其它符号来切割数组里定义
68			timeStamp: '',//一个地址,用来请求当前时间戳,用于播放器内部时间效准
69			mobileVolumeBarShow: false,//在移动端是否显示音量调节按钮
70			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,elementShow,animate,animateResume,animatePause,deleteAnimate,changeConfig,getConfig,openUrl,fullScreen,quitFullScreen,switchFull,screenshot,custom,changeControlBarShow,getCurrentSrc,changeDefinition,changeSubtitles,changeSubtitlesSize'//需要支持的事件
71		},
72		menu: { //版权名称支持
73			ckkey: '',
74			name: '',
75			link: '',
76			version: '',
77			domain: '',
78			more: []
79		},
80		style: { //风格部分内容配置,这里主要配置loading和logo以及广告的部分内容
81			loading: { //视频加载前显示在播放器中间的图片,如果不需要可以删除该属性
82				file: 'data:image/swf;base64,Q1dTCrUjAAB4nKWZBzRc/bf3BwmJJEgQoo0SEd3odRA1iU70PjqjzYg6SESITiJatKiJMLroRIsuehC999FHveT/PBn3/p/33vu+71rG+pzf2fu7z3ef39nrzBorAFACgF0FAJBjAaRvkwMAAB/iK1cBAFFnMwthNWlZWjeonT1M+PxIjN4KDncU5uR0dXXlcOXhcHC25AQJCQlxcnFzcnOzn0eww9zt4SZu7PYwBnow7W8FaXMYxNnaEW7tYE97cWxi6uACF6On/0vWDer4R9YexmFi5mBqzgFxgHK6mThygji4OC90zoOEpZzNTeAOzhoODnZgyYsoWlk7E5gVrYqzg4U5DHYub2JHK6XOJ8r5X6Mv5ZtLn3/A3FwgbnYuAXZuIQ0QvzAvjzBIgJVLUJiL61LuvyL/lapoDjcxM4GbYJIv/ng0QHzCfOdpQpeT/1PsX+kOZtYW7v+rZEwkrSjnf+ne/7qfior/fUehUM6/o2FwNXOL/z4apuHuaM6pZg5zcHGGmJ+HM/x1RxQVhR/bw+Am9hDzx9Lg8wUOa2szYUkuLhnQIyFBWUleXhluEOiRAA+vlJS0AJ8UnwA/D8+j30b/c+rfatIOEBeouT38LzWz/wu1S6l/qyk7W1tan++Jf1AV4OLi5+PjluGTlBaSAYFAQtx80o94QYICQtz8/FJ/3Yx/lvhzrebO1s/NzWSdHaC/74KjiTPM/KJTYvR/t+qiTb/7K2z9720Skv2fjP1b6t9qZv9gSOh/MvRvqX+rOfz/tOn/KEH758Zg+vT/vKXNIH92qKOLs93vsWMG4TS3M7+oBjvfpaDfU8IMImzh4Aw1gYNNHB3trCEmF4KcbuwwKweIravJc3N2i4uJIcqJCfzHS+L8a/CBaQFS2OfjsJb05vl/LMDch4r5OCQtCAAQv75JfrFy9TuAC+A2spaI56XxbK+FKa4/7vFGNXGv/CO8q69or8TIBNHeEX7R4+l7hYsu4hH2FUnhhzJXtDQ0tVVJTu+SPPJ4CScpoP2YnULPtnk0weOQJDqh5K4uMZy4jR7r7qhyXuhM2K6uhXVVv/1uNh/3NjGU7X6dzqAYuwQ/zOal3cmynJmnq2sM8LCWaS2HYN8lW7C/ZWrylGlWpMzlHTuHQvQtahK6p4rOMeXMc9wicQNf9iYsnQdFDdbMf1Vc+f4kWHdEw7vXyGUmJm7qq0Ev1jAXkZs796YsQT4T0K0IMCxGOAy+q412HUsa3Zn2pwvScoUX3uPh1r1LnKrGY8GXcyIQGx6A0+dr9bNGzAd2ONfyKVVCh8l4hmgSyPOi2r/Os/0F4RB2gNEVGyOcsFqcD8grefqAPEPsGiGC/lXTjlnsp5UfhJKmNHX79Qer4gI6VE+HfGpwNqoa8mKKCuLi4gi/ucyaWVrqiW3U81PMVLpcL5jYlnVFJ1Kqn/heba2L6upoqcSWgfqinSSeX+MaoIydxVKA4z3wxOrD8XUvkHAX3lzmnVzkn6SHzMZsvHBQxpErxV45TBbn6Rdz1XzJNjzR2hYQHR7Q5iVGbbY9X+x4uL6i2rGQBTpLbhKMXSdUcMTihvqmchtfs/WTYfcrkfwilma94/GOfSZwqauQ13iBJOWQdHLnqK5yTsI64MQhY9TFo3Hot+Q3epzoUpHS56beieZ4IbB53QfbqNt2o46KaQtxzvOqSnVuV/sItDLp7FcjS64/sT+y8
82jROZ2/5QYvFSUwOe6odUhozxxzAj5UglyTO0ws5mHwYN3ahizd8x65aan9hP2TmOPmAvLPYlMQTrNbQaNXceIW0747RHvvrIvIc5k077ODqKN9jiy+M2O4othob7A6TI8tCbdsgJohCPYpXoeFaCVvzL+67OdUgMjfr4xLWvm8WCo/f/RzVRudvoSZ1qkJdF/EKO8h+fJncTZCTlbHhfdSAu4Rn3WB3l2kO5I2v5ivDrm37yXoV/U0j70fNS7OwGNHmrqKQVP3BiQ4JJYjsqBOFNIgCxd2nbLDw7fBF7Ykou91I+qujzwya4C8W3x+ZcYw7MOPG1Fdn3yns3R4a6TLc1pu55tAVzqxJT53i5SXJw6HMhLsY6aZS9ON4vdQrk9FdQS7JXHjLjqoFb+k63/R9kQhIaOyMi3WImKvdEkTLJ5aEy9mqOJowR4xonr4Ipj83DKMQDWadfOZF8nn6s0jhN3Xx/fh41+1pcsL3CUc2XmIv+nBMU/IZtRpY7NuTyiy8uGTx1cpPSGCdoSYT3BAT++LXt/aEBYJmGJhe9qUugdnWnaenBUo0fzpSzTN6o386lnVRH4ecsv2Ympqa1RM3qPG6h53zKTu7Zw6mdmAVHR/Psgob6koUqR4bG4Oj+XYZxpRkkbsoJn9CD+URpnU9t/G+k8Nd4mS5UTRkESZfHvOtO2etAu15gl7qy/IfkkBai/j4wH++HsjRCj7Kss3aWJakYOKe6/Qc32Q7AJyaP3PkzHv1VPXqhxs5G4Ix/WfctpKnubYaDYmUTWiwtbSqiD2BWSukbmtnApm7uL+LJpVS5ucAPjN6lnT+aUvi9Nrq1XKndkqIjSdunmNpfMJRUG/YbeLVYXHSZSwaMtTfKGszLdSmZYFbVYkMEOXt0dlaeMjOwvISK22jSi+GwyBkSqoDF4Gs6Mqy7ZmrfKRZgg6jA78C23/P5pzy7IFNWfY0R/RY1W4mvUFqLZcsbjuAgLzz5LBTRGsLtKph2eCBvVRPL4XbuQnbH6oPb4R/s0WpSotPOLJuoZttM7qVqk+O7OZb0ApSQXEWbN6zXaHmSy02MSHaXOIrS7X7i710BdZvyYGEhIRy5fpKob+Uhx5EmtD96hvJZGsDbn4ns7QEIVrNQzreTG7t6dTrf5ARar3pwzFOAW1HSUJf4gu0lHckvKW3JlAdrR6wnN1WO0gBqQmCewsOj3U/32Zo3pQcMl/1DEQ+Www3bd5F5x1oM89EkADJagK0/WiugD+YlW7dabGfIdI0DA1csJnS7SiQDJFmQ0p+++whjRRGbWS253gjmB2u2XdvQzyItLTiEsBuxuFKJpIvXqhNsLJ9n3Dt/brTj+xWtm1r0kxntgGTU/J4ffUYvh8aZmZjmuvUZfSh09EqcvVTmQNKW7aGaQ/m1MG4Q23gJW8iRQaE3/oGij+8w8N2ur6LoqsiMCigB3F6E04JSlQw8zXfGWdNHcd38a9lMmXvvQt7w6fXEaDic6vJfL9dDXr8sRaVWEbWOcRf52PNRxLMkqIPJ6lh6woy0An4urBCzuASqI+4w558dLCXhK7GJ9tRunl9k8edm5OZg95toTTkCkcXPXWrRQVvQ0yC34f5JlN2xphwFQaxeyv56enRHTrKP7RiJmyDY/xbtmrSQgkPw1455dd4N3n1uLIx4pIcZXOAFyv8T/psEfvaRsccO3oGoPcRWMKGQ+jXvN97Toi3U0NTa9uozPlL/ZUM5NKaKnCLRzY/6fIEEgrskdd8wS3oHjqtv+Z57Kqi0xk4y1H98Dn3frWYvkbQVmHNG33wI2HuhvAlPAiExfatzjpoMHLGD25W3OkPwzG7XmAfNW0mVcNAZeQ+cXvb5Cbl9PYtdEiNaJ3aLmvqxBsdUpvcPFvSJM4qgtTTwPIffDRLvdyIjW1a7diOgYXYiQ7qxZKZ+9PaVHPF+Y/eumrQ2bizm2r2f7w+k9YaJHyFIzeeen9f9b1+wnqeGouhp7kbt9bCR9HEadZpP2dYPMM9iKsAWes7xQQSB0fRBxNl0oghcn4FlC00RDeKEHHzGkJTK4RxVktw/NpGCTj0nYdD8QCShsRTN2l4TjOhhI98r1nHRVTGKxu/fDjoINArDHLfTGe3/mBpJZogLGzksHXxF/Iscu3Mw2H/M5lR2PXwQK55inhpXLTBIUvlvSw6jZXE2a4tOGkZmLE9KcfSSXhrfPRX6BafOppoyL9kwL5jTirm7MlaADLHJgcSrJggew1N1qL9SOxu+K3mQYniubuEOMB3MUiVYyjF6w1wQD0y2f9zNnbQN3wX7/XadPwpNgHCBfLy9drFtP7JWMHEid0+HfX8mkORVWFUw254l2FHMlhEayk7kRHK72Q3dF9JXF6kWWTCoC/qU5yej2zn942h17+KysWkdpmkKuC1BykHjcO6cfzgnaVgcDJfhlLWhi6NBviROQcYeKQ8Eni8XysdHqP8TTKN2p4C/Kjdtn+XtbZwWSuq+f3P0eFFhbCsLEIaPydPcMtOWTfEfE6mCrHeAnOgzltDaetqMQ9NLy1/1FWLGkB+ESwa+nhMt4Texs0QSxDJ3z7+YNk733lvmI/pqCC/vGjGfBsW/0sAvMiH/uiYUIN+eVQfwLxrYOAVQbMcVPDK4/5gZ20Q4aGB4YRhauFLS3WzPiam7/RS0WcFyaV93jbTJWQ78RSJLUCpk0iXpcWzFv6aCSa7j6Neox93AEkih7fau8PrvSWv6r/yyj8WtdPphIbLAF1DFOwzNiq71oXsqGRPttkOz2Z4+9KKYnfXr34R9Ihcat0/0y5ebqIFGvm9nTwdHx9PysvLIygtLW0+LM2YYTVRoAspYwYOkFreaw/IEzS0OQkSVx7yfNxa778famlErmfdp/B0zFb9wCp7PTesAHnKdRDu9c6NNm1iGDXqfyQu2jMTvr0kNOD26ugT9Ff/lDLy020B2Bz167HF6gyCnJxaGZJ2Hqq7VKpDyOznc+q6/pPmA++ygOHff87lqXzeQTRfxWEyg2zVdHMZD93bGXcKmjvK4vItiNqdX4h13WxnDd4Htiv4sEgl45azkAQZ+/j4mDY2/fypMzU5OWnn4LBh1tJxzahIw5uDyjKjnyd0TmoIVVF64yQxr0UlVAkf+OjuAeTV6WdFTnYnZOgcpKlw0KY2A5UIf0mxsbLzwcvoazLvZOdQ32kjkc9NlIRsy6aoyhmcxqkZWNRarsyRuSoUTLbMUXRc+bpJiwrYb0Ug5mjNN0cvoqfwcGBhyAytHJrw5s3ZIZUfrxd81AM70fCAhJofEdRS9kGiNjFr4+aEy/Sv1Aw9CLZUiTcynRILDAaPr6+v03BwcDQGt7W2vtkil4p35lyurDgcepYm8JoQwadscEKuhxf9LYDr/TSEDWVb8GaBLKNjZinnqvyUH/DIXxZ0u+np7NBsXzrntNvTbDpRYHGiwPLb0usQPtOwsF8rQl7Md4GHFAmUNVJ1vSyChcd+Cw3BqKna9PikmGJq4b4eM7muCVklaVxI2sLeW/mJ53cM+IFyR4otPc4IBrUhXloXKMOIg+jr4s4WpFj5Jw+1I3BDI+zhzsvBzAjvr8zRT3qJTP3g0k86XDjn8VxAGexdd5KUT1PCVU2MpvkeVBwQJUGsvP3Bb/uFRFNpFhN4fvCJW2XvsdPoNe4r4gOntR93XEdSj5hyb7nSAU3XG/V/8NsA0Ypjvnx8Mfknfe2bet9QkgXRT28n+2k0FH210a30ZriFnu9o4WlOwYOk/ZKdTokUo5HKuRUS6nJL3lA9vHFgN9DoWbjFaiS0dnvxcESZxujA2dRYOiQf2EuQRGgo8rCGHnyzSXt6bEBt5SnciXEPCHVnrU6OIIaWMKHcWBhrektwpYYOwQivQFuiinnUDlq0VlNrDOlmrz/qEtuGB7REOd1pkjdlQEyeGJEBp73R0GSVNRu9GfOq/Z/KywdtNZPXWvDmFr9c5QaL4ou32pzN0kp5dazzm1FV2AuFkTTjgCIr3tsy2waG497PtZGgn/Gbp7XmSAp7o6Pq2Q49PVLOAA9KcQTulpy/MYe+c38MtXVnKwCrxoQvC0/0lwPOr2thrDPX
82aCnIB56bwAvnvBmXN/KaBHygL2WVTja7kQ4sVqbyQY2p0JjiA/Gqmr98mz9szz7a02rM+xLwCzuMMNoCatrD3Rse1Lp2SCAAR86Lg5yD4glN6eKa1Bpl2nSVROR5orTTXMLSGRrlrwQviM7TZN9I2HxUbKSSrSL+cJ9oS1JIeCmg/yr7vg2ikt/oTh6SaKj2Jrow70DGiIbBEIJ0MMgHoWKHhzIGM9IHE5pWVm+hJHUlwE/QhRFXR2RLGNtEDkQlY2v7bEfkhISS9Tb59CHo4U9U2r5bQcGCJw0OVl3NsFGvW8Av5TEa9MVVd5MYo/3XAhRiKOchhb6EYbdsOrNzp2jeRGay2t7Wh+/Y1K36RGfuJX/Od3UkmgeaguVFDg7aVEIlRscKM3yAGew0Uwjl1aFjh9hGW+03NxC2m+mz6JHDjG6WY4N3/cf6omQf2eUiPjKO7PT1WA404W20p9+qerOSTyKAOlb50DSUcyB7fG1BImQO8gZRhiqDTQj5cXpXhHF0lEG3CXNc/A6M9Wmrql57nxVUdzZyS9W4a4lfscvehUCrPSiX5O+3O3ltgW3kP5yqHW0enAVC14obtbxCtWy8drVGGo4rtU3EOu/wjXqak/Dc5pkul0R5J1HC7L4qOofnNJQNTbXn1M4saSk3vF7Cm6PhiD8kza01BWlC9dfb7fEzemmB4Q4ipwtjUonBvIVjaWHWzZHJfvOriJq1HioBS//BGnmmQMJU781tYPNyQDThjAL5W7D8SvvZk6eRaNlEr+IDxQ8VXtTq+4kBXvUmD8meWe2k4at2D6S0to1MnASL25FFx35GIqfHiedTRkuJ2ZRspWHvfYr1lUt+4fKaCIU4jKcezsZx7spb9akafZjPU/uUXdPeoj19PBZL1dgWACduDlYbzDlDxiZ0jLtrbQbeqdo+f0REG+MKpqoi9CCPasWzhHYPBlyuMSN/9gvbptagKr8SzqQdDc7YPNDNtQzJd2P5kj49FDGG4IRTGRBNTs1BFz1WeYW+N9gQMgDf5ZAfHt04y5E9jc1djH1R2DBh3B3Hek1XNzfP5BMvn6FuZUK+rkH4iVDmbMNByrVEH7us9I1Gqt1juZVbLT12MtQv8QmonyZWz8RpWotldKy586ACrzm5EhI+d8YnfP78btl3FX96FgUOVy0dNNfQq+2J6cOc6CBxPZHRyQOgJ1Q05ERBqpcfGMC2kR9PaG7i74G43qmj8ovZQ2bNNjfznTo4JTe5qZpp/uNMcDJ9YfGWhfRpfa5BC5ncVdyAJz/8AokytvxwHj8ekIt6m0MgYP2tJDb2c8OPH9HJ0rJqOWJPkNVVwsWejrCIgDhCZlvnU7JO9fnsMWoum+v8AwbfVk+M6lJ9gwusCBqLZh9O69gnFr4HFWZOae70BhUwK4um5YYVP0CYYnnhEyTbJ1XaHqQpizLulgE5up4/P/NS5MBbXQVYWkpkYJPg17Ved3ScLB0dURP5Ke/yPkBa/IFy0nH+puQuCyvlSGjzftZaVIXxDmVWfunyHVPNQUnDulz19NofEtvLGsE2XZ2Q46j81ZmaN9QVb2CRj61PAhzWwNZO2w+c3qit5Ofhex5Fzz1hnJzCOjgAGBqOwVxd65qupiAab/J5Hun0iYnlnrm22eyPHpvj75elPfiisUDXvSp8K0tGrh8V/SQxC0bR64FI88g1aRt5bTTznjq+d7rV5LVNzeGXx+kJo3mJ6aSN0sa0kys33DwnzF/N5wTetqGhcYne2ytQ7Z0IP7hbe1dAPU9v2X1kXHmZT15Ma6JEe2t7u4XC81bFegxoKGXFC5JncOydORbgvYdK9N4oyiUQ2jBI0ZeitkRRTOtp5uaNlv4czp5Pb6poFnFiZdkHR1VXQBXUWHIZ3nlUG9o/mYuNrK8n44w4Iyaur5eQqEtGp8geMXeZjtp7uCvGpai1du5ApvghXuqrDO+nv5MA+aLNoVXkDf5CM68+ga27SlYq8dSOJezWufGaPCawyskPm4XOX3x0T/Y/PZbS5w1RyVNacbLuFM5Vz2qZ5QutlUF+/hkZGf026X3UHZrVjY3z7wvWYOW8N7++ComTxbxrjIhYtUahFrqJbsyemZhIWD3Moj6fiOIPMz8iFBNqdi0cHfNrExM/zZSCvBYrwzPDEipqjJgRscIWlNOj2uAd6+/VX3ERyaNjG/Uk4O93ZsEmJZFFpZC6HMv+lewPN8Kz0SmZxgWadVE2u8eyAWThqTOZuOmrX33lBKgaTlvwjo/KeibVW0aK3V2NspRESjOzHH4OV+6zcmZkUI9N1JxYZkVF2RswnTFNEF7HMjUF6HZLjNwmaURNbXSDppda52aLxdjX2rtNIUDP/vb2MUH5BOSE7QnXLFlm44PMsOT5LZNlbfuH/DwPZHmbythJjVCD7aD1yPaCJryI0rkrL3Xsu5Bzcy6Nnk58aoP9H9feq8t771J+iVPDvd+M7fRFRgYWL+GtfKrkrRxqKCfrrK8SHDgZliZbRXTD29s3h1XC9sT6LN+k9mTs88DXH+vrzc6p7WWdKCbYNL56rZF6sfLysHXe87hvX/nFuBcqi+EdzAPNwsUeW7oKSwHLfGXFBO0ZixwMO2WkA7WqRvtCuOxjoRujxVhRCdhrI1i5ejjsetjFhnRCcbaPH0t4iRJRthfc7iQPCpomn+R7Bffn9RtOObXornGpdt3wdz89zTw10lPfVofOhAihBoyaAvKGe8dE2zTO316EMr28YeQCclLfGbOES4GO7OkHiFccSNVuv01EOekzidId9a8cX+rWG7vYlPMthet4aekiZz66w1JkbqyDGK9aDYYs3RglI2sBPfIiIksn02gpKVv4SisrG4o9mNvQGRLCyKiqytHVfEZNDD21CyGIfXtjvP2gjSSPLdIndvsem44fjz/h08H6YlBUE3xWb8P9aDIL7UObt7M/88SGVs+JgthjYfJ1x/ttKCWlPTjcRukdRL1K2ok42W8bddco5iNkSdRmp0pPwHjbYnJ3CGlEzWVcf1wnEf0WZUdOTBYX5ROrPlRFNpNVDqkVcg9OrdmhtlxfEODb59qt7LcUW4svzoFT116niZ8gbXufKNHWn3jQ1nmUF25ry7ugCCLmiweSbTBp9va9uEXp2yw7PTPWGkbNE+DpKTLcpsCP8JIPRSpMrRkOuire42S/TakTz/N0ABCKsn46iITrqFMiJ10METDvZ+zC6WElz9PTJwZuIUICKeeW00lvkGEHEOLEcGABEfAFWc1BVk70Yam1yemZZ37jcfI7qjNvVGowDOasqn48emeXFTJu9OSD3eruBCv4uz6U6sMhumzZAy69cHNMg+UrKhmpjCogHrCwXn9Jg9blmKNDHALm5iQMqDdnwuuiWetSpSSe76WeBYfRvD//crPGURR4L76IS068I1HgfVv+pxLlTyfya0Ztsey7PNoVpbY3k99/2aAolDeSW/hEbPAMbxy1d4oS+SwZeaa+FkROzoMbC8L53o3X1ubLrufrh/ei7UlKDY3bEZSWc2Pan4Da0LPpF2KRljJBYiLgSACoWRQ/vGgk6F7+cxhup+zjQ0tr3DI4PKwMllcCuxZCRzc495Zd1toi6IbyQihcdgNuM3AgBmrPWpu7Eq1PDm+s6Bu0hL5vVXtrBf0YfSNHbHjvbKIQJVgLYAIAANgAq4sfjLEmAVhSWICfEoCr54sAIlJkCg1e4U2qApyCHSokAPAaFxfrPBZQC6A9P43zO0k+SskXC3B2dgYguoVMua9ceJOC5TnYT7YOEIgri30edK5VCyg/j78CcAQQpgAACAA2UfkOXg+BQSPi/GQcoEPQogMQ0gEADJ51AM7e49f/Pn0Tgdfzj2cBtKRdnhRf+qC9Go0Akg4uLGhuCf/4qO/1AHlArPWDUbWo3EoxAElRHSBKTZGZmRGA6ykPsCz9eT9o8HOJbuZo+qdAAHOsMfaong20ugxATBCBxdWrWJrBqPfcA8Bs6Yt1Pz1eTe0J4OZeBKAbWvgYcHadCHBhA+tfDbgCAEicH59dHzo3hwt4Bgi6WL0KoMQFXJwJxL2KBaC8tonhG5MYJujB8O1LTFKHYbJ8DFOkYJg6AsO0vhhmcMTwg0vMbIxhNhUMc0pgmJsLw3y0GBYkwrDIJQZf8ihxyaPUJY+yl3w9vuRL4ZIv5Uusdsnjs0setS951Lvky/CSL5NLvswuseUljzaXPEIveXS85At2yZfLJV9ul9jzkkfv3x4DLvgeju8fvG78Bwkl/iAp7R+kxCAdRuHB5B9kq/uD3Cl/UBBTAowpIY3BJ5hqKpgSmpgSepgSJpgSlpgSUAzCMNXcMSV8/pQgw8fg3T8lyOj+6JKxY1DojxiZDCZNFZOmj4m1wsTC/8SSAv6skpL/SSPlxKzKYVYNMavP/6wSU2LwKQY9LvD1Bd5W+5sIjX8/3G9wcXHOn+27AIZJ8Wvn2wqA92fYYRPlRmD74dDdr7v4Hfl88v0elXmO2H4G+Y+5Lq0BaC8G4lqa5ZWpj1k4tCK4kvRyMkrXG2S7cC+K4eKei/4u9h8UUd6/',
83				align: 'center',
84				vAlign: 'middle',
85				offsetX: -100,
86				offsetY: -40
87			},
88	/*		logo: { //显示在右上角的logo图片,如果不需要可以删除该属性
89				file: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAUCAYAAAD4BKGuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAVTSURBVHja1Fl/aJVVGP4cw/mH5tUWi3I53cA0WbeIzMgaq6lQoVawm0S6glHhIKM/TELICotqCxMSGWQRdFfRLEhc9mMxqA0rbdS2wsV0GkZXuaKUWlHvgeeNh7f3u1du3Ft74eGcnXu+c873vD/Pt0nZbDZyZL2gWZAQTBH8IjggeEjgPZASPIB+g/P7EsGT6J/BfHfjHFIv2Jpjj/+dlDskvCm42Jk7X3C7YJOgw/z2oOBGwdEYRW0RVAjOCZ4ugNggqwU3CTLRBJFyQ+xuwVRY14igB78tE9QKpgmeEHwkGKRnq9AeMesHRWwEsYGUxwSdBZ51ecweE4Lct0DsOVjaZvptA8jfC4JfghWpXIJ2jMY+EDShf1pwh6DvX5x1GtpDE43cNFlfhyFWpQ9xd5FgFo3fRi++C+2nCBNBRgU3O6RsEyyEQv4QLMb4CcE9RlFBLqS1WZ6BZ83A35ofVhuvfE5QJrjWebdgCJOx51qM1QgewbMzsO57MDQrB9DeC8ObHd5Xyb2eiNiQQxmtgkZBr+OuZwV7BIcF1RgbF1wTE2MbEccX48VY9sMzBilhTke/m+b1Q9lefpgruI7OsYhIGzPJuAnn3+6EM7vu1YKl5vkrYRSfCGZivCxoMklk7M5j6eFlXyRNRSAvAoFf0Fo/CC7LkbwuQjsZsf0qwbuI9wlYgIqGl6NEzDYibJ/gbmAfxpKoMDRcaSK8xZzjZbK+NMhSYoNSngV5e+ksKXp+JdqZwDDmdpSbsqa9gNAyi5JalSGv3iQ+dtNK9HvI+sNBh2AhvNYVaH+msRtAdsa4ehoKCuQsoP2PY8+kCSkJ5IRWjD2FZ4/BOFSWYv9KhI40eUKQ31CqdnLM1c1OOnHufKSS+iEZvgHNhji8g1yT5VZKdCnHO+ajvrYK/I7GkuSWjwvq8Mzl5M79NF89aCHaBNXmWv0sQVUUZEDwsDnbr2i9s31lKyGuFs7kITEBC+snJaToRYIFrRN0CeYgoSUxJ23WUm85eB41b4IUuIvGtyIMVMY8lzHGMoYworF7J/onKYk10/wVQL6zXYr+Zq9aOEhuXZPDel8Q3If+HMzTeHPKlForEK+mws3SMfH2UMxNLIJbasKsoIQZwVLbKFkN4T1C3HxUMM+EkCAfgjwNV40Y304KriOP+jIHqa+jvYsqnH/kqzKaGCFZxWnoTqooxky8+dHUsOGwr6Jf
89i9jmlVVTHGLnot9L3qGWqCToWYYRF5fDa96mtb93yI2g8B0IWxlTHWmi/hOG00D4mEJfJ5WhQX7ySCsDUaNkJeud6+sgXCgs3OLEG2/xdZSh10JBeiB1zQU0HuQdSib60rOdm9kFToIL8hmFiRHzm1YM0ylet5k579OFpcUk4I0oD0/QuJ7tcBy5ERY6ixdrh5uNwN3bUV7pd4E+J958HmPxbRRydqK/in6vxj5aH9din/udEPKtuU1GqBL24xJwBInQWiHLcbQVKBXTzkVpHP0tWHsIpZUqPeWcrScXuX2ImRkqlufBhdQl15ig3WLKH0/SeAmtD+uprBqGx1ThhlWN5LKG4lcNKbDblFDjVDU0wWK7yLLqnPNk6cKzKsfXt1GQmQQXSuwymhd3tr9lkvPJMUV152kc2PsmUEMxtzdPRk2SNX2DQ3Vhr02Is18LXjHVAz/bG0NEK8johus3UBiwyfkYlDkQUyLaWrwZBrbHMaB8Z3PJLaYk8IIVKKPSJdxbv3ecynNzLNr33GKLV1YVW4IyfycXfq0UxP4X5HJdXCqX4Wv0AKqYkkipw4LG6WxMNi+GhAtH+M/K8wVe7wuWvwQYAFT+UsGCXmX3AAAAAElFTkSuQmCC',
90				align: 'right',
91				vAlign: 'top',
92				offsetX: -100,
93				offsetY: 10
94			},*/
95			advertisement: { //广告相关的配置
96				time: 5,//广告默认播放时长以及多个广告时每个广告默认播放时间,单位:秒
97				method: 'get',//广告监测地址默认请求方式,get/post
98				videoForce: false,//视频广告是否强制播放结束
99				videoVolume: 0.8,//视频音量
100				skipButtonShow: true,//是否显示跳过广告按钮
101				linkButtonShow: true,//是否显示广告链接按钮,如果选择显示,只有在提供了广告链接地址时才会显示
102				muteButtonShow: true,//是否在视频广告时显示静音按钮
103				closeButtonShow: true,//暂停时是否显示关闭广告按钮
104				closeOtherButtonShow: true,//其它广告是否需要关闭广告按钮
105				frontSkipButtonDelay: 1,//前置广告跳过广告按钮延时显示的时间,单位:秒
106				insertSkipButtonDelay: 0,//插入广告跳过广告按钮延时显示的时间,单位:秒
107				endSkipButtonDelay: 0,//后置广告跳过广告按钮延时显示的时间,单位:秒
108				frontStretched: 2,//前置广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
109				insertStretched: 2,//插入广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
110				pauseStretched: 2,//暂停广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
111				endStretched: 2 //结束广告拉伸方式,0=原始大小,1=自动缩放,2=只有当广告的宽或高大于播放器宽高时才进行缩放,3=参考播放器宽高,4=宽度参考播放器宽、高度自动,5=高度参考播放器高、宽度自动
112			},
113			video: { //视频的默认比例,当视频元数据里没有宽和高属性时默认使用该宽高
114				defaultWidth: 16,//宽度
115				defaultHeight: 9 //高度
116			}
117		}
118	};
119}
120! (function() {
121	var javascriptPath = '';
122	!function() {
123		var scriptList = document.scripts,
124		thisPath = scriptList[scriptList.length - 1].src;
125		javascriptPath = thisPath.substring(0, thisPath.lastIndexOf('/') + 1);
126	} ();
127	var ckplayer = function(obj) {
128		/*
129			javascript部分开发所用的注释说明:
130			1:初始化-程序调用时即运行的代码部分
131			2:定义样式-定义容器(div,p,canvas等)的样式表,即css
132			3:监听动作-监听元素节点(单击-click,鼠标进入-mouseover,鼠标离开-mouseout,鼠标移动-mousemove等)事件
133			4:监听事件-监听视频的状态(播放,暂停,全屏,音量调节等)事件
134			5:共用函数-这类函数在外部也可以使用
135			6:全局变量-定义成全局使用的变量
136			7:其它相关注释
137			全局变量说明:
138			在本软件中所使用到的全局变量(变量(类型)包括Boolean,String,Int,Object(包含元素对象和变量对象),Array,Function等)
139			下面列出重要的全局变量:
140				V:Object:视频对象
141				VA:Array:视频列表(包括视频地址,类型,清晰度说明)
142				ID:String:视频ID
143				CB:Object:控制栏各元素的集合对象
144				PD:Object:内部视频容器对象
145			---------------------------------------------------------------------------------------------
146			程序开始
147			下面为需要初始化配置的全局变量
148			初始化配置
149			config:全局变量定义一些基本配置
150		*/
151		this.config = {
152			videoDbClick: true,//是否支持双击全屏/退出全屏动作
153			errorTime: 100,//延迟判断失败的时间,单位:毫秒
154			videoDrawImage: false,//是否使用视频drawImage功能,注意,该功能在移动端表现不了
155			adSkipClick: 'javaScript->adjump' //h5环境中点击跳过广告按钮触发的功能
156		};
157		//全局变量:播放器默认配置,在外部传递过来相应配置后,则进行相关替换
158		this.varsConfig = {
159			playerID: '',//播放器ID
160			container: '',//视频容器的ID
161			variable: 'ckplayer',//播放函数(变量)名称
162			volume: 0.8,//默认音量,范围0-1
163			poster: '',//封面图片地址
164			autoplay: false,//是否自动播放
165			loop: false,//是否需要循环播放
166			live: false,//是否是直播
167			duration: 0,//指定总时间
168			forceduration:0,//强制使用该时间为总时间
169			seek: 0,//默认需要跳转的秒数
170			drag: '',//拖动时支持的前置参数
171			front: '',//前一集按钮动作
172			next: '',//下一集按钮动作
173			loaded: '',//加载播放器后调用的函数
174			flashplayer: false,//设置成true则强制使用flashplayer
175			html5m3u8: false,//PC平台上是否使用h5播放器播放m3u8
176			track: null,//字幕轨道
177			cktrack: null,//ck字幕
178			cktrackdelay:0,//字幕显示延迟时间
179			preview: null,//预览图片对象
180			prompt: null,//提示点功能
181			video: null,//视频地址
182			config: '',//调用配置函数名称
183			type: '',//视频格式
184			crossorigin: '',//设置html5视频的crossOrigin属性
185			crossdomain: '',//安全策略文件地址
186			unescape: false,//默认flashplayer里需要解码
187			mobileCkControls: false,//移动端h5显示控制栏
188			mobileAutoFull: true,//移动端是否默认全屏播放
189			playbackrate: 1,//默认倍速
190			h5container: '',//h5环境中使用自定义容器
191			debug: false,//是否开启调试模式
192			overspread:true,//是否让视频铺满播放器
193			//以下为广告相关配置
194			adfront: '',
195			adfronttime: '',
196			adfrontlink: '',
197			adpause: '',
198			adpausetime: '',
199			adpauselink: '',
200			adinsert: '',
201			adinserttime: '',
202			adinsertlink: '',
203			inserttime: '',
204			adend: '',
205			adendtime: '',
206			adendlink: '',
207			advertisements: ''
208		};
209		this.vars = {};//全局变量:语言配置
210		this.language = {
211			volume: '音量:',
212			play: '点击播放',
213			pause: '点击暂停',
214			full: '点击全屏',
215			escFull: '退出全屏',
216			mute: '点击静音',
217			escMute: '取消静音',
218			front: '上一集',
219			next: '下一集',
220			definition: '点击选择清晰度',
221			playbackRate: '点击选择速度',
222			subtitles: '点击选择字幕',
223			error: '加载出错',
224			adTime: '广告{$second}秒',
225			skipAd: '跳过广告',
226			skipAdTime: '{$second}秒后可跳过广告',
227			adLink: '查看详情',
228			noLoadShockwaveFlash:'您的浏览器不支持FlashPlayer插件或没有启用该插件',
229			downLoadShockwaveFlash:'点击下载FlashPlayer插件'
230		};
231		//全局变量:右键菜单:[菜单标题,类型(link:链接,default:灰色,function:调用函数,javascript:调用js函数),执行内容(包含链接地址,函数名称),[line(间隔线)]]
232		this.contextMenu = [/*['ckplayer', 'link', 'http://www.ckplayer.com', '_blank'], */['version:X1', 'default', 'line']];
233		//全局变量:错误提示列表
234		this.errorList = [['000', 'Object does not exist'], ['001', 'Variables type is not a object'], ['002', 'Video object does not exist'], ['003', 'Video object format error'], ['004', 'Video object format error'], ['005', 'Video object format error'], ['006', '[error] does not exist '], ['007', 'Ajax error'], ['008', 'Ajax error'], ['009', 'Ajax object format error'], ['010', 'Ajax.status:[error]']];
235		//全局变量:HTML5变速播放的值数组/如果不需要可以设置成null
236		this.playbackRateArr = [[0.5, '0.5倍'], [1, '正常'], [1.25, '1.25倍'], [1.5, '1.5倍'], [2, '2倍速'], [4, '4倍速']];
237		//全局变量:保存倍速
238		this.playbackRateTemp=1;
239		//全局变量:HTML5默认变速播放的值
240		this.playbackRateDefault = 1;
241		//全局变量:HTML5当前显示的字幕编号
242		this.subtitlesTemp=-1;
243		//全局变量:定义logo
244		this.logo = '';
245		//全局变量:是否加载了播放器
246		this.loaded = false;
247		//全局变量:计时器,监听视频加载出错的状态
248		this.timerError = null;
249		//全局变量:是否出错
250		this.error = false;
251		//全局变量:出错地址的数组
252		this.errorUrl = [];
253		//全局变量:计时器,监听全屏与非全屏状态
254		this.timerFull = null;
255		//全局变量:是否全屏状态
256		this.full = false;
257		//全局变量:计时器,监听当前的月/日 时=分=秒
258		this.timerTime = null;
259		//全局变量:计时器,监听视频加载
260		this.timerBuffer = null;
261		//全局变量:设置进度按钮及进度条是否跟着时间变化,该属性主要用来在按下进度按钮时暂停进度按钮移动和进度条的长度变化
262		this.isTimeButtonMove = true;
263		//全局变量:进度栏是否有效,如果是直播,则不需要监听时间让进度按钮和进度条变化
264		this.isTimeButtonDown = false;
265		//全局变量:用来模拟双击功能的判断
266		this.isClick = false;
267		//全局变量:计时器,用来模拟双击功能的计时器
268		this.timerClick = null;
269		//全局变量:计时器,旋转loading
270		this.timerLoading = null;
271		//全局变量:计时器,监听鼠标在视频上移动显示控制栏
272		this.timerCBar = null;
273		//全局变量:播放视频时如果该变量的值大于0,则进行跳转后设置该值为0
274		this.needSeek = 0;
275		//全局变量:当前音量
276		this.volume = 0;
277		//全局变量:静音时保存临时音量
278		this.volumeTemp = 0;
279		//全局变量/变量类型:Number/功能:当前播放时间
280		this.time = 0;
281		//全局变量:定义首次调用
282		this.isFirst = true;
283		//全局变量:是否使用HTML5-VIDEO播放
284		this.html5Video = true;
285		//全局变量记录视频容器节点的x;y
286		this.pdCoor = {
287			x: 0,
288			y: 0
289		};
290		//全局变量:判断当前使用的播放器类型,html5video或flashplayer
291		this.playerType = '';
292		//全局变量:加载进度条的长度
293		this.loadTime = 0;
294		//全局变量:body对象
295		this.body = document.body || document.documentElement;
296		//全局变量:播放器
297		this.V = null;
298		//全局变量:保存外部js监听事件数组
299		this.listenerJsArr = [];
300		//全局变量:保存控制栏显示元素的总宽度
301		this.buttonLen = 0;
302		//全局变量:保存控制栏显示元素的数组
303		this.buttonArr = [];
304		//全局变量:保存按钮元素的宽
305		this.buttonWidth = {};
306		//全局变量:保存播放器上新增元件的数组
307		this.elementArr = [];
308		//全局变量:保存播放器上弹幕的临时数组
309		this.elementTempArr = [];
310		//全局变量:字幕内容
311		this.track = [];
312		//全局变量:字幕索引
313		this.trackIndex = 0;
314		//全局变量:当前显示的字幕内容
315		this.nowTrackShow = {
316			sn: ''
317		};
318		//全局变量:保存字幕元件数组
319		this.trackElement = [];
320		//全局变量:将视频转换为图片
321		this.timerVCanvas = null;
322		//全局变量:animate,缓动对象数组
323		this.animateArray = [];
324		//全局变量:保存animate的元件
325		this.animateElementArray = [];
326		//全局变量:保存需要在暂停时停止缓动的数组
327		this.animatePauseArray = [];
328		//全局变量:预览图片加载状态/0=没有加载,1=正在加载,2=加载完成
329		this.previewStart = 0;
330		//全局变量:预览图片容器
331		this.previewDiv = null;
332		//全局变量:预览框
333		this.previewTop = null;
334		//全局变量:预览框的宽
335		this.previewWidth = 120;
336		//全局变量:预览图片容器缓动函数
337		this.previewTween = null;
338		//全局变量:是否是m3u8格式,是的话则可以加载hls.js
339		this.isM3u8 = false;
340		//全局变量:保存提示点数组
341		this.promptArr = [];
342		//全局变量:显示提示点文件的容器
343		this.promptElement = null;
344		//全局变量:配置文件函数
345		this.ckplayerConfig = {};
346		//全局变量:控制栏是否显示
347		this.showFace = true;
348		//全局变量:是否监听过h5的错误
349		this.errorAdd = false;
350		//全局变量:是否发送了错误
351		this.errorSend = false;
352		//全局变量:控制栏是否隐藏
353		this.controlBarIsShow = true;
354		//全局变量,保存当前缩放比例
355		this.videoScale = 1;
356		//全局变量:设置字体
357		this.fontFamily = '"Microsoft YaHei"; YaHei; "\5FAE\8F6F\96C5\9ED1"; SimHei; "\9ED1\4F53";Arial';
358		//全局变量:设置字幕的文字大小
359		this.trackFontSize=16;
360		//全局变量:记录第一次拖动进度按钮时的位置
361		this.timeSliderLeftTemp = 0;
362		//全局变量:判断是否记录了总时间
363		this.durationSendJS = false;
364		//全局变量:初始化广告分析是否结束设置
365		this.adAnalysisEnd = false;
366		//全局变量:广告变量
367		this.advertisements = {};
368		//全局变量:是否是第一次播放视频
369		this.isFirstTimePlay = true;
370		//全局变量:当前需要播放的广告类型
371		this.adType = '';
372		//全局变量:播放广告计数
373		this.adI = 0;
374		//全局变量:要播放的临时地址
375		this.videoTemp = {
376			src: '',
377			source: '',
378			currentSrc: '',
379			loop: false
380		};
381		//全局变量:当前要播放的广告组总时间
382		this.adTimeAllTotal = 0;
383		//全局变量:肖前要播放的广告时间
384		this.adTimeTotal = 0;
385		//全局变量:用来做倒计时
386		this.adCountDownObj = null;
387		//全局变量:前置,中插,结尾广告是否已开始运行
388		this.adPlayStart = false;
389		//全局变量:目前是否在播放广告
390		this.adPlayerPlay = false;
391		//全局变量:当前广告是否暂停
392		this.adIsPause = false;
393		//全局变量:视频广告是否静音
394		this.adVideoMute = false;
395		//全局变量:是否需要记录当前播放的时间供广告播放结束后进行跳转
396		this.adIsVideoTime = false;
397		//全局变量:后置广告是否播放
398		this.endAdPlay = false;
399		//全局变量:暂停广告是否在显示
400		this.adPauseShow = false;
401		//全局变量:是否需要重置广告以实现重新播放时再播放一次
402		this.adReset = false;
403		//全局变量:记录鼠标在视频上点击时的坐标
404		this.videoClickXy={x:0,y:0};
405		//全局变量:是否在播放广告时播放过视频广告
406		this.adVideoPlay = false;
407		if (obj) {
408			this.embed(obj);
409		}
410		//全局变量:临时存储已加载时间的变量
411		this.loadTimeTemp=0;
412		//全局变量,临时存储hls形式下首次加载时是否需要暂停或播放的判断
413		this.hlsAutoPlay=true;
414	};
415	ckplayer.prototype = {
416		/*
417			主要函数部分开始
418			主接口函数:
419			调用播放器需初始化该函数
420		*/
421		embed: function(c) {
422			//c:Object:是调用接口传递的属性对象
423			if (window.location.href.substr(0, 7) == 'file://') {//如果是使用的file协议打网页则弹出提示
424				alert('Please use the HTTP protocol to open the page');
425				return;
426			}
427			if (c == undefined || !c) {
428				this.eject(this.errorList[0]);
429				return;
430			}
431			if (typeof(c) != 'object') {
432				this.eject(this.errorList[1]);
433			}
434			this.vars = this.standardization(this.varsConfig, c);
435			if (!this.vars['mobileCkControls'] && this.isMobile()) {
436				this.vars['flashplayer'] = false;
437				this.showFace = false;
438			}
439			var videoString = this.vars['video'];
440			if (!videoString) {
441				this.eject(this.errorList[2]);
442				return;
443			}
444			if (typeof(videoString) == 'string') {
445				if (videoString.substr(0, 3) == 'CK:' || videoString.substr(0, 3) == 'CE:' || videoString.substr(8, 3) == 'CK:' || videoString.substr(8, 3) == 'CE:') {
446					this.vars['flashplayer'] = true;
447				}
448			}
449			if (typeof(videoString) == 'object') {
450				if (videoString.length > 1) {
451					if (videoString[0][0].substr(0, 3) == 'CK:' || videoString[0][0].substr(0, 3) == 'CE:' || videoString[0][0].substr(8, 3) == 'CK:' || videoString[0][0].substr(8, 3) == 'CE:') {
452						this.vars['flashplayer'] = true;
453					}
454				}
455			}
456			if (this.vars['config']) {
457				this.ckplayerConfig = eval(this.vars['config'] + '()');
458			} else {
459				this.ckplayerConfig = ckplayerConfig();
460			}
461			if ((!this.supportVideo() && this.vars['flashplayer'] != '') || (this.vars['flashplayer'] && this.uploadFlash()) || !this.isMsie()) {
462				this.html5Video = false;
463				this.getVideo();
464			} else if (videoString) {
465				//判断视频数据类型
466				this.analysedVideoUrl(videoString);
467				return this;
468			} else {
469				this.eject(this.errorList[2]);
470			}
471		},
472		/*
473			内部函数
474			根据外部传递过来的video开始分析视频地址
475		*/
476		analysedVideoUrl: function(video) {
477			var i = 0,
478			y = 0;
479			var thisTemp = this;
480			this.VA = [];
480//定义全局变量VA:视频列表(包括视频地址,类型,清晰度说明)
481			if (this.typeString(video) == 'string') { //如果是字符形式的则判断后缀进行填充
482				if (video.substr(0, 8) != 'website:') {
483					this.VA = [[video, '', '', 0]];
484					var fileExt = this.getFileExt(video);
485					switch (fileExt) {
486					case '.mp4':
487						this.VA[0][1] = 'video/mp4';
488						break;
489					case '.ogg':
490						this.VA[0][1] = 'video/ogg';
491						break;
492					case '.webm':
493						this.VA[0][1] = 'video/webm';
494						break;
495					default:
496						break;
497					}
498					this.getVideo();
499				} else {
500					if (this.html5Video) {
501						var ajaxObj = {
502							url: video.substr(8),
503							success: function(data) {
504								if (data) {
505									thisTemp.analysedUrl(data);
506								} else {
507									thisTemp.eject(thisTemp.errorList[5]);
508									this.VA = video;
509									thisTemp.getVideo();
510								}
511							}
512						};
513						this.ajax(ajaxObj);
514					} else {
515						this.VA = video;
516						this.getVideo();
517					}
518
519				}
520			} 
521			else if(this.typeString(video)=='array'){//如果视频地址是数组
522				if (!this.isUndefined(typeof(video[0].length))) { //如果视频地址是二维数组
523					this.VA = video;
524				}
525				this.getVideo();
526			}
527			else if(this.typeString(video)=='object'){
528				/*
529					如果video格式是对象形式,则分二种
530					如果video对象里包含type,则直接播放
531				*/
532				if (!this.isUndefined(video['type'])) {
533					this.VA.push([video['file'], video['type'], '', 0]);
534					this.getVideo();
535				} else {
536					this.eject(this.errorList[5]);
537				}
538			}
539			else {
540				this.eject(this.errorList[4]);
541			}
542		},
543		/*
544			对请求到的视频地址进行重新分析
545		*/
546		analysedUrl: function(data) {
547			this.vars = this.standardization(this.vars, data);
548			if (!this.isUndefined(data['video'])) {
549				this.vars['video'] = data['video'];
550			}
551			this.analysedVideoUrl(this.vars['video']);
552		},
553		/*
554			内部函数
555			检查浏览器支持的视频格式,如果是则将支持的视频格式重新分组给播放列表
556		*/
557		getHtml5Video: function() {
558			var va = this.VA;
559			var nva = [];
560			var mobile = false;
561			var video = document.createElement('video');
562			var codecs = function(type) {
563				var cod = '';
564				switch (type) {
565				case 'video/mp4':
566					cod = 'avc1.4D401E, mp4a.40.2';
567					break;
568				case 'video/ogg':
569					cod = 'theora, vorbis';
570					break;
571				case 'video/webm':
572					cod = 'vp8.0, vorbis';
573					break;
574				default:
575					break;
576				}
577				return cod;
578			};
579			var supportType = function(vidType, codType) {
580				if (!video.canPlayType) {
581					this.html5Video = false;
582					return;
583				}
584				var isSupp = video.canPlayType(vidType + ';codecs="' + codType + '"');
585				if (isSupp == '') {
586					return false
587				}
588				return true;
589			};
590			if (this.vars['flashplayer'] || !this.isMsie()) {
591				this.html5Video = false;
592				return;
593			}
594			if (this.isMobile()) {
595				mobile = true;
596			}
597			for (var i = 0; i < va.length; i++) {
598				var v = va[i];
599				if (v) {
600					if (v[1] != '' && !mobile && supportType(v[1], codecs(v[1])) && v[0].substr(0, 4) != 'rtmp') {
601						nva.push(v);
602					}
603					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'] && !mobile) {
604						this.isM3u8 = true;
605						nva.push(v);
606					}
607				}
608			}
609			if (nva.length > 0) {
610				this.VA = nva;
611			} else {
612				if (!mobile) {
613					this.html5Video = false;
614				}
615			}
616		},
617		/*
618			内部函数
619			根据视频地址开始构建播放器
620		*/
621		getVideo: function() {
622			var thisTemp = this;
623			var v = this.vars;
624			//如果存在广告字段则开始分析广告
625			if (!this.adAnalysisEnd && (v['adfront'] != '' || v['adpause'] != '' || v['adinsert'] != '' || v['adend'] != '' || v['advertisements'] != '')) {
626				this.adAnalysisEnd = true;
627				this.adAnalysis();
628				return;
629			}
630			//如果存在字幕则加载
631			if (this.V) { //如果播放器已存在,则认为是从newVideo函数发送过来的请求
632				this.changeVideo();
633				return;
634			}
635			if (this.vars['cktrack']) {
636				this.loadTrack();
637			}
638			if (this.supportVideo() && !this.vars['flashplayer']) {
639				this.getHtml5Video(); //判断浏览器支持的视频格式
640			}
641			var src = '',
642			source = '',
643			poster = '',
644			loop = '',
645			autoplay = '',
646			track = '';
647			var video = v['video'];
648			var i = 0;
649			this.CD = this.getByElement(v['container']);
650			volume = v['volume'];
651			if (!this.CD) {
652				this.eject(this.errorList[6], v['container']);
653				return false;
654			}
655			//开始构建播放器容器
656			this.V = undefined;
657			var thisPd = null;
658			if (v['h5container'] != '') {
659				thisPd = this.getByElement(v['h5container']);
660				if (this.isUndefined(thisPd)) {
661					thisPd = null;
662				}
663			}
664			var isVideoH5 = null; //isUndefined  thisPd
665			if (v['playerID'] != '') {
666				isVideoH5 = this.getByElement('#' + v['playerID']);
667				if (this.isUndefined(isVideoH5)) {
668					isVideoH5 = null;
669				}
670			}
671			if (thisPd != null && isVideoH5 != null) {
672				this.PD = thisPd; //PD:定义播放器容器对象全局变量
673			} else {
674				var playerID = 'ckplayer' + this.randomString();
675				var playerDiv = document.createElement('div');
676				playerDiv.className = playerID;
677				this.CD.innerHTML = '';
678				this.CD.appendChild(playerDiv);
679				this.PD = this.getByElement(playerID); //PD:定义播放器容器对象全局变量
680			}
681			this.css(this.CD, {
682				backgroundColor: '#000000',
683				overflow: 'hidden',
684				position: 'relative'
685			});
686			this.css(this.PD, {
687				backgroundColor: '#000000',
688				width: '100%',
689				height: '100%',
690				fontFamily: this.fontFamily
691			});
692			if (this.html5Video) { //如果支持HTML5-VIDEO则默认使用HTML5-VIDEO播放器
693				//禁止播放器容器上鼠标选择文本
694				this.PD.onselectstart = this.PD.ondrag = function() {
695					return false;
696				};
697				//播放器容器构建完成并且设置好样式
698				//构建播放器
699				if (this.VA.length == 1) {
700					this.videoTemp['src'] = decodeURIComponent(this.VA[0][0]);
701					src = ' src="' + this.videoTemp['src'] + '"';
702
703				} else {
704					var videoArr = this.VA.slice(0);
705					videoArr = this.arrSort(videoArr);
706					for (i = 0; i < videoArr.length; i++) {
707						var type = '';
708						var va = videoArr[i];
709						if (va[1]) {
710							type = ' type="' + va[1] + '"';
711							if (type == ' type="video/m3u8"' || type == ' type="m3u8"') {
712								type = '';
713							}
714						}
715						source += '<source src="' + decodeURIComponent(va[0]) + '"' + type + '>';
716					}
717					this.videoTemp['source'] = source;
718				}
719				//分析视频地址结束
720				if (v['autoplay']) {
721					autoplay = ' autoplay="autoplay"';
722				}
723				if (v['poster']) {
724					poster = ' poster="' + v['poster'] + '"';
725				}
726				if (v['loop']) {
727					loop = ' loop="loop"';
728				}
729				if (v['seek'] > 0) {
730					this.needSeek = v['seek'];
731				}
732				if (v['track'] != null && v['cktrack'] == null) {
733					var trackArr = v['track'];
734					var trackDefault = '';
735					var defaultHave = false;
736					for (i = 0; i < trackArr.length; i++) {
737						var trackObj = trackArr[i];
738						if (trackObj['default'] && !defaultHave) {
739							trackDefault = ' default';
740							defaultHave = true;
741						} else {
742							trackDefault = '';
743						}
744						track += '<track kind="' + trackObj['kind'] + '" src="' + trackObj['src'] + '" srclang="' + trackObj['srclang'] + '" label="' + trackObj['label'] + '"' + trackDefault + '>';
745					}
746				}
747				var autoLoad = this.ckplayerConfig['config']['autoLoad'];
748				var preload = '';
749				if (!autoLoad) {
750					preload = ' preload="meta"';
751				}
752				var vid = this.randomString();
753				var controls = '';
754				if (!this.showFace) {
755					controls = ' controls="controls"';
756				}
757				var mobileAutoFull = v['mobileAutoFull'];
758				var mobileautofull = '';
759				if (!mobileAutoFull) {
760					mobileautofull = ' x-webkit-airplay="true" playsinline  webkit-playsinline="true"  x5-video-player-type="h5"';
761				}
762				if (isVideoH5 != null && thisPd != null) {
763					this.V = isVideoH5;
764					if (v['poster']) {
765						this.V.poster = v['poster'];
766					}
767				} else {
768					var html = '';
769					if (!this.isM3u8) {
770						html = '<video id="' + vid + '"' + src + ' width="100%" height="100%"' + autoplay + poster + loop + preload + controls + mobileautofull + track + '>' + source + '</video>';
771					} else {
772						html = '<video id="' + vid + '" width="100%" height="100%"' + poster + loop + preload + controls + mobileautofull + track + '></video>';
773					}
774					this.PD.innerHTML = html;
775					this.V = this.getByElement('#' + vid); //V:定义播放器对象全局变量
776				}
777				if (this.vars['crossorigin']) {
778					this.V.crossOrigin = this.vars['crossorigin'];
779				}
780				try {
781					this.V.volume = volume; //定义音量
782					if (this.playbackRateArr && this.vars['playbackrate'] > -1) {
783						if (this.vars['playbackrate'] < this.playbackRateArr.length) {
784							this.playbackRateDefault = this.vars['playbackrate'];
785						}
786						this.V.playbackRate = this.playbackRateArr[this.playbackRateDefault][0]; //定义倍速
787					}
788				} catch(error) {}
789				this.css(this.V, {
790					width: '100%',
791					height: '100%'
792				});
793				if (this.isM3u8) {
794					var loadJsHandler = function() {
795						thisTemp.embedHls(thisTemp.VA[0][0], v['autoplay']);
796					};
797					this.loadJs(javascriptPath + 'hls/hls.min.js', loadJsHandler);
798				}
799				this.css(this.V, 'backgroundColor', '#000000');
800				//创建一个画布容器
801				if (this.config['videoDrawImage']) {
802					var canvasID = 'vcanvas' + this.randomString();
803					var canvasDiv = document.createElement('div');
804					canvasDiv.className = canvasID;
805					this.PD.appendChild(canvasDiv);
806					this.MD = this.getByElement(canvasID); //定义画布存储容器
807					this.css(this.MD, {
808						backgroundColor: '#000000',
809						width: '100%',
810						height: '100%',
811						position: 'absolute',
812						display: 'none',
813						cursor: 'pointer',
814						left: '0px',
815						top: '0px',
816						zIndex: '10'
817					});
818					var cvid = 'ccanvas' + this.randomString();
819					this.MD.innerHTML = this.newCanvas(cvid, this.PD.offsetWidth, this.PD.offsetHeight);
820					this.MDC = this.getByElement(cvid + '-canvas');
821					this.MDCX = this.MDC.getContext('2d');
822				}
823				this.playerType = 'html5video';
824				//播放器构建完成并且设置好样式
825				//建立播放器的监听函数,包含操作监听及事件监听
826				this.addVEvent();
827				//根据清晰度的值构建清晰度切换按钮
828				if (this.showFace) {
829					this.definition();
830					if (!this.vars['live'] && this.playbackRateArr && this.vars['playbackrate'] > -1) {
831						this.playbackRate();
832					}
833					if (v['autoplay']) {
834						this.loadingStart(true);
835					}
836					this.subtitleSwitch();
837				}
838				this.playerLoad();
839			} else { //如果不支持HTML5-VIDEO则调用flashplayer
840				this.embedSWF();
841			}
842		},
843		/*
844			分析广告数据
845		*/
846		adAnalysis: function() {
847			var thisTemp = this;
848			var v = this.vars;
849			var isAdvShow = [];
850			var i = 0;
851			if (v['advertisements'] != '' && v['advertisements'].substr(0, 8) == 'website:') {
852				var ajaxObj = {
853					url: v['advertisements'].substr(8),
854					success: function(data) {
855						if (data) {
856							var newData = {};
857							var val = null;
858							//对广告进行分析
859							try {
860								if (!thisTemp.isUndefined(data['front']) || !thisTemp.isUndefined(data['pause']) || !thisTemp.isUndefined(data['end']) || !thisTemp.isUndefined(data['insert']) || !thisTemp.isUndefined(data['other'])) {
861									val = thisTemp.arrayDel(data['front']);
862									if (!thisTemp.isUndefined(val)) {
863										newData['front'] = val;
864									}
865									val = thisTemp.arrayDel(data['pause']);
866									if (!thisTemp.isUndefined(val)) {
867										newData['pause'] = val;
868									}
869									val = thisTemp.arrayDel(data['insert']);
870									if (!thisTemp.isUndefined(val)) {
871										newData['insert'] = val;
872										if (!thisTemp.isUndefined(data['inserttime'])) {
873											newData['inserttime'] = thisTemp.arrayInt(data['inserttime']);
874											isAdvShow = [];
875											for (i = 0; i < newData['inserttime'].length; i++) {
876												isAdvShow.push(false);
877											}
878											newData['insertPlay'] = isAdvShow;
879										}
880									}
881									val = thisTemp.arrayDel(data['end']);
882									if (!thisTemp.isUndefined(val)) {
883										newData['end'] = val;
884									}
885									val = thisTemp.arrayDel(data['other']);
886									if (!thisTemp.isUndefined(val)) {
887										newData['other'] = val;
888										isAdvShow = [];
889										var arrTemp = [];
890										for (i = 0; i < val.length; i++) {
891											isAdvShow.push(false);
892											arrTemp.push(parseInt('0' + val[i]['startTime']));
893										}
894										newData['othertime'] = arrTemp;
895										newData['otherPlay'] = isAdvShow;
896									}
897								}
898							} catch(event) {
899								thisTemp.log(event)
900							}
901							thisTemp.advertisements = newData;
902							//对广告进行分析结束
903						}
904						thisTemp.getVideo();
905					}
906				};
907				this.ajax(ajaxObj);
908			} else {
909				//根据广告分析
910				this.adAnalysisOne('front', 'adfront', 'adfronttime', 'adfrontlink', 'adfronttype');
911				this.adAnalysisOne('pause', 'adpause', 'adpausetime', 'adpauselink', 'adpausetype');
912				this.adAnalysisOne('insert', 'adinsert', 'adinserttime', 'adinsertlink', 'adinserttype');
913				this.adAnalysisOne('end', 'adend', 'adendtime', 'adendlink', 'adendtype');
914				if (!this.isUndefined(this.advertisements['insert'])) {
915					if (!this.isUndefined(v['inserttime'])) {
916						thisTemp.advertisements['inserttime'] = v['inserttime'];
917					}
918				}
919				if (!this.isUndefined(thisTemp.advertisements['inserttime'])) {
920					thisTemp.advertisements['inserttime'] = thisTemp.arrayInt(thisTemp.advertisements['inserttime']);
921					isInsert = [];
922					for (i = 0; i < thisTemp.advertisements['inserttime'].length; i++) {
923						isInsert.push(false);
924					}
925					thisTemp.advertisements['insertPlay'] = isInsert;
926				}
927				thisTemp.getVideo();
928			}
929		},
930		/*
931			将广告数组数据里不是视频和图片的去除
932		*/
933		arrayDel: function(arr) {
934			if(this.isUndefined(arr)){
935				return arr;
936			}
937			if (arr.length == 0) {
938				return null;
939			}
940			var newArr = [];
941			for (var i = 0; i < arr.length; i++) {
942				var type = arr[i]['type'];
943				if (type == 'mp4' || type == 'mov' || this.isStrImage(type)) {
944					newArr.push(arr[i]);
945				}
946			}
947			if (newArr.length > 0) {
948				return newArr;
949			}
950			return null;
951		},
952		/*分析单个类型的广告*/
953		adAnalysisOne: function(adType, adName, adTime, adLink, adStype) {
954			var v = this.vars;
955			if (this.isUndefined(v[adName])) {
956				v[adName] = '';
957			}
958			if (this.isUndefined(v[adTime])) {
959				v[adTime] = '';
960			}
961			if (this.isUndefined(v[adLink])) {
962				v[adLink] = '';
963			}
964			if (this.isUndefined(v[adStype])) {
965				v[adStype] = '';
966			}
967			if (v[adName] != '') {
968				var adList = [];
969				var ad = v[adName].split(',');
970				var adtime = v[adTime].split(',');
971				var adlink = v[adLink].split(',');
972				var adstype = v[adStype].split(',');
973				var i = 0;
974				if (ad.length > 0) {
975					var adLinkLen = adlink.length,
976					adTimeLen = adtime.length;
977					if (v[adLink] == '') {
978						adLinkLen = 0;
979						adlink = [];
980					}
981					if (v[adTime] == '') {
982						adTimeLen = 0;
983						adtime = [];
984					}
985					if (adLinkLen < ad.length) {
986						for (i = adLinkLen; i < ad.length; i++) {
987							adlink.push('');
988						}
989					}
990					if (adTimeLen < ad.length) {
991						for (i = adTimeLen; i < ad.length; i++) {
992							adtime.push('');
993						}
994					}
995					var adstypeLen = adstype.length;
996					if (v[adStype] == '') {
997						adstypeLen = 0;
998						adstype = [];
999					}
1000					if (adstypeLen < ad.length) {
1001						for (i = adstypeLen; i < ad.length; i++) {
1002							adstype.push(this.getFileExt(ad[i]).replace('.', ''));
1003						}
1004					}
1005					for (i = 0; i < ad.length; i++) {
1006						var type = adstype[i];
1007						if (type == 'mp4' || type == 'mov' || this.isStrImage(type)) {
1008							var obj = {
1009								file: ad[i],
1010								type: type,
1011								time: parseInt(adtime[i]) > 0 ? parseInt(adtime[i]) : this.ckplayerConfig['style']['advertisement']['time'],
1012								link: adlink[i]
1013							};
1014							adList.push(obj);
1015						}
1016
1017					}
1018					if (this.isUndefined(this.advertisements)) {
1019						this.advertisements = {};
1020					}
1021					if (adList.length > 0) {
1022						this.advertisements[adType] = adList;
1023					}
1024				}
1025			}
1026		},
1027		/*
1028			内部函数
1029			发送播放器加载成功的消息
1030		*/
1031		playerLoad: function() {
1032			var thisTemp = this;
1033			if (this.isFirst) {
1034				this.isFirst = false;
1035				setTimeout(function() {
1036					thisTemp.loadedHandler();
1037				},1);
1038			}
1039		},
1040		/*
1041			内部函数
1042			建立播放器的监听函数,包含操作监听及事件监听
1043		*/
1044		addVEvent: function() {
1045			var thisTemp = this;
1046			var duration=0;
1047			//监听视频单击事件
1048			var eventVideoClick = function(event) {
1049				thisTemp.videoClickXy={x:event.clientX,y:event.clientY};
1050				thisTemp.videoClick();
1051			};
1052			this.addListenerInside('click', eventVideoClick);
1053			this.addListenerInside('click', eventVideoClick, this.MDC);
1054			//延迟计算加载失败事件
1055			this.timerErrorFun();
1056			//监听视频加载到元数据事件
1057			var eventJudgeIsLive = function(event) {
1058				thisTemp.sendJS('loadedmetadata');
1059				if (typeof(thisTemp.V.duration) == 'number' && thisTemp.V.duration > 1) {
1060					duration = thisTemp.V.duration;
1061					if(!duration){
1062						if(thisTemp.vars['duration']>0){
1063							duration=thisTemp.vars['duration'];
1064						}
1065					}
1066					if(thisTemp.vars['forceduration']>0){
1067						duration=thisTemp.vars['forceduration'];
1068					}
1069					thisTemp.sendJS('duration', duration);
1070					thisTemp.formatInserttime(duration);
1071					if (thisTemp.adPlayerPlay) {
1072						thisTemp.advertisementsTime(duration + 1);
1073					}
1074					thisTemp.durationSendJS = true;
1075				}
1076				thisTemp.judgeIsLive();
1077			};
1078			this.addListenerInside('loadedmetadata', eventJudgeIsLive);
1079			//监听视频播放事件
1080			var eventPlaying = function(event) {
1081				thisTemp.playingHandler();
1082				thisTemp.sendJS('play');
1083				thisTemp.sendJS('paused', false);
1084				if (!thisTemp.durationSendJS && typeof(thisTemp.V.duration) == 'number' && thisTemp.V.duration > 0) {
1085					duration = thisTemp.V.duration;
1086					if(!duration){
1087						if(thisTemp.vars['duration']>0){
1088							duration=thisTemp.vars['duration'];
1089						}
1090					}
1091					if(thisTemp.vars['forceduration']>0){
1092						duration=thisTemp.vars['forceduration'];
1093					}
1094					thisTemp.durationSendJS = true;
1095					thisTemp.sendJS('duration', duration);
1096					thisTemp.formatInserttime(duration);
1097				}
1098			};
1099			this.addListenerInside('playing', eventPlaying);
1100			//监听视频暂停事件
1101			var eventPause = function(event) {
1102				thisTemp.pauseHandler();
1103				thisTemp.sendJS('pause');
1104				thisTemp.sendJS('paused', true);
1105			};
1106			this.addListenerInside('pause', eventPause);
1107			//监听视频播放结束事件
1108			var eventEnded = function(event) {
1109				thisTemp.endedHandler();
1110			};
1111			this.addListenerInside('ended', eventEnded);
1112			//监听视频播放时间事件
1113			var eventTimeupdate = function(event) {
1114				if (thisTemp.timerLoading != null) {
1115					thisTemp.loadingStart(false);
1116				}
1117				if (thisTemp.time) {
1118					if (!thisTemp.adPlayerPlay) {
1119						thisTemp.sendJS('time', thisTemp.time);
1120						//监听中间插入广告是否需要播放
1121						if (!thisTemp.isUndefined(thisTemp.advertisements['insert'])) {
1122							thisTemp.checkAdInsert(thisTemp.time);
1123						}
1124						//监听其它广告
1125						if (!thisTemp.isUndefined(thisTemp.advertisements['other'])) {
1126							thisTemp.checkAdOther(thisTemp.time);
1127						}
1128						if (thisTemp.time < 3 && thisTemp.adReset) {
1129							thisTemp.adReset = false;
1130							thisTemp.endedAdReset();
1131						}
1132					} else { //如果是广告则进行广告倒计时
1133						thisTemp.adPlayerTimeHandler(thisTemp.time);
1134					}
1135
1136				}
1137			};
1138			this.addListenerInside('timeupdate', eventTimeupdate);
1139			//监听视频缓冲事件
1140			var eventWaiting = function(event) {
1141				thisTemp.loadingStart(true);
1142			};
1143			this.addListenerInside('waiting', eventWaiting);
1144			//监听视频seek开始事件
1145			var eventSeeking = function(event) {
1146				thisTemp.sendJS('seek', 'start');
1147			};
1148			this.addListenerInside('seeking', eventSeeking);
1149			//监听视频seek结束事件
1150			var eventSeeked = function(event) {
1151				thisTemp.seekedHandler();
1152				thisTemp.sendJS('seek', 'ended');
1153			};
1154			this.addListenerInside('seeked', eventSeeked);
1155			//监听视频音量
1156			var eventVolumeChange = function(event) {
1157				try {
1158					thisTemp.volumechangeHandler();
1159					thisTemp.sendJS('volume', thisTemp.volume || thisTemp.V.volume);
1160				} catch(event) {}
1161			};
1162			this.addListenerInside('volumechange', eventVolumeChange);
1163			//监听全屏事件
1164			var eventFullChange = function(event) {
1165				var fullState = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
1166				thisTemp.sendJS('full', fullState);
1167			};
1168			this.addListenerInside('fullscreenchange', eventFullChange);
1169			this.addListenerInside('webkitfullscreenchange', eventFullChange);
1170			this.addListenerInside('mozfullscreenchange', eventFullChange);
1171			//建立界面
1172			if (this.showFace) {
1173				this.interFace();
1174			}
1175		},
1176		/*
1177			内部函数
1178			重置界面元素
1179		*/
1180		resetPlayer: function() {
1181			this.timeTextHandler();
1182			if (this.showFace) {
1183				this.timeProgress(0, 1); //改变时间进度条宽
1184				this.changeLoad(0);
1185				this.initPlayPause(); //判断显示播放或暂停按钮
1186				this.definition(); //构建清晰度按钮
1187				this.showFrontNext(); //构建上一集下一集按钮
1188				this.deletePrompt(); //删除提示点
1189				this.deletePreview(); //删除预览图
1190				this.trackHide(); //重置字幕
1191				this.resetTrack();
1192				this.trackElement = [];
1193				this.track = [];
1194			}
1195		},
1196		/*
1197			内部函数
1198			构建界面元素
1199		 */
1200		interFace: function() {
1201			this.showFace = true;
1202			var thisTemp = this;
1203			var html = ''; //控制栏内容
1204			var i = 0;
1205			var bWidth = 38,//按钮的宽
1206			bHeight = 38; //按钮的高
1207			var bBgColor = '#FFFFFF',//按钮元素默认颜色
1208			bOverColor = '#0782F5'; //按钮元素鼠标经过时的颜色
1209			var timeInto = this.formatTime(0) + ' / ' + this.formatTime(this.vars['duration']); //时间显示框默认显示内容
1210			var randomS = this.randomString(10); //获取一个随机字符串
1211			/*
1212				以下定义界面各元素的ID,统一以ID结束
1213			*/
1214			var controlBarBgID = 'controlbgbar' + randomS,//控制栏背景
1215			controlBarID = 'controlbar' + randomS,//控制栏容器
1216			timeProgressBgID = 'timeprogressbg' + randomS,//播放进度条背景
1217			loadProgressID = 'loadprogress' + randomS,//加载进度条
1218			timeProgressID = 'timeprogress' + randomS,//播放进度条
1219			timeBOBGID = 'timebobg' + randomS,//播放进度按钮容器,该元素为一个透明覆盖在播放进度条上
1220			timeBOID = 'timebo' + randomS,//播放进度可拖动按钮外框
1221			timeBWID = 'timebw' + randomS,//播放进度可拖动按钮内框
1222			timeTextID = 'timetext' + randomS,//时间文本框
1223			playID = 'play' + randomS,//播放按钮
1224			pauseID = 'pause' + randomS,//暂停按钮
1225			frontID = 'front' + randomS,//前一集按钮
1226			nextID = 'next' + randomS,//下一集按钮
1227			fullID = 'full' + randomS,//全屏按钮
1228			escFullID = 'escfull' + randomS,//退出全屏按钮
1229			muteID = 'mute' + randomS,//静音按钮
1230			escMuteID = 'escmute' + randomS,//取消静音按钮				
1231			volumeID = 'volume' + randomS,//音量调节框容器
1232			volumeDbgID = 'volumedbg' + randomS,//音量调节框容器背景
1233			volumeBgID = 'volumebg' + randomS,//音量调节框背景层
1234			volumeUpID = 'volumeup' + randomS,//音量调节框可变宽度层
1235			volumeBOID = 'volumebo' + randomS,//音量调节按钮外框
1236			volumeBWID = 'volumebw' + randomS,//音量调节按钮内框
1237			definitionID = 'definition' + randomS,//清晰度容器
1238			definitionPID = 'definitionp' + randomS,//清晰度列表容器
1239			playbackRateID = 'playbackrate' + randomS,//倍速容器
1240			playbackRatePID = 'playbackratep' + randomS,//倍速列表容器
1241			subtitlesID = 'subtitles' + randomS,//多字幕容器
1242			subtitlesPID = 'subtitlesp' + randomS,//多字幕列表容器
1243			promptBgID = 'promptbg' + randomS,//提示框背景
1244			promptID = 'prompt' + randomS,//提示框
1245			dlineID = 'dline' + randomS,//分隔线共用前缀
1246			menuID = 'menu' + randomS,//右键容器
1247			pauseCenterID = 'pausecenter' + randomS,//中间暂停按钮
1248			loadingID = 'loading' + randomS,//缓冲
1249			errorTextID = 'errortext' + randomS,//错误文本框
1250			logoID = 'logo' + randomS,//logo
1251			adBackgroundID = 'background' + randomS,//广告背景图片
1252			adElementID = 'adelement' + randomS,//广告容器
1253			adBarID = 'adBar' + randomS,//广告顶部倒计时,跳过广告,静音按钮容器
1254			adSkipID = 'adskip' + randomS,//跳过广告按钮
1255			adTimeID = 'adtime' + randomS,//倒计时按钮
1256			adLinkID = 'adlink' + randomS,//广告链接按钮
1257			adMuteID = 'admute' + randomS,//广告静音按钮
1258			adEscMuteID = 'adescmute' + randomS,//广告取消静音按钮
1259			adPauseCloseID = 'adpauseclose' + randomS; //暂停广场的关闭按钮
1260			/*
1261				构建一些PD(播放器容器)里使用的元素
1262			*/
1263			var controlBarBg = document.createElement('div'),
1264			controlBar = document.createElement('div'),
1265			timeProgressBg = document.createElement('div'),
1266			timeBoBg = document.createElement('div'),
1267			pauseCenter = document.createElement('div'),
1268			errorText = document.createElement('div'),
1269			promptBg = document.createElement('div'),
1270			prompt = document.createElement('div'),
1271			menuDiv = document.createElement('div'),
1272			definitionP = document.createElement('div'),
1273			playbackrateP = document.createElement('div'),
1274			subtitlesP = document.createElement('div'),
1275			loading = document.createElement('div'),
1276			logo = document.createElement('div'),
1277			adBackground = document.createElement('div'),
1278			adElement = document.createElement('div'),
1279			adBar = document.createElement('div'),
1280			adLink = document.createElement('div'),
1281			adPauseClose = document.createElement('div');
1282			/*
1283				定义各节点的样式 
1284			*/
1285			controlBarBg.className = controlBarBgID;
1286			controlBar.className = controlBarID;
1287			timeProgressBg.className = timeProgressBgID;
1288			timeBoBg.className = timeBOBGID;
1289			promptBg.className = promptBgID;
1290			prompt.className = promptID;
1291			menuDiv.className = menuID;
1292			definitionP.className = definitionPID;
1293			playbackrateP.className = playbackRatePID;
1294			subtitlesP.className = subtitlesPID;
1295			pauseCenter.className = pauseCenterID;
1296			loading.className = loadingID;
1297			logo.className = logoID;
1298			errorText.className = errorTextID;
1299			adBackground.className = adBackgroundID;
1300			adElement.className = adElementID;
1301			adBar.className = adBarID;
1302			adLink.className = adLinkID;
1303			adPauseClose.className = adPauseCloseID;
1304			/*
1305				加载节点到播放器容器中
1306			*/
1307			this.PD.appendChild(controlBarBg);
1308			this.PD.appendChild(controlBar);
1309			this.PD.appendChild(timeProgressBg);
1310			this.PD.appendChild(timeBoBg);
1311			this.PD.appendChild(promptBg);
1312			this.PD.appendChild(prompt);
1313			this.PD.appendChild(definitionP);
1314			this.PD.appendChild(playbackrateP);
1315			this.PD.appendChild(subtitlesP);
1316			this.PD.appendChild(pauseCenter);
1317			this.PD.appendChild(loading);
1318			this.PD.appendChild(errorText);
1319			this.PD.appendChild(logo);
1320			this.PD.appendChild(adBackground);
1321			this.PD.appendChild(adElement);
1322			this.PD.appendChild(adBar);
1323			this.PD.appendChild(adLink);
1324			this.PD.appendChild(adPauseClose);
1325			this.body.appendChild(menuDiv);
1326			if (this.vars['live']) { //如果是直播,时间显示文本框里显示当前系统时间
1327				timeInto = this.getNowDate();
1328			}
1329			/*
1330				构建控制栏的内容 
1331			*/
1332			html += '<div class="' + playID + '" data-title="' + thisTemp.language['play'] + '">' + this.newCanvas(playID, bWidth, bHeight) + '</div>'; //播放按钮
1333			html += '<div class="' + pauseID + '" data-title="' + thisTemp.language['pause'] + '">' + this.newCanvas(pauseID, bWidth, bHeight) + '</div>'; //暂停按钮
1334			html += '<div class="' + dlineID + '-la"></div>'; //分隔线
1335			html += '<div class="' + frontID + '" data-title="' + thisTemp.language['front'] + '">' + this.newCanvas(frontID, bWidth, bHeight) + '</div>'; //前一集按钮
1336			html += '<div class="' + dlineID + '-lb"></div>'; //分隔线
1337			html += '<div class="' + nextID + '" data-title="' + thisTemp.language['next'] + '">' + this.newCanvas(nextID, bWidth, bHeight) + '</div>'; //下一集按钮
1338			html += '<div class="' + dlineID + '-lc"></div>'; //分隔线
1339			html += '<div class="' + timeTextID + '">' + timeInto + '</div>'; //时间文本
1340			html += '<div class="' + fullID + '" data-title="' + thisTemp.language['full'] + '">' + this.newCanvas(fullID, bWidth, bHeight) + '</div>'; //全屏按钮
1341			html += '<div class="' + escFullID + '" data-title="' + thisTemp.language['escFull'] + '">' + this.newCanvas(escFullID, bWidth, bHeight) + '</div>'; //退出全屏按钮
1342			html += '<div class="' + dlineID + '-ra"></div>'; //分隔线
1343			html += '<div class="' + definitionID + '" data-title="' + thisTemp.language['definition'] + '"></div>'; //清晰度容器
1344			html += '<div class="' + dlineID + '-rb"></div>'; //分隔线
1345			html += '<div class="' + playbackRateID + '" data-title="' + thisTemp.language['playbackRate'] + '"></div>'; //倍速
1346			html += '<div class="' + dlineID + '-rc"></div>'; //分隔线
1347			html += '<div class="' + subtitlesID + '" data-title="' + thisTemp.language['subtitles'] + '"></div>'; //字幕
1348			html += '<div class="' + dlineID + '-rd"></div>'; //分隔线
1349			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>'; //音量调节框,音量调节按钮
1350			html += '<div class="' + muteID + '" data-title="' + thisTemp.language['mute'] + '">' + this.newCanvas(muteID, bWidth, bHeight) + '</div>'; //静音按钮
1351			html += '<div class="' + escMuteID + '" data-title="' + thisTemp.language['escMute'] + '">' + this.newCanvas(escMuteID, bWidth, bHeight) + '</div>'; //退出静音按钮
1352			html += '<div class="' + dlineID + '-re"></div>'; //分隔线
1353			this.getByElement(controlBarID).innerHTML = html;
1354			//构建进度条内容
1355			this.getByElement(timeProgressBgID).innerHTML = '<div class="' + loadProgressID + '"></div><div class="' + timeProgressID + '"></div>';
1356			this.getByElement(timeBOBGID).innerHTML = '<div class="' + timeBOID + '"><div class="' + timeBWID + '"></div></div>';
1357			//构建进度条内容结束
1358			this.getByElement(pauseCenterID).innerHTML = this.newCanvas(pauseCenterID, 80, 80); //构建中间暂停按钮
1359			this.getByElement(loadingID).innerHTML = this.newCanvas(loadingID, 60, 60); //构建中间缓冲时显示的图标
1360			this.getByElement(errorTextID).innerHTML = this.language['error']; //构建错误时显示的文本框
1361			//构建广告相关
1362			html = '<div class="' + adTimeID + '">' + this.language['adTime'].replace('{$second}', 0) + '</div>';
1363			html += '<div class="' + adMuteID + '">' + this.newCanvas(adMuteID, 30, 30) + '</div>';
1364			html += '<div class="' + adEscMuteID + '">' + this.newCanvas(adEscMuteID, 30, 30) + '</div>';
1365			html += '<div class="' + adSkipID + '"></div>';
1366			this.getByElement(adBarID).innerHTML = html;
1367			this.getByElement(adLinkID).innerHTML = this.language['adLink'];
1368			this.getByElement(adPauseCloseID).innerHTML = this.newCanvas(adPauseCloseID, 20, 20);
1369			if (this.ckplayerConfig['style']['logo']) {
1370				if (this.ckplayerConfig['style']['logo']['file']) {
1371					var logoFile = this.ckplayerConfig['style']['logo']['file'];
1372					if (logoFile.substr(0, 15) == 'data:image/png;' || logoFile.substr(0, 15) == 'data:image/jpg;' || logoFile.substr(0, 16) == 'data:image/jpeg;') {
1373						this.getByElement(logoID).innerHTML = '<img src="' + logoFile + '" border="0">'; //构建logo
1374					}
1375				}
1376			} else {
1377				this.getByElement(logoID).innerHTML = this.vars['logo'] || this.logo || ''; //构建logo
1378			}
1379			var pd = this.PD;
1380			//CB:Object:全局变量,将一些全局需要用到的元素统一放在CB对象里
1381			this.CB = {
1382				controlBarBg: this.getByElement(controlBarBgID, pd),
1383				controlBar: this.getByElement(controlBarID, pd),
1384				promptBg: this.getByElement(promptBgID, pd),
1385				prompt: this.getByElement(promptID, pd),
1386				timeProgressBg: this.getByElement(timeProgressBgID, pd),
1387				loadProgress: this.getByElement(loadProgressID, pd),
1388				timeProgress: this.getByElement(timeProgressID, pd),
1389				timeBoBg: this.getByElement(timeBOBGID, pd),
1390				timeButton: this.getByElement(timeBOID, pd),
1391				timeText: this.getByElement(timeTextID, pd),
1392				play: this.getByElement(playID, pd),
1393				front: this.getByElement(frontID, pd),
1394				next: this.getByElement(nextID, pd),
1395				pause: this.getByElement(pauseID, pd),
1396				definition: this.getByElement(definitionID, pd),
1397				definitionP: this.getByElement(definitionPID, pd),
1398				definitionLine: this.getByElement(dlineID + '-rb', pd),
1399				playbackrate: this.getByElement(playbackRateID, pd),
1400				playbackrateP: this.getByElement(playbackRatePID, pd),
1401				playbackrateLine: this.getByElement(dlineID + '-rc', pd),
1402				subtitles: this.getByElement(subtitlesID, pd),
1403				subtitlesP: this.getByElement(subtitlesPID, pd),
1404				subtitlesLine: this.getByElement(dlineID + '-rd', pd),
1405				full: this.getByElement(fullID, pd),
1406				escFull: this.getByElement(escFullID, pd),
1407				mute: this.getByElement(muteID, pd),
1408				escMute: this.getByElement(escMuteID, pd),
1409				volume: this.getByElement(volumeID, pd),
1410				volumeBg: this.getByElement(volumeBgID, pd),
1411				volumeUp: this.getByElement(volumeUpID, pd),
1412				volumeBO: this.getByElement(volumeBOID, pd),
1413				pauseCenter: this.getByElement(pauseCenterID, pd),
1414				menu: this.getByElement(menuID),
1415				loading: this.getByElement(loadingID, pd),
1416				loadingCanvas: this.getByElement(loadingID + '-canvas', pd),
1417				errorText: this.getByElement(errorTextID, pd),
1418				logo: this.getByElement(logoID, pd),
1419				playLine: this.getByElement(dlineID + '-la', pd),
1420				frontLine: this.getByElement(dlineID + '-lb', pd),
1421				nextLine: this.getByElement(dlineID + '-lc', pd),
1422				fullLine: this.getByElement(dlineID + '-ra'),
1423				muteLine: this.getByElement(dlineID + '-re', pd),
1424				adBackground: this.getByElement(adBackgroundID, pd),
1425				adElement: this.getByElement(adElementID, pd),
1426				adBar: this.getByElement(adBarID, pd),
1427				adSkip: this.getByElement(adSkipID, pd),
1428				adTime: this.getByElement(adTimeID, pd),
1429				adLink: this.getByElement(adLinkID, pd),
1430				adMute: this.getByElement(adMuteID, pd),
1431				adEscMute: this.getByElement(adEscMuteID, pd),
1432				adPauseClose: this.getByElement(adPauseCloseID, pd)
1433			};
1434			this.buttonWidth = {
1435				play: bWidth,
1436				full: bWidth,
1437				front: bWidth,
1438				next: bWidth,
1439				mute: bWidth
1440			};
1441			//定义界面元素的样式
1442			//控制栏背景
1443			this.css(controlBarBgID, {
1444				width: '100%',
1445				height: bHeight + 'px',
1446				backgroundColor: '#000000',
1447				position: 'absolute',
1448				bottom: '0px',
1449				filter: 'alpha(opacity:0.8)',
1450				opacity: '0.8',
1451				zIndex: '990'
1452			});
1453			//控制栏容器
1454			this.css(controlBarID, {
1455				width: '100%',
1456				height: bHeight + 'px',
1457				position: 'absolute',
1458				bottom: '0px',
1459				zIndex: '990'
1460			});
1461			//中间暂停按钮
1462			this.css(pauseCenterID, {
1463				width: '80px',
1464				height: '80px',
1465				borderRadius: '50%',
1466				position: 'absolute',
1467				display: 'none',
1468				cursor: 'pointer',
1469				zIndex: '996'
1470			});
1471			//loading
1472			this.css(loadingID, {
1473				width: '60px',
1474				height: '60px',
1475				position: 'absolute',
1476				display: 'none',
1477				zIndex: '996'
1478			});
1479			//出错文本框
1480			this.css(errorTextID, {
1481				width: '120px',
1482				height: '30px',
1483				lineHeight: '30px',
1484				color: '#FFFFFF',
1485				fontSize: '14px',
1486				textAlign: 'center',
1487				position: 'absolute',
1488				display: 'none',
1489				zIndex: '101',
1490				cursor: 'default',
1491				zIndex: '996'
1492			});
1493			//定义logo文字的样式
1494			this.css(logoID, {
1495				height: '30px',
1496				lineHeight: '30px',
1497				color: '#FFFFFF',
1498				fontFamily: 'Arial',
1499				fontSize: '28px',
1500				textAlign: 'center',
1501				position: 'absolute',
1502				float: 'left',
1503				left: '-1000px',
1504				top: '20px',
1505				zIndex: '996',
1506				filter: 'alpha(opacity:0.8)',
1507				opacity: '0.8',
1508				cursor: 'default'
1509			});
1510
1511			this.css(this.CB['loadingCanvas'], {
1512				transform: 'rotate(0deg)',
1513				msTransform: 'rotate(0deg)',
1514				mozTransform: 'rotate(0deg)',
1515				webkitTransform: 'rotate(0deg)',
1516				oTransform: 'rotate(0deg)'
1517			});
1518			//定义提示语的样式
1519			this.css([promptBgID, promptID], {
1520				height: '30px',
1521				lineHeight: '30px',
1522				color: '#FFFFFF',
1523				fontSize: '14px',
1524				textAlign: 'center',
1525				position: 'absolute',
1526				borderRadius: '5px',
1527				paddingLeft: '5px',
1528				paddingRight: '5px',
1529				bottom: '0px',
1530				display: 'none',
1531				zIndex: '995'
1532			});
1533			this.css(promptBgID, {
1534				backgroundColor: '#000000',
1535				filter: 'alpha(opacity:0.5)',
1536				opacity: '0.5'
1537			});
1538			//时间进度条背景容器
1539			this.css(timeProgressBgID, {
1540				width: '100%',
1541				height: '6px',
1542				backgroundColor: '#3F3F3F',
1543				overflow: 'hidden',
1544				position: 'absolute',
1545				bottom: '38px',
1546				zIndex: '888'
1547			});
1548			//加载进度和时间进度
1549			this.css([loadProgressID, timeProgressID], {
1550				width: '1px',
1551				height: '6px',
1552				position: 'absolute',
1553				bottom: '38px',
1554				top: '0px',
1555				zIndex: '991'
1556			});
1557			this.css(loadProgressID, 'backgroundColor', '#6F6F6F');
1558			this.css(timeProgressID, 'backgroundColor', bOverColor);
1559			//时间进度按钮
1560			this.css(timeBOBGID, {
1561				width: '100%',
1562				height: '14px',
1563				overflow: 'hidden',
1564				position: 'absolute',
1565				bottom: '34px',
1566				cursor: 'pointer',
1567				zIndex: '992'
1568			});
1569			this.css(timeBOID, {
1570				width: '14px',
1571				height: '14px',
1572				overflow: 'hidden',
1573				borderRadius: '50%',
1574				backgroundColor: bBgColor,
1575				cursor: 'pointer',
1576				position: 'absolute',
1577				top: '0px',
1578				zIndex: '200'
1579			});
1580			this.css(timeBWID, {
1581				width: '8px',
1582				height: '8px',
1583				overflow: 'hidden',
1584				borderRadius: '50%',
1585				position: 'absolute',
1586				backgroundColor: bOverColor,
1587				left: '3px',
1588				top: '3px'
1589			});
1590			this.css(timeTextID, {
1591				lineHeight: bHeight + 'px',
1592				color: '#FFFFFF',
1593				fontFamily: 'arial',
1594				fontSize: '16px',
1595				paddingLeft: '10px',
1596				float: 'left',
1597				overflow: 'hidden',
1598				cursor: 'default'
1599			});
1600			//分隔线
1601			this.css([dlineID + '-la', dlineID + '-lb', dlineID + '-lc', dlineID + '-ra', dlineID + '-rb', dlineID + '-rc', dlineID + '-rd', dlineID + '-re'], {
1602				width: '0px',
1603				height: bHeight + 'px',
1604				overflow: 'hidden',
1605				borderLeft: '1px solid #303030',
1606				borderRight: '1px solid #151515',
1607				filter: 'alpha(opacity:0.9)',
1608				opacity: '0.9'
1609			});
1610			this.css([dlineID + '-la', dlineID + '-lb', dlineID + '-lc'], 'float', 'left');
1611			this.css([dlineID + '-ra', dlineID + '-rb', dlineID + '-rc', dlineID + '-rd', dlineID + '-re'], 'float', 'right');
1612			this.css([dlineID + '-lb', dlineID + '-lc', dlineID + '-rb', dlineID + '-rc', dlineID + '-rd'], 'display', 'none');
1613			//播放/暂停/上一集/下一集按钮
1614			this.css([playID, pauseID, frontID, nextID], {
1615				width: bWidth + 'px',
1616				height: bHeight + 'px',
1617				float: 'left',
1618				overflow: 'hidden',
1619				cursor: 'pointer'
1620			});
1621			this.css([frontID, nextID], 'display', 'none');
1622			//初始化判断播放/暂停按钮隐藏项
1623			this.initPlayPause();
1624
1625			//设置静音/取消静音的按钮样式
1626			this.css([muteID, escMuteID], {
1627				width: bWidth + 'px',
1628				height: bHeight + 'px',
1629				float: 'right',
1630				overflow: 'hidden',
1631				cursor: 'pointer'
1632			});
1633			if (this.vars['volume'] > 0) {
1634				this.css(escMuteID, 'display', 'none');
1635			} else {
1636				this.css(muteID, 'display', 'none');
1637			}
1638			if (!this.ckplayerConfig['config']['mobileVolumeBarShow'] && this.isMobile()) {
1639				this.css([muteID, escMuteID, volumeID, volumeDbgID, dlineID + '-re'], {
1640					display: 'none'
1641				});
1642			}
1643			//音量调节框
1644			this.css([volumeID, volumeDbgID], {
1645				width: '70px',
1646				height: bHeight + 'px',
1647				overflow: 'hidden',
1648				float: 'right'
1649			});
1650			this.css(volumeDbgID, {
1651				position: 'absolute'
1652			});
1653			this.css([volumeBgID, volumeUpID], {
1654				width: '60px',
1655				height: '6px',
1656				overflow: 'hidden',
1657				borderRadius: '5px',
1658				cursor: 'pointer'
1659			});
1660			this.css(volumeBgID, {
1661				position: 'absolute',
1662				top: '16px'
1663			});
1664			this.css(volumeBgID, 'backgroundColor', '#666666');
1665			this.css(volumeUpID, 'backgroundColor', bOverColor);
1666			this.buttonWidth['volume'] = 100;
1667			//音量调节按钮
1668			this.css(volumeBOID, {
1669				width: '12px',
1670				height: '12px',
1671				overflow: 'hidden',
1672				borderRadius: '50%',
1673				position: 'absolute',
1674				backgroundColor: bBgColor,
1675				top: '13px',
1676				left: '0px',
1677				cursor: 'pointer'
1678			});
1679			this.css(volumeBWID, {
1680				width: '6px',
1681				height: '6px',
1682				overflow: 'hidden',
1683				borderRadius: '50%',
1684				position: 'absolute',
1685				backgroundColor: bOverColor,
1686				left: '3px',
1687				top: '3px'
1688			});
1689			//清晰度容器
1690			this.css(definitionID, {
1691				lineHeight: bHeight + 'px',
1692				color: '#FFFFFF',
1693				float: 'right',
1694				fontSize: '14px',
1695				textAlign: 'center',
1696				overflow: 'hidden',
1697				display: 'none',
1698				cursor: 'pointer'
1699			});
1700			this.css(definitionPID, {
1701				lineHeight: (bHeight - 8) + 'px',
1702				color: '#FFFFFF',
1703				overflow: 'hidden',
1704				position: 'absolute',
1705				bottom: '4px',
1706				backgroundColor: '#000000',
1707				textAlign: 'center',
1708				zIndex: '995',
1709				cursor: 'pointer',
1710				display: 'none'
1711			});
1712			//倍速容器
1713			this.css(playbackRateID, {
1714				lineHeight: bHeight + 'px',
1715				color: '#FFFFFF',
1716				float: 'right',
1717				fontSize: '14px',
1718				textAlign: 'center',
1719				overflow: 'hidden',
1720				display: 'none',
1721				cursor: 'pointer'
1722			});
1723			this.css(playbackRatePID, {
1724				lineHeight: (bHeight - 8) + 'px',
1725				color: '#FFFFFF',
1726				overflow: 'hidden',
1727				position: 'absolute',
1728				bottom: '4px',
1729				backgroundColor: '#000000',
1730				textAlign: 'center',
1731				zIndex: '995',
1732				cursor: 'pointer',
1733				display: 'none'
1734			});
1735			//字幕容器
1736			this.css(subtitlesID, {
1737				lineHeight: bHeight + 'px',
1738				color: '#FFFFFF',
1739				float: 'right',
1740				fontSize: '14px',
1741				textAlign: 'center',
1742				overflow: 'hidden',
1743				display: 'none',
1744				cursor: 'pointer'
1745			});
1746			this.css(subtitlesPID, {
1747				lineHeight: (bHeight - 8) + 'px',
1748				color: '#FFFFFF',
1749				overflow: 'hidden',
1750				position: 'absolute',
1751				bottom: '4px',
1752				backgroundColor: '#000000',
1753				textAlign: 'center',
1754				zIndex: '995',
1755				cursor: 'pointer',
1756				display: 'none'
1757			});
1758			//设置全屏/退出全屏按钮样式
1759			this.css([fullID, escFullID], {
1760				width: bWidth + 'px',
1761				height: bHeight + 'px',
1762				float: 'right',
1763				overflow: 'hidden',
1764				cursor: 'pointer'
1765			});
1766			this.css(escFullID, 'display', 'none');
1767			//设置广告背景层样式
1768			this.css(adBackgroundID, {
1769				width: '100%',
1770				height: '100%',
1771				backgroundColor: '#000000',
1772				position: 'absolute',
1773				top: '0px',
1774				zIndex: '997',
1775				display: 'none'
1776			});
1777			this.css(adElementID, {
1778				position: 'absolute',
1779				overflow: 'hidden',
1780				top: '0px',
1781				zIndex: '998',
1782				float: 'center',
1783				display: 'none'
1784			});
1785			this.css(adBarID, {
1786				position: 'absolute',
1787				overflow: 'hidden',
1788				top: '10px',
1789				right: '10px',
1790				zIndex: '999',
1791				textAlign: 'right',
1792				display: 'none'
1793			});
1794			this.css(adTimeID, {
1795				backgroundColor: '#000000',
1796				color: '#FF0000',
1797				paddingLeft: '10px',
1798				paddingRight: '10px',
1799				lineHeight: (bHeight - 8) + 'px',
1800				marginLeft: '5px',
1801				float: 'right',
1802				cursor: 'pointer'
1803			});
1804			this.css([adMuteID, adEscMuteID], {
1805				backgroundColor: '#000000',
1806				width: '30px',
1807				height: '30px',
1808				marginLeft: '5px',
1809				float: 'right',
1810				display: 'none',
1811				cursor: 'pointer'
1812			});
1813			this.css(adSkipID, {
1814				backgroundColor: '#000000',
1815				lineHeight: (bHeight - 8) + 'px',
1816				color: '#FFFFFF',
1817				paddingLeft: '10px',
1818				paddingRight: '10px',
1819				float: 'right',
1820				display: 'none',
1821				cursor: 'pointer'
1822			});
1823			this.css(adLinkID, {
1824				backgroundColor: '#ea5503',
1825				lineHeight: (bHeight - 8) + 'px',
1826				color: '#FFFFFF',
1827				paddingLeft: '10px',
1828				paddingRight: '10px',
1829				position: 'absolute',
1830				overflow: 'hidden',
1831				bottom: '10px',
1832				right: '10px',
1833				zIndex: '999',
1834				display: 'none'
1835			});
1836			this.css(adPauseCloseID, {
1837				backgroundColor: '#f7f7f7',
1838				//f8f7f7
1839				widht: '20px',
1840				height: '20px',
1841				position: 'absolute',
1842				overflow: 'hidden',
1843				zIndex: '999',
1844				top: '60px',
1845				left: '30px',
1846				borderRadius: '20px',
1847				display: 'none',
1848				cursor: 'pointer'
1849			});
1850			//构建各按钮的形状
1851			//播放按钮
1852			var cPlay = this.getByElement(playID + '-canvas').getContext('2d');
1853			var cPlayFillRect = function() {
1854				thisTemp.canvasFill(cPlay, [[12, 10], [29, 19], [12, 28]]);
1855			};
1856			cPlay.fillStyle = bBgColor;
1857			cPlayFillRect();
1858			var cPlayOver = function(event) {
1859				cPlay.clearRect(0, 0, bWidth, bHeight);
1860				cPlay.fillStyle = bOverColor;
1861				cPlayFillRect();
1862			};
1863			var cPlayOut = function(event) {
1864				cPlay.clearRect(0, 0, bWidth, bHeight);
1865				cPlay.fillStyle = bBgColor;
1866				cPlayFillRect();
1867			};
1868
1869			this.addListenerInside('mouseover', cPlayOver, this.getByElement(playID + '-canvas'));
1870			this.addListenerInside('mouseout', cPlayOut, this.getByElement(playID + '-canvas'));
1871			//暂停按钮
1872			var cPause = this.getByElement(pauseID + '-canvas').getContext('2d');
1873			var cPauseFillRect = function() {
1874				thisTemp.canvasFillRect(cPause, [[10, 10, 5, 18], [22, 10, 5, 18]]);
1875			};
1876			cPause.fillStyle = bBgColor;
1877			cPauseFillRect();
1878			var cPauseOver = function(event) {
1879				cPause.clearRect(0, 0, bWidth, bHeight);
1880				cPause.fillStyle = bOverColor;
1881				cPauseFillRect();
1882			};
1883			var cPauseOut = function(event) {
1884				cPause.clearRect(0, 0, bWidth, bHeight);
1885				cPause.fillStyle = bBgColor;
1886				cPauseFillRect();
1887			};
1888			this.addListenerInside('mouseover', cPauseOver, this.getByElement(pauseID + '-canvas'));
1889			this.addListenerInside('mouseout', cPauseOut, this.getByElement(pauseID + '-canvas'));
1890			//前一集按钮
1891			var cFront = this.getByElement(frontID + '-canvas').getContext('2d');
1892			var cFrontFillRect = function() {
1893				thisTemp.canvasFill(cFront, [[16, 19], [30, 10], [30, 28]]);
1894				thisTemp.canvasFillRect(cFront, [[8, 10, 5, 18]]);
1895			};
1896			cFront.fillStyle = bBgColor;
1897			cFrontFillRect();
1898			var cFrontOver = function(event) {
1899				cFront.clearRect(0, 0, bWidth, bHeight);
1900				cFront.fillStyle = bOverColor;
1901				cFrontFillRect();
1902			};
1903			var cFrontOut = function(event) {
1904				cFront.clearRect(0, 0, bWidth, bHeight);
1905				cFront.fillStyle = bBgColor;
1906				cFrontFillRect();
1907			};
1908
1909			this.addListenerInside('mouseover', cFrontOver, this.getByElement(frontID + '-canvas'));
1910			this.addListenerInside('mouseout', cFrontOut, this.getByElement(frontID + '-canvas'));
1911			//下一集按钮
1912			var cNext = this.getByElement(nextID + '-canvas').getContext('2d');
1913			var cNextFillRect = function() {
1914				thisTemp.canvasFill(cNext, [[8, 10], [22, 19], [8, 28]]);
1915				thisTemp.canvasFillRect(cNext, [[25, 10, 5, 18]]);
1916			};
1917			cNext.fillStyle = bBgColor;
1918			cNextFillRect();
1919			var cNextOver = function(event) {
1920				cNext.clearRect(0, 0, bWidth, bHeight);
1921				cNext.fillStyle = bOverColor;
1922				cNextFillRect();
1923			};
1924			var cNextOut = function(event) {
1925				cNext.clearRect(0, 0, bWidth, bHeight);
1926				cNext.fillStyle = bBgColor;
1927				cNextFillRect();
1928			};
1929			this.addListenerInside('mouseover', cNextOver, this.getByElement(nextID + '-canvas'));
1930			this.addListenerInside('mouseout', cNextOut, this.getByElement(nextID + '-canvas'));
1931			//全屏按钮
1932			var cFull = this.getByElement(fullID + '-canvas').getContext('2d');
1933			var cFullFillRect = function() {
1934				thisTemp.canvasFillRect(cFull, [[19, 10, 9, 3], [25, 13, 3, 6], [10, 19, 3, 9], [13, 25, 6, 3]]);
1935			};
1936			cFull.fillStyle = bBgColor;
1937			cFullFillRect();
1938			var cFullOver = function() {
1939				cFull.clearRect(0, 0, bWidth, bHeight);
1940				cFull.fillStyle = bOverColor;
1941				cFullFillRect();
1942			};
1943			var cFullOut = function() {
1944				cFull.clearRect(0, 0, bWidth, bHeight);
1945				cFull.fillStyle = bBgColor;
1946				cFullFillRect();
1947			};
1948			this.addListenerInside('mouseover', cFullOver, this.getByElement(fullID + '-canvas'));
1949			this.addListenerInside('mouseout', cFullOut, this.getByElement(fullID + '-canvas'));
1950			//定义退出全屏按钮样式
1951			var cEscFull = this.getByElement(escFullID + '-canvas').getContext('2d');
1952			var cEscFullFillRect = function() {
1953				thisTemp.canvasFillRect(cEscFull, [[20, 9, 3, 9], [23, 15, 6, 3], [9, 20, 9, 3], [15, 23, 3, 6]]);
1954			};
1955			cEscFull.fillStyle = bBgColor;
1956			cEscFullFillRect();
1957			var cEscFullOver = function() {
1958				cEscFull.clearRect(0, 0, bWidth, bHeight);
1959				cEscFull.fillStyle = bOverColor;
1960				cEscFullFillRect();
1961			};
1962			var cEscFullOut = function() {
1963				cEscFull.clearRect(0, 0, bWidth, bHeight);
1964				cEscFull.fillStyle = bBgColor;
1965				cEscFullFillRect();
1966			};
1967			this.addListenerInside('mouseover', cEscFullOver, this.getByElement(escFullID + '-canvas'));
1968			this.addListenerInside('mouseout', cEscFullOut, this.getByElement(escFullID + '-canvas'));
1969			//定义静音按钮的样式
1970			var cMute = this.getByElement(muteID + '-canvas').getContext('2d');
1971			var cMuteFillRect = function() {
1972				thisTemp.canvasFill(cMute, [[10, 15], [15, 15], [21, 10], [21, 28], [15, 23], [10, 23]]);
1973				thisTemp.canvasFillRect(cMute, [[23, 15, 2, 8], [27, 10, 2, 18]]);
1974			};
1975			cMute.fillStyle = bBgColor;
1976			cMuteFillRect();
1977			var cMuteOver = function() {
1978				cMute.clearRect(0, 0, bWidth, bHeight);
1979				cMute.fillStyle = bOverColor;
1980				cMuteFillRect();
1981			};
1982			var cMuteOut = function() {
1983				cMute.clearRect(0, 0, bWidth, bHeight);
1984				cMute.fillStyle = bBgColor;
1985				cMuteFillRect();
1986			};
1987			this.addListenerInside('mouseover', cMuteOver, this.getByElement(muteID + '-canvas'));
1988			this.addListenerInside('mouseout', cMuteOut, this.getByElement(muteID + '-canvas'));
1989			//定义取消广告静音按钮样式
1990			var cEscMute = this.getByElement(escMuteID + '-canvas').getContext('2d');
1991			var cEscMuteFillRect = function() {
1992				thisTemp.canvasFill(cEscMute, [[10, 15], [15, 15], [21, 10], [21, 28], [15, 23], [10, 23]]);
1993				thisTemp.canvasFill(cEscMute, [[23, 13], [24, 13], [33, 25], [32, 25]]);
1994				thisTemp.canvasFill(cEscMute, [[32, 13], [33, 13], [24, 25], [23, 25]]);
1995			};
1996			cEscMute.fillStyle = bBgColor;
1997			cEscMuteFillRect();
1998			var cEscMuteOver = function() {
1999				cEscMute.clearRect(0, 0, bWidth, bHeight);
2000				cEscMute.fillStyle = bOverColor;
2001				cEscMuteFillRect();
2002			};
2003			var cEscMuteOut = function() {
2004				cEscMute.clearRect(0, 0, bWidth, bHeight);
2005				cEscMute.fillStyle = bBgColor;
2006				cEscMuteFillRect();
2007			};
2008			this.addListenerInside('mouseover', cEscMuteOver, this.getByElement(escMuteID + '-canvas'));
2009			this.addListenerInside('mouseout', cEscMuteOut, this.getByElement(escMuteID + '-canvas'));
2010			//定义广告静音按钮的样式
2011			var cAdMute = this.getByElement(adMuteID + '-canvas').getContext('2d');
2012			var cAdMuteFillRect = function() {
2013				thisTemp.canvasFill(cAdMute, [[8, 12], [12, 12], [16, 8], [16, 21], [12, 18], [8, 18]]);
2014				thisTemp.canvasFillRect(cAdMute, [[18, 12, 2, 6], [21, 8, 2, 14]]);
2015			};
2016			cAdMute.fillStyle = bBgColor;
2017			cAdMuteFillRect();
2018			var cAdMuteOver = function() {
2019				cAdMute.clearRect(0, 0, bWidth, bHeight);
2020				cAdMute.fillStyle = bOverColor;
2021				cAdMuteFillRect();
2022			};
2023			var cAdMuteOut = function() {
2024				cAdMute.clearRect(0, 0, bWidth, bHeight);
2025				cAdMute.fillStyle = bBgColor;
2026				cAdMuteFillRect();
2027			};
2028			this.addListenerInside('mouseover', cAdMuteOver, this.getByElement(adMuteID + '-canvas'));
2029			this.addListenerInside('mouseout', cAdMuteOut, this.getByElement(adMuteID + '-canvas'));
2030			//定义取消静音广告按钮样式
2031			var cAdEscMute = this.getByElement(adEscMuteID + '-canvas').getContext('2d');
2032			var cAdEscMuteFillRect = function() {
2033				thisTemp.canvasFill(cAdEscMute, [[8, 12], [12, 12], [16, 8], [16, 21], [12, 18], [8, 18]]);
2034				thisTemp.canvasFill(cAdEscMute, [[18, 10], [20, 10], [26, 20], [24, 20]]);
2035				thisTemp.canvasFill(cAdEscMute, [[25, 10], [27, 10], [20, 20], [18, 20]]);
2036			};
2037			cAdEscMute.fillStyle = bBgColor;
2038			cAdEscMuteFillRect();
2039			var cAdEscMuteOver = function() {
2040				cAdEscMute.clearRect(0, 0, bWidth, bHeight);
2041				cAdEscMute.fillStyle = bOverColor;
2042				cAdEscMuteFillRect();
2043			};
2044			var cAdEscMuteOut = function() {
2045				cAdEscMute.clearRect(0, 0, bWidth, bHeight);
2046				cAdEscMute.fillStyle = bBgColor;
2047				cAdEscMuteFillRect();
2048			};
2049			this.addListenerInside('mouseover', cAdEscMuteOver, this.getByElement(adEscMuteID + '-canvas'));
2050			this.addListenerInside('mouseout', cAdEscMuteOut, this.getByElement(adEscMuteID + '-canvas'));
2051			//定义暂停广告关闭按钮
2052			var adPauseClose = this.getByElement(adPauseCloseID + '-canvas').getContext('2d');
2053			var adPauseCloseFillRect = function() {
2054				thisTemp.canvasFill(adPauseClose, [[4, 6], [6, 6], [16, 15], [14, 15]]);
2055				thisTemp.canvasFill(adPauseClose, [[14, 6], [16, 6], [6, 15], [4, 15]]);
2056			};
2057			adPauseClose.fillStyle = '#404856';
2058			adPauseCloseFillRect();
2059			var adPauseCloseOver = function() {
2060				adPauseClose.clearRect(0, 0, bWidth, bHeight);
2061				adPauseClose.fillStyle = bOverColor;
2062				adPauseCloseFillRect();
2063			};
2064			var adPauseCloseOut = function() {
2065				adPauseClose.clearRect(0, 0, bWidth, bHeight);
2066				adPauseClose.fillStyle = '#404856';
2067				adPauseCloseFillRect();
2068			};
2069			this.addListenerInside('mouseover', adPauseCloseOver, this.getByElement(adPauseCloseID + '-canvas'));
2070			this.addListenerInside('mouseout', adPauseCloseOut, this.getByElement(adPauseCloseID + '-canvas'));
2071			//定义loading样式
2072			var cLoading = this.getByElement(loadingID + '-canvas').getContext('2d');
2073			var cLoadingFillRect = function() {
2074				cLoading.save();
2075				var grad = cLoading.createLinearGradient(0, 0, 60, 60);
2076				grad.addColorStop(0, bBgColor);
2077				var grad2 = cLoading.createLinearGradient(0, 0, 80, 60);
2078				grad2.addColorStop(1, bOverColor);
2079				var grad3 = cLoading.createLinearGradient(0, 0, 80, 60);
2080				grad3.addColorStop(1, '#FF9900');
2081				var grad4 = cLoading.createLinearGradient(0, 0, 80, 60);
2082				grad4.addColorStop(1, '#CC3300');
2083				cLoading.strokeStyle = grad; //设置描边样式
2084				cLoading.lineWidth = 8; //设置线宽
2085				cLoading.beginPath(); //路径开始
2086				cLoading.arc(30, 30, 25, 0, 0.4 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
2087				cLoading.stroke(); //绘制
2088				cLoading.closePath(); //路径结束
2089				cLoading.beginPath(); //路径开始
2090				cLoading.strokeStyle = grad2; //设置描边样式
2091				cLoading.arc(30, 30, 25, 0.5 * Math.PI, 0.9 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
2092				cLoading.stroke(); //绘制
2093				cLoading.beginPath(); //路径开始
2094				cLoading.strokeStyle = grad3; //设置描边样式
2095				cLoading.arc(30, 30, 25, Math.PI, 1.4 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
2096				cLoading.stroke(); //绘制
2097				cLoading.beginPath(); //路径开始
2098				cLoading.strokeStyle = grad4; //设置描边样式
2099				cLoading.arc(30, 30, 25, 1.5 * Math.PI, 1.9 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
2100				cLoading.stroke(); //绘制
2101				cLoading.closePath(); //路径结束
2102				cLoading.restore();
2103			};
2104			cLoading.fillStyle = bBgColor;
2105			cLoadingFillRect();
2106			//定义中间暂停按钮的样式
2107			var cPauseCenter = this.getByElement(pauseCenterID + '-canvas').getContext('2d');
2108			var cPauseCenterFillRect = function() {
2109				thisTemp.canvasFill(cPauseCenter, [[28, 22], [59, 38], [28, 58]]);
2110				/* 指定几个颜色 */
2111				cPauseCenter.save();
2112				cPauseCenter.lineWidth = 5; //设置线宽
2113				cPauseCenter.beginPath(); //路径开始
2114				cPauseCenter.arc(40, 40, 35, 0, 2 * Math.PI, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,
2114顺时针/逆时针)
2115				cPauseCenter.stroke(); //绘制
2116				cPauseCenter.closePath(); //路径结束
2117				cPauseCenter.restore();
2118			};
2119			cPauseCenter.fillStyle = bBgColor;
2120			cPauseCenter.strokeStyle = bBgColor;
2121			cPauseCenterFillRect();
2122			var cPauseCenterOver = function() {
2123				cPauseCenter.clearRect(0, 0, 80, 80);
2124				cPauseCenter.fillStyle = bOverColor;
2125				cPauseCenter.strokeStyle = bOverColor;
2126				cPauseCenterFillRect();
2127			};
2128			var cPauseCenterOut = function() {
2129				cPauseCenter.clearRect(0, 0, 80, 80);
2130				cPauseCenter.fillStyle = bBgColor;
2131				cPauseCenter.strokeStyle = bBgColor;
2132				cPauseCenterFillRect();
2133			};
2134			this.addListenerInside('mouseover', cPauseCenterOver, this.getByElement(pauseCenterID + '-canvas'));
2135			this.addListenerInside('mouseout', cPauseCenterOut, this.getByElement(pauseCenterID + '-canvas'));
2136
2137			//鼠标经过/离开音量调节按钮
2138			var volumeBOOver = function() {
2139				thisTemp.css(volumeBOID, 'backgroundColor', bOverColor);
2140				thisTemp.css(volumeBWID, 'backgroundColor', bBgColor);
2141			};
2142			var volumeBOOut = function() {
2143				thisTemp.css(volumeBOID, 'backgroundColor', bBgColor);
2144				thisTemp.css(volumeBWID, 'backgroundColor', bOverColor);
2145			};
2146			this.addListenerInside('mouseover', volumeBOOver, this.getByElement(volumeBOID));
2147			this.addListenerInside('mouseout', volumeBOOut, this.getByElement(volumeBOID));
2148			//鼠标经过/离开进度按钮
2149			var timeBOOver = function() {
2150				thisTemp.css(timeBOID, 'backgroundColor', bOverColor);
2151				thisTemp.css(timeBWID, 'backgroundColor', bBgColor);
2152			};
2153			var timeBOOut = function() {
2154				thisTemp.css(timeBOID, 'backgroundColor', bBgColor);
2155				thisTemp.css(timeBWID, 'backgroundColor', bOverColor);
2156			};
2157			this.addListenerInside('mouseover', timeBOOver, this.getByElement(timeBOID));
2158			this.addListenerInside('mouseout', timeBOOut, this.getByElement(timeBOID));
2159
2160			this.addButtonEvent(); //注册按钮及音量调节,进度操作事件
2161			this.newMenu(); //单独设置右键的样式和事件
2162			this.controlBarHide(); //单独注册控制栏隐藏事件
2163			this.keypress(); //单独注册键盘事件
2164			//初始化音量调节框
2165			this.changeVolume(this.vars['volume']);
2166			//初始化判断是否需要显示上一集和下一集按钮
2167			this.showFrontNext();
2168			setTimeout(function() {
2169				thisTemp.elementCoordinate(); //调整中间暂停按钮/loading的位置/error的位置
2170			},
2171			100);
2172			this.checkBarWidth();
2173			var resize = function() {
2174				thisTemp.elementCoordinate();
2175				thisTemp.timeUpdateHandler();
2176				thisTemp.changeLoad();
2177				thisTemp.checkBarWidth();
2178				thisTemp.changeElementCoor(); //修改新加元件的坐标
2179				thisTemp.changePrompt();
2180				thisTemp.adPauseCoor();
2181				thisTemp.adOtherCoor();
2182			};
2183			this.addListenerInside('resize', resize, window);
2184		},
2185		/*
2186			内部函数
2187			创建按钮,使用canvas画布
2188		*/
2189		newCanvas: function(id, width, height) {
2190			return '<canvas class="' + id + '-canvas" width="' + width + '" height="' + height + '"></canvas>';
2191		},
2192		/*
2193			内部函数
2194			注册按钮,音量调节框,进度操作框事件
2195		*/
2196		addButtonEvent: function() {
2197			var thisTemp = this;
2198			//定义按钮的单击事件
2199			var playClick = function(event) {
2200				thisTemp.videoPlay();
2201				thisTemp.sendJS('clickEvent', 'actionScript->videoPlay');
2202			};
2203			this.addListenerInside('click', playClick, this.CB['play']);
2204			this.addListenerInside('click', playClick, this.CB['pauseCenter']);
2205			var pauseClick = function(event) {
2206				thisTemp.videoPause();
2207				thisTemp.sendJS('clickEvent', 'actionScript->videoPause');
2208			};
2209			this.addListenerInside('click', pauseClick, this.CB['pause']);
2210			var frontClick = function(event) {
2211				if (thisTemp.vars['front']) {
2212					eval(thisTemp.vars['front'] + '()');
2213					thisTemp.sendJS('clickEvent', 'actionScript->' + thisTemp.vars['front']);
2214				}
2215			};
2216			this.addListenerInside('click', frontClick, this.CB['front']);
2217			var nextClick = function(event) {
2218				if (thisTemp.vars['next']) {
2219					eval(thisTemp.vars['next'] + '()');
2220					thisTemp.sendJS('clickEvent', 'actionScript->' + thisTemp.vars['next']);
2221				}
2222			};
2223			this.addListenerInside('click', nextClick, this.CB['next']);
2224			var muteClick = function(event) {
2225				thisTemp.videoMute();
2226				thisTemp.sendJS('clickEvent', 'actionScript->videoMute');
2227			};
2228			this.addListenerInside('click', muteClick, this.CB['mute']);
2229			var escMuteClick = function(event) {
2230				thisTemp.videoEscMute();
2231				thisTemp.sendJS('clickEvent', 'actionScript->videoEscMute');
2232			};
2233			this.addListenerInside('click', escMuteClick, this.CB['escMute']);
2234			var fullClick = function(event) {
2235				thisTemp.fullScreen();
2236				thisTemp.sendJS('clickEvent', 'actionScript->fullScreen');
2237			};
2238			this.addListenerInside('click', fullClick, this.CB['full']);
2239			var escFullClick = function(event) {
2240				thisTemp.quitFullScreen();
2241				thisTemp.sendJS('clickEvent', 'actionScript->quitFullScreen');
2242			};
2243			this.addListenerInside('click', escFullClick, this.CB['escFull']);
2244			var adSkipClick = function(event) {
2245				if (thisTemp.CB['adSkip'].innerHTML == thisTemp.language['skipAd']) {
2246					thisTemp.runFunction(thisTemp.config['adSkipClick']);
2247				}
2248			};
2249			this.addListenerInside('click', adSkipClick, this.CB['adSkip']);
2250			var adMuteClick = function(event) {
2251				thisTemp.adMuteFunction();
2252			};
2253			this.addListenerInside('click', adMuteClick, this.CB['adMute']);
2254			var adEscMuteClick = function(event) {
2255				thisTemp.adEscMuteFunction();
2256			};
2257			this.addListenerInside('click', adEscMuteClick, this.CB['adEscMute']);
2258			var adPauseCloseClick = function(event) {
2259				thisTemp.adPauseCloseFunction();
2260			};
2261			this.addListenerInside('click', adPauseCloseClick, this.CB['adPauseClose']);
2262			//定义各个按钮的鼠标经过/离开事件
2263			var promptHide = function(event) {
2264				thisTemp.promptShow(false);
2265			};
2266			var playOver = function(event) {
2267				thisTemp.promptShow(thisTemp.CB['play']);
2268			};
2269			this.addListenerInside('mouseover', playOver, this.CB['play']);
2270			this.addListenerInside('mouseout', promptHide, this.CB['play']);
2271			var pauseOver = function(event) {
2272				thisTemp.promptShow(thisTemp.CB['pause']);
2273			};
2274			this.addListenerInside('mouseover', pauseOver, this.CB['pause']);
2275			this.addListenerInside('mouseout', promptHide, this.CB['pause']);
2276			var frontOver = function(event) {
2277				thisTemp.promptShow(thisTemp.CB['front']);
2278			};
2279			this.addListenerInside('mouseover', frontOver, this.CB['front']);
2280			this.addListenerInside('mouseout', promptHide, this.CB['front']);
2281			var nextOver = function(event) {
2282				thisTemp.promptShow(thisTemp.CB['next']);
2283			};
2284			this.addListenerInside('mouseover', nextOver, this.CB['next']);
2285			this.addListenerInside('mouseout', promptHide, this.CB['next']);
2286			var muteOver = function(event) {
2287				thisTemp.promptShow(thisTemp.CB['mute']);
2288			};
2289			this.addListenerInside('mouseover', muteOver, this.CB['mute']);
2290			this.addListenerInside('mouseout', promptHide, this.CB['mute']);
2291			var escMuteOver = function(event) {
2292				thisTemp.promptShow(thisTemp.CB['escMute']);
2293			};
2294			this.addListenerInside('mouseover', escMuteOver, this.CB['escMute']);
2295			this.addListenerInside('mouseout', promptHide, this.CB['escMute']);
2296			var fullOver = function(event) {
2297				thisTemp.promptShow(thisTemp.CB['full']);
2298			};
2299			this.addListenerInside('mouseover', fullOver, this.CB['full']);
2300			this.addListenerInside('mouseout', promptHide, this.CB['full']);
2301			var escFullOver = function(event) {
2302				thisTemp.promptShow(thisTemp.CB['escFull']);
2303			};
2304			this.addListenerInside('mouseover', escFullOver, this.CB['escFull']);
2305			this.addListenerInside('mouseout', promptHide, this.CB['escFull']);
2306			var definitionOver = function(event) {
2307				thisTemp.promptShow(thisTemp.CB['definition']);
2308			};
2309			this.addListenerInside('mouseover', definitionOver, this.CB['definition']);
2310			this.addListenerInside('mouseout', promptHide, this.CB['definition']);
2311			var playbackrateOver = function(event) {
2312				thisTemp.promptShow(thisTemp.CB['playbackrate']);
2313			};
2314			this.addListenerInside('mouseover', playbackrateOver, this.CB['playbackrate']);
2315			this.addListenerInside('mouseout', promptHide, this.CB['playbackrate']);
2316			var subtitlesOver = function(event) {
2317				thisTemp.promptShow(thisTemp.CB['subtitles']);
2318			};
2319			this.addListenerInside('mouseover', subtitlesOver, this.CB['subtitles']);
2320			this.addListenerInside('mouseout', promptHide, this.CB['subtitles']);
2321			//定义音量和进度按钮的滑块事件
2322			var volumePrompt = function(vol) {
2323				var volumeBOXY = thisTemp.getCoor(thisTemp.CB['volumeBO']);
2324				var promptObj = {
2325					title: thisTemp.language['volume'] + vol + '%',
2326					x: volumeBOXY['x'] + thisTemp.CB['volumeBO'].offsetWidth * 0.5,
2327					y: volumeBOXY['y']
2328				};
2329				thisTemp.promptShow(false, promptObj);
2330			};
2331			var volumeObj = {
2332				slider: this.CB['volumeBO'],
2333				follow: this.CB['volumeUp'],
2334				refer: this.CB['volumeBg'],
2335				grossValue: 'volume',
2336				pd: true,
2337				startFun: function(vol) {},
2338				monitorFun: function(vol) {
2339					thisTemp.changeVolume(vol * 0.01, false, false);
2340					volumePrompt(vol);
2341				},
2342				endFun: function(vol) {},
2343				overFun: function(vol) {
2344					volumePrompt(vol);
2345				}
2346			};
2347			this.slider(volumeObj);
2348			var volumeClickObj = {
2349				refer: this.CB['volumeBg'],
2350				grossValue: 'volume',
2351				fun: function(vol) {
2352					thisTemp.changeVolume(vol * 0.01, true, true);
2353				}
2354			};
2355			this.progressClick(volumeClickObj);
2356			this.timeButtonMouseDown(); //用单击的函数来判断是否需要建立控制栏监听
2357			//鼠标经过/离开音量调节框时的
2358			var volumeBgMove = function(event) {
2359				var volumeBgXY = thisTemp.getCoor(thisTemp.CB['volumeBg']);
2360				var eventX = thisTemp.client(event)['x'];
2361				var eventVolume = parseInt((eventX - volumeBgXY['x']) * 100 / thisTemp.CB['volumeBg'].offsetWidth);
2362				var buttonPromptObj = {
2363					title: thisTemp.language['volume'] + eventVolume + '%',
2364					x: eventX,
2365					y: volumeBgXY['y']
2366				};
2367				thisTemp.promptShow(false, buttonPromptObj);
2368			};
2369			this.addListenerInside('mousemove', volumeBgMove, this.CB['volumeBg']);
2370			this.addListenerInside('mouseout', promptHide, this.CB['volumeBg']);
2371			this.addListenerInside('mouseout', promptHide, this.CB['volumeBO']);
2372			//注册清晰度相关事件
2373			this.addDefListener();
2374			//注册倍速相关事件
2375			this.addPlaybackrate();
2376			//注册多字幕事件
2377			this.addSubtitles();
2378		},
2379		/*
2380			内部函数
2381			注册单击视频动作
2382		*/
2383		videoClick: function() {
2384			var thisTemp = this;
2385			var clearTimerClick = function() {
2386				if (thisTemp.timerClick != null) {
2387					if (thisTemp.timerClick.runing) {
2388						thisTemp.timerClick.stop();
2389					}
2390					thisTemp.timerClick = null;
2391				}
2392			};
2393			var timerClickFun = function() {
2394				clearTimerClick();
2395				thisTemp.isClick = false;
2396				thisTemp.sendJS('videoClick',thisTemp.videoClickXy);
2397				if (thisTemp.adPlayerPlay) {
2398					var ad = thisTemp.getNowAdvertisements();
2399					try {
2400						if (ad['link'] != '') {
2401							window.open(ad['link']);
2402						}
2403						thisTemp.ajaxSuccessNull(ad['clickMonitor']);
2404					} catch(event) {}
2405				} else {
2406					if (thisTemp.ckplayerConfig['config']['click']) {
2407						thisTemp.playOrPause();
2408					}
2409				}
2410
2411			};
2412			clearTimerClick();
2413			if (this.isClick) {
2414				this.isClick = false;
2415				thisTemp.sendJS('videoDoubleClick',thisTemp.videoClickXy);
2416				if (thisTemp.ckplayerConfig['config']['doubleClick']) {
2417					if (!this.full) {
2418						thisTemp.fullScreen();
2419					} else {
2420						thisTemp.quitFullScreen();
2421					}
2422				}
2423
2424			} else {
2425				this.isClick = true;
2426				this.timerClick = new this.timer(300, timerClickFun, 1)
2427				//this.timerClick.start();
2428			}
2429
2430		},
2431		/*
2432			内部函数
2433			注册鼠标经过进度滑块的事件
2434		*/
2435		timeButtonMouseDown: function() {
2436			var thisTemp = this;
2437			var timePrompt = function(time) {
2438				if (isNaN(time)) {
2439					time = 0;
2440				}
2441				var timeButtonXY = thisTemp.getCoor(thisTemp.CB['timeButton']);
2442				var promptObj = {
2443					title: thisTemp.formatTime(time),
2444					x: timeButtonXY['x'] - thisTemp.pdCoor['x'] + thisTemp.CB['timeButton'].offsetWidth * 0.5,
2445					y: timeButtonXY['y'] - thisTemp.pdCoor['y']
2446				};
2447				thisTemp.promptShow(false, promptObj);
2448			};
2449			var timeObj = {
2450				slider: this.CB['timeButton'],
2451				follow: this.CB['timeProgress'],
2452				refer: this.CB['timeBoBg'],
2453				grossValue: 'time',
2454				pd: false,
2455				startFun: function(time) {
2456					thisTemp.isTimeButtonMove = false;
2457				},
2458				monitorFun: function(time) {},
2459				endFun: function(time) {
2460					if (thisTemp.V) {
2461						if (thisTemp.V.duration > 0) {
2462							thisTemp.needSeek = 0;
2463							thisTemp.videoSeek(parseInt(time));
2464						}
2465					}
2466				},
2467				overFun: function(time) {
2468					timePrompt(time);
2469				}
2470			};
2471			var timeClickObj = {
2472				refer: this.CB['timeBoBg'],
2473				grossValue: 'time',
2474				fun: function(time) {
2475					if (thisTemp.V) {
2476						if (thisTemp.V.duration > 0) {
2477							thisTemp.needSeek = 0;
2478							thisTemp.videoSeek(parseInt(time));
2479						}
2480					}
2481				}
2482			};
2483			var timeBoBgmousemove = function(event) {
2484				var timeBoBgXY = thisTemp.getCoor(thisTemp.CB['timeBoBg']);
2485				var eventX = thisTemp.client(event)['x'];
2486				var duration=thisTemp.V.duration;
2487				if (isNaN(duration) || parseInt(duration) < 0.2) {
2488					duration = thisTemp.vars['duration'];
2489				}
2490				if(thisTemp.vars['forceduration']>0){
2491					duration=thisTemp.vars['forceduration'];
2492				}
2493				var eventTime = parseInt((eventX - timeBoBgXY['x']) * duration / thisTemp.CB['timeBoBg'].offsetWidth);
2494				var buttonPromptObj = {
2495					title: thisTemp.formatTime(eventTime),
2496					x: eventX,
2497					y: timeBoBgXY['y']
2498				};
2499				thisTemp.promptShow(false, buttonPromptObj);
2500				var def = false;
2501				if (!thisTemp.isUndefined(thisTemp.CB['definitionP'])) {
2502					if (thisTemp.css(thisTemp.CB['definitionP'], 'display') != 'block') {
2503						def = true;
2504					}
2505				}
2506				if (thisTemp.vars['preview'] != null && def) {
2507					buttonPromptObj['time'] = eventTime;
2508					thisTemp.preview(buttonPromptObj);
2509				}
2510			};
2511			var promptHide = function(event) {
2512				thisTemp.promptShow(false);
2513				if (thisTemp.previewDiv != null) {
2514					thisTemp.css([thisTemp.previewDiv, thisTemp.previewTop], 'display', 'none');
2515				}
2516			};
2517			if (!this.vars['live']) { //如果不是直播
2518				this.isTimeButtonDown = true;
2519				this.addListenerInside('mousemove', timeBoBgmousemove, this.CB['timeBoBg']);
2520				this.addListenerInside('mouseout', promptHide, this.CB['timeBoBg']);
2521			} else {
2522				this.isTimeButtonDown = false;
2523				timeObj['removeListenerInside'] = true;
2524				timeClickObj['removeListenerInside'] = true;
2525			}
2526			this.slider(timeObj);
2527			this.progressClick(timeClickObj);
2528
2529		},
2530		/*
2531			内部函数
2532			注册调节框上单击事件,包含音量调节框和播放时度调节框
2533		*/
2534		progressClick: function(obj) {
2535			/*
2536				refer:参考对象
2537				fun:返回函数
2538				refer:参考元素,即背景
2539				grossValue:调用的参考值类型
2540				pd:
2541			*/
2542			//建立参考元素的mouseClick事件,用来做为鼠标在其上按下时触发的状态
2543			var thisTemp = this;
2544			var referMouseClick = function(event) {
2545				var referX = thisTemp.client(event)['x'] - thisTemp.getCoor(obj['refer'])['x'];
2546				var rWidth = obj['refer'].offsetWidth;
2547				var grossValue = 0;
2548				if (obj['grossValue'] == 'volume') {
2549					grossValue = 100;
2550				} else {
2551					if (thisTemp.V) {
2552						grossValue = thisTemp.V.duration;
2553						if (isNaN(grossValue) || parseInt(grossValue) < 0.2) {
2554							grossValue = thisTemp.vars['duration'];
2555						}
2556						if(thisTemp.vars['forceduration']>0){
2557							grossValue=thisTemp.vars['forceduration'];
2558						}
2559					}
2560				}
2561				var nowZ = parseInt(referX * grossValue / rWidth);
2562				if (obj['fun']) {
2563					if (obj['grossValue'] === 'time') {
2564						var sliderXY = thisTemp.getCoor(thisTemp.CB['timeButton']);
2565						sliderLeft = sliderXY['x'];
2566						if (!thisTemp.checkSlideLeft(referX, sliderLeft, rWidth)) {
2567							return;
2568						}
2569						var bimeButtonWB = thisTemp.CB['timeButton'].offsetWidth * 0.5;
2570						thisTemp.css(thisTemp.CB['timeButton'], 'left', (referX - bimeButtonWB) + 'px');
2571						thisTemp.css(thisTemp.CB['timeProgress'], 'width', (referX) + 'px');
2572					}
2573					obj['fun'](nowZ);
2574				}
2575			};
2576			if (this.isUndefined(obj['removeListenerInside'])) {
2577				this.addListenerInside('click', referMouseClick, obj['refer']);
2578			} else {
2579				this.removeListenerInside('click', referMouseClick, obj['refer']);
2580			}
2581
2582		},
2583
2584		/*
2585			内部函数
2586			共用的注册滑块事件
2587		*/
2588		slider: function(obj) {
2589			/*
2590				obj={
2591					slider:滑块元素
2592					follow:跟随滑块的元素
2593					refer:参考元素,即背景
2594					grossValue:调用的参考值类型
2595					startFun:开始调用的元素
2596					monitorFun:监听函数
2597					endFun:结束调用的函数
2598					overFun:鼠标放上去后调用的函数
2599					pd:是否需要修正
2600				}
2601			*/
2602			var thisTemp = this;
2603			var clientX = 0,
2604			criterionWidth = 0,
2605			sliderLeft = 0,
2606			referLeft = 0;
2607			var value = 0;
2608			var calculation = function() { //根据滑块的left计算百分比
2609				var sLeft = parseInt(thisTemp.css(obj['slider'], 'left'));
2610				var rWidth = obj['refer'].offsetWidth - obj['slider'].offsetWidth;
2611				var grossValue = 0;
2612				if (thisTemp.isUndefined(sLeft) || isNaN(sLeft)) {
2613					sLeft = 0;
2614				}
2615				if (obj['grossValue'] == 'volume') {
2616					grossValue = 100;
2617				} else {
2618					if (thisTemp.V) {
2619						grossValue = thisTemp.V.duration;
2620					}
2621				}
2622				return parseInt(sLeft * grossValue / rWidth);
2623			};
2624			var mDown = function(event) {
2625				thisTemp.addListenerInside('mousemove', mMove, document);
2626				thisTemp.addListenerInside('mouseup', mUp, document);
2627				var referXY = thisTemp.getCoor(obj['refer']);
2628				var sliderXY = thisTemp.getCoor(obj['slider']);
2629				clientX = thisTemp.client(event)['x'];
2630				referLeft = referXY['x'];
2631				sliderLeft = sliderXY['x'];
2632				criterionWidth = clientX - sliderLeft;
2633				if (obj['startFun']) {
2634					obj['startFun'](calculation());
2635				}
2636			};
2637			var mMove = function(event) {
2638				clientX = thisTemp.client(event)['x'];
2639				var newX = clientX - criterionWidth - referLeft;
2640				if (newX < 0) {
2641					newX = 0;
2642				}
2643				if (newX > obj['refer'].offsetWidth - obj['slider'].offsetWidth) {
2644					newX = obj['refer'].offsetWidth - obj['slider'].offsetWidth;
2645				}
2646				if (obj['slider'] === thisTemp.CB['timeButton']) {
2647					if (!thisTemp.checkSlideLeft(newX, sliderLeft, obj['refer'].offsetWidth)) {
2648						return;
2649					}
2650				}
2651				thisTemp.css(obj['slider'], 'left', newX + 'px');
2652				thisTemp.css(obj['follow'], 'width', (newX + obj['slider'].offsetWidth * 0.5) + 'px');
2653				var nowZ = calculation();
2654				if (obj['monitorFun']) {
2655					obj['monitorFun'](nowZ);
2656				}
2657			};
2658			var mUp = function(event) {
2659				thisTemp.removeListenerInside('mousemove', mMove, document);
2660				thisTemp.removeListenerInside('mouseup', mUp, document);
2661				if (obj['endFun']) {
2662					obj['endFun'](calculation());
2663				}
2664			};
2665			var mOver = function(event) {
2666				if (obj['overFun']) {
2667					obj['overFun'](calculation());
2668				}
2669
2670			};
2671			if (this.isUndefined(obj['removeListenerInside'])) {
2672				this.addListenerInside('mousedown', mDown, obj['slider']);
2673				this.addListenerInside('mouseover', mOver, obj['slider']);
2674			} else {
2675				this.removeListenerInside('mousedown', mDown, obj['slider']);
2676				this.removeListenerInside('mouseover', mOver, obj['slider']);
2677			}
2678		},
2679		/*
2680			内部函数
2681			判断是否可以拖动进度按钮或点击进度栏
2682		*/
2683		checkSlideLeft: function(newX, sliderLeft, refer) {
2684			var timeSA = this.ckplayerConfig['config']['timeScheduleAdjust'];
2685			switch (timeSA) {
2686			case 0:
2687				return false;
2688				break;
2689			case 2:
2690				if (newX < sliderLeft) {
2691					return false;
2692				}
2693				break;
2694			case 3:
2695				if (newX > sliderLeft) {
2696					return false;
2697				}
2698				break;
2699			case 4:
2700				if (!this.timeSliderLeftTemp) {
2701					this.timeSliderLeftTemp = sliderLeft / refer;
2702				}
2703				if (newX < this.timeSliderLeftTemp * refer) {
2704					return false;
2705				}
2706				break;
2707			case 5:
2708				if (!this.timeSliderLeftTemp) {
2709					this.timeSliderLeftTemp = sliderLeft / refer;
2710				} else {
2711					var timeSliderMax = sliderLeft / refer;
2712					if (timeSliderMax > this.timeSliderLeftTemp) {
2713						this.timeSliderLeftTemp = timeSliderMax;
2714					}
2715				}
2716				if (newX > this.timeSliderLeftTemp * refer) {
2717					return false;
2718				}
2719				break;
2720			default:
2721				return true;
2722				break;
2723			}
2724			return true;
2725		},
2726		/*
2727			内部函数
2728			显示loading
2729		*/
2730		loadingStart: function(rot) {
2731			var thisTemp = this;
2732			if (this.isUndefined(rot)) {
2733				rot = true;
2734			}
2735			if (this.showFace) {
2736				this.css(thisTemp.CB['loading'], 'display', 'none');
2737			}
2738			if (this.timerLoading != null) {
2739				if (this.timerLoading.runing) {
2740					this.timerLoading.stop();
2741				}
2742				this.timerLoading = null;
2743			}
2744			var buffer = 0;
2745			var loadingFun = function() {
2746				var nowRotate = '0';
2747				try {
2748					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';
2749				} catch(event) {}
2750				nowRotate = parseInt(nowRotate.replace('rotate(', '').replace('deg);', ''));
2751				nowRotate += 4;
2752				if (nowRotate > 360) {
2753					nowRotate = 0;
2754				}
2755				if (thisTemp.showFace) {
2756					thisTemp.css(thisTemp.CB['loadingCanvas'], {
2757						transform: 'rotate(' + nowRotate + 'deg)',
2758						msTransform: 'rotate(' + nowRotate + 'deg)',
2759						mozTransform: 'rotate(' + nowRotate + 'deg)',
2760						webkitTransform: 'rotate(' + nowRotate + 'deg)',
2761						oTransform: 'rotate(' + nowRotate + 'deg)'
2762					});
2763				}
2764				buffer++;
2765				if (buffer >= 99) {
2766					buffer = 99;
2767				}
2768				thisTemp.sendJS('buffer', buffer);
2769			};
2770			if (rot) {
2771				this.timerLoading = new this.timer(10, loadingFun);
2772				//this.timerLoading.start();
2773				if (this.showFace) {
2774					this.css(thisTemp.CB['loading'], 'display', 'block');
2775				}
2776			} else {
2777				thisTemp.sendJS('buffer', 100);
2778			}
2779		},
2780		/*
2781			内部函数
2782			判断是否需要显示上一集和下一集
2783		*/
2784		showFrontNext: function() {
2785			if (!this.showFace) {
2786				return;
2787			}
2788			if (this.vars['front']) {
2789				this.css([this.CB['front'], this.CB['frontLine']], 'display', 'block');
2790			} else {
2791				this.css([this.CB['front'], this.CB['frontLine']], 'display', 'none');
2792			}
2793			if (this.vars['next']) {
2794				this.css([this.CB['next'], this.CB['nextLine']], 'display', 'block');
2795			} else {
2796				this.css([this.CB['next'], this.CB['nextLine']], 'display', 'none');
2797			}
2798		},
2799		/*
2800			内部函数
2801			显示提示语
2802		*/
2803		promptShow: function(ele, data) {
2804			if (!this.showFace) {
2805				return;
2806			}
2807			var obj = {};
2808			if (ele || data) {
2809				if (!this.isUndefined(data)) {
2810					obj = data;
2811				} else {
2812					var offsetCoor = this.getCoor(ele);
2813					obj = {
2814						title: this.getDataset(ele, 'title'),
2815						x: offsetCoor['x'] + ele.offsetWidth * 0.5,
2816						y: offsetCoor['y']
2817					};
2818				}
2819				this.CB['prompt'].innerHTML = obj['title'];
2820				this.css(this.CB['prompt'], 'display', 'block');
2821				var promoptWidth = this.getStringLen(obj['title']) * 10;
2822				this.css(this.CB['promptBg'], 'width', promoptWidth + 'px');
2823				this.css(this.CB['prompt'], 'width', promoptWidth + 'px');
2824				promoptWidth += 10;
2825				var x = obj['x'] - (promoptWidth * 0.5);
2826				var y = this.PD.offsetHeight - obj['y'] + 8;
2827				if (x < 0) {
2828					x = 0;
2829				}
2830				if (x > this.PD.offsetWidth - promoptWidth) {
2831					x = this.PD.offsetWidth - promoptWidth;
2832				}
2833				this.css([this.CB['promptBg'], this.CB['prompt']], {
2834					display: 'block',
2835					left: x + 'px',
2836					bottom: y + 'px'
2837				});
2838			} else {
2839				this.css([this.CB['promptBg'], this.CB['prompt']], {
2840					display: 'none'
2841				});
2842			}
2843		},
2844		/*
2845			内部函数
2846			监听错误
2847		*/
2848		timerErrorFun: function() {
2849			var thisTemp = this;
2850			this.errorSend = false;
2851			var clearIntervalError = function(event) {
2852				if (thisTemp.timerError != null) {
2853					if (thisTemp.timerError.runing) {
2854						thisTemp.timerError.stop();
2855					}
2856					thisTemp.timerError = null;
2857				}
2858			};
2859			var errorFun = function(event) {
2860				clearIntervalError();
2861				thisTemp.error = true;
2862				//提取错误播放地址
2863				thisTemp.errorUrl = thisTemp.getVideoUrl();
2864				//提取错误播放地址结束
2865				if (!thisTemp.errorSend) {
2866					thisTemp.errorSend = true;
2867					thisTemp.sendJS('error');
2868				}
2869				if (thisTemp.showFace) {
2870					thisTemp.css(thisTemp.CB['errorText'], 'display', 'block');
2871					thisTemp.css(thisTemp.CB['pauseCenter'], 'display', 'none');
2872					thisTemp.css(thisTemp.CB['loading'], 'display', 'none');
2873				}
2874				thisTemp.V.removeAttribute('poster');
2875				thisTemp.resetPlayer();
2876			};
2877			var errorListenerFun = function(event) {
2878				setTimeout(function() {
2879					if (isNaN(thisTemp.V.duration)) {
2880						errorFun(event);
2881					}
2882				},
2883				500);
2884
2885			};
2886			if (!this.errorAdd) {
2887				this.errorAdd = true;
2888				this.addListenerInside('error', errorListenerFun, this.V);
2889			}
2890			clearIntervalError();
2891			var timerErrorFun = function() {
2892				if (thisTemp.V && parseInt(thisTemp.V.networkState) == 3) {
2893					errorFun();
2894				}
2895			};
2896			this.timerError = new this.timer(this.config['errorTime'], timerErrorFun);
2897			//this.timerError.start();
2898		},
2899		/*
2900			内部函数
2901			构建判断全屏还是非全屏的判断
2902		*/
2903		judgeFullScreen: function() {
2904			var thisTemp = this;
2905			if (this.timerFull != null) {
2906				if (this.timerFull.runing) {
2907					this.timerFull.stop();
2908				}
2909				this.timerFull = null;
2910			}
2911			var fullFun = function() {
2912				thisTemp.isFullScreen();
2913			};
2914			this.timerFull = new this.timer(20, fullFun);
2915		},
2916		/*
2917			内部函数
2918			判断是否是全屏
2919		*/
2920		isFullScreen: function() {
2921			if (!this.showFace) {
2922				return;
2923			}
2924			var fullState = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement;
2925			if (fullState && !this.full) {
2926				this.full = true;
2927				this.sendJS('full', true);
2928				this.elementCoordinate();
2929				this.css(this.CB['full'], 'display', 'none');
2930				this.css(this.CB['escFull'], 'display', 'block');
2931				if (this.vars['live'] == 0) {
2932					this.timeUpdateHandler();
2933				}
2934				this.PD.appendChild(this.CB['menu']);
2935			}
2936			if (!fullState && this.full) {
2937				this.full = false;
2938				this.sendJS('full', false);
2939				this.elementCoordinate();
2940				this.css(this.CB['full'], 'display', 'block');
2941				this.css(this.CB['escFull'], 'display', 'none');
2942				if (this.timerFull != null) {
2943					if (this.timerFull.runing) {
2944						this.timerFull.stop();
2945					}
2946					this.timerFull = null;
2947				}
2948				if (this.vars['live'] == 0) {
2949					this.timeUpdateHandler();
2950				}
2951				this.body.appendChild(this.CB['menu']);
2952			}
2953		},
2954		/*
2955			内部函数
2956			构建右键内容及注册相关动作事件
2957		*/
2958		newMenu: function() {
2959			var thisTemp = this;
2960			var i = 0;
2961			this.css(this.CB['menu'], {
2962				backgroundColor: '#FFFFFF',
2963				padding: '5px',
2964				position: 'absolute',
2965				left: '10px',
2966				top: '20px',
2967				display: 'none',
2968				zIndex: '999',
2969				color: '#A1A9BE',
2970				boxShadow: '2px 2px 3px #AAAAAA'
2971			});
2972			var mArr = this.contextMenu;
2973			var cMenu = this.ckplayerConfig['menu'];
2974			if (cMenu['name']) {
2975				if (cMenu['link']) {
2976					mArr[0] = [cMenu['name'], 'link', cMenu['link']];
2977				} else {
2978					mArr[0] = [cMenu['name'], 'default'];
2979				}
2980			}
2981			if (cMenu['version']) {
2982				mArr[1] = [cMenu['version'], 'default', 'line'];
2983			}
2984			if (cMenu['more']) {
2985				if (typeof(cMenu['more']) == 'object') {
2986					if (cMenu['more'].length > 0) {
2987						var moreArr = cMenu['more'];
2988						for (i = 0; i < moreArr.length; i++) {
2989							var mTemp = moreArr[i];
2990							var arrTemp = [];
2991							if (mTemp['name']) {
2992								arrTemp.push(mTemp['name']);
2993							}
2994							if (mTemp['clickEvent'] && mTemp['clickEvent'] != 'none') {
2995								var eveObj = this.clickEvent(mTemp['clickEvent']);
2996								arrTemp.push(eveObj['type']);
2997								if (eveObj['fun']) {
2998									arrTemp.push(eveObj['fun']);
2999								}
3000								if (eveObj['link']) {
3001									arrTemp.push(eveObj['link']);
3002								}
3003								if (eveObj['target']) {
3004									arrTemp.push(' target="' + eveObj['target'] + '"');
3005								}
3006							}
3007							if (mTemp['separatorBefore']) {
3008								arrTemp.push('line');
3009							}
3010							mArr.push(arrTemp);
3011						}
3012					}
3013				}
3014			}
3015			var html = '';
3016			for (i = 0; i < mArr.length; i++) {
3017				var me = mArr[i];
3018				switch (me[1]) {
3019				case 'default':
3020					html += '<p>' + me[0] + '</p>';
3021					break;
3022				case 'link':
3023					if (me[3]) {
3024						me[3] = 'target="' + me[3] + '"';
3025					}
3026					html += '<p><a href="' + me[2] + '"' + me[3] + '>
3026' + me[0] + '</a></p>';
3027					break;
3028				case 'javaScript':
3029					html += '<p><a href="javascript:' + me[2] + '">' + me[0] + '</a></p>';
3030					break;
3031				case 'actionScript':
3032					html += '<p><a href="javascript:' + this.vars['variable'] + me[2].replace('thisTemp', '') + '">' + me[0] + '</a></p>';
3033					break;
3034				default:
3035					break;
3036				}
3037			}
3038			this.CB['menu'].innerHTML = html;
3039			var pArr = this.CB['menu'].childNodes;
3040			for (i = 0; i < pArr.length; i++) {
3041				this.css(pArr[i], {
3042					height: '30px',
3043					lineHeight: '30px',
3044					margin: '0px',
3045					fontFamily: this.fontFamily,
3046					fontSize: '12px',
3047					paddingLeft: '10px',
3048					paddingRight: '30px'
3049				});
3050				if (mArr[i][mArr[i].length - 1] == 'line') {
3051					this.css(pArr[i], 'borderBottom', '1px solid #e9e9e9');
3052				}
3053				var aArr = pArr[i].childNodes;
3054				for (var n = 0; n < aArr.length; n++) {
3055					if (aArr[n].localName == 'a') {
3056						this.css(aArr[n], {
3057							color: '#000000',
3058							textDecoration: 'none'
3059						});
3060					}
3061				}
3062			}
3063			this.PD.oncontextmenu = function(event) {
3064				var eve = event || window.event;
3065				var client = thisTemp.client(event);
3066				if (eve.button == 2) {
3067					eve.returnvalue = false;
3068					var x = client['x'] + thisTemp.pdCoor['x'] - 2;
3069					var y = client['y'] + thisTemp.pdCoor['y'] - 2;
3070					thisTemp.css(thisTemp.CB['menu'], {
3071						display: 'block',
3072						left: x + 'px',
3073						top: y + 'px'
3074					});
3075					return false;
3076				}
3077				return true;
3078			};
3079			var setTimeOutPClose = function() {
3080				if (setTimeOutP) {
3081					window.clearTimeout(setTimeOutP);
3082					setTimeOutP = null;
3083				}
3084			};
3085			var setTimeOutP = null;
3086			var mouseOut = function(event) {
3087				setTimeOutPClose();
3088				setTimeOutP = setTimeout(function(event) {
3089					thisTemp.css(thisTemp.CB['menu'], 'display', 'none');
3090				},
3091				500);
3092			};
3093			this.addListenerInside('mouseout', mouseOut, thisTemp.CB['menu']);
3094			var mouseOver = function(event) {
3095				setTimeOutPClose();
3096			};
3097			this.addListenerInside('mouseover', mouseOver, thisTemp.CB['menu']);
3098
3099		},
3100		/*
3101			内部函数
3102			构建控制栏隐藏事件
3103		*/
3104		controlBarHide: function(hide) {
3105			var thisTemp = this;
3106			var client = {
3107				x: 0,
3108				y: 0
3109			},
3110			oldClient = {
3111				x: 0,
3112				y: 0
3113			};
3114			var cShow = true,
3115			force = false;
3116			var oldCoor = [0, 0];
3117			var controlBarShow = function(show) {
3118				if (show && !cShow && thisTemp.controlBarIsShow) {
3119					cShow = true;
3120					thisTemp.sendJS('controlBar', true);
3121					thisTemp.css(thisTemp.CB['controlBarBg'], 'display', 'block');
3122					thisTemp.css(thisTemp.CB['controlBar'], 'display', 'block');
3123					thisTemp.css(thisTemp.CB['timeProgressBg'], 'display', 'block');
3124					thisTemp.css(thisTemp.CB['timeBoBg'], 'display', 'block');
3125					thisTemp.changeVolume(thisTemp.volume);
3126					thisTemp.changeLoad();
3127					if (!thisTemp.timerBuffer) {
3128						thisTemp.bufferEdHandler();
3129					}
3130				} else {
3131					if (cShow) {
3132						cShow = false;
3133						var paused = thisTemp.getMetaDate()['paused'];
3134						if (force) {
3135							paused = false;
3136						}
3137						if (!paused) {
3138							thisTemp.sendJS('controlBar', false);
3139							thisTemp.css(thisTemp.CB['controlBarBg'], 'display', 'none');
3140							thisTemp.css(thisTemp.CB['controlBar'], 'display', 'none');
3141							thisTemp.css(thisTemp.CB['timeProgressBg'], 'display', 'none');
3142							thisTemp.css(thisTemp.CB['timeBoBg'], 'display', 'none');
3143							thisTemp.promptShow(false);
3144
3145						}
3146					}
3147				}
3148			};
3149			var cbarFun = function(event) {
3150				if (client['x'] == oldClient['x'] && client['y'] == oldClient['y']) {
3151					var cdH = parseInt(thisTemp.CD.offsetHeight);
3152					if ((client['y'] < cdH - 50 || client['y'] > cdH - 2) && cShow && !thisTemp.getMetaDate()['paused']) {
3153						controlBarShow(false);
3154					}
3155				} else {
3156					if (!cShow) {
3157						controlBarShow(true);
3158					}
3159				}
3160				oldClient = {
3161					x: client['x'],
3162					y: client['y']
3163				}
3164			};
3165			this.timerCBar = new this.timer(2000, cbarFun);
3166			var cdMove = function(event) {
3167				var getClient = thisTemp.client(event);
3168				client['x'] = getClient['x'];
3169				client['y'] = getClient['y'];
3170				if (!cShow) {
3171					controlBarShow(true);
3172				}
3173			};
3174			this.addListenerInside('mousemove', cdMove, thisTemp.CD);
3175			this.addListenerInside('ended', cdMove);
3176			this.addListenerInside('resize', cdMove, window);
3177			if (hide === true) {
3178				cShow = true;
3179				force = true;
3180				controlBarShow(false);
3181			}
3182			if (hide === false) {
3183				cShow = false;
3184				force = true;
3185				controlBarShow(true);
3186			}
3187		},
3188
3189		/*
3190			内部函数
3191			注册键盘按键事件
3192		*/
3193		keypress: function() {
3194			var thisTemp = this;
3195			var keyDown = function(eve) {
3196				var keycode = eve.keyCode || eve.which;
3197				if (thisTemp.adPlayerPlay) {
3198					return;
3199				}
3200				switch (keycode) {
3201					case 32:
3202						thisTemp.playOrPause();
3203						break;
3204					case 37:
3205						thisTemp.fastBack();
3206						break;
3207					case 39:
3208						thisTemp.fastNext();
3209						break;
3210					case 38:
3211						now = thisTemp.volume + thisTemp.ckplayerConfig['config']['volumeJump'];
3212						thisTemp.changeVolume(now > 1 ? 1 : now);
3213						break;
3214					case 40:
3215						now = thisTemp.volume - thisTemp.ckplayerConfig['config']['volumeJump'];
3216						thisTemp.changeVolume(now < 0 ? 0 : now);
3217						break;
3218					default:
3219						break;
3220				}
3221			};
3222			this.addListenerInside('keydown', keyDown, window || document);
3223		},
3224		/*
3225			内部函数
3226			注册倍速相关
3227		*/
3228		playbackRate: function() {
3229			if (!this.showFace || !this.ckplayerConfig['config']['playbackRate']) {
3230				return;
3231			}
3232			var thisTemp = this;
3233			var vArr = this.playbackRateArr;
3234			var html = '';
3235			var nowD = ''; //当前的倍速
3236			var i = 0;
3237			if (!nowD) {
3238				nowD = vArr[this.playbackRateDefault][1];
3239			}
3240			if (vArr.length > 1) {
3241				var zlen = 0;
3242				for (i = 0; i < vArr.length; i++) {
3243					html = '<p>' + vArr[i][1] + '</p>' + html;
3244					var dlen = this.getStringLen(vArr[i][1]);
3245					if (dlen > zlen) {
3246						zlen = dlen;
3247					}
3248				}
3249				if (html) {
3250					html += '<p>' + nowD + '</p>';
3251				}
3252				this.CB['playbackrate'].innerHTML = nowD;
3253				this.CB['playbackrateP'].innerHTML = html;
3254				this.css([this.CB['playbackrate'], this.CB['playbackrateLine']], 'display', 'block');
3255				var pArr = this.CB['playbackrateP'].childNodes;
3256				for (var i = 0; i < pArr.length; i++) {
3257					var fontColor = '#FFFFFF';
3258					if (pArr[i].innerHTML == nowD) {
3259						fontColor = '#0782F5';
3260					}
3261					this.css(pArr[i], {
3262						color: fontColor,
3263						margin: '0px',
3264						padding: '0px',
3265						fontSize: '14px',
3266						textAlign:'center'
3267					});
3268					if (i < pArr.length - 1) {
3269						this.css(pArr[i], 'borderBottom', '1px solid #282828')
3270					}
3271					var defClick = function(event) {
3272						if (nowD != this.innerHTML) {
3273							thisTemp.css(thisTemp.CB['playbackrateP'], 'display', 'none');
3274							thisTemp.newPlaybackrate(this.innerHTML);
3275							thisTemp.sendJS('clickEvent', 'actionScript->newPlaybackrate');
3276						}
3277					};
3278					this.addListenerInside('click', defClick, pArr[i]);
3279
3280				}
3281				var pW = (zlen * 10) + 10;
3282				this.css(this.CB['playbackrateP'], {
3283					width: pW + 'px'
3284				});
3285				this.css(this.CB['playbackrate'], {
3286					width: pW + 'px'
3287				});
3288				this.buttonWidth['playbackrate'] = this.CB['playbackrate'].offsetWidth;
3289			} else {
3290				this.CB['playbackrate'].innerHTML = '';
3291				this.CB['playbackrateP'].innerHTML = '';
3292				this.css([this.CB['playbackrate'], this.CB['playbackrateLine']], 'display', 'none');
3293			}
3294		},
3295		/*
3296			内部函数
3297			注册切换倍速播放相关事件
3298		*/
3299		addPlaybackrate: function() {
3300			var thisTemp = this;
3301			var setTimeOutP = null;
3302			var defClick = function(event) {
3303				thisTemp.css(thisTemp.CB['playbackrateP'], {
3304					left: thisTemp.getCoor(thisTemp.CB['playbackrate'])['x'] + 'px',
3305					display: 'block'
3306				});
3307			};
3308			this.addListenerInside('click', defClick, this.CB['playbackrate']);
3309			var defMouseOut = function(event) {
3310				if (setTimeOutP) {
3311					window.clearTimeout(setTimeOutP);
3312					setTimeOutP = null;
3313				}
3314				setTimeOutP = setTimeout(function(event) {
3315					thisTemp.css(thisTemp.CB['playbackrateP'], 'display', 'none');
3316				},
3317				500);
3318			};
3319			this.addListenerInside('mouseout', defMouseOut, thisTemp.CB['playbackrateP']);
3320			var defMouseOver = function(event) {
3321				if (setTimeOutP) {
3322					window.clearTimeout(setTimeOutP);
3323					setTimeOutP = null;
3324				}
3325			};
3326			this.addListenerInside('mouseover', defMouseOver, thisTemp.CB['playbackrateP']);
3327		},
3328		/*
3329			内部函数
3330			切换倍速后发生的动作
3331		*/
3332		newPlaybackrate: function(title) {
3333			var vArr = this.playbackRateArr;
3334			var nVArr = [];
3335			var i = 0;
3336			for (i = 0; i < vArr.length; i++) {
3337				var v = vArr[i];
3338				if (v[1] == title) {
3339					this.playbackRateDefault = i;
3340					this.V.playbackRate = v[0];
3341					if (this.showFace) {
3342						this.CB['playbackrate'].innerHTML = v[1];
3343						this.playbackRate();
3344					}
3345					this.sendJS('playbackRate', v);
3346					this.playbackRateTemp=v[0];
3347				}
3348			}
3349		},
3350		/*
3351			内部函数
3352			注册多字幕切换相关
3353		*/
3354		subtitleSwitch: function() {
3355			if (!this.showFace || !this.ckplayerConfig['config']['subtitle']) {
3356				return;
3357			}
3358			var thisTemp = this;
3359			var vArr = this.vars['cktrack'];//字幕数组
3360			if(this.typeString(vArr)!='array'){
3361				return;
3362			}
3363			if(vArr[0][1]==''){
3364				return;
3365			}
3366			var html = '';
3367			var nowD = ''; //当前的字幕
3368			var i = 0;
3369			if (!nowD) {
3370				if(this.subtitlesTemp==-1){
3371					var indexN=0;
3372					for(var i=0;i<vArr.length;i++){
3373						var li=vArr[i];
3374						if(li.length==3 && li[2]>indexN){
3375							indexN=li[2];
3376							this.subtitlesTemp=i;
3377						}
3378					}
3379				}
3380				nowD = vArr[this.subtitlesTemp][1];
3381			}
3382			if (vArr.length > 1) {
3383				var zlen = 0;
3384				for (i = 0; i < vArr.length; i++) {
3385					html += '<p>' + vArr[i][1] + '</p>';
3386					var dlen = this.getStringLen(vArr[i][1]);
3387					if (dlen > zlen) {
3388						zlen = dlen;
3389					}
3390				}
3391				if (html) {
3392					html += '<p>' + nowD + '</p>';
3393				}
3394				
3395				this.CB['subtitles'].innerHTML = nowD;
3396				this.CB['subtitlesP'].innerHTML = html;
3397				this.css([this.CB['subtitles'], this.CB['subtitlesLine']], 'display', 'block');
3398				var pArr = this.CB['subtitlesP'].childNodes;
3399				for (var i = 0; i < pArr.length; i++) {
3400					var fontColor = '#FFFFFF';
3401					if (pArr[i].innerHTML == nowD) {
3402						fontColor = '#0782F5';
3403					}
3404					this.css(pArr[i], {
3405						color: fontColor,
3406						margin: '0px',
3407						padding: '0px',
3408						fontSize: '14px'
3409					});
3410					if (i < pArr.length - 1) {
3411						this.css(pArr[i], 'borderBottom', '1px solid #282828')
3412					}
3413					var defClick = function(event) {
3414						if (nowD != this.innerHTML) {
3415							thisTemp.css(thisTemp.CB['subtitlesP'], 'display', 'none');
3416							thisTemp.newSubtitles(this.innerHTML);
3417							thisTemp.sendJS('clickEvent', 'actionScript->newPlaybackrate');
3418						}
3419					};
3420					this.addListenerInside('click', defClick, pArr[i]);
3421
3422				}
3423				var pW = (zlen * 10) + 10;
3424				this.css(this.CB['subtitlesP'], {
3425					width: pW + 'px'
3426				});
3427				this.css(this.CB['subtitles'], {
3428					width: pW + 'px'
3429				});
3430				this.buttonWidth['subtitles'] = this.CB['subtitles'].offsetWidth;
3431			} else {
3432				this.CB['subtitles'].innerHTML = '';
3433				this.CB['subtitlesP'].innerHTML = '';
3434				this.css([this.CB['subtitles'], this.CB['subtitlesLine']], 'display', 'none');
3435			}
3436		},
3437		/*
3438			内部函数
3439			注册多字幕切换事件
3440		*/
3441		addSubtitles:function(){
3442			var thisTemp = this;
3443			var setTimeOutP = null;
3444			var defClick = function(event) {
3445				thisTemp.css(thisTemp.CB['subtitlesP'], {
3446					left: thisTemp.getCoor(thisTemp.CB['subtitles'])['x'] + 'px',
3447					display: 'block'
3448				});
3449			};
3450			this.addListenerInside('click', defClick, this.CB['subtitles']);
3451			var defMouseOut = function(event) {
3452				if (setTimeOutP) {
3453					window.clearTimeout(setTimeOutP);
3454					setTimeOutP = null;
3455				}
3456				setTimeOutP = setTimeout(function(event) {
3457					thisTemp.css(thisTemp.CB['subtitlesP'], 'display', 'none');
3458				},
3459				500);
3460			};
3461			this.addListenerInside('mouseout', defMouseOut, thisTemp.CB['subtitlesP']);
3462			var defMouseOver = function(event) {
3463				if (setTimeOutP) {
3464					window.clearTimeout(setTimeOutP);
3465					setTimeOutP = null;
3466				}
3467			};
3468			this.addListenerInside('mouseover', defMouseOver, thisTemp.CB['subtitlesP']);
3469		},
3470		/*
3471			接口函数:修改字幕,按数组编号来
3472			提供给外部api
3473		*/
3474		changeSubtitles: function(n) {
3475			if (!this.loaded || n < 0) {
3476				return;
3477			}
3478			var vArr = this.vars['cktrack'];//字幕数组
3479			if(this.typeString(vArr)!='array'){
3480				return;
3481			}
3482			if (this.playerType == 'flashplayer') {
3483				this.V.changeSubtitles(n);
3484				return;
3485			}
3486			if (vArr.length > n) {
3487				var arr = vArr[n];
3488				if (arr.length > 2) {
3489					var title = arr[1];
3490					if (title) {
3491						this.newSubtitles(title);
3492					}
3493				}
3494			}
3495		},
3496		/*
3497			接口函数:修改字幕大小
3498			提供给外部api
3499		*/
3500		changeSubtitlesSize:function(n){
3501			if (!this.loaded || n < 0) {
3502				return;
3503			}
3504			if (this.playerType == 'flashplayer') {
3505				this.V.changeSubtitlesSize(n);
3506				return;
3507			}
3508			this.trackFontSize=n;
3509			this.trackShowAgain();
3510		},
3511		/*
3512			当切换字幕时的动作 
3513		*/
3514		newSubtitles:function(title){
3515			var vArr = this.vars['cktrack'];//字幕数组
3516			var i = 0;
3517			for (i = 0; i < vArr.length; i++) {
3518				var v = vArr[i];
3519				if (v[1] == title) {
3520					this.subtitlesTemp=i;
3521					if (this.showFace) {
3522						this.CB['subtitles'].innerHTML = v[1];
3523						this.subtitleSwitch();
3524						this.loadTrack(i);
3525					}
3526					this.sendJS('subtitles', v);
3527				}
3528			}
3529		},
3530		/*
3531			内部函数
3532			构建清晰度按钮及切换事件(Click事件)
3533		*/
3534		definition: function() {
3535			if (!this.showFace || !this.ckplayerConfig['config']['definition']) {
3536				return;
3537			}
3538			var thisTemp = this;
3539			var vArr = this.VA;
3540			var dArr = [];
3541			var html = '';
3542			var nowD = ''; //当前的清晰度
3543			var i = 0;
3544			for (i = 0; i < vArr.length; i++) {
3545				var d = vArr[i][2];
3546				if (dArr.indexOf(d) == -1) {
3547					dArr.push(d);
3548				}
3549				if (this.V) {
3550					if (vArr[i][0] == this.V.currentSrc) {
3551						nowD = d;
3552					}
3553				}
3554			}
3555			if (!nowD) {
3556				nowD = dArr[0];
3557			}
3558			if (dArr.length > 1) {
3559				var zlen = 0;
3560				for (i = dArr.length - 1; i > -1; i--) {
3561					html = '<p>' + dArr[i] + '</p>' + html;
3562					var dlen = this.getStringLen(dArr[i]);
3563					if (dlen > zlen) {
3564						zlen = dlen;
3565					}
3566				}
3567				if (html) {
3568					html += '<p>' + nowD + '</p>';
3569				}
3570				this.CB['definition'].innerHTML = nowD;
3571				this.CB['definitionP'].innerHTML = html;
3572				this.css([this.CB['definition'], this.CB['definitionLine']], 'display', 'block');
3573				var pArr = this.CB['definitionP'].childNodes;
3574				for (var i = 0; i < pArr.length; i++) {
3575					var fontColor = '#FFFFFF';
3576					if (pArr[i].innerHTML == nowD) {
3577						fontColor = '#0782F5';
3578					}
3579					this.css(pArr[i], {
3580						color: fontColor,
3581						margin: '0px',
3582						padding: '0px',
3583						fontSize: '14px'
3584					});
3585					if (i < pArr.length - 1) {
3586						this.css(pArr[i], 'borderBottom', '1px solid #282828')
3587					}
3588					var defClick = function() {
3589						if (nowD != this.innerHTML) {
3590							thisTemp.css(thisTemp.CB['definitionP'], 'display', 'none');
3591							thisTemp.newDefinition(this.innerHTML);
3592						}
3593					};
3594					this.addListenerInside('click', defClick, pArr[i]);
3595
3596				}
3597				var pW = (zlen * 10) + 10;
3598				this.css(this.CB['definitionP'], {
3599					width: pW + 'px'
3600				});
3601				this.css(this.CB['definition'], {
3602					width: pW + 'px'
3603				});
3604				this.buttonWidth['definition'] = this.CB['definition'].offsetWidth;
3605			} else {
3606				this.CB['definition'].innerHTML = '';
3607				this.CB['definitionP'].innerHTML = '';
3608				this.css([this.CB['definition'], this.CB['definitionLine']], 'display', 'none');
3609			}
3610		},
3611		/*
3612			内部函数
3613			注册清晰度相关事件
3614		*/
3615		addDefListener: function() {
3616			var thisTemp = this;
3617			var setTimeOutP = null;
3618			var defClick = function(event) {
3619				thisTemp.css(thisTemp.CB['definitionP'], {
3620					left: thisTemp.getCoor(thisTemp.CB['definition'])['x'] + 'px',
3621					display: 'block'
3622				});
3623			};
3624			this.addListenerInside('click', defClick, this.CB['definition']);
3625			var defMouseOut = function(event) {
3626				if (setTimeOutP) {
3627					window.clearTimeout(setTimeOutP);
3628					setTimeOutP = null;
3629				}
3630				setTimeOutP = setTimeout(function(event) {
3631					thisTemp.css(thisTemp.CB['definitionP'], 'display', 'none');
3632				},
3633				500);
3634			};
3635			this.addListenerInside('mouseout', defMouseOut, thisTemp.CB['definitionP']);
3636			var defMouseOver = function(event) {
3637				if (setTimeOutP) {
3638					window.clearTimeout(setTimeOutP);
3639					setTimeOutP = null;
3640				}
3641			};
3642			this.addListenerInside('mouseover', defMouseOver, thisTemp.CB['definitionP']);
3643		},
3644		/*
3645			接口函数
3646			提供给外部api
3647		*/
3648		changeDefinition: function(n) {
3649			if (!this.loaded || n < 0) {
3650				return;
3651			}
3652			if (this.playerType == 'flashplayer') {
3653				this.V.changeDefinition(n);
3654				return;
3655			}
3656			if (this.VA.length > n) {
3657				var arr = this.VA[n];
3658				if (arr.length > 3) {
3659					var title = arr[2];
3660					if (title) {
3661						this.newDefinition(title);
3662					}
3663				}
3664			}
3665		},
3666		/*
3667			内部函数
3668			切换清晰度后发生的动作
3669		*/
3670		newDefinition: function(title) {
3671			var vArr = this.VA;
3672			var nVArr = [];
3673			var i = 0;
3674			for (i = 0; i < vArr.length; i++) {
3675				var v = vArr[i];
3676				if (v[2] == title) {
3677					nVArr.push(v);
3678					this.sendJS('definitionChange', i + '');
3679				}
3680			}
3681			if (nVArr.length < 1) {
3682				return;
3683			}
3684			if (this.V != null && this.needSeek == 0) {
3685				this.needSeek = this.V.currentTime;
3686			}
3687			if (this.getFileExt(nVArr[0][0]) != '.m3u8') {
3688				this.isM3u8 = false;
3689			}
3690			if (!this.isM3u8) {
3691				if (nVArr.length == 1) {
3692					this.V.innerHTML = '';
3693					this.V.src = nVArr[0][0];
3694					this.V.currentSrc = nVArr[0][0];
3695				} else {
3696					var source = '';
3697					nVArr = this.arrSort(nVArr);
3698					for (i = 0; i < nVArr.length; i++) {
3699						var type = '';
3700						var va = nVArr[i];
3701						if (va[1]) {
3702							type = ' type="' + va[1] + '"';
3703						}
3704						source += '<source src="' + va[0] + '"' + type + '>';
3705					}
3706					this.V.removeAttribute('src');
3707					this.V.innerHTML = source;
3708					this.V.currentSrc = nVArr[0][0];
3709				}
3710			} else {
3711				this.embedHls(vArr[0][0], this.vars['autoplay']);
3712			}
3713			this.V.autoplay = 'autoplay';
3714			this.V.load();
3715			if (this.playbackRateTemp!=1) {
3716				this.V.playbackRate = this.playbackRateTemp; //定义倍速
3717			}
3718			this.timerErrorFun();
3719		},
3720		/*
3721			内置函数
3722			播放hls
3723		*/
3724		embedHls: function(url, autoplay) {
3725			var thisTemp = this;
3726			thisTemp.hlsAutoPlay=autoplay;
3727			if (Hls.isSupported()) {
3728				var hls = new Hls();
3729				hls.loadSource(url);
3730				hls.attachMedia(this.V);
3731				hls.on(Hls.Events.MANIFEST_PARSED,
3732				function() {
3733					thisTemp.playerLoad();
3734					if (autoplay) {
3735						thisTemp.videoPlay();
3736					}
3737				});
3738			}
3739		},
3740		/*
3741			内部函数
3742			构建提示点
3743		*/
3744		prompt: function() {
3745			if (!this.showFace) {
3746				return;
3747			}
3748			var thisTemp = this;
3749			var prompt = this.vars['promptSpot'];
3750			if (prompt == null || this.promptArr.length > 0) {
3751				return;
3752			}
3753			var showPrompt = function(event) {
3754				if (thisTemp.promptElement == null) {
3755					var random2 = 'prompte' + thisTemp.randomString(5);
3756					var ele2 = document.createElement('div');
3757					ele2.className = random2;
3758					thisTemp.PD.appendChild(ele2);
3759					thisTemp.promptElement = thisTemp.getByElement(random2);
3760					thisTemp.css(thisTemp.promptElement, {
3761						overflowX: 'hidden',
3762						lineHeight: '22px',
3763						fontSize: '14px',
3764						color: '#FFFFFF',
3765						position: 'absolute',
3766						display: 'block',
3767						zIndex: '90'
3768					});
3769				}
3770				var pcon = thisTemp.getPromptTest();
3771				var pW = pcon['pW'],
3772				pT = pcon['pT'],
3773				pL = parseInt(thisTemp.css(this, 'left')) - parseInt(pW * 0.5);
3774				if (pcon['pL'] > 10) {
3775					pL = pcon['pL'];
3776				}
3777				if (pL < 0) {
3778					pL = 0;
3779				}
3780				thisTemp.css(thisTemp.promptElement, {
3781					width: pW + 'px',
3782					left: ( - pW - 10) + 'px',
3783					display: 'block'
3784				});
3785				thisTemp.promptElement.innerHTML = thisTemp.getDataset(this, 'words');
3786				thisTemp.css(thisTemp.promptElement, {
3787					left: pL + 'px',
3788					top: (pT - thisTemp.promptElement.offsetHeight - 10) + 'px'
3789				});
3790			};
3791			var hidePrompt = function(event) {
3792				if (thisTemp.promptElement != null) {
3793					thisTemp.css(thisTemp.promptElement, {
3794						display: 'none'
3795					});
3796				}
3797			};
3798			var i = 0;
3799			for (i = 0; i < prompt.length; i++) {
3800				var pr = prompt[i];
3801				var words = pr['words'];
3802				var time = pr['time'];
3803				var random = 'prompt' + this.randomString(5);
3804				var ele = document.createElement('div');
3805				ele.className = random;
3806				this.CB['timeBoBg'].appendChild(ele);
3807				var div = this.getByElement(random);
3808				div.setAttribute('data-time', time);
3809				div.setAttribute('data-words', words);
3810				this.css(div, {
3811					width: '6px',
3812					height: '6px',
3813					backgroundColor: '#FFFFFF',
3814					position: 'absolute',
3815					top: '4px',
3816					left: '-100px',
3817					display: 'none',
3818					zIndex: '1',
3819					borderRadius: '6px'
3820				});
3821
3822				this.addListenerInside('mouseover', showPrompt, div);
3823				this.addListenerInside('mouseout', hidePrompt, div);
3824				this.promptArr.push(div);
3825			}
3826			this.changePrompt();
3827		},
3828		/*
3829			内部函数
3830			计算提示文本的位置
3831		*/
3832		getPromptTest: function() {
3833			var pW = this.previewWidth,
3834			pT = this.getCoor(this.CB['timeButton'])['y'],
3835			pL = 0;
3836			if (this.previewTop != null) {
3837				pT -= parseInt(this.css(this.previewTop, 'height'));
3838				pL = parseInt(this.css(this.previewTop, 'left'));
3839			} else {
3840				pT -= 35;
3841			}
3842			pL += 2;
3843			if (pL < 0) {
3844				pL = 0;
3845			}
3846			if (pL > this.PD.offsetWidth - pW) {
3847				pL = this.PD.offsetWidth - pW;
3848			}
3849			return {
3850				pW: pW,
3851				pT: pT,
3852				pL: pL
3853			};
3854		},
3855		/*
3856			内部函数
3857			删除提示点
3858		*/
3859		deletePrompt: function() {
3860			var arr = this.promptArr;
3861			if (arr.length > 0) {
3862				for (var i = 0; i < arr.length; i++) {
3863					if (arr[i]) {
3864						this.deleteChild(arr[i]);
3865					}
3866				}
3867			}
3868			this.promptArr = [];
3869		},
3870		/*
3871			内部函数
3872			计算提示点坐标
3873		*/
3874		changePrompt: function() {
3875			if (this.promptArr.length == 0) {
3876				return;
3877			}
3878			var arr = this.promptArr;
3879			var duration = this.getMetaDate()['duration'];
3880			var bw = this.CB['timeBoBg'].offsetWidth;
3881			for (var i = 0; i < arr.length; i++) {
3882				var time = parseInt(this.getDataset(arr[i], 'time'));
3883				var left = parseInt(time * bw / duration) - parseInt(arr[i].offsetWidth * 0.5);
3884				if (left < 0) {
3885					left = 0;
3886				}
3887				if (left > bw - parseInt(arr[i].offsetWidth * 0.5)) {
3888					left = bw - parseInt(arr[i].offsetWidth * 0.5);
3889				}
3890				this.css(arr[i], {
3891					left: left + 'px',
3892					display: 'block'
3893				});
3894			}
3895		},
3896		/*
3897			内部函数
3898			构建预览图片效果
3899		*/
3900		preview: function(obj) {
3901			var thisTemp = this;
3902			var preview = {
3903				file: null,
3904				scale: 0
3905			};
3906			preview = this.standardization(preview, this.vars['preview']);
3907			if (preview['file'] == null || preview['scale'] <= 0) {
3908				return;
3909			}
3910			var srcArr = preview['file'];
3911			if (this.previewStart == 0) { //如果还没有构建,则先进行构建
3912				this.previewStart = 1;
3913				if (srcArr.length > 0) {
3914					var i = 0;
3915					var imgW = 0,
3916					imgH = 0;
3917					var random = thisTemp.randomString(10);
3918					var loadNum = 0;
3919					var loadImg = function(i) {
3920						srcArr[i] = thisTemp.getNewUrl(srcArr[i]);
3921						var n = 0;
3922						var img = new Image();
3923						img.src = srcArr[i];
3924						img.className = random + i;
3925						img.onload = function(event) {
3926							loadNum++;
3927							if (thisTemp.previewDiv == null) { //如果没有建立DIV,则建
3928								imgW = img.width;
3929								imgH = img.height;
3930								thisTemp.previewWidth = parseInt(imgW * 0.1);
3931								var ele = document.createElement('div');
3932								ele.className = random;
3933								thisTemp.PD.appendChild(ele);
3934								thisTemp.previewDiv = thisTemp.getByElement(random);
3935								var eleTop = (obj['y'] - parseInt(imgH * 0.1) + 2);
3936								thisTemp.css(thisTemp.previewDiv, {
3937									width: srcArr.length * imgW * 10 + 'px',
3938									height: parseInt(imgH * 0.1) + 'px',
3939									backgroundColor: '#000000',
3940									position: 'absolute',
3941									left: '0px',
3942									top: eleTop + 'px',
3943									display: 'none',
3944									zIndex: '80'
3945								});
3946								ele.setAttribute('data-x', '0');
3947								ele.setAttribute('data-y', eleTop);
3948								var ele2 = document.createElement('div');
3949								ele2.className = random + 'd2';
3950								thisTemp.PD.appendChild(ele2);
3951								thisTemp.previewTop = thisTemp.getByElement(ele2.className);
3952								thisTemp.css(thisTemp.previewTop, {
3953									width: parseInt(imgW * 0.1) + 'px',
3954									height: parseInt(imgH * 0.1) + 'px',
3955									position: 'absolute',
3956									border: '5px solid ' + thisTemp.css(thisTemp.CB['timeProgress'], 'backgroundColor'),
3957									left: '0px',
3958									top: (obj['y'] - parseInt(imgH * 0.1) + 2) + 'px',
3959									display: 'none',
3960									zIndex: '81'
3961								});
3962								var html = '';
3963								for (n = 0; n < srcArr.length; n++) {
3964									html += thisTemp.newCanvas(random + n, imgW * 10, parseInt(imgH * 0.1))
3965								}
3966								thisTemp.previewDiv.innerHTML = html;
3967							}
3968							thisTemp.previewDiv.appendChild(img);
3969							var cimg = thisTemp.getByElement(img.className);
3970							var canvas = thisTemp.getByElement(img.className + '-canvas');
3971							var context = canvas.getContext('2d');
3972							var sx = 0,
3973							sy = 0,
3974							x = 0,
3975							h = parseInt(imgH * 0.1);
3976							for (n = 0; n < 100; n++) {
3977								x = parseInt(n * imgW * 0.1);
3978								context.drawImage(cimg, sx, sy, parseInt(imgW * 0.1), h, x, 0, parseInt(imgW * 0.1), h);
3979								sx += parseInt(imgW * 0.1);
3980								if (sx >= imgW) {
3981									sx = 0;
3982									sy += h;
3983								}
3984								thisTemp.css(cimg, 'display', 'none');
3985							}
3986							if (loadNum == srcArr.length) {
3987								thisTemp.previewStart = 2;
3988							} else {
3989								i++;
3990								loadImg(i);
3991							}
3992						};
3993					};
3994				}
3995				loadImg(i);
3996				return;
3997			}
3998			if (this.previewStart == 2) {
3999				var isTween = true;
4000				var nowNum = parseInt(obj['time'] / this.vars['preview']['scale']);
4001				var numTotal = parseInt(thisTemp.getMetaDate()['duration'] / this.vars['preview']['scale']);
4002				if (thisTemp.css(thisTemp.previewDiv, 'display') == 'none') {
4003					isTween = false;
4004				}
4005				thisTemp.css(thisTemp.previewDiv, 'display', 'block');
4006				var imgWidth = thisTemp.previewDiv.offsetWidth * 0.01 / srcArr.length;
4007				var left = (imgWidth * nowNum) - obj['x'] + parseInt(imgWidth * 0.5),
4008				top = obj['y'] - thisTemp.previewDiv.offsetHeight;
4009				thisTemp.css(thisTemp.previewDiv, 'top', top + 2 + 'px');
4010				var topLeft = obj['x'] - parseInt(imgWidth * 0.5);
4011				var timepieces = 0;
4012				if (topLeft < 0) {
4013					topLeft = 0;
4014					timepieces = obj['x'] - topLeft - imgWidth * 0.5;
4015				}
4016				if (topLeft > thisTemp.PD.offsetWidth - imgWidth) {
4017					topLeft = thisTemp.PD.offsetWidth - imgWidth;
4018					timepieces = obj['x'] - topLeft - imgWidth * 0.5;
4019				}
4020				if (left < 0) {
4021					left = 0;
4022				}
4023				if (left > numTotal * imgWidth - thisTemp.PD.offsetWidth) {
4024					left = numTotal * imgWidth - thisTemp.PD.offsetWidth;
4025				}
4026				thisTemp.css(thisTemp.previewTop, {
4027					left: topLeft + 'px',
4028					top: top + 2 + 'px',
4029					display: 'block'
4030				});
4031				if (thisTemp.previewTop.offsetHeight > thisTemp.previewDiv.offsetHeight) {
4032					thisTemp.css(thisTemp.previewTop, {
4033						height: thisTemp.previewDiv.offsetHeight - (thisTemp.previewTop.offsetHeight - thisTemp.previewDiv.offsetHeight) + 'px'
4034					});
4035				}
4036				if (this.previewTween != null) {
4037					this.animatePause(this.previewTween);
4038					this.previewTween = null
4039				}
4040				var nowLeft = parseInt(thisTemp.css(thisTemp.previewDiv, 'left'));
4041				var leftC = nowLeft + left;
4042				if (nowLeft == -(left + timepieces)) {
4043					return;
4044				}
4045				if (isTween) {
4046					var obj = {
4047						element: thisTemp.previewDiv,
4048						start: null,
4049						end: -(left + timepieces),
4050						speed: 0.3
4051					};
4052					this.previewTween = this.animate(obj);
4053				} else {
4054					thisTemp.css(thisTemp.previewDiv, 'left', -(left + timepieces) + 'px')
4055				}
4056			}
4057		},
4058		/*
4059			内部函数
4060			删除预览图节点
4061		*/
4062		deletePreview: function() {
4063			if (this.previewDiv != null) {
4064				this.deleteChild(this.previewDiv);
4065				this.previewDiv = null;
4066				this.previewStart = 0;
4067			}
4068		},
4069		/*
4070			内部函数
4071			修改视频地址,属性
4072		*/
4073		changeVideo: function() {
4074			if (!this.html5Video) {
4075				this.getVarsObject();
4076				this.V.newVideo(this.vars);
4077				return;
4078			}
4079			var vArr = this.VA;
4080			var v = this.vars;
4081			var i = 0;
4082			if (vArr.length < 1) {
4083				return;
4084			}
4085			if (this.V != null && this.needSeek == 0) {
4086				this.needSeek = this.V.currentTime;
4087			}
4088			if (v['poster']) {
4089				this.V.poster = v['poster'];
4090			} else {
4091				this.V.removeAttribute('poster');
4092			}
4093			if (v['loop']) {
4094				this.V.loop = 'loop';
4095			} else {
4096				this.V.removeAttribute('loop');
4097			}
4098			if (v['seek'] > 0) {
4099				this.needSeek = v['seek'];
4100			} else {
4101				this.needSeek = 0;
4102			}
4103			if (this.getFileExt(vArr[0][0]) != '.m3u8') {
4104				this.isM3u8 = false;
4105			}
4106			if (!this.isM3u8) {
4107				if (vArr.length == 1) {
4108					this.V.innerHTML = '';
4109					this.V.src = vArr[0][0];
4110				} else {
4111					var source = '';
4112					vArr = this.arrSort(vArr);
4113					for (i = 0; i < vArr.length; i++) {
4114						var type = '';
4115						var va = vArr[i];
4116						if (va[1]) {
4117							type = ' type="' + va[1] + '"';
4118						}
4119						source += '<source src="' + va[0] + '"' + type + '>';
4120					}
4121					this.V.removeAttribute('src');
4122					this.V.innerHTML = source;
4123				}
4124				//分析视频地址结束
4125				if (v['autoplay']) {
4126					this.V.autoplay = 'autoplay';
4127				} else {
4128					this.V.removeAttribute('autoplay');
4129				}
4130				this.V.load();
4131			} else {
4132				this.embedHls(vArr[0][0], v['autoplay']);
4133			}
4134			if (!this.isUndefined(v['volume'])) {
4135				this.changeVolume(v['volume']);
4136			}
4137			this.resetPlayer(); //重置界面元素
4138			this.timerErrorFun();
4139			//如果存在字幕则加载
4140			if (this.vars['cktrack']) {
4141				this.loadTrack();
4142			}
4143		},
4144		/*
4145			内部函数
4146			调整中间暂停按钮,缓冲loading,错误提示文本框的位置
4147		*/
4148		elementCoordinate: function() {
4149			this.pdCoor = this.getXY(this.PD);
4150			try {
4151				this.css(this.CB['pauseCenter'], {
4152					left: parseInt((this.PD.offsetWidth - 80) * 0.5) + 'px',
4153					top: parseInt((this.PD.offsetHeight - 80) * 0.5) + 'px'
4154				});
4155			} catch(event) {}
4156			try {
4157				this.css(this.CB['loading'], {
4158					left: parseInt((this.PD.offsetWidth - 60) * 0.5) + 'px',
4159					top: parseInt((this.PD.offsetHeight - 60) * 0.5) + 'px'
4160				});
4161			} catch(event) {}
4162			try {
4163				this.css(this.CB['errorText'], {
4164					left: parseInt((this.PD.offsetWidth - 120) * 0.5) + 'px',
4165					top: parseInt((this.PD.offsetHeight - 30) * 0.5) + 'px'
4166				});
4167			} catch(event) {}
4168			try {
4169				this.css(this.CB['logo'], {
4170					left: parseInt(this.PD.offsetWidth - this.CB['logo'].offsetWidth - 20) + 'px',
4171					top: '20px'
4172				});
4173			} catch(event) {}
4174			this.checkBarWidth();
4175		},
4176		/*
4177			内部函数
4178			当播放器尺寸变化时,显示和隐藏相关节点
4179		*/
4180		checkBarWidth: function() {
4181			if (!this.showFace) {
4182				return;
4183			}
4184			var controlBarW = this.CB['controlBar'].offsetWidth;
4185			var ele = [];
4186			ele.push([[this.CB['full'], this.CB['escFull'], this.CB['fullLine']], this.buttonWidth['full'] + 2, 'full']);
4187			if (this.vars['front'] != '') {
4188				ele.push([[this.CB['front'], this.CB['frontLine']], this.buttonWidth['front'] + 2]);
4189			}
4190			if (this.vars['next'] != '') {
4191				ele.push([[this.CB['next'], this.CB['nextLine']], this.buttonWidth['next'] + 2]);
4192			}
4193			if (this.CB['definition'].innerHTML != '') {
4194				ele.push([[this.CB['definition'], this.CB['definitionLine']], this.buttonWidth['definition'] + 2]);
4195			}
4196			if ((this.ckplayerConfig['config']['mobileVolumeBarShow'] || !this.isMobile()) && this.css(this.CB['volume'], 'display') != 'none') {
4197				ele.push([[this.CB['volume']], this.buttonWidth['volume']]);
4198				ele.push([[this.CB['mute'], this.CB['escMute'], this.CB['muteLine']], this.buttonWidth['mute'] + 2, 'mute']);
4199			}
4200			ele.push([[this.CB['timeText']], this.buttonWidth['timeText']]);
4201			ele.push([[this.CB['play'], this.CB['pause'], this.CB['playLine']], this.buttonWidth['play'] + 2, 'play']);
4202
4203			var i = 0;
4204			var len = 0;
4205			var isc = true;
4206			//计算所有要显示的节点的总宽度
4207			for (var i = 0; i < ele.length; i++) {
4208				var nlen = ele[i][1];
4209				if (nlen > 2) {
4210					len += nlen;
4211				} else {
4212					isc = false;
4213				}
4214			}
4215			if (isc) {
4216				this.buttonLen = len;
4217				this.buttonArr = ele;
4218			}
4219			len = this.buttonLen;
4220			ele = this.buttonArr;
4221			for (var i = 0; i < ele.length; i++) {
4222				if (len > controlBarW) {
4223					len -= ele[i][1];
4224					this.css(ele[i][0], 'display', 'none');
4225				} else {
4226					this.css(ele[i][0], 'display', 'block');
4227					if (ele[i].length == 3) {
4228						var name = ele[i][2];
4229						switch (name) {
4230						case 'mute':
4231							if (this.volume == 0) {
4232								this.css(this.CB['mute'], 'display', 'none');
4233							} else {
4234								this.css(this.CB['escMute'], 'display', 'none');
4235							}
4236							break;
4237						case 'play':
4238							this.playShow(this.V.paused ? false: true);
4239							break;
4240						case 'full':
4241							if (this.full) {
4242								this.css(this.CB['full'], 'display', 'none');
4243							} else {
4244								this.css(this.CB['escFull'], 'display', 'none');
4245							}
4246							break;
4247						}
4248					}
4249				}
4250			}
4251		},
4252		/*
4253			内部函数
4254			初始化暂停或播放按钮
4255		*/
4256		initPlayPause: function() {
4257			if (!this.showFace) {
4258				return;
4259			}
4260			if (this.vars['autoplay']) {
4261				this.css([this.CB['play'], this.CB['pauseCenter']], 'display', 'none');
4262				this.css(this.CB['pause'], 'display', 'block');
4263			} else {
4264				this.css(this.CB['play'], 'display', 'block');
4265				if (this.css(this.CB['errorText'], 'display') == 'none') {
4266					this.css(this.CB['pauseCenter'], 'display', 'block');
4267				}
4268				this.css(this.CB['pause'], 'display', 'none');
4269			}
4270		},
4271
4272		/*
4273			下面为监听事件
4274			内部函数
4275			监听元数据已加载
4276		*/
4277		loadedHandler: function() {
4278			this.loaded = true;
4279			if (this.vars['loaded'] != '') {
4280				try {
4281					eval(this.vars['loaded'] + '()');
4282				} catch(event) {
4283					this.log(event);
4284				}
4285			}
4286		},
4287		/*
4288			内部函数
4289			监听播放
4290		*/
4291		playingHandler: function() {
4292			this.playShow(true);
4293			//如果是第一次播放
4294			if (this.isFirstTimePlay && !this.isUndefined(this.advertisements['front'])) {
4295				this.isFirstTimePlay = false;
4296				//调用播放前置广告组件
4297				this.adI = 0;
4298				this.adType = 'front';
4299				this.adMuteInto();
4300				this.adIsVideoTime = true;
4301				this.adPlayStart = true;
4302				this.adVideoPlay = false;
4303				this.videoPause();
4304				this.advertisementsTime();
4305				this.advertisementsPlay();
4306				this.adSkipButtonShow();
4307				//调用播放前置广告组件结束
4308				return;
4309			}
4310			if (this.adPlayerPlay) {
4311				return;
4312			}
4313			//判断第一次播放结束
4314			if (this.needSeek > 0) {
4315				this.videoSeek(this.needSeek);
4316				this.needSeek = 0;
4317			}
4318			if (this.animatePauseArray.length > 0) {
4319				this.animateResume('pause');
4320			}
4321			if (this.playerType == 'html5video' && this.V != null && this.config['videoDrawImage']) {
4322				this.sendVCanvas();
4323			}
4324			if (!this.isUndefined(this.advertisements['pause']) && !this.adPlayStart) { //如果存在暂停广告
4325				this.adPauseCloseFunction();
4326			}
4327		},
4328		/*暂停时播放暂停广告*/
4329		adPausePlayer: function() {
4330			this.adI = 0;
4331			this.adType = 'pause';
4332			this.adPauseShow = true;
4333			this.loadAdPause();
4334		},
4335		loadAdPause: function() {
4336			var ad = this.getNowAdvertisements();
4337			var type = ad['type'];
4338			var thisTemp = this;
4339			var width = this.PD.offsetWidth,
4340			height = this.PD.offsetHeight;
4341			if (this.isStrImage(type) && this.adPauseShow) {
4342				this.css(this.CB['adElement'], 'display', 'block');
4343				var imgClass = 'adimg' + this.randomString(10);
4344				var imgHtml = '<img src="' + ad['file'] + '" class="' + imgClass + '">';
4345				if (ad['link']) {
4346					imgHtml = '<a href="' + ad['link'] + '" target="_blank">' + imgHtml + '</a>';
4347				}
4348				this.CB['adElement'].innerHTML = imgHtml;
4349				this.addListenerInside('load',
4350				function() {
4351					var imgObj = new Image();
4352					imgObj.src = this.src;
4353					var imgWH = thisTemp.adjustmentWH(imgObj.width, imgObj.height);
4354					thisTemp.css([thisTemp.getByElement(imgClass), thisTemp.CB['adElement']], {
4355						width: imgWH['width'] + 'px',
4356						height: imgWH['height'] + 'px',
4357						border: '0px'
4358					});
4359					if (thisTemp.ckplayerConfig['style']['advertisement']['closeButtonShow'] && thisTemp.adPauseShow) {
4360						thisTemp.css(thisTemp.CB['adPauseClose'], {
4361							display: 'block'
4362						});
4363					}
4364					thisTemp.ajaxSuccessNull(ad['exhibitionMonitor']);
4365					thisTemp.adPauseCoor();
4366				},
4367				this.getByElement(imgClass));
4368				this.addListenerInside('click',
4369				function() {
4370					thisTemp.ajaxSuccessNull(ad['clickMonitor']);
4371				},
4372				this.CB['adElement']);
4373				var newI = this.adI;
4374				if (this.adI < this.advertisements['pause'].length - 1) {
4375					newI++;
4376				} else {
4377					newI = 0;
4378				}
4379				if (ad['time'] > 0) {
4380					setTimeout(function() {
4381						if (thisTemp.adPauseShow) {
4382							thisTemp.adI = newI;
4383							thisTemp.loadAdPause();
4384						}
4385					},
4386					ad['time'] * 1000);
4387				}
4388			}
4389		},
4390		/*调整暂停广告的位置*/
4391		adPauseCoor: function() {
4392			if (this.css(this.CB['adElement'], 'display') == 'block') {
4393				var w = this.CB['adElement'].offsetWidth,
4394				h = this.CB['adElement'].offsetHeight;
4395				var pw = this.PD.offsetWidth,
4396				ph = this.PD.offsetHeight;
4397				this.css(this.CB['adElement'], {
4398					top: (ph - h) * 0.5 + 'px',
4399					left: (pw - w) * 0.5 + 'px'
4400				});
4401				if (this.css(this.CB['adPauseClose'], 'display') == 'block') {
4402					this.css(this.CB['adPauseClose'], {
4403						top: (ph - h) * 0.5 - 10 + 'px',
4404						left: (pw - w) * 0.5 + w - 10 + 'px'
4405					});
4406				}
4407			}
4408		},
4409		/*
4410			关闭暂停广告
4411		*/
4412		adPauseCloseFunction: function() {
4413			this.CB['adElement'].innerHTML = '';
4414			this.css([this.CB['adElement'], this.CB['adPauseClose']], 'display', 'none');
4415			this.adPauseShow = false;
4416		},
4417		/*计算广告时间*/
4418		advertisementsTime: function(nt) {
4419			if (this.isUndefined(nt)) {
4420				nt = 0;
4421			}
4422			var ad = this.advertisements[this.adType];
4423			if (nt > 0) {
4424				ad[this.adI]['time'] = Math.ceil(nt);
4425			}
4426			this.adTimeAllTotal = 0;
4427			for (var i = this.adI; i < ad.length; i++) {
4428				if (!this.isUndefined(ad[i]['time'])) {
4429					this.adTimeAllTotal += Math.ceil(ad[i]['time']);
4430				}
4431			}
4432			if (this.adTimeAllTotal > 0) {
4433				this.CB['adTime'].innerHTML = this.language['adTime'].replace('{$second}', this.adTimeAllTotal > 9 ? this.adTimeAllTotal: '0' + this.adTimeAllTotal);
4434			}
4435			if (this.adPauseShow) {
4436				this.adPauseCloseFunction();
4437			}
4438			this.adOtherCloseAll();
4439			this.adTimeTotal = -1;
4440		},
4441		/*判断是否需要显示跳过广告按钮*/
4442		adSkipButtonShow: function() {
4443			var thisTemp = this;
4444			var skipConfig = this.ckplayerConfig['style']['advertisement'];
4445			var delayTimeTemp = skipConfig[this.adType + 'SkipButtonDelay'];
4446			var timeFun = function() {
4447				if (delayTimeTemp >= 0) {
4448					thisTemp.CB['adSkip'].innerHTML = thisTemp.language['skipAdTime'].replace('{$second}', delayTimeTemp > 9 ? delayTimeTemp: '0' + delayTimeTemp);
4449					setTimeout(timeFun, 1000);
4450				} else {
4451					thisTemp.CB['adSkip'].innerHTML = thisTemp.language['skipAd'];
4452				}
4453				delayTimeTemp--;
4454			};
4455			if (skipConfig['skipButtonShow']) {
4456				this.css(thisTemp.CB['adSkip'], 'display', 'block');
4457				if (skipConfig[this.adType + 'SkipButtonDelay'] > 0 && this.isUndefined(this.adSkipButtonTime)) {
4458					timeFun();
4459				} else {
4460					thisTemp.css(thisTemp.CB['adSkip'], 'display', 'block');
4461					thisTemp.CB['adSkip'].innerHTML = this.language['skipAd'];
4462				}
4463			}
4464		},
4465		/*播放广告*/
4466		advertisementsPlay: function() {
4467			this.css([this.CB['adBackground'], this.CB['adElement'], this.CB['adBar'], this.CB['adLink']], 'display', 'none');
4468			this.adPlayerPlay = false;
4469			var ad = this.advertisements[this.adType];
4470			if (this.adI == 0 && (this.adType == 'front' || this.adType == 'insert' || this.adType == 'end')) {
4471				this.sendJS('process', this.adType + ' ad play')
4472			}
4473			this.trackHide();
4474			if (this.adI < ad.length) {
4475				if (!this.isUndefined(ad[this.adI]['time'])) {
4476					this.adTimeTotal = parseInt(ad[this.adI]['time']);
4477				}
4478				this.loadAdvertisements();
4479			} else {
4480				this.adEnded();
4481			}
4482		},
4483		/*清除当前所有广告*/
4484		eliminateAd: function() {
4485			if (this.adType) {
4486				var ad = this.advertisements[this.adType];
4487				this.adI = ad.length;
4488				this.advertisementsPlay();
4489			}
4490
4491		},
4492		/*广告播放结束*/
4493		adEnded: function() {
4494			var thisTemp = this;
4495			this.adPlayStart = false;
4496			if(this.adType=='front'){
4497				this.time=0;
4498			}
4499			this.adPlayerPlay = false;
4500			if (this.adVideoPlay) {
4501				if (this.videoTemp['src'] != '') {
4502					this.V.src = this.videoTemp['src'];
4503				} else {
4504					if (this.V.src) {
4505						this.V.removeAttribute('src');
4506					}
4507				}
4508				if (this.videoTemp['source'] != '') {
4509					this.V.innerHTML = this.videoTemp['source'];
4510				}
4511				if (this.videoTemp['currentSrc'] != '') {
4512					this.V.src = this.videoTemp['currentSrc'];
4513					this.V.currentSrc = this.videoTemp['currentSrc'];
4514				}
4515				if (this.videoTemp['loop']) {
4516					this.V.loop = true;
4517					this.videoTemp['loop'] = false;
4518				}
4519				if (this.adType == 'end') {
4520					this.endedHandler();
4521				} else {
4522					this.videoPlay();
4523				}
4524			} else {
4525				this.videoPlay();
4526			}
4527			this.changeVolume(this.vars['volume']);
4528			this.sendJS('process', this.adType + ' ad ended');
4529			this.changeControlBarShow(true);
4530		},
4531		/*加载广告*/
4532		loadAdvertisements: function() {
4533			//this.videoTemp
4534			var ad = this.getNowAdvertisements();
4535			var type = ad['type'];
4536			var thisTemp = this;
4537			var width = this.PD.offsetWidth,
4538			height = this.PD.offsetHeight;
4539			this.changeControlBarShow(false);
4540			this.adPlayerPlay = true;
4541			if (this.isStrImage(type)) {
4542				this.css([this.CB['adBackground'], this.CB['adElement'], this.CB['adBar']], 'display', 'block');
4543				this.css([this.CB['adMute'], this.CB['adEscMute']], 'display', 'none');
4544				var imgClass = 'adimg' + this.randomString(10);
4545				var imgHtml = '<img src="' + ad['file'] + '" class="' + imgClass + '">';
4546				if (ad['link']) {
4547					imgHtml = '<a href="' + ad['link'] + '" target="_blank">' + imgHtml + '</a>';
4548				}
4549				this.CB['adElement'].innerHTML = imgHtml;
4550				this.addListenerInside('load',
4551				function() {
4552					var imgObj = new Image();
4553					imgObj.src = this.src;
4554					var imgWH = thisTemp.adjustmentWH(imgObj.width, imgObj.height);
4555					thisTemp.css(thisTemp.getByElement(imgClass), {
4556						width: imgWH['width'] + 'px',
4557						height: imgWH['height'] + 'px',
4558						border: '0px'
4559					});
4560					thisTemp.css(thisTemp.CB['adElement'], {
4561						width: imgWH['width'] + 'px',
4562						height: imgWH['height'] + 'px',
4563						top: (height - imgWH['height']) * 0.5 + 'px',
4564						left: (width - imgWH['width']) * 0.5 + 'px'
4565					});
4566					thisTemp.ajaxSuccessNull(ad['exhibitionMonitor']);
4567				},
4568				this.getByElement(imgClass));
4569				this.addListenerInside('click',
4570				function() {
4571					thisTemp.ajaxSuccessNull(ad['clickMonitor']);
4572				},
4573				this.CB['adElement']);
4574				if (!this.isUndefined(ad['time'])) {
4575					this.adCountDown();
4576				}
4577			} else {
4578				this.css(this.CB['adBar'], 'display', 'block');
4579				//判断是否静音
4580				if (this.adVideoMute) {
4581					this.css(this.CB['adEscMute'], 'display', 'block');
4582					this.css(this.CB['adMute'], 'display', 'none');
4583				} else {
4584					this.css(this.CB['adEscMute'], 'display', 'none');
4585					this.css(this.CB['adMute'], 'display', 'block');
4586				}
4587				this.CB['adElement'].innerHTML = '';
4588				if (this.videoTemp['currentSrc'] == '') {
4589					this.videoTemp['currentSrc'] = this.getCurrentSrc();
4590				}
4591				if (this.V.loop) {
4592					this.videoTemp['loop'] = true;
4593					this.V.loop = false;
4594				}
4595				if (this.V != null && this.V.currentTime > 0 && this.adIsVideoTime && this.adType!='front') { //当有视频广告时而又没有记录下
4595已播放的时间则进行记录
4596					this.adIsVideoTime = false;
4597					this.needSeek = this.V.currentTime;
4598				}
4599				this.V.src = ad['file'];
4600				this.V.currentSrc = ad['file'];
4601				this.V.innerHTML = '';
4602				this.V.play();
4603				this.adVideoPlay = true;
4604				this.ajaxSuccessNull(ad['exhibitionMonitor']);
4605				if (!this.adVideoMute) {
4606					this.adEscMuteFunction();
4607				}
4608			}
4609			if (ad['link']) {
4610				this.css(this.CB['adLink'], 'display', 'block');
4611				var link = '<a href="' + ad['link'] + '" target="_blank" class="ckadmorelink">' + this.language['adLink'] + '</a>';
4612				this.CB['adLink'].innerHTML = link;
4613				this.css(this.getByElement('ckadmorelink'), {
4614					color: '#FFFFFF',
4615					textDecoration: 'none'
4616				});
4617				this.addListenerInside('click',
4618				function() {
4619					thisTemp.ajaxSuccessNull(ad['clickMonitor']);
4620				},
4621				this.CB['adLink']);
4622			} else {
4623				this.css(this.CB['adLink'], 'display', 'none');
4624			}
4625
4626		},
4627		/*普通广告倒计时*/
4628		adCountDown: function() {
4629			var thisTemp = this;
4630			if (this.adTimeTotal > 0) {
4631				if (!this.adIsPause) {
4632					this.adTimeTotal--;
4633					this.showAdTime();
4634					this.adCountDownObj = null;
4635					this.adCountDownObj = setTimeout(function() {
4636						thisTemp.adCountDown();
4637					},
4638					1000);
4639				}
4640			} else {
4641				this.adI++;
4642				this.advertisementsPlay();
4643			}
4644		},
4645		/*视频广告倒计时*/
4646		adPlayerTimeHandler: function(time) {
4647			var ad = this.getNowAdvertisements();
4648			var type = ad['type'];
4649			if (this.isStrImage(type)) {
4650				return;
4651			}
4652			if (this.adTimeTotal != parseInt(time)) {
4653				this.adTimeTotal = parseInt(time);
4654				this.showAdTime();
4655			}
4656		},
4657		/*格式化广告倒计时显示*/
4658		showAdTime: function() {
4659			this.adTimeAllTotal--;
4660			var n = this.adTimeAllTotal;
4661			if (n < 0) {
4662				n = 0;
4663			}
4664			this.CB['adTime'].innerHTML = this.language['adTime'].replace('{$second}', n < 10 ? '0' + n: n);
4665		},
4666		/*
4667			单独监听其它广告
4668		*/
4669		checkAdOther: function(t) {
4670			if (this.adPlayerPlay) {
4671				return;
4672			}
4673			var adTime = this.advertisements['othertime'];
4674			var adPlay = this.advertisements['otherPlay'];
4675			for (var i = 0; i < adTime.length; i++) {
4676				if (t >= adTime[i] && !adPlay[i]) { //如果播放时间大于广告时间而该广告还没有播放,则开始播放
4677					adPlay[i] = true;
4678					this.newAdOther(i);
4679				}
4680			}
4681		},
4682		/*
4683			新建其它广告 
4684		*/
4685		newAdOther: function(i) {
4686			var thisTemp = this;
4687			var ad = this.advertisements['other'][i];
4688			var randomS = this.randomString(10); //获取一个随机字符串
4689			var adDivID = 'adother' + randomS; //广告容器
4690			imgClassName = 'adimgother' + randomS;
4691			var adDiv = document.createElement('div');
4692			adDiv.className = adDivID;
4693			this.PD.appendChild(adDiv);
4694			ad['div'] = adDivID;
4695			ad['element'] = imgClassName;
4696			var adHtml='<img src="' + ad['file'] + '" class="' + imgClassName + '">';
4697			if(ad['link']){
4698				adHtml='<a href="' + ad['link'] + '" target="blank">'+adHtml+'</a>';
4699			}
4700			this.getByElement(adDivID).innerHTML =adHtml;
4701			this.css(adDivID, {
4702				position: 'absolute',
4703				overflow: 'hidden',
4704				zIndex: '996',
4705				top: '60px',
4706				left: '30px',
4707				cursor: 'pointer'
4708			});
4709			if (this.ckplayerConfig['style']['advertisement']['closeOtherButtonShow']) {
4710				var closeAdDivID = 'adotherclose' + randomS; //广告容器
4711				var closeAdDiv = document.createElement('div');
4712				closeAdDiv.className = closeAdDivID;
4713				this.PD.appendChild(closeAdDiv);
4714				this.getByElement(closeAdDivID).innerHTML = this.newCanvas(closeAdDivID, 20, 20);
4715				ad['closeDiv'] = closeAdDivID;
4716				ad['close'] = false;
4717				this.css(closeAdDivID, {
4718					backgroundColor: '#f7f7f7',
4719					//f8f7f7
4720					widht: '20px',
4721					height: '20px',
4722					position: 'absolute',
4723					overflow: 'hidden',
4724					zIndex: '997',
4725					top: '60px',
4726					left: '30px',
4727					borderRadius: '20px',
4728					cursor: 'pointer'
4729				});
4730				var adOtherClose = this.getByElement(closeAdDivID + '-canvas').getContext('2d');
4731				var adOtherCloseFillRect = function() {
4732					thisTemp.canvasFill(adOtherClose, [[4, 6], [6, 6], [16, 15], [14, 15]]);
4733					thisTemp.canvasFill(adOtherClose, [[14, 6], [16, 6], [6, 15], [4, 15]]);
4734				};
4735				adOtherClose.fillStyle = '#404856';
4736				adOtherCloseFillRect();
4737				var adOtherCloseOver = function() {
4738					adOtherClose.clearRect(0, 0, 20, 20);
4739					adOtherClose.fillStyle = '#0782F5';
4740					adOtherCloseFillRect();
4741				};
4742				var adOtherCloseOut = function() {
4743					adOtherClose.clearRect(0, 0, 20, 20);
4744					adOtherClose.fillStyle = '#404856';
4745					adOtherCloseFillRect();
4746				};
4747				this.addListenerInside('mouseover', adOtherCloseOver, this.getByElement(closeAdDivID + '-canvas'));
4748				this.addListenerInside('mouseout', adOtherCloseOut, this.getByElement(closeAdDivID + '-canvas'));
4749			}
4750			this.addListenerInside('load',
4751			function() {
4752				var imgObj = new Image();
4753				imgObj.src = this.src;
4754				var imgWH = thisTemp.adjustmentWH(imgObj.width, imgObj.height);
4755				thisTemp.css([thisTemp.getByElement(imgClassName), thisTemp.getByElement(adDivID)], {
4756					width: imgWH['width'] + 'px',
4757					height: imgWH['height'] + 'px',
4758					border: '0px'
4759				});
4760				thisTemp.advertisements['other'][i] = ad;
4761				thisTemp.ajaxSuccessNull(ad['exhibitionMonitor']);
4762				thisTemp.adOtherCoor();
4763			},
4764			this.getByElement(imgClassName));
4765			this.addListenerInside('click',
4766			function() {
4767				thisTemp.adOtherClose(i);
4768			},
4769			this.getByElement(closeAdDivID));
4770			this.addListenerInside('click',
4771			function() {
4772				thisTemp.ajaxSuccessNull(ad['clickMonitor']);
4773			},
4774			this.getByElement(imgClassName));
4775			if (ad['time'] > 0) {
4776				setTimeout(function() {
4777					thisTemp.adOtherClose(i);
4778				},
4779				ad['time'] * 1000);
4780			}
4781		},
4782		/*
4783		关闭其它广告
4784		*/
4785		adOtherClose: function(i) {
4786			var ad = this.advertisements['other'][i];
4787			if (!this.isUndefined(ad['close'])) {
4788				if (!ad['close']) {
4789					ad['close'] = true;
4790					this.PD.removeChild(this.getByElement(ad['div']));
4791					this.PD.removeChild(this.getByElement(ad['closeDiv']));
4792				}
4793			}
4794		},
4795		adOtherCloseAll: function() {
4796			if (!this.isUndefined(this.advertisements['other'])) {
4797				var ad = this.advertisements['other'];
4798				for (var i = 0; i < ad.length; i++) {
4799					this.adOtherClose(i);
4800				}
4801			}
4802		},
4803		/*
4804			计算其它广告的坐标
4805		*/
4806		adOtherCoor: function() {
4807			if (!this.isUndefined(this.advertisements['other'])) {
4808				var arr = this.advertisements['other'];
4809				for (var i = 0; i < arr.length; i++) {
4810					var ad = arr[i];
4811					if (!this.isUndefined(ad['close'])) {
4812						if (!ad['close']) {
4813							var coor = this.getPosition(ad);
4814							var x = coor['x'],
4815							y = coor['y'],
4816							cx = x + this.getByElement(ad['div']).offsetWidth - 10,
4817							cy = y - 10;
4818							this.css(this.getByElement(ad['div']), {
4819								left: x + 'px',
4820								top: y + 'px'
4821							});
4822							if (!this.isUndefined(ad['closeDiv'])) {
4823								this.css(this.getByElement(ad['closeDiv']), {
4824									left: cx + 'px',
4825									top: cy + 'px'
4826								});
4827							}
4828						}
4829					}
4830				}
4831			}
4832		},
4833		/*
4834			单独监听中间插入广告
4835		*/
4836		checkAdInsert: function(t) {
4837			if (this.adPlayerPlay) {
4838				return;
4839			}
4840			var adTime = this.advertisements['inserttime'];
4841			var adPlay = this.advertisements['insertPlay'];
4842			var duration = this.getMetaDate()['duration'];
4843			for (var i = adTime.length - 1; i > -1; i--) {
4844				if (t >= adTime[i] && t < duration - 2 && t > 1 && !adPlay[i]) { //如果播放时间大于广告时间而该广告还没有播放,则开始播放
4845					this.adI = 0;
4846					this.adType = 'insert';
4847					this.adMuteInto();
4848					this.adIsVideoTime = true;
4849					this.adPlayStart = true;
4850					this.adVideoPlay = false;
4851					this.videoPause();
4852					this.advertisementsTime();
4853					this.advertisementsPlay();
4854					this.adSkipButtonShow();
4855					adPlay[i] = true;
4856					for (var n = 0; n < i + 1; n++) {
4857						adPlay[n] = true;
4858					}
4859					break;
4860				}
4861			}
4862		},
4863		/*格式化中间插入广告的播放时间*/
4864		formatInserttime: function(duration) {
4865			if (!this.isUndefined(this.advertisements['inserttime'])) {
4866				var arr = this.advertisements['inserttime'];
4867				var newArr = [];
4868				for (var i = 0; i < arr.length; i++) {
4869					if (arr[i].toString().substr( - 1) == '%') {
4870						newArr.push(parseInt(duration * parseInt(arr[i]) * 0.01));
4871					} else {
4872						newArr.push(parseInt(arr[i]));
4873					}
4874				}
4875				this.advertisements['inserttime'] = newArr;
4876			}
4877		},
4878		/*获取当前的广告*/
4879		getNowAdvertisements: function() {
4880			if (this.adI == -1) {
4881				return {
4882					file: '',
4883					time: 0,
4884					link: ''
4885				};
4886			}
4887			return this.advertisements[this.adType][this.adI];
4888		},
4889		/*根据元件尺寸和播放器尺寸调整大小*/
4890		adjustmentWH: function(w, h) {
4891			var width = this.PD.offsetWidth,
4892			height = this.PD.offsetHeight;
4893			var nw = 0,
4894			nh = 0;
4895			if (w >= width || h >= height) {
4896				if (width / w > height / h) {
4897					nh = height - 20;
4898					nw = w * nh / h;
4899				} else {
4900					nw = width - 20;
4901					nh = h * nw / w;
4902				}
4903			} else {
4904				nw = w;
4905				nh = h;
4906			}
4907			return {
4908				width: nw,
4909				height: nh
4910			}
4911		},
4912		/*单独请求一次地址,但不处理返回的数据*/
4913		ajaxSuccessNull: function(url) {
4914			if (!this.isUndefined(url)) {
4915				var ajaxObj = {
4916					url: url,
4917					success: function(data) {}
4918				};
4919				this.ajax(ajaxObj);
4920			}
4921		},
4922		/*
4923			内部函数
4924			运行指定函数
4925		*/
4926		runFunction: function(s) {
4927			try {
4928				var arr = s.split('->');
4929				switch (arr[0]) {
4930				case 'javaScript':
4931					eval(arr[1] + '()');
4932					break;
4933				case 'actionScript':
4934					eval('this.' + arr[1] + '()');
4935					break;
4936				}
4937			} catch(event) {}
4938		},
4939		/*
4940			内部函数
4941			使用画布附加视频
4942		*/
4943		sendVCanvas: function() {
4944			if (this.timerVCanvas == null) {
4945				this.css(this.V, 'display', 'none');
4946				this.css(this.MD, 'display', 'block');
4947				var thisTemp = this;
4948				var videoCanvas = function() {
4949					if (thisTemp.MDCX.width != thisTemp.PD.offsetWidth) {
4950						thisTemp.MDC.width = thisTemp.PD.offsetWidth;
4951					}
4952					if (thisTemp.MDCX.height != thisTemp.PD.offsetHeight) {
4953						thisTemp.MDC.height = thisTemp.PD.offsetHeight;
4954					}
4955					thisTemp.MDCX.clearRect(0, 0, thisTemp.MDCX.width, thisTemp.MDCX.height);
4956					var coor = thisTemp.getProportionCoor(thisTemp.PD.offsetWidth, thisTemp.PD.offsetHeight, thisTemp.V.videoWidth, thisTemp.V.videoHeight);
4957					thisTemp.MDCX.drawImage(thisTemp.V, 0, 0, thisTemp.V.videoWidth, thisTemp.V.videoHeight, coor['x'], coor['y'], coor['width'], coor['height']);
4958				};
4959				this.timerVCanvas = new this.timer(0, videoCanvas);
4960			}
4961		},
4962		/*
4963			内部函数
4964			监听暂停
4965		*/
4966		pauseHandler: function() {
4967			var thisTemp = this;
4968			this.playShow(false);
4969			if (this.animatePauseArray.length > 0) {
4970				this.animatePause('pause');
4971			}
4972			if (this.playerType == 'html5video' && this.V != null && this.config['videoDrawImage']) {
4973				this.stopVCanvas();
4974			}
4975			if (!this.isUndefined(this.advertisements['pause']) && !this.adPlayStart && !this.adPauseShow) { //如果存在暂停广告
4976				setTimeout(function() {
4977					if (!thisTemp.isUndefined(thisTemp.advertisements['pause']) && !thisTemp.adPlayStart && !thisTemp.adPauseShow && thisTemp.time > 1) { //如果存在暂停广告
4978						thisTemp.adPausePlayer();
4979					}
4980				},
4981				300);
4982			}
4983		},
4984		/*
4985			内部函数
4986			停止画布
4987		*/
4988		stopVCanvas: function() {
4989			if (this.timerVCanvas != null) {
4990				this.css(this.V, 'display', 'block');
4991				this.css(this.MD, 'display', 'none');
4992				if (this.timerVCanvas.runing) {
4993					this.timerVCanvas.stop();
4994				}
4995				this.timerVCanvas = null;
4996			}
4997		},
4998		/*
4999			内部函数
5000			根据当前播放还是暂停确认图标显示
5001		*/
5002		playShow: function(b) {
5003			if (!this.showFace) {
5004				return;
5005			}
5006			if (b) {
5007				this.css(this.CB['play'], 'display', 'none');
5008				this.css(this.CB['pauseCenter'], 'display', 'none');
5009				this.css(this.CB['pause'], 'display', 'block');
5010			} else {
5011				this.css(this.CB['play'], 'display', 'block');
5012				if (this.css(this.CB['errorText'], 'display') == 'none') {
5013					if (!this.adPlayerPlay) {
5014						this.css(this.CB['pauseCenter'], 'display', 'block');
5015					}
5016
5017				} else {
5018					this.css(this.CB['pauseCenter'], 'display', 'none');
5019				}
5020				this.css(this.CB['pause'], 'display', 'none');
5021			}
5022		},
5023		/*
5024			内部函数
5025			监听seek结束
5026		*/
5027		seekedHandler: function() {
5028			this.resetTrack();
5029			this.isTimeButtonMove = true;
5030			if (this.V.paused) {
5031				if(this.hlsAutoPlay){
5032					this.videoPlay();
5033				}
5034				else{
5035					this.hlsAutoPlay=true;
5036				}
5037			}
5038		},
5039		/*
5040			内部函数
5041			监听播放结束
5042		*/
5043		endedHandler: function() {
5044			if (this.adPlayerPlay) {
5045				this.adI++;
5046				this.advertisementsPlay();
5047				return;
5048			}
5049			if (!this.endAdPlay && !this.isUndefined(this.advertisements['end'])) {
5050				this.endAdPlay = true;
5051				this.adI = 0;
5052				this.adType = 'end';
5053				this.adMuteInto();
5054				this.adIsVideoTime = true;
5055				this.adPlayStart = true;
5056				this.adVideoPlay = false;
5057				this.videoPause();
5058				this.advertisementsTime();
5059				this.advertisementsPlay();
5060				this.adSkipButtonShow();
5061				this.adReset = true;
5062				return;
5063			}
5064			this.sendJS('ended');
5065			this.endedAdReset();
5066			if (this.vars['loop']) {
5067				this.videoSeek(0);
5068			}
5069		},
5070		/*
5071			重置结束后相关的设置
5072		*/
5073		endedAdReset: function() {
5074			var arr = [];
5075			var i = 0;
5076			if (!this.isUndefined(this.advertisements['insertPlay'])) {
5077				arr = this.advertisements['insertPlay'];
5078				for (i = 0; i < arr.length; i++) {
5079					this.advertisements['insertPlay'][i] = false;
5080				}
5081			}
5082			if (!this.isUndefined(this.advertisements['otherPlay'])) {
5083				arr = this.advertisements['otherPlay'];
5084				for (i = 0; i < arr.length; i++) {
5085					this.advertisements['otherPlay'][i] = false;
5086				}
5087			}
5088			//this.endAdPlay=false;
5089		},
5090		/*
5091			内部函数
5092			监听音量改变
5093		*/
5094		volumechangeHandler: function() {
5095			if (!this.showFace) {
5096				return;
5097			}
5098			if ((this.ckplayerConfig['config']['mobileVolumeBarShow'] || !this.isMobile()) && this.css(this.CB['volume'], 'display') != 'none') {
5099				try {
5100					var volume=this.volume || this.V.volume;
5101					if (volume > 0) {
5102						this.css(this.CB['mute'], 'display', 'block');
5103						this.css(this.CB['escMute'], 'display', 'none');
5104					} else {
5105						this.css(this.CB['mute'], 'display', 'none');
5106						this.css(this.CB['escMute'], 'display', 'block');
5107					}
5108				} catch(event) {}
5109			}
5110		},
5111		/*
5112			内部函数
5113			监听播放时间调节进度条
5114		*/
5115		timeUpdateHandler: function() {
5116			var duration = 0;
5117			if (this.playerType == 'html5video') {
5118				try {
5119					duration = this.V.duration;
5120				} catch(event) {}
5121			}
5122			if (isNaN(duration) || parseInt(duration) < 0.2) {
5123				duration = this.vars['duration'];
5124			}
5125			if(this.vars['forceduration']>0){
5126				duration=this.vars['forceduration'];
5127			}
5128			if (duration > 0) {
5129				this.time = this.V.currentTime;
5130				this.timeTextHandler();
5131				this.trackShowHandler();
5132				if (this.isTimeButtonMove) {
5133					this.timeProgress(this.time, duration);
5134				}
5135			}
5136		},
5137		/*
5138			内部函数
5139			按时间改变进度条
5140		*/
5141		timeProgress: function(time, duration) {
5142			if (!this.showFace) {
5143				return;
5144			}
5145			var timeProgressBgW = this.CB['timeProgressBg'].offsetWidth;
5146			var timeBOW = parseInt((time * timeProgressBgW / duration) - (this.CB['timeButton'].offsetWidth * 0.5));
5147			if (timeBOW > timeProgressBgW - this.CB['timeButton'].offsetWidth) {
5148				timeBOW = timeProgressBgW - this.CB['timeButton'].offsetWidth;
5149			}
5150			if (timeBOW < 0) {
5151				timeBOW = 0;
5152			}
5153			this.css(this.CB['timeProgress'], 'width', timeBOW + 'px');
5154			this.css(this.CB['timeButton'], 'left', parseInt(timeBOW) + 'px');
5155		},
5156		/*
5157			内部函数
5158			监听播放时间改变时间显示文本框
5159		*/
5160		timeTextHandler: function() { //显示时间/总时间
5161			if (!this.showFace) {
5162				return;
5163			}
5164			var duration = this.V.duration;
5165			var time = this.V.currentTime;
5166			if (isNaN(duration) || parseInt(duration) < 0.2) {
5167				duration = this.vars['duration'];
5168			}
5169			if(this.vars['forceduration']>0){
5170				duration=this.vars['forceduration'];
5171			}
5172			this.CB['timeText'].innerHTML = this.formatTime(time) + ' / ' + this.formatTime(duration);
5173			if (this.CB['timeText'].offsetWidth > 0) {
5174				this.buttonWidth['timeText'] = this.CB['timeText'].offsetWidth;
5175			}
5176		},
5177		/*
5178			内部函数
5179			监听是否是缓冲状态
5180		*/
5181		bufferEdHandler: function() {
5182			if (!this.showFace || this.playerType == 'flashplayer') {
5183				return;
5184			}
5185			var thisTemp = this;
5186			var clearTimerBuffer = function() {
5187				if (thisTemp.timerBuffer != null) {
5188					if (thisTemp.timerBuffer.runing) {
5189						thisTemp.sendJS('buffer', 100);
5190						thisTemp.timerBuffer.stop();
5191					}
5192					thisTemp.timerBuffer = null;
5193				}
5194			};
5195			clearTimerBuffer();
5196			var bufferFun = function() {
5197				if (!thisTemp.isUndefined(thisTemp.V) && thisTemp.V.buffered.length > 0) {
5198					var duration = thisTemp.V.duration;
5199					var len = thisTemp.V.buffered.length;
5200					var bufferStart = thisTemp.V.buffered.start(len - 1);
5201					var bufferEnd = thisTemp.V.buffered.end(len - 1);
5202					var loadTime = bufferStart + bufferEnd;
5203					var loadProgressBgW = thisTemp.CB['timeProgressBg'].offsetWidth;
5204					var timeButtonW = thisTemp.CB['timeButton'].offsetWidth;
5205					var loadW = parseInt((loadTime * loadProgressBgW / duration) + timeButtonW);
5206					if (loadW >= loadProgressBgW) {
5207						loadW = loadProgressBgW;
5208						clearTimerBuffer();
5209					}
5210					thisTemp.changeLoad(loadTime);
5211				}
5212			};
5213			this.timerBuffer = new this.timer(200, bufferFun);
5214		},
5215		/*
5216			内部函数
5217			单独计算加载进度
5218		*/
5219		changeLoad: function(loadTime) {
5220			if (this.V == null) {
5221				return;
5222			}
5223			if (!this.showFace) {
5224				return;
5225			}
5226			var loadProgressBgW = this.CB['timeProgressBg'].offsetWidth;
5227			var timeButtonW = this.CB['timeButton'].offsetWidth;
5228			var duration = this.V.duration;
5229			if (isNaN(duration) || parseInt(duration) < 0.2) {
5230				duration = this.vars['duration'];
5231			}
5232			if(this.vars['forceduration']>0){
5233				duration=this.vars['forceduration'];
5234			}
5235			if (this.isUndefined(loadTime)) {
5236				loadTime = this.loadTime;
5237			} else {
5238				this.loadTime = loadTime;
5239			}
5240			var loadW = parseInt((loadTime * loadProgressBgW / duration) + timeButtonW);
5241			this.css(this.CB['loadProgress'], 'width', loadW + 'px');
5242			this.sendJS('loadTime',loadTime);
5243			this.loadTimeTemp=loadTime;
5244		},
5245		/*
5246			内部函数
5247			判断是否是直播
5248		*/
5249		judgeIsLive: function() {
5250			var thisTemp = this;
5251			if (this.timerError != null) {
5252				if (this.timerError.runing) {
5253					this.timerError.stop();
5254				}
5255				this.timerError = null;
5256			}
5257			this.error = false;
5258			if (this.showFace) {
5259				this.css(this.CB['errorText'], 'display', 'none');
5260			}
5261			var timeupdate = function(event) {
5262				thisTemp.timeUpdateHandler();
5263			};
5264			if (!this.vars['live']) {
5265				if (this.V != null && this.playerType == 'html5video') {
5266					this.addListenerInside('timeupdate', timeupdate);
5267					thisTemp.timeTextHandler();
5268					thisTemp.prompt(); //添加提示点
5269					setTimeout(function() {
5270						thisTemp.bufferEdHandler();
5271					},
5272					200);
5273				}
5274			} else {
5275				this.removeListenerInside('timeupdate', timeupdate);
5276				if (this.timerTime != null) {
5277					window.clearInterval(this.timerTime);
5278					timerTime = null;
5279				}
5280				if (this.timerTime != null) {
5281					if (this.timerTime.runing) {
5282						this.timerTime.stop();
5283					}
5284					this.timerTime = null;
5285				}
5286				var timeFun = function() {
5287					if (thisTemp.V != null && !thisTemp.V.paused && thisTemp.showFace) {
5288						thisTemp.CB['timeText'].innerHTML = thisTemp.getNowDate();
5289					}
5290				};
5291				this.timerTime = new this.timer(1000, timeFun);
5292				//timerTime.start();
5293			}
5294			this.definition();
5295		},
5296		/*
5297			内部函数
5298			加载字幕
5299		*/
5300		loadTrack: function(def) {
5301			if (this.playerType == 'flashplayer' || this.vars['flashplayer'] == true) {
5302				return;
5303			}
5304			if(this.isUndefined(def)){
5305				def=-1;
5306			}
5307			var track = this.vars['cktrack'];
5308			var loadTrackUrl='';
5309			var type=this.typeString(track);
5310			var thisTemp = this;
5311			if(type=='array'){
5312				if(def==-1){
5313					var index=0;
5314					var indexN=0;
5315					for(var i=0;i<track.length;i++){
5316						var li=track[i];
5317						if(li.length==3 && li[2]>indexN){
5318							indexN=li[2];
5319							index=i;
5320						}
5321					}
5322				}
5323				else{
5324					index=def;
5325				}
5326				loadTrackUrl=track[index][0];
5327			}
5328			else{
5329				loadTrackUrl=track;
5330			}
5331			var obj = {
5332				method: 'get',
5333				dataType: 'text',
5334				url: loadTrackUrl,
5335				charset: 'utf-8',
5336				success: function(data) {
5337					if(data){
5338						thisTemp.track = thisTemp.parseSrtSubtitles(data);
5339						thisTemp.trackIndex = 0;
5340						thisTemp.nowTrackShow = {
5341							sn: ''
5342						}
5343					}
5344					
5345				}
5346			};
5347			this.ajax(obj);
5348		},
5349		/*
5350			内部函数
5351			重置字幕
5352		*/
5353		resetTrack: function() {
5354			this.trackIndex = 0;
5355			this.nowTrackShow = {
5356				sn: ''
5357			};
5358		},
5359		/*
5360			内部函数
5361			根据时间改变读取显示字幕
5362		*/
5363		trackShowHandler: function() {
5364			if (!this.showFace || this.adPlayerPlay) {
5365				return;
5366			}
5367			if (this.track.length < 1) {
5368				return;
5369			}
5370			if (this.trackIndex >= this.track.length) {
5371				this.trackIndex = 0;
5372			}
5373			var nowTrack = this.track[this.trackIndex]; //当前编号对应的字幕内容
5374			/*
5375				this.nowTrackShow=当前显示在界面上的内容
5376				如果当前时间正好在nowTrack时间内,则需要判断
5377			*/
5378			if (this.time >= nowTrack['startTime'] && this.time <= nowTrack['endTime']) {
5379				/*
5380				 	如果当前显示的内容不等于当前需要显示的内容时,则需要显示正确的内容
5381				*/
5382				var nowShow = this.nowTrackShow;
5383				if (nowShow['sn'] != nowTrack['sn']) {
5384					this.trackHide();
5385					this.trackShow(nowTrack);
5386					this.nowTrackTemp=nowTrack;
5387				}
5388			} else {
5389				/*
5390				 * 如果当前播放时间不在当前编号字幕内,则需要先清空当前的字幕内容,再显示新的字幕内容
5391				 */
5392				this.trackHide();
5393				this.checkTrack();
5394			}
5395		},
5396		trackShowAgain:function(){
5397			this.trackHide();
5398			this.trackShow(this.nowTrackTemp);
5399		},
5400		/*
5401			内部函数
5402			显示字幕内容
5403		*/
5404		trackShow: function(track) {
5405			this.nowTrackShow = track;
5406			var arr = track['content'];
5407			for (var i = 0; i < arr.length; i++) {
5408				var obj = {
5409					list: [{
5410						type: 'text',
5411						text: arr[i],
5412						color: '#FFFFFF',
5413						size: this.trackFontSize,
5414						font: this.fontFamily,
5415						lineHeight: 30
5416					}],
5417					position: [1, 2, null, -(arr.length - i) * 30 - 50]
5418				};
5419				var ele = this.addElement(obj);
5420				this.trackElement.push(ele);
5421			}
5422		},
5423		/*
5424			内部函数
5425			隐藏字字幕内容
5426		*/
5427		trackHide: function() {
5428			for (var i = 0; i < this.trackElement.length; i++) {
5429				this.deleteElement(this.trackElement[i]);
5430			}
5431			this.trackElement = [];
5432		},
5433		/*
5434			内部函数
5435			重新计算字幕的编号
5436		*/
5437		checkTrack: function() {
5438			var num = this.trackIndex;
5439			var arr = this.track;
5440			var i = 0;
5441			for (i = num; i < arr.length; i++) {
5442				if (this.time >= arr[i]['startTime'] && this.time <= arr[i]['endTime']) {
5443					this.trackIndex = i;
5444					break;
5445				}
5446			}
5447		},
5448		/*
5449		-----------------------------------------------------------------------------接口函数开始
5450			接口函数
5451			在播放和暂停之间切换
5452		*/
5453		playOrPause: function() {
5454			if (!this.loaded) {
5455				return;
5456			}
5457			if (this.V == null) {
5458				return;
5459			}
5460			if (this.playerType == 'flashplayer') {
5461				this.V.playOrPause();
5462				return;
5463			}
5464			if (this.V.paused) {
5465				this.videoPlay();
5466			} else {
5467				this.videoPause();
5468			}
5469		},
5470		/*
5471			接口函数
5472			播放动作
5473		*/
5474		videoPlay: function() {
5475			if (!this.loaded) {
5476				return;
5477			}
5478			if (this.playerType == 'flashplayer') {
5479				this.V.videoPlay();
5480				return;
5481			}
5482			if (this.adPlayerPlay) {
5483				this.eliminateAd(); //清除广告
5484				return;
5485			}
5486			try {
5487				if (this.V.currentSrc) {
5488					this.V.play();
5489				}
5490			} catch(event) {}
5491		},
5492		/*
5493			接口函数
5494			暂停动作
5495		*/
5496		videoPause: function() {
5497			if (!this.loaded) {
5498				return;
5499			}
5500			if (this.playerType == 'flashplayer') {
5501				this.V.videoPause();
5502				return;
5503			}
5504			try {
5505				this.V.pause();
5506			} catch(event) {}
5507		},
5508		/*
5509			接口函数
5510			跳转时间动作
5511		*/
5512		videoSeek: function(time) {
5513			if (!this.loaded) {
5514				return;
5515			}
5516			if (this.playerType == 'flashplayer') {
5517				this.V.videoSeek(time);
5518				return;
5519			}
5520			var duration = this.V.duration>0.2?this.V.duration:this.getMetaDate()['duration'];
5521			if (duration > 0 && time > duration) {
5522				if(this.vars['forceduration']>0){
5523					time=0;
5524					this.sendJS('ended');
5525				}
5526				else{
5527					time = duration-0.1;
5528				}
5529			}
5530			if (time >= 0) {
5531				this.V.currentTime = time;
5532				this.sendJS('seekTime', time);
5533			}
5534		},
5535		/*
5536			接口函数
5537			调节音量/获取音量
5538		*/
5539		changeVolume: function(vol, bg, button) {
5540			if (this.loaded) {
5541				if (this.playerType == 'flashplayer') {
5542					this.V.changeVolume(vol);
5543					return;
5544				}
5545			}
5546			if (isNaN(vol) || this.isUndefined(vol)) {
5547				vol = 0;
5548			}
5549			if (!this.loaded) {
5550				this.vars['volume'] = vol;
5551			}
5552			if (!this.html5Video) {
5553				this.V.changeVolume(vol);
5554				return;
5555			}
5556			try {
5557				if (this.isUndefined(bg)) {
5558					bg = true;
5559				}
5560			} catch(e) {}
5561			try {
5562				if (this.isUndefined(button)) {
5563					button = true;
5564				}
5565			} catch(e) {}
5566			if (!vol) {
5567				vol = 0;
5568			}
5569			if (vol < 0) {
5570				vol = 0;
5571			}
5572			if (vol > 1) {
5573				vol = 1;
5574			}
5575			try {
5576				this.V.volume = vol;
5577			} catch(error) {}
5578			this.volume = vol;
5579			if (bg && this.showFace) {
5580				var bgW = vol * this.CB['volumeBg'].offsetWidth;
5581				if (bgW < 0) {
5582					bgW = 0;
5583				}
5584				if (bgW > this.CB['volumeBg'].offsetWidth) {
5585					bgW = this.CB['volumeBg'].offsetWidth;
5586				}
5587				this.css(this.CB['volumeUp'], 'width', bgW + 'px');
5588			}
5589
5590			if (button && this.showFace) {
5591				var buLeft = parseInt(this.CB['volumeUp'].offsetWidth - (this.CB['volumeBO'].offsetWidth * 0.5));
5592				if (buLeft > this.CB['volumeBg'].offsetWidth - this.CB['volumeBO'].offsetWidth) {
5593					buLeft = this.CB['volumeBg'].offsetWidth - this.CB['volumeBO'].offsetWidth
5594				}
5595				if (buLeft < 0) {
5596					buLeft = 0;
5597				}
5598				this.css(this.CB['volumeBO'], 'left', buLeft + 'px');
5599			}
5600		},
5601		/*
5602			接口函数
5603			静音
5604		*/
5605		videoMute: function() {
5606			if (!this.loaded) {
5607				return;
5608			}
5609			if (this.playerType == 'flashplayer') {
5610				this.V.videoMute();
5611				return;
5612			}
5613			this.volumeTemp = this.V ? (this.V.volume > 0 ? this.V.volume: this.vars['volume']) : this.vars['volume'];
5614			this.changeVolume(0);
5615		},
5616		/*
5617			接口函数
5618			取消静音
5619		*/
5620		videoEscMute: function() {
5621			if (!this.loaded) {
5622				return;
5623			}
5624			if (this.playerType == 'flashplayer') {
5625				this.V.videoEscMute();
5626				return;
5627			}
5628			this.changeVolume(this.volumeTemp > 0 ? this.volumeTemp: this.vars['volume']);
5629		},
5630		/*
5631			接口函数
5632			视频广告静音
5633		*/
5634		adMuteFunction: function() {
5635			if (!this.loaded) {
5636				return;
5637			}
5638			this.changeVolume(0);
5639			this.adVideoMute = true;
5640			this.css(this.CB['adEscMute'], 'display', 'block');
5641			this.css(this.CB['adMute'], 'display', 'none');
5642		},
5643		/*
5644			接口函数
5645			视频广告取消静音
5646		*/
5647		adEscMuteFunction: function() {
5648			if (!this.loaded) {
5649				return;
5650			}
5651			var v = this.ckplayerConfig['style']['advertisement']['videoVolume'];
5652			this.changeVolume(v);
5653			this.adMuteInto();
5654		},
5655		/*
5656		 	初始化广告的音量按钮
5657		*/
5658		adMuteInto: function() {
5659			this.adVideoMute = false;
5660			this.css(this.CB['adEscMute'], 'display', 'none');
5661			this.css(this.CB['adMute'], 'display', 'block');
5662		},
5663		/*
5664			接口函数
5665			快退
5666		*/
5667		fastBack: function() {
5668			if (!this.loaded) {
5669				return;
5670			}
5671			if (this.playerType == 'flashplayer') {
5672				this.V.fastBack();
5673				return;
5674			}
5675			var time = this.time - this.ckplayerConfig['config']['timeJump'];
5676			if (time < 0) {
5677				time = 0;
5678			}
5679			this.videoSeek(time);
5680		},
5681		/*
5682			接口函数
5683			快进
5684		*/
5685		fastNext: function() {
5686			if (!this.loaded) {
5687				return;
5688			}
5689			if (this.playerType == 'flashplayer') {
5690				this.V.fastNext();
5691				return;
5692			}
5693			var time = this.time + this.ckplayerConfig['config']['timeJump'];
5694			if (time > this.V.duration) {
5695				time = this.V.duration;
5696			}
5697			this.videoSeek(time);
5698		},
5699		/*
5700			接口函数
5701			获取当前播放的地址
5702		*/
5703		getCurrentSrc: function() {
5704			if (!this.loaded) {
5705				return;
5706			}
5707			if (this.playerType == 'flashplayer') {
5708				return this.V.getCurrentSrc();
5709			}
5710			return this.V.currentSrc;
5711		},
5712		/*
5713			内置函数
5714			全屏/退出全屏动作,该动作只能是用户操作才可以触发,比如用户点击按钮触发该事件
5715		*/
5716		switchFull: function() {
5717			if (this.full) {
5718				this.quitFullScreen();
5719			} else {
5720				this.fullScreen();
5721			}
5722		},
5723		/*
5724			内置函数
5725			全屏动作,该动作只能是用户操作才可以触发,比如用户点击按钮触发该事件
5726		*/
5727		fullScreen: function() {
5728			if (this.html5Video && this.playerType == 'html5video') {
5729				var element = this.PD;
5730				if (element.requestFullscreen) {
5731					element.requestFullscreen();
5732				} else if (element.mozRequestFullScreen) {
5733					element.mozRequestFullScreen();
5734				} else if (element.webkitRequestFullscreen) {
5735					element.webkitRequestFullscreen();
5736				} else if (element.msRequestFullscreen) {
5737					element.msRequestFullscreen();
5738				} else if (element.oRequestFullscreen) {
5739					element.oRequestFullscreen();
5740				}
5741				this.judgeFullScreen();
5742			} else {
5743				//this.V.fullScreen();
5744			}
5745		},
5746		/*
5747			接口函数
5748			退出全屏动作
5749		*/
5750		quitFullScreen: function() {
5751			if (this.html5Video && this.playerType == 'html5video') {
5752				if (document.exitFullscreen) {
5753					document.exitFullscreen();
5754				} else if (document.msExitFullscreen) {
5755					document.msExitFullscreen();
5756				} else if (document.mozCancelFullScreen) {
5757					document.mozCancelFullScreen();
5758				} else if (document.oRequestFullscreen) {
5759					document.oCancelFullScreen();
5760				} else if (document.requestFullscreen) {
5761					document.requestFullscreen();
5762				} else if (document.webkitExitFullscreen) {
5763					document.webkitExitFullscreen();
5764				} else {
5765					this.css(document.documentElement, 'cssText', '');
5766					this.css(document.document.body, 'cssText', '');
5767					this.css(this.PD, 'cssText', '');
5768				}
5769				this.judgeFullScreen();
5770			}
5771		},
5772		/*
5773		 下面列出只有flashplayer里支持的 
5774		 */
5775		videoRotation: function(n) {
5776			if (!this.loaded) {
5777				return;
5778			}
5779			if (this.playerType == 'flashplayer') {
5780				this.V.videoRotation(n);
5781				return;
5782			}
5783			if (this.isUndefined(n)) {
5784				n = 0;
5785			}
5786			var tf = this.css(this.V, 'transform');
5787			if (this.isUndefined(tf) && !tf) {
5788				tf = 'rotate(0deg)';
5789			}
5790			var reg = tf.match(/rotate\([^)]+\)/);
5791			reg = reg ? reg[0].replace('rotate(', '').replace('deg)', '') : '';
5792			if (reg == '') {
5793				reg = 0;
5794			} else {
5795				reg = parseInt(reg);
5796			}
5797			if (n == -1) {
5798				reg -= 90;
5799			} else if (n == 1) {
5800				reg += 90;
5801			} else {
5802				if (n != 90 && n != 180 && n != 270 && n != -90 && n != -180 && n != -270) {
5803					reg = 0;
5804				} else {
5805					reg = n;
5806				}
5807			}
5808			n = reg;
5809			var y90 = n % 90,
5810			y180 = n % 180,
5811			y270 = n % 270;
5812			var ys = false;
5813			if (y90 == 0 && y180 == 90 && y270 == 90) {
5814				ys = true;
5815			}
5816			if (y90 == 0 && y180 == 90 && y270 == 0) {
5817				ys = true;
5818			}
5819			if (y90 == -0 && y180 == -90 && y270 == -90) {
5820				ys = true;
5821			}
5822			if (y90 == -0 && y180 == -90 && y270 == -0) {
5823				ys = true;
5824			}
5825			tf = tf.replace(/rotate\([^)]+\)/, '').replace(/scale\([^)]+\)/, '') + ' rotate(' + n + 'deg)';
5826			var cdW = this.CD.offsetWidth,
5827			cdH = this.CD.offsetHeight,
5828			vW = this.V.videoWidth,
5829			vH = this.V.videoHeight;
5830			if (vW > 0 && vH > 0) {
5831				if (ys) {
5832					if (cdW / cdH > vH / vW) {
5833						nH = cdH;
5834						nW = vH * nH / vW;
5835					} else {
5836						nW = cdW;
5837						nH = vW * nW / vH;
5838					}
5839					this.css(this.V, 'transform', 'rotate(0deg)');
5840					this.css(this.V, 'transform', 'scale(' + nH / cdW + ',' + nW / cdH + ')' + tf);
5841				} else {
5842					this.css(this.V, 'transform', tf);
5843				}
5844			} else {
5845				this.css(this.V, 'transform', tf);
5846			}
5847			return;
5848		},
5849		videoBrightness: function(n) {
5850			if (!this.loaded) {
5851				return;
5852			}
5853			if (this.playerType == 'flashplayer') {
5854				this.V.videoBrightness(n);
5855				return;
5856			}
5857		},
5858		videoContrast: function(n) {
5859			if (!this.loaded) {
5860				return;
5861			}
5862			if (this.playerType == 'flashplayer') {
5863				this.V.videoContrast(n);
5864				return;
5865			}
5866		},
5867		videoSaturation: function(n) {
5868			if (!this.loaded) {
5869				return;
5870			}
5871			if (this.playerType == 'flashplayer') {
5872				this.V.videoSaturation(n);
5873				return;
5874			}
5875		},
5876		videoHue: function(n) {
5877			if (!this.loaded) {
5878				return;
5879			}
5880			if (this.playerType == 'flashplayer') {
5881				this.V.videoHue(n);
5882				return;
5883			}
5884		},
5885		videoZoom: function(n) {
5886			if (!this.loaded) {
5887				return;
5888			}
5889			if (this.playerType == 'flashplayer') {
5890				this.V.videoZoom(n);
5891				return;
5892			}
5893			if (this.isUndefined(n)) {
5894				n = 1;
5895			}
5896			if (n < 0) {
5897				n = 0;
5898			}
5899			if (n > 2) {
5900				n = 2;
5901			}
5902			var tf = this.css(this.V, 'transform');
5903			tf = tf.replace(/scale\([^)]+\)/, '') + ' scale(' + n + ')';
5904			this.videoScale = n;
5905			this.css(this.V, 'transform', tf);
5906			return;
5907		},
5908		videoProportion: function(w, h) {
5909			if (!this.loaded) {
5910				return;
5911			}
5912			if (this.playerType == 'flashplayer') {
5913				this.V.videoProportion(w, h);
5914				return;
5915			}
5916		},
5917		adPlay: function() {
5918			if (!this.loaded) {
5919				return;
5920			}
5921			if (this.playerType == 'flashplayer') {
5922				this.V.adPlay();
5923				return;
5924			}
5925			if (this.adPlayerPlay) {
5926				this.adIsPause = false;
5927				var ad = this.getNowAdvertisements();
5928				var type = ad['type'];
5929				if (this.isStrImage(type)) {
5930					this.adCountDown();
5931				} else {
5932					this.V.play();
5933				}
5934			}
5935		},
5936		adPause: function() {
5937			if (!this.loaded) {
5938				return;
5939			}
5940			if (this.playerType == 'flashplayer') {
5941				this.V.adPause();
5942				return;
5943			}
5944			if (this.adPlayerPlay) {
5945				this.adIsPause = true;
5946				var ad = this.getNowAdvertisements();
5947				var type = ad['type'];
5948				if (type != 'jpg' && type != 'jpeg' && type != 'png' && type != 'svg' && type != 'gif') {
5949					this.videoPause();
5950				}
5951			}
5952		},
5953		videoError: function(n) {
5954			if (!this.loaded) {
5955				return;
5956			}
5957			if (this.playerType == 'flashplayer') {
5958				this.V.videoError(n);
5959				return;
5960			}
5961		},
5962		changeConfig: function() {
5963			if (!this.loaded) {
5964				return;
5965			}
5966			if (this.playerType == 'flashplayer') {
5967				var args = Array.prototype.slice.call(arguments);
5968				switch(args.length){
5969					case 1:
5970						this.V.changeConfig(args[0]);
5971						break;
5972					case 2:
5973						this.V.changeConfig(args[0],args[1]);
5974						break;
5975					case 3:
5976						this.V.changeConfig(args[0],args[1],args[2]);
5977						break;
5978					case 4:
5979						this.V.changeConfig(args[0],args[1],args[2],args[3]);
5980						break;
5981					case 5:
5982						this.V.changeConfig(args[0],args[1],args[2],args[3],args[4]);
5983						break;
5984					case 6:
5985						this.V.changeConfig(args[0],args[1],args[2],args[3],args[4],args[5]);
5986						break;
5987					case 7:
5988						this.V.changeConfig(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);
5989						break;
5990					case 8:
5991						this.V.changeConfig(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
5992						break;
5993					case 8:
5994						this.V.changeConfig(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);
5995						break;
5996				}
5997				return;
5998			}
5999			var obj = this.ckplayerConfig;
6000			var arg = arguments;
6001			for (var i = 0; i < arg.length - 1; i++) {
6002				if (obj.hasOwnProperty(arg[i])) {
6003					obj = obj[arg[i]];
6004				} else {
6005					return;
6006				}
6007			}
6008			var val = arg[arg.length - 1];
6009			switch (arg.length) {
6010			case 2:
6011				this.ckplayerConfig[arg[0]] = val;
6012				break;
6013			case 3:
6014				this.ckplayerConfig[arg[0]][arg[1]] = val;
6015				break;
6016			case 4:
6017				this.ckplayerConfig[arg[0]][arg[1]][arg[2]] = val;
6018				break;
6019			case 5:
6020				this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]] = val;
6021				break;
6022			case 6:
6023				this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]] = val;
6024				break;
6025			case 7:
6026				this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]] = val;
6027				break;
6028			case 8:
6029				this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]][arg[6]] = val;
6030				break;
6031			case 9:
6032				this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]][arg[6]][arg[7]] = val;
6033				break;
6034			case 10:
6035				this.ckplayerConfig[arg[0]][arg[1]][arg[2]][arg[3]][arg[4]][arg[5]][arg[6]][arg[7]][arg[8]] = val;
6036				break;
6037			default:
6038				return;
6039				break;
6040			}
6041			this.sendJS('configChange', this.ckplayerConfig);
6042		},
6043		custom: function() {
6044			if (!this.loaded) {
6045				return;
6046			}
6047			if (this.playerType == 'flashplayer') {
6048				this.V.custom(arguments);
6049				return;
6050			}
6051		},
6052		getConfig: function() {
6053			if (!this.loaded) {
6054				return null;
6055			}
6056			if (this.playerType == 'flashplayer') {
6057				return this.V.getConfig(arguments);
6058			}
6059			else{
6060				var temp=this.ckplayerConfig;
6061				for(var index in arguments) {  
6062			        try{
6063			        	temp=temp[arguments[index]];
6064			        }
6065			        catch(error){
6066			        	temp=null;
6067			        }
6068			    }; 
6069				return temp;
6070			}
6071		},
6072		openUrl: function(n) {
6073			if (!this.loaded) {
6074				return;
6075			}
6076			if (this.playerType == 'flashplayer') {
6077				this.V.openUrl(n);
6078				return;
6079			}
6080		},
6081		/*
6082			接口函数
6083			清除视频
6084		*/
6085		videoClear: function() {
6086			if (!this.loaded) {
6087				return;
6088			}
6089			if (this.playerType == 'flashplayer') {
6090				this.V.videoClear();
6091				return;
6092			}
6093		},
6094		/*
6095			接口函数
6096			向播放器传递新的视频地址
6097		*/
6098		newVideo: function(c) {
6099			if (this.playerType == 'flashplayer') {
6100				this.V.newVideo(c);
6101				return;
6102			} else {
6103				this.embed(c);
6104			}
6105		},
6106		/*
6107			接口函数
6108			截图
6109		*/
6110		screenshot: function(obj, save, name) {
6111			if (!this.loaded) {
6112				return;
6113			}
6114			if (this.playerType == 'flashplayer') {
6115				try {
6116					this.V.screenshot(obj, save, name);
6117				} catch(error) {
6118					this.log(error);
6119				}
6120				return;
6121			}
6122			if (obj == 'video') {
6123				var newCanvas = document.createElement('canvas');
6124				newCanvas.width = this.V.videoWidth;
6125				newCanvas.height = this.V.videoHeight;
6126				newCanvas.getContext('2d').drawImage(this.V, 0, 0, this.V.videoWidth, this.V.videoHeight);
6127				try {
6128					var base64 = newCanvas.toDataURL('image/jpeg');
6129					this.sendJS('screenshot', {
6130						object: obj,
6131						save: save,
6132						name: name,
6133						base64: base64
6134					});
6135				} catch(error) {
6136					this.log(error);
6137				}
6138			}
6139		},
6140		/*
6141			接口函数
6142			改变播放器尺寸
6143		*/
6144		changeSize: function(w, h) {
6145			if (this.isUndefined(w)) {
6146				w = 0;
6147			}
6148			if (this.isUndefined(h)) {
6149				h = 0;
6150			}
6151			if (w > 0) {
6152				this.css(this.CD, 'width', w + 'px');
6153			}
6154			if (h > 0) {
6155				this.css(this.CD, 'height', h + 'px');
6156			}
6157			if (this.html5Video) {
6158				this.elementCoordinate();
6159			}
6160		},
6161		/*
6162			接口函数
6163			改变视频播放速度
6164		*/
6165		changePlaybackRate: function(n) {
6166			if (this.html5Video) {
6167				var arr = this.playbackRateArr;
6168				n = parseInt(n);
6169				if (n < arr.length) {
6170					this.newPlaybackrate(arr[n][1]);
6171				}
6172			}
6173		},
6174		/*
6175			内部函数
6176			注册控制控制栏显示与隐藏函数
6177		*/
6178		changeControlBarShow: function(show) {
6179			if (!this.loaded) {
6180				return;
6181			}
6182			if (this.playerType == 'flashplayer') {
6183				this.V.changeControlBarShow(show);
6184				return;
6185			}
6186			if (show) {
6187				this.controlBarIsShow = true;
6188				this.controlBarHide(false);
6189			} else {
6190				this.controlBarIsShow = false;
6191				this.controlBarHide(true);
6192			}
6193		},
6194		/*
6195			-----------------------------------------------------------------------
6196			调用flashplayer
6197		*/
6198		embedSWF: function() {
6199			var vid = this.randomString();
6200			var flashvars = this.getFlashVars();
6201			var param = this.getFlashplayerParam();
6202			var flashplayerUrl = 'http://www.macromedia.com/go/getflashplayer';
6203			var html = '',
6204			src = javascriptPath + 'ckplayer.swf';
6205			id = 'id="' + vid + '" name="' + vid + '" ';
6206			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" wmode="transparent">';
6207			html += param['v'];
6208			html += '<param name="movie" value="' + src + '">';
6209			html += '<param name="flashvars" value="' + flashvars + '">';
6210			html += '<param name="wmode" value="transparent">';
6211			html += '<embed wmode="transparent" ' + param['w'] + ' src="' + src + '" flashvars="' + flashvars + '" width="100%" height="100%" ' + id + ' align="middle" type="application/x-shockwave-flash" pluginspage="' + flashplayerUrl + '" />';
6212			html += '</object>';
6213			this.PD.innerHTML = html;
6214			this.V = this.getObjectById(vid); //V:定义播放器对象全局变量
6215			this.playerType = 'flashplayer';
6216			//if(!this.checkShockwaveFlash()){
6217				//this.PD.innerHTML = '<p>'+this.language['noLoadShockwaveFlash']+'</p><p><a href="https://www.flash.cn/" target="_blank" style="color:#FFFFFF">'+this.language['downLoadShockwaveFlash']+'</a></p>';
6218				//this.css(this.PD,{color:'#FFFFFF',textAlign:'center',paddingTop:'40px'});
6219			//}
6220		},
6221		/*
6222			判断浏览器是否支持flashplayer 
6223		*/
6224		checkShockwaveFlash:function(){
6225			if(window.ActiveXObject) {
6226				try {
6227					var s = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
6228					if(s) {
6229						return true;
6230					}
6231				} catch(e) {}
6232			} else {
6233				try {
6234					var s = navigator.plugins['Shockwave Flash'];
6235					if(s) {
6236						return true;
6237					}
6238				} catch(e) {}
6239			}
6240			return false;
6241		},
6242		/*
6243			内置函数
6244			将vars对象转换成字符
6245		*/
6246		getFlashVars: function() {
6247			this.getVarsObject();
6248			var v = this.vars;
6249			var z = '';
6250			for (k in v) {
6251				if (k != 'flashplayer' && k != 'container' && v[k] != '') {
6252					if (z != '') {
6253						z += '&';
6254					}
6255					var vk = v[k];
6256					if (vk == true) {
6257						vk = 1;
6258					}
6259					if (vk == false) {
6260						vk = 0;
6261					}
6262					z += k + '=' + vk;
6263				}
6264
6265			}
6266			if (!v.hasOwnProperty('volume') || !v['volume']) {
6267				if (z != '') {
6268					z += '&';
6269				}
6270				z += 'volume=0';
6271			}
6272			return z;
6273		},
6274		/*判断字符串是否是图片*/
6275		isStrImage: function(s) {
6276			if (s == 'jpg' || s == 'jpeg' || s == 'png' || s == 'svg' || s == 'gif') {
6277				return true;
6278			}
6279			return false;
6280		},
6281		/*
6282			内置函数
6283			将vars格式化成flash能接受的对象。再由getFlashVars函数转化成字符串或由newVideo直接使用
6284		*/
6285		getVarsObject: function() {
6286			var v = this.vars;
6287			var f = '',
6288			d = '',
6289			w = ''; //f=视频地址,d=清晰度地址,w=权重,z=最终地址
6290			var arr = this.VA;
6291			var prompt = v['promptSpot'];
6292			var i = 0;
6293			var video = this.vars['video'];
6294			if (typeof(video) == 'object') { //对象或数组
6295				if (!this.isUndefined(typeof(video.length))) { //说明是数组
6296					var arr = video;
6297					for (i = 0; i < arr.length; i++) {
6298						var arr2 = arr[i];
6299						if (arr2) {
6300							if (f != '') {
6301								f += this.ckplayerConfig['config']['split'];
6302								d += ',';
6303								w += ',';
6304								v['type'] += this.ckplayerConfig['config']['split'];
6305							}
6306							f += encodeURIComponent(decodeURIComponent(arr2[0]));
6307							d += arr2[2];
6308							w += arr2[3];
6309							v['type'] += arr2[1].replace('video/', '');
6310						}
6311					}
6312				} else {
6313					f = encodeURIComponent(decodeURIComponent(video['file']));
6314					if (!this.isUndefined(video['type'])) {
6315						v['type'] = video['type'];
6316					}
6317					d = '';
6318					w = '';
6319				}
6320			} else {
6321				f = encodeURIComponent(decodeURIComponent(video));
6322			}
6323			if (v['preview'] != null) {
6324				v['previewscale'] = v['preview']['scale'];
6325				v['preview'] = v['preview']['file'].join(',');
6326
6327			}
6328			if (prompt != null) {
6329				v['promptspot'] = '';
6330				v['promptspottime'] = '';
6331				for (i = 0; i < prompt.length; i++) {
6332					if (v['promptspot'] != '') {
6333						v['promptspot'] += ',';
6334						v['promptspottime'] += ',';
6335					}
6336					v['promptspot'] += prompt[i]['words'];
6337					v['promptspottime'] += prompt[i]['time'];
6338				}
6339
6340			}
6341			if (f != '') {
6342				v['video'] = f;
6343				v['definition'] = d;
6344				v['weight'] = w;
6345			}
6346			if (!v['volume']) {
6347				v['volume'] = 0;
6348			}
6349			var newV = {};
6350
6351			for (var k in v) {
6352				if (v[k] != null) {
6353					newV[k] = v[k];
6354				}
6355				if (k == 'type') {
6356					newV[k] = v[k].replace('video/m3u8', 'm3u8');
6357				}
6358			}
6359
6360			this.vars = newV;
6361		},
6362		/*
6363			内置函数
6364			将embedSWF里的param的对象进行转换
6365		*/
6366		getFlashplayerParam: function() {
6367			var w = '',
6368			v = '',
6369			o = {
6370				allowScriptAccess: 'always',
6371				allowFullScreen: true,
6372				quality: 'high',
6373				bgcolor: '#000'
6374			};
6375			for (var e in o) {
6376				w += e + '="' + o[e] + '" ';
6377				v += '<param name="' + e + '" value="' + o[e] + '" />';
6378			}
6379			w = w.replace('movie=', 'src=');
6380			return {
6381				w: w,
6382				v: v
6383			};
6384		},
6385
6386		/*
6387			操作动作结束
6388			-----------------------------------------------------------------------
6389			
6390			接口函数
6391			获取元数据部分
6392		*/
6393		getMetaDate: function() {
6394			if (!this.loaded || this.V == null) {
6395				return false;
6396			}
6397			if (this.playerType == 'html5video') {
6398				var duration = 0;
6399				try {
6400					duration = !isNaN(this.V.duration) ? this.V.duration: 0;
6401					if (isNaN(duration) || parseInt(duration) < 0.2) {
6402						if(this.vars['duration']>0){
6403							duration=this.vars['duration'];
6404						}
6405					}
6406					if(this.vars['forceduration']>0){
6407						duration=this.vars['forceduration'];
6408					}
6409				} catch(event) {
6410					this.log(event);
6411				}
6412				var data = {
6413					duration: duration,
6414					volume: this.V.volume,
6415					playbackRate: this.V.playbackRate,
6416					width: this.PD.offsetWidth || this.V.offsetWidth || this.V.width,
6417					height: this.PD.offsetHeight || this.V.offsetHeight || this.V.height,
6418					streamWidth: this.V.videoWidth,
6419					streamHeight: this.V.videoHeight,
6420					videoWidth: this.V.offsetWidth,
6421					videoHeight: this.V.offsetHeight,
6422					paused: this.V.paused,
6423					loadTime:this.loadTimeTemp
6424				};
6425				return data;
6426			} else {
6427				try {
6428					return this.V.getMetaDate();
6429				} catch(event) {
6430					this.log(event);
6431				}
6432			}
6433			return false;
6434		},
6435		/*
6436			接口函数
6437			取当前提供给播放器播放的视频列表
6438		*/
6439		getVideoUrl: function() {
6440			if (this.playerType == 'flashplayer') {
6441				return this.V.getVideoUrl();
6442			}
6443			var arr = [];
6444			if (this.V.src) {
6445				arr.push(this.V.src);
6446			} else {
6447				var uArr = this.V.childNodes;
6448				for (var i = 0; i < uArr.length; i++) {
6449					arr.push(uArr[i].src);
6450				}
6451			}
6452			return arr;
6453		},
6454		/*
6455			内置函数
6456			格式化函数
6457		*/
6458		clickEvent: function(call) {
6459			if (call == 'none' || call == '' || call == null) {
6460				return {
6461					type: 'none'
6462				};
6463			}
6464			var callArr = call.split('->');
6465			var type = '',
6466			fun = '',
6467			link = '',
6468			target = '';
6469			if (callArr.length == 2) {
6470				var callM = callArr[0];
6471				var callE = callArr[1];
6472				if (!callE) {
6473					return {
6474						type: 'none'
6475					};
6476				}
6477				var val = '';
6478				var eArr = [];
6479				type = callM;
6480				switch (callM) {
6481				case 'actionScript':
6482					//trace(THIS.hasOwnProperty(callE));
6483					if (callE.indexOf('(') > -1) {
6484						eArr = callE.split('(');
6485						callE = eArr[0];
6486						val = eArr[1].replace(')', '');
6487					}
6488					if (val == '') {
6489						fun = 'thisTemp.' + callE + '()';
6490					} else {
6491						fun = 'thisTemp.' + callE + '(' + val + ')';
6492					}
6493					break;
6494				case 'javaScript':
6495					if (callE.substr(0, 11) == '[flashvars]') {
6496						callE = callE.substr(11);
6497						if (this.vars.hasOwnProperty(callE)) {
6498							callE = this.vars[callE];
6499						} else {
6500							break;
6501						}
6502
6503					}
6504					if (callE.indexOf('(') > -1) {
6505						eArr = callE.split('(');
6506						callE = eArr[0];
6507						val = eArr[1].replace(')', '');
6508					}
6509					if (val == '') {
6510						fun = callE + '()';
6511					} else {
6512						fun = callE + '(' + val + ')';
6513					}
6514					break;
6515				case "link":
6516					var callLink = (callE + ',').split(',');
6517					if (callLink[0].substr(0, 11) == '[flashvars]') {
6518						var fl = callLink[0].replace('[flashvars]', '');
6519						if (this.vars.hasOwnProperty(fl)) {
6520							callLink[0] = this.vars[fl];
6521						} else {
6522							break;
6523						}
6524					}
6525					if (!callLink[1]) {
6526						callLink[1] = '_blank';
6527					}
6528					link = callLink[0];
6529					target = callLink[1];
6530					break;
6531				}
6532			}
6533			return {
6534				type: type,
6535				fun: fun,
6536				link: link,
6537				target: target
6538			}
6539		},
6540		/*
6541			内置函数
6542			根据指定的align,valign,offsetX,offsetY计算坐标
6543		*/
6544		getPosition: function(obj) {
6545			/*
6546			{
6547	            "align": "right",
6548	            "vAlign": "right",
6549	            "offsetX": -60,
6550	            "offsetY": -60
6551	        } 
6552			*/
6553			var pw = this.PD.offsetWidth,
6554			ph = this.PD.offsetHeight;
6555			var x = 0,
6556			y = 0;
6557			switch (obj['align']) {
6558			case 'left':
6559				x = obj['offsetX'];
6560				break;
6561			case 'center':
6562				x = pw * 0.5 + obj['offsetX'];
6563				break;
6564			case 'right':
6565				x = pw + obj['offsetX'];
6566				break;
6567			}
6568			switch (obj['vAlign']) {
6569			case 'top':
6570				y = obj['offsetY'];
6571				break;
6572			case 'middle':
6573				y = ph * 0.5 + obj['offsetY'];
6574				break;
6575			case 'bottom':
6576				y = ph + obj['offsetY'];
6577				break;
6578			}
6579			return {
6580				x: x,
6581				y: y
6582			};
6583		},
6584		/*
6585			内置函数
6586			向播放器界面添加一个文本
6587		*/
6588		addElement: function(attribute) {
6589			var thisTemp = this;
6590			if (this.playerType == 'flashplayer') {
6591				return this.V.addElement(attribute);
6592			}
6593			var i = 0;
6594			var obj = {
6595				list: null,
6596				x: '100%',
6597				y: "50%",
6598				position: null,
6599				alpha: 1,
6600				backgroundColor: '',
6601				backAlpha: 1,
6602				backRadius: 0,
6603				clickEvent: ''
6604			};
6605			obj = this.standardization(obj, attribute);
6606			var list = obj['list'];
6607			if (list == null) {
6608				return '';
6609			}
6610			var id = 'element' + this.randomString(10);
6611			var ele = document.createElement('div');
6612			ele.className = id;
6613			if (obj['x']) {
6614				ele.setAttribute('data-x', obj['x']);
6615			}
6616			if (obj['y']) {
6617				ele.setAttribute('data-y', obj['y']);
6618			}
6619			if (obj['position'] != null) {
6620				ele.setAttribute('data-position', obj['position'].join(','));
6621			}
6622
6623			this.PD.appendChild(ele);
6624			var eid = this.getByElement(id);
6625			this.css(eid, {
6626				position: 'absolute',
6627				filter: 'alpha(opacity:' + obj['alpha'] + ')',
6628				opacity: obj['alpha'].toString(),
6629				width: '800px',
6630				zIndex: '20'
6631			});
6632			var bgid = 'elementbg' + this.randomString(10);
6633			var bgAlpha = obj['alpha'].toString();
6634			var bgColor = obj['backgroundColor'].replace('0x', '#');
6635			var html = '';
6636			var idArr = [];
6637			var clickArr = [];
6638			if (!this.isUndefined(list) && list.length > 0) {
6639				var textObj, returnObj, clickEvent;
6640				for (i = 0; i < list.length; i++) {
6641					var newEleid = 'elementnew' + this.randomString(10);
6642					switch (list[i]['type']) {
6643					case 'image':
6644					case 'png':
6645					case 'jpg':
6646					case 'jpeg':
6647					case 'gif':
6648						textObj = {
6649							type: 'image',
6650							file: '',
6651							radius: 0,
6652							//圆角弧度
6653							width: 30,
6654							//定义宽,必需要定义
6655							height: 30,
6656							//定义高,必需要定义
6657							alpha: 1,
6658							//透明度
6659							paddingLeft: 0,
6660							//左边距离
6661							paddingRight: 0,
6662							//右边距离
6663							paddingTop: 0,
6664							paddingBottom: 0,
6665							marginLeft: 0,
6666							marginRight: 0,
6667							marginTop: 0,
6668							marginBottom: 0,
6669							backgroundColor: '',
6670							clickEvent: ''
6671						};
6672
6673						list[i] = this.standardization(textObj, list[i]);
6674						clickEvent = this.clickEvent(list[i]['clickEvent']);
6675						clickArr.push(clickEvent);
6676						if (clickEvent['type'] == 'link') {
6677							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>';
6678						} else {
6679							html += '<div class="' + newEleid + '" data-i="' + i + '"><img class="' + newEleid + '_image" src="' + list[i]['file'] + '" style="border:0;"></div>';
6680						}
6681						break;
6682					case 'text':
6683						textObj = {
6684							type: 'text',
6685							//说明是文本
6686							text: '',
6687							//文本内容
6688							color: '0xFFFFFF',
6689							size: 14,
6690							font: this.fontFamily,
6691							leading: 0,
6692							alpha: 1,
6693							//透明度
6694							paddingLeft: 0,
6695							//左边距离
6696							paddingRight: 0,
6697							//右边距离
6698							paddingTop: 0,
6699							paddingBottom: 0,
6700							marginLeft: 0,
6701							marginRight: 0,
6702							marginTop: 0,
6703							marginBottom: 0,
6704							backgroundColor: '',
6705							backAlpha: 1,
6706							backRadius: 0,
6707							//背景圆角弧度,支持数字统一设置,也支持分开设置[30,20,20,50],对应上左,上右,下右,下左
6708							clickEvent: ''
6709						};
6710						list[i] = this.standardization(textObj, list[i]);
6711						clickEvent = this.clickEvent(list[i]['clickEvent']);
6712						clickArr.push(clickEvent);
6713						if (clickEvent['type'] == 'link') {
6714							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>';
6715						} else {
6716							html += '<div  class="' + newEleid + '" data-i="' + i + '"><div class="' + newEleid + '_bg"></div><div class="' + newEleid + '_text">' + list[i]['text'] + '</div></div>';
6717						}
6718						break;
6719					default:
6720						break;
6721					}
6722					idArr.push(newEleid);
6723				}
6724			}
6725			var objClickEvent = this.clickEvent(obj['clickEvent']);
6726			/*if(objClickEvent['type']=='link'){
6727				html = '<a href="'+objClickEvent['link']+'" target="'+objClickEvent['target']+'">' + html + '</a>';
6728			}*/
6729			eid.innerHTML = '<div class="' + bgid + '"></div><div class="' + bgid + '_c">' + html + '</div>';
6730			if (objClickEvent['type'] == 'javaScript' || objClickEvent['type'] == 'actionScript') {
6731				var objClickHandler = function() {
6732					eval(objClickEvent['fun']);
6733					thisTemp.sendJS('clickEvent', clk['type'] + '->' + clk['fun'].replace('thisTemp.', '').replace('()', ''));
6734				};
6735				this.addListenerInside('click', objClickHandler, this.getByElement(bgid + '_c'))
6736			}
6737			this.css(bgid + '_c', {
6738				position: 'absolute',
6739				zIndex: '2'
6740			});
6741			for (i = 0; i < idArr.length; i++) {
6742				var clk = clickArr[i];
6743
6744				if (clk['type'] == 'javaScript' || clk['type'] == 'actionScript') {
6745					var clickHandler = function() {
6746						clk = clickArr[this.getAttribute('data-i')];
6747						eval(clk['fun']);
6748						thisTemp.sendJS('clickEvent', clk['type'] + '->' + clk['fun'].replace('thisTemp.', '').replace('()', ''));
6749					};
6750					this.addListenerInside('click', clickHandler, this.getByElement(idArr[i]))
6751				}
6752				switch (list[i]['type']) {
6753				case 'image':
6754				case 'png':
6755				case 'jpg':
6756				case 'jpeg':
6757				case 'gif':
6758					this.css(idArr[i], {
6759						float: 'left',
6760						width: list[i]['width'] + 'px',
6761						height: list[i]['height'] + 'px',
6762						filter: 'alpha(opacity:' + list[i]['alpha'] + ')',
6763						opacity: list[i]['alpha'].toString(),
6764						marginLeft: list[i]['marginLeft'] + 'px',
6765						marginRight: list[i]['marginRight'] + 'px',
6766						marginTop: list[i]['marginTop'] + 'px',
6767						marginBottom: list[i]['marginBottom'] + 'px',
6768						borderRadius: list[i]['radius'] + 'px',
6769						cursor: 'pointer'
6770					});
6771					this.css(idArr[i] + '_image', {
6772						width: list[i]['width'] + 'px',
6773						height: list[i]['height'] + 'px',
6774						borderRadius: list[i]['radius'] + 'px'
6775					});
6776					break;
6777				case 'text':
6778					this.css(idArr[i] + '_text', {
6779						filter: 'alpha(opacity:' + list[i]['alpha'] + ')',
6780						opacity: list[i]['alpha'].toString(),
6781						borderRadius: list[i]['radius'] + 'px',
6782						fontFamily: list[i]['font'],
6783						fontSize: list[i]['size'] + 'px',
6784						color: list[i]['color'].replace('0x', '#'),
6785						lineHeight: list[i]['leading'] > 0 ? list[i]['leading'] + 'px': '',
6786						paddingLeft: list[i]['paddingLeft'] + 'px',
6787						paddingRight: list[i]['paddingRight'] + 'px',
6788						paddingTop: list[i]['paddingTop'] + 'px',
6789						paddingBottom: list[i]['paddingBottom'] + 'px',
6790						whiteSpace: 'nowrap',
6791						position: 'absolute',
6792						zIndex: '3',
6793						cursor: 'pointer'
6794					});
6795					this.css(idArr[i], {
6796						float: 'left',
6797						width: this.getByElement(idArr[i] + '_text').offsetWidth + 'px',
6798						height: this.getByElement(idArr[i] + '_text').offsetHeight + 'px',
6799						marginLeft: list[i]['marginLeft'] + 'px',
6800						marginRight: list[i]['marginRight'] + 'px',
6801						marginTop: list[i]['marginTop'] + 'px',
6802						marginBottom: list[i]['marginBottom'] + 'px'
6803					});
6804					this.css(idArr[i] + '_bg', {
6805						width: this.getByElement(idArr[i] + '_text').offsetWidth + 'px',
6806						height: this.getByElement(idArr[i] + '_text').offsetHeight + 'px',
6807						filter: 'alpha(opacity:' + list[i]['backAlpha'] + ')',
6808						opacity: list[i]['backAlpha'].toString(),
6809						borderRadius: list[i]['backRadius'] + 'px',
6810						backgroundColor: list[i]['backgroundColor'].replace('0x', '#'),
6811						position: 'absolute',
6812						zIndex: '2'
6813					});
6814					break;
6815				default:
6816					break;
6817				}
6818			}
6819			this.css(bgid, {
6820				width: this.getByElement(bgid + '_c').offsetWidth + 'px',
6821				height: this.getByElement(bgid + '_c').offsetHeight + 'px',
6822				position: 'absolute',
6823				filter: 'alpha(opacity:' + bgAlpha + ')',
6824				opacity: bgAlpha,
6825				backgroundColor: bgColor.replace('0x', '#'),
6826				borderRadius: obj['backRadius'] + 'px',
6827				zIndex: '1'
6828			});
6829			this.css(eid, {
6830				width: this.getByElement(bgid).offsetWidth + 'px',
6831				height: this.getByElement(bgid).offsetHeight + 'px'
6832			});
6833			var eidCoor = this.calculationCoor(eid);
6834			this.css(eid, {
6835				left: eidCoor['x'] + 'px',
6836				top: eidCoor['y'] + 'px'
6837			});
6838
6839			this.elementArr.push(eid.className);
6840			return eid;
6841		},
6842		/*
6843			内置函数
6844			获取元件的属性,包括x,y,width,height,alpha
6845		*/
6846		getElement: function(element) {
6847			if (this.playerType == 'flashplayer') {
6848				return this.V.getElement(element);
6849			}
6850			var ele = element;
6851			if (typeof(element) == 'string') {
6852				ele = this.getByElement(element);
6853			}
6854			var coor = this.getCoor(ele);
6855			return {
6856				x: coor['x'],
6857				y: coor['y'],
6858				width: ele.offsetWidth,
6859				height: ele.offsetHeight,
6860				alpha: !this.isUndefined(this.css(ele, 'opacity')) ? parseFloat(this.css(ele, 'opacity')) : 1,
6861				show: this.css(ele, 'display') == 'none' ? false: true
6862			};
6863		},
6864		/*
6865			内置函数
6866			控制元件显示和隐藏
6867		*/
6868		elementShow: function(element, show) {
6869			if (this.playerType == 'flashplayer') {
6870				this.V.elementShow(element, show);
6871				return;
6872			}
6873			if (typeof(element) == 'string') {
6874				if (element) {
6875					this.css(ele, 'display', show == true ? 'block': 'none');
6876				} else {
6877					var arr = this.elementTempArr;
6878					for (var i = 0; i < arr.length; i++) {
6879						this.css(arr[i], 'display', show == true ? 'block': 'none');
6880					}
6881				}
6882			}
6883
6884		},
6885		/*
6886			内置函数
6887			根据节点的x,y计算在播放器里的坐标
6888		*/
6889		calculationCoor: function(ele) {
6890			if (this.playerType == 'flashplayer') {
6891				return this.V.calculationCoor(ele);
6892			}
6893			if (ele == []) {
6894				return;
6895			}
6896			var x, y, position = [];
6897			var w = this.PD.offsetWidth,
6898			h = this.PD.offsetHeight;
6899			var ew = ele.offsetWidth,
6900			eh = ele.offsetHeight;
6901			if (!this.isUndefined(this.getDataset(ele, 'x'))) {
6902				x = this.getDataset(ele, 'x');
6903			}
6904			if (!this.isUndefined(this.getDataset(ele, 'y'))) {
6905				y = this.getDataset(ele, 'y');
6906			}
6907			if (!this.isUndefined(this.getDataset(ele, 'position'))) {
6908				try {
6909					position = this.getDataset(ele, 'position').toString().split(',');
6910				} catch(event) {}
6911			}
6912			if (position.length > 0) {
6913				position.push(null, null, null, null);
6914				var i = 0;
6915				for (i = 0; i < position.length; i++) {
6916					if (this.isUndefined(position[i]) || position[i] == null || position[i] == 'null' || position[i] == '') {
6917						position[i] = null;
6918					} else {
6919						position[i] = parseFloat(position[i]);
6920					}
6921				}
6922
6923				if (position[2] == null) {
6924					switch (position[0]) {
6925					case 0:
6926						x = 0;
6927						break;
6928					case 1:
6929						x = parseInt((w - ew) * 0.5);
6930						break;
6931					default:
6932						x = w - ew;
6933						break;
6934					}
6935				} else {
6936					switch (position[0]) {
6937					case 0:
6938						x = position[2];
6939						break;
6940					case 1:
6941						x = parseInt(w * 0.5) + position[2];
6942						break;
6943					default:
6944						x = w + position[2];
6945						break;
6946					}
6947				}
6948				if (position[3] == null) {
6949					switch (position[1]) {
6950					case 0:
6951						y = 0;
6952						break;
6953					case 1:
6954						y = parseInt((h - eh) * 0.5);
6955						break;
6956					default:
6957						y = h - eh;
6958						break;
6959					}
6960				} else {
6961					switch (position[1]) {
6962					case 0:
6963						y = position[3];
6964						break;
6965					case 1:
6966						y = parseInt(h * 0.5) + position[3];
6967						break;
6968					default:
6969						y = h + position[3];
6970						break;
6971					}
6972				}
6973			} else {
6974				if (x.substring(x.length - 1, x.length) == '%') {
6975					x = Math.floor(parseInt(x.substring(0, x.length - 1)) * w * 0.01);
6976				}
6977				if (y.substring(y.length - 1, y.length) == '%') {
6978					y = Math.floor(parseInt(y.substring(0, y.length - 1)) * h * 0.01);
6979				}
6980			}
6981			return {
6982				x: x,
6983				y: y
6984			}
6985
6986		},
6987		/*
6988			内置函数
6989			修改新增元件的坐标
6990		*/
6991		changeElementCoor: function() {
6992			for (var i = 0; i < this.elementArr.length; i++) {
6993				if (this.getByElement(this.elementArr[i]) != []) {
6994					var c = this.calculationCoor(this.getByElement(this.elementArr[i]));
6995					if (c['x'] && c['y']) {
6996						this.css(this.elementArr[i], {
6997							top: c['y'] + 'px',
6998							left: c['x'] + 'px'
6999						});
7000					}
7001				}
7002			}
7003		},
7004		/*
7005			内置函数
7006			缓动效果集
7007		*/
7008		tween: function() {
7009			var Tween = {
7010				None: { //均速运动
7011					easeIn: function(t, b, c, d) {
7012						return c * t / d + b;
7013					},
7014					easeOut: function(t, b, c, d) {
7015						return c * t / d + b;
7016					},
7017					easeInOut: function(t, b, c, d) {
7018						return c * t / d + b;
7019					}
7020				},
7021				Quadratic: {
7022					easeIn: function(t, b, c, d) {
7023						return c * (t /= d) * t + b;
7024					},
7025					easeOut: function(t, b, c, d) {
7026						return - c * (t /= d) * (t - 2) + b;
7027					},
7028					easeInOut: function(t, b, c, d) {
7029						if ((t /= d / 2) < 1) return c / 2 * t * t + b;
7030						return - c / 2 * ((--t) * (t - 2) - 1) + b;
7031					}
7032				},
7033				Cubic: {
7034					easeIn: function(t, b, c, d) {
7035						return c * (t /= d) * t * t + b;
7036					},
7037					easeOut: function(t, b, c, d) {
7038						return c * ((t = t / d - 1) * t * t + 1) + b;
7039					},
7040					easeInOut: function(t, b, c, d) {
7041						if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
7042						return c / 2 * ((t -= 2) * t * t + 2) + b;
7043					}
7044				},
7045				Quartic: {
7046					easeIn: function(t, b, c, d) {
7047						return c * (t /= d) * t * t * t + b;
7048					},
7049					easeOut: function(t, b, c, d) {
7050						return - c * ((t = t / d - 1) * t * t * t - 1) + b;
7051					},
7052					easeInOut: function(t, b, c, d) {
7053						if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
7054						return - c / 2 * ((t -= 2) * t * t * t - 2) + b;
7055					}
7056				},
7057				Quintic: {
7058					easeIn: function(t, b, c, d) {
7059						return c * (t /= d) * t * t * t * t + b;
7060					},
7061					easeOut: function(t, b, c, d) {
7062						return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
7063					},
7064					easeInOut: function(t, b, c, d) {
7065						if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
7066						return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
7067					}
7068				},
7069				Sine: {
7070					easeIn: function(t, b, c, d) {
7071						return - c * Math.cos(t / d * (Math.PI / 2)) + c + b;
7072					},
7073					easeOut: function(t, b, c, d) {
7074						return c * Math.sin(t / d * (Math.PI / 2)) + b;
7075					},
7076					easeInOut: function(t, b, c, d) {
7077						return - c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
7078					}
7079				},
7080				Exponential: {
7081					easeIn: function(t, b, c, d) {
7082						return (t == 0) ? b: c * Math.pow(2, 10 * (t / d - 1)) + b;
7083					},
7084					easeOut: function(t, b, c, d) {
7085						return (t == d) ? b + c: c * ( - Math.pow(2, -10 * t / d) + 1) + b;
7086					},
7087					easeInOut: function(t, b, c, d) {
7088						if (t == 0) return b;
7089						if (t == d) return b + c;
7090						if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
7091						return c / 2 * ( - Math.pow(2, -10 * --t) + 2) + b;
7092					}
7093				},
7094				Circular: {
7095					easeIn: function(t, b, c, d) {
7096						return - c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
7097					},
7098					easeOut: function(t, b, c, d) {
7099						return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
7100					},
7101					easeInOut: function(t, b, c, d) {
7102						if ((t /= d / 2) < 1) return - c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
7103						return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
7104					}
7105				},
7106				Elastic: {
7107					easeIn: function(t, b, c, d, a, p) {
7108						if (t == 0) return b;
7109						if ((t /= d) == 1) return b + c;
7110						if (!p) p = d * .3;
7111						if (!a || a < Math.abs(c)) {
7112							a = c;
7113							var s = p / 4;
7114						} else var s = p / (2 * Math.PI) * Math.asin(c / a);
7115						return - (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
7116					},
7117					easeOut: function(t, b, c, d, a, p) {
7118						if (t == 0) return b;
7119						if ((t /= d) == 1) return b + c;
7120						if (!p) p = d * .3;
7121						if (!a || a < Math.abs(c)) {
7122							a = c;
7123							var s = p / 4;
7124						} else var s = p / (2 * Math.PI) * Math.asin(c / a);
7125						return (a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b);
7126					},
7127					easeInOut: function(t, b, c, d, a, p) {
7128						if (t == 0) return b;
7129						if ((t /= d / 2) == 2) return b + c;
7130						if (!p) p = d * (.3 * 1.5);
7131						if (!a || a < Math.abs(c)) {
7132							a = c;
7133							var s = p / 4;
7134						} else var s = p / (2 * Math.PI) * Math.asin(c / a);
7135						if (t < 1) return - .5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
7136						return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
7137					}
7138				},
7139				Back: {
7140					easeIn: function(t, b, c, d, s) {
7141						if (s == undefined) s = 1.70158;
7142						return c * (t /= d) * t * ((s + 1) * t - s) + b;
7143					},
7144					easeOut: function(t, b, c, d, s) {
7145						if (s == undefined) s = 1.70158;
7146						return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
7147					},
7148					easeInOut: function(t, b, c, d, s) {
7149						if (s == undefined) s = 1.70158;
7150						if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
7151						return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
7152					}
7153				},
7154				Bounce: {
7155					easeIn: function(t, b, c, d) {
7156						return c - Tween.Bounce.easeOut(d - t, 0, c, d) + b;
7157					},
7158					easeOut: function(t, b, c, d) {
7159						if ((t /= d) < (1 / 2.75)) {
7160							return c * (7.5625 * t * t) + b;
7161						} else if (t < (2 / 2.75)) {
7162							return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
7163						} else if (t < (2.5 / 2.75)) {
7164							return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
7165						} else {
7166							return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
7167						}
7168					},
7169					easeInOut: function(t, b, c, d) {
7170						if (t < d / 2) return Tween.Bounce.easeIn(t * 2, 0, c, d) * .5 + b;
7171						else return Tween.Bounce.easeOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
7172					}
7173				}
7174			};
7175			return Tween;
7176		},
7177		/*
7178			接口函数
7179			缓动效果
7180			ele:Object=需要缓动的对象,
7181			parameter:String=需要改变的属性:x,y,width,height,alpha,
7182			effect:String=效果名称,
7183			start:Int=起始值,
7184			end:Int=结束值,
7185			speed:Number=运动的总秒数,支持小数
7186		*/
7187		animate: function(attribute) {
7188			if (this.playerType == 'flashplayer') {
7189				return this.V.animate(attribute);
7190			}
7191			var thisTemp = this;
7192			var animateId = 'animate_' + this.randomString();
7193			var obj = {
7194				element: null,
7195				parameter: 'x',
7196				static: false,
7197				effect: 'None.easeIn',
7198				start: null,
7199				end: null,
7200				speed: 0,
7201				overStop: false,
7202				pauseStop: false,
7203				//暂停播放时缓动是否暂停
7204				callBack: null
7205			};
7206			obj = this.standardization(obj, attribute);
7207			if (obj['element'] == null || obj['speed'] == 0) {
7208				return false;
7209			}
7210			var w = this.PD.offsetWidth,
7211			h = this.PD.offsetHeight;
7212			var effArr = (obj['effect'] + '.').split('.');
7213			var tweenFun = this.tween()[effArr[0]][effArr[1]];
7214			var eleCoor = {
7215				x: 0,
7216				y: 0
7217			};
7218			if (this.isUndefined(tweenFun)) {
7219				return false;
7220			}
7221			//先将该元件从元件数组里删除,让其不再跟随播放器的尺寸改变而改变位置
7222			var def = this.arrIndexOf(this.elementArr, obj['element'].className);
7223			if (def > -1) {
7224				this.elementTempArr.push(obj['element'].className);
7225				this.elementArr.splice(def, 1);
7226			}
7227			//var run = true;
7228			var css = {};
7229			//对传递的参数进行转化,x和y转化成left,top
7230			var pm = this.getElement(obj['element']); //包含x,y,width,height,alpha属性
7231			var t = 0; //当前时间
7232			var b = 0; //初始值
7233			var c = 0; //变化量
7234			var d = obj['speed'] * 1000; //持续时间
7235			var timerTween = null;
7236			var tweenObj = null;
7237			var start = obj['start'] == null ? '': obj['start'].toString();
7238			var end = obj['end'] == null ? '': obj['end'].toString();
7239			switch (obj['parameter']) {
7240			case 'x':
7241				if (obj['start'] == null) {
7242					b = pm['x'];
7243				} else {
7244					if (start.substring(start.length - 1, start.length) == '%') {
7245						b = parseInt(start) * w * 0.01;
7246					} else {
7247						b = parseInt(start);
7248					}
7249
7250				}
7251				if (obj['end'] == null) {
7252					c = pm['x'] - b;
7253				} else {
7254					if (end.substring(end.length - 1, end.length) == '%') {
7255						c = parseInt(end) * w * 0.01 - b;
7256					} else if (end.substring(0, 1) == '-' || end.substring(0, 1) == '+') {
7257						if (typeof(obj['end']) == 'number') {
7258							c = parseInt(obj['end']) - b;
7259						} else {
7260							c = parseInt(end);
7261						}
7262
7263					} else {
7264						c = parseInt(end) - b;
7265					}
7266				}
7267				break;
7268			case 'y':
7269				if (obj['start'] == null) {
7270					b = pm['y'];
7271				} else {
7272					if (start.substring(start.length - 1, start.length) == '%') {
7273						b = parseInt(start) * h * 0.01;
7274					} else {
7275						b = parseInt(start);
7276					}
7277
7278				}
7279				if (obj['end'] == null) {
7280					c = pm['y'] - b;
7281				} else {
7282					if (end.substring(end.length - 1, end.length) == '%') {
7283						c = parseInt(end) * h * 0.01 - b;
7284					} else if (end.substring(0, 1) == '-' || end.substring(0, 1) == '+') {
7285						if (typeof(obj['end']) == 'number') {
7286							c = parseInt(obj['end']) - b;
7287						} else {
7288							c = parseInt(end);
7289						}
7290					} else {
7291						c = parseInt(end) - b;
7292					}
7293				}
7294				break;
7295			case 'alpha':
7296				if (obj['start'] == null) {
7297					b = pm['alpha'] * 100;
7298				} else {
7299					if (start.substring(start.length - 1, start.length) == '%') {
7300						b = parseInt(obj['start']);
7301					} else {
7302						b = parseInt(obj['start'] * 100);
7303					}
7304
7305				}
7306				if (obj['end'] == null) {
7307					c = pm['alpha'] * 100 - b;
7308				} else {
7309					if (end.substring(end.length - 1, end.length) == '%') {
7310						c = parseInt(end) - b;
7311					} else if (end.substring(0, 1) == '-' || end.substring(0, 1) == '+') {
7312						if (typeof(obj['end']) == 'number') {
7313							c = parseInt(obj['end']) * 100 - b;
7314						} else {
7315							c = parseInt(obj['end']) * 100;
7316						}
7317					} else {
7318						c = parseInt(obj['end']) * 100 - b;
7319					}
7320				}
7321				break;
7322			}
7323			var callBack = function() {
7324				var index = thisTemp.arrIndexOf(thisTemp.animateElementArray, animateId);
7325				if (index > -1) {
7326					thisTemp.animateArray.splice(index, 1);
7327					thisTemp.animateElementArray.splice(index, 1);
7328				}
7329				index = thisTemp.arrIndexOf(thisTemp.animatePauseArray, animateId);
7330				if (index > -1) {
7331					thisTemp.animatePauseArray.splice(index, 1);
7332				}
7333				if (obj['callBack'] != null && obj['element'] && obj['callBack'] != 'callBack' && obj['callBack'] != 'tweenX' && obj['tweenY'] != 'callBack' && obj['callBack'] != 'tweenAlpha') {
7334					var cb = eval(obj['callBack']);
7335					cb(obj['element']);
7336					obj['callBack'] = null;
7337				}
7338			};
7339			var stopTween = function() {
7340				if (timerTween != null) {
7341					if (timerTween.runing) {
7342						timerTween.stop();
7343					}
7344					timerTween = null;
7345				}
7346			};
7347			var tweenX = function() {
7348				if (t < d) {
7349					t += 10;
7350					css = {
7351						left: Math.ceil(tweenFun(t, b, c, d)) + 'px'
7352					};
7353					if (obj['static']) {
7354						eleCoor = thisTemp.calculationCoor(obj['element']);
7355						css['top'] = eleCoor['y'] + 'px';
7356					}
7357					thisTemp.css(obj['element'], css);
7358
7359				} else {
7360					stopTween();
7361					try {
7362						var defX = this.arrIndexOf(this.elementTempArr, obj['element'].className);
7363						if (defX > -1) {
7364							this.elementTempArr.splice(defX, 1);
7365						}
7366					} catch(event) {}
7367					thisTemp.elementArr.push(obj['element'].className);
7368					callBack();
7369				}
7370			};
7371			var tweenY = function() {
7372				if (t < d) {
7373					t += 10;
7374					css = {
7375						top: Math.ceil(tweenFun(t, b, c, d)) + 'px'
7376					};
7377					if (obj['static']) {
7378						eleCoor = thisTemp.calculationCoor(obj['element']);
7379						css['left'] = eleCoor['x'] + 'px';
7380					}
7381					thisTemp.css(obj['element'], css);
7382				} else {
7383					stopTween();
7384					try {
7385						var defY = this.arrIndexOf(this.elementTempArr, obj['element'].className);
7386						if (defY > -1) {
7387							this.elementTempArr.splice(defY, 1);
7388						}
7389					} catch(event) {}
7390					thisTemp.elementArr.push(obj['element'].className);
7391					callBack();
7392				}
7393			};
7394			var tweenAlpha = function() {
7395				if (t < d) {
7396					t += 10;
7397					eleCoor = thisTemp.calculationCoor(obj['element']);
7398					var ap = Math.ceil(tweenFun(t, b, c, d)) * 0.01;
7399					css = {
7400						filter: 'alpha(opacity:' + ap + ')',
7401						opacity: ap.toString()
7402					};
7403					if (obj['static']) {
7404						eleCoor = thisTemp.calculationCoor(obj['element']);
7405						css['top'] = eleCoor['y'] + 'px';
7406						css['left'] = eleCoor['x'] + 'px';
7407					}
7408					thisTemp.css(obj['element'], css);
7409				} else {
7410					stopTween();
7411					try {
7412						var defA = this.arrIndexOf(this.elementTempArr, obj['element'].className);
7413						if (defA > -1) {
7414							this.elementTempArr.splice(defA, 1);
7415						}
7416					} catch(event) {}
7417					thisTemp.elementArr.push(obj['element'].className);
7418					callBack();
7419				}
7420			};
7421			switch (obj['parameter']) {
7422			case 'x':
7423				tweenObj = tweenX;
7424				break;
7425			case 'y':
7426				tweenObj = tweenY;
7427				break;
7428			case 'alpha':
7429				tweenObj = tweenAlpha;
7430				break;
7431			default:
7432				break;
7433			}
7434			timerTween = new thisTemp.timer(10, tweenObj);
7435			timerTween.callBackFunction = callBack;
7436			if (obj['overStop']) {
7437				var mouseOver = function() {
7438					if (timerTween != null && timerTween.runing) {
7439						timerTween.stop();
7440					}
7441				};
7442				this.addListenerInside('mouseover', mouseOver, obj['element']);
7443				var mouseOut = function() {
7444					var start = true;
7445					if (obj['pauseStop'] && thisTemp.getMetaDate()['paused']) {
7446						start = false;
7447					}
7448					if (timerTween != null && !timerTween.runing && start) {
7449						timerTween.start();
7450					}
7451				};
7452				this.addListenerInside('mouseout', mouseOut, obj['element']);
7453			}
7454
7455			this.animateArray.push(timerTween);
7456			this.animateElementArray.push(animateId);
7457			if (obj['pauseStop']) {
7458				this.animatePauseArray.push(animateId);
7459			}
7460			return animateId;
7461		},
7462		/*
7463			接口函数函数
7464			继续运行animate
7465		*/
7466		animateResume: function(id) {
7467			if (this.playerType == 'flashplayer') {
7468				this.V.animateResume(this.isUndefined(id) ? '': id);
7469				return;
7470			}
7471			var arr = [];
7472			if (id != '' && !this.isUndefined(id) && id != 'pause') {
7473				arr.push(id);
7474			} else {
7475				if (id === 'pause') {
7476					arr = this.animatePauseArray;
7477				} else {
7478					arr = this.animateElementArray;
7479				}
7480			}
7481			for (var i = 0; i < arr.length; i++) {
7482				var index = this.arrIndexOf(this.animateElementArray, arr[i]);
7483				if (index > -1) {
7484					this.animateArray[index].start();
7485				}
7486			}
7487
7488		},
7489		/*
7490			接口函数
7491			暂停运行animate
7492		*/
7493		animatePause: function(id) {
7494			if (this.playerType == 'flashplayer') {
7495				this.V.animatePause(this.isUndefined(id) ? '': id);
7496				return;
7497			}
7498			var arr = [];
7499			if (id != '' && !this.isUndefined(id) && id != 'pause') {
7500				arr.push(id);
7501			} else {
7502				if (id === 'pause') {
7503					arr = this.animatePauseArray;
7504				} else {
7505					arr = this.animateElementArray;
7506				}
7507			}
7508			for (var i = 0; i < arr.length; i++) {
7509				var index = this.arrIndexOf(this.animateElementArray, arr[i]);
7510				if (index > -1) {
7511					this.animateArray[index].stop();
7512				}
7513			}
7514		},
7515		/*
7516			内置函数
7517			根据ID删除数组里对应的内容
7518		*/
7519		deleteAnimate: function(id) {
7520			if (this.playerType == 'flashplayer' && this.V) {
7521				try {
7522					this.V.deleteAnimate(id);
7523				} catch(event) {
7524					this.log(event);
7525				}
7526				return;
7527			}
7528			var index = this.arrIndexOf(this.animateElementArray, id);
7529			if (index > -1) {
7530				this.animateArray[index].callBackFunction();
7531				this.animateArray.splice(index, 1);
7532				this.animateElementArray.splice(index, 1);
7533			}
7534		},
7535		/*
7536			内置函数
7537			删除外部新建的元件
7538		*/
7539		deleteElement: function(ele) {
7540			if (this.playerType == 'flashplayer' && this.V) {
7541				try {
7542					this.V.deleteElement(ele);
7543				} catch(event) {}
7544				return;
7545			}
7546			//先将该元件从元件数组里删除,让其不再跟随播放器的尺寸改变而改变位置
7547			var def = this.arrIndexOf(this.elementArr, ele.className);
7548			if (def > -1) {
7549				this.elementArr.splice(def, 1);
7550			}
7551			try {
7552				def = this.arrIndexOf(this.elementTempArr, ele.className);
7553				if (def > -1) {
7554					this.elementTempArr.splice(def, 1);
7555				}
7556			} catch(event) {}
7557			this.deleteAnimate(ele);
7558			this.deleteChild(ele);
7559		},
7560		/*
7561			--------------------------------------------------------------
7562			共用函数部分
7563			以下函数并非只能在本程序中使用,也可以在页面其它项目中使用
7564			根据ID获取元素对象
7565		*/
7566		getByElement: function(obj, parent) {
7567			if (this.isUndefined(parent)) {
7568				parent = document;
7569			}
7570			var num = obj.substr(0, 1);
7571			var res = [];
7572			if (num != '#') {
7573				if (num == '.') {
7574					obj = obj.substr(1, obj.length);
7575				}
7576				if (parent.getElementsByClassName) {
7577					res = parent.getElementsByClassName(obj);
7578				} else {
7579					var reg = new RegExp(' ' + obj + ' ', 'i');
7580					var ele = parent.getElementsByTagName('*');
7581
7582					for (var i = 0; i < ele.length; i++) {
7583						if (reg.test(' ' + ele[i].className + ' ')) {
7584							res.push(ele[i]);
7585						}
7586					}
7587				}
7588
7589				if (res.length > 0) {
7590					return res[0];
7591				} else {
7592					return res;
7593				}
7594			} else {
7595				if (num == '#') {
7596					obj = obj.substr(1, obj.length);
7597				}
7598				return document.getElementById(obj);
7599			}
7600		},
7601		/*
7602		 	共用函数
7603			功能:修改样式或获取指定样式的值,
7604				elem:ID对象或ID对应的字符,如果多个对象一起设置,则可以使用数组
7605				attribute:样式名称或对象,如果是对象,则省略掉value值
7606				value:attribute为样式名称时,定义的样式值
7607				示例一:
7608				this.css(ID,'width','100px');
7609				示例二:
7610				this.css('id','width','100px');
7611				示例三:
7612				this.css([ID1,ID2,ID3],'width','100px');
7613				示例四:
7614				this.css(ID,{
7615					width:'100px',
7616					height:'100px'
7617				});
7618				示例五(获取宽度):
7619				var width=this.css(ID,'width');
7620		*/
7621		css: function(elem, attribute, value) {
7622			var i = 0;
7623			var k = '';
7624			if (typeof(elem) == 'object') { //对象或数组
7625				if (!this.isUndefined(typeof(elem.length))) { //说明是数组
7626					for (i = 0; i < elem.length; i++) {
7627						var el;
7628						if (typeof(elem[i]) == 'string') {
7629							el = this.getByElement(elem[i])
7630						} else {
7631							el = elem[i];
7632						}
7633						if (typeof(attribute) != 'object') {
7634							if (!this.isUndefined(value)) {
7635								el.style[attribute] = value;
7636							}
7637						} else {
7638							for (k in attribute) {
7639								if (!this.isUndefined(attribute[k])) {
7640									try {
7641										el.style[k] = attribute[k];
7642									} catch(event) {
7643										this.log(event);
7644									}
7645								}
7646							}
7647						}
7648					}
7649					return;
7650				}
7651
7652			}
7653			if (typeof(elem) == 'string') {
7654				elem = this.getByElement(elem);
7655			}
7656			if (typeof(attribute) != 'object') {
7657				if (!this.isUndefined(value)) {
7658					elem.style[attribute] = value;
7659				} else {
7660					if (!this.isUndefined(this.getStyle(elem, attribute))) {
7661						return this.getStyle(elem, attribute);
7662					} else {
7663						return false;
7664					}
7665				}
7666			} else {
7667				for (k in attribute) {
7668					if (!this.isUndefined(attribute[k])) {
7669						elem.style[k] = attribute[k];
7670					}
7671				}
7672			}
7673
7674		},
7675		/*
7676			内置函数
7677			兼容型获取style
7678		*/
7679		getStyle: function(obj, attr) {
7680			if (!this.isUndefined(obj.style[attr])) {
7681				return obj.style[attr];
7682			} else {
7683				if (obj.currentStyle) {
7684					return obj.currentStyle[attr];
7685				} else {
7686					return getComputedStyle(obj, false)[attr];
7687				}
7688			}
7689		},
7690		/*
7691			共用函数
7692			判断变量是否存在或值是否为undefined
7693		*/
7694		isUndefined: function(value) {
7695			try {
7696				if (value == 'undefined' || value == undefined || value == null) {
7697					return true;
7698				}
7699			} catch(event) {
7700				this.log(event);
7701			}
7702			return false;
7703		},
7704		/*
7705		 	共用函数
7706			外部监听函数
7707		*/
7708		addListener: function(name, funName) {
7709			if (name && funName) {
7710				if (this.playerType == 'flashplayer') {
7711					var ff = ''; //定义用来向flashplayer传递的函数字符
7712					if (typeof(funName) == 'function') {
7713						ff = this.getParameterNames(funName);
7714					}
7715					this.V.addListener(name, ff);
7716					return;
7717				}
7718				var have = false;
7719				for (var i = 0; i < this.listenerJsArr.length; i++) {
7720					var arr = this.listenerJsArr[i];
7721					if (arr[0] == name && arr[1] == funName) {
7722						have = true;
7723						break;
7724					}
7725				}
7726				if (!have) {
7727					this.listenerJsArr.push([name, funName]);
7728				}
7729			}
7730		},
7731		/*
7732			共用函数
7733			外部删除监听函数
7734		*/
7735		removeListener: function(name, funName) {
7736			if (name && funName) {
7737				if (this.playerType == 'flashplayer') {
7738					var ff = ''; //定义用来向flashplayer传递的函数字符
7739					if (typeof(funName) == 'function') {
7740						ff = this.getParameterNames(funName);
7741					}
7742					this.V.removeListener(name, ff);
7743					return;
7744				}
7745				for (var i = 0; i < this.listenerJsArr.length; i++) {
7746					var arr = this.listenerJsArr[i];
7747					if (arr[0] == name && arr[1] == funName) {
7748						this.listenerJsArr.splice(i, 1);
7749						break;
7750					}
7751				}
7752			}
7753		},
7754		/*
7755			内部监听函数,调用方式:
7756			this.addListenerInside('click',function(event){},[ID]);
7757			d值为空时,则表示监听当前的视频播放器
7758		*/
7759		addListenerInside: function(e, f, d, t) {
7760			if (this.isUndefined(t)) {
7761				t = false;
7762			}
7763			var o = this.V;
7764			if (!this.isUndefined(d)) {
7765				o = d;
7766			}
7767			if (o.addEventListener) {
7768				try {
7769					o.addEventListener(e, f, t);
7770				} catch(event) {}
7771			} else if (o.attachEvent) {
7772				try {
7773					o.attachEvent('on' + e, f);
7774				} catch(event) {}
7775			} else {
7776				o['on' + e] = f;
7777			}
7778		},
7779		/*
7780			删除内部监听函数,调用方式:
7781			this.removeListenerInside('click',function(event){}[,ID]);
7782			d值为空时,则表示监听当前的视频播放器
7783		*/
7784		removeListenerInside: function(e, f, d, t) {
7785			/*if(this.playerType=='flashplayer' && this.getParameterNames(f) && this.isUndefined(d)) {
7786				return;
7787			}*/
7788			if (this.isUndefined(t)) {
7789				t = false;
7790			}
7791			var o = this.V;
7792			if (!this.isUndefined(d)) {
7793				o = d;
7794			}
7795			if (o.removeEventListener) {
7796				try {
7797					this.addNum--;
7798					o.removeEventListener(e, f, t);
7799				} catch(e) {}
7800			} else if (o.detachEvent) {
7801				try {
7802					o.detachEvent('on' + e, f);
7803				} catch(e) {}
7804			} else {
7805				o['on' + e] = null;
7806			}
7807		},
7808		/*
7809			共用函数
7810			统一分配监听,以达到跟as3同样效果
7811		*/
7812		sendJS: function(name, val) {
7813			if (this.adPlayerPlay && name.substr( - 2) != 'Ad') {
7814				return;
7815			}
7816			var list = this.listenerJsArr;
7817			var obj = {
7818				variable: this.vars['variable']
7819			};
7820			if (this.vars['playerID']) {
7821				obj['playerID'] = this.vars['playerID'];
7822			}
7823			if(this.vars['debug']){
7824				this.log(name+':'+val);
7825			}
7826			for (var i = 0; i < list.length; i++) {
7827				var arr = list[i];
7828				if (arr[0] == name) {
7829					if (val) {
7830						switch (arr[1].length) {
7831						case 1:
7832							arr[1](val);
7833							break;
7834						case 2:
7835							arr[1](val, obj);
7836							break;
7837						default:
7838							arr[1]();
7839							break;
7840						}
7841
7842					} else {
7843						switch (arr[1].length) {
7844						case 1:
7845							if (typeof(val) == 'boolean') {
7846								arr[1](false);
7847							} else {
7848								arr[1](obj);
7849							}
7850							break;
7851						default:
7852							arr[1]();
7853							break;
7854						}
7855
7856					}
7857				}
7858			}
7859		},
7860		/*
7861			共用函数
7862			获取函数名称,如 function ckplayer(){} var fun=ckplayer,则getParameterNames(fun)=ckplayer
7863		*/
7864		getParameterNames: function(fn) {
7865			if (typeof(fn) !== 'function') {
7866				return false;
7867			}
7868			var COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
7869			var code = fn.toString().replace(COMMENTS, '');
7870			var result = code.slice(code.indexOf(' ') + 1, code.indexOf('('));
7871			return result === null ? false: result;
7872		},
7873		/*
7874			共用函数
7875			获取当前本地时间
7876		*/
7877		getNowDate: function() {
7878			var nowDate = new Date();
7879			var month = nowDate.getMonth() + 1;
7880			var date = nowDate.getDate();
7881			var hours = nowDate.getHours();
7882			var minutes = nowDate.getMinutes();
7883			var seconds = nowDate.getSeconds();
7884			var tMonth = '',
7885			tDate = '',
7886			tHours = '',
7887			tMinutes = '',
7888			tSeconds = '',
7889			tSeconds = (seconds < 10) ? '0' + seconds: seconds + '',
7890			tMinutes = (minutes < 10) ? '0' + minutes: minutes + '',
7891			tHours = (hours < 10) ? '0' + hours: hours + '',
7892			tDate = (date < 10) ? '0' + date: date + '',
7893			tMonth = (month < 10) ? '0' + month: month + '';
7894			return tMonth + '/' + tDate + ' ' + tHours + ':' + tMinutes + ':' + tSeconds;
7895		},
7896		/*
7897			共用函数
7898			格式化时分秒
7899			seconds:Int:秒数
7900			ishours:Boolean:是否显示小时,如果设置成false,则会显示如80:20,表示1小时20分钟20秒
7901		*/
7902		formatTime: function(seconds, ishours) {
7903			var tSeconds = '',
7904			tMinutes = '',
7905			tHours = '';
7906			if (isNaN(seconds)) {
7907				seconds = 0;
7908			}
7909			var s = Math.floor(seconds % 60),
7910			m = 0,
7911			h = 0;
7912			if (ishours) {
7913				m = Math.floor(seconds / 60) % 60;
7914				h = Math.floor(seconds / 3600);
7915			} else {
7916				m = Math.floor(seconds / 60);
7917			}
7918			tSeconds = (s < 10) ? '0' + s: s + '';
7919			tMinutes = (m > 0) ? ((m < 10) ? '0' + m + ':': m + ':') : '00:';
7920			tHours = (h > 0) ? ((h < 10) ? '0' + h + ':': h + ':') : '';
7921			if (ishours) {
7922				return tHours + tMinutes + tSeconds;
7923			} else {
7924				return tMinutes + tSeconds;
7925			}
7926		},
7927		/*
7928			共用函数
7929			获取一个随机字符
7930			len:随机字符长度
7931		*/
7932		randomString: function(len) {
7933			len = len || 16;
7934			var chars = 'abcdefghijklmnopqrstuvwxyz';
7935			var maxPos = chars.length;
7936			var val = '';
7937			for (i = 0; i < len; i++) {
7938				val += chars.charAt(Math.floor(Math.random() * maxPos));
7939			}
7940			return 'ch' + val;
7941		},
7942		/*
7943			共用函数
7944			获取字符串长度,中文算两,英文数字算1
7945		*/
7946		getStringLen: function(str) {
7947			var len = 0;
7948			for (var i = 0; i < str.length; i++) {
7949				if (str.charCodeAt(i) > 127 || str.charCodeAt(i) == 94) {
7950					len += 2;
7951				} else {
7952					len++;
7953				}
7954			}
7955			return len;
7956		},
7957		/*
7958			内部函数
7959			用来为ajax提供支持
7960		*/
7961		createXHR: function() {
7962			if (window.XMLHttpRequest) {
7963				//IE7+、Firefox、Opera、Chrome 和Safari
7964				return new XMLHttpRequest();
7965			} else if (window.ActiveXObject) {
7966				//IE6 及以下
7967				try {
7968					return new ActiveXObject('Microsoft.XMLHTTP');
7969				} catch(event) {
7970					try {
7971						return new ActiveXObject('Msxml2.XMLHTTP');
7972					} catch(event) {
7973						this.eject(this.errorList[7]);
7974					}
7975				}
7976			} else {
7977				this.eject(this.errorList[8]);
7978			}
7979		},
7980		/*
7981			共用函数
7982			ajax调用
7983		*/
7984		ajax: function(cObj) {
7985			var thisTemp = this;
7986			var callback = null;
7987			var obj = {
7988				method: 'get',
7989				//请求类型
7990				dataType: 'json',
7991				//请求的数据类型
7992				charset: 'utf-8',
7993				async: false,
7994				//true表示异步,false表示同步
7995				url: '',
7996				data: null,
7997				success: null
7998			};
7999			if (typeof(cObj) != 'object') {
8000				this.eject(this.errorList[9]);
8001				return;
8002			}
8003			obj = this.standardization(obj, cObj);
8004			if (obj.dataType === 'json' || obj.dataType === 'text' || obj.dataType === 'html') {
8005				var xhr = this.createXHR();
8006				callback = function() {
8007					//判断http的交互是否成功
8008					if (xhr.status == 200) {
8009						if (thisTemp.isUndefined(obj.success)) {
8010							return;
8011						}
8012						if (obj.dataType === 'json') {
8013							try {
8014								obj.success(eval('(' + xhr.responseText + ')')); //回调传递参数
8015							} catch(event) {
8016								obj.success(null);
8017							}
8018						} else {
8019							obj.success(xhr.responseText); //回调传递参数
8020						}
8021					} else {
8022						obj.success(null);
8023						thisTemp.eject(thisTemp.errorList[10], 'Ajax.status:' + xhr.status);
8024					}
8025				};
8026				obj.url = obj.url.indexOf('?') == -1 ? obj.url + '?rand=' + this.randomString(6) : obj.url;
8027				obj.data = this.formatParams(obj.data); //通过params()将名值对转换成字符串
8028				if (obj.method === 'get' && !this.isUndefined(obj.data)) {
8029					if (obj.data != '') {
8030						if (obj.url.indexOf('?') == -1) {
8031							obj.url += '?' + obj.data
8032						} else {
8033							obj.url += '&' + obj.data;
8034						}
8035					}
8036				}
8037				if (obj.async === true) { //true表示异步,false表示同步
8038					xhr.onreadystatechange = function() {
8039						if (xhr.readyState == 4 && callback != null) { //判断对象的状态是否交互完成
8040							callback(); //回调
8041						}
8042					};
8043				}
8044				xhr.open(obj.method, obj.url, obj.async);
8045				if (obj.method === 'post') {
8046					try{
8047						xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
8048						xhr.setRequestHeader('charset', obj['charset']);
8049						xhr.send(obj.data);
8050					}
8051					catch(event){callback();}
8052				} else {
8053					try{
8054						xhr.send(null); //get方式则填null
8055					}
8056					catch(event){callback(); }	
8057				}
8058				if (obj.async === false) { //同步
8059					callback();
8060				}
8061
8062			} else if (obj.dataType === 'jsonp') {
8063				var oHead = document.getElementsByTagName('head')[0];
8064				var oScript = document.createElement('script');
8065				var callbackName = 'callback' + new Date().getTime();
8066				var params = this.formatParams(obj.data) + '&callback=' + callbackName; //按时间戳拼接字符串
8067				callback = obj.success;
8068				//拼接好src
8069				oScript.src = obj.url.split('?') + '?' + params;
8070				//插入script标签
8071				oHead.insertBefore(oScript, oHead.firstChild);
8072				//jsonp的回调函数
8073				window[callbackName] = function(json) {
8074					callback(json);
8075					oHead.removeChild(oScript);
8076				};
8077			}
8078		},
8079		/*
8080			内置函数
8081			动态加载js
8082		*/
8083		loadJs: function(path, success) {
8084			var oHead = document.getElementsByTagName('HEAD').item(0);
8085			var oScript = document.createElement('script');
8086			oScript.type = 'text/javascript';
8087			oScript.src = this.getNewUrl(path);
8088			oHead.appendChild(oScript);
8089			oScript.onload = function() {
8090				success();
8091			}
8092		},
8093		/*
8094			共用函数
8095			排除IE6-9
8096		*/
8097		isMsie: function() {
8098			var browser = navigator.appName;
8099			var b_version = navigator.appVersion;
8100			var version = b_version.split(';');
8101			var trim_Version = '';
8102			if (version.length > 1) {
8103				trim_Version = version[1].replace(/[ ]/g, '');
8104			}
8105			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')) {
8106				return false;
8107			}
8108			return true;
8109		},
8110		/*
8111			共用函数
8112			判断是否安装了flashplayer
8113		*/
8114		uploadFlash: function() {
8115			var swf;
8116			if (navigator.userAgent.indexOf('MSIE') > 0) {
8117				try {
8118					var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
8119					return true;
8120				} catch(e) {
8121					return false;
8122				}
8123			}
8124			if (navigator.userAgent.indexOf('Firefox') > 0) {
8125				swf = navigator.plugins['Shockwave Flash'];
8126				if (swf) {
8127					return true
8128				} else {
8129					return false;
8130				}
8131			}
8132			return true;
8133		},
8134		/*
8135			共用函数
8136			检测浏览器是否支持HTML5-Video
8137		*/
8138		supportVideo: function() {
8139			if (!this.isMsie()) {
8140				return false;
8141			}
8142			if ( !! document.createElement('video').canPlayType) {
8143				var vidTest = document.createElement('video');
8144				var oggTest;
8145				try {
8146					oggTest = vidTest.canPlayType('video/ogg; codecs="theora, vorbis"');
8147				} catch(error) {
8148					oggTest = false;
8149				}
8150				if (!oggTest) {
8151					var h264Test;
8152					try {
8153						h264Test = vidTest.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
8154					} catch(error) {
8155						h264Test = false;
8156					}
8157					if (!h264Test) {
8158						return false;
8159					} else {
8160						if (h264Test == "probably") {
8161							return true;
8162						} else {
8163							return false;
8164						}
8165					}
8166				} else {
8167					if (oggTest == "probably") {
8168						return true;
8169					} else {
8170						return false;
8171					}
8172				}
8173			} else {
8174				return false;
8175			}
8176		},
8177		/*
8178			共用函数
8179			获取属性值
8180		*/
8181		getDataset: function(ele, z) {
8182			try {
8183				return ele.dataset[z];
8184			} catch(error) {
8185				try {
8186					return ele.getAttribute('data-' + z)
8187				} catch(error) {
8188					return false;
8189				}
8190			}
8191		},
8192		/*
8193			共用函数
8194			返回flashplayer的对象
8195		*/
8196		getObjectById: function(id) {
8197			var x = null;
8198			var y = this.getByElement('#' + id);
8199			var r = 'embed';
8200			if (y && y.nodeName == 'OBJECT') {
8201				if (typeof(y.SetVariable) != 'undefined') {
8202					x = y;
8203				} else {
8204					var z = y.getElementsByTagName(r)[0];
8205					if (z) {
8206						x = z;
8207					}
8208				}
8209			}
8210			return x;
8211		},
8212		/*
8213			共用函数
8214			对象转地址字符串
8215		*/
8216		formatParams: function(data) {
8217			var arr = [];
8218			for (var i in data) {
8219				arr.push(encodeURIComponent(i) + '=' + encodeURIComponent(data[i]));
8220			}
8221			return arr.join('&');
8222		},
8223		/*
8224			内置函数
8225			对地址进行冒泡排序
8226		*/
8227		arrSort: function(arr) {
8228			var temp = [];
8229			for (var i = 0; i < arr.length; i++) {
8230				for (var j = 0; j < arr.length - i; j++) {
8231					if (!this.isUndefined(arr[j + 1]) && arr[j][3] < arr[j + 1][3]) {
8232						temp = arr[j + 1];
8233						arr[j + 1] = arr[j];
8234						arr[j] = temp;
8235					}
8236				}
8237			}
8238			return arr;
8239		},
8240		/*
8241			内置函数
8242			判断文件后缀
8243		*/
8244		getFileExt: function(filepath) {
8245			if (filepath != '' && !this.isUndefined(filepath)) {
8246				if (filepath.indexOf('?') > -1) {
8247					filepath = filepath.split('?')[0];
8248				}
8249				var pos = '.' + filepath.replace(/.+\./, '');
8250				return pos.toLowerCase();
8251			}
8252			return '';
8253		},
8254		/*
8255			内置函数
8256			判断是否是移动端
8257		*/
8258		isMobile: function() {
8259			if (navigator.userAgent.match(/(iPhone|iPad|iPod|Android|ios)/i)) {
8260				return true;
8261			}
8262			return false;
8263		},
8264		/*
8265			内置函数
8266			搜索字符串str是否包含key
8267		*/
8268		isContains: function(str, key) {
8269			return str.indexOf(key) > -1;
8270		},
8271		/*
8272			内置函数
8273			给地址添加随机数
8274		*/
8275		getNewUrl: function(url) {
8276			if (this.isContains(url, '?')) {
8277				return url += '&' + this.randomString(8) + '=' + this.randomString(8);
8278			} else {
8279				return url += '?' + this.randomString(8) + '=' + this.randomString(8);
8280			}
8281		},
8282		/*
8283			共用函数
8284			获取clientX和clientY
8285		*/
8286		client: function(event) {
8287			var eve = event || window.event;
8288			if (this.isUndefined(eve)) {
8289				eve = {
8290					clientX: 0,
8291					clientY: 0
8292				};
8293			}
8294			return {
8295				x: eve.clientX + (document.documentElement.scrollLeft || this.body.scrollLeft) - this.pdCoor['x'],
8296				y: eve.clientY + (document.documentElement.scrollTop || this.body.scrollTop) - this.pdCoor['y']
8297			}
8298		},
8299		/*
8300			内置函数
8301			获取节点的绝对坐标
8302		*/
8303		getCoor: function(obj) {
8304			var coor = this.getXY(obj);
8305			return {
8306				x: coor['x'] - this.pdCoor['x'],
8307				y: coor['y'] - this.pdCoor['y']
8308			};
8309		},
8310		getXY: function(obj) {
8311			var parObj = obj;
8312			var left = obj.offsetLeft;
8313			var top = obj.offsetTop;
8314			while (parObj = parObj.offsetParent) {
8315				left += parObj.offsetLeft;
8316				top += parObj.offsetTop;
8317			}
8318			return {
8319				x: left,
8320				y: top
8321			};
8322		},
8323		/*
8324			内置函数
8325			删除本对象的所有属性
8326		*/
8327		removeChild: function() {
8328			if (this.playerType == 'html5video') {
8329				//删除计时器
8330				var i = 0;
8331				var timerArr = [this.timerError, this.timerFull, this.timerTime, this.timerBuffer, this.timerClick, this.timerLoading, this.timerCBar, this.timerVCanvas];
8332				for (i = 0; i < timerArr.length; i++) {
8333					if (timerArr[i] != null) {
8334						if (timerArr[i].runing) {
8335							timerArr[i].stop();
8336						}
8337						timerArr[i] = null;
8338					}
8339				}
8340				//删除事件监听
8341				var ltArr = this.listenerJsArr;
8342				for (i = 0; i < ltArr.length; i++) {
8343					this.removeListener(ltArr[i][0], ltArr[i][1]);
8344				}
8345			}
8346			this.playerType == '';
8347			this.V = null;
8348			if (this.showFace) {
8349				this.deleteChild(this.CB['menu']);
8350			}
8351			this.deleteChild(this.PD);
8352			this.CD.innerHTML = '';
8353		},
8354		/*
8355			内置函数
8356			画封闭的图形
8357		*/
8358		canvasFill: function(name, path) {
8359			name.beginPath();
8360			for (var i = 0; i < path.length; i++) {
8361				var d = path[i];
8362				if (i > 0) {
8363					name.lineTo(d[0], d[1]);
8364				} else {
8365					name.moveTo(d[0], d[1]);
8366				}
8367			}
8368			name.closePath();
8369			name.fill();
8370		},
8371		/*
8372			内置函数
8373			画矩形
8374		*/
8375		canvasFillRect: function(name, path) {
8376			for (var i = 0; i < path.length; i++) {
8377				var d = path[i];
8378				name.fillRect(d[0], d[1], d[2], d[3]);
8379			}
8380		},
8381		/*
8382			共用函数
8383			删除容器节点
8384		*/
8385		deleteChild: function(f) {
8386			var def = this.arrIndexOf(this.elementArr, f.className);
8387			if (def > -1) {
8388				this.elementArr.splice(def, 1);
8389			}
8390			var childs = f.childNodes;
8391			for (var i = childs.length - 1; i >= 0; i--) {
8392				f.removeChild(childs[i]);
8393			}
8394
8395			if (f && f != null && f.parentNode) {
8396				try {
8397					if (f.parentNode) {
8398						f.parentNode.removeChild(f);
8399
8400					}
8401
8402				} catch(event) {}
8403			}
8404		},
8405		/*
8406			内置函数
8407		 	根据容器的宽高,内部节点的宽高计算出内部节点的宽高及坐标
8408		*/
8409		getProportionCoor: function(stageW, stageH, vw, vh) {
8410			var w = 0,
8411			h = 0,
8412			x = 0,
8413			y = 0;
8414			if (stageW / stageH < vw / vh) {
8415				w = stageW;
8416				h = w * vh / vw;
8417			} else {
8418				h = stageH;
8419				w = h * vw / vh;
8420			}
8421			x = (stageW - w) * 0.5;
8422			y = (stageH - h) * 0.5;
8423			return {
8424				width: parseInt(w),
8425				height: parseInt(h),
8426				x: parseInt(x),
8427				y: parseInt(y)
8428			};
8429		},
8430		/*
8431			共用函数
8432			将字幕文件内容转换成数组
8433		*/
8434		parseSrtSubtitles: function(srt) {
8435			var subtitlesArr = [];
8436			var textSubtitles = [];
8437			var i = 0;
8438			var arrs = srt.split('\n');
8439			var arr = [];
8440			var delHtmlTag = function(str) {
8441				return str.replace(/<[^>]+>/g, ''); //去掉所有的html标记
8442			};
8443			for (i = 0; i < arrs.length; i++) {
8444				if (arrs[i].replace(/\s/g, '').length > 0) {
8445					arr.push(arrs[i]);
8446				} else {
8447					if (arr.length > 0) {
8448						textSubtitles.push(arr);
8449					}
8450					arr = [];
8451				}
8452			}
8453			for (i = 0; i < textSubtitles.length; ++i) {
8454				var textSubtitle = textSubtitles[i];
8455				if (textSubtitle.length >= 2) {
8456					var sn = textSubtitle[0]; // 字幕的序号
8457					var startTime = this.toSeconds(this.trim(textSubtitle[1].split(' --> ')[0])); // 字幕的开始时间
8458					var endTime = this.toSeconds(this.trim(textSubtitle[1].split(' --> ')[1])); // 字幕的结束时间
8459					var content = [delHtmlTag(textSubtitle[2])]; // 字幕的内容
8460					var cktrackdelay=this.vars['cktrackdelay'];
8461					if(cktrackdelay!=0){
8462						startTime+=cktrackdelay;
8463						endTime+=cktrackdelay;
8464					}
8465					// 字幕可能有多行
8466					if (textSubtitle.length > 2) {
8467						for (var j = 3; j < textSubtitle.length; j++) {
8468							content.push(delHtmlTag(textSubtitle[j]));
8469						}
8470					}
8471					// 字幕对象
8472					var subtitle = {
8473						sn: sn,
8474						startTime: startTime,
8475						endTime: endTime,
8476						content: content
8477					};
8478					subtitlesArr.push(subtitle);
8479				}
8480			}
8481			return subtitlesArr;
8482		},
8483		/*
8484			共用函数
8485			计时器,该函数模拟as3中的timer原理
8486			time:计时时间,单位:毫秒
8487			fun:接受函数
8488			number:运行次数,不设置则无限运行
8489		*/
8490		timer: function(time, fun, number) {
8491			var thisTemp = this;
8492			this.time = 10; //运行间隔
8493			this.fun = null; //监听函数
8494			this.timeObj = null; //setInterval对象
8495			this.number = 0; //已运行次数
8496			this.numberTotal = null; //总至需要次数
8497			this.runing = false; //当前状态
8498			this.startFun = function() {
8499				thisTemp.number++;
8500				thisTemp.fun();
8501				if (thisTemp.numberTotal != null && thisTemp.number >= thisTemp.numberTotal) {
8502					thisTemp.stop();
8503				}
8504			};
8505			this.start = function() {
8506				if (!thisTemp.runing) {
8507					thisTemp.runing = true;
8508					thisTemp.timeObj = window.setInterval(thisTemp.startFun, time);
8509				}
8510			};
8511			this.stop = function() {
8512				if (thisTemp.runing) {
8513					thisTemp.runing = false;
8514					window.clearInterval(thisTemp.timeObj);
8515					thisTemp.timeObj = null;
8516				}
8517			};
8518			if (time) {
8519				this.time = time;
8520			}
8521			if (fun) {
8522				this.fun = fun;
8523			}
8524			if (number) {
8525				this.numberTotal = number;
8526			}
8527			this.start();
8528		},
8529		/*
8530			共用函数
8531			将时分秒转换成秒
8532		*/
8533		toSeconds: function(t) {
8534			var s = 0.0;
8535			if (t) {
8536				var p = t.split(':');
8537				for (i = 0; i < p.length; i++) {
8538					s = s * 60 + parseFloat(p[i].replace(',', '.'));
8539				}
8540			}
8541			return s;
8542		},
8543		/*将字符变成数字形式的数组*/
8544		arrayInt: function(str) {
8545			var a = str.split(',');
8546			var b = [];
8547			for (var i = 0; i < a.length; i++) {
8548				if (this.isUndefined(a[i])) {
8549					a[i] = 0;
8550				}
8551				if (a[i].substr( - 1) != '%') {
8552					a[i] = parseInt(a[i]);
8553				}
8554				b.push(a[i]);
8555			}
8556			return b;
8557		},
8558		/*
8559			共用函数
8560			将对象Object标准化
8561		*/
8562		standardization: function(o, n) { //n替换进o
8563			var h = {};
8564			var k;
8565			for (k in o) {
8566				h[k] = o[k];
8567			}
8568			for (k in n) {
8569				var type = typeof(h[k]);
8570				switch (type) {
8571				case 'number':
8572					h[k] = parseFloat(n[k]);
8573					break;
8574				default:
8575					h[k] = n[k];
8576					break;
8577				}
8578
8579			}
8580			return h;
8581		},
8582		/*
8583			共用函数
8584			搜索数组
8585		 */
8586		arrIndexOf: function(arr, key) {
8587			var re = new RegExp(key, ['']);
8588			return (arr.toString().replace(re, '┢').replace(/[^,┢]/g, '')).indexOf('┢');
8589		},
8590		/*
8591			共用函数
8592			去掉空格
8593		 */
8594		trim: function(str) {
8595			if (str != '') {
8596				return str.replace(/(^\s*)|(\s*$)/g, '');
8597			}
8598			return '';
8599		},
8600		/*
8601			共用函数
8602			判断对象类型
8603		*/
8604		typeString:function typeString(object) {
8605   			return Object.prototype.toString.call(object).slice(8,-1).toLowerCase();
8606		},
8607		/*
8608			共用函数
8609			输出内容到控制台
8610		*/
8611		log: function(val) {
8612			try {
8613				console.log(val);
8614			} catch(e) {}
8615		},
8616		/*
8617			共用函数
8618			弹出提示
8619		*/
8620		eject: function(er, val) {
8621			if (!this.vars['debug']) {
8622				return;
8623			}
8624			var errorVal = er[1];
8625			if (!this.isUndefined(val)) {
8626				errorVal = errorVal.replace('[error]', val);
8627			}
8628			var value = 'error ' + er[0] + ':' + errorVal;
8629			try {
8630				this.log(value);
8631			} catch(e) {}
8632		}
8633	};
8634	window.ckplayer = ckplayer;
8635})();

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.