var ua = navigator.userAgent, isMobile = ua.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i), isChrome = /Chrome/.test(ua) && /Google Inc/.test(navigator.vendor), isFirefox = -1 < ua.toLowerCase().indexOf("firefox"), isSafari = !1; -1 != ua.toLowerCase().indexOf("safari") && -1 == ua.toLowerCase().indexOf("chrome") && (isSafari = !0); var useFlashPlayer = (-1 < ua.indexOf("Mozilla/5.0 (Windows NT 6.1") || -1 < ua.indexOf("Mozilla/5.0 (Windows NT 6.2")) && -1 < ua.indexOf("Trident/7.0;") || -1 < ua.indexOf("Edge/"), protocol = location.protocol, castProtocol, hostname = location.hostname, port = location.port, hls, firstRun = !0, _MSContentId = "", _MSCurrentPlayerId = "", _MSCurrentMethod = "", _MSTimerIsLive = 0, _MSConfiguration, _MSGidLiveEvent, _MSGidAlternativeContent, _MSIsLive = !1, _MSCanPlay = !1, _MSIsLiveContent = !1, _MSIsAlternative = !1, _MSTries, _MSConnArray, _MSBigPlayButton, _MSReplay = !1, _MSTrackGo = !0, _MSGidSkin, _MSSkin, _MSThumbCanvas, _MSTotalTime, _MSCurrentTime, _MSThumbCount = 0, _MSThumbRatio = .11, _MSPlayerIsPlaying = !1, _MSPlayer, CustomerContainer, _MSIsAudio = !1, _MSCurrContainer, _MSPopOverTime, _MSTrackAnchor, _MSLabelTotalTime, _MSHeaderText, _MSContainer, _MSRequestHost = "webtools-c98db5952cb54b358365984178fb898a.msvdn.net", _MSSeekTo = 0, _MSConnectString = "", _MSConnectStringLoop = "", isIE = !!document.documentMode, receiverFound = !1, _MSHidden = !1, _MSControls, _MSTrack, _MSProgressBar, _MSLiveDiff = 7, _MSSemaphore = !1, _MSPoster, _MSPosterImgDiv, _MSPosterPath, _MSPosterImage, _MSLiveBall, _MSHd, _MSContentType = "application/x-mpegurl", _MSCCdiv = null, _MSFirstDiv, _MSDVRIsLiveOn = !1, _MSIsDVR = !1, _MSVolumeBar, _MSVolumeBarTouched = !1, _MSCurrentVolume = 1, _MSMuteButton, _MSFullscreenDiv, _MSWait = !0, _MSWaitCounter = 0, _IsMouseDown = !1, videojs, tryCount, videojsCss, videojsScript, videojsInterval; function createFlashPlayer() { var e = 0, t = setInterval(function () { var n; (100 == e || "" != _MSConnectString && _MSContainer && _MSFirstDiv) && clearInterval(t), "" != _MSConnectString && _MSContainer && _MSFirstDiv && ((n = document.createElement("script")).src = "//" + _MSRequestHost + "/js/MSvideojs-flash.js", document.head.appendChild(n), (n = document.createElement("script")).src = "//" + _MSRequestHost + "/js/MSvideojs-contrib-hls.js", document.head.appendChild(n), (n = document.createElement("video")).id = "MSVD-videoFlashDiv", n.className = "video-js vjs-default-skin", n.style.width = "100%", n.style.height = "100%", n.controls = !0, _MSFirstDiv.removeChild(_MSContainer), _MSContainer = createElemWithAttributes("MSVD", "MSVD-Container"), _MSFirstDiv.appendChild(_MSContainer), _MSContainer.appendChild(n), (n = window.player = videojs("MSVD-videoFlashDiv")).src({ src: _MSConnectString, type: "application/x-mpegURL" }), n.poster(protocol + "//" + _MSRequestHost + "/image/" + _MSContentId + "/poster")), e++ }, 100) } useFlashPlayer && (videojs = null, tryCount = 0, videojsCss = document.createElement("link"), videojsCss.href = "//" + _MSRequestHost + "/content/_assets/css/IE11WIN7video-js.css", videojsCss.rel = "stylesheet", document.head.appendChild(videojsCss), videojsScript = document.createElement("script"), videojsScript.src = "//" + _MSRequestHost + "/js/MSvideojs.js", document.head.appendChild(videojsScript), videojsInterval = setInterval(function () { 100 != tryCount && !videojs || (clearInterval(videojsInterval), tryCount = 0), videojs && createFlashPlayer(), tryCount++ }, 100)); var script, castProtocol = document.referrer ? document.referrer.split("//")[0] : protocol; function playerSeek(e) { _MSSemaphore || (_MSSemaphore = !0, castValidator() ? getCastContentStatus() || castSeekContent(e) : (_MSPlayer.pause(), _MSPlayer.currentTime = e, _MSPlayer.play()), setTimeout(function () { _MSSemaphore = !1 }, 100)) } function getMobileOperatingSystem() { var e = ua || navigator.vendor || window.opera; return /windows phone/i.test(e) ? 0 : /android/i.test(e) ? 1 : /iPad|iPhone|iPod/.test(e) && !window.MSStream ? 2 : 3 } function getElementById(e) { var t = null; try { t = document.getElementById(e) } catch (e) { } return t } function getCookie(e) { for (var t = e + "=", n = document.cookie.split(";"), i = 0; i < n.length; i++) { for (var r = n[i]; " " == r.charAt(0);)r = r.substring(1); if (0 == r.indexOf(t)) return r.substring(t.length, r.length) } return "" } function setCookie(e, t, n) { var i = new Date; i.setTime(i.getTime() + 24 * n * 60 * 60 * 1e3), i = "expires=" + i.toUTCString(), document.cookie = e + "=" + t + ";" + i + ";path=/" } function timeConvert(e, t) { var n = parseInt(e) / 60, i = Math.floor(n); return n = 60 * (n - i), n = Math.round(n), null == e.split(":")[1] || isNaN(e.split(":")[1]) ? t ? " / 00:00" : "00:00" : (n < 10 && (n = "0" + n), 0 == i ? n + ":" + e.split(":")[1] : i + ":" + n + ":" + e.split(":")[1]) } function changeButtonType(e, t) { e.title = t, e.innerHTML = t, e.className = "MsPlayer " + t } function createElement(e) { return document.createElement(e) } function serialize(e) { var t, n = []; for (t in e) n.push(encodeURIComponent(t) + "=" + encodeURIComponent(e[t])); return n.join("&") } function ClientSideUpdate(e, t, n) { t(e.responseText, n) } function GetSkinConfig() { try { var xmlHttp = new XMLHttpRequest; xmlHttp.open("GET", protocol + "//" + _MSRequestHost + "/skin/" + _MSGidSkin, !1), xmlHttp.send(null), eval("skin = " + xmlHttp.responseText) } catch (e) { console.log(e) } } function GetNewSRC() { try { var e = new XMLHttpRequest; return e.open("GET", protocol + "//" + _MSRequestHost + "/JSHandler/jsRequest?gidLiveEvent=" + _MSGidLiveEvent + "&isLive=" + _MSIsLive + "&tries=" + _MSTries + "&gidAlternativeContent=" + _MSGidAlternativeContent + "&isAlternative=" + _MSIsAlternative + "&connArray=" + _MSConnArray + "&isIos=false&autoPlay=" + _MSConfiguration.autoPlay + "&method=newLoopVideo&contentId=" + _MSContentId + "&requestHost=" + _MSRequestHost + "&r=" + Math.random(), !1), e.send(null), e.responseText } catch (e) { console.log(e) } } function CallServer(e, t, n) { setTimeout(function () { if ("stInt" != e.method.toString()) { _MSCurrentMethod = e.method.toString(); var i, r = null != t; if (window.XDomainRequest) { if (!r) return; i = new XDomainRequest } else i = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"); try { e.referrer = document.referrer } catch (i) { } if (navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform) ? i.open("GET", protocol + "//" + _MSRequestHost + "/JSHandler/jsRequest?gidLiveEvent=" + _MSGidLiveEvent + "&isLive=" + _MSIsLive + "&tries=" + _MSTries + "&gidAlternativeContent=" + _MSGidAlternativeContent + "&isAlternative=" + _MSIsAlternative + "&connArray=" + _MSConnArray + "&isIos=true&container=" + _MSConfiguration.containerID + "&autoPlay=" + _MSConfiguration.autoPlay + "&" + serialize(e) + "&requestHost=" + _MSRequestHost + "&start=" + _MSConfiguration.trimStart + "&end=" + _MSConfiguration.trimEnd + "&csinj=" + _MSConfiguration.injConnectString + "&r=" + Math.random(), r) : i.open("GET", protocol + "//" + _MSRequestHost + "/JSHandler/jsRequest?gidLiveEvent=" + _MSGidLiveEvent + "&isLive=" + _MSIsLive + "&tries=" + _MSTries + "&gidAlternativeContent=" + _MSGidAlternativeContent + "&isAlternative=" + _MSIsAlternative + "&connArray=" + _MSConnArray + "&isIos=false&autoPlay=" + _MSConfiguration.autoPlay + "&" + serialize(e) + "&requestHost=" + _MSRequestHost + "&start=" + _MSConfiguration.trimStart + "&end=" + _MSConfiguration.trimEnd + "&csinj=" + _MSConfiguration.injConnectString + "&r=" + Math.random(), r), i.timeout = 7e3, window.XMLHttpRequest) try { i.withCredentials = !1 } catch (i) { } window.XMLHttpRequest; try { if (r) return void 0 !== i.onreadystatechange ? i.onreadystatechange = function () { 4 == i.readyState && 200 == i.status && ClientSideUpdate(i, t, n) } : void 0 !== i.onload && (i.onload = function () { ClientSideUpdate(i, t, n) }), void i.send(null); if (i.send(null), 200 == i.status) return i.responseText } catch (i) { console.log(i) } } }, 100) } isChrome && "https:" == castProtocol && (script = document.createElement("script"), script.src = "//" + _MSRequestHost + "/js/MSCast.js", document.head.appendChild(script)), null == protocol && (protocol = ""), "file:" == protocol && (protocol = "http:"); var MainStreamingV3 = function () { var UNDEF = "undefined", OBJECT = "object", VIDEO = "video", PROGRESS = "progress", BUTTON = "button", IMG = "img", INPUT = "input", DIV = "div", FIGURE = "figure", server = protocol + "//[urldynamic]/", objIdArr = [], FLASH_MIME_TYPE = "application/x-shockwave-flash", doc = document, timerStart = 0, timerEnd = 0, eventFuncRef = [], d = 0, cuepointsArray = new Array, timerCuePoints = null, defaultConfig = { width: "100%", height: "100%", containerID: "", autoPlay: !1, hideControls: !1, useBigPlayButton: !1, titleOnButton: !1, html5Player: !0, flashPlayer: !1, v360: !1, startMute: !1, muted: !1, shareUrl: null, skinId: null, cuepoints: !1 }, detector = { na: ua, rwebkit: /(webkit)[ \/]([^\s]+)/i, ropera: /(opera)(?:.*version)?[ \/]([^\s]+)/i, rmsie: /(msie) ([^\s;]+)/i, rmozilla: /(mozilla)(?:.*? rv:([^\s]+))?/i, randroid: /(android) ([^;]+)/i, riphone: /(iphone)/i, ripad: /(ipad)/i, rwinphone: /(Windows Phone OS (\d+(?:\.\d+)?))/, rios: /OS (\d+)_(\d+)/i, rps3: /(playstation 3)/i, rbb: /(blakberry|bb10)/i, browser: function () { if (null != this.browserMatch()) return this.browserMatch()[1].toLowerCase() }, browserVersion: function () { return this.browserMatch()[2] }, browserMatch: function () { var e; return null != (e = this.na.match(this.rwebkit)) || null != (e = this.na.match(this.ropera)) ? e : (e = this.na.match(this.rmsie)) ? (null != document.documentMode && (e[2] = document.documentMode), e) : e = this.na.match(this.rmozilla) }, android: function () { var e; return null != (e = this.na.match(this.randroid)) && { version: e[2] } }, oldandroid: function () { return this.android() && this.android().version < "4.1.0" }, iphone: function () { return this.riphone.test(this.na) }, retina: function () { return 1 < window.devicePixelRatio }, ipad: function () { return this.ripad.test(this.na) }, safari: function () { return this.rwebkit.test(this.na) && !/chrome/i.test(this.na) && !this.ipad() && !this.iphone() }, iosVersion: function () { var e; return null != (e = this.na.match(this.rios)) ? parseFloat(e[1] + "." + e[2]) : 0 }, windowsPhone: function () { return this.rwinphone.test(this.na) }, blackberry: function () { return this.rbb.test(this.na) }, ps3: function () { return this.rps3.test(this.na) }, flash: function () { var e = this.flashFullVersion(); return { version: parseFloat(e[0] + "." + e[1]), major: parseInt(e[0], 10), minor: parseInt(e[1], 10), rev: parseInt(e[2], 10) } }, flashFullVersion: function () { var e; try { try { e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); try { e.AllowScriptAccess = "always" } catch (e) { return [6, 0, 0] } } catch (e) { } return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1].split(",") } catch (e) { try { if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1].split(",") } catch (e) { } } return [0, 0, 0] }, html5Video: function () { var e, t = document.createElement("video"), n = !1; try { t.canPlayType && (e = 'video/mp4; codecs="avc1.42E01E', (n = {}).h264 = !!t.canPlayType(e + '"') || !!t.canPlayType(e + ', mp4a.40.2"')) } catch (t) { n = { h264: !1 } } return n }, localStorage: function () { try { return "localStorage" in window && null !== window.localStorage } catch (e) { return !1 } }, json: function () { return !!window.JSON && "function" == typeof JSON.parse }, ismobile: function () { var e = ua || navigator.vendor || window.opera; return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4)) }, backgroundSize: function () { var e; return "" === (e = document.createElement("div")).style.backgroundSize || "" === e.style.webkitBackgroundSize || "" === e.style.mozBackgroundSize || "" === e.style.oBackgroundSize } }; function clone(e) { if (null == e || "object" != typeof e) return e; if (e instanceof Date) return (t = new Date).setTime(e.getTime()), t; if (e instanceof Array) { for (var t = [], n = 0, i = e.length; n < i; n++)t[n] = clone(e[n]); return t } if (e instanceof Object) { for (var r in t = {}, e) e.hasOwnProperty(r) && (t[r] = clone(e[r])); return t } throw new Error("Unable to copy obj! Its type isn't supported.") } function createObjParam(e, t, n) { var i = createElement("param"); i.setAttribute("name", t), i.setAttribute("value", n), e.appendChild(i) } function createObjSource(e, t, n) { var i = createElement("source"); i.setAttribute("id", "MSVD-VideoSource"), i.setAttribute("src", t), i.setAttribute("type", n), i.addEventListener("error", function () { _MSIsLive ? console.log("LIVE NOT ON AIR") : console.log("1017: HLS/M3U8 ERROR") }), e.appendChild(i) } function getHtml5attributes(e, t) { var i = clone(defaultConfig); if (e) for (n in e) typeof i[n] != UNDEF && (i[n] = e[n]); for (m in typeof e.autoPlay != UNDEF && 1 == e.autoPlay && (_MSCanPlay || _MSIsAlternative) && (i.autoPlay = !0, t.autoPlay = !0), typeof e.startMute == UNDEF || "true" != e.startMute && 1 != e.startMute || (t.startMute = !0, setCookie("MS_Player-Volume", 0)), e.shareUrl && (t.shareUrl = e.shareUrl), i.controls = typeof e.hideControls == UNDEF || 1 != e.hideControls && "true" != e.hideControls, i.cuepoints = typeof e.cuepoints != UNDEF && 1 == e.cuepoints, i.width = typeof e.width != UNDEF ? e.width : "100%", i.height = typeof e.height != UNDEF ? e.height : "100%", i) typeof t[m] != UNDEF && (t[m] = i[m]); return t } function liveNotOnAir(e) { } function createHTML5(e, t) { _MSCurrContainer = t, _MSContainer = createElemWithAttributes("MSVD", "MSVD-Container"); var n = createElement(DIV); n.setAttribute("id", t), n.setAttribute("class", void 0), n.setAttribute("style", l), n.appendChild(_MSContainer), _MSFirstDiv = n; var i = !1; 20 != e.typeStream && 21 != e.typeStream || (i = !0); var r = ""; null != e && null != e.title && (r = e.title); var o, a = getElementById(t); if (a) { var s = typeof a.getAttribute("class") != UNDEF && null != a.getAttribute("class") ? a.getAttribute("class") : "", l = typeof a.getAttribute("style") != UNDEF && null != a.getAttribute("class") ? a.getAttribute("style") : ""; if (isIE ? null == l && (l = "position: relative") : "" != l.trim().replace("null", "") && null != l || (l = "position: relative"), null != detector.browser() && "msie" == detector.browser()) if (detector.browserVersion() < 11) videoUnavailable(t, e, !1, "Please update your web browser for HTML5 Player"); else { var u, c = "", d = ""; for (u in e) e[u] != Object.prototype[u] && ("styleclass" == u.toLowerCase() ? c += ' class="' + e[u] + '"' : "href" == u.toLowerCase() ? d += '' : "classid" != u.toLowerCase() && (c += " " + u + '="' + e[u] + '"')); a.outerHTML = '
", objIdArr[objIdArr.length] = e.id, o = getElementById(t) } else { var m, p = createElement(VIDEO); for (m in p.setAttribute("id", "MsPlayer-" + t), "21" != e.typeStream && "undefined" != typeof Hls && createHLSModule(p, i, r, t, MainStreamingV3.instances[t].contentId), e) e[m] != Object.prototype[m] && ("styleclass" == m.toLowerCase() ? p.setAttribute("class", e[m]) : "href" == m.toLowerCase() ? "21" == e.typeStream ? createObjSource(p, e[m], "audio/mp3") : (createObjSource(p, e[m], "video/mp4"), "undefined" != typeof Hls && hls && p.hls.loadSource(e[m])) : "classid" != m.toLowerCase() && p.setAttribute(m, e[m])); _MSContainer.appendChild(p), a.parentNode.replaceChild(n, a), o = n, "undefined" != typeof Hls && createSkinPlayer(n, p, t, skin, e) } } return o } function createHLSModule(e, t, n, i, r) { var o; null == t && (t = !1), hls = null, Hls.isSupported() ? (o = _MSConfiguration.bufferLength, t = _MSConfiguration.maxBufferLength, (hls = new Hls({}, o, t)).attachMedia(e), null == n && (n = ""), (e.hls = hls).on(Hls.Events.ERROR, function (e, t) { _MSIsLive ? console.log("LIVE NOT ON AIR") : console.log("1017: HLS/M3U8 ERROR"); var n = t.type; t = t.details, console.log("Type: " + n + " - Details: " + t) }), hls.on(Hls.Events.FRAG_CHANGED, function (t, n) { var i = null; null != n.frag.tagList[2] && (i = n.frag.tagList[2][1]), null != n.frag.tagList[1] && null == i && (i = n.frag.tagList[1][1]), null != i && 0 <= i.indexOf("ON-TEXT-DATA=") && (i = (i = (i = i.replace("ON-TEXT-DATA=", "ID3UTCD")).replace('"', "")).replace('"', ""), MainStreamingV3.onPlayerEvent(e.getAttribute("id"), "onLiveUTCTimeStamp", i)) })) : useFlashPlayer || createError("Your browser is not compatible, please update or change it", i) } function getVideoH(script, parameters) { var contentId = parameters.contentId, _MSConfiguration = parameters._MSConfiguration, currentPlayerID = parameters.currentPlayerID, instance = parameters.instance; eval(script) } function getVideo(e, t, n, i) { CallServer({ contentId: e, method: "getVideo", skinId: typeof t.skinId != UNDEF ? t.skinId : "", html5Player: typeof t.html5Player == UNDEF || t.html5Player, flashPlayer: typeof t.flashPlayer != UNDEF && t.flashPlayer, v360: typeof t.v360 != UNDEF && t.v360 }, getVideoH, { contentId: e, _MSConfiguration: t, currentPlayerID: n, instance: i }) } function checkIsLive(e, t, n, i) { CallServer({ contentId: e, method: "checkIsLive", skinId: typeof t.skinId != UNDEF ? t.skinId : "", html5Player: typeof t.html5Player == UNDEF || t.html5Player, flashPlayer: typeof t.flashPlayer != UNDEF && t.flashPlayer, v360: typeof t.v360 != UNDEF && t.v360 }, getVideoH, { contentId: e, _MSConfiguration: t, currentPlayerID: n, instance: i }) } function videoUnavailable(e, t, n, i, r) { var o, a, s; return n = typeof n != UNDEF && null != typeof n && n, i = typeof i != UNDEF && null != typeof n ? i : "", void 0 !== r && 0 != r || (o = getElementById(e)) && (t.width = typeof t.width != UNDEF ? t.width : "100%", t.height = typeof t.height != UNDEF ? t.height : "100%", s = "msie" == detector.browser() ? (r = typeof o.getAttribute("class") != UNDEF && null != o.getAttribute("class") ? 'class="' + o.getAttribute("class") + '"' : "", a = typeof o.getAttribute("style") != UNDEF && null != o.getAttribute("style") ? 'style="' + o.getAttribute("style") + '"' : "", o.outerHTML = n ? '

Your flash version is not up to date.
Click here to download latest version

' : "" != i ? '

Video unavailable
' + i + "

" : '

Video unavailable

', getElementById(e)) : ((a = createElement(DIV)).style.cssText = "width:" + t.width + ";height:" + t.height + ";background-color: rgba(57, 58, 60, 0.6);border-radius: 10px; text-shadow: 0 1px 2px #000000;display: table;", a.innerHTML = n ? '

Please, update your flash player version.
Download Here

' : null != i && "" != i ? '

Video not available
' + i + "

" : '

', (s = createElement(DIV)).setAttribute("id", e), s.setAttribute("class", o.getAttribute("class")), s.setAttribute("style", o.getAttribute("style")), s.appendChild(a), o.parentNode.replaceChild(s, o), s)), s } function switchSource(player, contentId, sourceId) { var callParams = { contentId: contentId, sourceId: sourceId, method: "switchSource" }; eval(CallServer(callParams)) } function getNextShot(e, t, n, i) { var r, o = getElementById("MSVD-" + _MSCurrContainer + "-next"), a = getElementById("MSVD-" + _MSCurrContainer + "-prev"), s = getElementById("MSVD-" + _MSCurrContainer + "-prev-img"), l = getElementById("MSVD-" + _MSCurrContainer + "-next-img"); i ? (n ? MainStreamingV3.instances[e].currentIndex++ : MainStreamingV3.instances[e].currentIndex--, 0 == MainStreamingV3.instances[e].currentIndex ? (s.setAttribute("src", i.prevButtonDisabledIMG), a.onmouseover = function () { s.setAttribute("src", i.prevButtonDisabledIMG) }, a.onmouseout = function () { s.setAttribute("src", i.prevButtonDisabledIMG) }, l.setAttribute("src", i.nextButtonIMG), o.onmouseover = function () { l.setAttribute("src", i.nextButtonOverIMG) }, o.onmouseout = function () { l.setAttribute("src", i.nextButtonIMG) }) : (MainStreamingV3.instances[e].currentIndex == _MSConnArray.length - 1 ? (l.setAttribute("src", i.nextButtonDisabledIMG), o.onmouseover = function () { l.setAttribute("src", i.nextButtonDisabledIMG) }, o.onmouseout = function () { l.setAttribute("src", i.nextButtonDisabledIMG) }) : (l.setAttribute("src", i.nextButtonIMG), o.onmouseover = function () { l.setAttribute("src", i.nextButtonOverIMG) }, o.onmouseout = function () { l.setAttribute("src", i.nextButtonIMG) }), s.setAttribute("src", i.prevButtonIMG), a.onmouseover = function () { s.setAttribute("src", i.prevButtonOverIMG) }, a.onmouseout = function () { s.setAttribute("src", i.prevButtonIMG) })) : n ? MainStreamingV3.instances[e].currentIndex++ : MainStreamingV3.instances[e].currentIndex--, MainStreamingV3.instances[e].currentIndex < _MSConnArray.length ? (r = document.getElementById(e).getElementsByTagName("video")[0], "undefined" != typeof Hls && hls ? (r.hls.destroy(), createHLSModule(r, !1, "", e, MainStreamingV3.instances[e].contentId), r.hls.attachMedia(r), r.hls.on(Hls.Events.MANIFEST_PARSED, function () { r.isLoading = !1 }), r.isLoading = !0, r.hls.loadSource(t + _MSConnArray[MainStreamingV3.instances[e].currentIndex] + "/playlist.m3u8")) : (r.src = t + _MSConnArray[MainStreamingV3.instances[e].currentIndex] + "/playlist.m3u8", r.load()), MainStreamingV3.instances[e].idVideoSession = _MSConnArray[MainStreamingV3.instances[e].currentIndex], MainStreamingV3.instances[e].firstChildPlayCalled = !1, eventFuncRef["nextShot-" + e] = function (n) { n.target.removeEventListener("ended", eventFuncRef["nextShot-" + e], !1), getNextShot(e, t, !0, i) }, r.removeEventListener("ended", eventFuncRef["nextShot-" + e], !1), r.addEventListener("ended", eventFuncRef["nextShot-" + e], !1), castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : r.play()) : (MainStreamingV3.instances[e].currentIndex = 0, r = document.getElementById(e).getElementsByTagName("video")[0], MainStreamingV3.onPlayerEvent(e, "onFirstFullView"), "undefined" != typeof Hls && hls ? (r.hls.destroy(), createHLSModule(r, !1, "", e, MainStreamingV3.instances[e].contentId), r.hls.attachMedia(r), r.hls.on(Hls.Events.MANIFEST_PARSED, function () { r.isLoading = !1 }), r.isLoading = !0, r.hls.loadSource(t + _MSConnArray[MainStreamingV3.instances[e].currentIndex] + "/playlist.m3u8")) : (r.src = t + _MSConnArray[MainStreamingV3.instances[e].currentIndex] + "/playlist.m3u8", r.load()), MainStreamingV3.instances[e].firstChildPlayCalled = !1, eventFuncRef["nextShot-" + e] = function (n) { n.target.removeEventListener("ended", eventFuncRef["nextShot-" + e], !1), getNextShot(e, t, !1, i) }, r.removeEventListener("ended", eventFuncRef["nextShot-" + e], !1), r.addEventListener("ended", eventFuncRef["nextShot-" + e], !1)), isMobile || (0 < MainStreamingV3.instances[e].currentIndex && MainStreamingV3.instances[e].currentIndex < _MSConnArray.length - 1 ? (document.getElementById("MSVD-" + _MSCurrContainer + "-prev").onclick = function () { getNextShot(e, MainStreamingV3.instances[e].server, !1, i) }, document.getElementById("MSVD-" + _MSCurrContainer + "-next").onclick = "", document.getElementById("MSVD-" + _MSCurrContainer + "-next").onclick = function () { getNextShot(e, MainStreamingV3.instances[e].server, !0, i) }) : MainStreamingV3.instances[e].currentIndex == _MSConnArray.length - 1 ? document.getElementById("MSVD-" + _MSCurrContainer + "-next").onclick = "" : (document.getElementById("MSVD-" + _MSCurrContainer + "-next").onclick = function () { getNextShot(e, MainStreamingV3.instances[e].server, !0, i) }, document.getElementById("MSVD-" + _MSCurrContainer + "-prev").onclick = "")), _MSTrack.style.width = "0px" } function defineListeners(e, t, n) { eventFuncRef["ended-" + e] = function (n) { n.target.removeEventListener("ended", eventFuncRef["ended-" + e], !1), syncLoop(e, t, !1) }, eventFuncRef["replay-" + e] = function (n) { n.target.removeEventListener("play", eventFuncRef["replay-" + e], !1), n.target.pause(), syncLoop(e, t, !0) }, eventFuncRef["paused-" + e] = function (t) { t.target.removeEventListener("pause", eventFuncRef["paused-" + e], !1) }, eventFuncRef["seeking-" + e] = function (n) { typeof n.target.isLoading != UNDEF && 1 == n.target.isLoading || (n.target.removeEventListener("seeked", eventFuncRef["seeking-" + e], !1), n.target.pause(), syncLoop(e, t, !0)) }, eventFuncRef["seekingStartLoop-" + e] = function (t) { typeof t.target.isLoading != UNDEF && 1 == t.target.isLoading || (player.removeEventListener("seeked", eventFuncRef["seekingStartLoop-" + e], !1), player.addEventListener("seeked", eventFuncRef["seeking-" + e], !1)) } } function setSeek(e, t) { try { 0 == e ? t.currentTime = e : t.currentTime += e } catch (e) { console.log("Video content might not be loaded") } } function ios6seektester(e, t, n) { var i; typeof e.isLoading != UNDEF && 1 == e.isLoading || (i = 0, e.addEventListener("timeupdate", function () { var r; 3 <= e.readyState && 0 == i && (i++, clearInterval(e.msSeekTimer), (r = window.ua).indexOf("MSIE "), r.indexOf("Trident/"), r.indexOf("Edge/"), e.currentTime = t + .1, e.removeEventListener("ended", eventFuncRef["ended-" + n], !1), e.addEventListener("ended", eventFuncRef["ended-" + n], !1), e.removeEventListener("pause", eventFuncRef["pause-" + n], !1), e.addEventListener("pause", eventFuncRef["paused-" + n], !1), e.removeEventListener("seeked", eventFuncRef["seeked-" + n], !1), e.addEventListener("seeked", eventFuncRef["seekingStartLoop-" + n], !1)) }), e.removeEventListener("timeupdate", eventFuncRef["player-" + n])) } function syncLoop(currentPlayerID, sessionId, seek) { var player = document.getElementById(currentPlayerID).getElementsByTagName("video")[0], callParams; player.isLoading != UNDEF && 1 == player.isLoading || (callParams = { sessionId: sessionId, seek: seek, method: "loadLoopVideo" }, eval(CallServer(callParams)), playerSeek(_MSSeekTo)) } function loopEndFunc() { var e = GetNewSRC(), t = createElement("source"); t.setAttribute("id", "MSVD-VideoSource"), t.setAttribute("src", e), t.setAttribute("type", "video/mp4"), document.getElementById("MSVD-VideoSource").remove(), t.addEventListener("error", function () { _MSIsLive ? console.log("LIVE NOT ON AIR") : console.log("1017: HLS/M3U8 ERROR") }), _MSPlayer.appendChild(t), playHlsVideo(e) } function changeSource(e) { var t = document.getElementById("MSVD-VideoSource"); t && t.remove(), (t = createElement("source")).setAttribute("id", "MSVD-VideoSource"), t.setAttribute("src", e), t.setAttribute("type", "video/mp4"), t.addEventListener("error", function () { _MSIsLive ? console.log("LIVE NOT ON AIR") : console.log("1017: HLS/M3U8 ERROR") }), _MSPlayer.appendChild(t), playHlsVideo(e), setTimeout(function () { 4 != _MSPlayer.readyState && changeSource(e) }, 2500) } function loadLive(e) { null != _MSPlayer && (castValidator() ? msCastPlayOrPause(!0, !1) : _MSPlayer.pause()); var t = createElement("source"); t.setAttribute("id", "MSVD-VideoSource"), t.setAttribute("src", e), t.setAttribute("type", "video/mp4"), t.addEventListener("error", function () { _MSIsLive ? console.log("LIVE NOT ON AIR") : console.log("1017: HLS/M3U8 ERROR") }), _MSPlayer.appendChild(t), null != _MSThumbCanvas && (_MSThumbCanvas.style.visibility = "hidden"), setTimeout(function () { playHlsVideo(e), setTimeout(function () { 4 != _MSPlayer.readyState && changeSource(e) }, 2500) }, 1e3) } function playHlsVideo(e) { null != _MSPlayer && (castValidator() ? msCastPlayOrPause(!0, !1) : _MSPlayer.pause()), Hls.isSupported() && (null == hls && (hls = new Hls), hls.loadSource(e), hls.attachMedia(_MSPlayer), hls.on(Hls.Events.MANIFEST_PARSED, function () { castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : (isSafari && (_MSPlayer.muted = !0, changeButtonType(_MSMuteButton, "unmute")), _MSPlayer.play()) })) } function createSkinPlayer(e, t, n, i, r) { var o = getElementById(n); (CustomerContainer = o).setAttribute("tabindex", "0"), CustomerContainer.onkeydown = function (e) { 32 == (e = e || window.event).keyCode && (t.paused || t.ended ? (_MSCanPlay || _MSIsAlternative) && (S.setAttribute("src", i.pauseButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) }, _MSPoster && (_MSPoster.style.visibility = "hidden"), castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : t.play()) : (_MSPlayerIsPlaying = !1, S.setAttribute("src", i.playButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) }, castValidator() ? msCastPlayOrPause(!0, !1) : t.pause())) }, _MSIsAudio && addEqualizer(); var a = getElementById("MsPlayer-" + n); null != (_MSPlayer = a) && (a.removeAttribute("title"), _MSReplay && a.setAttribute("loop", "true")), a.addEventListener("playing", function () { _MSLabelTotalTime && !_MSDVRIsLiveOn && "hidden" == _MSLabelTotalTime.style.visibility && (_MSLabelTotalTime.style.visibility = "visible"), _MSPoster && (_MSPoster.style.visibility = "hidden"), _MSPlayerIsPlaying || (_MSPlayerIsPlaying = !0, _MSIsAudio && animate()), playPauseCurrentTime = a.currentTime }), a.addEventListener("ended", function () { _MSPlayerIsPlaying = !1, S.setAttribute("src", i.playButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) } }), isFirefox && a.addEventListener("error", function () { _MSIsLive ? console.log("LIVE NOT ON AIR") : console.log("1017: HLS/M3U8 ERROR") }); var s = document.getElementById(n).getElementsByTagName("video")[0]; s.style.display = "flex", o.setAttribute("class", "containerVideo"); var l = i.logoPosition, u = function () { return !!(document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement || document.fullscreenElement) }, c = createElement("link"); c.setAttribute("href", "//" + _MSRequestHost + "/content/_assets/css/html5Player.css"), c.setAttribute("rel", "stylesheet"), c.setAttribute("type", "text/css"), document.getElementsByTagName("head")[0].appendChild(c), logoObj = setLogoOverlay(i, o, l); var d = logoObj.logoImg, m = logoObj.logoDiv; _MSContainer.appendChild(m); var p = setPlayerHeader(o, n, r, i, u); _MSContainer.appendChild(p), c = createElemWithAttributes("MSVD", "MSVD-videoControls-" + n), _MSControls = c; var y = createElemWithAttributes("MSVD", "MSVD-topControls-" + n); y.style.display = "block", y.style.paddingTop = "5px", y.style.height = "15px", c.appendChild(y), l = setCssCustom(n, i), style = document.createElement("style"), style.styleSheet ? style.styleSheet.cssText = l : style.appendChild(document.createTextNode(l)), document.getElementsByTagName("head")[0].appendChild(style), _MSContainer.appendChild(c); var h = (m = setPrevVideoDiv(i, n)).prevVideoImg; p = m.prevVideoDiv, l = setNextVideoDiv(i, n), 0 < MainStreamingV3.instances[n].currentIndex && !isMobile && !_MSIsAlternative ? document.getElementById("MSVD-" + _MSCurrContainer + "-prev").onclick = function () { getNextShot(n, MainStreamingV3.instances[n].server, !1, i) } : 0 == MainStreamingV3.instances[n].currentIndex && (h.setAttribute("src", i.prevButtonDisabledIMG), p.onmouseover = function () { h.setAttribute("src", i.prevButtonDisabledIMG) }, p.onmouseout = function () { h.setAttribute("src", i.prevButtonDisabledIMG) }), l.onclick = function () { getNextShot(n, MainStreamingV3.instances[n].server, !0, i) }; var S = (m = setPlayPauseVideoDiv(i, n, t)).playPause, v = m.playPauseDiv; y.appendChild(p), y.appendChild(v), y.appendChild(l), s.addEventListener("click", function () { 2 < getMobileOperatingSystem() && (t.paused || t.ended ? (_MSCanPlay || _MSIsAlternative) && (S.setAttribute("src", i.pauseButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) }, _MSPoster && (_MSPoster.style.visibility = "hidden"), castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : t.play()) : (_MSPlayerIsPlaying = !1, S.setAttribute("src", i.playButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) }, castValidator() ? msCastPlayOrPause(!0, !1) : t.pause())) }); var M = (m = setDivCurrentTime(n, i)).div, g = m.label; y.appendChild(M); var b, f = (m = setDivTotalTime(n, i)).div, C = m.label; _MSIsDVR && (C.style.visibility = "hidden"), _MSIsLive || _MSIsDVR || (b = setInterval(function () { var e; isNaN(_MSPlayer.duration) || (clearInterval(b), e = (((e = Math.floor(_MSPlayer.duration / 60)) < 10 ? "0" : "") + e + ":" + ((e = _MSPlayer.duration % 60) < 10 ? "0" : "") + e).split(".")[0], g.innerHTML += " / " + timeConvert(e, !0)) }, 100)), y.appendChild(f), 30 != r.typeStream && (p.style.display = "none", l.style.display = "none", v.style.left = "3px", M.style.left = "38px", f.style.left = "93px"), u = setFullscreen(n, i, u, t, e, o), _MSFullscreenDiv = u, y.appendChild(u), u = (e = setMuteObj(n)).mute, _MSMuteButton = u; var _ = e.div; y.appendChild(_); var I = (u = setVolumeBarDiv(n, u, t, _, r)).volumeBarDiv, P = u.volumeBar; _MSContainer.appendChild(I), I.style.bottom = "35px", isIE && !useFlashPlayer && (I.style.bottom = o.clientHeight - (o.clientHeight - (c.clientHeight + 2 * _.clientHeight + 7)) + "px", P.style.left = "-33px"), _.onmouseover = function () { P.style.visibility = "visible", P.style.opacity = "1", I.style.left = (_.offsetLeft + 3).toString() + "px" }, _.onmouseleave = function () { P.style.visibility = "hidden", P.style.opacity = "0" }, P.onmouseover = function () { goHide = !1, P.style.visibility = "visible", P.style.opacity = "1" }, P.onmouseleave = function () { goHide = !0, P.style.visibility = "hidden", P.style.opacity = "0" }; var E = setHdDiv(n, i); y.appendChild(E), setInterval(function () { 720 <= parseInt(t.videoHeight, 10) && !_MSHidden ? (E.style.visibility = "visible", _MSCCdiv && (_MSCCdiv.style.marginRight = "12px")) : (E.style.visibility = "hidden", _MSCCdiv && (_MSCCdiv.style.marginRight = "-26px")) }, 1e3), u = document.createElement("br"), c.appendChild(u); var V = (u = setProgressBar(n, i)).track, x = u.progressBar; _MSProgressBar = x, c.appendChild(x), (_MSIsLive || _MSIsDVR) && (_MSTrack.style.width = document.getElementById("MSVD-" + _MSCurrContainer + "-seekBar").clientWidth + "px"); var T, A, w, D = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-popoverTime"); switch (D.style.position = "absolute", D.style.bottom = "65px", D.style.backgroundColor = "rgba(0,0,0, 0.5)", D.style.borderRadius = "15px", D.style.color = "white", D.style.width = "52px", D.style.fontSize = "12px", D.style.fontFamily = "Arial", D.style.textAlign = "center", D.style.display = "none", c.appendChild(D), r.typeStream) { case 20: case 21: case 31: _MSIsLive = _MSIsLiveContent = !0, _MSIsDVR ? (M.style.visibility = "hidden", f.style.left = "40px", (T = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-backToLiveButton")).style.position = "relative", T.style.marginTop = "3.5px", T.style.marginRight = "10px", T.style.float = "right", T.style.height = "25px", T.style.width = "50px", T.style.cursor = "pointer", (A = createElement("MSVD")).style.fontFamily = "Arial", A.style.display = "flex", (w = createElement("MSVD")).style.background = _MSCanPlay || _MSIsAlternative ? "red" : "#ddd", w.style.height = "10px", w.style.width = "10px", w.style.borderRadius = "50%", w.style.marginTop = "4px", w.style.marginRight = "4px", _MSLiveBall = w, A.appendChild(w), (w = createElement("span")).style.color = i.buttonForeColor, w.style.fontWeight = "bolder", w.style.fontSize = "14px", w.innerText = "LIVE", A.appendChild(w), T.appendChild(A), y.appendChild(T), T.addEventListener("click", function () { (_MSCanPlay || _MSIsAlternative) && (liveOn(), castValidator() ? getCastContentStatus() && castSeekContent(_MSPlayer.duration - _MSLiveDiff) : _MSPlayer.currentTime = _MSPlayer.duration - _MSLiveDiff) })) : (s.hideProgressBar = !0, x.style.visibility = "hidden", f.style.visibility = "hidden", M.style.visibility = "hidden") }var k = setBigPlayButton(i); _MSBigPlayButton = k, _MSPoster = setPoster(r.poster); var L, B = 0; hls && (L = setInterval(function () { var e; (100 == B || 0 < hls.subtitleTracks.length) && (clearInterval(L), B = 0), 0 < hls.subtitleTracks.length && (e = setCCDiv(i), y.appendChild(e), _MSCCdiv = e), B++ }, 100)), "True" == i.useBigPlayButton && (_MSContainer.appendChild(k), k.addEventListener("click", function () { t.paused || t.ended ? (_MSCanPlay || _MSIsAlternative) && (S.setAttribute("src", i.pauseButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) }, _MSPoster && (_MSPoster.style.visibility = "hidden"), castValidator() ? getCastContentStatus() ? (castPlayOrPause(), castPlayer.isPaused ? (S.setAttribute("src", i.playButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) }) : (S.setAttribute("src", i.pauseButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) })) : castLoadContent(_MSConnectString, _MSContentType) : t.play()) : (_MSPlayerIsPlaying = !1, S.setAttribute("src", i.playButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) }, castValidator() ? msCastPlayOrPause(!0, !1) : t.pause()) })), t.controls = !1; var F, H = 0; setInterval(function () { var e, n, r, o, a, s; !castValidator() || (e = getCastPlayerObject()) && (getCastContentStatus() || castLoadContent(_MSConnectString, _MSContentType), e.isPaused || 0 != H || (r = setInterval(function () { H++ }, 1e3)), e.isPaused ? (clearInterval(r), k.style.display = "block", v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) }) : (0 == v.firstTimeAutoPlay && (v.firstTimeAutoPlay = 1, S.setAttribute("src", i.pauseButtonIMG)), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) }), 0 == e.currentTime && (e = H), null != (n = 100 / t.duration * e.currentTime) && 0 <= n && n <= 100 && (r = null, r = -1 != (n = ((n = Math.floor(e.currentTime / 60)) < 10 ? "0" : "") + n + ":" + ((n = e.currentTime % 60) < 10 ? "0" : "") + n).indexOf(".") ? n.substring(0, n.indexOf(".")) : n, !_MSTrackGo || mouseDown || _MSDVRIsLiveOn || (V.style.width = Math.floor(x.clientWidth * e.currentTime / t.duration - .015 * CustomerContainer.clientWidth) + "px"), g.innerHTML = timeConvert(r, !1) + " / ", 3599 < e.currentTime ? C.style.marginLeft = "12px" : C.style.marginLeft = "0px"), isIE ? _MSIsDVR ? (s = (((o = Math.floor((t.duration - e.currentTime - _MSLiveDiff) / 60)) < 10 ? "0" : "") + o + ":" + ((a = (t.duration - e.currentTime - _MSLiveDiff) % 60) < 10 ? "0" : "") + a).split(".")[0], C.innerHTML = "-" + timeConvert(s, !1)) : (s = (((o = Math.floor(t.duration / 60)) < 10 ? "0" : "") + o + ":" + ((a = t.duration % 60) < 10 ? "0" : "") + a).split(".")[0], C.innerHTML = timeConvert(s, !0)) : _MSIsDVR ? (s = (((o = Math.floor((_MSPlayer.duration - _MSPlayer.currentTime - _MSLiveDiff) / 60)) < 10 ? "0" : "") + o + ":" + ((a = (_MSPlayer.duration - _MSPlayer.currentTime - _MSLiveDiff) % 60) < 10 ? "0" : "") + a).split(".")[0], C.innerHTML = "-" + timeConvert(s, !1)) : (s = (((o = Math.floor(t.duration / 60)) < 10 ? "0" : "") + o + ":" + ((a = t.duration % 60) < 10 ? "0" : "") + a).split(".")[0], C.innerHTML = timeConvert(s, !0)), _MSLabelTotalTime = C, _MSTotalTime = parseInt(60 * s.split(":")[0] + s.split(":")[1])) }, 100), t.addEventListener("timeupdate", function () { t.ErrorDetails && console.log("errore details exist: " + t.ErrorDetails), 0 < t.buffered.length && !t.paused && t.play(), t.paused ? (k.style.display = "block", v.onmouseover = function () { S.setAttribute("src", i.playButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.playButtonIMG) }) : (k.style.display = "none", 0 == v.firstTimeAutoPlay && (v.firstTimeAutoPlay = 1, S.setAttribute("src", i.pauseButtonIMG)), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) }); var e, n, r, o = 100 / t.duration * t.currentTime; null != o && 0 <= o && o <= 100 && (o = (o = ((o = Math.floor(t.currentTime / 60)) < 10 ? "0" : "") + o + ":" + ((o = t.currentTime % 60) < 10 ? "0" : "") + o).substring(0, o.indexOf(".")), !_MSTrackGo || mouseDown || _MSDVRIsLiveOn || (V.style.width = Math.floor(x.clientWidth * _MSPlayer.currentTime / _MSPlayer.duration - .015 * CustomerContainer.clientWidth) + "px"), g.innerHTML = timeConvert(o, !1) + " / ", 3599 < _MSPlayer.currentTime ? C.style.marginLeft = "12px" : C.style.marginLeft = "0px"), isIE ? _MSIsDVR ? (r = (((e = Math.floor((_MSPlayer.duration - _MSPlayer.currentTime - _MSLiveDiff) / 60)) < 10 ? "0" : "") + e + ":" + ((n = (_MSPlayer.duration - _MSPlayer.currentTime - _MSLiveDiff) % 60) < 10 ? "0" : "") + n).split(".")[0], C.innerHTML = "-" + timeConvert(r, !1)) : (r = (((e = Math.floor(t.duration / 60)) < 10 ? "0" : "") + e + ":" + ((n = t.duration % 60) < 10 ? "0" : "") + n).split(".")[0], "visible" == C.style.visibility && (C.innerHTML = timeConvert(r, !0))) : _MSIsDVR ? (r = (((e = Math.floor((_MSPlayer.duration - _MSPlayer.currentTime - _MSLiveDiff) / 60)) < 10 ? "0" : "") + e + ":" + ((n = (_MSPlayer.duration - _MSPlayer.currentTime - _MSLiveDiff) % 60) < 10 ? "0" : "") + n).split(".")[0], C.innerHTML = "-" + timeConvert(r, !1)) : (r = (((e = Math.floor(t.duration / 60)) < 10 ? "0" : "") + e + ":" + ((n = t.duration % 60) < 10 ? "0" : "") + n).split(".")[0], C.innerHTML = timeConvert(r, !0)), _MSLabelTotalTime = C, _MSTotalTime = parseInt(60 * r.split(":")[0] + r.split(":")[1]) }), x.addEventListener("mousemove", function (e) { var n = document.getElementById("MSVD-thumbCanvas"); 0 < _MSThumbCount && (null == n ? addThumbCanvas() : _MSThumbCanvas.style.display = "default"); var i = event.clientX - CustomerContainer.getBoundingClientRect().left - document.body.getBoundingClientRect().left; i <= 0 && (i = 1), (n = 100 / x.clientWidth * i / 100 * t.duration) > t.duration && (n = t.duration), n = (n = ((i = Math.floor(n / 60)) < 10 ? "0" : "") + i + ":" + ((n %= 60) < 10 ? "0" : "") + n).substring(0, n.indexOf(".")), D.innerHTML = timeConvert(n, !1), D.style.left = e.layerX - 27 + "px", D.style.display = "", _MSCurrentTime = parseInt(60 * n.split(":")[0] + n.split(":")[1]) }), document.addEventListener("mousemove", function (e) { var n, i; mouseDown && (i = document.getElementById("MSVD-" + _MSCurrContainer + "-trackProgress"), (n = parseInt(i.style.width.replace("px", ""))) <= 0 && (n = 1), i = 100 / x.clientWidth * n / 100 * t.duration, i = (i = ((n = Math.floor(i / 60)) < 10 ? "0" : "") + n + ":" + ((i %= 60) < 10 ? "0" : "") + i).substring(0, i.indexOf(".")), D.innerHTML = timeConvert(i, !1), D.style.left = e.layerX - 27 + "px", D.style.display = "") }), document.addEventListener("mouseup", function (e) { var t, n; mouseDown || ("" != (t = D.innerText) && "none" != D.style.display && (n = 0, 5 < t.length ? (n += 3600 * parseFloat(t.split(":")[0]), n += 60 * parseFloat(t.split(":")[1]), n += parseFloat(t.split(":")[2])) : (n += 60 * parseFloat(t.split(":")[0]), n += parseFloat(t.split(":")[1])), castValidator() ? getCastContentStatus() && castSeekContent(n) : _MSPlayer.currentTime = n), D.style.display = "none") }), x.addEventListener("click", function () { (_MSCanPlay || _MSIsAlternative) && (_MSPoster && (_MSPoster.style.visibility = "hidden"), (t.paused || t.ended) && (S.setAttribute("src", i.pauseButtonIMG), v.onmouseover = function () { S.setAttribute("src", i.pauseButtonOverIMG) }, v.onmouseout = function () { S.setAttribute("src", i.pauseButtonIMG) }, castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : t.play())) }), x.addEventListener("mouseleave", function (e) { mouseDown || (D.style.display = "none") }), window.onresize = function (e) { d.style.height = 10 * t.clientHeight / 100 + "px" }, o.addEventListener("mousemove", function () { clearTimeout(F); var e = getElementById("MSVD-" + _MSCurrContainer + "-video-header"); null != e && (e.classList.remove("noHoverMouseStill"), e.classList.add("gradientHeader"), e.classList.add("headerVisibility"), getElementById("MSVD-videoControls-" + n).classList.remove("noHoverMouseStill"), getElementById("MSVD-videoControls-" + n).classList.remove("hideControlsOnMouseTimeout"), F = setTimeout(function () { var e, t; goHide && (null != (e = getElementById("MSVD-" + _MSCurrContainer + "-video-header")) && e.setAttribute("class", "noHoverMouseStill"), null != _MSHd && _MSCCdiv && (_MSCCdiv.style.marginRight = "-26px"), -1 < !ua.indexOf("Safari") && (t = getElementById("MSVD-" + _MSCurrContainer + "-video-header")) && t.setAttribute("class", "noHoverMouseStill")) }, 3500)) }), "True" == i.hideControls && (getElementById("MSVD-videoControls-" + n).style.display = "none", getElementById("MSVD-videoControls-" + n).style.visibility = "hidden"), "False" == i.titleOnButton && (getElementById("MSVD-" + _MSCurrContainer + "-video-header").style.display = "none", getElementById("MSVD-" + _MSCurrContainer + "-video-header").style.visibility = "hidden"), document.addEventListener("mousemove", function () { var e; justHidden || (justHidden = _MSHidden = !1, clearTimeout(j), null != (e = document.getElementById("MSVD-videoControls-" + _MSCurrContainer)) && (e.style.visibility = "visible", _MSLabelTotalTime && (!_MSIsLiveContent && !_MSIsDVR || _MSIsDVR && !_MSDVRIsLiveOn) && (_MSLabelTotalTime.style.visibility = "visible"), _MSHidden ? (E.style.visibility = "hidden", _MSCCdiv && (_MSCCdiv.style.marginRight = "-26px")) : (720 <= parseInt(t.videoHeight, 10) ? E.style.visibility = "visible" : E.style.visibility = "hidden", _MSCCdiv && (_MSCCdiv.style.marginRight = "12px"))), _MSPlayer.style.cursor = "default", j = setTimeout(hide, 3e3)) }), _MSPopOverTime = D } var goHide = !0, justHidden = !1, j, y; function hide() { _MSControls.classList.add("hideControlsOnMouseTimeout"), _MSHeaderText.classList.add("hideControlsOnMouseTimeout"), _MSPlayer.style.cursor = "none", _MSVolumeBarTouched || (_MSVolumeBar.style.visibility = "hidden"), justHidden = _MSHidden = !0, setTimeout(function () { justHidden = !1 }, 500) } return { detector: detector, embed: function (e, t) { document.getElementById(t.containerID).innerHTML = "", typeof t != UNDEF && (_MSConfiguration = t), t.requestHost ? _MSRequestHost = t.requestHost : "webtools-c98db5952cb54b358365984178fb898a.msvdn.net" != _MSRequestHost && (_MSRequestHost = "webtools.msvdn.net"), _MSGidLiveEvent = t.gidLiveEvent, getVideo(_MSContentId = e, _MSConfiguration, _MSConfiguration.containerID, this), _MSConfiguration.contentId = e, this._MSConfiguration = _MSConfiguration, this.timerUTCDate = null, this.utcDate = 0, this.lastIdCuePoint = 0, this.cuepoints = new Array, this.contentId = e, this.container = _MSConfiguration.containerID, this.switchSource = function (e) { var t; null == e || null != (t = getElementById(_MSConfiguration.containerID)) && ("object" == (t = t.firstElementChild || t.firstChild).tagName.toLowerCase() ? t.switchSource(e) : "video" == t.tagName.toLowerCase() && switchSource(t, this.contentId, e)) }, null != _MSConfiguration.SecurityTokenQS && (-1 != _MSConfiguration.SecurityTokenQS.indexOf("tk2") ? _MSConnectString = _MSConnectString + "?" + _MSConfiguration.SecurityTokenQS : !document.referrer || (e = window.location.href.substring(window.location.href.indexOf("?") + 1, window.location.href.length)) && -1 != e.indexOf("tk2") && (_MSConfiguration.SecurityTokenQS = e.substring(e.indexOf("baseuri="), e.length), _MSConfiguration.SecurityTokenQS && (_MSConnectString = -1 != _MSConnectString.indexOf("?") ? _MSConnectString + "&" + _MSConfiguration.SecurityTokenQS : _MSConnectString + "?" + _MSConfiguration.SecurityTokenQS))), this.onCuePoint = function (e) { }, this.onProgress = function (e) { }, this.onLiveUTCTimeStamp = function (e) { }, this.onFirstPlay = function (e) { }, this.onAdPlay = function () { }, this.onFirstFullView = function () { }, this.onAdFullView = function () { }, this.onError = function () { }, this.play = function () { playPlayer(this.container) }, this.pause = function () { pausePlayer(this.container) }, this.next = function () { getNextShot(this.container, MainStreamingV3.instances[this.container].server, !0, null) }, this.prev = function () { getNextShot(this.container, MainStreamingV3.instances[this.container].server, !1, null) }, this.seek = function (e) { goToTimePlayer(e, this.container) }, this.muted = function (e) { mutedPlayer(e, this.container) }, this.onStall = function () { }, this.firstPlayCalled = !1, this.firstAdPlayCalled = !1, this.firstAdFullViewCalled = !1, this.firstFullViewCalled = !1, this.firstChildPlayCalled = !1, this.firstChildFullViewCalled = !1, MainStreamingV3.instances[this.container] = this } } }(), playPauseCurrentTime; function playPlayer(e) { castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : _MSPlayer.play() } function pausePlayer(e) { castValidator() ? msCastPlayOrPause(!0, !1) : _MSPlayer.pause() } function mutedPlayer(e, t) { _MSPlayer.muted = e } function goToTimePlayer(e, t) { castValidator() ? getCastContentStatus() && castSeekContent(e) : _MSPlayer.currentTime = e } function createElemWithAttributes(e, t, n) { return e = createElement(e), t && e.setAttribute("id", t), n && e.setAttribute("class", n), e } function setLogoOverlay(e, t, n) { var i = createElemWithAttributes("MSVD", null, "MSVD-" + _MSCurrContainer + "-logoClass"); i.style.zIndex = "9999999999 !important", i.style.position = "absolute"; var r = createElement("img"); switch (r.setAttribute("src", e.bigLogoIMG), i.style.padding = "10px", i.appendChild(r), r.style.height = 10 * t.clientHeight / 100 + "px", n) { case 1: i.style.top = "0", i.style.left = "0"; break; case 2: i.style.top = "0", i.style.right = "0"; break; case 3: i.style.bottom = "0", i.style.left = "0"; break; case 4: i.style.bottom = "0", i.style.right = "0"; break; default: i.style.bottom = "0", i.style.right = "0", i.style.display = "none" }return { logoDiv: i, logoImg: r } } function setPlayerHeader(e, t, n, i, r) { var o = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-video-header", "gradientHeader headerVisibility"), a = createElemWithAttributes("MSVD", "", "share-button-MSVD-" + t), s = createElement("img"), l = !1; s.setAttribute("src", i.shareButtonIMG), isChrome && "https:" == castProtocol && ((u = createElemWithAttributes("MSVD", "", "chromeCast-button-MSVD-" + t)).innerHTML = "", o.appendChild(u), isChrome || (u.style.visibility = "hidden"), "hidden" != u.style.visibility && (a.style.right = "30px")), n.shareUrl || (a.style.visibility = "hidden"), a.addEventListener("click", function () { 0 == l ? (l = !0, shareTheVideo(e, t, r, n)) : (destroyWindowShare(e, t), l = !1) }); var u = createElemWithAttributes("MSVD", null, "headerTxt"); return u.style.fontSize = "22px", u.style.textAlign = "left", u.style.color = "white", u.style.position = "relative", u.style.top = "15px", u.style.left = "20px", u.style.fontFamily = "Arial", u.innerHTML = null == n.title ? "" : n.title, a.appendChild(s), o.appendChild(a), o.appendChild(u), _MSHeaderText = o } function shareTheVideo(e, t, n, i) { var r = createElemWithAttributes("MSVD", "share-video" + t, "MSVD-share-popup"); r.style.maxHeight = "255px", r.style.maxWidth = "450px", r.style.width = (70 * e.clientWidth / 100).toString() + "px", r.style.height = (70 * e.clientHeight / 100).toString() + "px", fullscreenVersion = ["msFullscreenElement", "fullscreenElement", "webkitFullscreenElement"]; for (var o = 0; o < fullscreenVersion.length; o++)document[fullscreenVersion[o]] && (r.style.width = (70 * document[fullscreenVersion[o]].clientWidth / 100).toString() + "px", r.style.height = (70 * document[fullscreenVersion[o]].clientHeight / 100).toString() + "px"); var a = createElemWithAttributes("div"), s = createElemWithAttributes("div", null, "divImgSocial-MSVD"), l = createElement("img"); l.setAttribute("src", "/content/_assets/img/facebook.png"), l.width = 10 * e.clientWidth / 100, l.height = 10 * e.clientWidth / 100, s.appendChild(l), a.appendChild(s), l.addEventListener("click", function () { var e = "http://www.facebook.com/sharer/sharer.php?u=" + i.shareUrl; window.open(e, "_blank") }), t = createElemWithAttributes("div", null, "divImgSocial-MSVD"); var u = createElement("img"); u.setAttribute("src", "/content/_assets/img/twitter.png"), u.width = 10 * e.clientWidth / 100, u.height = 10 * e.clientWidth / 100, t.appendChild(u), a.appendChild(t), u.addEventListener("click", function () { var e = "http://twitter.com/intent/tweet?text=Check out this video " + i.shareUrl; window.open(e, "_blank") }), s = createElemWithAttributes("div", null, "divImgSocial-MSVD"); var c = createElement("img"); c.setAttribute("src", "/content/_assets/img/linkedin.png"), c.width = 10 * e.clientWidth / 100, c.height = 10 * e.clientWidth / 100, s.appendChild(c), a.appendChild(s), c.addEventListener("click", function () { var e = "https://www.linkedin.com/shareArticle?mini=true&url=" + i.shareUrl; window.open(e, "_blank") }); var d = createElemWithAttributes("input", null, "link-share-MSVD"); d.setAttribute("type", "text"), d.value = i.shareUrl, d.style.width = 70 * parseInt(r.style.width, 10) / 100 + "px", 450 < parseInt(r.style.width, 10) && (d.style.width = "315px"), t = createElemWithAttributes("div"); var m = createElemWithAttributes("span", null, "btn-copy-link-MSVD"); m.innerHTML = "Copy link", m.style.fontSize = 2 * e.clientWidth / 100 + "px", m.style.padding = 2 * e.clientWidth / 100 + "px", parseInt(m.style.fontSize, 10) < 12 && (m.style.fontSize = "12px"), 22 < parseInt(m.style.fontSize, 10) && (m.style.fontSize = "22px"), 14 < 2 * e.clientWidth / 100 && (m.style.padding = "10px"), t.appendChild(m), m.addEventListener("click", function () { d.select(), document.execCommand("copy") }), (s = createElemWithAttributes("div", null, "MSVD-share-div-content")).appendChild(a), s.appendChild(d), s.appendChild(t), r.appendChild(s), e.appendChild(r), 64 < 10 * e.clientWidth / 100 && (l.width = 64, l.height = 64, u.width = 64, u.height = 64, c.width = 64, c.height = 64), window.onresize = function (t) { r.style.height = (70 * e.clientHeight / 100).toString() + "px", l.height = 10 * e.clientHeight / 100, u.height = 10 * e.clientHeight / 100, c.height = 10 * e.clientHeight / 100, 64 < 10 * e.clientWidth / 100 && (l.width = 64, l.height = 64, u.width = 64, u.height = 64, c.width = 64, c.height = 64), m.style.fontSize = 2 * e.clientWidth / 100 + "px", m.style.padding = 2 * e.clientWidth / 100 + "px", parseInt(m.style.fontSize, 10) < 12 && (m.style.fontSize = "12px"), 22 < parseInt(m.style.fontSize, 10) && (m.style.fontSize = "22px"), 14 < 2 * e.clientWidth / 100 && (m.style.padding = "14px"), d.style.width = 70 * r.clientWidth / 100 + "px", 450 < r.clientWidth && (d.style.width = "315px") } } function destroyWindowShare(e, t) { t = getElementById("share-video" + t), e.removeChild(t) } function setPrevVideoDiv(e, t) { var n = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-prev", "next-prev-MSVD"); n.style.cursor = "pointer", n.style.position = "absolute", n.style.verticalAlign = "initial", n.style.marginTop = "3px", n.onmouseover = function () { i.setAttribute("src", e.prevButtonOverIMG) }, n.onmouseout = function () { i.setAttribute("src", e.prevButtonIMG) }; var i = createElemWithAttributes("img", "MSVD-" + _MSCurrContainer + "-prev-img"); return i.style.verticalAlign = "initial", i.setAttribute("src", e.prevButtonIMG), n.appendChild(i), { prevVideoImg: i, prevVideoDiv: n } } function setNextVideoDiv(e, t) { var n = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-next", "next-prev-MSVD"); n.style.left = "70px", n.style.position = "absolute", n.style.cursor = "pointer", n.style.marginTop = "3px"; var i = createElemWithAttributes("img", "MSVD-" + _MSCurrContainer + "-next-img"); return i.style.verticalAlign = "initial", n.onmouseover = function () { i.setAttribute("src", e.nextButtonOverIMG) }, n.onmouseout = function () { i.setAttribute("src", e.nextButtonIMG) }, i.setAttribute("src", e.nextButtonIMG), n.appendChild(i), n } function setPlayPauseVideoDiv(e, t, n) { var i = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-playPause", "next-prev-MSVD"); i.firstTimeAutoPlay = 0, i.style.left = "36px", i.style.position = "absolute", i.style.cursor = "pointer", i.style.verticalAlign = "initial", i.style.marginTop = "3px"; var r = createElement("img"); return r.style.verticalAlign = "initial", n.paused ? (r.setAttribute("src", e.playButtonIMG), i.onmouseover = function () { r.setAttribute("src", e.playButtonOverIMG) }, i.onmouseout = function () { r.setAttribute("src", e.playButtonIMG) }) : (r.setAttribute("src", e.pauseButtonIMG), i.onmouseover = function () { r.setAttribute("src", e.pauseButtonOverIMG) }, i.onmouseout = function () { r.setAttribute("src", e.pauseButtonIMG) }), r.setAttribute("class", "MsPlayer-play"), r.addEventListener("click", function () { n.paused || n.ended ? (_MSCanPlay || _MSIsAlternative) && (r.setAttribute("src", e.pauseButtonIMG), i.onmouseover = function () { r.setAttribute("src", e.pauseButtonOverIMG) }, i.onmouseout = function () { r.setAttribute("src", e.pauseButtonIMG) }, _MSPoster && (_MSPoster.style.visibility = "hidden"), castValidator() ? getCastContentStatus() ? (castPlayOrPause(), castPlayer.isPaused ? (r.setAttribute("src", e.playButtonIMG), i.onmouseover = function () { r.setAttribute("src", e.playButtonOverIMG) }, i.onmouseout = function () { r.setAttribute("src", e.playButtonIMG) }) : (r.setAttribute("src", e.pauseButtonIMG), i.onmouseover = function () { r.setAttribute("src", e.pauseButtonOverIMG) }, i.onmouseout = function () { r.setAttribute("src", e.pauseButtonIMG) })) : castLoadContent(_MSConnectString, _MSContentType) : n.play()) : (_MSPlayerIsPlaying = !1, r.setAttribute("src", e.playButtonIMG), i.onmouseover = function () { r.setAttribute("src", e.playButtonOverIMG) }, i.onmouseout = function () { r.setAttribute("src", e.playButtonIMG) }, castValidator() ? msCastPlayOrPause(!0, !1) : n.pause()) }), i.appendChild(r), { playPauseDiv: i, playPause: r } } function setDivCurrentTime(e, t) { var n = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-currentTime", "time-timer"); n.style.margin = "2px", n.style.marginTop = "4px", n.style.left = "115px", n.style.display = "inline-block", n.style.position = "absolute", n.style.verticalAlign = "initial", n.style.lineHeight = "21px"; var i = createElement("MSVD"); return i.id = "MSVD-" + _MSCurrContainer + "-currentTimeLabel", i.style.color = t.buttonForeColor, i.innerHTML = "00:00", n.appendChild(i), currentTimeObj = { div: n, label: i }, robotoFont(i), currentTimeObj } function setDivTotalTime(e, t) { var n = createElemWithAttributes("MSVD", null); return n.style.left = "170px", n.style.display = "inline-block", n.style.marginTop = "4px", n.style.position = "absolute", n.style.verticalAlign = "initial", n.style.lineHeight = "21px", (e = createElemWithAttributes("MSVD", "totalTime-" + e)).style.color = t.buttonForeColor, e.style.margin = "0px", n.appendChild(e), totalTimeObj = { div: n, label: e }, robotoFont(e), totalTimeObj } function fakeFullscreen(e, t) { window.moveTo(0, 0), document.all ? top.window.resizeTo(screen.availWidth, screen.availHeight) : (document.layers || document.getElementById) && (t.clientHeight < screen.height || t.clientWidth < screen.width ? (document.documentElement.webkitRequestFullScreen(), document.addEventListener("webkitfullscreenchange", function () { document.webkitIsFullScreen || normalScreen(e, t) }), t.style.height = screen.height + "px", t.style.width = screen.width + "px", t.style.position = "fixed", t.style.top = "0", t.style.left = "0", t.style.zIndex = "2147483647", document.getElementsByTagName("body")[0].style.overflow = "hidden") : normalScreen(e, t)) } function normalScreen(e, t) { document.webkitCancelFullScreen(), t.style.height = "", t.style.width = "", t.style.position = "relative" } function setFullscreen(e, t, n, i, r, o) { (e = createElemWithAttributes("button", "fullScreen-" + e, "MsPlayer fullscreen")).style.verticalAlign = "middle", e.style.display = "inline-block", e.setAttribute("type", "button"), e.innerText = "FullScreen", e.style.marginTop = "3px", e.style.marginLeft = "15px", e.style.marginRight = "9px", document.addEventListener("fullscreenchange", function (e) { a(!(!document.fullScreen && !document.fullscreenElement)) }), document.addEventListener("webkitfullscreenchange", function () { a(!!document.webkitIsFullScreen) }), document.addEventListener("mozfullscreenchange", function () { a(!!document.mozFullScreen) }), document.addEventListener("msfullscreenchange", function () { a(!!document.msFullscreenElement) }); var a = function (e) { i.setAttribute("data-fullscreen", !!e), 0 == e && (o.style.height = "") }; return e.addEventListener("click", function () { var e; (_MSCanPlay || _MSIsAlternative || n()) && (e = document.getElementById(_MSCurrContainer), n() ? (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? normalScreen(i, o) : document.msExitFullscreen && document.msExitFullscreen(), a(!1)) : (_MSVolumeBar = document.getElementById("MSVD-barVolume-" + _MSCurrContainer), e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullScreen ? fakeFullscreen(e, o) : e.msRequestFullscreen && e.msRequestFullscreen(), a(!0))) }), e } function setMuteObj(e) { var t = createElemWithAttributes("MSVD", "mute-" + e + "Div"); return t.setAttribute("style", "float: right;"), t.style.marginTop = "3px", t.style.marginLeft = "15px", (e = createElemWithAttributes("button", "mute-" + e, "MsPlayer mute")).setAttribute("type", "button"), e.style.height = "25px", e.innerText = "Mute", t.appendChild(e), { div: t, mute: e } } function setVolumeBarDiv(e, t, n, i, r) { var o = createElemWithAttributes("MSVD", "MSVD-divVolumeBar-" + e); o.style.zIndex = "9999999999999"; var a = createElemWithAttributes("input", "MSVD-barVolume-" + e, "MSVD"); a.style.width = "100px", a.style.outline = "none"; var s, l = setInterval(function () { 0 < _MSControls.clientHeight && (clearInterval(l), a.style.top = isIE && !useFlashPlayer ? "-" + _MSControls.clientHeight + "px" : "-" + (_MSControls.clientHeight + _MSMuteButton.clientHeight) + "px") }, 100); return a.style.left = "-41px", a.setAttribute("type", "range"), a.setAttribute("min", 0), a.setAttribute("max", 1), a.setAttribute("step", .01), e = getCookie("MS_Player-Volume"), r.startMute ? (n.muted = !0, changeButtonType(t, "unmute")) : (n.muted = !1, changeButtonType(t, "mute"), "" == e ? a.setAttribute("value", 1) : (a.setAttribute("value", e), _MSCurrentVolume = e, "0" == (n.volume = e) && (n.muted = !0, a.value = "0", changeButtonType(t, "unmute")))), 1 != getMobileOperatingSystem() ? (t.addEventListener("click", function () { 1 == n.muted || "0" == n.volume ? (n.muted = !1, 0 == _MSCurrentVolume && (_MSCurrentVolume = 1), n.volume = _MSCurrentVolume, a.value = _MSCurrentVolume, castValidator() && castSetVolume(n.volume), changeButtonType(t, "mute")) : (n.muted = !0, castValidator() ? castSetVolume("0") : n.volume = "0", a.value = "0", changeButtonType(t, "unmute")), setCookie("MS_Player-Volume", a.value) }), a.addEventListener("mousemove", function () { _IsMouseDown && (setCookie("MS_Player-Volume", a.value), _MSCurrentVolume = a.value, n.muted = !1, castValidator() ? castSetVolume(a.value) : n.volume = a.value, "0" == n.volume ? changeButtonType(t, "unmute") : changeButtonType(t, "mute")) }), a.addEventListener("click", function () { setCookie("MS_Player-Volume", a.value), _MSCurrentVolume = a.value, _IsMouseDown = !0 }), a.addEventListener("mouseup", function () { _IsMouseDown = !1 })) : (t.addEventListener("touchstart", function () { !n.muted && 0 != n.volume || (n.muted = !1, 0 == _MSCurrentVolume ? (_MSCurrentVolume = 1, n.volume = _MSCurrentVolume, a.value = _MSCurrentVolume) : n.volume = _MSCurrentVolume, _MSVolumeBar.value = _MSCurrentVolume, "0" == n.volume ? changeButtonType(t, "unmute") : changeButtonType(t, "mute")), s = setTimeout(function () { 1 == n.muted || "0" == n.volume ? (n.muted = !1, castValidator() ? castSetVolume("1") : n.volume = "1", a.value = "1", changeButtonType(t, "mute")) : (n.muted = !0, castValidator() ? castSetVolume("0") : n.volume = "0", a.value = "0", changeButtonType(t, "unmute")), setCookie("MS_Player-Volume", a.value) }, 1e3) }), t.addEventListener("touchend", function () { clearTimeout(s), "hidden" == a.style.visibility ? a.style.visibility = "visible" : a.style.visibility = "hidden" }), a.addEventListener("touchmove", function () { _MSVolumeBarTouched = !0, setCookie("MS_Player-Volume", a.value), _MSCurrentVolume = a.value, n.muted = !1, castValidator() ? castSetVolume(a.value) : n.volume = a.value, "0" == n.volume ? changeButtonType(t, "unmute") : changeButtonType(t, "mute") }), a.addEventListener("touchend", function () { _MSVolumeBarTouched = !1, a.style.visibility = "hidden" })), _MSVolumeBar = a, o.appendChild(a), volumeObj = { volumeBarDiv: o, volumeBar: a }, volumeObj } function setCCDiv(e) { var t = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-ccDiv"); return t.setAttribute("style", "float: right;"), t.style.marginTop = isIE && !useFlashPlayer ? parseInt(_MSFullscreenDiv.style.marginTop.split("px")[0]) + 2 + "px" : parseInt(_MSFullscreenDiv.style.marginTop.split("px")[0]) + 1 + "px", t.style.width = "25px", t.style.height = "20px", t.style.cursor = "pointer", t.innerText = "CC", "hidden" == _MSHd.style.visibility ? t.style.marginRight = "-26px" : t.style.marginRight = "12px", t.style.fontSize = "15px", t.style.fontWeight = "bolder", t.style.fontFamily = "Sans-serif", t.style.color = e.buttonForeColor, hls.subtitleTrack = -1, t.addEventListener("click", function () { 0 == hls.subtitleTrack ? (hls.subtitleTrack = -1, t.style.color = e.buttonForeColor) : (hls.subtitleTrack = 0, t.style.color = e.buttonHoverColor) }), t } function setHdDiv(e, t) { var n = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-divHd"); n.setAttribute("style", "float: right;"), n.style.marginTop = "3px"; var i = createElemWithAttributes("img", "", ""); return i.setAttribute("src", t.hdButtonIMG), i.style.verticalAlign = "initial", n.appendChild(i), _MSHd = n } MainStreamingV3.instances = new Array, MainStreamingV3.istanze = MainStreamingV3.instances, MainStreamingV3.onProgress = function (e, t) { e.onProgress(t) }, MainStreamingV3.onLiveUTCTimeStamp = function (e, t) { e.onLiveUTCTimeStamp(t) }, MainStreamingV3.onFirstPlay = function (e, t) { e.onFirstPlay(t) }, MainStreamingV3.onFirstFullView = function (e) { e.onFirstFullView() }, MainStreamingV3.onAdPlay = function (e) { e.onAdPlay() }, MainStreamingV3.onAdFullView = function (e) { e.onAdFullView() }, MainStreamingV3.onError = function (e) { e.onError() }, MainStreamingV3.onStall = function (e) { e.onStall() }, MainStreamingV3.collectCuePoints = function (script, sender) { eval(script) }, MainStreamingV3.matchLiveDate = function (e, t) { t = (t = (t = t.trim(t)).replace(/[^\x30-\x7E]/g, "")).substring(t.indexOf("UTCD") + 4), e.utcDate = t, null == e.timerUTCDate && (e.timerUTCDate = setInterval(MainStreamingV3.virtualSync, 1e3, e)) }, MainStreamingV3.virtualSync = function (e) { e.utcDate++, MainStreamingV3.matchCuePoint(e) }, MainStreamingV3.matchCuePoint = function (e) { for (var t = 0; t < e.cuepoints.length; t++)e.cuepoints[t].UtcDate < e.utcDate && (e.onCuePoint(e.cuepoints[t]), e.cuepoints.splice(t, t + 1)) }, MainStreamingV3.askCuePoints = function (e, t) { CallServer({ contentId: e.contentId, lastIdCuePoint: e.lastIdCuePoint, method: "listCuePoints" }, MainStreamingV3.collectCuePoints, e), null != t && MainStreamingV3.matchLiveDate(e, t) }, MainStreamingV3.onPlayerEvent = function (e, t, n) { var i, r = MainStreamingV3.instances[e.replace("MsPlayer-", "")], o = void 0 !== r.idVideoSession ? r.idVideoSession : null; switch (n != r.idSession && (o = n), t) { case "onProgress": MainStreamingV3.onProgress(r, n); break; case "onLiveUTCTimeStamp": 1 == r._MSConfiguration.cuepoints && MainStreamingV3.askCuePoints(r, n), MainStreamingV3.onLiveUTCTimeStamp(r, n); break; case "onFirstPlay": 1 == r._MSConfiguration.cuepoints && MainStreamingV3.askCuePoints(r), 0 == r.firstPlayCalled && (i = r.idSession, null != n && (i = n), CallServer({ sessionId: i, method: "stInt", idEvent: 1 }, function () { }), MainStreamingV3.onFirstPlay(r), r.firstPlayCalled = !0), null == o || r.idSession == o || r.firstChildPlayCalled || (CallServer({ sessionId: o, method: "stInt", idEvent: 1 }, function () { }), MainStreamingV3.onFirstPlay(r), r.firstChildPlayCalled = !0); break; case "onAdPlay": 0 == r.firstAdPlayCalled && (CallServer({ sessionId: r.idSession, method: "stInt", idEvent: 2 }, function () { }), MainStreamingV3.onAdPlay(r), r.firstAdPlayCalled = !0); break; case "onAdFullView": 0 == r.firstAdFullViewCalled && (CallServer({ sessionId: r.idSession, method: "stInt", idEvent: 3 }, function () { }), MainStreamingV3.onAdFullView(r), r.firstAdFullViewCalled = !0); break; case "onFirstFullView": 0 == r.firstFullViewCalled && (MainStreamingV3.onFirstFullView(r), r.firstFullViewCalled = !0); break; case "onError": MainStreamingV3.onError(r); break; case "onStall": MainStreamingV3.onStall(r) } }; var mouseDown = !1, purple, blue, cyan, green, yellow, orange, red; function setProgressBar(e, t) { var n = createElemWithAttributes("div", "MSVD-" + _MSCurrContainer + "-seekBar", "MSVD-progressBar"); n.style.backgroundColor = t.barEmptyColor, n.style.width = "97%", n.style.height = "8px", n.style.borderRadius = "8px", n.style.margin = "6px auto"; var i = createElemWithAttributes("div", "MSVD-" + _MSCurrContainer + "-trackProgress"); i.style.backgroundColor = t.barProgressColor, i.style.width = "0px", i.style.height = "8px", i.style.borderRadius = "8px", _MSTrack = i; var r = createElemWithAttributes("MSVD", "MSVD-" + _MSCurrContainer + "-anchor"); r.style.height = "18px", r.style.width = "18px", r.style.backgroundColor = t.barProgressColor, r.style.borderRadius = "50%", r.style.display = "inline-block", r.style.position = "relative", r.style.float = "right", r.style.bottom = "0px", r.style.margin = "-5px -8px 0px 0px", i.appendChild(r), _MSTrackAnchor = r, n.appendChild(i), r = { progressBar: n, track: i }, n.addEventListener("mousedown", function (e) { (_MSCanPlay || _MSIsAlternative) && (_MSTrackGo = !(mouseDown = !0), liveOff(), n.addEventListener("mousemove", ev), document.addEventListener("mousemove", ev)) }), n.addEventListener("mouseover", function () { n.style.cursor = "pointer", null != _MSThumbCanvas && (_MSThumbCanvas.style.visibility = "visible"), _MSPopOverTime.style.display = "", n.addEventListener("mousemove", ev) }), n.addEventListener("mouseout", function () { _MSTrackGo = !0, null == _MSThumbCanvas || mouseDown || (_MSThumbCanvas.style.visibility = "hidden"), _MSPopOverTime.style.display = "none" }); var o = !1, a = 0; return 1 == getMobileOperatingSystem() && (document.addEventListener("touchend", function (e) { o && (o = !1, e = e.changedTouches, playerSeek(100 * (parseInt(e[e.length - 1].clientX) - CustomerContainer.getBoundingClientRect().left - document.body.getBoundingClientRect().left) / n.clientWidth * _MSPlayer.duration / 100)), _MSTrackGo = !0 }), _MSContainer.addEventListener("touchend", function (e) { o || (a++, setTimeout(function () { a = 0 }, 500), 2 == a && (_MSPlayer.paused || _MSPlayer.ended ? castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : _MSPlayer.play() : castValidator() ? msCastPlayOrPause(!0, !1) : _MSPlayer.pause())) }), n.addEventListener("touchstart", function (e) { e.preventDefault(), o = !0 }), n.addEventListener("touchmove", function (e) { var t = e.changedTouches, r = parseInt(t[t.length - 1].clientX) - CustomerContainer.getBoundingClientRect().left - document.body.getBoundingClientRect().left, o = document.getElementById("MSVD-" + _MSCurrContainer + "-currentTimeLabel"); i.style.width = r + "px", e = parseInt(r * _MSPlayer.duration / n.clientWidth), o.innerText = timeConvert((t = e / 60 < 10 ? "0" + e / 60 + ":" : e / 60 + ":", t += e % 60 < 10 ? "0" + e % 60 : e % 60)) + " / ", t = document.getElementById("MSVD-" + _MSCurrContainer + "-seekBar"), r <= .015 * CustomerContainer.clientWidth ? (o.innerText = "00:00 / ", i.style.width = "1px") : r <= t.clientWidth - .015 * CustomerContainer.clientWidth ? i.style.width = r + "px" : (o.innerText = _MSLabelTotalTime.innerText + " / ", i.style.width = n.clientWidth + "px"), _MSTrackGo = !1 }), n.addEventListener("touchend", function () { _MSIsDVR && liveOff() })), document.addEventListener("mouseup", function (e) { _MSTrackGo = !0, mouseDown && e.clientX < .03 * CustomerContainer.clientWidth && (castValidator() ? getCastContentStatus() && castSeekContent(0) : _MSPlayer.currenTime = 0), mouseDown = !1, null != _MSThumbCanvas && (_MSThumbCanvas.style.visibility = "hidden"), document.removeEventListener("mousemove", ev), n.removeEventListener("mousemove", ev) }), r } function liveOff() { _MSDVRIsLiveOn = !1, _MSLiveBall && (_MSLiveBall.style.background = "#ddd"), _MSLabelTotalTime && (_MSLabelTotalTime.style.visibility = "visible") } function liveOn() { _MSDVRIsLiveOn = !0, _MSLiveBall && (_MSLiveBall.style.background = "red"), _MSTrack.style.width = document.getElementById("MSVD-" + _MSCurrContainer + "-seekBar").clientWidth + "px", _MSLabelTotalTime && (_MSLabelTotalTime.style.visibility = "hidden") } function ev() { var e = document.getElementById("MSVD-" + _MSCurrContainer + "-seekBar"), t = event.clientX - .015 * CustomerContainer.clientWidth - CustomerContainer.getBoundingClientRect().left - document.body.getBoundingClientRect().left, n = document.getElementById("MSVD-" + _MSCurrContainer + "-trackProgress"), i = parseInt(29 / e.clientWidth * t) + 1; mouseDown && (t <= .015 * CustomerContainer.clientWidth ? (_MSPopOverTime.innerText = "00:00", n.style.width = "1px", i = 1) : t <= e.clientWidth ? (n.style.width = t + "px", t <= 0 && (i = 1)) : (i = _MSThumbCount, _MSPopOverTime.innerText = _MSLabelTotalTime.innerText, n.style.width = n.clientWidth + "px")), null == _MSThumbCanvas && (_MSPopOverTime.style.left = t - (_MSPopOverTime.clientWidth / 2 - .015 * CustomerContainer.clientWidth) + "px"), null != _MSThumbCanvas && (n = _MSThumbCanvas.style.width.replace("px", ""), _MSThumbCanvas.style.backgroundPosition = "right " + n * i + "px bottom 0px", t < _MSThumbCanvas.clientWidth / 2 ? _MSThumbCanvas.style.left = "0px" : t + _MSThumbCanvas.clientWidth / 2 > CustomerContainer.clientWidth ? _MSThumbCanvas.style.left = CustomerContainer.clientWidth - _MSThumbCanvas.clientWidth + "px" : _MSThumbCanvas.style.left = t - n / 2 + .015 * CustomerContainer.clientWidth + "px", _MSPopOverTime.style.left = parseInt(_MSThumbCanvas.style.left.replace("px", "")) + _MSThumbCanvas.clientWidth / 2 - _MSPopOverTime.clientWidth / 2 + "px") } function addEqualizer() { var e, t = document.getElementById(_MSCurrContainer), n = document.createElement("MSVD"), i = 1; isMobile ? (purple = 15, cyan = 50, green = 30, yellow = blue = 20, orange = 70, red = 60, n.style.width = "210px", i = .5) : (purple = 160, cyan = 100, green = blue = 140, yellow = 180, orange = 70, red = 200, n.style.width = "380px"), n.id = "MSVD-audioEqualizer", n.className = "equalizer", n.style.bottom = CustomerContainer.clientHeight - (CustomerContainer.clientHeight - 55) + "px", n.style.textAlign = "center", n.style.margin = "10px auto", n.style.position = "absolute", n.style.right = "0px", n.style.left = "0px", (e = document.createElement("span")).id = "MSVD-purple", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = purple + "px", e.style.margin = "5px", e.style.backgroundColor = "#8800FF", n.appendChild(e), (e = document.createElement("span")).id = "MSVD-blue", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = blue + "px", e.style.margin = "5px", e.style.backgroundColor = "#0022FF", n.appendChild(e), (e = document.createElement("span")).id = "MSVD-cyan", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = cyan + "px", e.style.margin = "5px", e.style.backgroundColor = "#22FFFF", n.appendChild(e), (e = document.createElement("span")).id = "MSVD-green", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = green + "px", e.style.margin = "5px", e.style.backgroundColor = "#00BB00", n.appendChild(e), (e = document.createElement("span")).id = "MSVD-yellow", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = yellow + "px", e.style.margin = "5px", e.style.backgroundColor = "#FFFF00", n.appendChild(e), (e = document.createElement("span")).id = "MSVD-orange", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = orange + "px", e.style.margin = "5px", e.style.backgroundColor = "#FF6600", n.appendChild(e), (e = document.createElement("span")).id = "MSVD-red", e.className = "column", e.style.display = "inline-block", e.style.width = 40 * i + "px", e.style.height = red + "px", e.style.margin = "5px", e.style.backgroundColor = "#FF0000", n.appendChild(e), t.appendChild(n) } function randomNumber(e, t) { return number = Math.floor(Math.random() * (t - e) + e), number } function changeHeight(e, t) { var n = (CustomerContainer.clientHeight - t) / 2; return (t -= randomNumber(-20, 20)) > n && (t = n), t < 5 && (t = 5), e.style.height = t + "px", t } function animate() { _MSPlayerIsPlaying && (purple = changeHeight(document.getElementById("MSVD-purple"), purple), blue = changeHeight(document.getElementById("MSVD-blue"), blue), cyan = changeHeight(document.getElementById("MSVD-cyan"), cyan), green = changeHeight(document.getElementById("MSVD-green"), green), yellow = changeHeight(document.getElementById("MSVD-yellow"), yellow), orange = changeHeight(document.getElementById("MSVD-orange"), orange), red = changeHeight(document.getElementById("MSVD-red"), red), setTimeout(animate, 50)) } function addThumbCanvas() { if (_MSRequestHost != 'ebe77f1a6e9748b88b4ae82b37ad6fec' || _MSRequestHost != 'cdnposte.net') return; var e = CustomerContainer.clientWidth * _MSThumbRatio, t = CustomerContainer.clientHeight * _MSThumbRatio; _MSPlayer.videoHeight > _MSPlayer.videoWidth ? (i = t, t = e, e = i, t < 100 && (t = 100, e = 57)) : e < 100 && (e = 100, t = 57); var n = event.clientX, i = document.createElement("div"); i.id = "MSVD-thumbCanvas", i.className = "MSVD-thumbCanvas", i.style.width = e + "px", i.style.height = t + "px", i.style.zIndex = "9999999999 !important", i.style.position = "absolute", i.style.boxShadow = "0 0 25px #000", i.style.bottom = CustomerContainer.clientHeight - (CustomerContainer.clientHeight - (_MSControls.clientHeight + 7)) + "px", i.style.visibility = "hidden", i.style.background = "url('//" + _MSRequestHost + "/image/" + _MSContentId + "/thumbstrip')", i.style.backgroundSize = e * _MSThumbCount + "px " + t + "px", i.style.left = n - CustomerContainer.x - e / 2 + "px", _MSTrack.appendChild(i), _MSThumbCanvas = i } function calcImgOffset(e, t, n, i) { return (e - n / 100 * (100 * t / i)) / 2 } function setCssCustom(e, t) { var n = "#MSVD-videoControls-" + e + " {\n z-index: 999999999999; vertical-align: middle !important; \n position: absolute; \n width: 100%; bottom: 0; left:0;\nbackground-color: " + t.backgroundColor + "\n} \n"; return n += "\ndiv#" + e + " #MSVD-videoControls-" + e + " {list-style: none;opacity: 0;visibility: hidden;-webkit-transition: opacity 500ms, visibility 500ms;transition: opacity 500ms, visibility 500ms;}\ndiv#" + e + ":hover #MSVD-videoControls-" + e + " {visibility: visible;opacity: " + t.barOpacity / 100 + ";\n }", n += "\ninput[type=range]::-webkit-slider-thumb {background: " + t.buttonForeColor + "} input[type=range]::-moz-range-thumb {background: " + t.buttonForeColor + "} input[type=range]::-ms-thumb {background: " + t.buttonForeColor + "}", n += "\ndiv#" + e + " #MSVD-divVolumeBar-" + e + " #MSVD-barVolume-" + e + " {list-style: none;opacity: 0;visibility: hidden;-webkit-transition: opacity 500ms, visibility 500ms;transition: opacity 500ms, visibility 500ms;}", n += "\ndiv#" + e + " #MSVD-videoControls-" + e + " #divHd-" + e + " {list-style: none;opacity: 1;visibility: hidden;-webkit-transition: opacity 500ms, visibility 500ms;transition: opacity 500ms, visibility 500ms;}", n += "\ndiv#" + e + " .headerVisibility {list-style: none;opacity: 0;visibility: hidden;display: none;z-index: 99999999999999; -webkit-transition: opacity 500ms, visibility 500ms;transition: opacity 500ms, visibility 500ms;}div#" + e + ":hover .headerVisibility {visibility: visible;display: block;opacity: 1;}", n += "\n.share-button-MSVD-" + e + " {cursor: pointer; position: absolute; top: 0; right: 0; margin: 10px; opacity: 0.5; -webkit-transition: opacity 500ms; transition: opacity 500ms; } \n.share-button-MSVD-" + e + ":hover { opacity: 1; }", isChrome && "https:" == castProtocol && (n += "\n.chromeCast-button-MSVD-" + e + " {cursor: pointer; position: absolute; top: 0; right: 0; margin: 10px; opacity: 1; -webkit-transition: opacity 500ms; transition: opacity 500ms; }"), n += "\nbutton.MsPlayer { \n text-indent:-9999px; \n width:25px; \n height:25px; \n border:none; \n cursor:pointer; \n background:transparent no-repeat 0 0; }", n += "\nbutton.MsPlayer.stop{background-position: 0px -25px;}", n += '\nbutton.MsPlayer.mute{background-image: url("' + t.muteButtonIMG + '");}', n += '\nbutton.MsPlayer.unmute{background-image: url("' + t.unmuteButtonIMG + '");}', n += '\nbutton.MsPlayer.mute:hover{background-image: url("' + t.muteButtonOverIMG + '");}', n += '\nbutton.MsPlayer.unmute:hover{background-image: url("' + t.unmuteButtonOverIMG + '");}', n += '\nbutton.MsPlayer.fullscreen{background-image: url("' + t.fullscreenButtonIMG + '"); float: right;}', n += '\nbutton.MsPlayer.fullscreen:hover{background-image: url("' + t.fullscreenButtonOverIMG + '"); float: right;}', n += '\nbutton.MsPlayer.normalscreen{background-image: url("' + t.normalscreenButtonIMG + '");}', (n += "#MSVD-divVolumeBar-" + e + " {\n position: absolute; }") + "/*hide controls from shadow DOM in webkit browsers*/ \n/* hides controls only in fullscreen, but shows them in normal screen even if controls is set to false*/\n/*the most specific pseudo-element to target video controls on full screen*/\nvideo::-webkit-media-controls-enclosure {\n display: none !important;\n}" } function robotoFont(e) { e.style.fontFamily = "Arial" } function SetAudioPlayer(e, t, n, i, r, o, a, s) { var l = document.getElementsByTagName("head")[0]; getElementById(s), l = CreateAudioPlayer(t, o, i, r, s, e, l), document.getElementById(_MSConfiguration.containerID).appendChild(l) } function CreateAudioPlayer(e, t, n, i, r, o, a) { a = document.getElementsByTagName("head")[0]; var s = createElement("style"), l = generateCssCustom(n); return s.appendChild(document.createTextNode(l)), a.appendChild(s), mountPlayer(t, s = createContainerPlayer(n), o = createAudioPlayer(n, o), i = createTitle(n, i), createPlayPause(n, o), createTime(n, o), createProgressBar(n, o, t), createVolume(n, o), createOnAir(n, o), a) } function mountPlayer(e, t, n, i, r, o, a, s, l, u) { var c = createElement("link"); return c.setAttribute("rel", "stylesheet"), c.setAttribute("type", "text/css"), 20 == e.typeStream || 21 == e.typeStream ? (c.setAttribute("href", "//" + _MSRequestHost + "/content/_assets/css/html5AudioLive.css"), t.appendChild(n), t.appendChild(r), t.appendChild(o), t.appendChild(i)) : (c.setAttribute("href", "//" + _MSRequestHost + "/content/_assets/css/html5Audio.css"), t.appendChild(n), t.appendChild(i), t.appendChild(r), t.appendChild(o), t.appendChild(a)), t.appendChild(s), u.appendChild(c), t } function createContainerPlayer(e) { var t = createElemWithAttributes("MSVD", "MS-container", "MS-container-player"); return t.style.background = e.backgroundColor, t.style.opacity = e.barOpacity / 100, t } function createAudioPlayer(e, t) { var n = createElemWithAttributes("audio", "MS-audio", "MS-Player-audio"); n.preload = "none"; var i = createElement("source"); return i.src = t, i.type = "audio/mp3", n.appendChild(i), n } function createTitle(e, t) { var n = createElemWithAttributes("MSVD", "MS-audio-titleDiv", "MS-Player-audio-titleDiv"), i = createElemWithAttributes("span", "MS-audio-title", "MS-Player-audio-title"); return i.innerHTML = t, i.style.color = e.buttonForeColor, n.appendChild(i), n } function createPlayPause(e, t) { var n = createElemWithAttributes("MSVD", "MS-audio-pp", "MS-Player-audio-pp"), i = createElemWithAttributes("img", "MS-play", "MS-play-audio"); return i.src = e.playButtonIMG, i.style.color = e.buttonForeColor, n.onmouseover = function () { i.style.color = e.buttonHoverColor }, n.onmouseout = function () { i.style.color = e.buttonForeColor }, n.appendChild(i), t.paused ? (n.onmouseover = function () { i.src = e.playButtonOverIMG }, n.onmouseout = function () { i.src = e.playButtonIMG }) : (n.onmouseover = function () { i.src = e.pauseButtonOverIMG }, n.onmouseout = function () { i.src = e.pauseButtonIMG }), n.addEventListener("click", function () { t.paused ? (t.play(), n.onmouseover = function () { i.src = e.pauseButtonOverIMG }, n.onmouseout = function () { i.src = e.pauseButtonIMG }) : (t.pause(), n.onmouseover = function () { i.src = e.playButtonOverIMG }, n.onmouseout = function () { i.src = e.playButtonIMG }) }), n } function createTime(e, t) { var n = createElemWithAttributes("MSVD", "MS-audio-ctime", "MS-Player-audio-ctime"), i = createElemWithAttributes("span", "MS-audio-sctime", "MS-Player-audio-sctime"); return i.innerHTML = "00:00", n.style.color = e.buttonForeColor, n.appendChild(i), t.addEventListener("timeupdate", function () { var e = 100 / t.duration * t.currentTime; null != e && 0 <= e && e <= 100 && (e = (e = ((e = Math.floor(t.currentTime / 60)) < 10 ? "0" : "") + e + ":" + ((e = t.currentTime % 60) < 10 ? "0" : "") + e).substring(0, e.indexOf(".")), i.innerHTML = timeConvert(e, !1)) }), n } function createProgressBar(e, t, n) { var i = createElemWithAttributes("MSVD", "MS-audio-progress", "MS-Player-audio-progress"), r = createElemWithAttributes("MSVD", "MS-audio-progress-e", "MS-Player-audio-progress-e"), o = createElemWithAttributes("MSVD", "MS-audio-progress-h", "MS-Player-audio-progress-h"); return r.style.background = e.barEmptyColor, o.style.background = e.barProgressColor, i.appendChild(r), i.appendChild(o), setEventProgress(t, o, n), i } function setEventProgress(e, t, n) { 20 == n.typeStream && 21 == n.typeStream || e.addEventListener("timeupdate", function () { t.style.width = 100 % e.currentTime / e.totalTime + "%" }) } function createVolume(e, t) { var n = createElemWithAttributes("MSVD", "MS-audio-volume", "MS-Player-audio-volume"), i = createElemWithAttributes("img", "MS-volume", "MS-volume-audio"), r = createElemWithAttributes("input", "MS-range-volume", "MS-range-volume-audio"); return i.src = e.muteButtonIMG, i.style.color = e.buttonForeColor, n.onmouseover = function () { i.style.color = e.buttonHoverColor }, n.onmouseout = function () { i.style.color = e.buttonForeColor }, n.appendChild(i), n.appendChild(r), setEventVolume(t, i, r, e), n } function setEventVolume(e, t, n, i) { n.setAttribute("type", "range"), n.setAttribute("min", 0), n.setAttribute("max", 1), n.setAttribute("step", .01); var r = getCookie("MS_Player-Audio-Volume"); e.muted = !1, t.onmouseover = function () { t.src = i.muteButtonOverIMG }, t.onmouseout = function () { t.src = i.muteButtonIMG }, "" == r ? n.setAttribute("value", 1) : (n.setAttribute("value", r), "0" == (e.volume = r) && (e.muted = !0, n.value = "0", t.src = i.unmuteButtonIMG, t.onmouseover = function () { t.src = i.unmuteButtonOverIMG }, t.onmouseout = function () { t.src = i.unmuteButtonIMG })), t.addEventListener("click", function () { 1 == e.muted || "0" == e.volume ? (e.muted = !1, e.volume = "1", n.value = "1", t.onmouseover = function () { t.src = i.muteButtonOverIMG }, t.onmouseout = function () { t.src = i.muteButtonIMG }) : (e.muted = !0, e.volume = "0", n.value = "0", t.onmouseover = function () { t.src = i.unmuteButtonOverIMG }, t.onmouseout = function () { t.src = i.unmuteButtonIMG }), setCookie("MS_Player-Audio-Volume", n.value) }), n.addEventListener("mousemove", function () { setCookie("MS_Player-Volume", n.value), e.muted = !1, e.volume = n.value, "0" == e.volume ? (t.src = i.unmuteButtonIMG, t.onmouseover = function () { t.src = i.unmuteButtonOverIMG }, t.onmouseout = function () { t.src = i.unmuteButtonIMG }) : (t.src = i.muteButtonIMG, t.onmouseover = function () { t.src = i.muteButtonOverIMG }, t.onmouseout = function () { t.src = i.muteButtonIMG }) }) } function createOnAir(e, t) { var n = createElemWithAttributes("MSVD", "MS-audio-onairDiv", "MS-Player-audio-onairDiv"), i = createElemWithAttributes("span", "MS-audio-onair", "MS-Player-audio-onair"); return n.style.color = e.buttonForeColor, i.innerHTML = "ON AIR", n.appendChild(i), n } function setBigPlayButton(e) { var t = createElemWithAttributes("MSVD", "MS-big-play-div", "MS-big-play-div"), n = createElemWithAttributes("img", "MS-big-play-img", "MS-big-play-img"); return t.style.cursor = "pointer", t.style.position = "absolute", t.style.top = "calc(50% - (150px / 2))", t.style.left = "calc(50% - (150px / 2))", t.style.zIndex = "1", n.setAttribute("src", "//" + _MSRequestHost + "/_assets/img/playicon.png"), n.style.height = "150px", n.style.width = "150px", t.appendChild(n), t } function setPoster(e) { if (!e) return null; _MSPosterPath = e; var t = createElemWithAttributes("MSVD", "MS-big-play-poster"); t.style.cursor = "pointer", t.style.position = "absolute", t.style.zIndex = "1", t.style.width = "100%", t.style.height = "100%", t.style.left = "0", t.style.top = "0"; var n = createElement("MSVD"); n.style.position = "absolute", n.style.width = "100%", n.style.height = "100%", n.style.background = "black", n.style.display = "flex", n.style.justifyContent = "center", n.style.alignContent = "center"; var i = createElemWithAttributes("MSVD", "MS-big-play-poster-img", "MS-big-play-poster-img"); return i.style.background = "url('" + e + "')", i.style.backgroundSize = "contain", i.style.backgroundRepeat = "no-repeat", i.style.backgroundPosition = "center", i.style.width = "100%", i.style.height = "100%", i.style.position = "relative", i.style.zIndex = "2", _MSPosterImgDiv = i, n.appendChild(i), t.appendChild(n), _MSContainer.appendChild(t), t.addEventListener("click", function () { (_MSCanPlay || _MSIsAlternative) && (t.style.visibility = "hidden", castValidator() ? getCastContentStatus() ? msCastPlayOrPause(!1, !0) : castLoadContent(_MSConnectString, _MSContentType) : _MSPlayer.play()) }), t } function CheckUrl(e, t) { var n = new XMLHttpRequest; n.open("GET", e), document.referrer && n.setRequestHeader("X-MS-OriginalReferer", document.referrer), n.onreadystatechange = function () { 4 != n.readyState || 401 != n.status || (n.responseText ? createError(n.responseText, t) : createError("Content blocked by security policy", t)) }, n.send() } function createError(e, t) { document.getElementById(t).innerHTML = '
' + e.toUpperCase() + "
" } function generateCssCustom(e) { return "input[type=range]::-webkit-slider-runnable-track {width: 100%;height: 5px;cursor: pointer;animate: 0.2s;background: " + e.buttonForeColor + ";border-radius: 1.3px;margin-top: -20px;}input[type=range]::-webkit-slider-thumb {height: 15px;width: 15px;border-radius: 50%;background: " + e.buttonHoverColor + ";cursor: pointer;-webkit-appearance: none;margin-top: -5px;}input[type=range]:focus::-webkit-slider-runnable-track {background: " + e.buttonForeColor + ";}input[type=range]::-moz-range-track {width: 100%;height: 5px;cursor: pointer;animate: 0.2s;background: " + e.buttonForeColor + ";border-radius: 1.3px;}input[type=range]::-moz-range-thumb {height: 15px;width: 15px;border-radius: 50%;background: " + e.buttonForeColor + ";cursor: pointer;}input[type=range]::-ms-fill-lower {background: " + e.buttonForeColor + ";border-radius: 2.6px;}input[type=range]::-ms-fill-upper {background: " + e.buttonForeColor + ";border-radius: 2.6px;}input[type=range]::-ms-thumb {height: 15px;width: 15px;border-radius: 50%;background: #ffffff;cursor: pointer;}input[type=range]:focus::-ms-fill-lower {background: " + e.buttonForeColor + ";}input[type=range]:focus::-ms-fill-upper {background: " + e.buttonForeColor + ";}" } function castValidator() { return !(!isChrome || "function" != typeof getCastSessionStatus || "SESSION_STARTED" != getCastSessionStatus() && "SESSION_RESUMED" != getCastSessionStatus()) } window.addEventListener("resize", function () { isIE && _MSPoster && _MSPosterImage && (_MSPosterImgDiv.style.left = calcImgOffset(_MSPoster.clientWidth, _MSPoster.clientHeight, _MSPosterImage.width, _MSPosterImage.height) + "px"), 0 < _MSThumbCount && null != _MSThumbCanvas && (document.getElementById("MSVD-thumbCanvas").remove(), addThumbCanvas()), _MSTrack && (_MSTrack.style.width = _MSDVRIsLiveOn ? document.getElementById("MSVD-" + _MSCurrContainer + "-seekBar").clientWidth + "px" : Math.floor(_MSProgressBar.clientWidth * _MSPlayer.currentTime / _MSPlayer.duration - .015 * CustomerContainer.clientWidth) + "px") });