kdayun-compnent-develop/kdayun-compnent-pack/dist/libs/ckplayer/ckplayer.min.js

5 lines
139 KiB
JavaScript
Raw Normal View History

2022-02-19 20:37:32 +08:00
!function(){var ckplayer,ckplayerPath="";!function(){var c,d,a=document.scripts,b=a[a.length-1].src;for(c=0;c<a.length;c++)d=a[c].getAttribute("name")||a[c].getAttribute("data-name"),d&&"ckplayer"==d&&(b=a[c].src);ckplayerPath=b.substring(0,b.lastIndexOf("/")+1)}(),ckplayer=function(a){this.varsDefault={playerID:"",container:"",variable:"ckplayer",volume:.8,poster:"",autoplay:!1,loop:!1,live:!1,duration:0,forceduration:0,seek:0,drag:"",front:"",next:"",loaded:"",flashplayer:!1,html5m3u8:!1,track:null,cktrack:null,cktrackdelay:0,preview:null,prompt:null,video:null,config:"",type:"",crossorigin:"",crossdomain:"",unescape:!1,mobileCkControls:!1,mobileAutoFull:!0,playbackrate:1,h5container:"",debug:!1,overspread:!0,language:"",style:"",adfront:"",adfronttime:"",adfrontlink:"",adpause:"",adpausetime:"",adpauselink:"",adinsert:"",adinserttime:"",adinsertlink:"",inserttime:"",adend:"",adendtime:"",adendlink:"",advertisements:""},this.vars={},this.ckConfig={},this.jsonConfig={},this.ckLanguage={},this.jsonLanguage={},this.ckStyle={},this.jsonStyle={},this.contextMenu=[["ckplayer","link","http://www.ckplayer.com","_blank"],["version:X2","default","line"]],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]"],["011","[error] File loading failed or error"],["012","[error]"]],this.playbackRateArr=[[.5,"0.5X"],[1,"1X"],[1.25,"1.25X"],[1.5,"1.5X"],[2,"2X"],[4,"4X"]],this.playbackRateTemp=1,this.playbackRateDefault=1,this.subtitlesTemp=-1,this.logo="",this.loaded=!1,this.timerError=null,this.error=!1,this.errorUrl=[],this.timerFull=null,this.full=!1,this.timerTime=null,this.timerBuffer=null,this.isTimeButtonMove=!0,this.isTimeButtonDown=!1,this.timeButtonOver=null,this.buttonHide=!1,this.isClick=!1,this.timerClick=null,this.timerCBar=null,this.needSeek=0,this.volume=0,this.volumeTemp=0,this.time=0,this.isFirst=!0,this.html5Video=!0,this.pdCoor={x:0,y:0},this.playerType="",this.loadTime=0,this.body=document.body||document.documentElement,this.V=null,this.listenerJsArr=[],this.buttonLen=0,this.buttonArr=[],this.elementArr=[],this.elementTempArr=[],this.track=[],this.trackIndex=0,this.nowTrackShow={sn:""},this.trackElement=[],this.timerVCanvas=null,this.animateArray=[],this.animateElementArray=[],this.animatePauseArray=[],this.previewStart=0,this.previewDiv=null,this.previewTop=null,this.previewWidth=120,this.previewTween=null,this.isM3u8=!1,this.promptArr=[],this.promptElement=null,this.conBarShow=!0,this.errorAdd=!1,this.errorSend=!1,this.controlBarIsShow=!0,this.videoScale=1,this.fontFamily='"Microsoft YaHei"; YaHei; "FAE8F6F96C59ED1"; SimHei; "9ED1F53";Arial',this.timeSliderLeftTemp=0,this.durationSendJS=!1,this.adAnalysisEnd=!1,this.advertisements={},this.isFirstTimePlay=!0,this.adType="",this.adI=0,this.videoTemp={src:"",source:"",currentSrc:"",loop:!1},this.adTimeAllTotal=0,this.adTimeTotal=0,this.adCountDownObj=null,this.adPlayStart=!1,this.adPlayerPlay=!1,this.adIsPause=!1,this.adVideoMute=!1,this.adIsVideoTime=!1,this.endAdPlay=!1,this.adPauseShow=!1,this.adReset=!1,this.videoClickXy={x:0,y:0},this.adVideoPlay=!1,this.loadTimeTemp=0,this.hlsAutoPlay=!0,this.loadingShow=!1,this.videoString="",this.customeElement=[],this.cdWH={w:0,h:0},this.CB={},a&&this.embed(a)},ckplayer.prototype={embed:function(a){if("file://"==window.location.href.substr(0,7))return alert("Please use the HTTP protocol to open the page"),void 0;if(this.isUndefined(a))return this.eject(this.errorList[0]),void 0;"object"!=this.varType(a)&&this.eject(this.errorList[1]),this.vars=this.standardization(this.varsDefault,a),!this.vars["mobileCkControls"]&&this.isMobile()&&(this.vars["flashplayer"]=!1,this.conBarShow=!1);var b=this.vars["video"];return b?("string"==this.varType(b)&&("CK:"==b.substr(0,3)||"CE:"==b.substr(0,3)||"CK:"==b.substr(8,3)||"CE
break;case"middle":k=.5*f+o;break;case"bottom":k=f+o;break;case"bottom2":k=-1e4,m=o}return j>-1e4&&(g["left"]=j+"px"),l>-1e4&&(g["right"]=l+"px"),k>-1e4&&(g["top"]=k+"px"),m>-1e4&&(g["bottom"]=m+"px"),g},newCanvas:function(a,b,c){return'<canvas class="'+a+'-canvas" width="'+b+'" height="'+c+'"></canvas>'},addButtonEvent:function(){var d,e,f,g,h,i,a=this,b=function(){a.promptShow(!1)},c=function(){a.promptShow(a.CB["definition"])};this.addListenerInside("mouseover",c,this.CB["definition"]),this.addListenerInside("mouseout",b,this.CB["definition"]),d=function(){a.promptShow(a.CB["playbackrate"])},this.addListenerInside("mouseover",d,this.CB["playbackrate"]),this.addListenerInside("mouseout",b,this.CB["playbackrate"]),e=function(){a.promptShow(a.CB["subtitles"])},this.addListenerInside("mouseover",e,this.CB["subtitles"]),this.addListenerInside("mouseout",b,this.CB["subtitles"]),f=function(b){var c=a.getCoor(a.CB["volumeBO"]),d={title:a.ckLanguage["volumeSliderOver"].replace("[$volume]",b),x:c["x"]+.5*a.CB["volumeBO"].offsetWidth,y:c["y"]};a.promptShow(!1,d)},g={slider:this.CB["volumeBO"],follow:this.CB["volumeUp"],refer:this.CB["volumeBg"],grossValue:"volume",pd:!0,startFun:function(){},monitorFun:function(b){a.changeVolume(.01*b,!1,!1),f(b)},endFun:function(){},overFun:function(a){f(a)}},this.slider(g),h={refer:this.CB["volumeBg"],grossValue:"volume",fun:function(b){a.changeVolume(.01*b,!0,!0)}},this.progressClick(h),this.timeButtonMouseDown(),i=function(b){var c=a.getCoor(a.CB["volumeBg"]),d=a.client(b)["x"],e=parseInt(100*(d-c["x"])/a.CB["volumeBg"].offsetWidth),f={title:a.ckLanguage["volumeSliderOver"].replace("[$volume]",e),x:d,y:c["y"]};a.promptShow(!1,f)},this.addListenerInside("mousemove",i,this.CB["volumeBg"]),this.addListenerInside("mouseout",b,this.CB["volumeBg"]),this.addListenerInside("mouseout",b,this.CB["volumeBO"]),this.addDefListener(),this.addPlaybackrate(),this.addSubtitles()},videoClick:function(){var a=this,b=function(){null!=a.timerClick&&(a.timerClick.runing&&a.timerClick.stop(),a.timerClick=null)},c=function(){if(b(),a.isClick=!1,a.sendJS("videoClick",a.videoClickXy),a.adPlayerPlay){var c=a.getNowAdvertisements();try{""!=c["link"]&&window.open(c["link"]),a.ajaxSuccessNull(c["clickMonitor"])}catch(d){}}else a.ckConfig["config"]["click"]&&a.playOrPause()};b(),this.isClick?(this.isClick=!1,a.sendJS("videoDoubleClick",a.videoClickXy),a.ckConfig["config"]["doubleClick"]&&(this.full?a.quitFullScreen():a.fullScreen())):(this.isClick=!0,this.timerClick=new this.timer(300,c,1))},timeButtonMouseDown:function(){var a=this,b=function(b){var c,d;isNaN(b)&&(b=0),c=a.getCoor(a.CB["timeButton"]),d={title:a.formatTime(b,0,a.ckLanguage["timeSliderOver"]),x:c["x"]-a.pdCoor["x"]+.5*a.CB["timeButton"].offsetWidth,y:c["y"]-a.pdCoor["y"]},a.promptShow(!1,d)},c={slider:this.CB["timeButton"],follow:this.CB["timeProgress"],refer:this.CB["timeBoBg"],grossValue:"time",pd:!1,startFun:function(){a.isTimeButtonMove=!1},monitorFun:function(){},endFun:function(b){a.V&&a.V.duration>0&&(a.needSeek=0,a.videoSeek(parseInt(b)))},overFun:function(a){b(a)}},d={refer:this.CB["timeBoBg"],grossValue:"time",fun:function(b){a.V&&a.V.duration>0&&(a.needSeek=0,a.videoSeek(parseInt(b)))}},e=function(b){var f,g,h,c=a.getCoor(a.CB["timeBoBg"]),d=a.client(b)["x"],e=a.V.duration;(isNaN(e)||parseInt(e)<.2)&&(e=a.vars["duration"]),a.vars["forceduration"]>0&&(e=a.vars["forceduration"]),f=parseInt((d-c["x"])*e/a.CB["timeBoBg"].offsetWidth),g={title:a.formatTime(f,0,a.ckLanguage["timeSliderOver"]),x:d,y:c["y"]},a.promptShow(!1,g),h=!1,a.isUndefined(a.CB["definitionP"])||"block"!=a.css(a.CB["definitionP"],"display")&&(h=!0),null!=a.vars["preview"]&&h&&(g["time"]=f,a.preview(g))},f=function(){a.promptShow(!1),null!=a.previewDiv&&a.css([a.previewDiv,a.previewTop],"display","none")};this.vars["live"]?(this.isTimeButtonDown=!1,c["removeListenerInside"]=!0,d["removeListenerInside"]=!0):(this.isTimeButtonDown=!0,this.addListenerInside("mousemove",e,this.CB["timeBoBg"]),this.addListenerInside("mouseout",f,this.CB["timeBoBg"])),this.slider(c),this.progressClick(d)
k?(a={element:b.previewDiv,start:null,end:-(o+r),speed:.3},this.previewTween=this.animate(a)):b.css(b.previewDiv,"left",-(o+r)+"px")}}},deletePreview:function(){null!=this.previewDiv&&(this.deleteChild(this.previewDiv),this.previewDiv=null,this.previewStart=0)},changeVideo:function(){var a,b,c,d,e,f;if(!this.html5Video)return this.getVarsObject(),this.V.newVideo(this.vars),void 0;if(a=this.VA,b=this.vars,c=0,!(a.length<1)){if(null!=this.V&&0==this.needSeek&&(this.needSeek=this.V.currentTime),b["poster"]?this.V.poster=b["poster"]:this.V.removeAttribute("poster"),b["loop"]?this.V.loop="loop":this.V.removeAttribute("loop"),this.needSeek=b["seek"]>0?b["seek"]:0,".m3u8"!=this.getFileExt(a[0][0])&&(this.isM3u8=!1),this.isM3u8)this.embedHls(a[0][0],b["autoplay"]);else{if(1==a.length)this.V.innerHTML="",this.V.src=a[0][0];else{for(d="",a=this.arrSort(a),c=0;c<a.length;c++)e="",f=a[c],f[1]&&(e=' type="'+f[1]+'"'),d+='<source src="'+f[0]+'"'+e+">";this.V.removeAttribute("src"),this.V.innerHTML=d}b["autoplay"]?this.V.autoplay="autoplay":this.V.removeAttribute("autoplay"),this.V.load()}this.isUndefined(b["volume"])||this.changeVolume(b["volume"]),this.resetPlayer(),this.timerErrorFun(),this.vars["cktrack"]&&this.loadTrack()}},elementCoordinate:function(){this.pdCoor=this.getXY(this.PD);var a=null;try{a=this.getEleCss(this.ckStyle["centerPlay"],{cursor:"pointer"}),this.css(this.CB["pauseCenter"],a)}catch(b){this.log(b)}try{a=this.getEleCss(this.ckStyle["loading"]),this.css(this.CB["loading"],a)}catch(b){this.log(b)}try{a=this.getEleCss(this.ckStyle["error"]),this.css(this.CB["errorText"],a)}catch(b){this.log(b)}try{a=this.getEleCss(this.ckStyle["logo"])}catch(b){this.log(b)}this.checkBarWidth()},carbarButton:function(){var g,a=this.ckStyle["controlBar"],b=a["button"],c=null,d={overflow:"hidden",cursor:"pointer",zIndex:1},e={overflow:"hidden",cursor:"default",zIndex:1},f={overflow:"hidden",cursor:"pointer",display:"none",zIndex:995};c=this.getEleCss(b["play"],d,this.CB["controlBarBg"]),this.css(this.CB["play"],c),c=this.getEleCss(b["pause"],d,this.CB["controlBarBg"]),this.css(this.CB["pause"],c),c=this.getEleCss(b["mute"],d,this.CB["controlBarBg"]),this.css(this.CB["mute"],c),c=this.getEleCss(b["escMute"],d,this.CB["controlBarBg"]),this.css(this.CB["escMute"],c),c=this.getEleCss(b["full"],d,this.CB["controlBarBg"]),this.css(this.CB["full"],c),c=this.getEleCss(b["escFull"],d,this.CB["controlBarBg"]),this.css(this.CB["escFull"],c),c=this.getEleCss(a["timeText"]["vod"],e,this.CB["controlBarBg"]),this.css(this.CB["timeText"],c),g=this.newObj(a["volumeSchedule"]),g["backgroundImg"]="",c=this.getEleCss(g,e,this.CB["controlBarBg"]),this.css(this.CB["volume"],c),c={width:c["width"],height:a["volumeSchedule"]["backgroundHeight"]+"px",overflow:"hidden",backgroundRepeat:"no-repeat",backgroundPosition:"left center"},this.ckConfig["config"]["buttonMode"]["volumeSchedule"]&&(c["cursor"]="pointer"),this.css(this.CB["volumeBg"],c),this.css(this.CB["volumeBg"],{position:"absolute"}),c["width"]=.5*this.CB["volumeBO"].offsetWidth+parseInt(this.css(this.CB["volumeBO"],"left"))+"px",this.css(this.CB["volumeUp"],c),this.css(this.CB["volumeBg"],"backgroundImage","url("+a["volumeSchedule"]["backgroundImg"]+")"),this.css(this.CB["volumeUp"],"backgroundImage","url("+a["volumeSchedule"]["maskImg"]+")"),c=this.getEleCss(a["volumeSchedule"]["button"],{overflow:"hidden",cursor:"pointer",backgroundRepeat:"no-repeat",backgroundPosition:"left center"}),this.css(this.CB["volumeBO"],c),this.ckConfig["config"]["playbackRate"]&&(this.CB["playbackrateButtonText"]||this.textButton(this.CB["playbackrate"],a["playbackrate"]["defaultButton"],this.objectAssign({overflow:"hidden",cursor:"pointer",zIndex:1},a["playbackrate"]["defaultButtonCoor"]),this.CB["controlBarBg"],this.ckLanguage["playbackrate"],"playbackrateButtonText"),c=this.getEleCss(a["playbackrate"]["defaultButtonCoor"],d,this.CB["controlBarBg"]),this.css(this.CB["playbackrate"],{left:c["left"],top:c["top"]}),this.css(this.CB["playbackrateP"],"display","none"),c=this.getEleCss(a["playbackrate"]["backgroundCoorH5"],f
for(c=a;c<b.length;c++)if(this.time>=b[c]["startTime"]&&this.time<=b[c]["endTime"]){this.trackIndex=c;break}},playOrPause:function(){return this.loaded&&null!=this.V?"flashplayer"==this.playerType?(this.V.playOrPause(),void 0):(this.V.paused?this.videoPlay():this.videoPause(),void 0):void 0},videoPlay:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoPlay(),void 0;if(this.adPlayerPlay)return this.eliminateAd(),void 0;try{this.V.currentSrc&&this.V.play()}catch(a){}}},videoPause:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoPause(),void 0;try{this.V.pause()}catch(a){}}},videoSeek:function(a){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoSeek(a),void 0;var b=this.V.duration>.2?this.V.duration:this.getMetaDate()["duration"];b>0&&a>b&&(this.vars["forceduration"]>0?(a=0,this.sendJS("ended")):a=b-.1),a>=0&&(this.V.currentTime=a,this.sendJS("seekTime",a))}},changeVolume:function(a,b,c){var f,g;if(this.loaded&&"flashplayer"==this.playerType)return this.V.changeVolume(a),void 0;if((isNaN(a)||this.isUndefined(a))&&(a=0),this.loaded||(this.vars["volume"]=a),!this.html5Video)return this.V.changeVolume(a),void 0;try{this.isUndefined(b)&&(b=!0)}catch(d){}try{this.isUndefined(c)&&(c=!0)}catch(d){}a||(a=0),0>a&&(a=0),a>1&&(a=1);try{this.V.volume=a}catch(e){}this.volume=a,b&&this.conBarShow&&(f=a*this.CB["volumeBg"].offsetWidth,0>f&&(f=0),f>this.CB["volumeBg"].offsetWidth&&(f=this.CB["volumeBg"].offsetWidth),this.css(this.CB["volumeUp"],"width",f+"px")),c&&this.conBarShow&&(g=parseInt(this.CB["volumeUp"].offsetWidth-.5*this.CB["volumeBO"].offsetWidth),g>this.CB["volumeBg"].offsetWidth-this.CB["volumeBO"].offsetWidth&&(g=this.CB["volumeBg"].offsetWidth-this.CB["volumeBO"].offsetWidth),0>g&&(g=0),this.css(this.CB["volumeBO"],"left",g+"px"))},videoMute:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.videoMute(),void 0;this.volumeTemp=this.V?this.V.volume>0?this.V.volume:this.vars["volume"]:this.vars["volume"],this.changeVolume(0)}},videoEscMute:function(){return this.loaded?"flashplayer"==this.playerType?(this.V.videoEscMute(),void 0):(this.changeVolume(this.volumeTemp>0?this.volumeTemp:this.vars["volume"]),void 0):void 0},adMute:function(){this.loaded&&(this.changeVolume(0),this.adVideoMute=!0,this.css(this.CB["adEscMute"],"display","block"),this.css(this.CB["adMute"],"display","none"))},escAdMute:function(){if(this.loaded){var a=this.ckStyle["advertisement"]["videoVolume"];this.changeVolume(a),this.adMuteInto()}},adMuteInto:function(){this.adVideoMute=!1,this.css(this.CB["adEscMute"],"display","none"),this.css(this.CB["adMute"],"display","block")},fastBack:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.fastBack(),void 0;var a=this.time-this.ckConfig["config"]["timeJump"];0>a&&(a=0),this.videoSeek(a)}},fastNext:function(){if(this.loaded){if("flashplayer"==this.playerType)return this.V.fastNext(),void 0;var a=this.time+this.ckConfig["config"]["timeJump"];a>this.V.duration&&(a=this.V.duration),this.videoSeek(a)}},getCurrentSrc:function(){return this.loaded?"flashplayer"==this.playerType?this.V.getCurrentSrc():this.V.currentSrc:void 0},switchFull:function(){this.full?this.quitFullScreen():this.fullScreen()},fullScreen:function(){if(this.html5Video&&"html5video"==this.playerType){var a=this.PD;a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.oRequestFullscreen&&a.oRequestFullscreen(),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",""),t
},animatePause:function(a){var b,c,d;if("flashplayer"==this.playerType)return this.V.animatePause(this.isUndefined(a)?"":a),void 0;for(b=[],""==a||this.isUndefined(a)||"pause"==a?b="pause"===a?this.animatePauseArray:this.animateElementArray:b.push(a),c=0;c<b.length;c++)d=this.arrIndexOf(this.animateElementArray,b[c]),d>-1&&this.animateArray[d].stop()},deleteAnimate:function(a){if("flashplayer"==this.playerType&&this.V)try{this.V.deleteAnimate(a)}catch(b){this.log(b)}else{var c=this.arrIndexOf(this.animateElementArray,a);c>-1&&(this.animateArray[c].callBackFunction(),this.animateArray.splice(c,1),this.animateElementArray.splice(c,1))}},deleteElement:function(a){if("flashplayer"==this.playerType&&this.V)try{this.V.deleteElement(a)}catch(b){}else{var c=this.arrIndexOf(this.elementArr,a.className);c>-1&&this.elementArr.splice(c,1);try{c=this.arrIndexOf(this.elementTempArr,a.className),c>-1&&this.elementTempArr.splice(c,1)}catch(b){}this.deleteAnimate(a.className),this.deleteChild(a)}},getByElement:function(a,b){var c,d,e,f,g;if(this.isUndefined(b)&&(b=document),c=a.substr(0,1),d=[],"#"!=c){if("."==c&&(a=a.substr(1,a.length)),b.getElementsByClassName){if(d=b.getElementsByClassName(a),!d.length)return null}else for(e=new RegExp(" "+a+" ","i"),f=b.getElementsByTagName("*"),g=0;g<f.length;g++)e.test(" "+f[g].className+" ")&&d.push(f[g]);d=d.length>0?d[0]:null}else{"#"==c&&(a=a.substr(1,a.length));try{d=document.getElementById(a)}catch(h){d=null}}return d},css:function(a,b,c){var f,d=0,e="";if("array"!=this.varType(a))if("string"==this.varType(a)&&(a=this.getByElement(a)),"object"!=this.varType(b)){if(this.isUndefined(c))return this.isUndefined(this.getStyle(a,b))?!1:this.getStyle(a,b);a.style[b]=c}else for(e in b)this.isUndefined(b[e])||(a.style[e]=b[e]);else for(d=0;d<a.length;d++)if(f="string"==typeof a[d]?this.getByElement(a[d]):a[d],"object"!=typeof b)this.isUndefined(c)||(f.style[b]=c);else for(e in b)if(!this.isUndefined(b[e]))try{f.style[e]=b[e]}catch(g){this.log(g)}},getStyle:function(a,b){return this.isUndefined(a.style[b])?a.currentStyle?a.currentStyle[b]:getComputedStyle(a,!1)[b]:a.style[b]},isUndefined:function(a){try{if("undefined"===a||void 0===a||null===a||"NaN"===a||0/0===a)return!0}catch(b){return this.log(b),!0}return!1},addListener:function(a,b){var c,d,e,f;if(a&&b){if("flashplayer"==this.playerType)return c="","function"==this.varType(b)&&(c=this.getParameterNames(b)),this.V.addListener(a,c),void 0;for(d=!1,e=0;e<this.listenerJsArr.length;e++)if(f=this.listenerJsArr[e],f[0]==a&&f[1]==b){d=!0;break}d||this.listenerJsArr.push([a,b])}},removeListener:function(a,b){var c,d,e;if(a&&b){if("flashplayer"==this.playerType)return c="","function"==this.varType(b)&&(c=this.getParameterNames(b)),this.V.removeListener(a,c),void 0;for(d=0;d<this.listenerJsArr.length;d++)if(e=this.listenerJsArr[d],e[0]==a&&e[1]==b){this.listenerJsArr.splice(d,1);break}}},addListenerInside:function(a,b,c,d){this.isUndefined(d)&&(d=!1);var e=this.V;if(this.isUndefined(c)||(e=c),e.addEventListener)try{e.addEventListener(a,b,d)}catch(f){this.log(f)}else if(e.attachEvent)try{e.attachEvent("on"+a,b)}catch(f){this.log(f)}else e["on"+a]=b},removeListenerInside:function(a,b,c,d){this.isUndefined(d)&&(d=!1);var e=this.V;if(this.isUndefined(c)||(e=c),e.removeEventListener)try{this.addNum--,e.removeEventListener(a,b,d)}catch(a){}else if(e.detachEvent)try{e.detachEvent("on"+a,b)}catch(a){}else e["on"+a]=null},sendJS:function(a,b){var c,d,e,f;if(!(this.adPlayerPlay&&"Ad"!=a.substr(-2)||this.isUndefined(a)))for(c=this.listenerJsArr,d=this.vars["variable"],this.vars["debug"]&&this.log(a+":"+b),e=0;e<c.length;e++)if(f=c[e],f[0]==a)if(this.isUndefined(b))f[1](d);else switch(f[1].length){case 1:f[1](b);break;case 2:f[1](b,d);break;default:f[1]()}},getParameterNames:function(a){var b,c,d;return"function"!==this.varType(a)?!1:(b=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,c=a.toString().replace(b,""),d=c.slice(c.indexOf(" ")+1,c.indexOf("(")),null===d?!1:d)},replaceTime:function(a,b){for(var c in b)a=a.replace("[$"+c+"]",b[c]);return a},formatTime:function(a,b,c){var d,