var APIModules={};APIModules.EXPERIENCE="experience";APIModules.CONTENT="content";APIModules.VIDEO_PLAYER="videoPlayer";APIModules.SOCIAL="social";APIModules.SEARCH="search";APIModules.CUE_POINTS="cuePoints";APIModules.ADVERTISING="advertising";APIModules.MENU="menu";APIModules.EFFECTS="effects";APIModules.CONVIVA="conviva";APIModules.CAPTIONS="captions";APIModules.AUTH="auth";APIModules.HTML5="_html5";if(brightcove==undefined){var brightcove={playerType:{FLASH:"flash",HTML:"html",INSTALLER:"installer",NO_SUPPORT:"nosupport"}};} brightcove.instances={};brightcove.modules={};brightcove.ID_DELIM="|||";var bcPlayer=brightcove;brightcove.getExperience=function(pExperience){if(this.instances[pExperience]==null){if(window.console){console.log("Experience '"+pExperience+"' not found. Please ensure the name is correct and the API for the player is enabled.");}} return this.instances[pExperience];};brightcove.getPlayer=brightcove.getExperience;brightcove.stringify=function(pObject){var type=typeof pObject;if(type=="function"||pObject==undefined){return"\"\"";}else if(type=="string"){return"\""+pObject.replace(/"/g,"\\\"")+"\"";}else if(pObject instanceof Array){var json="[";for(var i in pObject){if(typeof pObject[i]=="function"){json+=("\"\",");}else{json+=(this.stringify(pObject[i])+",");}} if(json.substr(-1)==","){json=json.substr(0,json.length-1);} return json+"]";}else if(type=="object"){var json="{";var i;var props=pObject.enumerableProperties;if(props){for(i in props){json+=("\""+props[i]+"\":"+this.stringify(pObject[props[i]])+",");}}else{for(i in pObject){if(typeof pObject[i]!="function"&&i!="__proto__"){json+=("\""+i+"\":"+this.stringify(pObject[i])+",");}}} if(json.substr(-1)==","){json=json.substr(0,json.length-1);} return json+"}";}else{return pObject;}} function setAPICallback(pID,pCallback,pURL){brightcove.instances[pID]=new BrightcoveExperience(pCallback,pID,pURL);} function BrightcoveExperience(pCallback,pID,pURL){if(pCallback==null){this.type=brightcove.playerType.HTML;this.playerURL=pURL;this.callback=brightcove.experiences[pID].contentWindow;}else{this.type=brightcove.playerType.FLASH;this.callback=pCallback;} this.modules={};} BrightcoveExperience.prototype.getModule=function(pModule){if(this.type==brightcove.playerType.HTML){pModule+=APIModules.HTML5;} if(this.modules[pModule]==null&&brightcove.modules[pModule]){var module=new brightcove.modules[pModule](this);module.playerURL=this.playerURL;if(module.isPlayerDefined!=null){if(!module.isPlayerDefined()){return null;}} this.modules[pModule]=module;} return this.modules[pModule];};function APIModule(){this.handlers=[];} APIModule.handlerCount=0;APIModule.getHandler=function(){return"bc_handler"+(APIModule.handlerCount++);};APIModule.callFlash=function(pCallback,pParams){var pCallbackArray=pCallback.split(brightcove.ID_DELIM);if(pCallbackArray.length<2)return;if(pCallbackArray[0].length<1)return;var pFlashId=pCallbackArray[0];var pCallback=pCallbackArray[1];var pExperience=document.getElementById(pFlashId);if(pExperience[pCallback]!=null){return pExperience[pCallback](BCXML.convertToXML(pParams,"js2flash"));}};APIModule.prototype.name="APIModule";APIModule.prototype.addEventListener=function(pEvent,pHandler,pPriority){var pNewHandler=APIModule.getHandler();this.handlers.push({handler:pHandler,bcHandler:pNewHandler,event:pEvent});window[pNewHandler]=pHandler;return this.callMethod("addEventListener",[pEvent,pNewHandler,pPriority]);};APIModule.prototype.removeEventListener=function(pEvent,pHandler){var pNum=this.handlers.length;for(var i=0;i";if(pType.name=="obj"){for(var i in pObj){pXML+=BCXML.convertToXML(pObj[i],i);}}else if(pType.name=="arr"){for(var j=0;j";return pXML;};BCXML.replaceEntities=function(pObj){pObj=pObj.replace(new RegExp("&","g"),"&");pObj=pObj.replace(new RegExp("<","g"),"<");pObj=pObj.replace(new RegExp(">","g"),">");return pObj;};BCXML.getType=function(pObj){switch(typeof(pObj)){case"boolean":return{name:"boo",type:Boolean};case"string":return{name:"str",type:String};case"number":return{name:"num",type:Number};default:if(pObj instanceof Array){return{name:"arr",type:Array};}else{return{name:"obj",type:Object};}}};BCAdvertisingEvent={} BCAdvertisingEvent.AD_COMPLETE="adComplete";BCAdvertisingEvent.AD_POSTROLLS_COMPLETE="adPostRollsComplete";BCAdvertisingEvent.AD_PAUSE="adPause";BCAdvertisingEvent.AD_PROGRESS="adProgress";BCAdvertisingEvent.AD_RESUME="adResume";BCAdvertisingEvent.AD_RECEIVED="adReceived";BCAdvertisingEvent.AD_START="adStart";BCAdvertisingEvent.AD_CLICK="adClick";BCAdvertisingEvent.EXTERNAL_AD="externalAd";BCAdvertisingEvent.AD_RULES_READY="adRulesReady";brightcove.modules[APIModules.ADVERTISING]=AdvertisingAPI;function AdvertisingAPI(pExperience){this.experience=pExperience;this.callback=pExperience.callback;this.name=APIModules.ADVERTISING;} var pttp=AdvertisingAPI.prototype=new APIModule();pttp.showAd=function(){return this.callMethod("showAd",arguments);};pttp.resumeAfterExternalAd=function(){return this.callMethod("resumeAfterExternalAd",arguments);};pttp.getEnabledAdFormats=function(){return this.callMethod("getEnabledAdFormats",arguments);};pttp.enableAdFormats=function(){return this.callMethod("enableAdFormats",arguments);};pttp.enableExternalAds=function(){return this.callMethod("enableExternalAds",arguments);};pttp.enableOverrideAds=function(){return this.callMethod("enableOverrideAds",arguments);};pttp.getExternalAdsEnabled=function(){return this.callMethod("getExternalAdsEnabled",arguments);};pttp.getOverrideAdsEnabled=function(){return this.callMethod("getOverrideAdsEnabled",arguments);};pttp.disableForExternalAd=function(){return this.callMethod("disableForExternalAd",arguments);};pttp.getCurrentAdProperties=function(){return this.callMethod("getCurrentAdProperties",arguments);};pttp.showSponsorMessage=function(){return this.callMethod("showSponsorMessage",arguments);};pttp.getShowSponsorMessage=function(){return this.callMethod("getShowSponsorMessage",arguments);};pttp.allowThirdPartyControl=function(){return this.callMethod("allowThirdPartyControl",arguments);};pttp.setThirdPartyTime=function(){return this.callMethod("setThirdPartyTime",arguments);};pttp.getThirdPartyTime=function(){return this.callMethod("getThirdPartyTime",arguments);};pttp.getAdPolicy=function(){return this.callMethod("getAdPolicy",arguments);};pttp.setAdPolicy=function(){return this.callMethod("setAdPolicy",arguments);};pttp.setAdRules=function(){return this.callMethod("setAdRules",arguments);};pttp.getCurrentAdRules=function(){return this.callMethod("getCurrentAdRules",arguments);};pttp.setAdTranslator=function(){return this.callMethod("setAdTranslator",arguments);};pttp.getCurrentAdTranslator=function(){return this.callMethod("getCurrentAdTranslator",arguments);};pttp.requestAd=function(){return this.callMethod("requestAd",arguments);};pttp.getStayInFullScreen=function(){return this.callMethod("getStayInFullScreen",arguments);};pttp.setStayInFullScreen=function(){return this.callMethod("setStayInFullScreen",arguments);};pttp.stopAd=function(){return this.callMethod("stopAd",arguments);};pttp.DEFAULT_AD_TRANSLATOR="defaultAdTranslator";BCAuthEvent={} BCAuthEvent.AUTH_NEEDED="authNeeded";brightcove.modules[APIModules.AUTH]=AuthAPI;BCAuthService={} BCAuthService.ADOBE_PASS="adobepass";BCAuthService.AIS="ais";function AuthAPI(pExperience){this.experience=pExperience;this.callback=pExperience.callback;this.name=APIModules.AUTH;} var pttp=AuthAPI.prototype=new APIModule();pttp.checkStatus=function(){return this.callMethod("checkStatus",arguments);};pttp.showMessage=function(){return this.callMethod("showMessage",arguments);};pttp.removeMessage=function(){return this.callMethod("removeMessage",arguments);};pttp.playWithToken=function(){return this.callMethod("playWithToken",arguments);};BCCaptionsEvent={} BCCaptionsEvent.DFXP_LOAD_SUCCESS="dfxpLoadSuccess";BCCaptionsEvent.DFXP_LOAD_ERROR="dfxpLoadError";brightcove.modules[APIModules.CAPTIONS]=CaptionsAPI;function CaptionsAPI(pExperience){this.experience=pExperience;this.callback=pExperience.callback;this.name=APIModules.CAPTIONS;} var pttp=CaptionsAPI.prototype=new APIModule();pttp.loadDFXP=function(){return this.callMethod("loadDFXP",arguments);};pttp.setLanguage=function(){return this.callMethod("setLanguage",arguments);};pttp.getLanguages=function(){return this.callMethod("getLanguages",arguments);};pttp.getStyleOptions=function(){return this.callMethod("getStyleOptions",arguments);};pttp.setStyleOptions=function(){return this.callMethod("setStyleOptions",arguments);};pttp.getCaptionsEnabled=function(){return this.callMethod("getCaptionsEnabled",arguments);};pttp.setCaptionsEnabled=function(){return this.callMethod("setCaptionsEnabled",arguments);};pttp.showOptions=function(){return this.callMethod("showOptions",arguments);};BCContentEvent={} BCContentEvent.VIDEO_LOAD="videoLoad";BCContentEvent.PLAYLIST_LOAD="playlistLoad";BCContentEvent.MEDIA_LOAD="mediaLoad";BCContentEvent.MEDIA_COLLECTION_LOAD="mediaCollectionLoad";brightcove.modules[APIModules.CONTENT]=ContentAPI;function ContentAPI(pExperience){this.experience=pExperience;if(pExperience){this.callback=pExperience.callback;} this.name=APIModules.CONTENT;} var pttp=ContentAPI.prototype=new APIModule();pttp.getAllMediaCollections=function(){return this.callMethod("getAllMediaCollections",arguments);};pttp.getAllMediaCollectionIDs=function(){return this.callMethod("getAllMediaCollectionIDs",arguments);};pttp.getAllPlaylists=function(){return this.callMethod("getAllPlaylists",arguments);};pttp.getAllPlaylistIDs=function(){return this.callMethod("getAllPlaylistIDs",arguments);};pttp.getMediaCollection=function(){return this.callMethod("getMediaCollection",arguments);};pttp.getMediaCollectionAsynch=function(){return this.callMethod("getMediaCollectionAsynch",arguments);};pttp.getPlaylist=function(){return this.callMethod("getPlaylist",arguments);};pttp.getPlaylistAsynch=function(){return this.callMethod("getPlaylistAsynch",arguments);};pttp.getMedia=function(){return this.callMethod("getMedia",arguments);};pttp.getMediaAsynch=function(){return this.callMethod("getMediaAsynch",arguments);};pttp.getVideo=function(){return this.callMethod("getVideo",arguments);};pttp.getVideoAsynch=function(){return this.callMethod("getVideoAsynch",arguments);};pttp.purgeAllContent=function(){return this.callMethod("purgeAllContent",arguments);};pttp.purgeMediaCollections=function(){return this.callMethod("purgeMediaCollections",arguments);};pttp.purgeMedia=function(){return this.callMethod("purgeMedia",arguments);};pttp.purgePlaylist=function(){return this.callMethod("purgePlaylist",arguments);};pttp.purgePlaylists=function(){return this.callMethod("purgePlaylists",arguments);};pttp.purgeVideo=function(){return this.callMethod("purgeVideo",arguments);};pttp.purgeVideos=function(){return this.callMethod("purgeVideos",arguments);};pttp.getMediaInGroupAsynch=function(){return this.callMethod("getMediaInGroupAsynch",arguments);};pttp.createRuntimeMediaCollection=function(){return this.callMethod("createRuntimeMediaCollection",arguments);};pttp.updateMedia=function(){return this.callMethod("updateMedia",arguments);};pttp.appendArgsToMediaRequest=function(){return this.callMethod("appendArgsToMediaRequest",arguments);};brightcove.modules[APIModules.CONVIVA]=ConvivaAPI;function ConvivaAPI(pExperience){this.experience=pExperience;this.callback=pExperience.callback;this.name=APIModules.CONVIVA;} var pttp=ConvivaAPI.prototype=new APIModule();pttp.sendEvent=function(){return this.callMethod("sendEvent",arguments);};BCCuePointEvent={} BCCuePointEvent.CUE="cuePoint";brightcove.modules[APIModules.CUE_POINTS]=CuePointsAPI;function CuePointsAPI(pExperience){this.experience=pExperience;this.callback=pExperience.callback;this.name=APIModules.CUE_POINTS;} var pttp=CuePointsAPI.prototype=new APIModule();pttp.addCuePoints=function(){return this.callMethod("addCuePoints",arguments);};pttp.clearCodeCuePoints=function(){return this.callMethod("clearCodeCuePoints",arguments);};pttp.removeCodeCuePointsAtTime=function(){return this.callMethod("removeCodeCuePointsAtTime",arguments);};pttp.getCuePoints=function(){return this.callMethod("getCuePoints",arguments);};pttp.clearAdCuePoints=function(){return this.callMethod("clearAdCuePoints",arguments);};pttp.removeAdCuePointsAtTime=function(){return this.callMethod("removeAdCuePointsAtTime",arguments);};BCEffectsEvent={};BCEffectsEvent.BEGIN="animationBegin";BCEffectsEvent.COMPLETE="animationComplete";BCEffectsEvent.CHANGE="animationChange";brightcove.modules[APIModules.EFFECTS]=EffectsAPI;function EffectsAPI(pExperience){this.experience=pExperience;this.callback=pExperience.callback;this.name=APIModules.EFFECTS;} EffectsAPI.animations={};var pttp=EffectsAPI.prototype=new APIModule();pttp.createAnimation=function(){var pID=this.callMethod("createAnimationJS",arguments);return this.getAnimation(pID);};pttp.getAnimation=function(){var pID=this.callMethod("getAnimationJS",arguments);if(pID){return this.getAnimationWrapper(pID);} return null;};pttp.getAnimationWrapper=function(pID){var pAnimation=EffectsAPI.animations[pID];if(pAnimation==undefined){pAnimation=new EffectsAPIAnimation(pID,this.callback);EffectsAPI.animations[pID]=pAnimation;} return pAnimation;};function EffectsAPIAnimation(pID,pCallback){this.id=pID;this.name=APIModules.EFFECTS;this.callback=pCallback;} pttp=EffectsAPIAnimation.prototype=new APIModule();pttp.id=-1;pttp.callMethod=function(pMethod,pArguments){if(pArguments==undefined)pArguments=[];var pArgs=[this.id];for(var i=0;i