// Turner XMP, Release Build, © 2007 Turner Broadcasting System, Inc. A Time Warner Company.  File: xmp_baseplayer, Version: 0.1.567.2163

xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.Bootstrapper=function(){this._boot_state=0;this._callbackObj=null;};xmp.baseplayer.Bootstrapper.prototype.init=function(){this._addSystemLoggerListeners();};xmp.baseplayer.Bootstrapper.prototype.isNew=function(){return(this._boot_state===0);};xmp.baseplayer.Bootstrapper.prototype.isOk=function(){return(this._boot_state===1);};xmp.baseplayer.Bootstrapper.prototype.bootStrap=function(aa){this._boot_state=-1;this._callbackObj=aa;var cb=new xmp.util.Callback('adServiceCallback',this.p_onAdServiceInit,this);xmp.net.AdService.i_getInstance().i_init(cb,30000);};xmp.baseplayer.Bootstrapper.prototype.p_onAdServiceInit=function(){var cb=new xmp.util.Callback('Bootstrapper_bootStrap',this._onBootStrap,this);xmp.net.AjaxRequestManager.getInstance().init(cb);};xmp.baseplayer.Bootstrapper.prototype._onInternalUserDetectionInited=function(ba){this._boot_state=1;this._callbackObj.handleBootstrappedInternal(null);};xmp.baseplayer.Bootstrapper.prototype._onBootStrap=function(ca,da){if(da==='Ready'){this._boot_state=0;var ea=new xmp.util.Callback('Bootstrapper._onInternalUserDetectionInited',this._onInternalUserDetectionInited,this);xmp.InternalUserDetection.getInstance().init(ea);}
else{this._boot_state=-1;this._callbackObj.handleBootstrappedInternal(da);}};xmp.baseplayer.Bootstrapper.prototype._addSystemLoggerListeners=function(){var fa=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var ga=fa.getNodeForPath('Instrumentation');var ha=ga.getBoolean('enabled',false);if(ha===true){var ia=ga.getString('thresholdLevel','critical');var ja=xmp.util.LogLevels.fromString(ia);var ka=new xmp.baseplayer.InstrumentationLoggerListener(ja);xmp.util.Logger.getInstance().addListener(ka);}
var la=xmp.getQueryArgOpt('xmpErrorThreshold','fatal');var ma=xmp.util.LogLevels.fromString(la);ma=Math.min(xmp.util.LogLevels.WARN,ma);var na=new xmp.baseplayer.ErrorLoggerListener(ma);xmp.util.Logger.getInstance().addListener(na);};xmp.baseplayer.Bootstrapper._cacheHtmlObjects=function(){var oa=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('CacheSlates');var pa=oa.retrieveKeys();for(var i=0;i<pa.length;i++){var qa=pa[i];var ra=oa.getString(qa,"").split(",");var sa=xmp.baseplayer.MetaFileLoaderFactory.getInstance().create(qa);sa.setIds(ra,null);sa.load();}};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.AbstractNodeListener=function(id,ta){xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.OBJECT_TYPE],"AbstractNodeListener.ctor");if(id===null||id.length===0||ta===null){throw new xmp.util.internals.InvalidArgsError("The 'id' argument must be non-empty, "+"and the 'player' argument must be non-null.");}
this._id=id;this._player=ta;};xmp.baseplayer.listeners.AbstractNodeListener.prototype.getId=function(){return this._id;};xmp.baseplayer.listeners.AbstractNodeListener.prototype.getPlayer=function(){return this._player;};xmp.baseplayer.listeners.AbstractNodeListener.prototype.canUserControl=function(ua){return true;};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleInitialize=function(va){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleDynamicRules=function(wa){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleComplete=function(xa){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.canCompleteNow=function(ya){return true;};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleCompleteAsynch=function(za,Aa){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleRender=function(Ba){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleOpen=function(Ca){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleConnecting=function(Da){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleConnected=function(Ea){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handlePlay=function(Fa){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleFirstFrameRendered=function(Ga){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handlePause=function(Ha){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleStop=function(Ia){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleRewind=function(Ja){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleFastForward=function(Ka){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleSeekable=function(La){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleEnded=function(Ma){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleBuffering=function(Na,Oa){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleTimelineChange=function(Pa,Qa,Ra){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleError=function(Sa,e){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleOverrideAdResources=function(Ta,Ua){};xmp.baseplayer.listeners.AbstractNodeListener.prototype.handleValidate=function(Va){};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultBaseNodeListener=function(Wa,Xa){xmp.baseplayer.listeners.DefaultBaseNodeListener.ctor.call(this,Wa,Xa);this._bnl_logger=new xmp.util.internals.CategoryLogger('DefaultBaseNodeListener');};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,xmp.baseplayer.listeners.DefaultBaseNodeListener);xmp.baseplayer.listeners.DefaultBaseNodeListener.prototype.handleRender=function(Ya){this.getPlayer().getMediaPlayer().open(Ya);};xmp.baseplayer.listeners.DefaultBaseNodeListener.prototype.handleEnded=function(Za){this.getPlayer().advance();};xmp.baseplayer.listeners.DefaultBaseNodeListener.prototype.handleError=function($a,e){this._bnl_logger.warn("Dropping node: "+$a.getBestId()+', error: '+xmp.extractErrorMessage(e));this.getPlayer().advance();};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultSlateNodeListener=function(ab,bb){xmp.baseplayer.listeners.DefaultSlateNodeListener.ctor.call(this,ab,bb);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultBaseNodeListener,xmp.baseplayer.listeners.DefaultSlateNodeListener);xmp.baseplayer.listeners.DefaultSlateNodeListener.prototype.handleInitialize=function(db){var eb=db.getMetadata("url","");if(eb.length>0){db.setURI(eb);}
db.setMimeType(xmp.DHTML_MIME_TYPE);};xmp.baseplayer.listeners.DefaultSlateNodeListener.prototype._findNextContentNode=function(){var fb=this.getPlayer().getLookAheadNodeArray();for(var i=0;i<fb.length;i++){var gb=fb[i];if(gb.isContentType()){return gb;}}
return null;};xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.TriggerNodeListener=function(id,hb){xmp.baseplayer.listeners.internal.TriggerNodeListener.ctor.call(this,id,hb);this.tracked_midpoint=false;this.live=false;};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,xmp.baseplayer.listeners.internal.TriggerNodeListener);xmp.baseplayer.listeners.internal.TriggerNodeListener.prototype.handleRender=function(ib){this.tracked_midpoint=false;this.live=(ib.getStreamingMode()==='live');if(false===this.live){xmp.util.TriggerHelper.handleTrackRequest(ib,this.getPlayer());}
xmp.baseplayer.listeners.internal.TriggerNodeListener.base.handleRender.call(this,ib);};xmp.baseplayer.listeners.internal.TriggerNodeListener.prototype.handleOpen=function(jb){this.tracked_midpoint=false;this.live=(jb.getStreamingMode()==='live');xmp.util.TriggerHelper.handleTrackStart(jb,this.getPlayer());xmp.baseplayer.listeners.internal.TriggerNodeListener.base.handleOpen.call(this,jb);};xmp.baseplayer.listeners.internal.TriggerNodeListener.prototype.handleEnded=function(kb){if(false===this.live){xmp.util.TriggerHelper.handleTrackEnd(kb,this.getPlayer());}
xmp.baseplayer.listeners.internal.TriggerNodeListener.base.handleEnded.call(this,kb);};xmp.baseplayer.listeners.internal.TriggerNodeListener.prototype.handleTimelineChange=function(lb,mb,nb){xmp.baseplayer.listeners.internal.TriggerNodeListener.base.handleTimelineChange.call(this,lb,mb,nb);if(false===this.live&&false===this.tracked_midpoint){if(nb===0){return;}
var ob=(((lb.getTimeLimitInSeconds()!==xmp.NO_TIME_LIMIT)?lb.getTimeLimitInSeconds():nb)/2);if(mb>=ob){xmp.util.TriggerHelper.handleTrackMidpoint(lb,this.getPlayer());this.tracked_midpoint=true;}}};xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.AdResNodeListener=function(id,pb){xmp.baseplayer.listeners.internal.AdResNodeListener.ctor.call(this,id,pb);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,xmp.baseplayer.listeners.internal.AdResNodeListener);xmp.baseplayer.listeners.internal.AdResNodeListener.prototype.canCompleteNow=function(qb){var rb=qb.getMetaResourceBundle();if(rb.isError()||rb.isLoaded()){this._handleResBundleLoaded(qb,rb);}
if(rb.isError()){return true;}
return rb.isLoaded();};xmp.baseplayer.listeners.internal.AdResNodeListener.prototype.handleCompleteAsynch=function(sb,tb){var ub=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer').getString('videoAdMetaLoader','videoAdMeta');var vb=xmp.baseplayer.MetaFileLoaderFactory.getInstance().create(ub);var wb=new xmp.util.Callback('gotAdCallback',this._gotAdCallback,this);wb.setMetadata('RelayCallback',tb);wb.setMetadata('theNode',sb);vb.setResBundle(sb.getMetaResourceBundle(),wb);vb.load();};xmp.baseplayer.listeners.internal.AdResNodeListener.prototype._gotAdCallback=function(xb,yb){var zb=xb.getMetadata('RelayCallback',{});var Ab=xb.getMetadata('theNode',{});this._handleResBundleLoaded(Ab,yb);zb.call(Ab);};xmp.baseplayer.listeners.internal.AdResNodeListener.prototype._handleResBundleLoaded=function(Bb,Cb){};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.GenericMetaFileLoader=function(Db,Eb,Fb,Gb,Hb,Ib,Jb){this._THIS_TYPE=Db;this._THIS_LOADER_TYPE=Eb;this._CONTENT_TYPE=Fb;this._APP_ERROR_TYPE=Gb;this._MAX_CACHE_TIME=Hb;this._logger=new xmp.util.internals.CategoryLogger(this._THIS_LOADER_TYPE);this._owner=Ib;this._loaderId=Jb;this._handleArray=[];this._handleMap={};this._perIdCallback=null;this._allLoadedCallback=null;this._loadedCount=0;this._loadCalled=false;};xmp.baseplayer.internals.GenericMetaFileLoader.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.GenericMetaFileLoader.prototype.setIds=function(Kb,Lb){this._loadCalled=false;this._handleArray=[];this._perIdCallback=Lb;var Mb={};for(var i=0;i<Kb.length;i++){var id=Kb[i];if(!(typeof id==='string'&&id.length>0)){throw new xmp.util.internals.InvalidArgsError("The 'ids' argument must be an array of non-empty strings.");}
if(typeof Mb[id]!=='undefined'){this._logger.warn('Skipping duplicate ID: '+id);continue;}
Mb[id]=id;var Nb=xmp.baseplayer.internals.MetaFileCache.getInstance().findOrCreate(this._THIS_TYPE,id,this,this._MAX_CACHE_TIME);var Ob={h:Nb,ready:false};this._handleArray.push(Ob);this._handleMap[Nb.getId()]=Ob;}
return this._extractLoadableDataArray();};xmp.baseplayer.internals.GenericMetaFileLoader.prototype.setAllLoadedCallback=function(Pb){this._allLoadedCallback=Pb;};xmp.baseplayer.internals.GenericMetaFileLoader.prototype.load=function(){this._loadCalled=true;if(this._handleArray.length===0){this._releaseThis();this._notifyAllLoaded();return;}
this._loadedCount=0;for(var i=0;i<this._handleArray.length;i++){var Qb=this._handleArray[i];if(Qb.ready){this._notifyPerFile(Qb.h);}}};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._extractLoadableDataArray=function(){var Rb=[];for(var i=0;i<this._handleArray.length;i++){var Sb=this._handleArray[i].h;Rb.push(Sb.getDataObject());}
return Rb;};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._notifyPerFile=function(Tb){if(Tb.isLoaded()){this._loadedCount++;this._notifyPerFileCore(Tb);}
if(this._loadedCount>=this._handleArray.length){this._releaseThis();this._notifyAllLoaded();}};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._releaseThis=function(){if(this._owner!==null){this._owner._release(this);this._owner=null;}};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._notifyPerFileCore=function(Ub){try{if(this._perIdCallback!==null){this._perIdCallback.call(Ub.getDataObject());}}
catch(e){this._logger.warn('Error calling per-file-callback',e);}};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._notifyAllLoaded=function(){try{if(this._allLoadedCallback!==null){this._allLoadedCallback.call();}}
catch(e){this._logger.warn('Error calling all-loaded-callback',e);}};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._notifyFileRequestLoaded=function(Vb){if(this._loadCalled){this._notifyPerFile(Vb);}
else{var Wb=this._handleMap[Vb.getId()];if(Wb.h!==Vb){throw new Error('Unexpected, handles not the same reference.');}
Wb.ready=true;}};xmp.baseplayer.internals.GenericMetaFileLoader.GenericLoadable=function(id){xmp.baseplayer.internals.GenericMetaFileLoader.GenericLoadable.ctor.call(this);this._id=id;};xmp.DERIVE_CLASS(xmp.util.Loadable,xmp.baseplayer.internals.GenericMetaFileLoader.GenericLoadable);xmp.baseplayer.internals.GenericMetaFileLoader.GenericLoadable.prototype.getLoadableId=function(){return this._id;};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._createLoadable=function(id){return(new xmp.baseplayer.internals.GenericMetaFileLoader.GenericLoadable(id));};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._loadFileRequest=function(Xb){var Yb=null;try{Yb=this._createLoadable(Xb.getId());Xb._setDataObject(Yb);var Zb=new xmp.util.Callback(this._THIS_LOADER_TYPE+'_'+this.getLoaderId()+'_'+Xb.getId(),this._handleAjaxResponse,this);var $b=xmp.net.AjaxRequestManager.getInstance();Zb.setMetadata('handle',Xb);$b.request(Xb.getId(),Zb,Xb.getType(),Xb.getId(),this._CONTENT_TYPE,null);return xmp.baseplayer.internals.FileRequestHandle.STATE_LOADING;}
catch(e){try{if(Yb!==null){Yb._setErrorMessage(xmp.extractErrorMessage(e));}}
catch(e2){this._logger.warn('Second chance error handling created file request',e2);}
throw e;}};xmp.baseplayer.internals.GenericMetaFileLoader.prototype._handleAjaxResponse=function(ac,bc){var cc=ac.getMetadata('handle',{});var dc=cc.getDataObject();if(!bc.isError()){if(xmp.net.ContentTypes.JSON===this._CONTENT_TYPE){dc._setRawData(bc.getJsonObject());}
else{if(xmp.net.ContentTypes.TEXT!==this._CONTENT_TYPE){throw new Error('Unexpected content type');}
dc._setRawData(bc.getText());}}
else{var ec=new xmp.baseplayer.ApplicationError(bc.getErrorObject(),this._APP_ERROR_TYPE,this._THIS_TYPE,[{label:'url',text:bc.getFullUrl()}]);this._logger.warn(ec.message,ec);cc._setErrorMessage(bc.getErrorMessage());dc._setErrorMessage(bc.getErrorMessage());}
cc._setAsLoaded();};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.AppErrorCodes=function(){};xmp.baseplayer.AppErrorCodes.data=[];xmp.baseplayer.AppErrorCodes.data.badAdPolicy='Ad policy not found';xmp.baseplayer.AppErrorCodes.data.badAdPattern='Bad ad pattern';xmp.baseplayer.AppErrorCodes.data.FailToGetAdPattern='Failed to get the "ad pattern" JSON:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid JSON file exists at the specified location.  Also, make sure that the required cross-domain XML file on the JSON host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.RulesNotDownLoaded='Failed to get the "rules JavaScript" file:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid JS file exists at the specified location.  Also, make sure that the required cross-domain XML file on the JS host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.missingContent='Missing content';xmp.baseplayer.AppErrorCodes.data.FailToGetDhtmlObject='Failed to load the DHTML object:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid DHTML object exists at the specified location.  Also, make sure that the required cross-domain XML file on the DHTML host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.missingAd='Failed to get the ad:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid ad file exists at the specified location.  Also, make sure that the required cross-domain XML file on the ad host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.badAdJson='Bad ad JSON';xmp.baseplayer.AppErrorCodes.data.FailToGetAdVideo='Failed to get the ad video:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid ad-video file exists at the specified location.  Also, make sure that the required cross-domain XML file on the ad-video host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.missingVideoJson='Failed to get the video JSON:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid JSON file exists at the specified location.  Also, make sure that the required cross-domain XML file on the JSON host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.FailToGetVideoJson='Failed to get the video JSON:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid JSON file exists at the specified location.  Also, make sure that the required cross-domain XML file on the JSON host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.FailToGetPromoJson='Failed to get the promo JSON:  Make sure that the corresponding value for "rootUrl" in primary.js is correct, and that a valid JSON file exists at the specified location.  Also, make sure that the required cross-domain XML file on the JSON host has the needed site entry.';xmp.baseplayer.AppErrorCodes.data.badVideoJson='Exception caught during "all loaded" notification.  The video JSON might be invalid.';xmp.baseplayer.AppErrorCodes.data.mediaPlayerError='Media-player error';xmp.baseplayer.AppErrorCodes.data.badInitialFlashObject='Timed out initializing Flash:  Make sure that the corresponding value for "rootUrl" in primary.js is correct for the initial Flash object.  Also, make sure that the Flash plug-in is installed and that the installation is not corrupted.';xmp.baseplayer.AppErrorCodes.getDescription=function(fc){var gc=xmp.baseplayer.AppErrorCodes.data[fc];if(gc===null){gc='Unknown error: '+fc;}
return gc;};xmp.baseplayer.ApplicationError=function(e,hc,ic,jc){var kc=xmp.baseplayer.AppErrorCodes.getDescription(hc);xmp.baseplayer.ApplicationError.ctor.call(this,"ApplicationError",ic,kc,jc);this.setInnerError(e);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.baseplayer.ApplicationError);xmp.baseplayer.ApplicationError.prototype.getInnerError=function(){return this.innerError;};xmp.baseplayer.ApplicationError.prototype.getMessage=function(){return this.message;};xmp.baseplayer.ApplicationError.prototype.getContext=function(){return this.context;};xmp.baseplayer.ApplicationError.prototype.getExtendedInfo=function(){return this.extendedInfo;};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.BasePlayer=function(id,lc,mc){xmp.util.LogConfigurator.configure();if(xmp.baseplayer.BasePlayer._singleInstance!==null){throw new Error('Only one instance of BasePlayer allowed per browser session.');}
this._nextPlayListContextKey=1;this._playListContextCollection={};this._currentPlayListContext=null;this._logger=new xmp.util.internals.CategoryLogger('BasePlayer');this._id=id;xmp.baseplayer.BasePlayer._playerMap[this.getId()]=this;this._metadataMap=new xmp.util.internals.MetadataMap(true);this._metadataMap._reInitialize(lc);this._parameters=mc;this._mediaPlayer=null;this._nlMap=new xmp.baseplayer._NLMap(this);this._bootStrapper=xmp.baseplayer.BasePlayer._bootStrapper;this._bootStrapper.init();this._options=lc;xmp.baseplayer.BasePlayer._singleInstance=this;};xmp.baseplayer.BasePlayer._playerMap={};xmp.baseplayer.BasePlayer._singleInstance=null;xmp.baseplayer.BasePlayer._bootStrapper=new xmp.baseplayer.Bootstrapper();xmp.baseplayer.BasePlayer._fatalException=xmp.FatalException.createFatalException(xmp.XmpErrorCodes.FATAL_UNSPECIFIED_ERROR,'BasePlayer','not boostrapped yet');xmp.baseplayer.BasePlayer.prototype.getAbsoluteURI=function(nc,oc){if(nc.length>0&&nc.charAt(0)==='/'){var pc="http://"+window.location.host;var qc=pc;if(typeof oc!=='undefined'&&oc!=='defaultRoot'){qc=xmp.util.RootUrlProvider.getInstance().getRootUrl(oc,pc);}
nc=qc+nc;}
return nc;};xmp.baseplayer.BasePlayer.findPlayer=function(id){var rc=xmp.baseplayer.BasePlayer._playerMap[id];return(!rc)?null:rc;};xmp.baseplayer.BasePlayer.configure=function(sc,tc){var uc=[xmp.internal_settings_pref_api];uc=uc.concat(sc);xmp.util.SettingsManager.getInstance().init(uc,tc);var vc=xmp.util.internals.MockTestMode.getInstance();if(vc.isActive()){vc.configure();}};xmp.baseplayer.BasePlayer.prototype.bootStrap=function(){try{if(!this._bootStrapper.isNew()){throw new Error('Already tried to bootstrap.');}
var wc=xmp.baseplayer.BasePlayer._fatalException;xmp.PlayerPolicy.validateBootstrap(this);if(wc===xmp.baseplayer.BasePlayer._fatalException){this._bootStrapper.bootStrap(this);}
else{this.handleBootstrapped(false);}}
catch(e){this.handleBootstrappedInternal(e);}};xmp.baseplayer.BasePlayer.prototype.fini=function(){if(this._mediaPlayer!==null){this._mediaPlayer.fini();this._mediaPlayer=null;}
xmp.ServiceRegistry.fini();};xmp.baseplayer.BasePlayer.prototype.getId=function(){return this._id;};xmp.baseplayer.BasePlayer.prototype.getMediaPlayer=function(){return this._mediaPlayer;};xmp.baseplayer.BasePlayer.prototype.getLookAheadNodeArray=function(){return this._getCurCtx('getLookAheadNodeArray').getLookAheadNodeArray();};xmp.baseplayer.BasePlayer.prototype.getLookBehindNodeArray=function(){return this._getCurCtx('getLookBehindNodeArray').getLookBehindNodeArray();};xmp.baseplayer.BasePlayer.prototype.getMetadata=function(xc,yc){return this._metadataMap._get(xc,yc);};xmp.baseplayer.BasePlayer.prototype.setPlayerContext=function(zc){xmp.util.PlayerStats.getInstance().setValue('playerContext',zc);xmp.util.SettingsManager.getInstance().setContext(zc);xmp.baseplayer.Bootstrapper._cacheHtmlObjects();};xmp.baseplayer.BasePlayer.prototype.createPlayListContext=function(Ac){this._checkXmpState();this._faultMediaPlayer();var Bc=this._getAdPatternRelPath(Ac);var Cc=this._getContextParameters();Cc=Cc.concat(this._parameters);var Dc=this._createPlayListContext(Bc,Cc);this._setCurrentPlayListContext(Dc);var Ec=Dc.getKey();if(this._logger.isDebugEnabled()){this._logger.debug("Created new playlist, key = "+Ec);Dc.debugPrint("Initial State");}
return Ec;};xmp.baseplayer.BasePlayer.prototype.loadContent=function(Fc,Gc){this._checkXmpState();return this._getCurCtx('loadContent').loadContent(Fc,(Gc?Gc:''));};xmp.baseplayer.BasePlayer.prototype.load=function(Hc,Ic,Jc){this._logger.warn('Method "BasePlayer.load" is deprecated, please change code to no longer use this method.');var Kc=this.createPlayListContext(Jc);this.loadContent(Hc,Ic);return Kc;};xmp.baseplayer.BasePlayer.prototype.loadItem=function(Lc,Mc,Nc){this._faultMediaPlayer();var Oc=this._createPlayableNode(Lc,Mc,Nc);var Pc=this._getNodeListener(Oc);Pc.handleInitialize(Oc);Pc.handleValidate(Oc);Pc.handleComplete(Oc);Pc.handleRender(Oc);};xmp.baseplayer.BasePlayer.prototype._createPlayableNode=function(Qc,Rc,Sc){var Tc=new xmp.util.PlayableNode();Tc._setNodeType(new xmp.playlistapi.internals.RuleSetPlayableNodeType(null,Qc,Qc,[],{}));if(Rc){if(Rc.url){Tc.setURI(Rc.url);}
Tc._setData(((Rc.metadata)?Rc.metadata:new xmp.util.PlayableData('DEFAULT')));}
if(Sc){var Uc=Sc.length;for(var i=0;i<Uc;i++){Tc.setMetadata(Sc[i].name,Sc[i].value);}}
return Tc;};xmp.baseplayer.BasePlayer.prototype._getAdPatternRelPath=function(Vc){var Wc='';var Xc=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer/ad patterns');if(typeof(Vc)==='undefined'){var Yc=Xc.retrieveKeys();if(Yc.length>0){Wc=Xc.getString(Yc[0],'');}}
else{if(!xmp.isNonEmptyString(Vc)){throw new xmp.util.internals.InvalidArgsError('The adPatternKey parameter must be a non-empty string');}
Wc=Xc.getString(Vc,'');}
if(!xmp.isNonEmptyString(Wc)){throw new xmp.util.internals.InvalidArgsError('Failed to find ad pattern relative URL.');}
return Wc;};xmp.baseplayer.BasePlayer.prototype._createPlayListContext=function(Zc,$c){var ad=this._nextPlayListContextKey++;var bd=new xmp.baseplayer._PLCtx(ad,this,Zc,$c);this._playListContextCollection[ad]=bd;return bd;};xmp.baseplayer.BasePlayer.prototype.switchPlayList=function(cd){var dd=this._playListContextCollection[cd];if(!dd){throw new xmp.util.internals.InvalidArgsError(""+cd+" is not a valid playlist context key");}
else{if(this._logger.isDebugEnabled()){this._logger.debug("Switching playlist context:");this._currentPlayListContext.debugPrint("old context");this._setCurrentPlayListContext(dd);this._currentPlayListContext.debugPrint("new context");}
this._tryRender();}};xmp.baseplayer.BasePlayer.prototype.hasPlayListContext=function(){return this._currentPlayListContext!==null;};xmp.baseplayer.BasePlayer.prototype._setCurrentPlayListContext=function(ed){if(this._currentPlayListContext){this._currentPlayListContext.setStateListener(null);}
this._currentPlayListContext=ed;this._currentPlayListContext.setStateListener(this);};xmp.baseplayer.BasePlayer.prototype._getCurCtx=function(fd){if(!this._currentPlayListContext){throw new Error('BasePlayer.'+fd+": Cannot perform operation because playlist context has not been set. Call load() first.");}
return this._currentPlayListContext;};xmp.baseplayer.BasePlayer.prototype.appendToPlayList=function(gd,hd){this._checkXmpState();return this._getCurCtx('appendToPlayList').appendToPlayList(gd,((hd)?hd:false));};xmp.baseplayer.BasePlayer.prototype.removeFromPlayList=function(jd){this._checkXmpState();return this._getCurCtx('removeFromPlayList').removeFromPlayList(jd);};xmp.baseplayer.BasePlayer.prototype.insertInPlayList=function(kd,ld,md){this._checkXmpState();return this._getCurCtx('insertInPlayList').insertInPlayList(kd,ld,((md)?md:false));};xmp.baseplayer.BasePlayer.prototype.moveWithinPlayList=function(nd,od,pd){this._checkXmpState();return this._getCurCtx('moveWithinPlayList').moveWithinPlayList(nd,od,((pd)?pd:false));};xmp.baseplayer.BasePlayer.prototype.setCurrentPlayListPosition=function(qd){this._checkXmpState();return this._getCurCtx('setCurrentPlayListPosition').setCurrentPlayListItem(qd);};xmp.baseplayer.BasePlayer.prototype.getCurrentPlayListItem=function(){return this._getCurCtx('getCurrentPlayListItem').getCurrentPlayListItem();};xmp.baseplayer.BasePlayer.prototype.getPlayListItemCount=function(){return this._getCurCtx('getPlayListItemCount').getPlayListItemCount();};xmp.baseplayer.BasePlayer.prototype.getPlayListItem=function(rd){return this._getCurCtx('getPlayListItem').getPlayListItem(rd);};xmp.baseplayer.BasePlayer.prototype.findPlayListItem=function(sd){return this._getCurCtx('findPlayListItem').findPlayListItem(sd);};xmp.baseplayer.BasePlayer.prototype.findPlayListItemIndex=function(td){return this._getCurCtx('findPlayListItemIndex').findPlayListItemIndex(td);};xmp.baseplayer.BasePlayer.prototype.advance=function(){this._checkXmpState();this._getCurCtx('advance').advance();};xmp.baseplayer.BasePlayer.prototype.onAdvance=function(){this._tryRender();};xmp.baseplayer.BasePlayer.prototype._tryRender=function(){if(this._isReady()){var ud=this._currentPlayListContext.getCurrentNode();if(ud){this._renderNode(ud,true);}}};xmp.baseplayer.BasePlayer.prototype.registerNodeListener=function(vd,wd){this._nlMap._registerNodeListener(vd,wd);};xmp.baseplayer.BasePlayer.prototype._initServices=function(xd){if(xd.services){xmp.ServiceRegistry.init(this,xd.services);}};xmp.baseplayer.BasePlayer.prototype.handlePlayListStarted=function(){this._logger.info('PlayList started, override "handlePlayListStarted" to do specific handling.');};xmp.baseplayer.BasePlayer.prototype.handlePlayListEnded=function(){this._logger.info('PlayList ended, override "handlePlayListEnded" to do specific handling.');};xmp.baseplayer.BasePlayer.prototype.handlePlayListModified=function(yd){this._logger.info('PlayList modified, override "handlePlayListModified" to do specific handling.');};xmp.baseplayer.BasePlayer.prototype.handleMediaPlayerReady=function(){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.handleCreateViewport=function(zd,Bd,Cd,Dd){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.handleDestroyViewport=function(Ed,Fd){var Gd=xmp.findDomElement(Fd);if(Gd){var Hd=xmp.getDomParent(Gd);Hd.removeChild(Gd);}};xmp.baseplayer.BasePlayer.prototype.handleFatalException=function(e){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.handleBootstrapped=function(Id){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.handleRegisterNodeListeners=function(){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.onControlStreamError=function(e){this.handleControlStreamError(e);};xmp.baseplayer.BasePlayer.prototype.handleControlStreamError=function(e){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.onControlStreamTriggerInit=function(Jd,Kd){this.handleControlStreamTriggerInit(Jd,Kd);};xmp.baseplayer.BasePlayer.prototype.handleControlStreamTriggerInit=function(Ld,Md){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.onControlStreamTrigger=function(Nd,Od){this.handleControlStreamTrigger(Nd,Od);};xmp.baseplayer.BasePlayer.prototype.handleControlStreamTrigger=function(Pd,Qd){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.onRetrieveImage=function(Rd,Sd){this.handleRetrieveImage(Rd,Sd);};xmp.baseplayer.BasePlayer.prototype.handleRetrieveImage=function(Td,Ud){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype.onImageRetrieverError=function(e){this.handleImageRetrieverError(e);};xmp.baseplayer.BasePlayer.prototype.handleImageRetrieverError=function(e){this._throwMustOverrideError();};xmp.baseplayer.BasePlayer.prototype._throwMustOverrideError=function(){throw new xmp.playlistapi.internals.PlayListError('Not implemented, must override.');};xmp.baseplayer.BasePlayer.prototype._getNodeListener=function(Vd){return this._nlMap._getNodeListener(Vd);};xmp.baseplayer.BasePlayer.prototype._faultMediaPlayer=function(){if(this._mediaPlayer===null){this._createMediaPlayer();}};xmp.baseplayer.BasePlayer.prototype._createMediaPlayer=function(){this._mediaPlayer=xmp.MediaPlayerFactory.createPlayer(this.getId(),this);this._mediaPlayer.init();};xmp.baseplayer.BasePlayer.prototype.onInitialized=function(){this.handleMediaPlayerReady();this.handleRegisterNodeListeners();};xmp.baseplayer.BasePlayer.prototype.onTimelineChange=function(Wd,Xd,Yd){this._getNodeListener(Wd).handleTimelineChange(Wd,Xd,Yd);};xmp.baseplayer.BasePlayer.prototype.onStateChange=function(Zd,$d,ae){switch($d){case xmp.OPEN:this._getNodeListener(Zd).handleOpen(Zd);break;case xmp.CONNECTING:this._getNodeListener(Zd).handleConnecting(Zd);break;case xmp.CONNECTED:this._getNodeListener(Zd).handleConnected(Zd);break;case xmp.PLAY:this._getNodeListener(Zd).handlePlay(Zd);break;case xmp.PAUSE:this._getNodeListener(Zd).handlePause(Zd);break;case xmp.STOP:this._getNodeListener(Zd).handleStop(Zd);break;case xmp.REWIND:this._getNodeListener(Zd).handleRewind(Zd);break;case xmp.FAST_FORWARD:this._getNodeListener(Zd).handleFastForward(Zd);break;case xmp.SEEKABLE:this._getNodeListener(Zd).handleSeekable(Zd);break;case xmp.ENDED:this._getNodeListener(Zd).handleEnded(Zd);break;case xmp.FIRST_FRAME_RENDERED:this._getNodeListener(Zd).handleFirstFrameRendered(Zd);break;case xmp.BUFFERING:this._getNodeListener(Zd).handleBuffering(Zd,ae);break;default:this._logger.warn('Unrecognized media player state: '+$d);break;}};xmp.baseplayer.BasePlayer.prototype.onError=function(be,e){this._getNodeListener(be).handleError(be,e);};xmp.baseplayer.BasePlayer.prototype.onCreateViewport=function(ce,de,ee,fe){return this.handleCreateViewport(ce,de,ee,fe);};xmp.baseplayer.BasePlayer.prototype.onDestroyViewport=function(ge,he){this.handleDestroyViewport(ge,he);};xmp.baseplayer.BasePlayer.prototype.onPlugInError=function(e){this._raiseFatalException(e);};xmp.baseplayer.BasePlayer.prototype.onUnsupportedPlatformError=function(e){this._raiseFatalException(e);};xmp.baseplayer.BasePlayer.prototype._getContextParameters=function(){var je=[];var ke=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('pattern parameters');var le=ke.retrieveKeys();for(var i=0;i<le.length;i++){var me=le[i];je.push({name:me,value:ke.getString(me,'')});}
return je;};xmp.baseplayer.BasePlayer.prototype._isReady=function(){return(this._currentPlayListContext!==null);};xmp.baseplayer.BasePlayer.prototype.handleInitializePlayableNode=function(ne){this._getNodeListener(ne).handleInitialize(ne);this._getNodeListener(ne).handleDynamicRules(ne);};xmp.baseplayer.BasePlayer.prototype._isStillCurrentNode=function(oe){var pe=this._currentPlayListContext.getCurrentNode();return(oe===pe);};xmp.baseplayer.BasePlayer.prototype._gotAsynchCompleteCallback=function(qe,se){if(this._isStillCurrentNode(se)){this._renderNode(se,false);}};xmp.baseplayer.BasePlayer.prototype._renderNode=function(te,ue){var ve=null;try{ve=this._getNodeListener(te);if(ue){this._overrideAdRes(ve,te);}
if(!this._isStillCurrentNode(te)){return;}
if(ve.canCompleteNow(te)){if(te.getPlayableData().isError()){ve.handleError(te,te.getPlayableData().getError());return;}
ve.handleValidate(te);ve.handleComplete(te);var we=xmp.util.internals.MockTestMode.getInstance();if(we.isActive()){we.overrideMimeType(te);}
if(!this._isStillCurrentNode(te)){return;}
te.getPlayableData().setRuntimeMetadata('history_played',true);ve.handleRender(te);}
else{if(!ue){throw new Error('_renderNode: prevent infinite loop');}
var xe=new xmp.util.Callback('gotAsynchCompleteCallback',this._gotAsynchCompleteCallback,this);ve.handleCompleteAsynch(te,xe);}}
catch(e){this._logger.warn("Error rendering node: "+te.getBestId(),e);try{ve.handleError(te,e);}
catch(e2){this._logger.warn("Error calling handleError for node: "+te.getBestId(),e2);}}};xmp.baseplayer.BasePlayer.prototype._overrideAdRes=function(ye,ze){var pm=ze.getMetadata('__DIRECTIVE_PARAMETER_MAP__',xmp.util.internals.MetadataMap.defaultObj);if(pm===xmp.util.internals.MetadataMap.defaultObj){pm=this._getCurCtx('_overrideAdRes')._xmpPlayList._getParameterMapInternal().clone();pm.addContextObject('node',ze.getNodeType().getDataObject());}
var Ae=new xmp.playlistapi.AdResourceOverrideContext(ze,pm);ye.handleOverrideAdResources(ze,Ae);};xmp.baseplayer.BasePlayer.prototype.registerRuleClass=function(Be,Ce){this._getCurCtx('registerRuleClass').registerRuleClass(Be,Ce);};xmp.baseplayer.BasePlayer.prototype._checkXmpState=function(){if(xmp.baseplayer.BasePlayer._fatalException!==null){throw new Error('XMP in bad state: '+xmp.extractErrorMessage(xmp.baseplayer.BasePlayer._fatalException));}};xmp.baseplayer.BasePlayer.prototype._raiseFatalException=function(e){try{var De=null;if(e instanceof xmp.FatalException){De=e;}
else{De=xmp.FatalException.createFatalException(xmp.XmpErrorCodes.FATAL_UNSPECIFIED_ERROR,'BasePlayer',xmp.extractErrorMessage(e));}
xmp.baseplayer.BasePlayer._fatalException=De;this._logger.fatal('fatal exception',De);this.handleFatalException(De);}
catch(secondE){xmp.showFatalErrorMessage('Second chance exception while raising fatal exception: '+xmp.extractErrorMessage(secondE));}};xmp.baseplayer.BasePlayer._staticHandleFatalEx=function(cb,e){if(xmp.baseplayer.BasePlayer._singleInstance!==null){xmp.baseplayer.BasePlayer._singleInstance._raiseFatalException(e);}
else{xmp.showFatalErrorMessage(xmp.extractErrorMessage(e));}};xmp.fatalErrorCallback=new xmp.util.Callback('BasePlayer_fatalErrorCallback',xmp.baseplayer.BasePlayer._staticHandleFatalEx,null);xmp.baseplayer.BasePlayer.prototype.handleBootstrappedInternal=function(ex){xmp.baseplayer.BasePlayer._fatalException=null;if(ex===null){try{this._doAfterBootstrap();}
catch(afterEx){this._raiseFatalException(afterEx);ex=afterEx;}}
else{this._raiseFatalException(ex);}
this.handleBootstrapped((ex===null)?true:false);};xmp.baseplayer.BasePlayer.prototype._doAfterBootstrap=function(){this._initServices(this._options);};xmp.baseplayer.BasePlayer.prototype.seek=function(){var Ee=this.getMediaPlayer().getPosition();var Fe=this.getMediaPlayer().getDuration();if((Ee+10)>Fe){if((Ee-10)<0){this.getMediaPlayer().seek(0);}
else{this.getMediaPlayer().seek(Ee-10);}}
else{this.getMediaPlayer().seek(Ee+10);}};xmp.baseplayer.BasePlayer.prototype.setVolume=function(){var Ge=this.getMediaPlayer().getVolume();if((Ge+10)>100){Ge=0;}
else{Ge=Ge+10;}
this.getMediaPlayer().setVolume(Ge);};xmp.baseplayer.BasePlayer.prototype.play=function(){this.getMediaPlayer().getViewport().hideOverlays(xmp.ALL_OVERLAYS);this.getMediaPlayer().play();};xmp.baseplayer.BasePlayer.prototype.pause=function(){this.getMediaPlayer().pause();};xmp.baseplayer.BasePlayer.prototype.stop=function(){this.getMediaPlayer().stop();};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.EmbeddedConsoleLoggerListener=function(He,Ie,Je,Ke,Le,Me){if(xmp.baseplayer.EmbeddedConsoleLoggerListener._instance!==null){throw new Error('Can have only one instance of EmbeddedConsoleLoggerListener.');}
xmp.baseplayer.EmbeddedConsoleLoggerListener.ctor.call(this,He);xmp.baseplayer.EmbeddedConsoleLoggerListener._instance=this;this._ID_PREFIX='xmp_ec_';var Ne=xmp.util.Logger.getInstance();Ne.addListener(this);Ne.setCategoryFilterArray(Ie);this._consoleDivContainerId=(Me)?Me:null;this._consoleVisible=Je;this._logAreaVisible=true;this._logAreaDims={};this._logAreaDims.h=Ke;this._logAreaDims.w=Le;this._messageQueue=[];this._createLogArea();this.showConsole(this._consoleVisible);};xmp.DERIVE_CLASS(xmp.util.AbstractLoggerListener,xmp.baseplayer.EmbeddedConsoleLoggerListener);xmp.baseplayer.EmbeddedConsoleLoggerListener.create=function(Oe){var Pe=xmp.util.LogLevels.fromString(xmp.getQueryArgOpt('xmpLog','none'));if(Pe===xmp.util.LogLevels.NONE){return null;}
var Qe=new xmp.baseplayer.EmbeddedConsoleLoggerListener(Pe,Oe.exCats,(Pe!==xmp.util.LogLevels.NONE),Oe.h,Oe.w,Oe.cId);return Qe;};xmp.baseplayer.EmbeddedConsoleLoggerListener._instance=null;xmp.baseplayer.EmbeddedConsoleLoggerListener.getInstance=function(){return xmp.baseplayer.EmbeddedConsoleLoggerListener._instance;};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype.showConsole=function(Re){this._consoleVisible=Re;var Se=window.document.getElementById(this._consoleDivContainerId);if(Se){Se.style.display=this._consoleVisible?'block':'none';}};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype.isConsoleVisible=function(){return this._consoleVisible;};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype.clearLogOutput=function(){var Te=window.document.getElementById(this._ID_PREFIX+'log_output_area');if(Te){Te.innerHTML='';}};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype.toggleLogOutput=function(){var Ue=window.document.getElementById(this._ID_PREFIX+'log_output_area_scroll_clip');if(Ue){this._logAreaVisible=!this._logAreaVisible;Ue.style.display=this._logAreaVisible?'block':'none';}};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype.handleLogMessage=function(Ve,We,Xe){try{var Ye='<span class="'+this._ID_PREFIX+xmp.util.LogLevels.stringify(Ve)+'_message">'+We+': '+xmp.escapeHtml(Xe,true,true)+'</span>';this._messageQueue.push(Ye);while(this._messageQueue.length>25){this._messageQueue.shift();}
var Ze=window.document.getElementById(this._ID_PREFIX+'log_output_area');if(Ze){while(this._messageQueue.length>0){var $e=this._messageQueue.shift();var p=window.document.createElement('P');p.innerHTML=$e;Ze.appendChild(p);}
var af=window.document.getElementById(this._ID_PREFIX+'log_output_area_scroll_clip');if(af){af.scrollTop=af.scrollHeight;}}}
catch(e){this._handleInternalError('Error in xmp.baseplayer.EmbeddedConsoleLoggerListener.handleLogMessage: '+xmp.extractErrorMessage(e));}};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype._handleInternalError=function(bf){xmp.showMessage(bf);};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype._createLogArea=function(){var cf=null;if(this._consoleDivContainerId===null){this._consoleDivContainerId=this._ID_PREFIX+'DebugConsole';cf=window.document.createElement('div');cf.style.display='none';cf.id=this._consoleDivContainerId;xmp.insertDomChildBefore(window.document.body,cf);}
cf=window.document.getElementById(this._consoleDivContainerId);if(cf){cf.innerHTML=this._buildConsoleInnerHtml();}};xmp.baseplayer.EmbeddedConsoleLoggerListener.prototype._buildConsoleInnerHtml=function(){var df='BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; display: block; position:absolute; overflow:auto';df+=('; width:'+this._logAreaDims.w+'px');df+=('; height:'+this._logAreaDims.h+'px');var ih='';ih+='<div style="text-align:left; background-color:white; color:black; font-size: medium;">\n';if(xmp.addDynamicStyle('.'+this._ID_PREFIX+'fatal_message','{ font-weight: bold; color: #FF0000}')){xmp.addDynamicStyle('.'+this._ID_PREFIX+'critical_message','{ font-weight: bold; color: #FF0000}');xmp.addDynamicStyle('.'+this._ID_PREFIX+'warn_message','{ color: #FF0000}');xmp.addDynamicStyle('.'+this._ID_PREFIX+'info_message','{color: #009966}');xmp.addDynamicStyle('.'+this._ID_PREFIX+'debug_message','{color: #0000FF}');}
else{ih+='<style>\n';ih+='.'+this._ID_PREFIX+'fatal_message { font-weight: bold; color: #FF0000}\n';ih+='.'+this._ID_PREFIX+'critical_message { font-weight: bold; color: #FF0000}\n';ih+='.'+this._ID_PREFIX+'warn_message { color: #FF0000}\n';ih+='.'+this._ID_PREFIX+'info_message { color: #009966}\n';ih+='.'+this._ID_PREFIX+'debug_message { color: #0000FF}\n';ih+='</style>\n';}
ih+='<br>\n';ih+='<b>Logging</b>&nbsp;&nbsp;<INPUT TYPE="button" ID="'+this._ID_PREFIX+'ShowHideLogButton" VALUE="Show/Hide Log" onClick="xmp.baseplayer.EmbeddedConsoleLoggerListener.getInstance().toggleLogOutput();"\n';ih+='NAME="'+this._ID_PREFIX+'ShowHideLogButton"> &nbsp; <INPUT TYPE="button" ID="'+this._ID_PREFIX+'ClearLogButton" VALUE="Clear Log" onClick="xmp.baseplayer.EmbeddedConsoleLoggerListener.getInstance().clearLogOutput()"\n';ih+='NAME="'+this._ID_PREFIX+'ClearLogButton">&nbsp;&nbsp;\n';ih+='<br><i>(Log messages are color coded:\n';ih+='<span class="'+this._ID_PREFIX+'fatal_message">Fatal</span>\n';ih+='-\n';ih+='<span class="'+this._ID_PREFIX+'critical_message">Critical</span>\n';ih+='-\n';ih+='<span class="'+this._ID_PREFIX+'warn_message">Warning</span>\n';ih+='-\n';ih+='<span class="'+this._ID_PREFIX+'info_message">Information</span>\n';ih+='-\n';ih+='<span class="'+this._ID_PREFIX+'debug_message">Debug</span>)\n';ih+='</i>\n';ih+='<br>\n';ih+='<br>\n';ih+='<div id="'+this._ID_PREFIX+'log_output_area_scroll_clip" style="'+df+'">\n';ih+='<div id="'+this._ID_PREFIX+'log_output_area">\n';ih+='</div>\n';ih+='</div>\n';ih+='</div>\n';return ih;};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.ErrorLoggerListener=function(ef){xmp.baseplayer.ErrorLoggerListener.ctor.call(this,ef);};xmp.DERIVE_CLASS(xmp.util.AbstractLoggerListener,xmp.baseplayer.ErrorLoggerListener);xmp.baseplayer.ErrorLoggerListener.prototype.handleLog=function(ff,gf,hf,jf){if(ff>xmp.util.LogLevels.FATAL&&ff<=this.getLogLevel()){this.handleLogError(ff,gf,hf,jf);}};xmp.baseplayer.ErrorLoggerListener.prototype.handleLogError=function(kf,lf,mf,nf){try{var of=xmp.FatalException.createFatalException(xmp.XmpErrorCodes.FATAL_UNSPECIFIED_ERROR,'BasePlayer',xmp.extractErrorMessage(nf));xmp.baseplayer.BasePlayer._fatalException=of;if(nf instanceof xmp.baseplayer.ApplicationError){this.showError(mf,nf);}
xmp.util.Logger.getInstance().fatal("ErrorLogger",mf,nf);}
catch(secondE){xmp.showFatalErrorMessage('Second chance exception while raising fatal exception: '+xmp.extractErrorMessage(secondE));}};xmp.baseplayer.ErrorLoggerListener.prototype.showError=function(pf,qf){if(pf===null||pf===undefined){pf="Unknown error";}
var rf=pf;var sf="";if(qf instanceof xmp.baseplayer.ApplicationError){rf=qf.message;var ie=qf.getInnerError();if(ie!==null&&ie!==undefined){sf=ie.message;}}
if(xmp.isFirefoxBrowser()){this.showErrorFirefox(rf,sf);}
else{this.showErrorIE(rf,sf);}};xmp.baseplayer.ErrorLoggerListener.prototype.showErrorFirefox=function(tf,uf){var re=/[\n\f\r]/gm;tf=tf.replace(re,'<br/>');uf=uf.replace(re,'<br/>');var vf="width=500,height=400,toolbar=0,";vf+="status=0,menubar=0,scrollbars=1,resizable=0";var wf=window.open("","",vf);var xf=wf.document;xf.open();xf.writeln("<html><head>");xf.writeln("<title>Error</title>");xf.writeln("<script type='text/javascript'>");xf.writeln("var showDetails = function()");xf.writeln("{");xf.writeln("  document.getElementById('mode').value = 'Hide Details';");xf.writeln("  document.getElementById('details').innerHTML = '"+uf+"';");xf.writeln("}");xf.writeln("var hideDetails = function()");xf.writeln("{");xf.writeln("  document.getElementById('mode').value = 'Show Details';");xf.writeln("  document.getElementById('details').innerHTML = '';");xf.writeln("}");xf.writeln("var showHideDetails = function()");xf.writeln("{");xf.writeln("  var mv = document.getElementById('mode').value;");xf.writeln("  if (mv === 'Show Details')");xf.writeln("    showDetails();");xf.writeln("  else");xf.writeln("    hideDetails();");xf.writeln("}");xf.writeln("</script>");xf.writeln("</head><body onblur='window.focus();'>");xf.writeln("<p style='color:red'><b>"+tf+"</b></p>");xf.writeln("<fieldset>");xf.writeln("<legend><input type=button id=mode value='Show Details' onclick='showHideDetails();' /></legend>");xf.writeln("<div id=details></div>");xf.writeln("</fieldset>");xf.writeln("<p align=right><input type=button value=Close onclick='window.close();' /></p>");xf.writeln("</body></html>");xf.close();};xmp.baseplayer.ErrorLoggerListener.prototype.showErrorIE=function(yf,zf){xmp.showMessage(yf);};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.InstrumentationLoggerListener=function(Af){var Bf=Math.min(xmp.util.LogLevels.CRITICAL,Af);xmp.baseplayer.InstrumentationLoggerListener.ctor.call(this,Bf);this._handler=new xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler();};xmp.DERIVE_CLASS(xmp.util.AbstractLoggerListener,xmp.baseplayer.InstrumentationLoggerListener);xmp.baseplayer.InstrumentationLoggerListener.prototype.handleLog=function(Cf,Df,Ef,Ff){if(Cf<=this.getLogLevel()){this.handleLogError(Cf,Df,Ff);}};xmp.baseplayer.InstrumentationLoggerListener.prototype.handleLogMessage=function(Gf,Hf,If){};xmp.baseplayer.InstrumentationLoggerListener.prototype.handleLogError=function(Jf,Kf,Lf){this._handler.log(xmp.util.PlayerStats.getInstance(),Lf);};xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler=function(){var Mf=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var Nf=Mf.getNodeForPath('Instrumentation');this._maxPostsPerSession=Nf.getInt('maxPostsPerSession',1);this._numPosts=0;this._postUrl=Nf.getString('postUrl','');this._reportingDiv=null;};xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler.prototype.createHiddenForm=function(Of,Pf){if(this._postUrl.length>0){var Qf=this.assembleReport(Of,Pf);var Rf=window.document.createElement('div');Rf.style.display='none';window.document.body.insertBefore(Rf,null);var Sf='post';var Tf="<form name='xmp_fatalErrorReportingForm' id='xmp_fatalErrorReportingForm' target='xmp_fatalErrorReportingFormIFrame' ";Tf+=("action='"+this._postUrl+"' ");Tf+=("method='"+Sf+"' ");Tf+=(">");for(var Uf=xmp.MapIterator.create(Qf);Uf.hasNext();Uf.next()){var Vf=Uf.currentKey();var Wf=Uf.currentValue();Tf+=("<input type='hidden' id='"+Vf+"' name='"+Vf+"' value='"+Wf+"'/>");}
Tf+=("</form><iframe id='xmp_fatalErrorReportingFormIFrame' name='xmp_fatalErrorReportingFormIFrame'/>");Rf.innerHTML=Tf;this._reportingDiv=Rf;}};xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler.prototype.populateHiddenForm=function(Xf,Yf){var Zf=window.document.xmp_fatalErrorReportingForm;var $f=this.assembleReport(Xf,Yf);for(var ag=xmp.MapIterator.create($f);ag.hasNext();ag.next()){var bg=ag.currentKey();var cg=ag.currentValue();Zf[bg].value=cg;}};xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler.prototype.log=function(dg,eg){if(this._numPosts>=this._maxPostsPerSession){return;}
this._numPosts++;if(this._reportingDiv===null){this.createHiddenForm(dg,eg);}
else{this.populateHiddenForm(dg,eg);}
if(this._reportingDiv){var fg=window.document.xmp_fatalErrorReportingForm;fg.submit();}};xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler.prototype.assembleReport=function(gg,hg){var ig={};ig.timestamp=((new Date()).getTime()).toString();ig.reason=this._extractErrorCode(hg).toString();ig.detail=hg.message;var jg=gg.getKeys();for(var i=0;i<jg.length;++i){var kg=jg[i];var lg=gg.getValue(kg);ig[kg.toLowerCase()]=lg;}
return ig;};xmp.baseplayer.InstrumentationLoggerListener._HttpPostHandler.prototype._extractErrorCode=function(mg){if(mg instanceof xmp.FatalException){return mg.getFatalErrorCode();}
if(mg instanceof xmp.CriticalException){return mg.getCriticalErrorCode();}
return xmp.XmpErrorCodes.NONE;};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.MetaFileLoaderFactory=function(){this._loaderIdCount=0;this._map={};this._loaderCtorMap={};this._addLoaderCtors();};xmp.baseplayer.MetaFileLoaderFactory._singeltonInstance=null;xmp.baseplayer.MetaFileLoaderFactory.getInstance=function(){if(xmp.baseplayer.MetaFileLoaderFactory._singeltonInstance===null){xmp.baseplayer.MetaFileLoaderFactory._singeltonInstance=new xmp.baseplayer.MetaFileLoaderFactory();}
return xmp.baseplayer.MetaFileLoaderFactory._singeltonInstance;};xmp.baseplayer.MetaFileLoaderFactory.prototype.create=function(ng){var og=this._createInternal(ng);this._map[og.getLoaderId()]=og;return og;};xmp.baseplayer.MetaFileLoaderFactory.prototype._createInternal=function(pg){this._loaderIdCount++;var id=this._loaderIdCount.toString();var qg=this._loaderCtorMap[pg];if(!qg){throw new Error('Unrecognized serializer type: '+pg);}
var rg=xmp.getNamespacedMethod(qg);var sg=new rg(this,id);return sg;};xmp.baseplayer.MetaFileLoaderFactory.prototype._release=function(tg){if(typeof this._map[tg.getLoaderId()]!=='undefined'){delete this._map[tg.getLoaderId()];}};xmp.baseplayer.MetaFileLoaderFactory.prototype._addLoaderCtors=function(){var ug=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath('loaders');var vg=ug.retrieveChildrenNames();for(var i=0;i<vg.length;i++){var wg=vg[i];var xg=ug.getNodeForPath(wg);var yg=xg.getString('JSClass','');this._loaderCtorMap[wg]=yg;}};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.PlayListMod=function(zg,id){this._id=id;this._action=zg;xmp.baseplayer.PlayListMod._staticCounter++;this._modNum=xmp.baseplayer.PlayListMod._staticCounter;};xmp.baseplayer.PlayListMod._staticCounter=0;xmp.baseplayer.PlayListMod.prototype.getModNum=function(){return this._modNum;};xmp.baseplayer.PlayListMod.prototype.getId=function(){return this._id;};xmp.baseplayer.PlayListMod.prototype.getAction=function(){return this._action;};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer.TriggerContext=function(){this._triggerType='';this._commandData='';this._metadataMap=new xmp.util.internals.MetadataMap(false);this._node=null;};xmp.baseplayer.TriggerContext.prototype.getTriggerType=function(){return this._triggerType;};xmp.baseplayer.TriggerContext.prototype.setTriggerType=function(Ag){this._triggerType=(Ag)?Ag:'';};xmp.baseplayer.TriggerContext.prototype.getCommandData=function(){return this._commandData;};xmp.baseplayer.TriggerContext.prototype.setCommandData=function(Bg){this._commandData=(Bg)?Bg:'';};xmp.baseplayer.TriggerContext.prototype.getPlayableNode=function(){return this._node;};xmp.baseplayer.TriggerContext.prototype.setPlayableNode=function(Cg){this._node=(Cg)?Cg:null;};xmp.baseplayer.TriggerContext.prototype.getMetadata=function(Dg,Eg){return this._metadataMap._get(Dg,Eg);};xmp.baseplayer.TriggerContext.prototype.setMetadata=function(Fg,Gg){this._metadataMap._set(Fg,Gg);};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer._NLMap=function(Hg){this._player=Hg;this._nodeListernerMap={};this._frameworkListenerMap={};this._frameworkListenerMap.adLoader=new xmp.baseplayer.listeners.internal.AdLoaderNodeListener(this._player);this._frameworkListenerMap.nonAdLoader=new xmp.baseplayer.listeners.internal.NonAdLoaderNodeListener(this._player);this._frameworkListenerMap.promoLoader=new xmp.baseplayer.listeners.internal.PromoLoaderNodeListener(this._player);this._frameworkListenerMap.tracking=new xmp.baseplayer.listeners.internal.TrackingNodeListener(this._player);this._frameworkListenerMap.metering=new xmp.baseplayer.listeners.internal.MeteringNodeListener(this._player);this._frameworkListenerMap.firstFrame=new xmp.baseplayer.listeners.internal.FirstFrameNodeListener(this._player);this._frameworkListenerNameMap={};this._frameworkListenerNameMap.Ad=['adLoader','metering','firstFrame'];this._frameworkListenerNameMap.Promo=['promoLoader','firstFrame'];this._frameworkListenerNameMap.Content=['nonAdLoader','tracking','firstFrame'];this._frameworkListenerNameMap.DEFAULT=['nonAdLoader'];this._registrationArray=[];};xmp.baseplayer._NLMap.prototype._getNodeListener=function(Ig){var Jg=this._nodeListernerMap[Ig.getNodeTypeName()];if(!Jg){Jg=this._createCompositeNodeListener(Ig.getNodeTypeName());this._nodeListernerMap[Ig.getNodeTypeName()]=Jg;}
return Jg;};xmp.baseplayer._NLMap.prototype._registerNodeListener=function(Kg,Lg){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.OBJECT_TYPE],"_NLMap.registerNodeListener");if(!Kg||!Lg||(Lg.length===0)){throw new xmp.util.internals.InvalidArgsError("The 'listener' argument must be non-null, and the 'nodeTypeArray' argument must be non-null and non-empty.");}
for(var i=0;i<Lg.length;i++){var Mg=Lg[i];if(!(typeof Mg==='string'&&Mg.length>0)){throw new xmp.util.internals.InvalidArgsError("The 'nodeTypeArray' argument must be an array of non-empty strings.");}}
this._registrationArray.push({l:Kg,nta:Lg});};xmp.baseplayer._NLMap.prototype._getFrameworkListeners=function(Ng){var Og=[];var Pg=xmp.playlistapi.PlayableNodeType.getBaseNodeTypeName(Ng);var Qg=this._frameworkListenerNameMap[Pg];for(var i=0;i<Qg.length;i++){var Rg=Qg[i];var Sg=this._frameworkListenerMap[Rg];Og.push(Sg);}
return Og;};xmp.baseplayer._NLMap.prototype._getVerticalListeners=function(Tg){var Ug=[];for(var i=0;i<this._registrationArray.length;i++){var Vg=this._registrationArray[i];var Wg=Vg.l;var Xg=Vg.nta;for(var j=0;j<Xg.length;j++){var Yg=Xg[j];if((Yg==='*')||(Yg===Tg)){Ug.push(Wg);}}}
return Ug;};xmp.baseplayer._NLMap.prototype._getAndCheckVerticalListeners=function(Zg){var $g=this._getVerticalListeners(Zg);if($g.length===0){throw new xmp.util.internals.InvalidArgsError('No vertical node listener registered for node type: '+Zg);}
return $g;};xmp.baseplayer._NLMap.prototype._validateListeners=function(ah,bh){for(var i=0;i<bh.length;i++){var ch=bh[i];for(var j=i+1;j<bh.length;j++){var dh=bh[j];if(ch===dh){throw new xmp.util.internals.InvalidArgsError('Same listener registered more than once for node type: '+ah);}}}};xmp.baseplayer._NLMap.prototype._createCompositeNodeListener=function(eh){var fh=this._getFrameworkListeners(eh);fh=fh.concat(this._getAndCheckVerticalListeners(eh));this._validateListeners(eh,fh);var gh=new xmp.baseplayer.listeners.CompositeNodeListener(this._player);for(var i=0;i<fh.length;i++){gh.addChild(fh[i]);}
return gh;};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer._PDMapArray=function(){this._array=[];this._map={};};xmp.baseplayer._PDMapArray.prototype.insert=function(hh,jh){if(hh>=this.getCount()){this._array.push(jh);}
else{this._array.splice(hh,0,jh);}
this._map[jh.getMetaResourceId()]=jh;};xmp.baseplayer._PDMapArray.prototype.removeAll=function(){this._array=[];this._map={};};xmp.baseplayer._PDMapArray.prototype.remove=function(kh){var lh=this._array.splice(kh,1)[0];delete this._map[lh.getMetaResourceId()];return lh;};xmp.baseplayer._PDMapArray.prototype.move=function(mh,nh){var oh=this.remove(mh);this.insert(nh,oh);};xmp.baseplayer._PDMapArray.prototype.getCount=function(){return this._array.length;};xmp.baseplayer._PDMapArray.prototype.getAtIndex=function(ph){return this._array[ph];};xmp.baseplayer._PDMapArray.prototype.findItem=function(id){var qh=this._map[id];return(!qh)?null:qh;};xmp.baseplayer._PDMapArray.prototype.findItemIndex=function(id){var rh=this.getCount();for(var i=0;i<rh;i++){if(this.getAtIndex(i).getMetaResourceId()===id){return i;}}
return-1;};xmp.baseplayer._PDMapArray.prototype.extractIdArray=function(sh){var th=[];for(var i=sh;i<this._array.length;i++){var uh=this._array[i];th.push(uh.getMetaResourceId());}
return th;};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer._PLCtx=function(vh,wh,xh,yh){this._AD_PATTERN_CALL_BACK='adPatternCB';this._key=vh;this._owner=wh;this._logger=this._owner._logger;this._latch=null;this._advanceToId="";this._pdMapArray=new xmp.baseplayer._PDMapArray();this._xmpPlayList=null;this._ruleMap=null;this._currentNode=null;this._currentContentNode=null;this._previousNode=null;this._stateListener=null;this._initPlayListData={p:yh,ira:[]};this._modArray=[];this.init(xh);};xmp.baseplayer._PLCtx._staticCbCounter=0;xmp.baseplayer._PLCtx.prototype.debugPrint=function(zh){var Ah=zh+": ";Ah+="key = "+this._key+"; ";Ah+="owner = "+this._owner.getId()+"; ";Ah+="advanceToId = "+this._advanceToId+"; ";Ah+="currently rendering node = "+xmp.util.PlayableNode.safeGetBestId(this._currentNode)+"; ";Ah+="current content node = "+xmp.util.PlayableNode.safeGetBestId(this._currentContentNode)+"; ";Ah+="current playing index = "+this._getCurrentlyPlayingItemIndex()+"; ";this._logger.debug(Ah);};xmp.baseplayer._PLCtx.prototype.getLookAheadNodeArray=function(){return this._xmpPlayList.getLookAheadNodeArray();};xmp.baseplayer._PLCtx.prototype.getLookBehindNodeArray=function(){return this._xmpPlayList.getLookBehindNodeArray();};xmp.baseplayer._PLCtx.prototype.init=function(Bh){xmp.validateArguments(arguments,[xmp.STRING_TYPE],"_PLCtx.init");try{var Ch=new xmp.util.Callback('masterCB',this._latchComplete,this);this._latch=new xmp.util.Latch([],Ch);this._ruleMap=new xmp.baseplayer._RuleMap(this._latch,this);this._initPlayListData.ira=this._ruleMap._loadInvariantRules();this._loadAdPattern(Bh);this._ruleMap._loadRuleImplementations();}
catch(e){this._logger.warn('Error in init',e);throw e;}};xmp.baseplayer._PLCtx.prototype.loadContent=function(Dh,Eh){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.STRING_TYPE],"_PLCtx.loadContent");try{var Fh=[];var Gh={};for(var i=0;i<Dh.length;i++){var Hh=Dh[i];if(!xmp.isNonEmptyString(Hh)){throw new xmp.util.internals.InvalidArgsError("The 'mridArray' argument must contain only non-empty strings.");}
if(typeof(Gh[Hh])!=='undefined'){this._logger.info('Dropping duplicate content ID: '+Hh);continue;}
Gh[Hh]=Hh;Fh.push(Hh);}
Dh=Fh;if(Dh.length===0){throw new xmp.util.internals.InvalidArgsError("The 'mridArray' argument must contain at least one unique id.");}
if(Eh.length===0){Eh=Dh[0];}
if(typeof(Gh[Eh])==='undefined'){throw new xmp.util.internals.InvalidArgsError("The 'startResourceId' argument must be empty or refer to an id in 'mridArray'.");}
this._advanceToId=Eh;this._pdMapArray.removeAll();return this.handleLoadContent('loadContent','Batch',Dh,0);}
catch(e){this._logger.warn('Error in loadContent',e);throw e;}};xmp.baseplayer._PLCtx.prototype.handleLoadContent=function(Ih,id,Jh,Kh){var cb=this._createPLModCbObj(Ih,id);this._latch.addCbName(cb.getId());var Lh=xmp.baseplayer.MetaFileLoaderFactory.getInstance().create('videoContentMeta');var Mh=Lh.setIds(Jh,null);Lh.setAllLoadedCallback(cb);for(var i=0;i<Mh.length;i++){var Nh=Mh[i];Nh.reInitRuntimeMetadata();this._pdMapArray.insert(Kh+i,Nh);}
Lh.load();return cb.getMetadata('_modNum',0);};xmp.baseplayer._PLCtx.prototype.getKey=function(){return this._key;};xmp.baseplayer._PLCtx.prototype.setStateListener=function(Oh){this._stateListener=Oh;};xmp.baseplayer._PLCtx.prototype.appendToPlayList=function(Ph,Qh){var Rh=null;var Sh=this.getPlayListItemCount();if(Sh>0){Rh=this.getPlayListItem(Sh-1).getMetaResourceId();}
return this.insertInPlayListEx('append',Ph,Rh,Qh);};xmp.baseplayer._PLCtx.prototype.removeFromPlayList=function(Th){var Uh=this.findPlayListItemIndex(Th);if(Uh<0){return-1;}
this._pdMapArray.remove(Uh);return this._doLatchAsynch('remove',Th);};xmp.baseplayer._PLCtx.prototype.insertInPlayList=function(Vh,Wh,Xh){return this.insertInPlayListEx('insert',Vh,Wh,Xh);};xmp.baseplayer._PLCtx.prototype.insertInPlayListEx=function(Yh,Zh,$h,ai){var bi=this._validateInsertAndMoveArgs(Zh,$h,ai,false);if(ai||!this._isRunning()){this._advanceToId=Zh;}
return this.handleLoadContent(Yh,Zh,[Zh],bi.a+1);};xmp.baseplayer._PLCtx.prototype.moveWithinPlayList=function(ci,di,ei){var fi=this._validateInsertAndMoveArgs(ci,di,ei,true);var gi=fi.a;if(fi.a<fi.i){gi++;}
this._pdMapArray.move(fi.i,gi);if(ei){this._advanceToId=ci;}
return this._doLatchAsynch('move',ci);};xmp.baseplayer._PLCtx.prototype.setCurrentPlayListItem=function(hi){var ii=this.findPlayListItemIndex(hi);if(ii<0){throw new xmp.util.internals.InvalidArgsError("The 'mrid' argument must refer to an exising playlist item.");}
this._advanceToId=hi;return this._doLatchAsynch('setCur',hi);};xmp.baseplayer._PLCtx.prototype.getCurrentPlayListItem=function(){var ji=this._currentNode;if(this._isValidNode(ji)){if(ji.isContentType()){return ji.getPlayableData().getMetaResourceId();}
else{var a=this.getLookAheadNodeArray();for(var i=0;i<a.length;i++){var ki=a[i];if(ki.isContentType()){return ki.getPlayableData().getMetaResourceId();}}}}
return'';};xmp.baseplayer._PLCtx.prototype.getPlayListItemCount=function(){return this._pdMapArray.getCount();};xmp.baseplayer._PLCtx.prototype.getPlayListItem=function(li){return this._pdMapArray.getAtIndex(li);};xmp.baseplayer._PLCtx.prototype.findPlayListItem=function(mi){return this._pdMapArray.findItem(mi);};xmp.baseplayer._PLCtx.prototype.findPlayListItemIndex=function(ni){return this._pdMapArray.findItemIndex(ni);};xmp.baseplayer._PLCtx.prototype.registerRuleClass=function(oi,pi){this._ruleMap.registerRuleClass(oi,pi);this._xmpPlayList.addRuleFactory(oi,this._ruleMap);};xmp.baseplayer._PLCtx.prototype._loadAdPattern=function(qi){var cb=new xmp.util.Callback(this._AD_PATTERN_CALL_BACK,this._adPatternCb,this);this._latch.addCbName(cb.getId());xmp.net.AjaxRequestManager.getInstance().request(qi,cb,'adPolicy',qi,xmp.net.ContentTypes.JSON,null);};xmp.baseplayer._PLCtx.prototype._adPatternCb=function(cb,ri){var si=null;if(ri.isError()){si={e:ri.getErrorObject(),j:null};var ti=new xmp.baseplayer.ApplicationError(ri.getErrorObject(),'FailToGetAdPattern',null,[{label:"Url",text:ri.getFullUrl()}]);this._logger.warn(ti.message,ti);}
else{si={e:null,j:ri.getJsonObject()};}
this._latch.called(cb.getId(),si);if(this._logger.isDebugEnabled()){this._logger.debug("_PLCtx._adPatternCb");}};xmp.baseplayer._PLCtx.prototype._PLModCb=function(cb){this._latch.called(cb.getId(),null);if(this._logger.isDebugEnabled()){this._logger.debug("_PLCtx._PLModCb: "+cb.getId());}};xmp.baseplayer._PLCtx.prototype._latchComplete=function(cb){if(!this._xmpPlayList){var ui=cb.getMetadata(this._AD_PATTERN_CALL_BACK,{});this._initXmpPlayList(ui);}
var vi=this._isRunning();var wi=this._getCurrentlyPlayingItemIndex();if(this._logger.isDebugEnabled()){var xi='Latch Complete, run state = '+this._calcRunState()+', count = '+this.getPlayListItemCount()+', current index = '+wi+', _advanceToId = '+this._advanceToId;this._logger.debug(xi);}
var yi=this._calcAdvanceToIndex();var zi=-1;if(yi>=0){zi=yi;}
else{if(wi<0&&vi){wi=-1;}
zi=(wi+1);}
if(zi<0){this._logger.warn('Invalid refreshFromIndex, correcting to 0: '+zi);zi=0;}
this._xmpPlayList.setContentMetaResourceIds(this._pdMapArray.extractIdArray(zi));this._xmpPlayList.getIterator().first();if(yi>=0&&this._canAdvance()){this.advance();}
this._notifyPLMods();};xmp.baseplayer._PLCtx.prototype._initXmpPlayList=function(Ai){try{if(Ai.e!==null){throw Ai.e;}
this._xmpPlayList=new xmp.playlistapi.AdPatternPlayList(this,Ai.j,this._initPlayListData.ira,this._initPlayListData.p);var Bi=this._xmpPlayList.getRuleIdArray();this._ruleMap._registerRules(Bi);this._xmpPlayList.loadRuleFactoryArray([this._ruleMap]);}
catch(e){this._logger.warn('Error initializing playlist',e);}};xmp.baseplayer._PLCtx.prototype.getCurrentNode=function(){return this._currentNode;};xmp.baseplayer._PLCtx.prototype.advance=function(){if(this._xmpPlayList.getIterator().hasNext()){var Ci=this._xmpPlayList.getIterator().next();this._previousNode=this._currentNode;if(this._currentNode===null){this._notifyPLStarted();}
this._currentNode=Ci;if(Ci.isContentType()){this._currentContentNode=Ci;}
if(this._stateListener){this._stateListener.onAdvance();}}
else{this._currentNode=null;this._currentContentNode=null;this._notifyPLEnded();}};xmp.baseplayer._PLCtx.prototype._calcAdvanceToIndex=function(){var Di=-1;if(this._advanceToId.length>0){Di=this.findPlayListItemIndex(this._advanceToId);if((Di<0)&&this._logger.isDebugEnabled()){this._logger.debug("_PLCtx._calcAdvanceToIndex: "+this._advanceToId+" is not a valid play list item id; cannot advance to it.");}}
this._advanceToId='';return Di;};xmp.baseplayer._PLCtx.prototype._canAdvance=function(){var Ei=this._isRunning();var Fi=this._currentNode;return(!Ei||(Ei&&this._owner._getNodeListener(Fi).canUserControl(Fi)));};xmp.baseplayer._PLCtx.prototype._isRunning=function(){return this._isValidNode(this._currentNode);};xmp.baseplayer._PLCtx.prototype._isValidNode=function(Gi){return(Gi&&Gi.isValid()&&Gi.getPlayableData());};xmp.baseplayer._PLCtx.prototype.handleInitializePlayableNode=function(Hi){this._owner.handleInitializePlayableNode(Hi);};xmp.baseplayer._PLCtx.prototype._createPLModCbObj=function(Ii,id){xmp.baseplayer._PLCtx._staticCbCounter++;var c=xmp.baseplayer._PLCtx._staticCbCounter.toString();var Ji='PLModCb_'+c+'_'+Ii+':'+id;var cb=new xmp.util.Callback(Ji,this._PLModCb,this);var Ki=new xmp.baseplayer.PlayListMod(Ii,id);cb.setMetadata('_modNum',Ki.getModNum());this._modArray.push(Ki);return cb;};xmp.baseplayer._PLCtx.prototype._doLatchAsynch=function(Li,id){var cb=this._createPLModCbObj(Li,id);this._latch.addCbName(cb.getId());xmp.util.Timer.doSimpleCallback(cb);return cb.getMetadata('_modNum',0);};xmp.baseplayer._PLCtx.prototype._getCurrentlyPlayingItemIndex=function(){var Mi=this._currentContentNode;if(this._isValidNode(Mi)){return this.findPlayListItemIndex(Mi.getPlayableData().getMetaResourceId());}
return-1;};xmp.baseplayer._PLCtx.prototype._getPlayableData=function(Ni){return this.findPlayListItem(Ni);};xmp.baseplayer._PLCtx.prototype._validateInsertAndMoveArgs=function(Oi,Pi,Qi,Ri){var Si={a:-1,i:-1};if(!(xmp.isNonEmptyString(Oi)&&(Pi===null||xmp.isNonEmptyString(Pi)))){throw new xmp.util.internals.InvalidArgsError("The 'mrid' argument must be a non-null, non-empty string, "+"and the 'afterMrid' must EITHER be null OR a a non-null, non-empty string");}
if(Oi===Pi){throw new xmp.util.internals.InvalidArgsError("The 'mrid' argument must NOT be the same value as the 'afterMrid' value.");}
if(typeof(Qi)!=='boolean'){throw new xmp.util.internals.InvalidArgsError("The 'setPos' argument must be of boolean type.");}
if(Pi!==null){Si.a=this.findPlayListItemIndex(Pi);if(Si.a<0){throw new xmp.util.internals.InvalidArgsError("The 'afterMrid' argument must be set to null, or must refer to an exising playlist item.");}}
Si.i=this.findPlayListItemIndex(Oi);if(Ri){if(Si.i<0){throw new xmp.util.internals.InvalidArgsError("The 'mrid' argument must refer to an exising playlist item when moving.");}}
else{if(Si.i>-1){throw new xmp.util.internals.InvalidArgsError("The 'mrid' argument must NOT refer to an exising playlist item when inserting/appending.");}}
return Si;};xmp.baseplayer._PLCtx.prototype._calcRunState=function(){if(this._isRunning()){return'running';}
else{return this._isValidNode(this._previousNode)?'stopped':'never started';}};xmp.baseplayer._PLCtx.prototype._notifyPLStarted=function(){try{this._owner.handlePlayListStarted();}
catch(e){this._logger.warn('Error calling handlePlayListStarted',e);}};xmp.baseplayer._PLCtx.prototype._notifyPLEnded=function(){try{this._owner.handlePlayListEnded();}
catch(e){this._logger.warn('Error calling handlePlayListEnded',e);}};xmp.baseplayer._PLCtx.prototype._notifyPLMods=function(){var Ti=[];Ti=Ti.concat(this._modArray);this._modArray=[];try{this._owner.handlePlayListModified(Ti);}
catch(e){this._logger.warn('Error calling handlePlayListModified',e);}};xmp.createNamespace("xmp.baseplayer");xmp.baseplayer._RuleMap=function(Ui,Vi){this._logger=new xmp.util.internals.CategoryLogger('_RuleMap');this._ruleIdArray=[];this._ruleIdToConstructorMap={};this._latch=Ui;this._player=Vi;};xmp.baseplayer._RuleMap.prototype.registerRuleClass=function(Wi,Xi){if(!(xmp.isNonEmptyString(Wi)&&xmp.isNonEmptyString(Xi))){throw new xmp.util.internals.InvalidArgsError("The 'ruleId' and 'ruleFullyQualifiedConstructor' arguments must be non-null, non-empty strings.");}
if(typeof(this._ruleIdToConstructorMap[Wi])==='undefined'){this._ruleIdArray.push(Wi);this._ruleIdToConstructorMap[Wi]=Xi;}};xmp.baseplayer._RuleMap.prototype._loadInvariantRules=function(){var Yi=xmp.util.SettingsManager.getInstance().getContextNode();if(!Yi.nodeExists('invariantRules')){return[];}
var Zi=Yi.getNodeForPath('invariantRules');var $i=Zi.retrieveKeys();var aj="[";for(var i=0;i<$i.length;i++){var bj=$i[i];aj+=Zi.getString(bj,'');if(i!==($i.length-1)){aj+=",";}}
aj+="]";try{return xmp.net.AjaxRequestManager.getInstance()._parseJson(aj);}
catch(e){this._logger.warn('Error loading invariant rule ids.',e);throw e;}};xmp.baseplayer._RuleMap.prototype._registerRules=function(cj){var dj=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer').getString('rule classes namespace','');for(var i=0;i<cj.length;i++){var ej=cj[i];var fj=ej;if(dj.length>0){fj=(dj+'.'+fj);}
this.registerRuleClass(ej,fj);}};xmp.baseplayer._RuleMap.prototype._loadRuleImplementations=function(){var gj=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer').getString('rule classes relative URL','');var cb=new xmp.util.Callback('getRulesCB',this._ruleImplementationsCb,this);this._latch.addCbName(cb.getId());if(gj==='NONE'){cb.setMetadata('no_rules','true');cb.callAsynch([]);}
else{xmp.net.AjaxRequestManager.getInstance().request(gj,cb,'ruleClasses',gj,xmp.net.ContentTypes.TEXT,null);}};xmp.baseplayer._RuleMap.prototype._ruleImplementationsCb=function(cb,hj){if(cb.getMetadata('no_rules','false')==='true'){this._latch.called(cb.getId(),{e:null});return;}
if(hj.isError()){var ij=new xmp.baseplayer.ApplicationError(hj.getErrorObject(),'RulesNotDownLoaded',null,[{label:"Url",text:hj.getFullUrl()}]);this._logger.warn(ij.message,ij);this._latch.called(cb.getId(),{e:hj.getErrorObject()});}
else{try{xmp.net.AjaxRequestManager.getInstance()._parseJavaScript(hj.getText());this._latch.called(cb.getId(),{e:null});}
catch(e){var kj=(e instanceof Error)?e:new Error('UKNOWN ERROR');this._latch.called(cb.getId(),{e:kj});}}};xmp.baseplayer._RuleMap.prototype.getCreatableRuleIds=function(){return this._ruleIdArray;};xmp.baseplayer._RuleMap.prototype.createRule=function(lj){var mj=this._ruleIdToConstructorMap[lj];if(!mj){return null;}
var nj=xmp.getNamespacedMethod(mj);var oj=new nj(this._player);return oj;};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.Ad=function(){};xmp.baseplayer.internals.Ad.prototype.buildRelativeURL=function(pj,qj,rj,sj){var tj=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer/Additional segvars').getString(pj,'');var uj='';if(qj>0){uj=this._makeQueryPair('tile',qj);}
uj=this._appendToQuery(uj,rj);uj=this._appendToQuery(uj,tj);uj=this._appendToQuery(uj,sj);return uj;};xmp.baseplayer.internals.Ad.getAdServerRoot=function(){return xmp.util.RootUrlProvider.getInstance().getRootUrl('adServer');};xmp.baseplayer.internals.Ad.getAdManRoot=function(){return xmp.util.RootUrlProvider.getInstance().getRootUrl('adMan');};xmp.baseplayer.internals.Ad.prototype._appendToQuery=function(vj,wj){var xj=vj;if(wj&&wj.length!==0){if(xj.length>0){xj+='&';}
xj+=wj;}
return xj;};xmp.baseplayer.internals.Ad.prototype.setPingImage=function(yj){return xmp.baseplayer.internals.AdMeteringImagePool.getInstance().setPingImage(yj);};xmp.baseplayer.internals.Ad.createCompanionAdId=function(){return Math.floor((new Date()).getTime()/1000);};xmp.baseplayer.internals.Ad.prototype._makeQueryPair=function(zj,Aj){if(!Aj){Aj='';}
return zj+'='+escape(Aj.toString());};xmp.baseplayer.internals.Ad._singeltonInstance=null;xmp.baseplayer.internals.Ad.getInstance=function(){if(xmp.baseplayer.internals.Ad._singeltonInstance===null){xmp.baseplayer.internals.Ad._singeltonInstance=new xmp.baseplayer.internals.Ad();}
return xmp.baseplayer.internals.Ad._singeltonInstance;};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.AdMeteringImagePool=function(){this._initializedState=-1;this._adMeteringImage='';this._POOL_SIZE=10;this._BASE_IMG_NAME='AdMeteringImg_';};xmp.baseplayer.internals.AdMeteringImagePool._imgPingCounter=-1;xmp.baseplayer.internals.AdMeteringImagePool._singeltonInstance=null;xmp.baseplayer.internals.AdMeteringImagePool.getInstance=function(){if(xmp.baseplayer.internals.AdMeteringImagePool._singeltonInstance===null){xmp.baseplayer.internals.AdMeteringImagePool._singeltonInstance=new xmp.baseplayer.internals.AdMeteringImagePool();}
return xmp.baseplayer.internals.AdMeteringImagePool._singeltonInstance;};xmp.baseplayer.internals.AdMeteringImagePool.prototype.setPingImage=function(Bj){this._init();if(this._initializedState!==1){return'';}
xmp.baseplayer.internals.AdMeteringImagePool._imgPingCounter++;var Cj=xmp.baseplayer.internals.AdMeteringImagePool._imgPingCounter%this._POOL_SIZE;var Dj=this._BASE_IMG_NAME+Cj.toString();var Ej=window.document.images[Dj];if(!Ej){throw new Error('Unexpectded did not find DOM image'+Dj);}
Ej.src=Bj;return Dj;};xmp.baseplayer.internals.AdMeteringImagePool.prototype._init=function(){if(this._initializedState===-1){try{var Fj=xmp.util.SettingsManager.getInstance().getContextNode();var Gj=Fj.getNodeForPath('BasePlayer');this._adMeteringImage=xmp.trimString(Gj.getString('Ad metering image URL',''));if(this._adMeteringImage.length===0){var Hj='Ad metering image URL not specified in primary configuration';throw new Error(Hj);}
var Ij=window.document.createElement('div');Ij.style.display='none';window.document.body.insertBefore(Ij,null);for(var i=0;i<this._POOL_SIZE;i++){var Jj=window.document.createElement('img');Jj.src=this._adMeteringImage;Jj.id=this._BASE_IMG_NAME+i.toString();Jj.name=Jj.id;Jj.alt='';Jj.align='right';Jj.width=Jj.height=Jj.border=Jj.vspace=Jj.hspace=0;Ij.insertBefore(Jj,null);}}
catch(e){xmp.handleFatalError(e);this._initializedState=0;throw e;}
this._initializedState=1;}};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.AdServiceMetaFileLoader=function(Kj,Lj){this._CLASS_NAME='AdServiceMetaFileLoader';this._AD_MAN_TYPE='adMan';this._AD_SERVER_TYPE='adServer';this._logger=new xmp.util.internals.CategoryLogger(this._CLASS_NAME);this._THIS_TYPE='videoAdMeta';this._owner=Kj;this._loaderId=Lj;this._resBundle=null;this._callback=null;this._companionAdId=xmp.baseplayer.internals.Ad.createCompanionAdId();this._latchCompleteCb=this._createCb(null,'LatchComplete',this._handleLatchComplete);this._latch=new xmp.util.Latch([],this._latchCompleteCb);this._responseCallback=this._createCb(null,'responseCallback',this.i_handleAdServiceResponse);this._errorCallback=this._createCb(null,'errorCallback',this.i_handleAdServiceError);this._adService=xmp.net.AdService.i_getInstance();this._adService.i_setResponseCallback(this._responseCallback);this._adService.i_setErrorCallback(this._errorCallback);};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype.setResBundle=function(Mj,Nj){this._resBundle=Mj;this._callback=Nj;};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype.load=function(){try{if(this._shortCircuit()){return;}
this._latchCompleteCb.setMetadata('LatchPhase',this._AD_MAN_TYPE);var Oj=this._resBundle.getResourceTypes();for(var i=0;i<Oj.length;i++){var Pj=this._resBundle.getMetaResource(Oj[i]);Pj.setCompanionAdId(this._companionAdId);this._loadARM(Pj,this._AD_MAN_TYPE,xmp.net.ContentTypes.TEXT,Pj.getId());}}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._shortCircuit=function(){if(this._resBundle.getCount()===0){this._resBundle._setRawData('Loaded (no resources)');}
if(this._resBundle.isLoaded()||this._resBundle.isError()){xmp.util.Timer.doSimpleCallback(this._createCb(null,'endAsynch',this._end));return true;}
return false;};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._handleLatchComplete=function(cb){try{var Qj=this._latchCompleteCb.getMetadata('LatchPhase','');if(Qj===this._AD_MAN_TYPE){this._doAdManComplete();}
else if(Qj===this._AD_SERVER_TYPE){this._doAdServerComplete();}
else{throw new Error('Unrecognized phase: '+Qj);}}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._doAdManComplete=function(){this._latchCompleteCb.setMetadata('LatchPhase',this._AD_SERVER_TYPE);var Rj=this._resBundle.getResourceTypes();var Sj=0;for(var i=0;i<Rj.length;i++){var Tj=this._resBundle.getMetaResource(Rj[i]);var Uj=this._makeCbName(Tj,this._AD_MAN_TYPE);var Vj=this._latchCompleteCb.getMetadata(Uj,xmp.util.internals.MetadataMap.defaultObj);if(!Vj.isError()){var Wj=this._buildAdServerRelUrl(Tj,Vj.getText());if(Tj.getType()==='primary'){Sj++;this._loadARM(Tj,this._AD_SERVER_TYPE,xmp.net.ContentTypes.JSON,Wj);}
else if(Tj.getType()==='synch_unit'){var Xj=xmp.baseplayer.internals.Ad.getAdServerRoot();Tj._setRawData(Xj+Wj);Tj.setDataType('url');}}
else{Tj._setErrorMessage(Vj.getErrorMessage());}}
if(Sj===0){this._end();}};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._doAdServerComplete=function(){var Yj=this._resBundle.getMetaResource('primary');var Zj=this._makeCbName(Yj,this._AD_MAN_TYPE);var $j=this._latchCompleteCb.getMetadata(Zj,xmp.util.internals.MetadataMap.defaultObj);if(!$j.isError()){var ak=this._buildAdServerRelUrl(Yj,$j.getText());var bk=xmp.util.SettingsManager.getInstance().getGlobalContextNode();if(bk.nodeExists("rootUrlMap/adServer")){var ck=bk.getNodeForPath("rootUrlMap/adServer");var dk=ck.getString(xmp.ROOT_URL,"")+ak;var ek=this._latchCompleteCb.getMetadata(dk,xmp.util.internals.MetadataMap.defaultObj);if(!ek.isError){Yj._setRawData(xmp.net.AjaxRequestManager.getInstance()._parseJson(ek.data));}
else{Yj._setErrorMessage(ek.data);}}}
this._end();};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._handleError=function(e){this._handleErrorMessage(xmp.extractErrorMessage(e));};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._handleErrorMessage=function(fk){this._resBundle._setErrorMessage(fk);this._end();};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._end=function(){if(this._owner!==null){this._owner._release(this);this._owner=null;}
if(!this._resBundle.isError()){var gk=this._resBundle.getMetaResource('primary');if(gk!==null&&gk.isError()){this._resBundle._setErrorMessage('Primary Resource Error: '+gk.getErrorMessage());}}
if(!this._resBundle.isError()){this._resBundle._setRawData('Loaded');}
try{this._callback.call(this._resBundle);}
catch(e){this._logger.warn('Error calling callback',e);}};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._createCb=function(hk,ik,jk){return(new xmp.util.Callback(this._makeCbName(hk,ik),jk,this));};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._makeCbName=function(kk,lk){var mk=(kk!==null)?kk.getType():'';return(this._CLASS_NAME+'_'+lk+'_'+mk+'_'+this._loaderId);};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._buildAdServerRelUrl=function(nk,pk){var qk=xmp.trimString(pk);var rk=nk.getMetadata('segvars','');return xmp.baseplayer.internals.Ad.getInstance().buildRelativeURL(nk.getType(),this._companionAdId,qk,rk);};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._loadARM=function(sk,tk,uk,vk){try{var wk=this._latchCompleteCb.getMetadata('LatchPhase','');if(wk===this._AD_MAN_TYPE){var cb=this._createCb(sk,tk,this._handleARMResponse);this._latch.addCbName(cb.getId());xmp.net.AjaxRequestManager.getInstance().request(vk,cb,tk,vk,uk,null);}
else if(wk===this._AD_SERVER_TYPE){var xk=xmp.util.SettingsManager.getInstance().getGlobalContextNode();if(xk.nodeExists("rootUrlMap/adServer")){var yk=xk.getNodeForPath("rootUrlMap/adServer");var zk=yk.getString(xmp.ROOT_URL,"")+vk;this._latch.addCbName(zk);var Ak=this._adService.i_createRequest(zk);this._adService.i_makeRequest(Ak);}}
else{throw new Error('Unrecognized phase: '+wk);}}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype._handleARMResponse=function(Bk,Ck){if(Ck.isError()){var Dk=new xmp.baseplayer.ApplicationError(Ck.getErrorObject(),'FailToGetAdVideo',null,[{label:"Url",text:Ck.getFullUrl()}]);this._logger.warn(Dk.message,Dk);}
this._latch.called(Bk.getId(),Ck);};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype.i_handleAdServiceResponse=function(Ek,Fk){var Gk={isError:false,data:Fk.getData()};this._latch.called(Fk.getAdRequest().getUrl(),Gk);};xmp.baseplayer.internals.AdServiceMetaFileLoader.prototype.i_handleAdServiceError=function(Hk,Ik){var Jk={isError:true,data:Ik.getData()};this._latch.called(Ik.getAdRequest().getUrl(),Jk);};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.DhtmlObjectMetaFileLoader=function(Kk,Lk){xmp.baseplayer.internals.DhtmlObjectMetaFileLoader.ctor.call(this,'dhtmlObject','DhtmlObjectMetaFileLoader',xmp.net.ContentTypes.JSON,'FailToGetDhtmlObject',-1,Kk,Lk);};xmp.DERIVE_CLASS(xmp.baseplayer.internals.GenericMetaFileLoader,xmp.baseplayer.internals.DhtmlObjectMetaFileLoader);xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.ErrorDhtmlObjectMetaFileLoader=function(Mk,Nk){xmp.baseplayer.internals.ErrorDhtmlObjectMetaFileLoader.ctor.call(this,'errorDhtmlObject','ErrorDhtmlObjectMetaFileLoader',xmp.net.ContentTypes.JSON,'FailToGetDhtmlObject',-1,Mk,Nk);};xmp.DERIVE_CLASS(xmp.baseplayer.internals.GenericMetaFileLoader,xmp.baseplayer.internals.ErrorDhtmlObjectMetaFileLoader);xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.FileRequestHandle=function(Ok,id,Pk){this._id=id;this._type=Ok;this._dataObject=null;this._loadState=xmp.baseplayer.internals.FileRequestHandle.STATE_CREATED;this._listenerArray=[];this._errorMessage=null;this._maxCacheTime=Pk;this._createdTime=this._getCurrentTimeInSeconds();};xmp.baseplayer.internals.FileRequestHandle.STATE_CREATED=0;xmp.baseplayer.internals.FileRequestHandle.STATE_LOADING=1;xmp.baseplayer.internals.FileRequestHandle.STATE_LOADED=2;xmp.baseplayer.internals.FileRequestHandle.prototype.getId=function(){return this._id;};xmp.baseplayer.internals.FileRequestHandle.prototype.getType=function(){return this._type;};xmp.baseplayer.internals.FileRequestHandle.prototype.isNew=function(){return(this._loadState===xmp.baseplayer.internals.FileRequestHandle.STATE_CREATED);};xmp.baseplayer.internals.FileRequestHandle.prototype.isLoading=function(){return(this._loadState===xmp.baseplayer.internals.FileRequestHandle.STATE_LOADING);};xmp.baseplayer.internals.FileRequestHandle.prototype.isLoaded=function(){return(this._loadState===xmp.baseplayer.internals.FileRequestHandle.STATE_LOADED);};xmp.baseplayer.internals.FileRequestHandle.prototype.getDataObject=function(){return this._dataObject;};xmp.baseplayer.internals.FileRequestHandle.prototype._setDataObject=function(Qk){this._dataObject=Qk;};xmp.baseplayer.internals.FileRequestHandle.prototype._setAsLoading=function(){if(this._loadState!==xmp.baseplayer.internals.FileRequestHandle.STATE_LOADED){this._loadState=xmp.baseplayer.internals.FileRequestHandle.STATE_LOADING;}};xmp.baseplayer.internals.FileRequestHandle.prototype._setAsLoaded=function(){this._loadState=xmp.baseplayer.internals.FileRequestHandle.STATE_LOADED;this._notifyListeners();};xmp.baseplayer.internals.FileRequestHandle.prototype._notifyListener=function(Rk){var Sk=new xmp.util.Callback('onExecuteCB',this._onExecuteTimer,this);Sk.setMetadata('listener',Rk);var Tk=new xmp.util.Timer(this.getId(),xmp.DEFAULT_TIMER_INTERVAL,1,Sk);Tk.start();};xmp.baseplayer.internals.FileRequestHandle.prototype._onExecuteTimer=function(Uk,Vk){var Wk=Uk.getMetadata('listener',{});Wk._notifyFileRequestLoaded(this);};xmp.baseplayer.internals.FileRequestHandle.prototype._notifyListeners=function(){for(var i=0;i<this._listenerArray.length;i++){var Xk=this._listenerArray[i];this._notifyListener(Xk);}
this._listenerArray=[];};xmp.baseplayer.internals.FileRequestHandle.prototype._addListener=function(Yk){this._listenerArray.push(Yk);};xmp.baseplayer.internals.FileRequestHandle.prototype._setErrorMessage=function(Zk){this._errorMessage=Zk;};xmp.baseplayer.internals.FileRequestHandle.prototype._isError=function(){return(this._errorMessage!==null);};xmp.baseplayer.internals.FileRequestHandle.prototype._getErrorMessage=function(){return this._errorMessage;};xmp.baseplayer.internals.FileRequestHandle.prototype._getCurrentTimeInSeconds=function(){return Math.floor((new Date()).getTime()/1000);};xmp.baseplayer.internals.FileRequestHandle.prototype._getAgeInSeconds=function(){return(this._getCurrentTimeInSeconds()-this._createdTime);};xmp.baseplayer.internals.FileRequestHandle.prototype._isExpiredFromCache=function(){if(this._maxCacheTime<=-1){return false;}
if(this._maxCacheTime===0){return true;}
if(this._maxCacheTime<=this._getAgeInSeconds()){return true;}
return false;};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.MetaFileCache=function(){this._map={};this._logger=new xmp.util.internals.CategoryLogger('FileRequestHandle');};xmp.baseplayer.internals.MetaFileCache._singeltonInstance=null;xmp.baseplayer.internals.MetaFileCache.getInstance=function(){if(xmp.baseplayer.internals.MetaFileCache._singeltonInstance===null){xmp.baseplayer.internals.MetaFileCache._singeltonInstance=new xmp.baseplayer.internals.MetaFileCache();}
return xmp.baseplayer.internals.MetaFileCache._singeltonInstance;};xmp.baseplayer.internals.MetaFileCache.prototype.add=function($k){this._map[this._makeKeyH($k)]=$k;};xmp.baseplayer.internals.MetaFileCache.prototype.find=function(al,id){var bl=this._map[this._makeKey(al,id)];return(!bl)?null:bl;};xmp.baseplayer.internals.MetaFileCache.prototype.findOrCreate=function(cl,id,dl,el){this._checkForExpiredHandles();var fl=this.find(cl,id);if(fl===null){fl=new xmp.baseplayer.internals.FileRequestHandle(cl,id,el);this.add(fl);fl._addListener(dl);if(this._logger.isDebugEnabled()){this._logger.debug('Request handle NOT in cache, loading now: '+this._makeKeyH(fl));}
try{var gl=dl._loadFileRequest(fl);switch(gl){case xmp.baseplayer.internals.FileRequestHandle.STATE_LOADING:fl._setAsLoading();break;case xmp.baseplayer.internals.FileRequestHandle.STATE_LOADED:fl._setAsLoaded();break;default:throw new Error('Unexpected load state.');}}
catch(e){fl._setErrorMessage(xmp.extractErrorMessage(e));fl._setAsLoaded();}}
else{if(fl.isLoading()){if(this._logger.isDebugEnabled()){this._logger.debug('Request handle FOUND in cache, ANOTHER LOADER is loading, will wait: '+this._makeKeyH(fl));}
fl._addListener(dl);}
else if(fl.isLoaded()){if(this._logger.isDebugEnabled()){this._logger.debug('Request handle FOUND in cache, already loaded: '+this._makeKeyH(fl));}
fl._notifyListener(dl);}}
return fl;};xmp.baseplayer.internals.MetaFileCache.prototype._makeKey=function(hl,id){return(hl+'|'+id);};xmp.baseplayer.internals.MetaFileCache.prototype._makeKeyH=function(il){return this._makeKey(il.getType(),il.getId());};xmp.baseplayer.internals.MetaFileCache.prototype._checkForExpiredHandles=function(){var jl=[];var kl='';var ll=null;for(var ml=xmp.MapIterator.create(this._map);ml.hasNext();ml.next()){kl=ml.currentKey();ll=ml.currentValue();if(this._isHandleExpired(ll,kl)){jl.push(ll);}}
for(var i=0;i<jl.length;i++){ll=jl[i];try{kl=this._makeKeyH(ll);delete this._map[kl];}
catch(e){this._logger.debug('Error removing request handle from cache.',e);}}};xmp.baseplayer.internals.MetaFileCache.prototype._isHandleExpired=function(nl,ol){try{if(nl._isExpiredFromCache()){this._logger.debug('Request handle expired, will remove from cache.');return true;}
return false;}
catch(e){this._logger.warn('Error checking for expiration: '+ol,e);}
return false;};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.NullTrigger=function(pl){this._logger=new xmp.util.internals.CategoryLogger('NullTrigger');this._type=pl;};xmp.baseplayer.internals.NullTrigger.prototype.getType=function(){return this._type;};xmp.baseplayer.internals.NullTrigger.prototype.doCommands=function(ql){if(this._logger.isDebugEnabled()){this._logger.debug('Trigger type: '+this.getType()+', Null Trigger, no commands to do.');}};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.Trigger=function(rl,sl){this._logger=new xmp.util.internals.CategoryLogger('Trigger');this._type=rl;this._triggerCommandArray=sl;};xmp.baseplayer.internals.Trigger.getTrigger=function(tl,ul){var vl=[];if(tl.getPlayableData().isLoaded()){var wl=tl.getPlayableData().getDataObject().triggers;if(typeof wl==='object'){for(var i=0;i<wl.length;i++){var xl=wl[i];if(typeof xl==='object'&&xl.trigger===ul&&typeof xl.commands==='object'&&xl.commands.length>0){vl=xmp.baseplayer.internals.Trigger._cloneTriggerCommands(xl.commands);break;}}}
var yl=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('NodeTriggers/'+tl.getNodeTypeName()).getString(ul,'');if(yl.length>0){var zl=null;try{zl=xmp.net.AjaxRequestManager.prototype._parseJson(yl);}
catch(e){zl=null;this._logger.warn('Error getting global trigger for type: '+tl.getNodeTypeName(),e);}
if(zl!==null){vl=zl.concat(vl);}}}
if(vl.length>0){return new xmp.baseplayer.internals.Trigger(ul,vl);}
else{return new xmp.baseplayer.internals.NullTrigger(ul);}};xmp.baseplayer.internals.Trigger._cloneTriggerCommands=function(Al){var Bl=[];for(var i=0;i<Al.length;i++){var Cl=Al[i];Bl.push({type:Cl.type,data:Cl.data});}
return Bl;};xmp.baseplayer.internals.Trigger.prototype.getType=function(){return this._type;};xmp.baseplayer.internals.Trigger.prototype.doCommands=function(Dl){for(var i=0;i<this._triggerCommandArray.length;i++){var El=null;try{El=this._triggerCommandArray[i];var Fl=xmp.baseplayer.internals.TriggerCommandFactory.getInstance().create(El.type);Dl.setCommandData(El.data);Dl.setTriggerType(this.getType());Fl.doCommand(Dl);}
catch(e){this._logger.warn('Error invoking trigger command, type: '+El.type+', data: '+El.data,e);}}};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.TriggerCommandFactory=function(){this._logger=new xmp.util.internals.CategoryLogger('TriggerCommandFactory');xmp.util.SettingsManager.getInstance().addContextChangeListener(new xmp.util.Callback('TriggerCommandFactory',this._handleContextChange,this));this._triggerCommandMap=null;this._faultCfg();};xmp.baseplayer.internals.TriggerCommandFactory._singeltonInstance=null;xmp.baseplayer.internals.TriggerCommandFactory.getInstance=function(){if(xmp.baseplayer.internals.TriggerCommandFactory._singeltonInstance===null){xmp.baseplayer.internals.TriggerCommandFactory._singeltonInstance=new xmp.baseplayer.internals.TriggerCommandFactory();}
return xmp.baseplayer.internals.TriggerCommandFactory._singeltonInstance;};xmp.baseplayer.internals.TriggerCommandFactory.prototype.create=function(Gl){var Hl=this._triggerCommandMap[Gl];if(!Hl){return(new xmp.baseplayer.internals.NullTriggerCommand(Gl));}
try{var Il=xmp.getNamespacedMethod(Hl);var Jl=new Il();return Jl;}
catch(e){this._logger.warn('Error creating Trigger Command: '+Gl,e);return(new xmp.baseplayer.internals.NullTriggerCommand(Gl));}};xmp.baseplayer.internals.TriggerCommandFactory.prototype._faultCfg=function(){if(this._triggerCommandMap===null){this._triggerCommandMap={};var Kl=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('TriggerCommands');var Ll=Kl.retrieveKeys();for(var i=0;i<Ll.length;i++){var Ml=Ll[i];var Nl=Kl.getString(Ml,'');this._triggerCommandMap[Ml]=Nl;}
this._triggerCommandMap.setImg='xmp.baseplayer.internals.SetImageTriggerCommand';this._triggerCommandMap.echo='xmp.baseplayer.internals.EchoTriggerCommand';}};xmp.baseplayer.internals.TriggerCommandFactory.prototype._handleContextChange=function(){this._triggerCommandMap=null;this._faultCfg();};xmp.baseplayer.internals.NullTriggerCommand=function(Ol){this._type=Ol;this._logger=new xmp.util.internals.CategoryLogger('NullTriggerCommand');};xmp.baseplayer.internals.NullTriggerCommand.prototype.doCommand=function(Pl){if(this._logger.isDebugEnabled()){this._logger.debug('Trigger Command unrecognized: '+this._type);}};xmp.baseplayer.internals.EchoTriggerCommand=function(){this._logger=new xmp.util.internals.CategoryLogger('EchoTriggerCommand');};xmp.baseplayer.internals.EchoTriggerCommand.prototype.doCommand=function(Ql){var Rl=Ql.getCommandData();xmp.baseplayer.internals.AdStatusReporter.report(this._logger,'Trigger type: '+Ql.getTriggerType()+', Doing "echo" command, data = '+Rl);};xmp.baseplayer.internals.SetImageTriggerCommand=function(){this._logger=new xmp.util.internals.CategoryLogger('SetImageTriggerCommand');};xmp.baseplayer.internals.SetImageTriggerCommand.prototype.doCommand=function(Sl){var Tl=this._cleanImageData(Sl.getCommandData());var Ul=xmp.baseplayer.internals.Ad.getInstance().setPingImage(Tl);xmp.baseplayer.internals.AdStatusReporter.report(this._logger,'Trigger type: '+Sl.getTriggerType()+', Doing "setImg" command, data = '+Tl+', using img dom ID: '+Ul);};xmp.baseplayer.internals.SetImageTriggerCommand.prototype._cleanImageData=function(Vl){var Wl=Vl.indexOf('\"');if(Wl===-1){return Vl;}
Vl=Vl.substr(Wl+1);var Xl=Vl.indexOf('\"');Vl=Vl.substr(0,Xl);return Vl;};xmp.baseplayer.internals.AdStatusReporter=function(){};xmp.baseplayer.internals.AdStatusReporter._cb=null;xmp.baseplayer.internals.AdStatusReporter.dummySetAdStatus=function(){};xmp.baseplayer.internals.AdStatusReporter.report=function(Yl,Zl){if(xmp.baseplayer.internals.AdStatusReporter._cb===null){var p=xmp.baseplayer.BasePlayer._singleInstance;if((p)&&(p.setAdStatus)){xmp.baseplayer.internals.AdStatusReporter._cb=new xmp.util.Callback('adStatus',p.setAdStatus,p);}
else{xmp.baseplayer.internals.AdStatusReporter._cb=new xmp.util.Callback('adStatus',xmp.baseplayer.internals.AdStatusReporter.dummySetAdStatus,null);}
xmp.baseplayer.internals.AdStatusReporter._cb.setAddThisToCallback(false);}
try{xmp.baseplayer.internals.AdStatusReporter._cb.call('SMARTCOUNT: '+Zl);}
catch(ex){}
if(Yl.isDebugEnabled()){Yl.debug(Zl);}};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.VideoAdMetaFileLoader=function($l,am){this._CLASS_NAME='VideoAdMetaFileLoader';this._AD_MAN_TYPE='adMan';this._AD_SERVER_TYPE='adServer';this._logger=new xmp.util.internals.CategoryLogger(this._CLASS_NAME);this._THIS_TYPE='videoAdMeta';this._owner=$l;this._loaderId=am;this._resBundle=null;this._callback=null;this._companionAdId=xmp.baseplayer.internals.Ad.createCompanionAdId();this._latchCompleteCb=this._createCb(null,'LatchComplete',this._handleLatchComplete);this._latch=new xmp.util.Latch([],this._latchCompleteCb);};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype.setResBundle=function(bm,cm){this._resBundle=bm;this._callback=cm;};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype.load=function(){try{if(this._shortCircuit()){return;}
this._latchCompleteCb.setMetadata('LatchPhase',this._AD_MAN_TYPE);var dm=this._resBundle.getResourceTypes();for(var i=0;i<dm.length;i++){var em=this._resBundle.getMetaResource(dm[i]);em.setCompanionAdId(this._companionAdId);this._loadARM(em,this._AD_MAN_TYPE,xmp.net.ContentTypes.TEXT,em.getId());}}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._shortCircuit=function(){if(this._resBundle.getCount()===0){this._resBundle._setRawData('Loaded (no resources)');}
if(this._resBundle.isLoaded()||this._resBundle.isError()){xmp.util.Timer.doSimpleCallback(this._createCb(null,'endAsynch',this._end));return true;}
return false;};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._handleLatchComplete=function(cb){try{var fm=this._latchCompleteCb.getMetadata('LatchPhase','');if(fm===this._AD_MAN_TYPE){this._doAdManComplete();}
else if(fm===this._AD_SERVER_TYPE){this._doAdServerComplete();}
else{throw new Error('Unrecognized phase: '+fm);}}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._doAdManComplete=function(){this._latchCompleteCb.setMetadata('LatchPhase',this._AD_SERVER_TYPE);var gm=this._resBundle.getResourceTypes();var hm=0;for(var i=0;i<gm.length;i++){var im=this._resBundle.getMetaResource(gm[i]);var jm=this._makeCbName(im,this._AD_MAN_TYPE);var km=this._latchCompleteCb.getMetadata(jm,xmp.util.internals.MetadataMap.defaultObj);if(!km.isError()){var lm=this._buildAdServerRelUrl(im,km.getText());if(im.getType()==='primary'){hm++;this._loadARM(im,this._AD_SERVER_TYPE,xmp.net.ContentTypes.JSON,lm);}
else if(im.getType()==='synch_unit'){var mm=xmp.baseplayer.internals.Ad.getAdServerRoot();im._setRawData(mm+lm);im.setDataType('url');}}
else{im._setErrorMessage(km.getErrorMessage());}}
if(hm===0){this._end();}};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._doAdServerComplete=function(){var nm=this._resBundle.getMetaResource('primary');var om=this._makeCbName(nm,this._AD_SERVER_TYPE);var qm=this._latchCompleteCb.getMetadata(om,xmp.util.internals.MetadataMap.defaultObj);if(!qm.isError()){nm._setRawData(qm.getJsonObject());}
else{nm._setErrorMessage(qm.getErrorMessage());}
this._end();};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._handleError=function(e){this._handleErrorMessage(xmp.extractErrorMessage(e));};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._handleErrorMessage=function(rm){this._resBundle._setErrorMessage(rm);this._end();};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._end=function(){if(this._owner!==null){this._owner._release(this);this._owner=null;}
if(!this._resBundle.isError()){var sm=this._resBundle.getMetaResource('primary');if(sm!==null&&sm.isError()){this._resBundle._setErrorMessage('Primary Resource Error: '+sm.getErrorMessage());}}
if(!this._resBundle.isError()){this._resBundle._setRawData('Loaded');}
try{this._callback.call(this._resBundle);}
catch(e){this._logger.warn('Error calling callback',e);}};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._createCb=function(tm,um,vm){return(new xmp.util.Callback(this._makeCbName(tm,um),vm,this));};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._makeCbName=function(wm,xm){var ym=(wm!==null)?wm.getType():'';return(this._CLASS_NAME+'_'+xm+'_'+ym+'_'+this._loaderId);};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._buildAdServerRelUrl=function(zm,Am){var Bm=xmp.trimString(Am);var Cm=zm.getMetadata('segvars','');return xmp.baseplayer.internals.Ad.getInstance().buildRelativeURL(zm.getType(),this._companionAdId,Bm,Cm);};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._loadARM=function(Dm,Em,Fm,Gm){var cb=this._createCb(Dm,Em,this._handleARMResponse);this._latch.addCbName(cb.getId());xmp.net.AjaxRequestManager.getInstance().request(Gm,cb,Em,Gm,Fm,null);};xmp.baseplayer.internals.VideoAdMetaFileLoader.prototype._handleARMResponse=function(Hm,Im){if(Im.isError()){var Jm=new xmp.baseplayer.ApplicationError(Im.getErrorObject(),'FailToGetAdVideo',null,[{label:"Url",text:Im.getFullUrl()}]);this._logger.warn(Jm.message,Jm);}
this._latch.called(Hm.getId(),Im);};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader=function(Km,Lm){this._CLASS_NAME='VideoCompositeAdMetaFileLoader';this._AD_MAN_TYPE='adMan';this._AD_SERVER_TYPE='adServer';this._logger=new xmp.util.internals.CategoryLogger(this._CLASS_NAME);this._THIS_TYPE='videoCompositeAdMeta';this._owner=Km;this._loaderId=Lm;this._resBundle=null;this._callback=null;this._companionAdId=xmp.baseplayer.internals.Ad.createCompanionAdId();};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype.setResBundle=function(Mm,Nm){this._resBundle=Mm;this._callback=Nm;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype.load=function(){try{if(this._shortCircuit()){return;}
xmp.baseplayer.internals.AdServerPageController.getInstance().waitUntilReady(new xmp.util.Callback('_doCompositeJob',this._doCompositeJob,this));}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._doCompositeJob=function(){try{var Om=this._createJobJson();var Pm='tile='+this._companionAdId.toString();this._logger.info(Om);var cb=this._createCb(null,'adCompositor',this._handleARMResponse);var Qm=xmp.baseplayer.internals.AdServerPageController.getInstance().getData('NGUserIDCookie','false');var Rm=[{name:'job_json',value:xmp.Base64.encode(Om),type:xmp.net.AjaxRequestManager.POST_FORM_TYPE},{name:'NGUserID',value:Qm,type:xmp.net.AjaxRequestManager.POST_FORM_TYPE},{name:'adDEmas',value:xmp.util.Cookie.read('adDEmas'),type:xmp.net.AjaxRequestManager.POST_FORM_TYPE}];xmp.net.AjaxRequestManager.getInstance().request(Pm,cb,'adCompositor',Pm,xmp.net.ContentTypes.JSON,Rm);}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._shortCircuit=function(){if(this._resBundle.getCount()===0){this._resBundle._setRawData('Loaded (no resources)');}
if(this._resBundle.isLoaded()||this._resBundle.isError()){xmp.util.Timer.doSimpleCallback(this._createCb(null,'endAsynch',this._end));return true;}
return false;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._createJobJson=function(){var jj="{ inmeta: { adManRoot: '"+xmp.baseplayer.internals.Ad.getAdManRoot()+"', adServerRoot: '"+xmp.baseplayer.internals.Ad.getAdServerRoot()+"'}, inoutmeta: { debug: {} }, commands: [";var Sm=this._resBundle.getResourceTypes();for(var i=0;i<Sm.length;i++){var Tm=Sm[i];var Um=this._resBundle.getMetaResource(Tm);var Vm=this._getDataType(Um);Um.setDataType(Vm);Um.setCompanionAdId(this._companionAdId);var Wm=this._buildAdServerRelUrl(Um,'');var Xm="{ type: 'loadAd', inmeta: { type: '"+Tm+"', dataType: '"+Vm+"', "+"query: '"+Wm+"', id: '"+Um.getId()+"'}, "+"inoutmeta: { data: '', error: '', debug: {}}}";jj+=Xm;if(i!==(Sm.length-1)){jj+=', ';}}
jj+=']}';return jj;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._getDataType=function(Ym){var Zm=Ym.getType();var $m=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('ad data types');return $m.getString(Zm,'default');};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._handleError=function(e){this._handleErrorMessage(xmp.extractErrorMessage(e));};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._handleErrorMessage=function(an){this._resBundle._setErrorMessage(an);this._end();};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._end=function(){if(this._owner!==null){this._owner._release(this);this._owner=null;}
if(!this._resBundle.isError()){if(this._resBundle.getCount()===this._resBundle.getErrorCount()){this._resBundle._setErrorMessage('All resources in composite failed.');}}
if(!this._resBundle.isError()){this._resBundle._setRawData('Loaded');}
try{this._callback.call(this._resBundle);}
catch(e){this._logger.warn('Error calling callback',e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._createCb=function(bn,cn,dn){return(new xmp.util.Callback(this._makeCbName(bn,cn),dn,this));};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._makeCbName=function(en,fn){var gn=(en!==null)?en.getType():'';return(this._CLASS_NAME+'_'+fn+'_'+gn+'_'+this._loaderId);};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._buildAdServerRelUrl=function(hn,jn){var kn=xmp.trimString(jn);var ln=hn.getMetadata('segvars','');return xmp.baseplayer.internals.Ad.getInstance().buildRelativeURL(hn.getType(),this._companionAdId,kn,ln);};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._handleARMResponse=function(mn,nn){if(nn.isError()){var on=new xmp.baseplayer.ApplicationError(nn.getErrorObject(),'FailToGetAdVideo',null,[{label:"Url",text:nn.getFullUrl()}]);this._logger.warn(on.message);this._failAll(nn.getErrorMessage());this._end();return;}
var pn=nn.getJsonObject();var qn=this._decodeOpt(pn.jobError,'');if(qn.length!==0){this._logger.warn('jobError: '+qn);this._failAll('composite jobError: '+qn);this._end();return;}
var rn=this._getOpt(pn.inoutmeta.debug.job_duration,0);this._logger.info("Servlet job duration (ms): "+rn);var sn=this._resBundle.getResourceTypes();for(var i=0;i<sn.length;i++){var tn=sn[i];var un=this._resBundle.getMetaResource(tn);var vn=null;for(var j=0;j<pn.commands.length;j++){if(pn.commands[j].inmeta.type===tn){vn=pn.commands[j];break;}}
var wn=this._decodeOpt(vn.inoutmeta.debug.adServerUrl,'NOT_FOUND');var xn=this._decodeOpt(vn.inoutmeta.debug.fullAdManUrl,'NOT_FOUND');var yn=this._decodeOpt(vn.inoutmeta.data,'');var zn=this._decodeOpt(vn.inoutmeta.error,'');var An=vn.inmeta.dataType;var Bn='Ad type: '+tn+', dataType: '+An+', adServerUrl: '+wn+', fullAdManUrl: '+xn;if((zn.length===0)&&this._logger.isInfoEnabled()){this._logger.info(Bn);this._logger.info('Data: '+yn);}
if(zn.length!==0){this._logger.warn(Bn);this._logger.warn('Error: '+zn);un._setErrorMessage(zn);continue;}
if(An==='url'){var Cn=xmp.baseplayer.internals.Ad.getAdServerRoot();un._setRawData(Cn+yn);}
else if(An==='videoJson'){try{var Dn=xmp.net.AjaxRequestManager.getInstance()._parseJson(yn);un._setRawData(Dn);}
catch(parseEx){this._logger.warn('Parse error with ad type: '+tn+', '+xmp.extractErrorMessage(parseEx));un._setErrorMessage(xmp.extractErrorMessage(parseEx));}}
else{un._setRawData(yn);}}
this._end();};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._failAll=function(En){this._resBundle._setErrorMessage(En);var Fn=this._resBundle.getResourceTypes();for(var i=0;i<Fn.length;i++){var Gn=Fn[i];var Hn=this._resBundle.getMetaResource(Gn);Hn._setErrorMessage(En);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._getOpt=function(In,Jn){if(typeof(In)!=='undefined'){return In;}
return Jn;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader.prototype._decodeOpt=function(Kn,Ln){if(xmp.isNonEmptyString(Kn)){return xmp.Base64.decode(Kn);}
return Ln;};xmp.updateAdServerData=function(Mn){xmp.baseplayer.internals.AdServerPageController.getInstance().update(Mn);};xmp.baseplayer.internals.AdServerPageController=function(){this._READY_POLL_INTERVAL=250;this._IFRAME_ID='xmp_AdServerPageController';this._logger=new xmp.util.internals.CategoryLogger('AdServerPageController');this._dataMap={};this._readyCB=null;this._readyTimer=null;this._gotData=false;this._startTime=-1;this._readyTries=0;this._refreshCount=0;this._refreshTimer=null;this._init();};xmp.baseplayer.internals.AdServerPageController._instance=null;xmp.baseplayer.internals.AdServerPageController.getInstance=function(){if(xmp.baseplayer.internals.AdServerPageController._instance===null){xmp.baseplayer.internals.AdServerPageController._instance=new xmp.baseplayer.internals.AdServerPageController();}
return xmp.baseplayer.internals.AdServerPageController._instance;};xmp.baseplayer.internals.AdServerPageController.prototype.waitUntilReady=function(cb){this._readyCB=null;this._stopReadyTimer();this._startTime=-1;this._readyTries=0;if(this._gotData){cb.call();return;}
this._readyCB=cb;this._startTime=this.getNowMs();var Nn=new xmp.util.Callback('_readyTest',this._readyTest,this);this._readyTimer=new xmp.util.Timer(Nn.getId(),this._READY_POLL_INTERVAL,1000,Nn);this._readyTimer.start();};xmp.baseplayer.internals.AdServerPageController.prototype.getNowMs=function(){return(new Date()).getTime();};xmp.baseplayer.internals.AdServerPageController.prototype.getData=function(On,Pn){var Qn=this._dataMap[On];return(Qn)?Qn:Pn;};xmp.baseplayer.internals.AdServerPageController.prototype.update=function(Rn){for(var Sn=xmp.MapIterator.create(Rn);Sn.hasNext();Sn.next()){var Tn=Sn.currentKey();this._dataMap[Tn]=Sn.currentValue();if(this._logger.isInfoEnabled()){this._logger.info('Updated key: '+Tn+', value: '+this._dataMap[Tn]);}}
this._gotData=true;this._refreshCount++;this._logger.info('Data updated, count: '+this._refreshCount);};xmp.baseplayer.internals.AdServerPageController.prototype._stopReadyTimer=function(){if(this._readyTimer!==null){this._readyTimer.stop();this._readyTimer=null;}};xmp.baseplayer.internals.AdServerPageController.prototype._readyTest=function(cb,Un){this._readyTries++;if(this._gotData){this._stopReadyTimer();this._logger.info('Got data, try: '+this._readyTries);}
else{var Vn=this.getNowMs()-this._startTime;if(Vn>30000){this._stopReadyTimer();this._logger.warn('Failed to get initial ad server data.');}
else{return;}}
if(this._readyCB!==null){this._readyCB.call();this._readyCB=null;}};xmp.baseplayer.internals.AdServerPageController.prototype._init=function(){var Wn=window.document.createElement('div');Wn.style.display='none';xmp.insertDomChildBefore(window.document.body,Wn);var Xn=this._getCfgNode().getString('adServerDataPage','');if(Xn.toLowerCase().indexOf('http')!==0){var Yn=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath('rootUrlMap/adServer');Xn=Yn+Xn;}
var Zn='<iframe hspace="0" vspace="0" marginHeight="0" marginWidth="0" src="'+Xn+'" border="0" frameBorder="0" height="0" width="0" scrolling="no"  id="'+this._IFRAME_ID+'" name="'+this._IFRAME_ID+'" style="position: absolute; visibility: hidden;" ></iframe>';Wn.innerHTML=Zn;var cb=new xmp.util.Callback('_doRefresh',this._doRefresh,this);this._refreshTimer=new xmp.util.Timer(cb.getId(),30000,-1,cb);this._refreshTimer.start();};xmp.baseplayer.internals.AdServerPageController.prototype._doRefresh=function(){try{this._logger.info('Attempting to refresh.');var $n=window.frames[this._IFRAME_ID];$n.xmp_cnn_updateAdServerData();}
catch(ex){this._logger.warn('Failed to refresh.',ex);}};xmp.baseplayer.internals.AdServerPageController.prototype._getCfgNode=function(){return xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath('loaders/videoCompositeAdMeta/cfg');};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2=function(ao,bo){this._CLASS_NAME='VideoCompositeAdMetaFileLoader2';this._AD_MAN_TYPE='adMan';this._AD_SERVER_TYPE='adServer';this._DELIM='__@@$$@@__';this._DELIM_RE=/__@@\$\$@@__/gm;this._AD_REQUEST_ID_PREFIX='ad';this._logger=new xmp.util.internals.CategoryLogger(this._CLASS_NAME);this._THIS_TYPE='videoCompositeAdMeta';this._owner=ao;this._loaderId=bo;this._resBundle=null;this._callback=null;this._latchCompleteCb=this._createCb(null,'LatchComplete',this._handleLatchComplete);this._latch=new xmp.util.Latch([],this._latchCompleteCb);this._adDataArray=[];this._companionAdId=xmp.baseplayer.internals.Ad.createCompanionAdId();};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype.setResBundle=function(co,eo){this._resBundle=co;this._callback=eo;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype.load=function(){try{if(this._shortCircuit()){return;}
this._loadAdMan();}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._shortCircuit=function(){if(this._resBundle.getCount()===0){this._resBundle._setRawData('Loaded (no resources)');}
if(this._resBundle.isLoaded()||this._resBundle.isError()){xmp.util.Timer.doSimpleCallback(this._createCb(null,'endAsynch',this._end));return true;}
return false;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._getDataType=function(fo){var go=fo.getType();var ho=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('ad data types');return ho.getString(go,'default');};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._handleError=function(e){this._handleErrorMessage(xmp.extractErrorMessage(e));};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._handleErrorMessage=function(io){this._resBundle._setErrorMessage(io);this._end();};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._end=function(){if(this._owner!==null){this._owner._release(this);this._owner=null;}
if(!this._resBundle.isError()){if(this._resBundle.getCount()===this._resBundle.getErrorCount()){this._resBundle._setErrorMessage('All resources in composite failed.');}}
if(!this._resBundle.isError()){this._resBundle._setRawData('Loaded');}
try{this._callback.call(this._resBundle);}
catch(e){this._logger.warn('Error calling callback',e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._createCb=function(jo,ko,lo){return(new xmp.util.Callback(this._makeCbName(jo,ko),lo,this));};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._makeCbName=function(mo,no){var oo=(mo!==null)?mo.getType():'';return(this._CLASS_NAME+'_'+no+'_'+oo+'_'+this._loaderId);};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._buildAdServerRelUrl=function(po,qo){var ro=xmp.trimString(qo);var so=po.getMetadata('segvars','');return xmp.baseplayer.internals.Ad.getInstance().buildRelativeURL(po.getType(),this._companionAdId,ro,so);};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._crackRawData=function(to){var uo=to.indexOf('\n');if(uo===-1){throw new Error('Ad server returned malformed composite - missing line feed between header and data.');}
var vo=xmp.trimString(to.substr(0,uo));if(vo.length===0){throw new Error('Ad server returned malformed composite - empty string header.');}
if(0!==vo.indexOf(this._AD_REQUEST_ID_PREFIX)){throw new Error('Ad server returned malformed composite - header does not begin with "'+this._DELIM+' '+this._AD_REQUEST_ID_PREFIX+'".');}
var wo=to.substr(uo+1);uo=vo.indexOf(' ');if(uo===-1){throw new Error('Ad server returned malformed composite - missing space in header between ID and status.');}
var id=xmp.trimString(vo.substr(0,uo));var xo=xmp.trimString(vo.substr(uo+1));if(!(xo==='OK'||xo==='ERROR')){throw new Error('Ad server returned malformed composite - status must be either "OK" or "ERROR".');}
var yo=(xo==='OK');if(yo&&(xmp.trimString(wo).length===0)){yo=false;wo='No data returned by ad server (or only white space).';}
return{'adReqId':id,'data':wo,'ok':yo};};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._breakComposite=function(zo){var Ao={};var Bo=zo.indexOf(this._DELIM);if(Bo===-1){return Ao;}
if(Bo>0){zo=zo.substr(Bo);}
var Co=zo.split(this._DELIM_RE);for(var i=1;i<Co.length;i++){var Do=this._crackRawData(Co[i]);Ao[Do.adReqId]=Do;}
return Ao;};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._handleAdServerARMResponse=function(Eo,Fo){try{this._handleAdServerARMResponseInternal(Eo,Fo);}
catch(e){this._failAll(xmp.extractErrorMessage(e));this._handleError(e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._handleAdServerARMResponseInternal=function(Go,Ho){if(Ho.isError()){var Io=new xmp.baseplayer.ApplicationError(Ho.getErrorObject(),'FailToGetAdVideo',null,[{label:"Url",text:Ho.getFullUrl()}]);this._logger.warn(Io.message);this._failAll(Ho.getErrorMessage());this._end();return;}
var Jo=this._breakComposite(Ho.getText());for(var i=0;i<this._adDataArray.length;i++){var Ko=this._adDataArray[i];var Lo=Jo[Ko.adReqId];if(typeof(Lo)==='undefined'){throw new Error('Ajax response missing ad request ID: '+Ko.adReqId+' for res type: '+Ko.res.getType());}
if(Lo.ok){if(Ko.res.getDataType()==='videoJson'){try{var Mo=xmp.net.AjaxRequestManager.getInstance()._parseJson(Lo.data);Ko.res._setRawData(Mo);}
catch(parseEx){this._logger.warn('Parse error with ad type: '+Ko.res.getType()+', '+xmp.extractErrorMessage(parseEx));Ko.res._setErrorMessage(xmp.extractErrorMessage(parseEx));}}
else{Ko.res._setRawData(Lo.data);}}
else{Ko.res._setErrorMessage(Lo.data);}}
this._end();};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._failAll=function(No){this._resBundle._setErrorMessage(No);var Oo=this._resBundle.getResourceTypes();for(var i=0;i<Oo.length;i++){var Po=Oo[i];var Qo=this._resBundle.getMetaResource(Po);Qo._setErrorMessage(No);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._loadAdMan=function(){var Ro=this._resBundle.getResourceTypes();for(var i=0;i<Ro.length;i++){var So=this._resBundle.getMetaResource(Ro[i]);So.setCompanionAdId(this._companionAdId);var To=this._getDataType(So);So.setDataType(To);this._loadARM(So,this._AD_MAN_TYPE,xmp.net.ContentTypes.TEXT,So.getId());}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._loadARM=function(Uo,Vo,Wo,Xo){var cb=this._createCb(Uo,Vo,this._handleAdManARMResponse);this._latch.addCbName(cb.getId());xmp.net.AjaxRequestManager.getInstance().request(Xo,cb,Vo,Xo,Wo,null);};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._handleAdManARMResponse=function(Yo,Zo){if(Zo.isError()){var $o=new xmp.baseplayer.ApplicationError(Zo.getErrorObject(),'FailToGetAdVideo',null,[{label:"Url",text:Zo.getFullUrl()}]);this._logger.warn($o.message,$o);}
this._latch.called(Yo.getId(),Zo);};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._handleLatchComplete=function(cb){try{this._doAdManComplete();}
catch(e){this._handleError(e);}};xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2.prototype._doAdManComplete=function(){var ap=this._resBundle.getResourceTypes();var bp=[];this._adDataArray=[];for(var i=0;i<ap.length;i++){var cp=this._resBundle.getMetaResource(ap[i]);var dp=this._makeCbName(cp,this._AD_MAN_TYPE);var ep=this._latchCompleteCb.getMetadata(dp,xmp.util.internals.MetadataMap.defaultObj);if(!ep.isError()){var fp=this._AD_REQUEST_ID_PREFIX+xmp.zeroPad(bp.length,2);var gp=this._buildAdServerRelUrl(cp,ep.getText());bp.push({name:fp,value:gp,type:xmp.net.AjaxRequestManager.POST_FORM_TYPE});this._adDataArray.push({'adReqId':fp,'res':cp});}
else{cp._setErrorMessage(ep.getErrorMessage());}}
if(bp.length===0){this._end();}
else{bp.reverse();var hp='/multi';var cb=this._createCb(null,'adCompositor',this._handleAdServerARMResponse);xmp.net.AjaxRequestManager.getInstance().request(hp,cb,'adCompositor',hp,xmp.net.ContentTypes.TEXT,bp);}};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.VideoContentMetaFileLoader=function(ip,jp){this._logger=new xmp.util.internals.CategoryLogger('VideoContentMetaFileLoader');this._THIS_TYPE='videoContentMeta';this._owner=ip;this._loaderId=jp;this._handleArray=[];this._handleMap={};this._perIdCallback=null;this._allLoadedCallback=null;this._loadedCount=0;this._loadCalled=false;};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype.setIds=function(kp,lp){this._loadCalled=false;this._handleArray=[];this._perIdCallback=lp;var mp={};for(var i=0;i<kp.length;i++){var id=kp[i];if(!(typeof id==='string'&&id.length>0)){throw new xmp.util.internals.InvalidArgsError("The 'ids' argument must be an array of non-empty strings.");}
if(typeof mp[id]!=='undefined'){this._logger.warn('Skipping duplicate ID: '+id);continue;}
mp[id]=id;var np=xmp.baseplayer.internals.MetaFileCache.getInstance().findOrCreate(this._THIS_TYPE,id,this,-1);var op={h:np,ready:false};this._handleArray.push(op);this._handleMap[np.getId()]=op;}
return this._extractPlayableDataArray();};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype.setAllLoadedCallback=function(pp){this._allLoadedCallback=pp;};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype.load=function(){this._loadCalled=true;if(this._handleArray.length===0){this._releaseThis();this._notifyAllLoaded();return;}
this._loadedCount=0;for(var i=0;i<this._handleArray.length;i++){var qp=this._handleArray[i];if(qp.ready){this._notifyPerFile(qp.h);}}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._extractPlayableDataArray=function(){var rp=[];for(var i=0;i<this._handleArray.length;i++){var sp=this._handleArray[i].h;rp.push(sp.getDataObject());}
return rp;};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._notifyPerFile=function(tp){if(tp.isLoaded()){this._loadedCount++;this._notifyPerFileCore(tp);}
if(this._loadedCount>=this._handleArray.length){this._releaseThis();this._notifyAllLoaded();}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._releaseThis=function(){if(this._owner!==null){this._owner._release(this);this._owner=null;}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._notifyPerFileCore=function(up){try{if(this._perIdCallback!==null){this._perIdCallback.call(up.getDataObject());}}
catch(e){this._logger.warn('Error calling per-file-callback',e);}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._notifyAllLoaded=function(){try{if(this._allLoadedCallback!==null){this._allLoadedCallback.call();}}
catch(e){var vp=new xmp.baseplayer.ApplicationError(e,'badVideoJson',e.context,null);this._logger.warn(vp.message,vp);}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._notifyFileRequestLoaded=function(wp){if(this._loadCalled){this._notifyPerFile(wp);}
else{var xp=this._handleMap[wp.getId()];if(xp.h!==wp){throw new Error('Unexpected, handles not the same reference.');}
xp.ready=true;}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._loadFileRequest=function(yp){var zp=null;try{zp=new xmp.util.PlayableData(yp.getId());yp._setDataObject(zp);var Ap=new xmp.util.Callback('VideoContentMetaFileLoader'+'_'+this.getLoaderId()+'_'+yp.getId(),this._handleAjaxResponse,this);var Bp=xmp.net.AjaxRequestManager.getInstance();Ap.setMetadata('handle',yp);Bp.request(yp.getId(),Ap,yp.getType(),yp.getId(),xmp.net.ContentTypes.JSON,null);return xmp.baseplayer.internals.FileRequestHandle.STATE_LOADING;}
catch(e){try{if(zp!==null){zp._setErrorMessage(xmp.extractErrorMessage(e));}}
catch(e2){this._logger.warn('Second chance error handling created file request',e2);}
throw e;}};xmp.baseplayer.internals.VideoContentMetaFileLoader.prototype._handleAjaxResponse=function(Cp,Dp){var Ep=Cp.getMetadata('handle',{});var Fp=Ep.getDataObject();if(!Dp.isError()){Fp._setRawData(Dp.getJsonObject());}
else{var Gp=new xmp.baseplayer.ApplicationError(Dp.getErrorObject(),'FailToGetVideoJson','VideoContent',[{label:'url',text:Dp.getFullUrl()}]);this._logger.warn(Gp.message,Gp);Ep._setErrorMessage(Dp.getErrorMessage());Fp._setErrorMessage(Dp.getErrorMessage());}
Ep._setAsLoaded();};xmp.createNamespace("xmp.baseplayer.internals");xmp.baseplayer.internals.VideoPromoMetaFileLoader=function(Hp,Ip){this._logger=new xmp.util.internals.CategoryLogger('VideoPromoMetaFileLoader');this._THIS_TYPE='videoPromoMeta';this._owner=Hp;this._loaderId=Ip;this._playableNode=null;this._callback=null;};xmp.baseplayer.internals.VideoPromoMetaFileLoader.prototype.getLoaderId=function(){return this._loaderId;};xmp.baseplayer.internals.VideoPromoMetaFileLoader.prototype.setNode=function(Jp,Kp){this._playableNode=Jp;this._callback=Kp;};xmp.baseplayer.internals.VideoPromoMetaFileLoader.prototype.load=function(){var Lp=new xmp.util.Callback('VideoPromoMetaFileLoader'+'_'+this._loaderId,this._handleAjaxResponse,this);var Mp=xmp.net.AjaxRequestManager.getInstance();var Np=this._playableNode.getPlayableData();var id=Np.getMetaResourceId();Mp.request(id,Lp,this._THIS_TYPE,id,xmp.net.ContentTypes.JSON,null);};xmp.baseplayer.internals.VideoPromoMetaFileLoader.prototype._handleAjaxResponse=function(Op,Pp){var Qp=this._playableNode.getPlayableData();if(!Pp.isError()){var Rp=new xmp.baseplayer.ApplicationError(Pp.getErrorObject(),'FailToGetPromoJson','VideoPromo',[{label:'url',text:Pp.getFullUrl()}]);this._logger.warn(Rp.message,Rp);Qp._setRawData(Pp.getJsonObject());}
else{Qp._setErrorMessage(Pp.getErrorMessage());}
if(this._owner!==null){this._owner._release(this);this._owner=null;}
try{this._callback.call(this._playableNode);}
catch(e){this._logger.warn('Error calling callback',e);}};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.CompositeNodeListener=function(Sp){this._com_logger=new xmp.util.internals.CategoryLogger('CompositeNodeListener');this._constants=xmp.baseplayer.listeners.CompositeNodeListener;xmp.baseplayer.listeners.CompositeNodeListener.ctor.call(this,this._constants.COMPOSITE_NODE_LISTENER,Sp);this.children=[];};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,xmp.baseplayer.listeners.CompositeNodeListener);xmp.baseplayer.listeners.CompositeNodeListener.COMPOSITE_NODE_LISTENER="Composite";xmp.baseplayer.listeners.CompositeNodeListener.INITIALIZE="Initialize";xmp.baseplayer.listeners.CompositeNodeListener.COMPLETE="Complete";xmp.baseplayer.listeners.CompositeNodeListener.RENDER="Render";xmp.baseplayer.listeners.CompositeNodeListener.DYNAMIC_RULES="DynamicRules";xmp.baseplayer.listeners.CompositeNodeListener.TIMELINE_CHANGE="TimelineChange";xmp.baseplayer.listeners.CompositeNodeListener.CAN_USER_CONTROL="CanUserControl";xmp.baseplayer.listeners.CompositeNodeListener.CAN_COMPLETE_NOW="CanCompleteNow";xmp.baseplayer.listeners.CompositeNodeListener.COMPLETE_ASNCH="CompleteAsynch";xmp.baseplayer.listeners.CompositeNodeListener.OVERRIDE_AD_RESOURCES="OverrideAdResources";xmp.baseplayer.listeners.CompositeNodeListener.VALIDATE="Validate";xmp.baseplayer.listeners.CompositeNodeListener.prototype.canUserControl=function(Tp){return this.dispatch(this._constants.CAN_USER_CONTROL,[Tp]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleDynamicRules=function(Up){this.dispatch(this._constants.DYNAMIC_RULES,[Up]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleRender=function(Vp){this.dispatch(this._constants.RENDER,[Vp]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleInitialize=function(Wp){this.dispatch(this._constants.INITIALIZE,[Wp]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleComplete=function(Xp){this.dispatch(this._constants.COMPLETE,[Xp]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.canCompleteNow=function(Yp){return this.dispatch(this._constants.CAN_COMPLETE_NOW,[Yp]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleCompleteAsynch=function(Zp,$p){this.dispatch(this._constants.COMPLETE_ASNCH,[Zp,$p]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleOpen=function(aq){this.dispatch(xmp.OPEN,[aq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleConnecting=function(bq){this.dispatch(xmp.CONNECTING,[bq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleConnected=function(cq){this.dispatch(xmp.CONNECTED,[cq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handlePlay=function(dq){this.dispatch(xmp.PLAY,[dq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleFirstFrameRendered=function(eq){this.dispatch(xmp.FIRST_FRAME_RENDERED,[eq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handlePause=function(fq){this.dispatch(xmp.PAUSE,[fq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleStop=function(gq){this.dispatch(xmp.STOP,[gq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleRewind=function(hq){this.dispatch(xmp.REWIND,[hq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleFastForward=function(iq){this.dispatch(xmp.FAST_FORWARD,[iq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleSeekable=function(jq){this.dispatch(xmp.SEEKABLE,[jq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleEnded=function(kq){this.dispatch(xmp.ENDED,[kq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleBuffering=function(lq,mq){this.dispatch(xmp.BUFFERING,[lq,mq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleTimelineChange=function(nq,oq,pq){this.dispatch(this._constants.TIMELINE_CHANGE,[nq,oq,pq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleError=function(qq,e){this.dispatch(xmp.ERRORS,[qq,e]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleOverrideAdResources=function(rq,sq){this.dispatch(this._constants.OVERRIDE_AD_RESOURCES,[rq,sq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.handleValidate=function(tq){this.dispatch(this._constants.VALIDATE,[tq]);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.dispatch=function(uq,vq){var wq=this.children.length;for(var i=0;i<wq;i++){var xq=this.children[i];var yq=xq.callbacks[uq];var zq=null;try{zq=yq.method.apply(xq.listener,vq);}
catch(e){this._com_logger.warn('Error dispatching: '+uq+' on '+xq.listener.getId()+' node listener.',e);try{var Aq=vq[0];xq.listener.handleError(Aq,e);}
catch(e2){try{this._com_logger.warn('Error calling handleError while dispatching: '+uq+' on '+xq.listener.getId()+' node listener.',e2);}
catch(e3){}}}
if(yq.return_type===xmp.BOOLEAN_TYPE&&false===zq){return false;}}
return true;};xmp.baseplayer.listeners.CompositeNodeListener.prototype.addChild=function(Bq){var Cq={listener:Bq,callbacks:null};this.initChildCallbacks(Cq,Bq);this.children.push(Cq);};xmp.baseplayer.listeners.CompositeNodeListener.prototype.initChildCallbacks=function(Dq,Eq){var Fq=[{name:this._constants.CAN_USER_CONTROL,data:{method:Eq.canUserControl,return_type:xmp.BOOLEAN_TYPE}},{name:this._constants.DYNAMIC_RULES,data:{method:Eq.handleDynamicRules,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.INITIALIZE,data:{method:Eq.handleInitialize,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.COMPLETE,data:{method:Eq.handleComplete,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.RENDER,data:{method:Eq.handleRender,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.OPEN,data:{method:Eq.handleOpen,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.CONNECTING,data:{method:Eq.handleConnecting,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.CONNECTED,data:{method:Eq.handleConnected,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.FIRST_FRAME_RENDERED,data:{method:Eq.handleFirstFrameRendered,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.PLAY,data:{method:Eq.handlePlay,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.PAUSE,data:{method:Eq.handlePause,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.STOP,data:{method:Eq.handleStop,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.REWIND,data:{method:Eq.handleRewind,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.FAST_FORWARD,data:{method:Eq.handleFastForward,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.SEEKABLE,data:{method:Eq.handleSeekable,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.ENDED,data:{method:Eq.handleEnded,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.BUFFERING,data:{method:Eq.handleBuffering,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.TIMELINE_CHANGE,data:{method:Eq.handleTimelineChange,return_type:xmp.UNDEFINED_TYPE}},{name:xmp.ERRORS,data:{method:Eq.handleError,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.CAN_COMPLETE_NOW,data:{method:Eq.canCompleteNow,return_type:xmp.BOOLEAN_TYPE}},{name:this._constants.COMPLETE_ASNCH,data:{method:Eq.handleCompleteAsynch,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.OVERRIDE_AD_RESOURCES,data:{method:Eq.handleOverrideAdResources,return_type:xmp.UNDEFINED_TYPE}},{name:this._constants.VALIDATE,data:{method:Eq.handleValidate,return_type:xmp.UNDEFINED_TYPE}}];Dq.callbacks={};var Gq=Fq.length;for(var i=0;i<Gq;i++){Dq.callbacks[Fq[i].name]=Fq[i].data;}};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultAdNodeListener=function(Hq,Iq){xmp.baseplayer.listeners.DefaultAdNodeListener.ctor.call(this,Hq,Iq);this._logger=new xmp.util.internals.CategoryLogger('DefaultAdNodeListener');};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultBaseNodeListener,xmp.baseplayer.listeners.DefaultAdNodeListener);xmp.baseplayer.listeners.DefaultAdNodeListener.prototype.canUserControl=function(Jq){var Kq=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer').getBoolean('user can control ad',false);return Kq;};xmp.baseplayer.listeners.DefaultAdNodeListener.prototype.handleComplete=function(Lq){var Mq=Lq.getPlayableData();Lq.setURI(Mq.getPlayableId());Lq.setMimeTypes(Mq.getMimeTypeArray());Lq.setStreamingMode(xmp.AD_STREAMING_MODE);if(Mq.isExternal()){Lq.setUriAbsolute(true);if(Mq.getMimeTypeArray().length>0){var Nq=Mq.getMimeTypeArray()[0];Lq.setMimeType(Nq);if(Nq==='video/x-flv'){var Oq=Mq.getPlayableId().toLowerCase().split(".");if(Oq[Oq.length-1]!=='flv'){Lq.setURI(Mq.getPlayableId()+"&.flv");}}}}};xmp.baseplayer.listeners.DefaultAdNodeListener.prototype.handleRender=function(Pq){var Qq=Pq.getMetaResource('primary');if(Qq!==null){this._logger.info('Playing ad with tile ID: '+Qq.getCompanionAdId());}
xmp.baseplayer.listeners.DefaultAdNodeListener.base.handleRender.call(this,Pq);};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultNextUpSlateNodeListener=function(Rq,Sq){xmp.baseplayer.listeners.DefaultNextUpSlateNodeListener.ctor.call(this,Rq,Sq);this._logger=new xmp.util.internals.CategoryLogger('DefaultNextUpSlateNodeListener');};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultSlateNodeListener,xmp.baseplayer.listeners.DefaultNextUpSlateNodeListener);xmp.baseplayer.listeners.DefaultNextUpSlateNodeListener.prototype.handleComplete=function(Tq){xmp.baseplayer.listeners.DefaultNextUpSlateNodeListener.base.handleComplete.call(this,Tq);var Uq=this._findNextContentNode();if(Uq!==null){Tq.setMetadata("headline",Uq.getPlayableData().getDataObject().headline);}
else{this._logger.debug("Unusual state: The NextUpSlate failed to find a next content node.");}};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultPlayerListener=function(Vq,Wq){xmp.baseplayer.listeners.DefaultPlayerListener.ctor.call(this,Vq,Wq);this._logger=new xmp.util.internals.CategoryLogger('DefaultPlayerListener');};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultBaseNodeListener,xmp.baseplayer.listeners.DefaultPlayerListener);xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleRender=function(Xq){};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleError=function(Yq,e){};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleOpen=function(Zq){this.setStatus(Zq,xmp.OPEN);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleConnecting=function($q){this.setStatus($q,xmp.CONNECTING);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleConnected=function(ar){this.setStatus(ar,xmp.CONNECTED);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handlePlay=function(br){this.setStatus(br,xmp.PLAY);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handlePause=function(cr){this.setStatus(cr,xmp.PAUSE);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleStop=function(dr){this.setStatus(dr,xmp.STOP);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleRewind=function(er){this.setStatus(er,xmp.REWIND);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleFastForward=function(fr){this.setStatus(fr,xmp.FAST_FORWARD);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleSeekable=function(gr){this.setStatus(gr,xmp.SEEKABLE);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleEnded=function(hr){this.setStatus(hr,xmp.ENDED);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.handleBuffering=function(ir,jr){this.setStatus(ir,xmp.BUFFERING,jr);};xmp.baseplayer.listeners.DefaultPlayerListener.prototype.setStatus=function(kr,lr,mr){this._logger.debug('Player Listener setStatus, override to do specific handling.');};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultPromoNodeListener=function(nr,or){xmp.baseplayer.listeners.DefaultPromoNodeListener.ctor.call(this,nr,or);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultBaseNodeListener,xmp.baseplayer.listeners.DefaultPromoNodeListener);xmp.baseplayer.listeners.DefaultPromoNodeListener.prototype.handleComplete=function(pr){var qr=pr.getPlayableData();pr.setMimeTypes(qr.getMimeTypeArray());var rr=qr.getDataObject().sizes;if(rr&&rr.length>0){pr.setSizes(qr.getDataObject().sizes);}
pr.setURI(qr.getDataObject().location);pr.setStreamingMode(qr.getDataObject().streamingMode);};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultStartSlateNodeListener=function(sr,tr){xmp.baseplayer.listeners.DefaultStartSlateNodeListener.ctor.call(this,sr,tr);this._logger=new xmp.util.internals.CategoryLogger('DefaultStartSlateNodeListener');};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultSlateNodeListener,xmp.baseplayer.listeners.DefaultStartSlateNodeListener);xmp.baseplayer.listeners.DefaultStartSlateNodeListener.prototype.handleComplete=function(ur){xmp.baseplayer.listeners.DefaultStartSlateNodeListener.base.handleComplete.call(this,ur);var vr=this._findNextContentNode();if(vr!==null){var wr=vr.getPlayableData().getDataObject().images;var xr=wr.length;var yr=[];var zr={};for(var i=0;i<xr;i++){yr.push(wr[i].id);zr[wr[i].id]=wr[i].resource;}
ur.setMetadata("image",zr[xmp.PlayerPolicy.getSizeFromPlayer(yr)]);}
else{this._logger.debug("Unusual state: The StartSlate failed to find a next content node.");}};xmp.createNamespace("xmp.baseplayer.listeners");xmp.baseplayer.listeners.DefaultVideoNodeListener=function(Ar,Br){xmp.baseplayer.listeners.DefaultVideoNodeListener.ctor.call(this,Ar,Br,false);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.DefaultBaseNodeListener,xmp.baseplayer.listeners.DefaultVideoNodeListener);xmp.baseplayer.listeners.DefaultVideoNodeListener.prototype.handleInitialize=function(Cr){var Dr=Cr.getPlayableData();Cr.setMimeTypes(Dr.getMimeTypeArray());var Er=Dr.getDataObject().sizes;if(Er&&Er.length>0){Cr.setSizes(Dr.getDataObject().sizes);}
Cr.setURI(Dr.getDataObject().location);Cr.setStreamingMode(Dr.getDataObject().streamingMode);};xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.AdLoaderNodeListener=function(Fr){xmp.baseplayer.listeners.internal.AdLoaderNodeListener.ctor.call(this,'AdLoader',Fr);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.internal.AdResNodeListener,xmp.baseplayer.listeners.internal.AdLoaderNodeListener);xmp.baseplayer.listeners.internal.AdLoaderNodeListener.prototype._handleResBundleLoaded=function(Gr,Hr){if(Hr.isError()){Gr.getPlayableData()._setErrorMessage(Hr.getErrorMessage());}
else{var Ir=Gr.getAssociatedResourceBundleType();var Jr=Hr.getMetaResource(Ir);if(Jr.isError()){Gr.getPlayableData()._setErrorMessage(Jr.getErrorMessage());}
else{Gr.getPlayableData()._setRawData(Jr.getDataObject());}}};xmp.baseplayer.listeners.internal.NonAdLoaderNodeListener=function(Kr){xmp.baseplayer.listeners.internal.NonAdLoaderNodeListener.ctor.call(this,'NonAdLoader',Kr);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.internal.AdResNodeListener,xmp.baseplayer.listeners.internal.NonAdLoaderNodeListener);xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.FirstFrameNodeListener=function(Lr){this._logger=new xmp.util.internals.CategoryLogger('FirstFrameNodeListener');this._FIRST_FRAME_TIMEOUT_MIN=10000;this._firstFrameTimer=null;this._FIRST_FRAME_TIMER_ID="FIRST_FRAME_TIMER";this._currentNode=null;xmp.baseplayer.listeners.internal.FirstFrameNodeListener.ctor.call(this,'FirstFrameCheck',Lr);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,xmp.baseplayer.listeners.internal.FirstFrameNodeListener);xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleConnecting=function(Mr){if(Mr.getMimeType()!==xmp.FLASH_MIME_TYPE){return;}
if(this._firstFrameTimer){this._firstFrameTimer.stop();}
var Nr=new xmp.util.Callback('basePlayerTimeout',this._handleFirstFrameTimeout,this);var Or=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var Pr=Or.getInt('first frame timeout',this._FIRST_FRAME_TIMEOUT_MIN);this._firstFrameTimer=new xmp.util.Timer(this._FIRST_FRAME_TIMER_ID,Pr,1,Nr);this._currentNode=Mr;this._startTimer(this._firstFrameTimer);};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleFirstFrameRendered=function(Qr){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handlePause=function(Rr){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleStop=function(Sr){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleRewind=function(Tr){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleFastForward=function(Ur){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleSeekable=function(Vr){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype.handleError=function(Wr,e){this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype._reset=function(){this._currentNode=null;this._stopTimer(this._firstFrameTimer);this._firstFrameTimer=null;};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype._handleFirstFrameTimeout=function(){var Xr=xmp.CriticalException.createCriticalException(xmp.XmpErrorCodes.CRITICAL_FIRST_FRAME_TIMEOUT,'FirstFrameNodeListener',"Timeout received in playing "+this._currentNode.getBestId());this._logger.critical('First Frame Timeout',Xr);this.getPlayer().getMediaPlayer().close();this.getPlayer().onError(this._currentNode,Xr);this._reset();};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype._startTimer=function(Yr){if(Yr){Yr.start();}};xmp.baseplayer.listeners.internal.FirstFrameNodeListener.prototype._stopTimer=function(Zr){if(Zr){Zr.stop();}};xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.MeteringNodeListener=function($r){this._constants=xmp.baseplayer.listeners.internal.MeteringNodeListener;xmp.baseplayer.listeners.internal.MeteringNodeListener.ctor.call(this,this._constants.METERING_NODE_LISTENER,$r);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.internal.TriggerNodeListener,xmp.baseplayer.listeners.internal.MeteringNodeListener);xmp.baseplayer.listeners.internal.MeteringNodeListener.METERING_NODE_LISTENER="Metering";xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.PromoLoaderNodeListener=function(as){xmp.baseplayer.listeners.internal.PromoLoaderNodeListener.ctor.call(this,'PromoLoader',as);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,xmp.baseplayer.listeners.internal.PromoLoaderNodeListener);xmp.baseplayer.listeners.internal.PromoLoaderNodeListener.prototype.canCompleteNow=function(bs){if(bs.getPlayableData().isError()){return true;}
return bs.getPlayableData().isLoaded();};xmp.baseplayer.listeners.internal.PromoLoaderNodeListener.prototype.handleCompleteAsynch=function(cs,ds){var es=xmp.baseplayer.MetaFileLoaderFactory.getInstance().create('videoPromoMeta');var fs=new xmp.util.Callback('gotPromoCallback',this._gotPromoCallback,this);fs.setMetadata('RelayCallback',ds);es.setNode(cs,fs);es.load();};xmp.baseplayer.listeners.internal.PromoLoaderNodeListener.prototype._gotPromoCallback=function(gs,hs){var is=gs.getMetadata('RelayCallback',{});is.call(hs);};xmp.createNamespace("xmp.baseplayer.listeners.internal");xmp.baseplayer.listeners.internal.TrackingNodeListener=function(js){this._constants=xmp.baseplayer.listeners.internal.TrackingNodeListener;xmp.baseplayer.listeners.internal.TrackingNodeListener.ctor.call(this,this._constants.TRACKING_NODE_LISTENER,js);};xmp.DERIVE_CLASS(xmp.baseplayer.listeners.internal.TriggerNodeListener,xmp.baseplayer.listeners.internal.TrackingNodeListener);xmp.baseplayer.listeners.internal.TrackingNodeListener.TRACKING_NODE_LISTENER="Tracking";xmp.internal_settings_pref_api={type:"system",map:[],nodes:[{name:"PlayerContexts",map:[],nodes:[{name:"Generic",map:[],nodes:[{name:"BasePlayer",map:[{key:"user can control ad",value:"true"},{key:"look ahead and behind count",value:"7"},{key:"bandwidth threshold",value:"500"},{key:"videoAdMetaLoader",value:"videoAdMeta"},{key:"Ad metering image URL",value:"NO_DEFAULT_VALUE"},{key:"rule classes relative URL",value:"NO_DEFAULT_VALUE"},{key:"rule classes namespace",value:"NO_DEFAULT_VALUE"}],nodes:[{name:"ad patterns",map:[],nodes:[]},{name:"PlayerSizes",map:[],nodes:[]}]},{name:"invariantRules",map:[],nodes:[]},{name:"Additional segvars",map:[],nodes:[]},{name:"pattern parameters",map:[],nodes:[]},{name:"ad data types",map:[{key:"primary",value:"videoJson"},{key:"synch_unit",value:"url"}],nodes:[]},{name:"UrlStrategies",map:[],nodes:[{name:"Octoshape",map:[{key:"octo poll interval",value:"2000"},{key:"octo try limit",value:"8"},{key:"octo can use fn",value:"return ((xmp.getQueryArgOpt(\"xmpUseOctoshape\", \"true\") === \"true\") && ((xmp.isWindowsOS() && (xmp.isIEBrowser() || xmp.isFirefoxBrowser())) || (xmp.isMacOSX() && (xmp.isSafariBrowser() || xmp.isFirefoxBrowser()))));"}],nodes:[{name:"url mapping",map:[],nodes:[]}]}]}]},{name:"Global",map:[{key:"first frame timeout",value:"10000"}],nodes:[{name:"rootUrlMap",map:[],nodes:[{name:"videoContentMeta",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"videoTracking",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"videoPromoMeta",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"adPolicy",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"ruleClasses",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"adMan",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"dhtmlObject",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"errorDhtmlObject",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"xhr"}],nodes:[]},{name:"controlStreamResource",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"internalUserCheckResource",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]},{name:"video",map:[],nodes:[{name:"Flash",map:[],nodes:[{name:"ad",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]},{name:"vod",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]}]},{name:"WindowsMedia",map:[],nodes:[{name:"ad",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]},{name:"vod",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]},{name:"live",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]},{name:"control",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]}]},{name:"QuickTime",map:[],nodes:[{name:"vod",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"}],nodes:[]}]}]},{name:"image",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"adVideo",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"swf",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"adServer",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"}],nodes:[]},{name:"adCompositor",map:[{key:"rootUrl",value:"NO_DEFAULT_VALUE"},{key:"transportType",value:"flash"},{key:"requestVerb",value:"POST"}],nodes:[]}]},{name:"loaders",map:[],nodes:[{name:"videoContentMeta",map:[{key:"JSClass",value:"xmp.baseplayer.internals.VideoContentMetaFileLoader"}],nodes:[]},{name:"videoPromoMeta",map:[{key:"JSClass",value:"xmp.baseplayer.internals.VideoPromoMetaFileLoader"}],nodes:[]},{name:"videoAdMeta",map:[{key:"JSClass",value:"xmp.baseplayer.internals.AdServiceMetaFileLoader"}],nodes:[]},{name:"videoCompositeAdMeta",map:[{key:"JSClass",value:"xmp.baseplayer.internals.VideoCompositeAdMetaFileLoader2"}],nodes:[]},{name:"dhtmlObject",map:[{key:"JSClass",value:"xmp.baseplayer.internals.DhtmlObjectMetaFileLoader"}],nodes:[]},{name:"errorDhtmlObject",map:[{key:"JSClass",value:"xmp.baseplayer.internals.ErrorDhtmlObjectMetaFileLoader"}],nodes:[]}]},{name:"Media Player",map:[{key:"Bandwidth Sample Interval",value:"5000"},{key:"Fullscreen Enabled",value:"true"},{key:"Stretch To Fit",value:"true"}],nodes:[]},{name:"PlayingPolicy",map:[],nodes:[{name:"Streaming Modes",map:[{key:"001",value:"live"},{key:"002",value:"control"},{key:"003",value:"ad"},{key:"004",value:"vod"}],nodes:[]},{name:"PlugIns",map:[],nodes:[{name:"Flash",map:[{key:"display-name",value:"Flash PlugIn/ActiveX Player"},{key:"minimum-version",value:"8.0.0"},{key:"download-url",value:"http://www.adobe.com/go/getflashplayer"}],nodes:[]},{name:"WindowsMedia",map:[{key:"display-name",value:"Windows Media Player"},{key:"minimum-version",value:"9.0.0"},{key:"download-url",value:"http://www.microsoft.com/windows/windowsmedia/download"}],nodes:[]},{name:"TurnerMedia",map:[{key:"display-name",value:"Turner Media Plugin"},{key:"minimum-version",value:"1.0.0.9"},{key:"download-url",value:"http://www.cnn.com/download"}],nodes:[]},{name:"QuickTime",map:[{key:"display-name",value:"QuickTime Plugin"},{key:"minimum-version",value:"7.1.2"},{key:"download-url",value:"http://www.apple.com/quicktime/download"}],nodes:[]},{name:"Flip4Mac",map:[{key:"display-name",value:"Flip4Mac Plugin"},{key:"minimum-version",value:"2.1"},{key:"download-url",value:"http://www.flip4mac.com/downloads/wmv_components/Flip4Mac%20WMV%202.1.3.10.dmg"}],nodes:[]},{name:"Octoshape",map:[{key:"display-name",value:"Octoshape Plugin"},{key:"minimum-version",value:"please-get-latest-release-version"},{key:"download-url",value:"http://www.octoshape.com/plugin/get.asp"}],nodes:[]}]},{name:"Native Players",map:[],nodes:[{name:"xmp.FlashPlayer",map:[{key:"Buffer Time",value:"4000"},{key:"Streaming Video Adapter",value:"StreamingVideoMedia"},{key:"ActiveX Version Detection JSON",value:"var version = {{version}}.split(/\\s+/g)[1];return version.replace( /,/g, \".\" );"},{key:"Mozilla Version Detection JSON",value:"var temp = {{version}}.split(/\\s+/g);var majorAndMinor = temp[2];var revision = temp[3].match(/\\d+/);var version = majorAndMinor + \".\" + revision;return version;"}],nodes:[]},{name:"xmp.WindowsMediaPlayer",map:[],nodes:[]},{name:"xmp.WindowsMediaPlugInPlayer",map:[{key:"Mozilla Version Detection JSON",value:"return {{version}}.split(/\\s+/g)[3];"}],nodes:[]},{name:"xmp.QuickTimePlayer",map:[{key:"State Change Polling Interval",value:"200"},{key:"Connection Timeout Interval",value:"30000"},{key:"ActiveX Version Detection JSON",value:"var tempVersion = parseInt({{version}}, 10).toString( 16 );return ( tempVersion.substr(0, 1) + \".\" + tempVersion.substr(1, 1) + \".\" + tempVersion.substr(2, 1) + \".\" + tempVersion.substr(3) );"},{key:"Mozilla Version Detection JSON",value:"return {{version}}.split(/\\s+/g)[2];"},{key:"Flip4Mac Version Detection JSON",value:"return {{version}}.split(/\\s+/g)[4];"}],nodes:[]},{name:"xmp.ImagePlayer",map:[],nodes:[]}]},{name:"Native Player Groups",map:[],nodes:[{name:"WindowsIEPlayers",map:[],nodes:[{name:"001",map:[{key:"mime-type",value:"video/x-ms-wmv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.WindowsMediaPlayer"}],nodes:[]}]},{name:"002",map:[{key:"mime-type",value:"video/x-flv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.FlashPlayer"}],nodes:[]}]},{name:"003",map:[{key:"mime-type",value:"application/x-image"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.ImagePlayer"}],nodes:[]}]},{name:"004",map:[{key:"mime-type",value:"video/quicktime"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.QuickTimePlayer"}],nodes:[]}]}]},{name:"WindowsMozillaPlayers",map:[],nodes:[{name:"001",map:[{key:"mime-type",value:"video/x-ms-wmv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.WindowsMediaPlugInPlayer"}],nodes:[]}]},{name:"002",map:[{key:"mime-type",value:"video/x-flv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.FlashPlayer"}],nodes:[]}]},{name:"003",map:[{key:"mime-type",value:"application/x-image"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.ImagePlayer"}],nodes:[]}]},{name:"004",map:[{key:"mime-type",value:"video/quicktime"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.QuickTimePlayer"}],nodes:[]}]}]},{name:"MacPlayers",map:[],nodes:[{name:"001",map:[{key:"mime-type",value:"video/x-ms-wmv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.QuickTimePlayer"}],nodes:[]}]},{name:"002",map:[{key:"mime-type",value:"video/x-flv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.FlashPlayer"}],nodes:[]}]},{name:"003",map:[{key:"mime-type",value:"application/x-image"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.ImagePlayer"}],nodes:[]}]},{name:"004",map:[{key:"mime-type",value:"video/quicktime"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.QuickTimePlayer"}],nodes:[]}]}]},{name:"LinuxPlayers",map:[],nodes:[{name:"002",map:[{key:"mime-type",value:"video/x-flv"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.FlashPlayer"}],nodes:[]}]},{name:"003",map:[{key:"mime-type",value:"application/x-image"}],nodes:[{name:"Players",map:[{key:"001",value:"xmp.ImagePlayer"}],nodes:[]}]}]}]},{name:"Supported Platforms",map:[],nodes:[{name:"Windows",map:[{key:"Explorer",value:"WindowsIEPlayers"},{key:"Firefox",value:"WindowsMozillaPlayers"},{key:"Opera",value:"WindowsMozillaPlayers"},{key:"Netscape",value:"WindowsMozillaPlayers"},{key:"Safari",value:"WindowsMozillaPlayers"},{key:"SeaMonkey",value:"WindowsMozillaPlayers"}],nodes:[{name:"PlugIns Overrides",map:[],nodes:[{name:"QuickTime",map:[{key:"minimum-version",value:"7.1.5"}],nodes:[]}]}]},{name:"Mac",map:[{key:"Safari",value:"MacPlayers"},{key:"Firefox",value:"MacPlayers"},{key:"Netscape",value:"MacPlayers"},{key:"Camino",value:"MacPlayers"},{key:"SeaMonkey",value:"MacPlayers"},{key:"Opera",value:"MacPlayers"}],nodes:[{name:"PlugIns Overrides",map:[],nodes:[{name:"Octoshape",map:[{key:"download-url",value:"http://www.octoshape.com/plugin/mac.asp"}],nodes:[]}]}]},{name:"Linux",map:[{key:"Firefox",value:"LinuxPlayers"},{key:"Opera",value:"LinuxPlayers"},{key:"Netscape",value:"LinuxPlayers"},{key:"SeaMonkey",value:"LinuxPlayers"},{key:"Konqueror",value:"LinuxPlayers"}],nodes:[{name:"PlugIns Overrides",map:[],nodes:[{name:"Octoshape",map:[{key:"download-url",value:"http://www.octoshape.com/plugin/linux.asp"}],nodes:[]}]}]}]},{name:"MediaTypes",map:[],nodes:[{name:"Flash",map:[{key:"mime-type",value:"video/x-flv"}],nodes:[]},{name:"WindowsMedia",map:[{key:"mime-type",value:"video/x-ms-wmv"}],nodes:[]},{name:"QuickTime",map:[{key:"mime-type",value:"video/quicktime"}],nodes:[]},{name:"Image",map:[{key:"mime-type",value:"application/x-image"}],nodes:[]}]},{name:"Playback Priority Groups",map:[],nodes:[{name:"DefaultVODPlayback",map:[{key:"001",value:"WindowsMedia"},{key:"002",value:"Flash"},{key:"003",value:"QuickTime"}],nodes:[]},{name:"DefaultAdPlayback",map:[{key:"001",value:"Flash"},{key:"002",value:"WindowsMedia"},{key:"003",value:"QuickTime"}],nodes:[]},{name:"DefaultLivePlayback",map:[{key:"001",value:"WindowsMedia"},{key:"002",value:"Flash"}],nodes:[]},{name:"DefaultControlPlayback",map:[{key:"001",value:"WindowsMedia"}],nodes:[]}]},{name:"Playback Platforms",map:[],nodes:[{name:"Windows",map:[],nodes:[{name:"Explorer",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Firefox",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Opera",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Netscape",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Safari",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"SeaMonkey",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]}]},{name:"Mac",map:[],nodes:[{name:"Safari",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Opera",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Firefox",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Netscape",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Camino",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"SeaMonkey",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]}]},{name:"Linux",map:[],nodes:[{name:"Opera",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Firefox",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Netscape",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"SeaMonkey",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]},{name:"Konqueror",map:[{key:"ad",value:"DefaultAdPlayback"},{key:"vod",value:"DefaultVODPlayback"},{key:"live",value:"DefaultLivePlayback"},{key:"control",value:"DefaultControlPlayback"}],nodes:[]}]}]}]}]}]}]};