var fluidPlayerScriptLocation=function(){var e,t,i="";return(i=document.currentScript?document.currentScript.src:(e=document.getElementsByTagName("script"),void 0!==(t=e[e.length-1]).getAttribute.length?t.src:t.getAttribute("src",-1)))?i.substring(0,i.lastIndexOf("/")+1):""}();"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1;nl.displayOptions.vastOptions.maxAllowedVastTagRedirects&&!l.inLineFound?l.stopProcessAndReportError(o):l.processVastXml(t,o,a)}else l.stopProcessAndReportError(o)}else l.stopProcessAndReportError(o)}else l.stopProcessAndReportError(o);else l.stopProcessAndReportError(o)}),n++}else l.stopProcessAndReportError(o)},stopProcessAndReportError:function(e){this.adList[e].error=!0,void 0!==e&&"preRoll"==this.adList[e].roll?this.playMainVideoWhenVastFails(900):this.announceLocalError(101)},playRoll:function(e){var t=this,i=document.getElementById(t.videoPlayerId);if(t.adPool.hasOwnProperty(e)){var n=t.adList[e].roll;switch(t.vastOptions=t.adPool[e],n){case"midRoll":i.mainVideoCurrentTime=i.currentTime-1;break;case"postRoll":i.mainVideoCurrentTime=0,t.autoplayAfterAd=!1,i.currentTime=t.mainVideoDuration}var o,a=function(){if(t.adFinished)i.removeEventListener("timeupdate",a);else{var e=Math.floor(i.currentTime);0!=t.vastOptions.duration&&t.scheduleTrackingEvent(e,t.vastOptions.duration),e>=t.vastOptions.duration-1&&0!=t.vastOptions.duration&&(i.removeEventListener("timeupdate",a),t.adFinished=!0)}};o=e,t.switchPlayerToVastMode=function(){if(t.vastOptions.duration||(t.vastOptions.duration=i.duration),(void 0!==t.adList[o].adClickable?t.adList[o].adClickable:t.displayOptions.vastOptions.adClickable)&&t.addClickthroughLayer(t.videoPlayerId),!1!==t.vastOptions.skipoffset&&t.addSkipButton(),i.loop=!1,t.addCTAButton(t.adList[o].landingPage),t.addAdCountdown(),i.removeAttribute("controls"),t.vastLogoBehaviour(!0),null!==document.getElementById(t.videoPlayerId+"_fluid_controls_progress_container")&&(document.getElementById(t.videoPlayerId+"_vast_control_currentprogress").style.backgroundColor=t.displayOptions.layoutControls.adProgressColor),t.displayOptions.vastOptions.adText||t.adList[o].adText){var e=null!==t.adList[o].adText?t.adList[o].adText:t.displayOptions.vastOptions.adText;t.addAdPlayingText(e)}t.positionTextElements(t.adList[o]),t.toggleLoader(!1),t.adList[o].played=!0,t.adFinished=!1,i.play(),t.trackSingleEvent("impression"),i.removeEventListener("loadedmetadata",t.switchPlayerToVastMode)},i.pause(),i.addEventListener("loadedmetadata",t.switchPlayerToVastMode),t.mainVideoCurrentTime=i.currentTime,t.detachStreamers(),i.src=t.vastOptions.mediaFile,t.isCurrentlyPlayingAd=!0,t.displayOptions.vastOptions.showProgressbarMarkers&&t.hideAdMarkers(),i.load(),i.addEventListener("ended",t.onVastAdEnded),i.addEventListener("timeupdate",a)}else t.announceLocalError(101)},scheduleTrackingEvent:function(e,t){var i=this;0==e&&i.trackSingleEvent("start"),void 0!==i.vastOptions.tracking.progress&&i.vastOptions.tracking.progress.length&&void 0!==i.vastOptions.tracking.progress[e]&&i.trackSingleEvent("progress",e),e==Math.floor(t/4)&&i.trackSingleEvent("firstQuartile"),e==Math.floor(t/2)&&i.trackSingleEvent("midpoint"),e==Math.floor(3*t/4)&&i.trackSingleEvent("thirdQuartile"),t-1<=e&&i.trackSingleEvent("complete")},trackSingleEvent:function(e,i){var n=this;if(void 0!==n.vastOptions&&null!==n.vastOptions){var o=[];switch(o.length=0,e){case"start":case"firstQuartile":case"midpoint":case"thirdQuartile":case"complete":!1===n.vastOptions.stopTracking[e]&&(null!==n.vastOptions.tracking[e]&&(o=n.vastOptions.tracking[e]),n.vastOptions.stopTracking[e]=!0);break;case"progress":n.vastOptions.tracking.progress[i].elements.forEach(function(e,t){!1===n.vastOptions.tracking.progress[i].stopTracking&&n.vastOptions.tracking.progress[i].elements.length&&(o=n.vastOptions.tracking.progress[i].elements),n.vastOptions.tracking.progress[i].stopTracking=!0});break;case"impression":void 0!==n.vastOptions.impression&&null!==n.vastOptions.impression&&"unknown"!=typeof n.vastOptions.impression.length&&(o=n.vastOptions.impression)}n.callUris(o)}},completeNonLinearStatic:function(e){var t=this;t.closeNonLinear(e),0==t.adFinished&&(t.adFinished=!0,t.trackSingleEvent("complete")),clearInterval(t.nonLinearTracking)},createNonLinearStatic:function(e){var t=this,i=document.getElementById(t.videoPlayerId);if(t.adPool.hasOwnProperty(e)&&!0!==t.adPool[e].error){t.vastOptions=t.adPool[e],t.createBoard(e),t.adFinished=!1,t.trackSingleEvent("start");var n=t.adList[e].nonLinearDuration?t.adList[e].nonLinearDuration:t.vastOptions.duration;t.nonLinearTracking=setInterval(function(){if(!0!==t.adFinished){var e=Math.floor(i.currentTime);t.scheduleTrackingEvent(e,n),n-1<=e&&(t.adFinished=!0)}},400),time=parseInt(t.getCurrentTime())+parseInt(n),t.scheduleTask({time:time,closeStaticAd:e})}else t.announceLocalError(101)},createBoard:function(e){var t=this,i=t.adPool[e];if(void 0!==i.staticResource&&-1!==t.supportedStaticTypes.indexOf(i.creativeType)){t.adList[e].played=!0;var n=document.getElementById(t.videoPlayerId),o=n.clientWidth,a=(n.clientHeight,document.createElement("div")),l=t.adList[e].vAlign?t.adList[e].vAlign:t.nonLinearVerticalAlign,r=new Image;r.src=i.staticResource,r.id="fluid_nonLinear_imgCreative_"+e+"_"+t.videoPlayerId,r.onload=function(){void 0!==t.adList[e].size?(origWidth=t.adList[e].size.split("x")[0],origHeight=t.adList[e].size.split("x")[1]):i.dimension.width&&i.dimension.height?(origWidth=i.dimension.width,origHeight=i.dimension.height):(origWidth=r.width,origHeight=r.height),origWidth>o?(newBannerWidth=o-5,newBannerHeight=origHeight*newBannerWidth/origWidth):(newBannerWidth=origWidth,newBannerHeight=origHeight),img=document.getElementById(r.id),img.width=newBannerWidth,img.height=newBannerHeight,t.trackSingleEvent("impression")},a.id="fluid_nonLinear_"+e,a.className="fluid_nonLinear_"+l,a.innerHTML=r.outerHTML,a.onclick=function(){void 0!==i.clickthroughUrl&&window.open(i.clickthroughUrl),void 0!==i.clicktracking&&t.callUris([i.clicktracking])},void 0!==i.clickthroughUrl&&(a.style.cursor="pointer");var s=document.createElement("div");s.id="close_button_"+t.videoPlayerId,s.className="close_button",s.innerHTML="",s.title=t.displayOptions.layoutControls.closeButtonCaption,s.onclick=function(e){return this.parentElement.remove(t),void 0!==e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.adFinished=!0,clearInterval(t.nonLinearTracking),!1},a.appendChild(s),n.parentNode.insertBefore(a,n.nextSibling)}else t.adList[e].error=!0},closeNonLinear:function(e){var t=document.getElementById("fluid_nonLinear_"+e);t&&t.remove()},preRoll:function(e){var t=fluidPlayerClass.getInstanceById(this.id);document.getElementById(this.getAttribute("id")).removeEventListener(e.type,t.preRoll),t.firstPlayLaunched=!0;var i=e.type.replace("adId_","");!0!==t.adList[i].played&&("linear"==t.adList[i].adType&&(t.toggleLoader(!0),t.playRoll(i)),"nonLinear"==t.adList[i].adType&&(t.switchToMainVideo(),t.createNonLinearStatic(i)))},createAdMarker:function(e,t){var i=document.getElementById(this.videoPlayerId+"_ad_markers_holder"),n=document.createElement("div");n.id="ad_marker_"+this.videoPlayerId+"_"+e,n.className="fluid_controls_ad_marker",n.style.left=t/this.mainVideoDuration*100+"%",this.isCurrentlyPlayingAd&&(n.style.display="none"),i.appendChild(n)},hideAdMarker:function(e){var t=document.getElementById("ad_marker_"+this.videoPlayerId+"_"+e);t&&(t.style.display="none")},showAdMarkers:function(){for(var e=document.getElementById(this.videoPlayerId+"_ad_markers_holder").getElementsByClassName("fluid_controls_ad_marker"),t="ad_marker_"+this.videoPlayerId+"_",i=0;i=Math.floor(e.mainVideoDuration)&&clearInterval(e.timer),!0!==e.displayOptions.layoutControls.loop))){var t=fluidPlayerClass.getInstanceIdByWrapperId(this.getAttribute("id"));fluidPlayerClass.getInstanceById(t);e.switchToMainVideo(),e.playPauseToggle(this)}},getCurrentTime:function(){return this.isCurrentlyPlayingAd?this.mainVideoCurrentTime:document.getElementById(this.videoPlayerId).currentTime},addSkipButton:function(){var e=document.getElementById(this.videoPlayerId),t=document.createElement("div");t.id="skip_button_"+this.videoPlayerId,t.className="skip_button skip_button_disabled",t.innerHTML=this.displayOptions.vastOptions.skipButtonCaption.replace("[seconds]",this.vastOptions.skipoffset),document.getElementById("fluid_video_wrapper_"+this.videoPlayerId).appendChild(t),e.addEventListener("timeupdate",this.decreaseSkipOffset,!1)},addAdCountdown:function(){var e=document.getElementById(this.videoPlayerId),t=document.getElementById("fluid_video_wrapper_"+this.videoPlayerId),i=document.createElement("div"),n=this.pad(parseInt(this.currentVideoDuration/60))+":"+this.pad(parseInt(this.currentVideoDuration%60)),o=parseInt(n);i.id="ad_countdown"+this.videoPlayerId,i.className="ad_countdown",i.innerHTML="Ad - "+o,t.appendChild(i),e.addEventListener("timeupdate",this.decreaseAdCountdown,!1),t.addEventListener("mouseover",function(){i.style.display="none"},!1)},decreaseAdCountdown:function(){var e=fluidPlayerClass.getInstanceById(this.id),t=parseInt(e.currentVideoDuration)-parseInt(this.currentTime),i=document.getElementById("ad_countdown"+e.videoPlayerId);i?i.innerHTML="Ad - "+e.pad(parseInt(t/60))+":"+e.pad(parseInt(t%60)):this.removeEventListener("timeupdate",e.decreaseAdCountdown)},removeAdCountdown:function(){var e=document.getElementById("ad_countdown"+this.videoPlayerId);e&&e.parentElement.removeChild(e)},toggleAdCountdown:function(e){var t=document.getElementById("ad_countdown"+this.videoPlayerId);t&&(t.style.display=e?"inline-block":"none")},addAdPlayingText:function(e){var t=document.createElement("div");t.id=this.videoPlayerId+"_fluid_ad_playing",this.displayOptions.layoutControls.primaryColor&&(t.style.backgroundColor=this.displayOptions.layoutControls.primaryColor,t.style.opacity=1),t.className="fluid_ad_playing",t.innerText=e,document.getElementById("fluid_video_wrapper_"+this.videoPlayerId).appendChild(t)},positionTextElements:function(e){var t=this,i=["top left","top right","bottom left","bottom right"],n=document.getElementById("skip_button_"+t.videoPlayerId),o=document.getElementById(t.videoPlayerId+"_fluid_ad_playing"),a=document.getElementById(t.videoPlayerId+"_fluid_cta"),l=0,r=0,s=!1,d=0,u=[],c={top:{left:{h:34,v:34},right:{h:0,v:34}},bottom:{left:{h:34,v:50},right:{h:0,v:50}}};null!==n&&(d=n.offsetHeight+8,document.getElementById("fluid_video_wrapper_"+t.videoPlayerId).classList.contains("mobile")&&(c.bottom.left.v=75,c.bottom.right.v=75));if(null!==a){var y=t.displayOptions.vastOptions.adCTATextPosition.toLowerCase();-1==i.indexOf(y)&&(console.log('[FP Error] Invalid position for CTAText. Reverting to "bottom right"'),y="bottom right"),s="bottom"==(u=y.split(" "))[0],a.style[u[0]]=c[u[0]][u[1]].v+"px",a.style[u[1]]=c[u[0]][u[1]].h+"px",s&&"right"==u[1]&&(a.style[u[0]]=c[u[0]][u[1]].v+d+"px"),l=a.offsetHeight+8+"px"}if(null!==o){var p=null!==e.adTextPosition?e.adTextPosition.toLowerCase():this.displayOptions.vastOptions.adTextPosition.toLowerCase();-1==i.indexOf(p)&&(console.log('[FP Error] Invalid position for adText. Reverting to "top left"'),p="top left");var m=p.split(" ");o.style[m[0]]=c[m[0]][m[1]].v+"px",o.style[m[1]]=c[m[0]][m[1]].h+"px",r=o.offsetHeight+8+"px"}0'+e+"",n.addEventListener("click",function(){return i.paused||i.pause(),window.open(t.vastOptions.clickthroughUrl,"_blank").focus(),!0},!1),n.appendChild(o),document.getElementById("fluid_video_wrapper_"+this.videoPlayerId).appendChild(n)}},removeCTAButton:function(){var e=document.getElementById(this.videoPlayerId+"_fluid_cta");e&&e.parentElement.removeChild(e)},decreaseSkipOffset:function(){var e=this,t=fluidPlayerClass.getInstanceById(e.id),i=t.vastOptions.skipoffset-Math.floor(e.currentTime),n=document.getElementById("skip_button_"+t.videoPlayerId);n?1<=i?n.innerHTML=t.displayOptions.vastOptions.skipButtonCaption.replace("[seconds]",i):(n.innerHTML='"+t.displayOptions.vastOptions.skipButtonClickCaption+"",n.className=n.className.replace(/\bskip_button_disabled\b/,""),e.removeEventListener("timeupdate",t.decreaseSkipOffset)):(i=0,e.removeEventListener("timeupdate",e.decreaseSkipOffset))},pressSkipButton:function(){this.removeSkipButton(),this.removeAdPlayingText(),this.removeCTAButton(),this.displayOptions.vastOptions.vastAdvanced.vastVideoSkippedCallback();var e=document.createEvent("Event");e.initEvent("ended",!1,!0),document.getElementById(this.videoPlayerId).dispatchEvent(e)},removeSkipButton:function(){btn=document.getElementById("skip_button_"+this.videoPlayerId),btn&&btn.parentElement.removeChild(btn)},addClickthroughLayer:function(){var e=this,t=document.getElementById(e.videoPlayerId),i=document.getElementById("fluid_video_wrapper_"+e.videoPlayerId),n=document.createElement("div");n.className="vast_clickthrough_layer",n.id="vast_clickthrough_layer_"+e.videoPlayerId,n.setAttribute("style","position: absolute; cursor: pointer; top: 0; left: 0; width: "+t.offsetWidth+"px; height: "+t.offsetHeight+"px;"),i.appendChild(n);function o(){window.open(e.vastOptions.clickthroughUrl),void 0!==e.vastOptions.clicktracking&&e.callUris(e.vastOptions.clicktracking)}var a=document.getElementById("vast_clickthrough_layer_"+e.videoPlayerId),l="iPhone"===e.mobileInfo.device&&!1!==e.mobileInfo.userOsMajor&&e.mobileInfo.userOsMajor<=9;a.onclick=function(){t.paused?l&&!e.suppressClickthrough?(o(),e.suppressClickthrough=!0):t.play():(o(),t.pause())}},removeClickthrough:function(){var e=document.getElementById("vast_clickthrough_layer_"+this.videoPlayerId);e&&e.parentNode.removeChild(e)},getCurrentSrc:function(){var e=document.getElementById(this.videoPlayerId).getElementsByTagName("source");return e.length?e[0].getAttribute("src"):null},getCurrentSrcType:function(){var e=document.getElementById(this.videoPlayerId).getElementsByTagName("source");if(e.length)for(var t=0;t
00:00 / 00:00
'},controlPlayPauseToggle:function(e){var t=document.getElementById(e+"_fluid_control_playpause"),i=document.getElementById(e+"context_option_play"),n=fluidPlayerClass.getInstanceById(e),o=document.getElementById(n.videoPlayerId+"_fluid_controls_container"),a=document.getElementById(n.videoPlayerId+"_logo"),l=document.getElementById(n.videoPlayerId);document.getElementById(e+"_fluid_initial_play")&&(document.getElementById(e+"_fluid_initial_play").style.display="none",document.getElementById(e+"_fluid_initial_play_button").style.opacity="1"),l.paused?(t.className=t.className.replace(/\bfluid_button_pause\b/g,"fluid_button_play"),o.classList.add("initial_controls_show"),this.isCurrentlyPlayingAd&&n.displayOptions.vastOptions.showPlayButton&&(document.getElementById(e+"_fluid_initial_play").style.display="block",document.getElementById(e+"_fluid_initial_play_button").style.opacity="1"),a&&a.classList.add("initial_controls_show"),null!==i&&(i.innerHTML=this.displayOptions.captions.play)):(t.className=t.className.replace(/\bfluid_button_play\b/g,"fluid_button_pause"),o.classList.remove("initial_controls_show"),a&&a.classList.remove("initial_controls_show"),null!==i&&(i.innerHTML=this.displayOptions.captions.pause))},playPauseAnimationToggle:function(e){if(!this.isCurrentlyPlayingAd&&this.displayOptions.layoutControls.playPauseAnimation&&!this.isSwitchingSource){videoPlayerId=this.videoPlayerId,e?(document.getElementById(videoPlayerId+"_fluid_state_button").classList.remove("fluid_initial_pause_button"),document.getElementById(videoPlayerId+"_fluid_state_button").classList.add("fluid_initial_play_button")):(document.getElementById(videoPlayerId+"_fluid_state_button").classList.remove("fluid_initial_play_button"),document.getElementById(videoPlayerId+"_fluid_state_button").classList.add("fluid_initial_pause_button")),document.getElementById(videoPlayerId+"_fluid_initial_play").classList.add("transform-active");var t=videoPlayerId;setTimeout(function(){document.getElementById(t+"_fluid_initial_play").classList.remove("transform-active")},800)}},contolProgressbarUpdate:function(e){var t=fluidPlayerClass.getInstanceById(e),i=document.getElementById(e);document.getElementById(e+"_vast_control_currentprogress").style.width=i.currentTime/t.currentVideoDuration*100+"%"},formatTime:function(e){var t=new Date(1e3*e),i=this.pad(t.getUTCHours()),n=this.pad(t.getUTCMinutes()),o=this.pad(t.getSeconds());if(1<=i)var a=i+":"+n+":"+o;else a=n+":"+o;return a},contolDurationUpdate:function(e){var t=fluidPlayerClass.getInstanceById(e),i=document.getElementById(e),n=t.formatTime(i.currentTime)+" / "+t.formatTime(t.currentVideoDuration);document.getElementById(e+"_fluid_control_duration").innerHTML=n},pad:function(e){return e<10?"0"+e:e},contolVolumebarUpdate:function(e){var t=fluidPlayerClass.getInstanceById(e),i=document.getElementById(e),n=document.getElementById(e+"_fluid_control_currentvolume"),o=document.getElementById(e+"_fluid_control_volume_currentpos"),a=document.getElementById(e+"_fluid_control_volume").clientWidth,l=o.clientWidth,r=document.getElementById(e+"_fluid_control_mute"),s=document.getElementById(e+"context_option_mute");i.volume&&(t.latestVolume=i.volume,t.fluidStorage.fluidMute=!1),i.volume&&!i.muted?(r.className=r.className.replace(/\bfluid_button_mute\b/g,"fluid_button_volume"),null!==s&&(s.innerHTML=this.displayOptions.captions.mute)):(r.className=r.className.replace(/\bfluid_button_volume\b/g,"fluid_button_mute"),null!==s&&(s.innerHTML=this.displayOptions.captions.unmute)),n.style.width=i.volume*a+"px",o.style.left=i.volume*a-l/2+"px"},muteToggle:function(e){var t=fluidPlayerClass.getInstanceById(e),i=document.getElementById(e);i.volume&&!i.muted?(i.volume=0,i.muted=!0):(i.volume=t.latestVolume,i.muted=!1),this.fluidStorage.fluidVolume=t.latestVolume,this.fluidStorage.fluidMute=i.muted},checkFullscreenSupport:function(e){var t=document.getElementById(e),i=document.getElementById(this.videoPlayerId);return t.mozRequestFullScreen?{goFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen",isFullscreen:"mozFullScreenElement"}:t.webkitRequestFullscreen?{goFullscreen:"webkitRequestFullscreen",exitFullscreen:"webkitExitFullscreen",isFullscreen:"webkitFullscreenElement"}:t.msRequestFullscreen?{goFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen",isFullscreen:"msFullscreenElement"}:t.requestFullscreen?{goFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",isFullscreen:"fullscreenElement"}:!!i.webkitSupportsFullscreen&&{goFullscreen:"webkitEnterFullscreen",exitFullscreen:"webkitExitFullscreen",isFullscreen:"webkitDisplayingFullscreen"}},fullscreenOff:function(e,t){e.className=e.className.replace(/\bfluid_button_fullscreen_exit\b/g,"fluid_button_fullscreen"),null!==t&&(t.innerHTML="Fullscreen"),this.fullscreenMode=!1},fullscreenOn:function(e,t){e.className=e.className.replace(/\bfluid_button_fullscreen\b/g,"fluid_button_fullscreen_exit"),null!==t&&(t.innerHTML=this.displayOptions.captions.exitFullscreen),this.fullscreenMode=!0},fullscreenToggle:function(){fluidPlayerClass.activeVideoPlayerId=this.videoPlayerId;var e=document.getElementById("fluid_video_wrapper_"+this.videoPlayerId),t=this.checkFullscreenSupport("fluid_video_wrapper_"+this.videoPlayerId),i=document.getElementById(this.videoPlayerId+"_fluid_control_fullscreen"),n=document.getElementById(this.videoPlayerId+"context_option_fullscreen"),o=document.getElementById(this.videoPlayerId);if(this.theatreMode&&this.theatreToggle(),t)switch(t.goFullscreen){case"webkitEnterFullscreen":o[t.isFullscreen]||(functionNameToExecute="videoPlayerTag."+t.goFullscreen+"();",this.fullscreenOn(i,n),new Function("videoPlayerTag",functionNameToExecute)(o));break;default:null===document[t.isFullscreen]?(functionNameToExecute="videoPlayerTag."+t.goFullscreen+"();",this.fullscreenOn(i,n)):(functionNameToExecute="document."+t.exitFullscreen+"();",this.fullscreenOff(i,n)),new Function("videoPlayerTag",functionNameToExecute)(e)}else-1!==e.className.search(/\bpseudo_fullscreen\b/g)?(e.className=e.className.replace(/\bpseudo_fullscreen\b/g,""),this.fullscreenOff(i,n)):(e.className+=" pseudo_fullscreen",this.fullscreenOn(i,n))},findClosestParent:function(e,t){var i,n;if(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(e){return"function"==typeof document.body[e]&&(i=e,!0)}),e[i](t))return e;for(;e;){if((n=e.parentElement)&&n[i](t))return n;e=n}return null},getTranslateX:function(e){var t=null;try{var i=e.style.transform.match(/translate3d\((-?\d+px,\s?){2}-?\d+px\)/);i&&i.length&&(t=i[0].replace("translate3d(","").replace(")","").replace(/\s/g,"").replace(/px/g,"").split(","))}catch(e){t=null}return t&&3===t.length?parseInt(t[0]):0},getEventOffsetX:function(e,t){for(var i=0,n=0;t&&!isNaN(t.offsetLeft);)n=fluidPlayerClass.getTranslateX(t),"BODY"===t.tagName?i+=t.offsetLeft+t.clientLeft+n-(t.scrollLeft||document.documentElement.scrollLeft):i+=t.offsetLeft+t.clientLeft+n-t.scrollLeft,t=t.offsetParent;return(void 0!==e.touches&&void 0!==e.touches[0]?e.touches[0].clientX:e.clientX)-i},getEventOffsetY:function(e,t){var i=1,n=fluidPlayerClass.findClosestParent(t,'div[id^="fluid_video_wrapper_"]');if(n){var o=n.id.replace("fluid_video_wrapper_",""),a=fluidPlayerClass.checkFullscreenSupport("fluid_video_wrapper_"+o);a&&document[a.isFullscreen]&&(i=0)}for(var l=0;t&&!isNaN(t.offsetTop);)"BODY"===t.tagName?l+=t.offsetTop-(t.scrollTop||document.documentElement.scrollTop)*i:l+=t.offsetTop-t.scrollTop*i,t=t.offsetParent;return e.clientY-l},onProgressbarMouseDown:function(i,e){var n=fluidPlayerClass.getInstanceById(i);n.displayOptions.layoutControls.playPauseAnimation=!1;var o=fluidPlayerClass.getEventOffsetX(e,document.getElementById(i+"_fluid_controls_progress_container"));if(!n.isCurrentlyPlayingAd){n.fluidPseudoPause=!0;var a=document.getElementById(i),l=a.paused;l||a.pause(),document.addEventListener("mouseup",d),document.addEventListener("touchend",d),document.addEventListener("mousemove",s),document.addEventListener("touchmove",s)}function r(e,t){var i=document.getElementById(e+"_fluid_controls_progress_container").clientWidth;i&&(a.currentTime=n.currentVideoDuration*t/i)}function s(e){var t=fluidPlayerClass.getEventOffsetX(e,document.getElementById(i+"_fluid_controls_progress_container"));o=NaN,r(i,t),n.contolProgressbarUpdate(n.videoPlayerId),n.contolDurationUpdate(n.videoPlayerId)}function d(e){document.removeEventListener("mousemove",s),document.removeEventListener("touchmove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchend",d);var t=fluidPlayerClass.getEventOffsetX(e,document.getElementById(i+"_fluid_controls_progress_container"));isNaN(t)&&!isNaN(o)&&(t=o),isNaN(t)||r(i,t),l||n.play(),n.initialAnimationSet&&setTimeout(function(){n.displayOptions.layoutControls.playPauseAnimation=n.initialAnimationSet},200),n.fluidPseudoPause=!1}},onVolumebarMouseDown:function(i){function n(e,t){var i=document.getElementById(e),n=document.getElementById(e+"_fluid_control_volume_container").clientWidth,o=fluidPlayerClass.getInstanceById(e);if(n){var a=t/n;a<.05?(a=0,i.muted=!0):.95
  • '+this.displayOptions.captions.play+'
  • '+this.displayOptions.captions.mute+'
  • '+this.displayOptions.captions.fullscreen+'
  • Fluid Player '+e.version+"
  • ",t.parentNode.insertBefore(n,t.nextSibling),i.addEventListener("contextmenu",function(e){e.preventDefault(),n.style.left=fluidPlayerClass.getEventOffsetX(e,t)+"px",n.style.top=fluidPlayerClass.getEventOffsetY(e,t)+"px",n.style.display="block"},!1),document.addEventListener("click",function(e){e.target===t&&2===e.button||(n.style.display="none")},!1);var o=document.getElementById(e.videoPlayerId+"context_option_play"),a=document.getElementById(e.videoPlayerId+"context_option_mute"),l=document.getElementById(e.videoPlayerId+"context_option_fullscreen"),r=document.getElementById(e.videoPlayerId+"context_option_homepage");o.addEventListener("click",function(){e.playPauseToggle(t)},!1),a.addEventListener("click",function(){e.muteToggle(e.videoPlayerId)},!1),l.addEventListener("click",function(){e.fullscreenToggle()},!1),r.addEventListener("click",function(){window.open(e.homepage,"_blank").focus()},!1)},setDefaultLayout:function(){var e=this,t=document.getElementById(e.videoPlayerId);document.getElementById("fluid_video_wrapper_"+e.videoPlayerId).className+=" fluid_player_layout_"+e.displayOptions.layoutControls.layout,t.removeAttribute("controls"),e.setCustomContextMenu();var i="";e.checkShouldDisplayVolumeBar()||(i=" no_volume_bar");var n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_controls_container",n.className="fluid_controls_container"+i,n.innerHTML=e.generateCustomControlTags(),t.parentNode.insertBefore(n,t.nextSibling);var o=document.createElement("div");o.className="vast_video_loading",o.id="vast_video_loading_"+e.videoPlayerId,o.style.display="none",backgroundColor=e.displayOptions.layoutControls.primaryColor?e.displayOptions.layoutControls.primaryColor:"white",document.getElementById(e.videoPlayerId+"_vast_control_currentprogress").style.backgroundColor=backgroundColor,t.parentNode.insertBefore(o,t.nextSibling);var a=100,l=setInterval(function(){a?e.checkIfVolumebarIsRendered()?(clearInterval(l),e.contolVolumebarUpdate(e.videoPlayerId)):a--:clearInterval(l)},100);e.initHtmlOnPauseBlock(),e.setCustomControls(),e.setupThumbnailPreview(),e.createTimePositionPreview(),e.posterImage(),e.initPlayButton(),e.setVideoPreload(),e.createPlaybackList(),e.createDownload()},checkIfVolumebarIsRendered:function(){var e=document.getElementById(this.videoPlayerId+"_fluid_control_volume_currentpos"),t=document.getElementById(this.videoPlayerId+"_fluid_control_volume").clientWidth;return e.clientWidth!==t},setLayout:function(){var e=this,t=document.getElementById(e.videoPlayerId),i=fluidPlayerClass.isTouchDevice()?"touchend":"click";document.getElementById(this.videoPlayerId).addEventListener(i,function(){e.playPauseToggle(t)},!1),t.addEventListener("play",e.initialPlay,!1),this.setDefaultLayout()},handleFullscreen:function(){var t=this;void 0===document.vastFullsreenChangeEventListenersAdded&&(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(function(e){"object"==typeof document["on"+e]&&document.addEventListener(e,function(e){t.recalculateAdDimensions(fluidPlayerClass.activeVideoPlayerId)},!1)}),document.vastFullsreenChangeEventListenersAdded=!0)},setupThumbnailPreviewVtt:function(){var d=this;d.sendRequest(d.displayOptions.layoutControls.timelinePreview.file,!0,d.displayOptions.vastOptions.vastTimeout,function(){var e=this;if((4!==e.readyState||200===e.status)&&4===e.readyState&&200===e.status){var t=e.responseText,i=(new WebVTTParser).parse(t);d.timelinePreviewData=function(e){if(void 0===e.cues||!e.cues.length)return[];for(var t=[],i=null,n=null,o=0;o=t.timelinePreviewData[i].startTime&&e<=t.timelinePreviewData[i].endTime)return t.timelinePreviewData[i];return!1},drawTimelinePreview:function(e){var t=this,i=document.getElementById(t.videoPlayerId+"_fluid_timeline_preview_container"),n=document.getElementById(t.videoPlayerId+"_fluid_timeline_preview_container_shadow"),o=document.getElementById(t.videoPlayerId+"_fluid_controls_progress_container"),a=o.clientWidth;if(t.isCurrentlyPlayingAd)"none"!==i.style.display&&(i.style.display="none");else{var l=fluidPlayerClass.getEventOffsetX(e,o),r=null;if(a){r=t.currentVideoDuration*l/a;var s=t.getThumbnailCoordinates(r);n.style.width=a+"px",!(n.style.display="block")!==s?(i.style.width=s.w+"px",i.style.height=s.h+"px",n.style.height=s.h+"px",i.style.background="url("+s.image+") no-repeat scroll -"+s.x+"px -"+s.y+"px",i.style.left=l-s.w/2+"px",i.style.display="block",t.displayOptions.layoutControls.timelinePreview.spriteImage||(i.style.backgroundSize="contain")):i.style.display="none"}}},setupThumbnailPreview:function(){var i=this;if(i.displayOptions.layoutControls.timelinePreview&&"string"==typeof i.displayOptions.layoutControls.timelinePreview.file&&"string"==typeof i.displayOptions.layoutControls.timelinePreview.type){switch(i.displayOptions.layoutControls.timelinePreview.type){case"VTT":fluidPlayerClass.requestScript(fluidPlayerScriptLocation+fluidPlayerClass.vttParserScript,i.setupThumbnailPreviewVtt.bind(this));var e="mousemove",t="mouseleave";i.mobileInfo.userOs&&(e="touchmove",t="touchend"),document.getElementById(i.videoPlayerId+"_fluid_controls_progress_container").addEventListener(e,i.drawTimelinePreview.bind(i),!1),document.getElementById(i.videoPlayerId+"_fluid_controls_progress_container").addEventListener(t,function(e){var t=document.getElementById(i.videoPlayerId+"_fluid_controls_progress_container");void 0!==e.clientX&&t.contains(document.elementFromPoint(e.clientX,e.clientY))||(document.getElementById(i.videoPlayerId+"_fluid_timeline_preview_container").style.display="none",document.getElementById(i.videoPlayerId+"_fluid_timeline_preview_container_shadow").style.display="none")},!1),i.generateTimelinePreviewTags()}i.showTimeOnHover=!1}},setupPlayerWrapper:function(){var e=document.getElementById(this.videoPlayerId),t=document.createElement("div");t.className=fluidPlayerClass.isTouchDevice()?"fluid_video_wrapper mobile":"fluid_video_wrapper",t.id="fluid_video_wrapper_"+this.videoPlayerId,this.displayOptions.layoutControls.fillToContainer?(t.style.width="100%",t.style.height="100%"):(t.style.height=e.clientHeight+"px",t.style.width=e.clientWidth+"px"),e.style.height="100%",e.style.width="100%",e.parentNode.insertBefore(t,e),t.appendChild(e)},onErrorDetection:function(){var e=fluidPlayerClass.getInstanceById(this.id);this.networkState===this.NETWORK_NO_SOURCE&&e.isCurrentlyPlayingAd&&e.playMainVideoWhenVastFails(401)},createVideoSourceSwitch:function(){var a=this,l=document.getElementById(a.videoPlayerId),t=[],e=l.querySelectorAll("source");if([].forEach.call(e,function(e){e.title&&e.src&&t.push({title:e.title,url:e.src,isHD:null!=e.getAttribute("data-fluid-hd")})}),a.videoSources=t,1':"";d=!1;var o=document.createElement("div");o.id="source_"+a.videoPlayerId+"_"+e.title,o.className="fluid_video_source_list_item",o.innerHTML=''+e.title+n,o.addEventListener("click",function(e){l.style.width=l.clientWidth+"px",l.style.height=l.clientHeight+"px",e.stopPropagation();for(var t=this,i=document.getElementsByClassName("source_button_icon"),n=0;n
    ';var n=function(){e.playPauseToggle(t),i.removeEventListener("click",n)};i.addEventListener("click",n),e.displayOptions.layoutControls.playButtonShowing||(document.getElementById(e.videoPlayerId+"_fluid_controls_container").classList.add("initial_controls_show"),i.style.opacity="0");t.parentNode.insertBefore(i,null)},mainVideoReady:function(){var e=fluidPlayerClass.getInstanceById(this.id);if(0==e.mainVideoDuration&&!e.isCurrentlyPlayingAd&&!1===e.mainVideoReadyState){e.mainVideoDuration=this.duration,e.mainVideoReadyState=!0;var t=new CustomEvent("mainVideoDurationSet");this.dispatchEvent(t),this.removeEventListener("loadedmetadata",e.mainVideoReady)}},userActivityChecker:function(){var t=this,e=document.getElementById("fluid_video_wrapper_"+t.videoPlayerId),i=document.getElementById(t.videoPlayerId);t.newActivity=null;function n(e){"touchstart"!==e.type&&"mousedown"!==e.type||(o=!0),"touchend"!==e.type&&"mouseup"!==e.type||(o=!1),t.newActivity=!0}var o=!1;activityCheck=setInterval(function(){if(!0===t.newActivity){if(o||t.isLoading||(t.newActivity=!1),!1===t.isUserActive||!t.isControlBarVisible()){var e=new CustomEvent("userActive");i.dispatchEvent(e),t.isUserActive=!0}clearTimeout(t.inactivityTimeout),t.inactivityTimeout=setTimeout(function(){!0!==t.newActivity?(t.isUserActive=!1,e=new CustomEvent("userInactive"),i.dispatchEvent(e)):clearTimeout(t.inactivityTimeout)},1e3*t.displayOptions.layoutControls.controlBar.autoHideTimeout)}},300);for(var a=fluidPlayerClass.isTouchDevice()?["touchstart","touchmove","touchend"]:["mousemove","mousedown","mouseup"],l=0;l',adText:null,adTextPosition:"top left",adCTAText:"Visit now!",adCTATextPosition:"bottom right",adClickable:!0,vastTimeout:5e3,showProgressbarMarkers:!1,showPlayButton:!1,maxAllowedVastTagRedirects:3,vastAdvanced:{vastLoadedCallback:function(){},noVastVideoCallback:function(){},vastVideoSkippedCallback:function(){},vastVideoEndedCallback:function(){}}},hlsjsConfig:{p2pConfig:{logLevel:!1}},captions:{play:"Play",pause:"Pause",mute:"Mute",unmute:"Unmute",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen"}},t)if("object"==typeof t[o])for(var a in t[o])i.displayOptions[o][a]=t[o][a];else i.displayOptions[o]=t[o];i.setupPlayerWrapper(),i.initialiseStreamers(),n.addEventListener("webkitfullscreenchange",i.recalculateAdDimensions,!1),n.addEventListener("fullscreenchange",i.recalculateAdDimensions,!1),n.addEventListener("waiting",i.onRecentWaiting,!1),n.addEventListener("pause",i.onFluidPlayerPause,!1),n.addEventListener("loadedmetadata",i.mainVideoReady,!1),n.addEventListener("durationchange",function(){i.currentVideoDuration=i.getCurrentVideoDuration()},!1),n.addEventListener("error",i.onErrorDetection,!1),n.addEventListener("ended",i.onMainVideoEnded,!1),i.currentVideoDuration=i.getCurrentVideoDuration(),isNaN(i.currentVideoDuration)&&(i.currentVideoDuration=0),i.setLayout(),i.latestVolume=n.volume,i.initialAnimationSet=i.displayOptions.layoutControls.playPauseAnimation,i.handleFullscreen(),i.initLogo(),i.initTitle(),i.initMute(),i.initLoop(),i.displayOptions.layoutControls.playerInitCallback(),i.createVideoSourceSwitch(),i.userActivityChecker(),i.setVastList(),i.setPersistentSettings();var l=n.play;n.play=function(){var e=null,t=fluidPlayerClass.getInstanceById(this.id);try{null!=(e=l.apply(this,arguments))&&(e.then(function(){t.isPlayingMedia=!0,clearTimeout(t.promiseTimeout)}).catch(function(e){void 0!==e.name&&"AbortError"===e.name||t.announceLocalError(202,"Failed to play video."),clearTimeout(t.promiseTimeout)}),t.promiseTimeout=setTimeout(function(){!1===t.isPlayingMedia&&t.announceLocalError(204,"Timeout error. Failed to play video.")},5e3))}catch(e){t.announceLocalError(201,"Failed to play video.")}};var r=n.pause;if(n.pause=function(){var t=fluidPlayerClass.getInstanceById(this.id);if(!0===t.isPlayingMedia)return t.isPlayingMedia=!1,r.apply(this,arguments);if(t.isCurrentlyPlayingVideo(this))try{return t.isPlayingMedia=!1,r.apply(this,arguments)}catch(e){t.announceLocalError(203,"Failed to play video.")}},i.displayOptions.layoutControls.autoPlay&&!i.dashScriptLoaded&&!i.hlsScriptLoaded){var s=fluidPlayerClass.getBrowserVersion();if("Safari"==s.browserName&&11<=s.majorVersion)return;n.play()}var d=document.getElementById("fluid_video_wrapper_"+n.id);i.mobileInfo.userOs?(i.hideControlBar.call(d),d.addEventListener("touchstart",i.showControlBar,!1)):(d.addEventListener("mouseleave",i.handleMouseleave,!1),d.addEventListener("mouseenter",i.showControlBar,!1),d.addEventListener("mouseenter",i.showTitle,!1)),i.displayOptions.layoutControls.keyboardControl&&i.keyboardControl(),i.displayOptions.layoutControls.controlBar.autoHide&&i.linkControlBarUserActivity()},play:function(){var e=document.getElementById(this.videoPlayerId);return e.paused&&this.playPauseToggle(e),!0},pause:function(){var e=document.getElementById(this.videoPlayerId);return e.paused||this.playPauseToggle(e),!0},skipTo:function(e){document.getElementById(this.videoPlayerId).currentTime=e},setPlaybackSpeed:function(e){this.isCurrentlyPlayingAd||(document.getElementById(this.videoPlayerId).playbackRate=e,this.fluidStorage.fluidSpeed=e)},setVolume:function(e){document.getElementById(this.videoPlayerId).volume=e,this.latestVolume=e,this.fluidStorage.fluidVolume=e},isCurrentlyPlayingVideo:function(e){return e&&0