!function(){var javascriptPath="",a,e;a=document.scripts,e=a[a.length-1].src,javascriptPath=e.substring(0,e.lastIndexOf("/")+1);var chplayer=function(t){t&&this.embed(t)};chplayer.prototype={config:{videoClick:!0,videoDbClick:!0,errorTime:100,videoDrawImage:!1},varsConfig:{container:"",variable:"chplayer",volume:.8,poster:"",autoplay:!0,loop:!1,live:!1,seek:0,drag:"",front:"",next:"",loaded:"",flashplayer:!1,html5m3u8:!1,track:null,chtrack:null,preview:null,prompt:null,video:null,debug:!1},vars:{},language:{volume:"音量：",play:"点击播放",pause:"点击暂停",full:"点击全屏",escFull:"退出全屏",mute:"点击静音",escMute:"取消静音",front:"上一集",next:"下一集",definition:"点击选择清晰度",error:"加载出错"},contextMenu:[["chplayer","link","http://www.chplayer.com"],["v1.0","default"],["播放视频","function","play","line"],["暂停视频","function","pause"],["播放/暂停","function","playOrPause"],["下一集","javascript","nextFun","line"]],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]"]],logo:"",loaded:!1,timerError:null,error:!1,errorUrl:[],errorFunArr:[],timerFull:null,full:!1,fullFunArr:[],videoChangeFunArr:[],timerTime:null,timerBuffer:null,isTimeButtonMove:!0,isTimeButtonDown:!1,isClick:!1,timerClick:null,timerLoading:null,timerCBar:null,needSeek:0,volume:0,time:0,isFirst:!0,html5Video:!0,pdCoor:{x:0,y:0},playerType:"",loadTime:0,body:document.body||document.documentElement,V:null,listenerArr:[],buttonLen:0,buttonArr:[],buttonWidth:{},elementArr:[],track:[],trackIndex:0,nowTrackShow:{sn:""},trackElement:[],timerVCanvas:null,animateArray:[],animateElementArray:[],animatePauseArray:[],previewStart:0,previewDiv:null,previewTop:null,previewWidth:120,previewTween:null,isM3u8:!1,promptArr:[],promptElement:null,embed:function(t){if(void 0!=t&&t){if("object"!=typeof t&&this.eject(this.errorList[1]),this.vars=this.standardization(this.varsConfig,t),(!this.supportVideo()&&""!=this.vars.flashplayer||this.vars.flashplayer)&&(this.html5Video=!1),this.vars.video)return this.analysedVideoUrl(this.vars.video),this;this.eject(this.errorList[2])}else this.eject(this.errorList[0])},analysedVideoUrl:function(t){var e=0,i=0,s=this;if(this.VA=[],"string"==typeof t){switch(this.VA=[[t,"","",0]],this.getFileExt(t)){case".mp4":this.VA[0][1]="video/mp4";break;case".ogg":this.VA[0][1]="video/ogg";break;case".webm":this.VA[0][1]="video/webm"}this.getVideo()}else if("object"==typeof t)if(this.isUndefined(typeof t.length))this.isUndefined(t.type)?this.isUndefined(t.url)?this.eject(this.errorList[5]):(t.success=function(t){s.analysedVideoUrl(t)},this.ajax(t)):(this.VA.push([t.url,t.type,"",0]),this.getVideo());else{if("string"==typeof t[0]){if(t.length%2==1)return void this.eject(this.errorList[3]);for(e=0;e<t.length;e++)e%2==0&&this.VA.push([t[e],t[e+1],"",0])}else if(this.isUndefined(typeof t[0].length))for(e=0;e<t.length;e++){var n=t[e].list;for(i=0;i<n.length;i++)this.VA.push([n[i].url,n[i].type,t[e].definition,this.isUndefined(n[i].weight)?0:n[i].weight])}else this.VA=t;this.getVideo()}else this.eject(this.errorList[4])},getHtml5Video:function(){var t=this.VA,e=[],i=!1,s=document.createElement("video"),n=function(t){var e="";switch(t){case"video/mp4":e="avc1.4D401E, mp4a.40.2";break;case"video/ogg":e="theora, vorbis";break;case"video/webm":e="vp8.0, vorbis"}return e},r=function(t,e){if(s.canPlayType)return""!=s.canPlayType(t+';codecs="'+e+'"');this.html5Video=!1};if(this.vars.flashplayer)this.html5Video=!1;else{navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)&&(i=!0);for(var a=0;a<t.length;a++){var o=t[a];o&&(""!=o[1]&&!i&&r(o[1],n(o[1]))&&"rtmp"!=o[0].substr(0,4)&&e.push(o),".m3u8"==this.getFileExt(o[0])&&this.vars.html5m3u8&&(this.isM3u8=!0,e.push(o)))}e.length>0?this.VA=e:i||(this.html5Video=!1)}},getVideo:function(){if(this.V)this.changeVideo();else{this.vars.chtrack&&this.loadTrack(),this.getHtml5Video();var t=this,e=this.vars,i="",s="",n="",r="",a="",o="",l=(e.video,0);if(this.CD=this.getByElement(e.container),volume=e.volume,!this.CD)return this.eject(this.errorList[6],e.container),!1;var h="chplayer"+this.randomString(),d=document.createElement("div");if(d.className=h,this.V=void 0,this.CD.innerHTML="",this.CD.appendChild(d),this.PD=this.getByElement(h),this.css(this.CD,{backgroundColor:"#000000",overflow:"hidden",position:"relative"}),this.css(this.PD,{backgroundColor:"#000000",width:"100%",height:"100%",fontFamily:'"Microsoft YaHei", YaHei, "微软雅黑", SimHei,"FAE8F6F96C59ED1", "黑体",Arial'}),this.html5Video){if(this.PD.onselectstart=this.PD.ondrag=function(){return!1},1==this.VA.length)i=' src="'+this.VA[0][0]+'"';else{var c=this.VA.slice(0);for(c=this.arrSort(c),l=0;l<c.length;l++){var u="",p=c[l];p[1]&&(u=' type="'+p[1]+'"'),s+='<source src="'+p[0]+'"'+u+">"}}if(e.autoplay&&(a=' autoplay="autoplay"'),e.poster&&(n=' poster="'+e.poster+'"'),e.loop&&(r=' loop="loop"'),e.seek>0&&(this.needSeek=e.seek),null!=e.track&&null==e.chtrack){var m=e.track,f="",v=!1;for(l=0;l<m.length;l++){var g=m[l];g.default&&!v?(f=" default",v=!0):f="",o+='<track kind="'+g.kind+'" src="'+g.src+'" srclang="'+g.srclang+'" label="'+g.label+'"'+f+">"}}var y=this.randomString(),b="";if(b=this.isM3u8?'<video id="'+y+'" width="100%" height="100%"'+n+r+' webkit-playsinline="true">'+o+"</video>":'<video id="'+y+'"'+i+' width="100%" height="100%"'+a+n+r+' webkit-playsinline="true">'+s+o+"</video>",this.PD.innerHTML=b,this.V=this.getByElement("#"+y),this.V.volume=volume,this.isM3u8){this.loadJs(javascriptPath+"hls/hls.min.js",function(){t.embedHls(t.VA[0][0],e.autoplay)})}if(this.css(this.V,"backgroundColor","#000000"),this.config.videoDrawImage){var C="vcanvas"+this.randomString(),B=document.createElement("div");B.className=C,this.PD.appendChild(B),this.MD=this.getByElement(C),this.css(this.MD,{backgroundColor:"#000000",width:"100%",height:"100%",position:"absolute",display:"none",cursor:"pointer",left:"0px",top:"0px",zIndex:"10"});var x="ccanvas"+this.randomString();this.MD.innerHTML=this.newCanvas(x,this.PD.offsetWidth,this.PD.offsetHeight),this.MDC=this.getByElement(x+"-canvas"),this.MDCX=this.MDC.getContext("2d")}this.playerType="html5video",this.addVEvent(),this.definition(),this.playerLoad()}else this.embedSWF()}},playerLoad:function(){var t=this;this.isFirst&&(this.isFirst=!1,window.setTimeout(function(){t.loadedHandler()},1))},addVEvent:function(){var t=this,e=function(e){t.videoClick()};this.addListener("click",e),this.addListener("click",e,this.MDC),this.timerErrorFun();this.addListener("loadedmetadata",function(e){t.judgeIsLive()});this.addListener("playing",function(e){t.playingHandler()});this.addListener("pause",function(e){t.pauseHandler()});this.addListener("timeupdate",function(e){null!=t.timerLoading&&t.loadingStart(!1)});this.addListener("waiting",function(e){t.loadingStart(!0)});this.addListener("seeked",function(e){t.seekedHandler()});this.addListener("ended",function(e){t.endedHandler()});this.addListener("volumechange",function(e){try{t.volumechangeHandler()}catch(e){}}),this.interFace()},resetPlayer:function(){this.timeTextHandler(),this.timeProgress(0,1),this.initPlayPause(),this.definition(),this.showFrontNext(),this.deletePrompt(),this.deletePreview(),this.trackHide(),this.resetTrack(),this.trackElement=[],this.track=[]},interFace:function(){var t=this,e="",i="#FFFFFF",s="#0782F5",n="00:00 / 00:00",r=this.randomString(10),a="controlbgbar"+r,o="controlbar"+r,l="timeprogressbg"+r,h="loadprogress"+r,d="timeprogress"+r,c="timebobg"+r,u="timebo"+r,p="timebw"+r,m="timetext"+r,f="play"+r,v="pause"+r,g="front"+r,y="next"+r,b="full"+r,C="escfull"+r,B="mute"+r,x="escmute"+r,w="volume"+r,T="volumedbg"+r,k="volumebg"+r,F="volumeup"+r,E="volumebo"+r,L="volumebw"+r,V="definition"+r,S="definitionp"+r,I="promptbg"+r,P="prompt"+r,j="dline"+r,A="menu"+r,M="pausecenter"+r,H="loading"+r,D="errortext"+r,O="logo"+r,W=document.createElement("div"),N=document.createElement("div"),R=document.createElement("div"),U=document.createElement("div"),z=document.createElement("div"),q=document.createElement("div"),X=document.createElement("div"),_=document.createElement("div"),Y=document.createElement("div"),J=document.createElement("div"),Q=document.createElement("div"),G=document.createElement("div");W.className=a,N.className=o,R.className=l,U.className=c,X.className=I,_.className=P,Y.className=A,J.className=S,z.className=M,Q.className=H,G.className=O,q.className=D,this.PD.appendChild(W),this.PD.appendChild(N),this.PD.appendChild(R),this.PD.appendChild(U),this.PD.appendChild(X),this.PD.appendChild(_),this.PD.appendChild(J),this.PD.appendChild(z),this.PD.appendChild(Q),this.PD.appendChild(q),this.PD.appendChild(G),this.body.appendChild(Y),this.vars.live&&(n=this.getNowDate()),e+='<div class="'+f+'" data-title="'+t.language.play+'">'+this.newCanvas(f,38,38)+"</div>",e+='<div class="'+v+'" data-title="'+t.language.pause+'">'+this.newCanvas(v,38,38)+"</div>",e+='<div class="'+j+'-la"></div>',e+='<div class="'+g+'" data-title="'+t.language.front+'">'+this.newCanvas(g,38,38)+"</div>",e+='<div class="'+j+'-lb"></div>',e+='<div class="'+y+'" data-title="'+t.language.next+'">'+this.newCanvas(y,38,38)+"</div>",e+='<div class="'+j+'-lc"></div>',e+='<div class="'+m+'">'+n+"</div>",e+='<div class="'+b+'" data-title="'+t.language.full+'">'+this.newCanvas(b,38,38)+"</div>",e+='<div class="'+C+'" data-title="'+t.language.escFull+'">'+this.newCanvas(C,38,38)+"</div>",e+='<div class="'+j+'-ra"></div>',e+='<div class="'+V+'" data-title="'+t.language.definition+'"></div>',e+='<div class="'+j+'-rb"></div>',e+='<div class="'+w+'"><div class="'+T+'"><div class="'+k+'"><div class="'+F+'"></div></div><div class="'+E+'"><div class="'+L+'"></div></div></div></div>',e+='<div class="'+B+'" data-title="'+t.language.mute+'">'+this.newCanvas(B,38,38)+"</div>",e+='<div class="'+x+'" data-title="'+t.language.escMute+'">'+this.newCanvas(x,38,38)+"</div>",e+='<div class="'+j+'-rc"></div>',this.getByElement(o).innerHTML=e,this.getByElement(l).innerHTML='<div class="'+h+'"></div><div class="'+d+'"></div>',this.getByElement(c).innerHTML='<div class="'+u+'"><div class="'+p+'"></div></div>',this.getByElement(M).innerHTML=this.newCanvas(M,80,80),this.getByElement(H).innerHTML=this.newCanvas(H,60,60),this.getByElement(D).innerHTML=this.language.error,this.getByElement(O).innerHTML=this.vars.logo||this.logo;var $=this.PD;this.CB={controlBarBg:this.getByElement(a,$),controlBar:this.getByElement(o,$),promptBg:this.getByElement(I,$),prompt:this.getByElement(P,$),timeProgressBg:this.getByElement(l,$),loadProgress:this.getByElement(h,$),timeProgress:this.getByElement(d,$),timeBoBg:this.getByElement(c,$),timeButton:this.getByElement(u,$),timeText:this.getByElement(m,$),play:this.getByElement(f,$),front:this.getByElement(g,$),next:this.getByElement(y,$),pause:this.getByElement(v,$),definition:this.getByElement(V,$),definitionP:this.getByElement(S,$),definitionLine:this.getByElement(j+"-rb",$),full:this.getByElement(b,$),escFull:this.getByElement(C,$),mute:this.getByElement(B,$),escMute:this.getByElement(x,$),volume:this.getByElement(w,$),volumeBg:this.getByElement(k,$),volumeUp:this.getByElement(F,$),volumeBO:this.getByElement(E,$),pauseCenter:this.getByElement(M,$),menu:this.getByElement(A),loading:this.getByElement(H,$),loadingCanvas:this.getByElement(H+"-canvas",$),errorText:this.getByElement(D,$),logo:this.getByElement(O,$),playLine:this.getByElement(j+"-la",$),frontLine:this.getByElement(j+"-lb",$),nextLine:this.getByElement(j+"-lc",$),fullLine:this.getByElement(j+"-ra"),definitionLine:this.getByElement(j+"-rb",$),muteLine:this.getByElement(j+"-rc",$)},this.buttonWidth={play:38,full:38,front:38,next:38,mute:38},this.css(a,{width:"100%",height:"38px",backgroundColor:"#000000",position:"absolute",bottom:"0px",filter:"alpha(opacity:0.8)",opacity:"0.8",zIndex:"90"}),this.css(o,{width:"100%",height:"38px",position:"absolute",bottom:"0px",zIndex:"90"}),this.css(M,{width:"80px",height:"80px",borderRadius:"50%",position:"absolute",display:"none",cursor:"pointer",zIndex:"100"}),this.css(H,{width:"60px",height:"60px",position:"absolute",display:"none",zIndex:"100"}),this.css(D,{width:"120px",height:"30px",lineHeight:"30px",color:"#FFFFFF",fontSize:"14px",textAlign:"center",position:"absolute",display:"none",zIndex:"101",cursor:"default",zIndex:"100"}),this.css(O,{height:"30px",lineHeight:"30px",color:"#FFFFFF",fontFamily:"Arial",fontSize:"28px",textAlign:"center",position:"absolute",float:"left",left:"-1000px",top:"20px",zIndex:"100",filter:"alpha(opacity:0.8)",opacity:"0.8",cursor:"default"}),this.css(this.CB.loadingCanvas,{transform:"rotate(0deg)",msTransform:"rotate(0deg)",mozTransform:"rotate(0deg)",webkitTransform:"rotate(0deg)",oTransform:"rotate(0deg)"}),this.css([I,P],{height:"30px",lineHeight:"30px",color:"#FFFFFF",fontSize:"14px",textAlign:"center",position:"absolute",borderRadius:"5px",paddingLeft:"5px",paddingRight:"5px",bottom:"0px",display:"none",zIndex:"95"}),this.css(I,{backgroundColor:"#000000",filter:"alpha(opacity:0.5)",opacity:"0.5"}),this.css(l,{width:"100%",height:"6px",backgroundColor:"#3F3F3F",overflow:"hidden",position:"absolute",bottom:"38px",zIndex:"88"}),this.css([h,d],{width:"1px",height:"6px",position:"absolute",bottom:"38px",top:"0px",zIndex:"91"}),this.css(h,"backgroundColor","#6F6F6F"),this.css(d,"backgroundColor",s),this.css(c,{width:"100%",height:"14px",overflow:"hidden",position:"absolute",bottom:"34px",cursor:"pointer",zIndex:"92"}),this.css(u,{width:"14px",height:"14px",overflow:"hidden",borderRadius:"50%",backgroundColor:i,cursor:"pointer",position:"absolute",top:"0px",zIndex:"20"}),this.css(p,{width:"8px",height:"8px",overflow:"hidden",borderRadius:"50%",position:"absolute",backgroundColor:s,left:"3px",top:"3px"}),this.css(m,{lineHeight:"38px",color:"#FFFFFF",fontFamily:"arial",fontSize:"16px",paddingLeft:"10px",float:"left",overflow:"hidden",cursor:"default"}),this.css([j+"-la",j+"-lb",j+"-lc",j+"-ra",j+"-rb",j+"-rc"],{width:"0px",height:"38px",overflow:"hidden",borderLeft:"1px solid #303030",borderRight:"1px solid #151515",filter:"alpha(opacity:0.9)",opacity:"0.9"}),this.css([j+"-la",j+"-lb",j+"-lc"],"float","left"),this.css([j+"-ra",j+"-rb",j+"-rc"],"float","right"),this.css([j+"-lb",j+"-lc",j+"-rb"],"display","none"),this.css([f,v,g,y],{width:"38px",height:"38px",float:"left",overflow:"hidden",cursor:"pointer"}),this.css([g,y],"display","none"),this.initPlayPause(),this.css([B,x],{width:"38px",height:"38px",float:"right",overflow:"hidden",cursor:"pointer"}),this.vars.volume>0?this.css(x,"display","none"):this.css(B,"display","none"),this.css([w,T],{width:"110px",height:"38px",overflow:"hidden",float:"right"}),this.css(T,{position:"absolute"}),this.css([k,F],{width:"100px",height:"6px",overflow:"hidden",borderRadius:"5px",cursor:"pointer"}),this.css(k,{position:"absolute",top:"16px"}),this.css(k,"backgroundColor","#666666"),this.css(F,"backgroundColor",s),this.buttonWidth.volume=100,this.css(E,{width:"12px",height:"12px",overflow:"hidden",borderRadius:"50%",position:"absolute",backgroundColor:i,top:"13px",left:"0px",cursor:"pointer"}),this.css(L,{width:"6px",height:"6px",overflow:"hidden",borderRadius:"50%",position:"absolute",backgroundColor:s,left:"3px",top:"3px"}),this.css(V,{lineHeight:"38px",color:"#FFFFFF",float:"right",fontSize:"14px",textAlign:"center",overflow:"hidden",display:"none",cursor:"pointer"}),this.css(S,{lineHeight:"30px",color:"#FFFFFF",overflow:"hidden",position:"absolute",bottom:"4px",backgroundColor:"#000000",textAlign:"center",zIndex:"95",cursor:"pointer",display:"none"}),this.css([b,C],{width:"38px",height:"38px",float:"right",overflow:"hidden",cursor:"pointer"}),this.css(C,"display","none");var K=this.getByElement(f+"-canvas").getContext("2d"),Z=function(){t.canvasFill(K,[[12,10],[29,19],[12,28]])};K.fillStyle=i,Z();this.addListener("mouseover",function(t){K.clearRect(0,0,38,38),K.fillStyle=s,Z()},this.getByElement(f+"-canvas")),this.addListener("mouseout",function(t){K.clearRect(0,0,38,38),K.fillStyle=i,Z()},this.getByElement(f+"-canvas"));var tt=this.getByElement(v+"-canvas").getContext("2d"),et=function(){t.canvasFillRect(tt,[[10,10,5,18],[22,10,5,18]])};tt.fillStyle=i,et();this.addListener("mouseover",function(t){tt.clearRect(0,0,38,38),tt.fillStyle=s,et()},this.getByElement(v+"-canvas")),this.addListener("mouseout",function(t){tt.clearRect(0,0,38,38),tt.fillStyle=i,et()},this.getByElement(v+"-canvas"));var it=this.getByElement(g+"-canvas").getContext("2d"),st=function(){t.canvasFill(it,[[16,19],[30,10],[30,28]]),t.canvasFillRect(it,[[8,10,5,18]])};it.fillStyle=i,st();this.addListener("mouseover",function(t){it.clearRect(0,0,38,38),it.fillStyle=s,st()},this.getByElement(g+"-canvas")),this.addListener("mouseout",function(t){it.clearRect(0,0,38,38),it.fillStyle=i,st()},this.getByElement(g+"-canvas"));var nt=this.getByElement(y+"-canvas").getContext("2d"),rt=function(){t.canvasFill(nt,[[8,10],[22,19],[8,28]]),t.canvasFillRect(nt,[[25,10,5,18]])};nt.fillStyle=i,rt();this.addListener("mouseover",function(t){nt.clearRect(0,0,38,38),nt.fillStyle=s,rt()},this.getByElement(y+"-canvas")),this.addListener("mouseout",function(t){nt.clearRect(0,0,38,38),nt.fillStyle=i,rt()},this.getByElement(y+"-canvas"));var at=this.getByElement(b+"-canvas").getContext("2d"),ot=function(){t.canvasFillRect(at,[[19,10,9,3],[25,13,3,6],[10,19,3,9],[13,25,6,3]])};at.fillStyle=i,ot();this.addListener("mouseover",function(){at.clearRect(0,0,38,38),at.fillStyle=s,ot()},this.getByElement(b+"-canvas")),this.addListener("mouseout",function(){at.clearRect(0,0,38,38),at.fillStyle=i,ot()},this.getByElement(b+"-canvas"));var lt=this.getByElement(C+"-canvas").getContext("2d"),ht=function(){t.canvasFillRect(lt,[[20,9,3,9],[23,15,6,3],[9,20,9,3],[15,23,3,6]])};lt.fillStyle=i,ht();this.addListener("mouseover",function(){lt.clearRect(0,0,38,38),lt.fillStyle=s,ht()},this.getByElement(C+"-canvas")),this.addListener("mouseout",function(){lt.clearRect(0,0,38,38),lt.fillStyle=i,ht()},this.getByElement(C+"-canvas"));var dt=this.getByElement(B+"-canvas").getContext("2d"),ct=function(){t.canvasFill(dt,[[10,15],[15,15],[21,10],[21,28],[15,23],[10,23]]),t.canvasFillRect(dt,[[23,15,2,8],[27,10,2,18]])};dt.fillStyle=i,ct();this.addListener("mouseover",function(){dt.clearRect(0,0,38,38),dt.fillStyle=s,ct()},this.getByElement(B+"-canvas")),this.addListener("mouseout",function(){dt.clearRect(0,0,38,38),dt.fillStyle=i,ct()},this.getByElement(B+"-canvas"));var ut=this.getByElement(x+"-canvas").getContext("2d"),pt=function(){t.canvasFill(ut,[[10,15],[15,15],[21,10],[21,28],[15,23],[10,23]]),t.canvasFill(ut,[[23,13],[24,13],[33,25],[32,25]]),t.canvasFill(ut,[[32,13],[33,13],[24,25],[23,25]])};ut.fillStyle=i,pt();this.addListener("mouseover",function(){ut.clearRect(0,0,38,38),ut.fillStyle=s,pt()},this.getByElement(x+"-canvas")),this.addListener("mouseout",function(){ut.clearRect(0,0,38,38),ut.fillStyle=i,pt()},this.getByElement(x+"-canvas"));var mt=this.getByElement(H+"-canvas").getContext("2d");mt.fillStyle=i,function(){mt.save();var t=mt.createLinearGradient(0,0,60,60);t.addColorStop(0,i);var e=mt.createLinearGradient(0,0,80,60);e.addColorStop(1,s),mt.strokeStyle=t,mt.lineWidth=8,mt.beginPath(),mt.arc(30,30,25,.25*Math.PI,2*Math.PI,!1),mt.stroke(),mt.closePath(),mt.beginPath(),mt.strokeStyle=e,mt.arc(30,30,25,0,.25*Math.PI,!1),mt.stroke(),mt.closePath(),mt.restore()}();var ft=this.getByElement(M+"-canvas").getContext("2d"),vt=function(){t.canvasFill(ft,[[28,22],[59,38],[28,58]]),ft.save(),ft.lineWidth=5,ft.beginPath(),ft.arc(40,40,35,0,2*Math.PI,!1),ft.stroke(),ft.closePath(),ft.restore()};ft.fillStyle=i,ft.strokeStyle=i,vt();this.addListener("mouseover",function(){ft.clearRect(0,0,80,80),ft.fillStyle=s,ft.strokeStyle=s,vt()},this.getByElement(M+"-canvas")),this.addListener("mouseout",function(){ft.clearRect(0,0,80,80),ft.fillStyle=i,ft.strokeStyle=i,vt()},this.getByElement(M+"-canvas"));this.addListener("mouseover",function(){t.css(E,"backgroundColor",s),t.css(L,"backgroundColor",i)},this.getByElement(E)),this.addListener("mouseout",function(){t.css(E,"backgroundColor",i),t.css(L,"backgroundColor",s)},this.getByElement(E));this.addListener("mouseover",function(){t.css(u,"backgroundColor",s),t.css(p,"backgroundColor",i)},this.getByElement(u)),this.addListener("mouseout",function(){t.css(u,"backgroundColor",i),t.css(p,"backgroundColor",s)},this.getByElement(u)),this.addButtonEvent(),this.newMenu(),this.controlBarHide(),this.keypress(),this.changeVolume(this.vars.volume),this.showFrontNext(),window.setTimeout(function(){t.elementCoordinate()},100),this.checkBarWidth();this.addListener("resize",function(){t.elementCoordinate(),t.timeUpdateHandler(),t.changeLoad(),t.checkBarWidth(),t.changeElementCoor(),t.changePrompt()},window)},newCanvas:function(t,e,i){return'<canvas class="'+t+'-canvas" width="'+e+'" height="'+i+'"></canvas>'},addButtonEvent:function(){var thisTemp=this,playClick=function(t){thisTemp.play()};this.addListener("click",playClick,this.CB.play),this.addListener("click",playClick,this.CB.pauseCenter);var pauseClick=function(t){thisTemp.pause()};this.addListener("click",pauseClick,this.CB.pause);var frontClick=function(event){thisTemp.vars.front&&eval(thisTemp.vars.front+"()")};this.addListener("click",frontClick,this.CB.front);var nextClick=function(event){thisTemp.vars.next&&eval(thisTemp.vars.next+"()")};this.addListener("click",nextClick,this.CB.next);var muteClick=function(t){thisTemp.changeVolumeTemp=thisTemp.V&&thisTemp.V.volume>0?thisTemp.V.volume:thisTemp.vars.volume,thisTemp.changeVolume(0)};this.addListener("click",muteClick,this.CB.mute);var escMuteClick=function(t){thisTemp.changeVolume(thisTemp.changeVolumeTemp>0?thisTemp.changeVolumeTemp:thisTemp.vars.volume)};this.addListener("click",escMuteClick,this.CB.escMute);var fullClick=function(t){thisTemp.fullScreen()};this.addListener("click",fullClick,this.CB.full);var escFullClick=function(t){thisTemp.quitFullScreen()};this.addListener("click",escFullClick,this.CB.escFull);var promptHide=function(t){thisTemp.promptShow(!1)},playOver=function(t){thisTemp.promptShow(thisTemp.CB.play)};this.addListener("mouseover",playOver,this.CB.play),this.addListener("mouseout",promptHide,this.CB.play);var pauseOver=function(t){thisTemp.promptShow(thisTemp.CB.pause)};this.addListener("mouseover",pauseOver,this.CB.pause),this.addListener("mouseout",promptHide,this.CB.pause);var frontOver=function(t){thisTemp.promptShow(thisTemp.CB.front)};this.addListener("mouseover",frontOver,this.CB.front),this.addListener("mouseout",promptHide,this.CB.front);var nextOver=function(t){thisTemp.promptShow(thisTemp.CB.next)};this.addListener("mouseover",nextOver,this.CB.next),this.addListener("mouseout",promptHide,this.CB.next);var muteOver=function(t){thisTemp.promptShow(thisTemp.CB.mute)};this.addListener("mouseover",muteOver,this.CB.mute),this.addListener("mouseout",promptHide,this.CB.mute);var escMuteOver=function(t){thisTemp.promptShow(thisTemp.CB.escMute)};this.addListener("mouseover",escMuteOver,this.CB.escMute),this.addListener("mouseout",promptHide,this.CB.escMute);var fullOver=function(t){thisTemp.promptShow(thisTemp.CB.full)};this.addListener("mouseover",fullOver,this.CB.full),this.addListener("mouseout",promptHide,this.CB.full);var escFullOver=function(t){thisTemp.promptShow(thisTemp.CB.escFull)};this.addListener("mouseover",escFullOver,this.CB.escFull),this.addListener("mouseout",promptHide,this.CB.escFull);var definitionOver=function(t){thisTemp.promptShow(thisTemp.CB.definition)};this.addListener("mouseover",definitionOver,this.CB.definition),this.addListener("mouseout",promptHide,this.CB.definition);var volumePrompt=function(t){var e=thisTemp.getCoor(thisTemp.CB.volumeBO),i={title:thisTemp.language.volume+t+"%",x:e.x+.5*thisTemp.CB.volumeBO.offsetWidth,y:e.y};thisTemp.promptShow(!1,i)},volumeObj={slider:this.CB.volumeBO,follow:this.CB.volumeUp,refer:this.CB.volumeBg,grossValue:"volume",pd:!0,startFun:function(t){},monitorFun:function(t){thisTemp.changeVolume(.01*t,!1,!1),volumePrompt(t)},endFun:function(t){},overFun:function(t){volumePrompt(t)}};this.slider(volumeObj);var volumeClickObj={refer:this.CB.volumeBg,grossValue:"volume",fun:function(t){thisTemp.changeVolume(.01*t,!0,!0)}};this.progressClick(volumeClickObj),this.timeButtonMouseDown();var volumeBgMove=function(t){var e=thisTemp.getCoor(thisTemp.CB.volumeBg),i=thisTemp.client(t).x,s=parseInt(100*(i-e.x)/thisTemp.CB.volumeBg.offsetWidth),n={title:thisTemp.language.volume+s+"%",x:i,y:e.y};thisTemp.promptShow(!1,n)};this.addListener("mousemove",volumeBgMove,this.CB.volumeBg),this.addListener("mouseout",promptHide,this.CB.volumeBg),this.addListener("mouseout",promptHide,this.CB.volumeBO),this.addDefListener()},videoClick:function(){var t=this,e=function(){null!=t.timerClick&&(t.timerClick.runing&&t.timerClick.stop(),t.timerClick=null)};e(),this.isClick?(this.isClick=!1,t.config.videoDbClick&&(this.full?t.quitFullScreen():t.fullScreen())):(this.isClick=!0,this.timerClick=new this.timer(300,function(){e(),t.isClick=!1,t.playOrPause()},1))},timeButtonMouseDown:function(){var t=this,e={slider:this.CB.timeButton,follow:this.CB.timeProgress,refer:this.CB.timeBoBg,grossValue:"time",pd:!1,startFun:function(e){t.isTimeButtonMove=!1},monitorFun:function(t){},endFun:function(e){t.V&&t.V.duration>0&&(t.needSeek=0,t.seek(parseInt(e)))},overFun:function(e){!function(e){isNaN(e)&&(e=0);var i=t.getCoor(t.CB.timeButton),s={title:t.formatTime(e),x:i.x-t.pdCoor.x+.5*t.CB.timeButton.offsetWidth,y:i.y-t.pdCoor.y};t.promptShow(!1,s)}(e)}},i={refer:this.CB.timeBoBg,grossValue:"time",fun:function(e){t.V&&t.V.duration>0&&(t.needSeek=0,t.seek(parseInt(e)))}};this.vars.live?(this.isTimeButtonDown=!1,e.removeListener=!0,i.removeListener=!0):(this.isTimeButtonDown=!0,this.addListener("mousemove",function(e){var i=t.getCoor(t.CB.timeBoBg),s=t.client(e).x,n=parseInt((s-i.x)*t.V.duration/t.CB.timeBoBg.offsetWidth),r={title:t.formatTime(n),x:s,y:i.y};t.promptShow(!1,r);var a=!1;t.isUndefined(t.CB.definitionP)||"block"!=t.css(t.CB.definitionP,"display")&&(a=!0),null!=t.vars.preview&&a&&(r.time=n,t.preview(r))},this.CB.timeBoBg),this.addListener("mouseout",function(e){t.promptShow(!1),null!=t.previewDiv&&t.css([t.previewDiv,t.previewTop],"display","none")},this.CB.timeBoBg)),this.slider(e),this.progressClick(i)},progressClick:function(t){var e=this,i=function(i){var s=e.client(i).x-e.getCoor(t.refer).x,n=t.refer.offsetWidth,r=0;"volume"==t.grossValue?r=100:e.V&&(r=e.V.duration);var a=parseInt(s*r/n);t.fun&&t.fun(a)};this.isUndefined(t.removeListener)?this.addListener("click",i,t.refer):this.removeListener("click",i,t.refer)},slider:function(t){var e=this,i=0,s=0,n=0,r=0,a=function(){var i=parseInt(e.css(t.slider,"left")),s=t.refer.offsetWidth-t.slider.offsetWidth,n=0;return(e.isUndefined(i)||isNaN(i))&&(i=0),"volume"==t.grossValue?n=100:e.V&&(n=e.V.duration),parseInt(i*n/s)},o=function(o){e.addListener("mousemove",l,document),e.addListener("mouseup",h,document);var d=e.getCoor(t.refer),c=e.getCoor(t.slider);i=e.client(o).x,r=d.x,n=c.x,s=i-n,t.startFun&&t.startFun(a())},l=function(n){var o=(i=e.client(n).x)-s-r;o<0&&(o=0),o>t.refer.offsetWidth-t.slider.offsetWidth&&(o=t.refer.offsetWidth-t.slider.offsetWidth),e.css(t.slider,"left",o+"px"),e.css(t.follow,"width",o+.5*t.slider.offsetWidth+"px");var l=a();t.monitorFun&&t.monitorFun(l)},h=function(i){e.removeListener("mousemove",l,document),e.removeListener("mouseup",h,document),t.endFun&&t.endFun(a())},d=function(e){t.overFun&&t.overFun(a())};this.isUndefined(t.removeListener)?(this.addListener("mousedown",o,t.slider),this.addListener("mouseover",d,t.slider)):(this.removeListener("mousedown",o,t.slider),this.removeListener("mouseover",d,t.slider))},loadingStart:function(t){var e=this;this.isUndefined(t)&&(t=!0),this.css(e.CB.loading,"display","none"),null!=this.timerLoading&&(this.timerLoading.runing&&this.timerLoading.stop(),this.timerLoading=null);t&&(this.timerLoading=new this.timer(10,function(){var t="0";try{t=e.css(e.CB.loadingCanvas,"transform")||e.css(e.CB.loadingCanvas,"-ms-transform")||e.css(e.CB.loadingCanvas,"-moz-transform")||e.css(e.CB.loadingCanvas,"-webkit-transform")||e.css(e.CB.loadingCanvas,"-o-transform")||"0"}catch(t){}t=parseInt(t.replace("rotate(","").replace("deg);","")),(t+=4)>360&&(t=0),e.css(e.CB.loadingCanvas,{transform:"rotate("+t+"deg)",msTransform:"rotate("+t+"deg)",mozTransform:"rotate("+t+"deg)",webkitTransform:"rotate("+t+"deg)",oTransform:"rotate("+t+"deg)"})}),this.css(e.CB.loading,"display","block"))},showFrontNext:function(){this.vars.front?this.css([this.CB.front,this.CB.frontLine],"display","block"):this.css([this.CB.front,this.CB.frontLine],"display","none"),this.vars.next?this.css([this.CB.next,this.CB.nextLine],"display","block"):this.css([this.CB.next,this.CB.nextLine],"display","none")},promptShow:function(t,e){var i={};if(t||e){if(this.isUndefined(e)){var s=this.getCoor(t);i={title:t.dataset.title,x:s.x+.5*t.offsetWidth,y:s.y}}else i=e;this.CB.prompt.innerHTML=i.title,this.css(this.CB.prompt,"display","block");var n=10*this.getStringLen(i.title);this.css(this.CB.promptBg,"width",n+"px"),this.css(this.CB.prompt,"width",n+"px"),n+=10;var r=i.x-.5*n,a=this.PD.offsetHeight-i.y+8;r<0&&(r=0),r>this.PD.offsetWidth-n&&(r=this.PD.offsetWidth-n),this.css([this.CB.promptBg,this.CB.prompt],{display:"block",left:r+"px",bottom:a+"px"})}else this.css([this.CB.promptBg,this.CB.prompt],{display:"none"})},timerErrorFun:function(){var t=this,e=function(e){null!=t.timerError&&(t.timerError.runing&&t.timerError.stop(),t.timerError=null)},i=function(i){e(),t.error=!0,t.errorUrl=t.getVideoUrl(),t.addListenerError(),t.css(t.CB.errorText,"display","block"),t.css(t.CB.pauseCenter,"display","none"),t.css(t.CB.loading,"display","none"),t.V.removeAttribute("poster"),t.resetPlayer()};this.addListener("error",function(e){window.setTimeout(function(){isNaN(t.V.duration)&&i()},500)},this.V),e();this.timerError=new this.timer(this.config.errorTime,function(){t.V&&3==parseInt(t.V.networkState)&&i()})},judgeFullScreen:function(){var t=this;null!=this.timerFull&&(this.timerFull.runing&&this.timerFull.stop(),this.timerFull=null);this.timerFull=new this.timer(20,function(){t.isFullScreen()})},isFullScreen:function(){var t=this.CB.controlBarBg.offsetWidth,e=this.CD.offsetWidth;t==e||this.full||(this.full=!0,this.addListenerFull(),this.elementCoordinate(),this.css(this.CB.full,"display","none"),this.css(this.CB.escFull,"display","block"),0==this.vars.live&&this.timeUpdateHandler(),this.PD.appendChild(this.CB.menu)),t==e&&this.full&&(this.full=!1,this.addListenerFull(),this.elementCoordinate(),this.css(this.CB.full,"display","block"),this.css(this.CB.escFull,"display","none"),null!=this.timerFull&&(this.timerFull.runing&&this.timerFull.stop(),this.timerFull=null),0==this.vars.live&&this.timeUpdateHandler(),this.body.appendChild(this.CB.menu))},newMenu:function(){var t=this,e=0;this.css(this.CB.menu,{backgroundColor:"#FFFFFF",padding:"5px",position:"absolute",left:"10px",top:"20px",display:"none",zIndex:"999",color:"#A1A9BE",boxShadow:"2px 2px 3px #AAAAAA"});var i=this.contextMenu,s="";for(e=0;e<i.length;e++){var n=i[e];switch(n[1]){case"default":s+="<p>"+n[0]+"</p>";break;case"link":s+='<p><a href="'+n[2]+'" target="_blank">'+n[0]+"</a></p>";break;case"javascript":s+='<p><a href="javascript:'+n[2]+'()">'+n[0]+"</a></p>";break;case"function":s+='<p><a href="javascript:'+this.vars.variable+"."+n[2]+'()">'+n[0]+"</a></p>"}}this.CB.menu.innerHTML=s;var r=this.CB.menu.childNodes;for(e=0;e<r.length;e++){this.css(r[e],{height:"30px",lineHeight:"30px",margin:"0px",fontFamily:'"Microsoft YaHei", YaHei, "微软雅黑", SimHei,"FAE8F6F96C59ED1", "黑体",Arial',fontSize:"12px",paddingLeft:"10px",paddingRight:"30px"}),i[e].length>=4&&"line"==i[e][3]&&this.css(r[e],"borderTop","1px solid #e9e9e9");for(var a=r[e].childNodes,o=0;o<a.length;o++)"a"==a[o].localName&&this.css(a[o],{color:"#000000",textDecoration:"none"})}this.PD.oncontextmenu=function(e){var i=e||window.event,s=t.client(e);if(2==i.button){i.returnvalue=!1;var n=s.x+t.pdCoor.x-2,r=s.y+t.pdCoor.y-2;return t.css(t.CB.menu,{display:"block",left:n+"px",top:r+"px"}),!1}return!0};var l=function(){h&&(window.clearTimeout(h),h=null)},h=null;this.addListener("mouseout",function(e){l(),h=window.setTimeout(function(e){t.css(t.CB.menu,"display","none")},500)},t.CB.menu);this.addListener("mouseover",function(t){l()},t.CB.menu)},controlBarHide:function(){var t=this,e={x:0,y:0},i={x:0,y:0},s=!0,n=function(e){e&&!s?(s=!0,t.css(t.CB.controlBarBg,"display","block"),t.css(t.CB.controlBar,"display","block"),t.css(t.CB.timeProgressBg,"display","block"),t.css(t.CB.timeBoBg,"display","block")):s&&(s=!1,t.getMetaDate().paused||(t.css(t.CB.controlBarBg,"display","none"),t.css(t.CB.controlBar,"display","none"),t.css(t.CB.timeProgressBg,"display","none"),t.css(t.CB.timeBoBg,"display","none"),t.promptShow(!1)))};this.timerCBar=new this.timer(2e3,function(r){if(e.x==i.x&&e.y==i.y){var a=parseInt(t.CD.offsetHeight);(e.y<a-50||e.y>a-2)&&s&&n(!1)}else s||n(!0);i={x:e.x,y:e.y}});var r=function(i){var r=t.client(i);e.x=r.x,e.y=r.y,s||n(!0)};this.addListener("mousemove",r,t.CD),this.addListener("ended",r),this.addListener("resize",r,window)},keypress:function(){var t=this;this.addListener("keydown",function(e){var i=0;switch(e.keyCode||e.which){case 32:t.playOrPause();break;case 37:i=t.time-10,t.seek(i<0?0:i);break;case 39:i=t.time+10,t.seek(i);break;case 38:i=t.volume+.1,t.changeVolume(i>1?1:i);break;case 40:i=t.volume-.1,t.changeVolume(i<0?0:i)}},window||document)},definition:function(){var t=this,e=this.VA,i=[],s="",n="",r=0;for(r=0;r<e.length;r++){var a=e[r][2];-1==i.indexOf(a)&&i.push(a),this.V&&e[r][0]==this.V.currentSrc&&(n=a)}if(n||(n=i[0]),i.length>1){var o=0;for(r=0;r<i.length;r++){s="<p>"+i[r]+"</p>"+s;var l=this.getStringLen(i[r]);l>o&&(o=l)}s&&(s+="<p>"+n+"</p>"),this.CB.definition.innerHTML=n,this.CB.definitionP.innerHTML=s,this.css([this.CB.definition,this.CB.definitionLine],"display","block");var h=this.CB.definitionP.childNodes;for(r=0;r<h.length;r++){var d="#FFFFFF";h[r].innerHTML==n&&(d="#0782F5"),this.css(h[r],{color:d,margin:"0px",padding:"0px",fontSize:"14px"}),r<h.length-1&&this.css(h[r],"borderBottom","1px solid #282828");this.addListener("click",function(){n!=this.innerHTML&&(t.css(t.CB.definitionP,"display","none"),t.newDefinition(this.innerHTML))},h[r])}var c=10*o+20;this.css(this.CB.definitionP,{width:c+"px"}),this.css(this.CB.definition,{width:c+"px"}),this.buttonWidth.definition=this.CB.definition.offsetWidth}else this.CB.definition.innerHTML="",this.CB.definitionP.innerHTML="",this.css([this.CB.definition,this.CB.definitionLine],"display","none")},addDefListener:function(){var t=this,e=null;this.addListener("click",function(e){t.css(t.CB.definitionP,{left:t.getCoor(t.CB.definition).x+"px",display:"block"})},this.CB.definition);this.addListener("mouseout",function(i){e&&(window.clearTimeout(e),e=null),e=window.setTimeout(function(e){t.css(t.CB.definitionP,"display","none")},500)},t.CB.definitionP);this.addListener("mouseover",function(t){e&&(window.clearTimeout(e),e=null)},t.CB.definitionP)},newDefinition:function(t){var e=this.VA,i=[],s=0;for(s=0;s<e.length;s++){var n=e[s];n[2]==t&&i.push(n)}if(!(i.length<1)){if(null!=this.V&&0==this.needSeek&&(this.needSeek=this.V.currentTime),".m3u8"!=this.getFileExt(i[0][0])&&(this.isM3u8=!1),this.isM3u8)this.embedHls(e[0][0],this.vars.autoplay);else if(1==i.length)this.V.innerHTML="",this.V.src=i[0][0];else{var r="";for(i=this.arrSort(i),s=0;s<i.length;s++){var a="",o=i[s];o[1]&&(a=' type="'+o[1]+'"'),r+='<source src="'+o[0]+'"'+a+">"}this.V.removeAttribute("src"),this.V.innerHTML=r}this.V.autoplay="autoplay",this.V.load(),this.timerErrorFun(),this.addListenerVideoChange()}},embedHls:function(t,e){var i=this;if(Hls.isSupported()){var s=new Hls;s.loadSource(t),s.attachMedia(this.V),s.on(Hls.Events.MANIFEST_PARSED,function(){i.playerLoad(),e&&i.play()})}},prompt:function(){var t=this,e=this.vars.prompt;if(!(null==e||this.promptArr.length>0)){var i=function(e){if(null==t.promptElement){var i="prompte"+t.randomString(5),s=document.createElement("div");s.className=i,t.PD.appendChild(s),t.promptElement=t.getByElement(i),t.css(t.promptElement,{overflowX:"hidden",lineHeight:"22px",fontSize:"14px",color:"#FFFFFF",position:"absolute",display:"block",zIndex:"90"})}var n=t.getPromptTest(),r=n.pW,a=n.pT,o=parseInt(t.css(this,"left"))-parseInt(.5*r);n.pL>10&&(o=n.pL),o<0&&(o=0),t.css(t.promptElement,{width:r+"px",left:-r-10+"px",display:"block"}),t.promptElement.innerHTML=this.dataset.words,t.css(t.promptElement,{left:o+"px",top:a-t.promptElement.offsetHeight+"px"})},s=function(e){null!=t.promptElement&&t.css(t.promptElement,{display:"none"})},n=0;for(n=0;n<e.length;n++){var r=e[n],a=r.words,o=r.time,l="prompt"+this.randomString(5),h=document.createElement("div");h.className=l,this.CB.timeBoBg.appendChild(h);var d=this.getByElement(l);d.setAttribute("data-time",o),d.setAttribute("data-words",a),this.css(d,{width:"6px",height:"6px",backgroundColor:"#FFFFFF",position:"absolute",top:"4px",left:"-100px",display:"none",zIndex:"1"}),this.addListener("mouseover",i,d),this.addListener("mouseout",s,d),this.promptArr.push(d)}this.changePrompt()}},getPromptTest:function(){var t=this.previewWidth,e=this.getCoor(this.CB.timeButton).y,i=0;return null!=this.previewTop?(e-=parseInt(this.css(this.previewTop,"height")),i=parseInt(this.css(this.previewTop,"left"))):e-=35,(i+=2)<0&&(i=0),i>this.PD.offsetWidth-t&&(i=this.PD.offsetWidth-t),{pW:t,pT:e,pL:i}},deletePrompt:function(){var t=this.promptArr;if(t.length>0)for(var e=0;e<t.length;e++)t[e]&&this.deleteChild(t[e]);this.promptArr=[]},changePrompt:function(){if(0!=this.promptArr.length)for(var t=this.promptArr,e=this.getMetaDate().duration,i=this.CB.timeBoBg.offsetWidth,s=0;s<t.length;s++){var n=parseInt(t[s].dataset.time),r=parseInt(n*i/e)-parseInt(.5*t[s].offsetWidth);r<0&&(r=0),r>i-parseInt(.5*t[s].offsetWidth)&&(r=i-parseInt(.5*t[s].offsetWidth)),this.css(t[s],{left:r+"px",display:"block"})}},preview:function(t){var e=this,i={src:null,scale:0};if(!(null==(i=this.standardization(i,this.vars.preview)).src||i.scale<=0)){var s=i.src;if(0!=this.previewStart){if(2==this.previewStart){var n=!0,r=parseInt(t.time/this.vars.preview.scale),a=parseInt(e.getMetaDate().duration/this.vars.preview.scale);"none"==e.css(e.previewDiv,"display")&&(n=!1),e.css(e.previewDiv,"display","block");var o=.01*e.previewDiv.offsetWidth/s.length,l=o*r-t.x+parseInt(.5*o),h=t.y-e.previewDiv.offsetHeight;e.css(e.previewDiv,"top",h+2+"px");var d=t.x-parseInt(.5*o),c=0;d<0&&(d=0,c=t.x-d-.5*o),d>e.PD.offsetWidth-o&&(d=e.PD.offsetWidth-o,c=t.x-d-.5*o),l<0&&(l=0),l>a*o-e.PD.offsetWidth&&(l=a*o-e.PD.offsetWidth),e.css(e.previewTop,{left:d+"px",top:h+2+"px",display:"block"}),e.previewTop.offsetHeight>e.previewDiv.offsetHeight&&e.css(e.previewTop,{height:e.previewDiv.offsetHeight-(e.previewTop.offsetHeight-e.previewDiv.offsetHeight)+"px"}),null!=this.previewTween&&(this.animatePause(this.previewTween),this.previewTween=null);var u=parseInt(e.css(e.previewDiv,"left"));if(u==-(l+c))return;if(n){t={element:e.previewDiv,start:null,end:-(l+c),speed:.3};this.previewTween=this.animate(t)}else e.css(e.previewDiv,"left",-(l+c)+"px")}}else{if(this.previewStart=1,s.length>0)var p=0,m=0,f=0,v=e.randomString(10),g=0,y=function(i){s[i]=e.getNewUrl(s[i]);var n=0,r=new Image;r.src=s[i],r.className=v+i,r.onload=function(a){if(g++,null==e.previewDiv){m=r.width,f=r.height,e.previewWidth=parseInt(.1*m);var o=document.createElement("div");o.className=v,e.PD.appendChild(o),e.previewDiv=e.getByElement(v);var l=t.y-parseInt(.1*f)+2;e.css(e.previewDiv,{width:s.length*m*10+"px",height:parseInt(.1*f)+"px",backgroundColor:"#000000",position:"absolute",left:"0px",top:l+"px",display:"none",zIndex:"80"}),o.setAttribute("data-x","0"),o.setAttribute("data-y",l);var h=document.createElement("div");h.className=v+"d2",e.PD.appendChild(h),e.previewTop=e.getByElement(h.className),e.css(e.previewTop,{width:parseInt(.1*m)+"px",height:parseInt(.1*f)+"px",position:"absolute",border:"5px solid "+e.css(e.CB.timeProgress,"backgroundColor"),left:"0px",top:t.y-parseInt(.1*f)+2+"px",display:"none",zIndex:"81"});var d="";for(n=0;n<s.length;n++)d+=e.newCanvas(v+n,10*m,parseInt(.1*f));e.previewDiv.innerHTML=d}e.previewDiv.appendChild(r);var c=e.getByElement(r.className),u=e.getByElement(r.className+"-canvas").getContext("2d"),p=0,b=0,C=0,B=parseInt(.1*f);for(n=0;n<100;n++)C=parseInt(n*m*.1),u.drawImage(c,p,b,parseInt(.1*m),B,C,0,parseInt(.1*m),B),(p+=parseInt(.1*m))>=m&&(p=0,b+=B),e.css(c,"display","none");g==s.length?e.previewStart=2:y(++i)}};y(p)}}},deletePreview:function(){null!=this.previewDiv&&(this.deleteChild(this.previewDiv),this.previewDiv=null,this.previewStart=0)},changeVideo:function(){if(!this.html5Video)return this.getVarsObject(),void this.V.newVideo(this.vars);var t=this.VA,e=this.vars,i=0;if(!(t.length<1)){if(null!=this.V&&0==this.needSeek&&(this.needSeek=this.V.currentTime),e.poster?this.V.poster=e.poster:this.V.removeAttribute("poster"),e.loop?this.V.loop="loop":this.V.removeAttribute("loop"),e.seek>0?this.needSeek=e.seek:this.needSeek=0,".m3u8"!=this.getFileExt(t[0][0])&&(this.isM3u8=!1),this.isM3u8)this.embedHls(t[0][0],e.autoplay);else{if(1==t.length)this.V.innerHTML="",this.V.src=t[0][0];else{var s="";for(t=this.arrSort(t),i=0;i<t.length;i++){var n="",r=t[i];r[1]&&(n=' type="'+r[1]+'"'),s+='<source src="'+r[0]+'"'+n+">"}this.V.removeAttribute("src"),this.V.innerHTML=s}e.autoplay?this.V.autoplay="autoplay":this.V.removeAttribute("autoplay"),this.V.load()}this.isUndefined(e.volume)||this.changeVolume(e.volume),this.resetPlayer(),this.timerErrorFun(),this.addListenerVideoChange(),this.vars.chtrack&&this.loadTrack()}},elementCoordinate:function(){this.pdCoor=this.getXY(this.PD),this.css(this.CB.pauseCenter,{left:parseInt(.5*(this.PD.offsetWidth-80))+"px",top:parseInt(.5*(this.PD.offsetHeight-80))+"px"}),this.css(this.CB.loading,{left:parseInt(.5*(this.PD.offsetWidth-60))+"px",top:parseInt(.5*(this.PD.offsetHeight-60))+"px"}),this.css(this.CB.errorText,{left:parseInt(.5*(this.PD.offsetWidth-120))+"px",top:parseInt(.5*(this.PD.offsetHeight-30))+"px"}),this.css(this.CB.logo,{left:parseInt(this.PD.offsetWidth-this.CB.logo.offsetWidth-20)+"px",top:"20px"}),this.checkBarWidth()},checkBarWidth:function(){var t=this.CB.controlBar.offsetWidth,e=[];e.push([[this.CB.full,this.CB.escFull,this.CB.fullLine],this.buttonWidth.full+2,"full"]),""!=this.vars.front&&e.push([[this.CB.front,this.CB.frontLine],this.buttonWidth.front+2]),""!=this.vars.next&&e.push([[this.CB.next,this.CB.nextLine],this.buttonWidth.next+2]),""!=this.CB.definition.innerHTML&&e.push([[this.CB.definition,this.CB.definitionLine],this.buttonWidth.definition+2]),e.push([[this.CB.volume],this.buttonWidth.volume]),e.push([[this.CB.mute,this.CB.escMute,this.CB.muteLine],this.buttonWidth.mute+2,"mute"]),e.push([[this.CB.timeText],this.buttonWidth.timeText]),e.push([[this.CB.play,this.CB.pause,this.CB.playLine],this.buttonWidth.play+2,"play"]);var i=0,s=0,n=!0;for(i=0;i<e.length;i++){var r=e[i][1];r>2?s+=r:n=!1}n&&(this.buttonLen=s,this.buttonArr=e),s=this.buttonLen,e=this.buttonArr;for(i=0;i<e.length;i++){if(s>t)s-=e[i][1],this.css(e[i][0],"display","none");else if(this.css(e[i][0],"display","block"),3==e[i].length)switch(e[i][2]){case"mute":0==this.volume?this.css(this.CB.mute,"display","none"):this.css(this.CB.escMute,"display","none");break;case"play":this.playShow(!this.V.paused);break;case"full":this.full?this.css(this.CB.full,"display","none"):this.css(this.CB.escFull,"display","none")}}},initPlayPause:function(){this.vars.autoplay?(this.css([this.CB.play,this.CB.pauseCenter],"display","none"),this.css(this.CB.pause,"display","block")):(this.css(this.CB.play,"display","block"),"none"==this.css(this.CB.errorText,"display")&&this.css(this.CB.pauseCenter,"display","block"),this.css(this.CB.pause,"display","none"))},addListenerError:function(){for(var i=0;i<this.errorFunArr.length;i++){var fun=this.errorFunArr[i];"string"==typeof fun?(fun=fun.replace("()",""),eval(fun+"()")):fun()}},delErrorFunArr:function(t){try{var e=this.errorFunArr.indexOf(t);e>-1&&this.errorFunArr.splice(e,1)}catch(t){}},addListenerFull:function(){for(var i=0;i<this.fullFunArr.length;i++){var fun=this.fullFunArr[i];"string"==typeof fun?(fun=fun.replace("()",""),eval(fun+"()")):fun()}},delFullFunArr:function(t){try{var e=this.fullFunArr.indexOf(t);e>-1&&this.fullFunArr.splice(e,1)}catch(t){}},addListenerVideoChange:function(){for(var i=0;i<this.videoChangeFunArr.length;i++){var fun=this.videoChangeFunArr[i];"string"==typeof fun?(fun=fun.replace("()",""),eval(fun+"()")):fun()}},delVideoChangeFunArr:function(t){try{var e=this.videoChangeFunArr.indexOf(t);e>-1&&this.videoChangeFunArr.splice(e,1)}catch(t){}},loadedHandler:function(){if(this.loaded=!0,"html5video"!=this.playerType&&(this.V.changeLanguage(this.language),this.contextMenu.length>0&&this.V.newMenu(this.contextMenu),this.config&&this.V.config(this.config)),""!=this.vars.loaded){try{eval(this.vars.loaded+"()")}catch(t){}this.addListenerVideoChange()}},playingHandler:function(){this.playShow(!0),this.needSeek>0&&(this.seek(this.needSeek),this.needSeek=0),this.animatePauseArray.length>0&&this.animateResume("pause"),"html5video"==this.playerType&&null!=this.V&&this.config.videoDrawImage&&this.sendVCanvas()},sendVCanvas:function(){if(null==this.timerVCanvas){this.css(this.V,"display","none"),this.css(this.MD,"display","block");var t=this;this.timerVCanvas=new this.timer(0,function(){t.MDCX.width!=t.PD.offsetWidth&&(t.MDC.width=t.PD.offsetWidth),t.MDCX.height!=t.PD.offsetHeight&&(t.MDC.height=t.PD.offsetHeight),t.MDCX.clearRect(0,0,t.MDCX.width,t.MDCX.height);var e=t.getProportionCoor(t.PD.offsetWidth,t.PD.offsetHeight,t.V.videoWidth,t.V.videoHeight);t.MDCX.drawImage(t.V,0,0,t.V.videoWidth,t.V.videoHeight,e.x,e.y,e.width,e.height)})}},pauseHandler:function(){this.playShow(!1),this.animatePauseArray.length>0&&this.animatePause("pause"),"html5video"==this.playerType&&null!=this.V&&this.config.videoDrawImage&&this.stopVCanvas()},stopVCanvas:function(){null!=this.timerVCanvas&&(this.css(this.V,"display","block"),this.css(this.MD,"display","none"),this.timerVCanvas.runing&&this.timerVCanvas.stop(),this.timerVCanvas=null)},playShow:function(t){t?(this.css(this.CB.play,"display","none"),this.css(this.CB.pauseCenter,"display","none"),this.css(this.CB.pause,"display","block")):(this.css(this.CB.play,"display","block"),"none"==this.css(this.CB.errorText,"display")?this.css(this.CB.pauseCenter,"display","block"):this.css(this.CB.pauseCenter,"display","none"),this.css(this.CB.pause,"display","none"))},seekedHandler:function(){this.resetTrack(),this.isTimeButtonMove=!0,this.V.paused&&this.play()},endedHandler:function(){this.vars.loop||this.pause()},volumechangeHandler:function(){try{this.V.volume>0?(this.css(this.CB.mute,"display","block"),this.css(this.CB.escMute,"display","none")):(this.css(this.CB.mute,"display","none"),this.css(this.CB.escMute,"display","block"))}catch(t){}},timeUpdateHandler:function(){var t=0;if("html5video"==this.playerType)try{t=this.V.duration}catch(t){}t>0&&(this.time=this.V.currentTime,this.timeTextHandler(),this.trackShowHandler(),this.isTimeButtonMove&&this.timeProgress(this.time,t))},timeProgress:function(t,e){var i=this.CB.timeProgressBg.offsetWidth,s=parseInt(t*i/e-.5*this.CB.timeButton.offsetWidth);s>i-this.CB.timeButton.offsetWidth&&(s=i-this.CB.timeButton.offsetWidth),s<0&&(s=0),this.css(this.CB.timeProgress,"width",s+"px"),this.css(this.CB.timeButton,"left",parseInt(s)+"px")},timeTextHandler:function(){var t=this.V.duration,e=this.V.currentTime;isNaN(t)&&(t=0),this.CB.timeText.innerHTML=this.formatTime(e)+" / "+this.formatTime(t),this.CB.timeText.offsetWidth>0&&(this.buttonWidth.timeText=this.CB.timeText.offsetWidth)},bufferEdHandler:function(){var t=this,e=function(){null!=t.timerBuffer&&(t.timerBuffer.runing&&t.timerBuffer.stop(),t.timerBuffer=null)};e();this.timerBuffer=new this.timer(200,function(){if(t.V.buffered.length>0){var i=t.V.duration,s=t.V.buffered.length,n=t.V.buffered.start(s-1)+t.V.buffered.end(s-1),r=t.CB.timeProgressBg.offsetWidth,a=t.CB.timeButton.offsetWidth,o=parseInt(n*r/i+a);o>=r&&(o=r,e()),t.changeLoad(n)}})},changeLoad:function(t){if(null!=this.V){var e=this.CB.timeProgressBg.offsetWidth,i=this.CB.timeButton.offsetWidth,s=this.V.duration;this.isUndefined(t)?t=this.loadTime:this.loadTime=t;var n=parseInt(t*e/s+i);this.css(this.CB.loadProgress,"width",n+"px")}},judgeIsLive:function(){var t=this;null!=this.timerError&&(this.timerError.runing&&this.timerError.stop(),this.timerError=null),this.error=!1,this.css(this.CB.errorText,"display","none");var e=function(e){t.timeUpdateHandler()};if(this.vars.live){this.removeListener("timeupdate",e),null!=this.timerTime&&(window.clearInterval(this.timerTime),timerTime=null),null!=this.timerTime&&(this.timerTime.runing&&this.timerTime.stop(),this.timerTime=null);this.timerTime=new this.timer(1e3,function(){null==t.V||t.V.paused||(t.CB.timeText.innerHTML=t.getNowDate())})}else null!=this.V&&"html5video"==this.playerType&&(this.addListener("timeupdate",e),t.timeTextHandler(),t.prompt(),window.setTimeout(function(){t.bufferEdHandler()},200));this.definition()},loadTrack:function(){var t=this,e=this.vars.chtrack,i={method:"get",dataType:"text",url:e.src,charset:e.charset,success:function(e){t.track=t.parseSrtSubtitles(e),t.trackIndex=0,t.nowTrackShow={sn:""}}};this.ajax(i)},resetTrack:function(){this.trackIndex=0,this.nowTrackShow={sn:""}},trackShowHandler:function(){if(!(this.track.length<1)){this.trackIndex>=this.track.length&&(this.trackIndex=0);var t=this.track[this.trackIndex];if(this.time>=t.startTime&&this.time<=t.endTime)this.nowTrackShow.sn!=t.sn&&(this.trackHide(),this.trackShow(t));else this.trackHide(),this.checkTrack()}},trackShow:function(t){this.nowTrackShow=t;for(var e=t.content,i=0;i<e.length;i++){var s={list:[{type:"text",text:e[i],fontColor:"#FFFFFF",fontSize:16,fontFamily:'"Microsoft YaHei", YaHei, "微软雅黑", SimHei,"FAE8F6F96C59ED1", "黑体",Arial',lineHeight:30}],position:[1,2,null,30*-(e.length-i)-50]},n=this.addElement(s);this.trackElement.push(n)}},trackHide:function(){for(var t=0;t<this.trackElement.length;t++)this.deleteElement(this.trackElement[t]);this.trackElement=[]},checkTrack:function(){var t=this.trackIndex,e=this.track,i=0;for(i=t;i<e.length;i++)if(this.time>=e[i].startTime&&this.time<=e[i].endTime){this.trackIndex=i;break}},playOrPause:function(){if(this.config.videoClick){if(null==this.V)return;if("flashplayer"==this.playerType)return void this.V.playOrPause();this.V.paused?this.play():this.pause()}},play:function(){null!=this.V&&!this.error&&this.loaded&&("html5video"==this.playerType?this.V.play():this.V.videoPlay())},pause:function(){null!=this.V&&!this.error&&this.loaded&&("html5video"==this.playerType?this.V.pause():this.V.videoPause())},seek:function(t){if(this.loaded){var e=this.getMetaDate().duration;e>0&&t>e&&(t=e),this.html5Video&&"html5video"==this.playerType&&!this.error?this.V.currentTime=t:this.V.seek(t)}},changeVolume:function(t,e,i){if((isNaN(t)||this.isUndefined(t))&&(t=0),this.loaded||(this.vars.volume=t),this.html5Video){try{this.isUndefined(e)&&(e=!0)}catch(t){}try{this.isUndefined(i)&&(i=!0)}catch(t){}if(t<0&&(t=0),t>1&&(t=1),this.V.volume=t,this.volume=t,e){var s=t*this.CB.volumeBg.offsetWidth;s<0&&(s=0),s>this.CB.volumeBg.offsetWidth&&(s=this.CB.volumeBg.offsetWidth),this.css(this.CB.volumeUp,"width",s+"px")}if(i){var n=parseInt(this.CB.volumeUp.offsetWidth-.5*this.CB.volumeBO.offsetWidth);n>this.CB.volumeBg.offsetWidth-this.CB.volumeBO.offsetWidth&&(n=this.CB.volumeBg.offsetWidth-this.CB.volumeBO.offsetWidth),n<0&&(n=0),this.css(this.CB.volumeBO,"left",n+"px")}}else this.V.changeVolume(t)},switchFull:function(){this.full?this.quitFullScreen():this.fullScreen()},fullScreen:function(){if(this.html5Video&&"html5video"==this.playerType){var t=this.PD;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen(),this.judgeFullScreen()}},quitFullScreen:function(){this.html5Video&&"html5video"==this.playerType&&(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.oRequestFullscreen?document.oCancelFullScreen():document.requestFullscreen?document.requestFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():(this.css(document.documentElement,"cssText",""),this.css(document.document.body,"cssText",""),this.css(this.PD,"cssText","")),this.judgeFullScreen())},changeSize:function(t,e){this.isUndefined(t)&&(t=0),this.isUndefined(e)&&(e=0),t>0&&this.css(this.CD,"width",t+"px"),e>0&&this.css(this.CD,"height",e+"px"),this.html5Video&&this.elementCoordinate()},newVideo:function(t){this.embed(t)},embedSWF:function(){var t=this.randomString(),e=this.getFlashVars(),i=this.getFlashplayerParam(),s="http://www.macromedia.com/go/getflashplayer",n="",r=javascriptPath+"chplayer.swf";id='id="'+t+'" name="'+t+'" ',n+='<object pluginspage="'+s+'" 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">',n+=i.v,n+='<param name="movie" value="'+r+'">',n+='<param name="flashvars" value="'+e+'">',n+="<embed "+i.w+' src="'+r+'" flashvars="'+e+'" width="100%" height="100%" '+id+' align="middle" type="application/x-shockwave-flash" pluginspage="'+s+'" />',n+="</object>",this.PD.innerHTML=n,this.V=this.getObjectById(t),this.playerType="flashplayer"},getFlashVars:function(){this.getVarsObject();var t=this.vars,e="";for(k in t)if("flashplayer"!=k&&"container"!=k&&""!=t[k]){""!=e&&(e+="&");var i=t[k];1==i&&(i=1),0==i&&(i=0),e+=k+"="+i}return e},getVarsObject:function(){var t=this.vars,e="",i="",s="",n=this.VA,r=t.prompt,a=0;for(a=0;a<n.length;a++){var o=n[a];o&&(""!=e&&(e+="|",i+="|",s+="|"),e+=o[0].replace(/&/g,"%26"),i+=o[2],s+=o[3])}if(null!=t.preview&&(t.previewscale=t.preview.scale,t.preview=t.preview.src.join("|")),null!=r)for(t.prompt="",t.prompttime="",a=0;a<r.length;a++)""!=t.prompt&&(t.prompt+="|",t.prompttime+="|"),t.prompt+=r[a].words,t.prompttime+=r[a].time;t.video=e,t.definition=i,t.weight=s,t.logo=this.logo;var l={};for(var h in t)null!=t[h]&&(l[h]=t[h]);this.vars=l},getFlashplayerParam:function(){var t="",e="",i={allowScriptAccess:"always",allowFullScreen:!0,quality:"high",bgcolor:"#000"};for(var s in i)t+=s+'="'+i[s]+'" ',e+='<param name="'+s+'" value="'+i[s]+'" />';return{w:t=t.replace("movie=","src="),v:e}},sendTime:function(t){this.time=t,this.trackShowHandler()},sendVolume:function(t){this.volume=t},sendFull:function(t){this.full=t},getMetaDate:function(){if(!this.loaded||null==this.V)return!1;if("html5video"==this.playerType){var t=0;try{t=isNaN(this.V.duration)?0:this.V.duration}catch(t){}return{duration:t,volume:this.V.volume,width:this.PD.offsetWidth||this.V.offsetWidth||this.V.width,height:this.PD.offsetHeight||this.V.offsetHeight||this.V.height,videoWidth:this.V.videoWidth,videoHeight:this.V.videoHeight,paused:this.V.paused}}return this.V.getMetaDate()},getVideoUrl:function(){var t=[];if(this.V.src)t.push(this.V.src);else for(var e=this.V.childNodes,i=0;i<e.length;i++)t.push(e[i].src);return t},addElement:function(t){if("flashplayer"==this.playerType)return this.V.addElement(t);var e=0,i={list:null,x:"100%",y:"50%",position:null,alpha:1,backgroundColor:"",backAlpha:1,backRadius:0},s=(i=this.standardization(i,t)).list;if(null==s)return"";var n="element"+this.randomString(10),r=document.createElement("div");r.className=n,i.x&&r.setAttribute("data-x",i.x),i.y&&r.setAttribute("data-y",i.y),null!=i.position&&r.setAttribute("data-position",i.position.join(",")),this.PD.appendChild(r);var a=this.getByElement(n);this.css(a,{position:"absolute",filter:"alpha(opacity:"+i.alpha+")",opacity:i.alpha.toString(),width:"800px",zIndex:"20"});var o,l="elementbg"+this.randomString(10),h=i.backAlpha.toString(),d=i.backgroundColor,c="",u=[];if(!this.isUndefined(s)&&s.length>0)for(e=0;e<s.length;e++){var p="elementnew"+this.randomString(10);switch(s[e].type){case"image":o={type:"image",url:"",radius:0,width:30,height:30,alpha:1,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginRight:0,marginTop:0,marginBottom:0,backgroundColor:"#FFFFFF"},s[e]=this.standardization(o,s[e]),c+='<div class="'+p+'"><img class="'+p+'_image" src="'+s[e].url+'"></div>';break;case"text":o={type:"text",text:"",fontColor:"#FFFFFF",fontSize:14,fontFamily:'"Microsoft YaHei", YaHei, "微软雅黑", SimHei,"FAE8F6F96C59ED1", "黑体",Arial',lineHeight:0,alpha:1,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginRight:0,marginTop:0,marginBottom:0,backgroundColor:"",backAlpha:1,backRadius:0},s[e]=this.standardization(o,s[e]),c+='<div class="'+p+'"><div class="'+p+'_bg"></div><div class="'+p+'_text">'+s[e].text+"</div></div>"}u.push(p)}for(a.innerHTML='<div class="'+l+'"></div><div class="'+l+'_c">'+c+"</div>",this.css(l+"_c",{position:"absolute",zIndex:"2"}),e=0;e<u.length;e++)switch(s[e].type){case"image":this.css(u[e],{float:"left",width:s[e].width+"px",height:s[e].height+"px",filter:"alpha(opacity:"+s[e].alpha+")",opacity:s[e].alpha.toString(),marginLeft:s[e].marginLeft+"px",marginRight:s[e].marginRight+"px",marginTop:s[e].marginTop+"px",marginBottom:s[e].marginBottom+"px",borderRadius:s[e].radius+"px"}),this.css(u[e]+"_image",{width:s[e].width+"px",height:s[e].height+"px",borderRadius:s[e].radius+"px"});break;case"text":this.css(u[e]+"_text",{filter:"alpha(opacity:"+s[e].alpha+")",opacity:s[e].alpha.toString(),borderRadius:s[e].radius+"px",fontFamily:s[e].fontFamily,fontSize:s[e].fontSize+"px",color:s[e].fontColor,lineHeight:s[e].lineHeight>0?s[e].lineHeight+"px":"",paddingLeft:s[e].paddingLeft+"px",paddingRight:s[e].paddingRight+"px",paddingTop:s[e].paddingTop+"px",paddingBottom:s[e].paddingBottom+"px",whiteSpace:"nowrap",position:"absolute",zIndex:"3"}),this.css(u[e],{float:"left",width:this.getByElement(u[e]+"_text").offsetWidth+"px",height:this.getByElement(u[e]+"_text").offsetHeight+"px",marginLeft:s[e].marginLeft+"px",marginRight:s[e].marginRight+"px",marginTop:s[e].marginTop+"px",marginBottom:s[e].marginBottom+"px"}),this.css(u[e]+"_bg",{width:this.getByElement(u[e]+"_text").offsetWidth+"px",height:this.getByElement(u[e]+"_text").offsetHeight+"px",filter:"alpha(opacity:"+s[e].backAlpha+")",opacity:s[e].backAlpha.toString(),borderRadius:s[e].backRadius+"px",backgroundColor:s[e].backgroundColor,position:"absolute",zIndex:"2"})}this.css(l,{width:this.getByElement(l+"_c").offsetWidth+"px",height:this.getByElement(l+"_c").offsetHeight+"px",position:"absolute",filter:"alpha(opacity:"+h+")",opacity:h,backgroundColor:d,borderRadius:i.backRadius+"px",zIndex:"1"}),this.css(a,{width:this.getByElement(l).offsetWidth+"px",height:this.getByElement(l).offsetHeight+"px"});var m=this.calculationCoor(a);return this.css(a,{left:m.x+"px",top:m.y+"px"}),this.elementArr.push(a.className),a},getElement:function(t){if("flashplayer"==this.playerType)return this.V.getElement(t);var e=t;"string"==typeof t&&(e=this.getByElement(t));var i=this.getCoor(e);return{x:i.x,y:i.y,width:e.offsetWidth,height:e.offsetHeight,alpha:this.isUndefined(this.css(e,"opacity"))?1:parseFloat(this.css(e,"opacity"))}},calculationCoor:function(t){if("flashplayer"==this.playerType)return this.V.calculationCoor(t);if(t!=[]){var e,i,s=[],n=this.PD.offsetWidth,r=this.PD.offsetHeight,a=t.offsetWidth,o=t.offsetHeight;if(this.isUndefined(t.dataset.x)||(e=t.dataset.x),this.isUndefined(t.dataset.y)||(i=t.dataset.y),this.isUndefined(t.dataset.position)||(s=t.dataset.position.split(",")),s.length>0){s.push(null,null,null,null);var l=0;for(l=0;l<s.length;l++)this.isUndefined(s[l])||null==s[l]||"null"==s[l]||""==s[l]?s[l]=null:s[l]=parseFloat(s[l]);if(null==s[2])switch(s[0]){case 0:e=0;break;case 1:e=parseInt(.5*(n-a));break;default:e=n-a}else switch(s[0]){case 0:e=s[2];break;case 1:e=parseInt(.5*n)+s[2];break;default:e=n+s[2]}if(null==s[3])switch(s[1]){case 0:i=0;break;case 1:i=parseInt(.5*(r-o));break;default:i=r-o}else switch(s[1]){case 0:i=s[3];break;case 1:i=parseInt(.5*r)+s[3];break;default:i=r+s[3]}}else"%"==e.substring(e.length-1,e.length)&&(e=Math.floor(parseInt(e.substring(0,e.length-1))*n*.01)),"%"==i.substring(i.length-1,i.length)&&(i=Math.floor(parseInt(i.substring(0,i.length-1))*r*.01));return{x:e,y:i}}},changeElementCoor:function(){for(var t=0;t<this.elementArr.length;t++)if(this.getByElement(this.elementArr[t])!=[]){var e=this.calculationCoor(this.getByElement(this.elementArr[t]));this.css(this.elementArr[t],{top:e.y+"px",left:e.x+"px"})}},tween:function(){var t={None:{easeIn:function(t,e,i,s){return i*t/s+e},easeOut:function(t,e,i,s){return i*t/s+e},easeInOut:function(t,e,i,s){return i*t/s+e}},Quadratic:{easeIn:function(t,e,i,s){return i*(t/=s)*t+e},easeOut:function(t,e,i,s){return-i*(t/=s)*(t-2)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e}},Cubic:{easeIn:function(t,e,i,s){return i*(t/=s)*t*t+e},easeOut:function(t,e,i,s){return i*((t=t/s-1)*t*t+1)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}},Quartic:{easeIn:function(t,e,i,s){return i*(t/=s)*t*t*t+e},easeOut:function(t,e,i,s){return-i*((t=t/s-1)*t*t*t-1)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t*t*t+e:-i/2*((t-=2)*t*t*t-2)+e}},Quintic:{easeIn:function(t,e,i,s){return i*(t/=s)*t*t*t*t+e},easeOut:function(t,e,i,s){return i*((t=t/s-1)*t*t*t*t+1)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e}},Sine:{easeIn:function(t,e,i,s){return-i*Math.cos(t/s*(Math.PI/2))+i+e},easeOut:function(t,e,i,s){return i*Math.sin(t/s*(Math.PI/2))+e},easeInOut:function(t,e,i,s){return-i/2*(Math.cos(Math.PI*t/s)-1)+e}},Exponential:{easeIn:function(t,e,i,s){return 0==t?e:i*Math.pow(2,10*(t/s-1))+e},easeOut:function(t,e,i,s){return t==s?e+i:i*(1-Math.pow(2,-10*t/s))+e},easeInOut:function(t,e,i,s){return 0==t?e:t==s?e+i:(t/=s/2)<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e}},Circular:{easeIn:function(t,e,i,s){return-i*(Math.sqrt(1-(t/=s)*t)-1)+e},easeOut:function(t,e,i,s){return i*Math.sqrt(1-(t=t/s-1)*t)+e},easeInOut:function(t,e,i,s){return(t/=s/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+e:i/2*(Math.sqrt(1-(t-=2)*t)+1)+e}},Elastic:{easeIn:function(t,e,i,s,n,r){if(0==t)return e;if(1==(t/=s))return e+i;if(r||(r=.3*s),!n||n<Math.abs(i)){n=i;var a=r/4}else a=r/(2*Math.PI)*Math.asin(i/n);return-n*Math.pow(2,10*(t-=1))*Math.sin((t*s-a)*(2*Math.PI)/r)+e},easeOut:function(t,e,i,s,n,r){if(0==t)return e;if(1==(t/=s))return e+i;if(r||(r=.3*s),!n||n<Math.abs(i)){n=i;var a=r/4}else a=r/(2*Math.PI)*Math.asin(i/n);return n*Math.pow(2,-10*t)*Math.sin((t*s-a)*(2*Math.PI)/r)+i+e},easeInOut:function(t,e,i,s,n,r){if(0==t)return e;if(2==(t/=s/2))return e+i;if(r||(r=s*(.3*1.5)),!n||n<Math.abs(i)){n=i;var a=r/4}else a=r/(2*Math.PI)*Math.asin(i/n);return t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t*s-a)*(2*Math.PI)/r)*-.5+e:n*Math.pow(2,-10*(t-=1))*Math.sin((t*s-a)*(2*Math.PI)/r)*.5+i+e}},Back:{easeIn:function(t,e,i,s,n){return void 0==n&&(n=1.70158),i*(t/=s)*t*((n+1)*t-n)+e},easeOut:function(t,e,i,s,n){return void 0==n&&(n=1.70158),i*((t=t/s-1)*t*((n+1)*t+n)+1)+e},easeInOut:function(t,e,i,s,n){return void 0==n&&(n=1.70158),(t/=s/2)<1?i/2*(t*t*((1+(n*=1.525))*t-n))+e:i/2*((t-=2)*t*((1+(n*=1.525))*t+n)+2)+e}},Bounce:{easeIn:function(e,i,s,n){return s-t.Bounce.easeOut(n-e,0,s,n)+i},easeOut:function(t,e,i,s){return(t/=s)<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e},easeInOut:function(e,i,s,n){return e<n/2?.5*t.Bounce.easeIn(2*e,0,s,n)+i:.5*t.Bounce.easeOut(2*e-n,0,s,n)+.5*s+i}}};return t},animate:function(attribute){if("flashplayer"==this.playerType)return this.V.animate(attribute);var thisTemp=this,animateId="animate_"+this.randomString(),obj={element:null,parameter:"x",static:!1,effect:"None.easeIn",start:null,end:null,speed:0,overStop:!1,pauseStop:!1,callBack:null};if(obj=this.standardization(obj,attribute),null==obj.element||0==obj.speed)return!1;var w=this.PD.offsetWidth,h=this.PD.offsetHeight,effArr=(obj.effect+".").split("."),tweenFun=this.tween()[effArr[0]][effArr[1]],eleCoor={x:0,y:0};if(this.isUndefined(tweenFun))return!1;var def=this.arrIndexOf(this.elementArr,obj.element.className);def>-1&&this.elementArr.splice(def,1);var css={},pm=this.getElement(obj.element),t=0,b=0,c=0,d=1e3*obj.speed,timerTween=null,tweenObj=null,start=null==obj.start?"":obj.start.toString(),end=null==obj.end?"":obj.end.toString();switch(obj.parameter){case"x":b=null==obj.start?pm.x:"%"==start.substring(start.length-1,start.length)?parseInt(start)*w*.01:parseInt(start),c=null==obj.end?pm.x-b:"%"==end.substring(end.length-1,end.length)?parseInt(end)*w*.01-b:"-"==end.substring(0,1)||"+"==end.substring(0,1)?"number"==typeof obj.end?parseInt(obj.end)-b:parseInt(end):parseInt(end)-b;break;case"y":b=null==obj.start?pm.y:"%"==start.substring(start.length-1,start.length)?parseInt(start)*h*.01:parseInt(start),c=null==obj.end?pm.y-b:"%"==end.substring(end.length-1,end.length)?parseInt(end)*h*.01-b:"-"==end.substring(0,1)||"+"==end.substring(0,1)?"number"==typeof obj.end?parseInt(obj.end)-b:parseInt(end):parseInt(end)-b;break;case"alpha":b=null==obj.start?100*pm.alpha:"%"==start.substring(start.length-1,start.length)?parseInt(obj.start):parseInt(100*obj.start),c=null==obj.end?100*pm.alpha-b:"%"==end.substring(end.length-1,end.length)?parseInt(end)-b:"-"==end.substring(0,1)||"+"==end.substring(0,1)?"number"==typeof obj.end?100*parseInt(obj.end)-b:100*parseInt(obj.end):100*parseInt(obj.end)-b}var callBack=function(){var index=thisTemp.arrIndexOf(thisTemp.animateElementArray,animateId);if(index>-1&&(thisTemp.animateArray.splice(index,1),thisTemp.animateElementArray.splice(index,1)),index=thisTemp.arrIndexOf(thisTemp.animatePauseArray,animateId),index>-1&&thisTemp.animatePauseArray.splice(index,1),null!=obj.callBack&&obj.element&&"callBack"!=obj.callBack&&"tweenX"!=obj.callBack&&"callBack"!=obj.tweenY&&"tweenAlpha"!=obj.callBack){var cb=eval(obj.callBack);cb(obj.element),obj.callBack=null}},stopTween=function(){null!=timerTween&&(timerTween.runing&&timerTween.stop(),timerTween=null)},tweenX=function(){t<d?(t+=10,css={left:Math.ceil(tweenFun(t,b,c,d))+"px"},obj.static&&(eleCoor=thisTemp.calculationCoor(obj.element),css.top=eleCoor.y+"px"),thisTemp.css(obj.element,css)):(stopTween(),thisTemp.elementArr.push(obj.element.className),callBack())},tweenY=function(){t<d?(t+=10,css={top:Math.ceil(tweenFun(t,b,c,d))+"px"},obj.static&&(eleCoor=thisTemp.calculationCoor(obj.element),css.left=eleCoor.x+"px"),thisTemp.css(obj.element,css)):(stopTween(),thisTemp.elementArr.push(obj.element.className),callBack())},tweenAlpha=function(){if(t<d){t+=10,eleCoor=thisTemp.calculationCoor(obj.element);var e=.01*Math.ceil(tweenFun(t,b,c,d));css={filter:"alpha(opacity:"+e+")",opacity:e.toString()},obj.static&&(eleCoor=thisTemp.calculationCoor(obj.element),css.top=eleCoor.y+"px",css.left=eleCoor.x+"px"),thisTemp.css(obj.element,css)}else stopTween(),thisTemp.elementArr.push(obj.element.className),callBack()};switch(obj.parameter){case"x":tweenObj=tweenX;break;case"y":tweenObj=tweenY;break;case"alpha":tweenObj=tweenAlpha}if(timerTween=new thisTemp.timer(10,tweenObj),obj.overStop){var mouseOver=function(){null!=timerTween&&timerTween.runing&&timerTween.stop()};this.addListener("mouseover",mouseOver,obj.element);var mouseOut=function(){var t=!0;obj.pauseStop&&thisTemp.getMetaDate().paused&&(t=!1),null!=timerTween&&!timerTween.runing&&t&&timerTween.start()};this.addListener("mouseout",mouseOut,obj.element)}return this.animateArray.push(timerTween),this.animateElementArray.push(animateId),obj.pauseStop&&this.animatePauseArray.push(animateId),animateId},animateResume:function(t){if("flashplayer"!=this.playerType){var e=[];""==t||this.isUndefined(t)||"pause"==t?e="pause"===t?this.animatePauseArray:this.animateElementArray:e.push(t);for(var i=0;i<e.length;i++){var s=this.arrIndexOf(this.animateElementArray,e[i]);s>-1&&this.animateArray[s].start()}}else this.V.animateResume(this.isUndefined(t)?"":t)},animatePause:function(t){if("flashplayer"!=this.playerType){var e=[];""==t||this.isUndefined(t)||"pause"==t?e="pause"===t?this.animatePauseArray:this.animateElementArray:e.push(t);for(var i=0;i<e.length;i++){var s=this.arrIndexOf(this.animateElementArray,e[i]);s>-1&&this.animateArray[s].stop()}}else this.V.animatePause(this.isUndefined(t)?"":t)},deleteAnimate:function(t){var e=this.arrIndexOf(this.animateElementArray,t);e>-1&&(this.animateArray.splice(e,1),this.animateElementArray.splice(e,1))},deleteElement:function(t){if("flashplayer"==this.playerType&&this.V)try{this.V.deleteElement(t)}catch(t){}else{var e=this.arrIndexOf(this.elementArr,t.className);e>-1&&this.elementArr.splice(e,1),this.deleteAnimate(t),this.deleteChild(t)}},getByElement:function(t,e){this.isUndefined(e)&&(e=document);var i=t.substr(0,1),s=[];if("#"!=i){if("."==i&&(t=t.substr(1,t.length)),e.getElementsByClassName)s=e.getElementsByClassName(t);else for(var n=new RegExp(" "+t+" ","i"),r=e.getElementsByTagName("*"),a=0;a<r.length;a++)n.test(" "+r[a].className+" ")&&s.push(r[a]);return s.length>0?s[0]:s}return"#"==i&&(t=t.substr(1,t.length)),document.getElementById(t)},css:function(t,e,i){var s=0,n="";if("object"!=typeof t||this.isUndefined(typeof t.length))if("string"==typeof t&&(t=this.getByElement(t)),"object"!=typeof e){if(this.isUndefined(i))return!this.isUndefined(t.style[e])&&t.style[e];t.style[e]=i}else for(n in e)this.isUndefined(e[n])||(t.style[n]=e[n]);else for(s=0;s<t.length;s++){var r;if(r="string"==typeof t[s]?this.getByElement(t[s]):t[s],"object"!=typeof e)this.isUndefined(i)||(r.style[e]=i);else for(n in e)this.isUndefined(e[n])||(r.style[n]=e[n])}},isUndefined:function(t){try{if("undefined"==t||void 0==t)return!0}catch(t){}return!1},addListener:function(t,e,i,s){if("flashplayer"==this.playerType&&this.isUndefined(i)){var n="";return"function"==typeof e&&(n=this.getParameterNames(e)),void this.V.addListener(t,n)}if(this.isUndefined(s)&&(s=!1),"full"!=t)if("error"==t&&this.isUndefined(i))this.errorFunArr.push(e);else if("videochange"!=t){var r=this.V;if(this.isUndefined(i)||(r=i),this.listenerArr.push([t,e,i,s]),r.addEventListener)try{r.addEventListener(t,e,s)}catch(t){}else if(r.attachEvent)try{r.attachEvent("on"+t,e)}catch(t){}else r["on"+t]=e}else this.videoChangeFunArr.push(e);else this.fullFunArr.push(e)},removeListener:function(t,e,i,s){if("flashplayer"!=this.playerType||!this.getParameterNames(e)||!this.isUndefined(i))if(this.isUndefined(s)&&(s=!1),"full"!=t)if("error"!=t)if("videochange"!=t){var n=this.V;this.isUndefined(i)||(n=i);for(var r=0;r<this.listenerArr.length;r++)if([t,e,i,s]==this.listenerArr[r]){this.listenerArr.splice(r,1);break}if(n.removeEventListener)try{this.addNum--,n.removeEventListener(t,e,s)}catch(t){}else if(n.detachEvent)try{n.detachEvent("on"+t,e)}catch(t){}else n["on"+t]=null}else this.delVideoChangeFunArr(e);else this.delErrorFunArr(e);else this.delFullFunArr(e)},getParameterNames:function(t){if("function"!=typeof t)return!1;var e=t.toString().replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,""),i=e.slice(e.indexOf(" ")+1,e.indexOf("("));return null!==i&&i},getNowDate:function(){var t=new Date,e=t.getMonth()+1,i=t.getDate(),s=t.getHours(),n=t.getMinutes(),r=t.getSeconds();return(e<10?"0"+e:e+"")+"/"+(i<10?"0"+i:i+"")+" "+(s<10?"0"+s:s+"")+":"+(n<10?"0"+n:n+"")+":"+(r<10?"0"+r:r+"")},formatTime:function(t,e){var i,s;isNaN(t)&&(t=0);var n=Math.floor(t%60),r=0,a=0;return e?(r=Math.floor(t/60)%60,a=Math.floor(t/3600)):r=Math.floor(t/60),i=n<10?"0"+n:n+"",s=r>0?r<10?"0"+r+":":r+":":"00:",e?(a>0?a<10?"0"+a+":":a+":":"")+s+i:s+i},randomString:function(t){t=t||16;var e="abcdefghijklmnopqrstuvwxyz",s=e.length,n="";for(i=0;i<t;i++)n+=e.charAt(Math.floor(Math.random()*s));return"ch"+n},getStringLen:function(t){for(var e=0,i=0;i<t.length;i++)t.charCodeAt(i)>127||94==t.charCodeAt(i)?e+=2:e++;return e},createXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){this.eject(this.errorList[7])}}else this.eject(this.errorList[8])},ajax:function(cObj){var thisTemp=this,callback=null,obj={method:"get",dataType:"json",charset:"utf-8",async:!1,url:"",data:null,success:null};if("object"==typeof cObj){if(obj=this.standardization(obj,cObj),"json"===obj.dataType||"text"===obj.dataType||"html"===obj.dataType){var xhr=this.createXHR();callback=function(){if(200==xhr.status){if(null==obj.success)return;"json"===obj.dataType?obj.success(eval("("+xhr.responseText+")")):obj.success(xhr.responseText)}else thisTemp.eject(thisTemp.errorList[10],"Ajax.status:"+xhr.status)},obj.url=obj.url+"?rand="+this.randomString(6),obj.data=this.formatParams(obj.data),"get"!==obj.method||this.isUndefined(obj.data)||(obj.url+=-1==obj.url.indexOf("?")?"?"+obj.data:"&"+obj.data),!0===obj.async&&(xhr.onreadystatechange=function(){4==xhr.readyState&&callback()}),xhr.open(obj.method,obj.url,obj.async),"post"===obj.method?(xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xhr.setRequestHeader("charset",obj.charset),xhr.send(obj.data)):xhr.send(null),!1===obj.async&&callback()}else if("jsonp"===obj.dataType){var oHead=document.getElementsByTagName("head")[0],oScript=document.createElement("script"),callbackName="callback"+(new Date).getTime(),params=this.formatParams(obj.data)+"&callback="+callbackName;callback=obj.success,oScript.src=obj.url.split("?")+"?"+params,oHead.insertBefore(oScript,oHead.firstChild),window[callbackName]=function(t){callback(t),oHead.removeChild(oScript)}}}else this.eject(this.errorList[9])},loadJs:function(t,e){var i=document.getElementsByTagName("HEAD").item(0),s=document.createElement("script");s.type="text/javascript",s.src=this.getNewUrl(t),i.appendChild(s),s.onload=function(){e()}},supportVideo:function(){if(document.createElement("video").canPlayType){var t=document.createElement("video");return oggTest=t.canPlayType('video/ogg; codecs="theora, vorbis"'),oggTest?"probably"==oggTest:(h264Test=t.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),!!h264Test&&"probably"==h264Test)}return!1},getObjectById:function(t){var e=null,i=this.getByElement("#"+t);if(i&&"OBJECT"==i.nodeName)if(void 0!==i.SetVariable)e=i;else{var s=i.getElementsByTagName("embed")[0];s&&(e=s)}return e},formatParams:function(t){var e=[];for(var i in t)e.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e.join("&")},arrSort:function(t){for(var e=[],i=0;i<t.length;i++)for(var s=0;s<t.length-i;s++)!this.isUndefined(t[s+1])&&t[s][3]<t[s+1][3]&&(e=t[s+1],t[s+1]=t[s],t[s]=e);return t},getFileExt:function(t){return""!=t?(t.indexOf("?")>-1&&(t=t.split("?")[0]),"."+t.replace(/.+\./,"")):""},isContains:function(t,e){return t.indexOf(e)>-1},getNewUrl:function(t){return this.isContains(t,"?")?t+"&"+this.randomString(8)+"="+this.randomString(8):t+"?"+this.randomString(8)+"="+this.randomString(8)},client:function(t){var e=t||window.event;return this.isUndefined(e)&&(e={clientX:0,clientY:0}),{x:e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-this.pdCoor.x,y:e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-this.pdCoor.y}},getCoor:function(t){var e=this.getXY(t);return{x:e.x-this.pdCoor.x,y:e.y-this.pdCoor.y}},getXY:function(t){for(var e=t,i=t.offsetLeft,s=t.offsetTop;e=e.offsetParent;)i+=e.offsetLeft,s+=e.offsetTop;return{x:i,y:s}},removeChild:function(){if("html5video"==this.playerType){var t=0,e=[this.timerError,this.timerFull,this.timerTime,this.timerBuffer,this.timerClick,this.timerLoading,this.timerCBar,this.timerVCanvas];for(t=0;t<e.length;t++)null!=e[t]&&(e[t].runing&&e[t].stop(),e[t]=null);var i=this.listenerArr;for(t=0;t<i.length;t++)this.removeListener(i[t][0],i[t][1],i[t][2],i[t][3])}this.playerType,this.V=null,this.deleteChild(this.CB.menu),this.deleteChild(this.PD),this.CD.innerHTML=""},canvasFill:function(t,e){t.beginPath();for(var i=0;i<e.length;i++){var s=e[i];i>0?t.lineTo(s[0],s[1]):t.moveTo(s[0],s[1])}t.closePath(),t.fill()},canvasFillRect:function(t,e){for(var i=0;i<e.length;i++){var s=e[i];t.fillRect(s[0],s[1],s[2],s[3])}},deleteChild:function(t){var e=this.arrIndexOf(this.elementArr,t.className);e>-1&&this.elementArr.splice(e,1);for(var i=t.childNodes,s=i.length-1;s>=0;s--)t.removeChild(i[s]);if(t&&null!=t&&t.parentNode)try{t.parentNode&&t.parentNode.removeChild(t)}catch(t){}},getProportionCoor:function(t,e,i,s){var n,r,a=0,o=0;return t/e<i/s?o=(a=t)*s/i:a=(o=e)*i/s,n=.5*(t-a),r=.5*(e-o),{width:parseInt(a),height:parseInt(o),x:parseInt(n),y:parseInt(r)}},parseSrtSubtitles:function(t){var e=[],i=[],s=0,n=t.split("\n"),r=[],a=function(t){return t.replace(/<[^>]+>/g,"")};for(s=0;s<n.length;s++)n[s].replace(/\s/g,"").length>0?r.push(n[s]):(r.length>0&&i.push(r),r=[]);for(s=0;s<i.length;++s){var o=i[s];if(o.length>=2){var l=o[0],h=this.toSeconds(this.trim(o[1].split(" --\x3e ")[0])),d=this.toSeconds(this.trim(o[1].split(" --\x3e ")[1])),c=[a(o[2])];if(o.length>2)for(var u=3;u<o.length;u++)c.push(a(o[u]));var p={sn:l,startTime:h,endTime:d,content:c};e.push(p)}}return e},timer:function(t,e,i){var s=this;this.time=10,this.fun=null,this.timeObj=null,this.number=0,this.numberTotal=null,this.runing=!1,this.startFun=function(){s.number++,s.fun(),null!=s.numberTotal&&s.number>=s.numberTotal&&s.stop()},this.start=function(){s.runing||(s.runing=!0,s.timeObj=window.setInterval(s.startFun,t))},this.stop=function(){s.runing&&(s.runing=!1,window.clearInterval(s.timeObj),s.timeObj=null)},t&&(this.time=t),e&&(this.fun=e),i&&(this.numberTotal=i),this.start()},toSeconds:function(t){var e=0;if(t){var s=t.split(":");for(i=0;i<s.length;i++)e=60*e+parseFloat(s[i].replace(",","."))}return e},standardization:function(t,e){var i,s={};for(i in t)s[i]=t[i];for(i in e){switch(typeof s[i]){case"number":s[i]=parseFloat(e[i]);break;case"string":"string"!=typeof e[i]&&void 0!==e[i]?s[i]=e[i].toString():s[i]=e[i];break;default:s[i]=e[i]}}return s},arrIndexOf:function(t,e){var i=new RegExp(e,[""]);return t.toString().replace(i,"┢").replace(/[^,┢]/g,"").indexOf("┢")},trim:function(t){return t.replace(/(^\s*)|(\s*$)/g,"")},log:function(t){try{console.log(t)}catch(t){}},eject:function(t,e){if(this.vars.debug){var i=t[1];this.isUndefined(e)||(i=i.replace("[error]",e));var s="error "+t[0]+":"+i;try{alert(s)}catch(t){}}}},window.chplayer=chplayer}();
