@theoplayer/web-ui 1.16.0 → 1.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/THEOplayerUI.d.ts +1 -1
- package/dist/THEOplayerUI.es5.js +2 -2
- package/dist/THEOplayerUI.es5.mjs +2 -2
- package/dist/THEOplayerUI.js +4 -4
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +4 -4
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/dist/THEOplayerUI.node.mjs +3 -3
- package/dist/THEOplayerUI.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/THEOplayerUI.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
!/*!
|
|
2
|
-
* THEOplayer Open Video UI for Web (v1.16.
|
|
2
|
+
* THEOplayer Open Video UI for Web (v1.16.2)
|
|
3
3
|
* License: MIT
|
|
4
4
|
*/function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("theoplayer/chromeless")):"function"==typeof define&&define.amd?define(["exports","theoplayer/chromeless"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).THEOplayerUI={},e.THEOplayer)}(this,function(e,t){"use strict";function r(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function a(e){r()&&window.ShadyCSS.styleElement(e)}function i(e,t){void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(e,t):null!=t&&/**
|
|
5
5
|
* @license
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
10
10
|
* Code distributed by Google as part of the polymer project is also
|
|
11
11
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12
|
-
*/function(e,t){let r=e.style;for(let[e,a]of Object.entries(t))r.setProperty(e,a)}(e,t)}function o(e,t){let a;return()=>{if(void 0===a){var i;(a=document.createElement("template")).innerHTML=t,t=void 0,i=a,r()&&window.ShadyCSS.prepareTemplate(i,e)}return a}}let n=o("theoplayer-control-bar","<style>:host{box-sizing:border-box;display:inline-flex}:host([hidden]){display:none!important}::slotted(theoplayer-time-range){flex-grow:1}</style><slot></slot>");class s extends HTMLElement{connectedCallback(){a(this)}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}).appendChild(n().content.cloneNode(!0))}}customElements.define("theoplayer-control-bar",s);var l,h,d,p=((l={}).CONFIGURATION="configuration",l.SOURCE="source",l.AUTOPLAY="autoplay",l.MUTED="muted",l.FULLSCREEN="fullscreen",l.FULLWINDOW="fullwindow",l.FLUID="fluid",l.DEVICE_TYPE="device-type",l.MOBILE="mobile",l.TV="tv",l.TV_FOCUS="tv-focus",l.MOBILE_ONLY="mobile-only",l.MOBILE_HIDDEN="mobile-hidden",l.TV_ONLY="tv-only",l.TV_HIDDEN="tv-hidden",l.USER_IDLE="user-idle",l.USER_IDLE_TIMEOUT="user-idle-timeout",l.NO_AUTO_HIDE="no-auto-hide",l.DISABLED="disabled",l.INERT="inert",l.HIDDEN="hidden",l.PAUSED="paused",l.ENDED="ended",l.VOLUME_LEVEL="volume-level",l.CASTING="casting",l.LOADING="loading",l.STREAM_TYPE="stream-type",l.LIVE="live",l.LIVE_ONLY="live-only",l.LIVE_HIDDEN="live-hidden",l.LIVE_THRESHOLD="live-threshold",l.DVR_THRESHOLD="dvr-threshold",l.REMAINING="remaining",l.REMAINING_WHEN_LIVE="remaining-when-live",l.SHOW_DURATION="show-duration",l.SEEK_OFFSET="seek-offset",l.MENU="menu",l.MENU_OPENED="menu-opened",l.MENU_CLOSE_ON_INPUT="menu-close-on-input",l.ARIA_LABEL="aria-label",l.ARIA_LIVE="aria-live",l.ARIA_CHECKED="aria-checked",l.HAS_AUDIO="has-audio",l.HAS_SUBTITLES="has-subtitles",l.HAS_ERROR="has-error",l.HAS_FIRST_PLAY="has-first-play",l.HAS_TITLE="has-title",l.CAST_STATE="cast-state",l.TRACK_TYPE="track-type",l.SHOW_OFF="show-off",l.PLAYING_AD="playing-ad",l.SHOW_AD_MARKERS="show-ad-markers",l.CLICKTHROUGH="clickthrough",l.PROPERTY="property",l.VALUE="value",l);let u=o("theoplayer-slot-container","<style>:host{display:contents}::slotted(:not([no-auto-hide])),slot{opacity:inherit}</style><slot></slot>");class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(u().content.cloneNode(!0))}}function y(){}function g(e){return e.nodeType===Node.ELEMENT_NODE}function m(e){return e instanceof HTMLElement}customElements.define("theoplayer-slot-container",c);let v="function"==typeof Array.isArray?Array.isArray:e=>"[object Array]"===Object.prototype.toString.call(e),b="function"==typeof Array.from?e=>Array.from(e):e=>Array.prototype.slice.call(e),_="function"==typeof Array.prototype.find?(e,t)=>e.find(t):(e,t)=>{for(let r=0;r<e.length;r++)if(t(e[r],r,e))return e[r]},f="function"==typeof Array.prototype.findIndex?(e,t)=>e.findIndex(t):(e,t)=>{for(let r=0;r<e.length;r++)if(t(e[r],r,e))return r;return -1},k="function"==typeof String.prototype.startsWith?(e,t)=>e.startsWith(t):(e,t)=>e.substring(0,t.length)===t,E="undefined"!=typeof Intl&&Intl.DisplayNames?e=>{let t=new Intl.DisplayNames([e,"en"],{type:"language",fallback:"none"}).of(e);if(
|
|
12
|
+
*/function(e,t){let r=e.style;for(let[e,a]of Object.entries(t))r.setProperty(e,a)}(e,t)}function o(e,t){let a;return()=>{if(void 0===a){var i;(a=document.createElement("template")).innerHTML=t,t=void 0,i=a,r()&&window.ShadyCSS.prepareTemplate(i,e)}return a}}let n=o("theoplayer-control-bar","<style>:host{box-sizing:border-box;display:inline-flex}:host([hidden]){display:none!important}::slotted(theoplayer-time-range){flex-grow:1}</style><slot></slot>");class s extends HTMLElement{connectedCallback(){a(this)}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}).appendChild(n().content.cloneNode(!0))}}customElements.define("theoplayer-control-bar",s);var l,h,d,p=((l={}).CONFIGURATION="configuration",l.SOURCE="source",l.AUTOPLAY="autoplay",l.MUTED="muted",l.FULLSCREEN="fullscreen",l.FULLWINDOW="fullwindow",l.FLUID="fluid",l.DEVICE_TYPE="device-type",l.MOBILE="mobile",l.TV="tv",l.TV_FOCUS="tv-focus",l.MOBILE_ONLY="mobile-only",l.MOBILE_HIDDEN="mobile-hidden",l.TV_ONLY="tv-only",l.TV_HIDDEN="tv-hidden",l.USER_IDLE="user-idle",l.USER_IDLE_TIMEOUT="user-idle-timeout",l.NO_AUTO_HIDE="no-auto-hide",l.DISABLED="disabled",l.INERT="inert",l.HIDDEN="hidden",l.PAUSED="paused",l.ENDED="ended",l.VOLUME_LEVEL="volume-level",l.CASTING="casting",l.LOADING="loading",l.STREAM_TYPE="stream-type",l.LIVE="live",l.LIVE_ONLY="live-only",l.LIVE_HIDDEN="live-hidden",l.LIVE_THRESHOLD="live-threshold",l.DVR_THRESHOLD="dvr-threshold",l.REMAINING="remaining",l.REMAINING_WHEN_LIVE="remaining-when-live",l.SHOW_DURATION="show-duration",l.SEEK_OFFSET="seek-offset",l.MENU="menu",l.MENU_OPENED="menu-opened",l.MENU_CLOSE_ON_INPUT="menu-close-on-input",l.ARIA_LABEL="aria-label",l.ARIA_LIVE="aria-live",l.ARIA_CHECKED="aria-checked",l.HAS_AUDIO="has-audio",l.HAS_SUBTITLES="has-subtitles",l.HAS_ERROR="has-error",l.HAS_FIRST_PLAY="has-first-play",l.HAS_TITLE="has-title",l.CAST_STATE="cast-state",l.TRACK_TYPE="track-type",l.SHOW_OFF="show-off",l.PLAYING_AD="playing-ad",l.SHOW_AD_MARKERS="show-ad-markers",l.CLICKTHROUGH="clickthrough",l.PROPERTY="property",l.VALUE="value",l);let u=o("theoplayer-slot-container","<style>:host{display:contents}::slotted(:not([no-auto-hide])),slot{opacity:inherit}</style><slot></slot>");class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(u().content.cloneNode(!0))}}function y(){}function g(e){return e.nodeType===Node.ELEMENT_NODE}function m(e){return e instanceof HTMLElement}customElements.define("theoplayer-slot-container",c);let v="function"==typeof Array.isArray?Array.isArray:e=>"[object Array]"===Object.prototype.toString.call(e),b="function"==typeof Array.from?e=>Array.from(e):e=>Array.prototype.slice.call(e),_="function"==typeof Array.prototype.find?(e,t)=>e.find(t):(e,t)=>{for(let r=0;r<e.length;r++)if(t(e[r],r,e))return e[r]},f="function"==typeof Array.prototype.findIndex?(e,t)=>e.findIndex(t):(e,t)=>{for(let r=0;r<e.length;r++)if(t(e[r],r,e))return r;return -1},k="function"==typeof String.prototype.startsWith?(e,t)=>e.startsWith(t):(e,t)=>e.substring(0,t.length)===t,E="undefined"!=typeof Intl&&Intl.DisplayNames?e=>{let t=new Intl.DisplayNames([e,"en"],{type:"language",fallback:"none"}),r=t.of(e);if(r){let e=t.resolvedOptions().locale,[a]=r;return a.toLocaleUpperCase(e)+r.slice(a.length)}}:e=>void 0;function w(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t}function x(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)}function T(e){if(e.shadowRoot)return e.shadowRoot.children;if("slot"===e.localName.toLowerCase()){let t=e.assignedNodes();if(t.length>0)return t.filter(g)}return m(e)?e.children:[]}function A(e){let t=[];for(let r of e.assignedNodes({flatten:!0}))g(r)&&(t.push(r),"theoplayer-slot-container"===r.nodeName.toLowerCase()&&t.push(...b(r.children)));return t}function C(e){let t=[];return function e(t,r){if(m(t)&&"none"!==getComputedStyle(t).display){if(t.hasAttribute("tabindex")&&Number(t.getAttribute("tabindex"))>=0){r.push(t);return}switch(t.tagName.toLowerCase()){case"button":case"input":case"textarea":case"select":case"details":r.push(t);break;case"a":t.href&&r.push(t);break;default:{let a=T(t);for(let t=0;t<a.length;t++)e(a[t],r)}}}}(e,t),t}function L(e){let t=e.nodeName.toLowerCase();if(t.indexOf("-")>=0){if(!customElements.get(t))return customElements.whenDefined(t);customElements.upgrade(e)}}var S=((h={})[h.ENTER=13]="ENTER",h[h.ESCAPE=27]="ESCAPE",h[h.SPACE=32]="SPACE",h[h.END=35]="END",h[h.HOME=36]="HOME",h[h.LEFT=37]="LEFT",h[h.UP=38]="UP",h[h.RIGHT=39]="RIGHT",h[h.DOWN=40]="DOWN",h[h.BACK_SAMSUNG=88]="BACK_SAMSUNG",h[h.BACK_WEBOS=461]="BACK_WEBOS",h[h.BACK_TIZEN=10009]="BACK_TIZEN",h);function P(e){return 37<=e&&e<=40}function R(e){return 10009===e||27===e||88===e||461===e}function M(e){return 13===e||32===e}function I(e,t=""){return`<style>:host{align-items:center;background:transparent;background:var(--theoplayer-control-background,transparent);box-sizing:border-box;color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));display:inline-flex;display:var(--theoplayer-before-first-play-display,inline-flex);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);justify-content:center;line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}:host([hidden]){display:none!important}:host(:not([disabled])){cursor:pointer}:host(:focus){box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}:host(:focus:not(:focus-visible)){box-shadow:none}:host(:hover){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}:host([aria-checked=true]){background:#fff;background:var(--theoplayer-button-checked-background,#fff);color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]){background:transparent;background:var(--theoplayer-control-background,transparent);color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}[part$=icon],[part~=icon]{font-size:0}::slotted(img),::slotted(svg),img,svg{fill:currentColor;color:#fff;color:var(--theoplayer-icon-color,#fff);height:24px;height:var(--theoplayer-button-icon-height,var(--theoplayer-control-height,24px));max-height:100%;max-width:100%;min-width:100%;transition:none;transition:var(--theoplayer-button-icon-transition,none);vertical-align:middle;width:24px;width:var(--theoplayer-button-icon-width,var(--theoplayer-control-height,24px))}::slotted(img),img{box-shadow:none;box-shadow:var(--theoplayer-button-icon-shadow,none)}::slotted(svg),svg{filter:drop-shadow(none);filter:drop-shadow(var(--theoplayer-button-icon-shadow,none))}:host(:hover:not([disabled])) ::slotted(img),:host(:hover:not([disabled])) img{box-shadow:0 0 4px hsla(0,0%,100%,.5);box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5))}:host(:hover:not([disabled])) ::slotted(svg),:host(:hover:not([disabled])) svg{filter:drop-shadow(0 0 4px rgba(255,255,255,.5));filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px rgba(255,255,255,.5)))}
|
|
13
13
|
${t}</style>${e}`}let O=o("theoplayer-button",I("<slot></slot>"));class N extends HTMLElement{static get observedAttributes(){return[p.DISABLED]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"polite"),this.hasAttribute(p.DISABLED)||this._enable()}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("keyup",this._onKeyUp)}get disabled(){return this.hasAttribute(p.DISABLED)}set disabled(e){x(this,p.DISABLED,e)}attributeChangedCallback(e,t,r){e===p.DISABLED&&r!==t&&(null!=r?this._disable():this._enable()),N.observedAttributes.indexOf(e)>=0&&i(this)}_enable(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKeyDown),this.setAttribute("aria-disabled","false"),this.setAttribute("tabindex","0")}_disable(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("keyup",this._onKeyUp),this.setAttribute("aria-disabled","true"),this.removeAttribute("tabindex"),this.blur()}handleClick(){}constructor(e){var t;super(),this._onClick=()=>{this.handleClick()},this._onKeyDown=e=>{!M(e.keyCode)||e.metaKey||e.altKey?this.removeEventListener("keyup",this._onKeyUp):this.addEventListener("keyup",this._onKeyUp)},this._onKeyUp=e=>{this.removeEventListener("keyup",this._onKeyUp),M(e.keyCode)&&this.handleClick()};let r=null!=(t=null==e?void 0:e.template)?t:O();this.attachShadow({mode:"open"}).appendChild(r.content.cloneNode(!0)),this._upgradeProperty("disabled")}}function D(e,t=""){return I(`<a>${e}</a>`,`:host{padding:0}a{color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));padding:10px;padding:var(--theoplayer-control-padding,10px);-webkit-text-decoration:none;text-decoration:none}:host(:focus){box-shadow:none;outline:0}a:focus{box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}a:focus:not(:focus-visible){box-shadow:none}:host([aria-checked=true]) a{color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]) a{color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}
|
|
14
14
|
${t}`)}customElements.define("theoplayer-button",N);let q=o("theoplayer-link-button",D("<slot></slot>"));class B extends HTMLElement{static get observedAttributes(){return[p.DISABLED]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"polite"),this.hasAttribute(p.DISABLED)||this._enable(),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)}disconnectedCallback(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)}get disabled(){return this.hasAttribute(p.DISABLED)}set disabled(e){x(this,p.DISABLED,e)}setLink(e,t){this._linkEl.href=e,this._linkEl.target=t}attributeChangedCallback(e,t,r){e===p.DISABLED&&r!==t&&(null!=r?this._disable():this._enable()),N.observedAttributes.indexOf(e)>=0&&i(this)}_enable(){this.setAttribute("aria-disabled","false"),this.setAttribute("tabindex","0")}_disable(){this.setAttribute("aria-disabled","true"),this.removeAttribute("tabindex"),this.blur()}handleClick(){}constructor(e){var t;super(),this._onKeyDown=e=>{if(!e.metaKey&&!e.altKey){if(e.keyCode===S.SPACE)e.preventDefault(),this._linkEl.click()}},this._onClick=()=>{!this.disabled&&this.handleClick()};let r=null!=(t=null==e?void 0:e.template)?t:q(),a=this.attachShadow({mode:"open",delegatesFocus:!0});a.appendChild(r.content.cloneNode(!0)),this._linkEl=a.querySelector("a"),this._upgradeProperty("disabled")}}customElements.define("theoplayer-link-button",B);let F="theoplayerUiObservedProperties";function U(e){return F in e&&v(e[F])}function H(e,t){return class extends e{get[F](){return t}}}async function V(e,t,r){if(t.contains(e))return;e.nodeName.indexOf("-")>=0&&!U(e)&&(await Promise.resolve(),await customElements.whenDefined(e.nodeName.toLowerCase()),customElements.upgrade(e)),U(e)&&r(e);let a=T(e);a.length>0&&await Promise.all(b(a).map(e=>V(e,t,r)))}let z=o("theoplayer-play-button",I(`<span part="play-icon"><slot name="play-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 90 90" width="24" height="24"><path d="M77.504 50.868c-7.236 5.156-16.584 10.914-28.04 17.269-11.044 6.207-20.729 11.081-29.053 14.625l-9.224 3.43c-.581-2.493-1.125-6.188-1.632-11.08-1.143-9.75-1.715-20.513-1.715-32.288 0-10.781.777-20.858 2.333-30.234l2.251-10.772 9.787 3.29c8.476 3.375 17.663 8.166 27.563 14.373 10.48 6.562 19.472 12.805 26.97 18.73 3.749 2.982 6.449 5.279 8.099 6.891l-7.339 5.766"/></svg>
|
|
15
15
|
</slot></span><span part="pause-icon"><slot name="pause-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M2.108 1.914Q2.108.5 3.522.5h4.171q1.415 0 1.415 1.414v20.172q0 1.414-1.415 1.414H3.522q-1.414 0-1.414-1.414zm12.784 0Q14.892.5 16.307.5h4.171q1.414 0 1.414 1.414v20.172q0 1.414-1.414 1.414h-4.171q-1.415 0-1.415-1.414z"/></svg>
|
|
@@ -31,12 +31,12 @@ ${t}</style><div part="container"><div part="background"></div><div part="pointe
|
|
|
31
31
|
</slot></span><slot name="spacer"> </slot><span part="text"><slot name="text">LIVE</slot></span>`,"[part=icon] ::slotted(svg),[part=icon] svg{fill:#8c8c8c;fill:var(--theoplayer-live-button-color,#8c8c8c)}:host([live]:not([paused])) [part=icon] ::slotted(svg),:host([live]:not([paused])) [part=icon] svg{fill:red;fill:var(--theoplayer-live-button-active-color,red)}")),rh=["play","pause","playing","emptied"],rd=["seeking","seeked","timeupdate","durationchange","emptied"];class rp extends H(N,["player","streamType"]){static get observedAttributes(){return[...N.observedAttributes,p.STREAM_TYPE,p.LIVE,p.PAUSED,p.LIVE_THRESHOLD]}connectedCallback(){super.connectedCallback(),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"seek to live")}get paused(){return this.hasAttribute(p.PAUSED)}set paused(e){x(this,p.PAUSED,e)}get streamType(){return this.getAttribute(p.STREAM_TYPE)||"vod"}set streamType(e){this.setAttribute(p.STREAM_TYPE,e)}get liveThreshold(){var e;return Number(null!=(e=this.getAttribute(p.LIVE_THRESHOLD))?e:10)}set liveThreshold(e){e=Number(e),this.setAttribute(p.LIVE_THRESHOLD,String(isNaN(e)?0:e))}get live(){return this.hasAttribute(p.LIVE)}set live(e){x(this,p.LIVE,e)}get player(){return this._player}set player(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(rh,this._updatePaused),this._player.removeEventListener(rd,this._updateLive)),this._player=e,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(rh,this._updatePaused),this._player.addEventListener(rd,this._updateLive)))}handleClick(){void 0!==this._player&&(this._player.hesp&&void 0!==this._player.hesp.manifest?this._player.hesp.goLive():(this._player.currentTime=1/0,this._player.play()))}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),r!==t&&(e===p.LIVE_THRESHOLD&&this._updateLive(),rp.observedAttributes.indexOf(e)>=0&&i(this))}constructor(){super({template:rl()}),this._updatePaused=()=>{this.paused=void 0===this._player||this._player.paused},this._updateLive=()=>{let e=void 0!==this._player&&function(e,t){if(e.duration===1/0){let r=e.seekable;return!(r.length>0)||r.end(r.length-1)-e.currentTime<=t}return!1}(this._player,this.liveThreshold);this.live!==e&&(this.live=e)},this._upgradeProperty("paused"),this._upgradeProperty("streamType"),this._upgradeProperty("liveThreshold"),this._upgradeProperty("live"),this._upgradeProperty("player")}}customElements.define("theoplayer-live-button",rp);let ru=o("theoplayer-ad-display",`<style>${j}
|
|
32
32
|
:host{padding:5px 10px;padding:calc(var(--theoplayer-control-padding, 10px) - var(--theoplayer-ad-display-padding, 5px)) var(--theoplayer-control-padding,10px);pointer-events:none}span{background:#ffc50f;background:var(--theoplayer-ad-display-background,#ffc50f);border-radius:2px;border-radius:var(--theoplayer-ad-display-border-radius,2px);color:#000;color:var(--theoplayer-ad-display-text-color,#000);display:inline-block;padding:5px;padding:var(--theoplayer-ad-display-padding,5px)}</style><span></span>`),rc=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"];class ry extends H(HTMLElement,["player"]){_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._updateFromPlayer()}get player(){return this._player}set player(e){var t,r;this._player!==e&&(null==(t=this._ads)||t.removeEventListener(rc,this._updateFromPlayer),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),null==(r=this._ads)||r.addEventListener(rc,this._updateFromPlayer))}constructor(){super(),this._updateFromPlayer=()=>{var e,t,r;let a=null==(e=this._player)?void 0:e.ads,i=(null!=(r=null==a?void 0:null==(t=a.currentAdBreak)?void 0:t.ads)?r:[]).filter(tU);if(void 0===a||!a.playing||0===i.length){w(this._spanEl,""),this.style.display="none";return}if(i.length>1){let e=_(this._player.ads.currentAds||[],tU);if(e){let t=i.indexOf(e);if(t>=0){w(this._spanEl,`Ad ${t+1} of ${i.length}`),this.style.display="";return}}}w(this._spanEl,"Ad"),this.style.display=""};let e=this.attachShadow({mode:"open"});e.appendChild(ru().content.cloneNode(!0)),this._spanEl=e.querySelector("span"),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-display",ry);let rg=o("theoplayer-ad-countdown",`<style>${j}
|
|
33
33
|
:host{pointer-events:none}</style><span></span>`),rm=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"];class rv extends H(HTMLElement,["player"]){_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._update()}get player(){return this._player}set player(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rm,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rm,this._onAdChange))}constructor(){super(),this._onAdChange=()=>{var e,t,r;(null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(this._player.removeEventListener("timeupdate",this._update),this._player.addEventListener("timeupdate",this._update)):null==(r=this._player)||r.removeEventListener("timeupdate",this._update),this._update()},this._update=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads,a=null==r?void 0:null==(t=r.currentAdBreak)?void 0:t.maxRemainingDuration;if(void 0===r||!r.playing||void 0===a||a<0){w(this._spanEl,""),this.style.display="none";return}a=Math.ceil(a),w(this._spanEl,`Content will resume in ${a}s`),this.style.display=""};let e=this.attachShadow({mode:"open"});e.appendChild(rg().content.cloneNode(!0)),this._spanEl=e.querySelector("span"),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-countdown",rv);let rb=o("theoplayer-ad-clickthrough-button",D("<slot>Visit Advertiser</slot>")),r_=["adbegin","adend","adloaded","updatead","adskip"];class rf extends H(B,["player"]){static get observedAttributes(){return[...B.observedAttributes,p.CLICKTHROUGH]}connectedCallback(){super.connectedCallback(),this._updateFromPlayer(),null==this.clickThrough&&(this.disabled=!0,this.style.display="none")}get clickThrough(){return this.getAttribute(p.CLICKTHROUGH)}set clickThrough(e){null==e?this.removeAttribute(p.CLICKTHROUGH):this.setAttribute(p.CLICKTHROUGH,e)}get player(){return this._player}set player(e){var t,r;this._player!==e&&(null==(t=this._ads)||t.removeEventListener(r_,this._updateFromPlayer),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),null==(r=this._ads)||r.addEventListener(r_,this._updateFromPlayer))}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),e===p.CLICKTHROUGH&&r!==t){let e=null!=r,t=r?String(r).trim():"#";this.setLink(t,"_blank"),this.disabled=!e,e?this.style.display="":this.style.display="none"}rf.observedAttributes.indexOf(e)>=0&&i(this)}handleClick(){var e;null==(e=this._player)||e.pause()}constructor(){super({template:rb()}),this._updateFromPlayer=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads;if(!r||!r.playing){this.clickThrough=null;return}let a=_(null!=(t=r.currentAds)?t:[],tU);if(void 0===a||"google-ima"===a.integration){this.clickThrough=null;return}let i=a.clickThrough;if(!i){this.clickThrough=null;return}this.clickThrough=i},this._upgradeProperty("clickThrough"),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-clickthrough-button",rf);let rk=o("theoplayer-ad-skip-button",I(`<span part="countdown">Skip in 0 seconds</span><span part="skip"><span part="skip-text"><slot name="skip-text">Skip Ad</slot></span> <span part="skip-icon"><slot name="skip-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.5 18q-.425 0-.712-.288-.288-.287-.288-.712V7q0-.425.288-.713Q17.075 6 17.5 6t.712.287q.288.288.288.713v10q0 .425-.288.712-.287.288-.712.288ZM7.05 16.975q-.5.35-1.025.05-.525-.3-.525-.9v-8.25q0-.6.525-.888.525-.287 1.025.038l6.2 4.15q.45.3.45.825 0 .525-.45.825Z"/></svg>
|
|
34
|
-
</slot></span></span>`,":host{background:rgba(0,0,0,.7);background:var(--theoplayer-ad-skip-background,rgba(0,0,0,.7));border:1px solid hsla(0,0%,100%,.5);border:var(--theoplayer-ad-skip-border,1px solid hsla(0,0%,100%,.5));color:#fff;color:var(--theoplayer-ad-skip-color,#fff);display:grid;grid-template-columns:1fr;grid-template-rows:1fr}:host(:hover){background:rgba(0,0,0,.9);background:var(--theoplayer-ad-skip-hover-background,rgba(0,0,0,.9));border:1px solid #fff;border:var(--theoplayer-ad-skip-hover-border,1px solid #fff);color:#fff;color:var(--theoplayer-ad-skip-hover-color,var(--theoplayer-ad-skip-color,#fff))}:host([disabled]){background:transparent;background:var(--theoplayer-ad-skip-countdown-background,transparent);border:1px solid transparent;border:var(--theoplayer-ad-skip-countdown-border,1px solid transparent);color:#fff;color:var(--theoplayer-ad-skip-countdown-color,var(--theoplayer-ad-skip-color,#fff))}[part=countdown],[part=skip]{align-items:center;display:flex;grid-column:1;grid-row:1}[part=skip]{font-size:14px;font-size:var(--theoplayer-ad-skip-font-size,var(--theoplayer-text-font-size,14px));line-height:24px;line-height:var(--theoplayer-ad-skip-line-height,var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px)))}[part=skip-icon]{padding-left:10px;padding-left:var(--theoplayer-control-padding,10px)}[part=skip-icon] ::slotted(svg),[part=skip-icon] svg{height:24px;height:var(--theoplayer-ad-skip-icon-height,var(--theoplayer-control-height,24px));width:24px;width:var(--theoplayer-ad-skip-icon-width,var(--theoplayer-control-height,24px))}")),rE=["adbegin","adend","adloaded","updatead","adskip"];class rw extends H(N,["player"]){static get observedAttributes(){return[...N.observedAttributes]}connectedCallback(){super.connectedCallback(),this._update()}get player(){return this._player}set player(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rE,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rE,this._onAdChange))}handleClick(){var e,t;null==(t=this._player)||null==(e=t.ads)||e.skip()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),rw.observedAttributes.indexOf(e)>=0&&i(this)}constructor(){super({template:rk()}),this._onAdChange=()=>{var e,t,r;(null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(this._player.removeEventListener("timeupdate",this._update),this._player.addEventListener("timeupdate",this._update)):null==(r=this._player)||r.removeEventListener("timeupdate",this._update),this._update()},this._update=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads;if(!r||!r.playing){this.style.display="none";return}let a=_(null!=(t=r.currentAds)?t:[],tU);if(void 0===a||"google-ima"===a.integration){this.style.display="none";return}let i=a.skipOffset;if(void 0===i||i<0||void 0!==a.duration&&i>=a.duration){this.style.display="none";return}let o=this._player.currentTime;if(o<i){let e=Math.ceil(i-o);w(this._countdownEl,`Skip in ${e}s`),this._countdownEl.style.visibility="visible",this._skipEl.style.visibility="hidden",this._skipEl.style.pointerEvents="none",this.style.display="",this.setAttribute(p.DISABLED,""),this.setAttribute(p.ARIA_LIVE,"off")}else this._countdownEl.style.visibility="hidden",this._skipEl.style.visibility="visible",this._skipEl.style.pointerEvents="",this.style.display="",this.removeAttribute(p.DISABLED),this.setAttribute(p.ARIA_LIVE,"polite")},this._countdownEl=this.shadowRoot.querySelector('[part="countdown"]'),this._skipEl=this.shadowRoot.querySelector('[part="skip"]'),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-skip-button",rw);var rx=((d={}).TopControlBar="top-control-bar",d.BottomControlBar="bottom-control-bar",d.Menu="menu",d);let rT=[],rA=(()=>{if("undefined"!=typeof document){for(let e of[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]])if(e[1]in document)return{requestFullscreen_:e[0],exitFullscreen_:e[1],fullscreenElement_:e[2],fullscreenEnabled_:e[3],fullscreenchange_:e[4],fullscreenerror_:e[5]}}})();function rC(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;let e=navigator.userAgent;return!!e&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(e)}function rL(){if("object"!=typeof navigator)return!1;let e=navigator.userAgent;return!!e&&/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(e)}let rS="theoplayerstreamtypechange",rP="theoplayeruseridlechange",rR="theoplayerready",rM="theoplayer-ui-global-styles",rI=!1,rO=o("theoplayer-ui",'<style>:host{background:#000;background:var(--theoplayer-background,#000);box-sizing:border-box;container-name:theoplayer-ui-container;container-type:size;display:inline-block;height:0;height:var(--theoplayer-height,calc((var(--theoplayer-aspect-ratio, 16 / 9))*0));min-width:300px;min-width:var(--theoplayer-min-width,300px);padding-bottom:56.25%;padding-bottom:calc(100%/(var(--theoplayer-aspect-ratio, 16 / 9)));position:relative}:host([hidden]){display:none!important}:host([fullscreen]){height:100%!important;padding:0!important;width:100%!important}:host(:-webkit-full-screen){height:100%!important;padding:0!important;width:100%!important}:host(:fullscreen){height:100%!important;padding:0!important;width:100%!important}:host([fullwindow]){bottom:0!important;left:0!important;overflow:hidden!important;position:fixed!important;right:0!important;top:0!important;z-index:1000!important}:host([fluid]){--theoplayer-aspect-ratio:var(--theoplayer-video-width,16) /var(--theoplayer-video-height,9)}[part~=chrome]{position:relative}[part~=layer]{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}[part~=chrome],[part~=layer]:not([part~=media-layer]){display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[part~=media-layer] video{border-radius:0;border-radius:var(--theoplayer-video-border-radius,0);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--theoplayer-video-object-fit,contain);object-fit:var(--theoplayer-video-object-fit,contain)}[part~=media-layer] .theoplayer-ad-linear{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}[part~=media-layer] .theo-ad-remaining-container,[part~=media-layer] .theoplayer-ad-skip,[part~=media-layer] .theoplayer-ad-touch-clickthrough{display:none!important}[part~=chrome],[part~=vertical-layer]{align-items:stretch;flex-flow:column nowrap}[part~=centered]{align-items:center;justify-content:center}[part~=middle]{flex-grow:1}[part~=vertical-layer]:before{background:transparent;background:var(--theoplayer-control-backdrop-background,transparent);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;bottom:var(--theoplayer-menu-offset-bottom,0);padding:10px;padding:var(--theoplayer-menu-layer-padding,10px);top:0;top:var(--theoplayer-menu-offset-top,0)}[part=menu]{background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:flex;justify-self:stretch}[part=menu] ::slotted(*){align-self:stretch;flex-grow:1;justify-self:stretch}:host(:not([mobile])) [part=menu]{margin:auto 0 0 auto;margin:var(--theoplayer-menu-margin-top,auto) var(--theoplayer-menu-margin-right,0) var(--theoplayer-menu-margin-bottom,0) var(--theoplayer-menu-margin-left,auto);max-height:100%;min-width:200px;min-width:var(--theoplayer-menu-min-width,200px)}:host([mobile]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([tv]) [part~=menu-layer]{left:auto}:host([tv]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [part~=vertical-layer],:host([menu-opened][tv]) [part~=vertical-layer]{display:none!important}@container theoplayer-ui-container (max-width: 500px) or (max-height: 300px){:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;left:0;padding:0;right:0;top:0}:host(:not([mobile])) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([menu-opened]) [part~=vertical-layer]{display:none!important}}[part~=error-layer]{align-items:center;background:rgba(0,0,0,.5);background:var(--theoplayer-error-background,rgba(0,0,0,.5));justify-content:center}:host(:not([has-error])) [part~=error-layer],:host([has-error]) [part~=layer]:not([part~=media-layer]):not([part~=error-layer]){display:none!important}[part~=chrome] ::slotted(theoplayer-control-bar){align-self:stretch}theoplayer-gesture-receiver{flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [part~=chrome] ::slotted([tv-only]),:host([tv]) [part~=chrome] ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [part~=chrome] ::slotted([live-hidden]),:host([stream-type=vod]) [part~=chrome] ::slotted([live-only]){display:none!important}:host(:not([playing-ad])) [part~=chrome] ::slotted([ad-only]),:host([playing-ad]) [part~=chrome] ::slotted([ad-hidden]){display:none!important}:host([user-idle]){cursor:none}:host([user-idle]) [part~=chrome] ::slotted(:not([no-auto-hide])){opacity:0;transition:opacity 1s}:host([user-idle]) [part~=vertical-layer]:before{opacity:0;transition:opacity 1s}</style><div part="layer media-layer"></div><div part="layer gesture-layer"><theoplayer-gesture-receiver></theoplayer-gesture-receiver></div><div part="layer vertical-layer"><div part="top chrome"><slot name="top-chrome"></slot></div><div part="middle chrome"><slot name="middle-chrome"></slot></div><div part="layer centered-layer centered loading"><slot name="centered-loading"></slot></div><div part="layer centered-layer centered chrome"><slot name="centered-chrome"></slot></div><div part="bottom chrome"><slot></slot></div></div><div part="layer menu-layer"><theoplayer-menu-group part="menu"><slot name="menu"></slot></theoplayer-menu-group></div><div part="layer error-layer"><slot name="error"></slot></div>'),rN="theoplayer-ui-full-window";class rD extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FULLSCREEN,p.FLUID,p.DEVICE_TYPE,p.PAUSED,p.ENDED,p.CASTING,p.PLAYING_AD,p.HAS_ERROR,p.HAS_FIRST_PLAY,p.STREAM_TYPE,p.DVR_THRESHOLD,p.USER_IDLE,p.USER_IDLE_TIMEOUT]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._player}get configuration(){return this._configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this._setConfiguration(e)}_setConfiguration(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()}get source(){return this._player?this._player.source:this._source}set source(e){this.removeAttribute(p.SOURCE),this._setSource(e)}_setSource(e){this._player?this._player.source=e:this._source=e}get fluid(){return this.hasAttribute(p.FLUID)}set fluid(e){x(this,p.FLUID,e)}get muted(){return this.hasAttribute(p.MUTED)}set muted(e){x(this,p.MUTED,e)}get autoplay(){return this.hasAttribute(p.AUTOPLAY)}set autoplay(e){x(this,p.AUTOPLAY,e)}get fullscreen(){return this.hasAttribute(p.FULLSCREEN)}get paused(){return this.hasAttribute(p.PAUSED)}get ended(){return this.hasAttribute(p.ENDED)}get casting(){return this.hasAttribute(p.CASTING)}get userIdle(){return this.hasAttribute(p.USER_IDLE)}set userIdle(e){this.userIdle!==e&&(x(this,p.USER_IDLE,e),this.dispatchEvent(ed(rP)))}get userIdleTimeout(){var e;let t="tv"===this.deviceType?5:2;return Number(null!=(e=this.getAttribute(p.USER_IDLE_TIMEOUT))?e:t)}set userIdleTimeout(e){e=Number(e),this.setAttribute(p.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}get deviceType(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"}get streamType(){return this.getAttribute(p.STREAM_TYPE)||"vod"}set streamType(e){this.setAttribute(p.STREAM_TYPE,e)}get dvrThreshold(){var e;return Number(null!=(e=this.getAttribute(p.DVR_THRESHOLD))?e:60)}set dvrThreshold(e){e=Number(e),this.setAttribute(p.DVR_THRESHOLD,String(isNaN(e)?0:e))}connectedCallback(){var e;if(a(this),!function(){if(rI)return;if(document.getElementById(rM)){rI=!0;return}let e=document.createElement("style");e.id=rM,w(e,"html.theoplayer-ui-full-window{overflow:hidden!important}html.theoplayer-ui-full-window>body{height:100%!important;margin:0!important;padding:0!important;width:100%!important}"),document.head.appendChild(e),rI=!0}(),this._menuGroup instanceof eC||customElements.upgrade(this._menuGroup),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}for(let e of(this.hasAttribute(p.PAUSED)||this.setAttribute(p.PAUSED,""),this.tryInitializePlayer_(),this._stateReceivers))this.propagateStateToReceiver_(e);V(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(e=this._resizeObserver)||e.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(e_,this._onCloseMenu),this._menuGroup.addEventListener(ef,this._onMenuChange),void 0!==rA&&(document.addEventListener(rA.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rA.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),"tv"===this.deviceType&&window.addEventListener("keydown",this._onTvKeyDown),this.hasAttribute(p.FULLWINDOW)&&window.addEventListener("keydown",this._exitFullscreenOnEsc),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)}tryInitializePlayer_(){void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)&&(this._player=new t.ChromelessPlayer(this._playerEl,this._configuration),this._source&&(this._player.source=this._source,this._source=void 0),this._player.muted=this.muted,this._player.autoplay=this.autoplay,this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this.addPlayerListeners_(this._player),this.propagatePlayerToAllReceivers_(),this.dispatchEvent(ed(rR)))}disconnectedCallback(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange),this._menuGroup.removeEventListener(e_,this._onCloseMenu),this._menuGroup.removeEventListener(ef,this._onMenuChange),void 0!==rA&&(document.removeEventListener(rA.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rA.fullscreenerror_,this._onFullscreenChange)),window.removeEventListener("keydown",this._onTvKeyDown),window.removeEventListener("keydown",this._exitFullscreenOnEsc),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("click",this._onClickAfterPointerUp,!0),this.removeEventListener("pointermove",this._onPointerMove),this.removeEventListener("mouseleave",this._onMouseLeave),this._player&&(this.removePlayerListeners_(this._player),this._player.destroy(),this._player=void 0,this.propagatePlayerToAllReceivers_()),this._stateReceivers.length=0}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;if(e===p.CONFIGURATION)this._setConfiguration(r?JSON.parse(r):{});else if(e===p.SOURCE)this._setSource(r?JSON.parse(r):void 0);else if(e===p.MUTED)this._player&&(this._player.muted=a);else if(e===p.AUTOPLAY)this._player&&(this._player.autoplay=a);else if(e===p.FULLSCREEN)for(let e of this._stateReceivers)e[F].indexOf("fullscreen")>=0&&(e.fullscreen=a);else if(e===p.DEVICE_TYPE)for(let e of(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),window.removeEventListener("keydown",this._onTvKeyDown),"tv"===r&&window.addEventListener("keydown",this._onTvKeyDown),this._stateReceivers))e[F].indexOf("deviceType")>=0&&(e.deviceType=r);else if(e===p.STREAM_TYPE){for(let e of this._stateReceivers)e[F].indexOf("streamType")>=0&&(e.streamType=r);let e=ed(rS,{bubbles:!0,composed:!0,detail:{streamType:r}});this.dispatchEvent(e)}else e===p.FLUID?this._updateAspectRatio():e===p.USER_IDLE?this._updateTextTrackMargins():e===p.PAUSED||e===p.CASTING?(this._updateTextTrackMargins(),this.updateUserIdle_()):e===p.DVR_THRESHOLD&&this._updateStreamType();rD.observedAttributes.indexOf(e)>=0&&i(this)}propagateStateToReceiver_(e){let t=e[F];if(t.indexOf("player")>=0&&(e.player=this._player),t.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),t.indexOf("deviceType")>=0&&(e.deviceType=this.deviceType),t.indexOf("streamType")>=0&&(e.streamType=this.streamType),void 0!==this._player){if(t.indexOf("playbackRate")>=0&&(e.playbackRate=this._player.playbackRate),t.indexOf("error")>=0&&(e.error=this._player.errorObject),t.indexOf("activeVideoQuality")>=0){var r;e.activeVideoQuality=null==(r=this._activeVideoTrack)?void 0:r.activeQuality}t.indexOf("targetVideoQualities")>=0&&(e.targetVideoQualities=eV(this._activeVideoTrack))}t.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)}propagatePlayerToAllReceivers_(){for(let e of this._stateReceivers)e[F].indexOf("player")>=0&&(e.player=this._player)}removeStateFromReceiver_(e){e[F].indexOf("player")>=0&&(e.player=void 0)}openMenu_(e,t){let r=ec.fromRect(this._topChromeEl.getBoundingClientRect()),a=ec.fromRect(this._bottomChromeEl.getBoundingClientRect()),o=!0,n=!0;if(void 0!==t){let e=ec.fromRect(this.getBoundingClientRect()),r=ec.fromRect(t.getBoundingClientRect());e.width>0&&e.height>0&&(o=r.top>=e.top+e.height/2,n=r.left>=e.left+e.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,i(this,{"--theoplayer-menu-offset-top":`${Math.round(r.height)}px`,"--theoplayer-menu-offset-bottom":`${Math.round(a.height)}px`,"--theoplayer-menu-margin-top":o?"auto":"0","--theoplayer-menu-margin-bottom":o?"0":"auto","--theoplayer-menu-margin-left":n?"auto":"0","--theoplayer-menu-margin-right":n?"0":"auto"})}closeMenu_(){var e;null==this._menuGroup.closeMenu||this._menuGroup.closeMenu.call(this._menuGroup),null==(e=this._menuOpener)||e.focus(),this._menuOpener=void 0}computeStreamType_(){var e,t,r;let a=this.source,i=null!=(t=null==a?void 0:a.streamType)?t:this.getAttribute(p.STREAM_TYPE),o=null==(e=this._player)?void 0:e.duration;if(void 0===o||isNaN(o))return i||((null==a?void 0:a.dvr)?"dvr":"vod");if(o!==1/0)return"vod";if("live"===i||"dvr"===i)return i;{let e=this.dvrThreshold;if(e<=0)return"dvr";let t=null==(r=this._player)?void 0:r.seekable;if(t&&t.length>0&&t.end(t.length-1)-t.start(0)>=e)return"dvr"}return"live"}isUserIdle_(){return!this._isUserActive&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()}setUserActive_(){clearTimeout(this._userIdleTimer),this._isUserActive=!0,this.updateUserIdle_()}updateUserIdle_(){this.userIdle=this.isUserIdle_()}isPlayerOrMedia_(e){return e===this||this._playerEl.contains(e)}addPlayerListeners_(e){var t,r,a;e.addEventListener("destroy",this._onDestroy),e.addEventListener("resize",this._updateAspectRatio),e.addEventListener(["error","sourcechange","emptied"],this._updateError),e.addEventListener("volumechange",this._updateMuted),e.addEventListener("play",this._onPlay),e.addEventListener("pause",this._onPause),e.addEventListener(["ended","emptied"],this._updatePausedAndEnded),e.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.addEventListener("ratechange",this._updatePlaybackRate),e.addEventListener("sourcechange",this._onSourceChange),e.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(t=e.theoLive)||t.addEventListener(["distributionloadstart","publicationloadstart"],this._onSourceChange),e.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.addEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}removePlayerListeners_(e){e.removeEventListener("destroy",this._onDestroy),e.removeEventListener("resize",this._updateAspectRatio),e.removeEventListener(["error","sourcechange","emptied"],this._updateError),e.removeEventListener("volumechange",this._updateMuted),e.removeEventListener("play",this._onPlay),e.removeEventListener("pause",this._onPause),e.removeEventListener(["ended","emptied"],this._updatePausedAndEnded),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.removeEventListener("ratechange",this._updatePlaybackRate),e.removeEventListener("sourcechange",this._onSourceChange),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd);try{var t,r,a;null==(t=e.theoLive)||t.removeEventListener(["distributionloadstart","publicationloadstart"],this._onSourceChange),e.videoTracks.removeEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.removeEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.removeEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}catch{}}constructor(e={}){super(),this._configuration={},this._pointerType="",this._lastPointerUpTime=0,this._stateReceivers=[],this._player=void 0,this._source=void 0,this._isUserActive=!1,this._userIdleTimer=0,this._previewTime=NaN,this._activeVideoTrack=void 0,this._onMutation=e=>{for(let t of e)if("childList"===t.type){let{addedNodes:e,removedNodes:r}=t;for(let t=0;t<e.length;t++){let r=e[t];g(r)&&V(r,this._playerEl,this.registerStateReceiver_)}for(let e=0;e<r.length;e++){let t=r[e];g(t)&&V(t,this._playerEl,this.unregisterStateReceiver_)}}},this._onSlotChange=()=>{V(this,this._playerEl,this.registerStateReceiver_),this._updateTextTrackMargins()},this.registerStateReceiver_=e=>{!(this._stateReceivers.indexOf(e)>=0)&&(this._stateReceivers.push(e),this.propagateStateToReceiver_(e))},this.unregisterStateReceiver_=e=>{(function(e,t){let r=e.indexOf(t);return!(r<0)&&(function(e,t){e.splice(t,1)}(e,r),!0)})(this._stateReceivers,e)&&this.removeStateFromReceiver_(e)},this._onToggleMenu=e=>{e.stopPropagation();let t=e.detail.menu;if(!this._menuGroup.getMenuById(t)){console.error(`<theoplayer-ui>: cannot find menu with ID "${t}"`);return}let r=m(e.target)?e.target:void 0;this._menuGroup.isMenuOpen(t)?this.closeMenu_():(this.closeMenu_(),this.openMenu_(t,r))},this._onCloseMenu=e=>{e.stopPropagation(),this.closeMenu_()},this._onMenuChange=()=>{this._menuEl.removeEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.removeEventListener("click",this._onMenuClick),this._menuGroup.hasCurrentMenu()?(this._menuEl.addEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.addEventListener("click",this._onMenuClick),this.setAttribute(p.MENU_OPENED,"")):this.removeAttribute(p.MENU_OPENED),this.updateUserIdle_()},this._onMenuPointerDown=e=>{this._pointerType=e.pointerType},this._onMenuClick=e=>{var t;let r=null!=(t=e.pointerType)?t:this._pointerType;e.target===this._menuEl&&"mouse"===r&&this._menuGroup.closeCurrentMenu()&&e.preventDefault()},this._onEnterFullscreen=e=>{if(e.stopPropagation(),rA&&document[rA.fullscreenEnabled_]&&this[rA.requestFullscreen_]){var t,r;let e=this[rA.requestFullscreen_]({navigationUI:"hide",...null==(r=this._configuration)?void 0:null==(t=r.ui)?void 0:t.fullscreenOptions});e&&e.then&&e.then(y,y)}else this._player&&this._player.presentation.supportsMode("fullscreen")?this._player.presentation.requestMode("fullscreen"):this.hasAttribute(p.FULLWINDOW)||(x(this,p.FULLWINDOW,!0),document.documentElement.classList.add(rN),window.addEventListener("keydown",this._exitFullscreenOnEsc),this._onFullscreenChange())},this._onExitFullscreen=e=>{if(e.stopPropagation(),rA){let e=document[rA.exitFullscreen_]();e&&e.then&&e.then(y,y)}this._player&&"fullscreen"===this._player.presentation.currentMode&&this._player.presentation.requestMode("inline"),this.hasAttribute(p.FULLWINDOW)&&(x(this,p.FULLWINDOW,!1),document.documentElement.classList.remove(rN),window.removeEventListener("keydown",this._exitFullscreenOnEsc),this._onFullscreenChange())},this._onFullscreenChange=()=>{let e=!1;if(void 0!==rA){let t=document[rA.fullscreenElement_];t&&(e=function e(t,r){if(!t||!r)return!1;if(t.contains(r))return!0;let a=r.getRootNode();return!!a.host&&e(t,a.host)}(t,this))}e||void 0===this._player||"fullscreen"!==this._player.presentation.currentMode||(e=!0),this.hasAttribute(p.FULLWINDOW)&&(e=!0),x(this,p.FULLSCREEN,e)},this._exitFullscreenOnEsc=e=>{e.keyCode==S.ESCAPE&&this._onExitFullscreen(e)},this._updateAspectRatio=()=>{if(void 0===this._player)return;let{videoWidth:e,videoHeight:t}=this._player;e>0&&t>0?i(this,{"--theoplayer-video-width":`${e}`,"--theoplayer-video-height":`${t}`}):i(this,{"--theoplayer-video-width":"","--theoplayer-video-height":""})},this._updateError=()=>{var e;let t=null==(e=this._player)?void 0:e.errorObject;for(let e of(x(this,p.HAS_ERROR,void 0!==t),this._stateReceivers))e[F].indexOf("error")>=0&&(e.error=t)},this._onPlay=()=>{this.setAttribute(p.HAS_FIRST_PLAY,""),this.removeAttribute(p.PAUSED),this._updateEnded()},this._onPause=()=>{this.setAttribute(p.PAUSED,""),this._updateEnded()},this._updatePausedAndEnded=()=>{let e=!this._player||this._player.paused;x(this,p.PAUSED,e),this._updateEnded()},this._updateEnded=()=>{let e=!!this._player&&this._player.ended;x(this,p.ENDED,e)},this._updateStreamType=()=>{void 0!==this._player&&(this.streamType=this.computeStreamType_())},this._updatePlaybackRate=()=>{if(void 0===this._player)return;let e=this._player.playbackRate;for(let t of this._stateReceivers)t[F].indexOf("playbackRate")>=0&&(t.playbackRate=e)},this._updateMuted=()=>{void 0!==this._player&&(this.muted=this._player.muted)},this._updateActiveVideoTrack=()=>{if(void 0===this._player)return;let e=_(this._player.videoTracks,e=>e.enabled);if(this._activeVideoTrack!==e){var t,r,a,i;null==(t=this._activeVideoTrack)||t.removeEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(r=this._activeVideoTrack)||r.removeEventListener("targetqualitychanged",this._updateTargetVideoQualities),this._activeVideoTrack=e,this._updateActiveVideoQuality(),this._updateTargetVideoQualities(),null==(a=this._activeVideoTrack)||a.addEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(i=this._activeVideoTrack)||i.addEventListener("targetqualitychanged",this._updateTargetVideoQualities)}},this._updateActiveVideoQuality=()=>{var e;let t=null==(e=this._activeVideoTrack)?void 0:e.activeQuality;for(let e of this._stateReceivers)e[F].indexOf("activeVideoQuality")>=0&&(e.activeVideoQuality=t)},this._updateTargetVideoQualities=()=>{let e=eV(this._activeVideoTrack);for(let t of this._stateReceivers)t[F].indexOf("targetVideoQualities")>=0&&(t.targetVideoQualities=e)},this._updateCasting=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.cast)?void 0:e.casting)&&r;x(this,p.CASTING,a)},this._updatePlayingAd=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)&&r;x(this,p.PLAYING_AD,a)},this._onSourceChange=()=>{this.closeMenu_();let e=void 0!==this._player&&!this._player.paused;x(this,p.HAS_FIRST_PLAY,e)},this.setUserIdle_=()=>{if(clearTimeout(this._userIdleTimer),this._userIdleTimer=0,!(this.userIdleTimeout<0)&&(this._isUserActive=!1,this.updateUserIdle_(),"tv"==this.deviceType&&this.isUserIdle_())){let e=ey();null!==e&&e.blur()}},this.scheduleUserIdle_=()=>{if(this.setUserActive_(),clearTimeout(this._userIdleTimer),this.userIdleTimeout<0){this._userIdleTimer=0;return}this._userIdleTimer=setTimeout(this.setUserIdle_,1e3*this.userIdleTimeout)},this._onTvKeyDown=e=>{if(R(e.keyCode)){this.setUserIdle_();return}let t=function e(t){if(!m(t)||"none"===getComputedStyle(t).display)return;if(null!==t.getAttribute(p.TV_FOCUS))return C(t);let r=T(t);for(let t=0;t<r.length;t++){let a=e(r[t]);if(a)return a}}(this),r=C(this),a=ey();if(!a){let e=null!=t?t:r;e.length>0&&(e[0].focus(),a=e[0])}!this.isUserIdle_()&&(e.keyCode===S.ENTER?null!==a&&(e.preventDefault(),a.click()):P(e.keyCode)&&eg(this,r,e.keyCode)&&(e.preventDefault(),e.stopPropagation()))},this._onKeyUp=e=>{R(e.keyCode)||this.scheduleUserIdle_()},this._onPointerUp=e=>{"mouse"===e.pointerType?this.scheduleUserIdle_():"touch"===e.pointerType&&(this.isPlayerOrMedia_(e.target)&&this._isUserActive?this.setUserIdle_():(this.isUserIdle_()&&(this._lastPointerUpTime=performance.now(),this.addEventListener("click",this._onClickAfterPointerUp,!0)),this.scheduleUserIdle_()))},this._onClickAfterPointerUp=e=>{this.removeEventListener("click",this._onClickAfterPointerUp,!0),performance.now()-this._lastPointerUpTime<50&&(e.preventDefault(),e.stopPropagation())},this._onPointerMove=e=>{"mouse"===e.pointerType&&(this.setUserActive_(),this.isPlayerOrMedia_(e.target)&&this.scheduleUserIdle_())},this._onMouseLeave=()=>{this.setUserIdle_()},this._onChromeSlotTransition=e=>{"opacity"===e.propertyName&&this._updateTextTrackMargins()},this._updateTextTrackMargins=()=>{let e=this._player;if(void 0===e)return;let t=rq(this._topChromeSlot),r=rq(this._bottomChromeSlot);e.textTrackStyle.marginTop=null==t?void 0:t.height,e.textTrackStyle.marginBottom=null==r?void 0:r.height},this._onPreviewTimeChange=e=>{for(let t of(this._previewTime=e.detail.previewTime,this._stateReceivers))t[F].indexOf("previewTime")>=0&&(t.previewTime=this._previewTime)},this._onDestroy=()=>{this._player&&(this.removePlayerListeners_(this._player),this._player=void 0,this.propagatePlayerToAllReceivers_())};let t=this.attachShadow({mode:"open",delegatesFocus:!0});t.appendChild(rO().content.cloneNode(!0)),this._configuration=e,this._playerEl=t.querySelector('[part~="media-layer"]'),this._menuEl=t.querySelector('[part~="menu-layer"]'),this._menuGroup=t.querySelector("theoplayer-menu-group"),this._topChromeEl=t.querySelector('[part~="top"]'),this._topChromeSlot=t.querySelector('slot[name="top-chrome"]'),this._bottomChromeEl=t.querySelector('[part~="bottom"]'),this._bottomChromeSlot=t.querySelector("slot:not([name])"),this._mutationObserver=new MutationObserver(this._onMutation),"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(this._updateTextTrackMargins)),t.addEventListener(ex,this._onToggleMenu),t.addEventListener(tM,this._onEnterFullscreen),t.addEventListener(tI,this._onExitFullscreen),t.addEventListener(tF,this._onPreviewTimeChange),this._topChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._topChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("streamType"),this.tryInitializePlayer_()}}function rq(e){let t;for(let r of A(e).filter(m))if("0"!==getComputedStyle(r).opacity){let e=ec.fromRect(r.getBoundingClientRect());e.width>0&&e.height>0&&(t=t?t.union(e):e)}return t}rD.READY_EVENT=rR,customElements.define("theoplayer-ui",rD);let rB=o("theoplayer-default-ui",'<style>:host{box-sizing:border-box;container-name:theoplayer-default-ui-container;container-type:inline-size;display:inline-block;min-width:300px;min-width:var(--theoplayer-min-width,300px);position:relative}:host([hidden]){display:none!important}theoplayer-ui{display:block;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}[part=title]{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);text-shadow:0 0 4px rgba(0,0,0,.75);-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome]{display:flex}[part=centered-chrome] *,[part=centered-chrome] ::slotted(*){--theoplayer-button-icon-width:var(--theoplayer-centered-chrome-button-icon-width,48px);--theoplayer-control-height:var(--theoplayer-centered-chrome-control-height,48px);--theoplayer-play-button-icon-color:var(--theoplayer-center-play-button-icon-color,unset)}[part=middle-chrome]{flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:var(--theoplayer-mobile-control-backdrop-background,rgba(0,0,0,.5))}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:var(--theoplayer-time-range-control-height,12px);--theoplayer-range-track-pointer-background:var(--theoplayer-time-range-track-pointer-background,hsla(0,0%,100%,.5))}[part=ad-chrome]{--theoplayer-control-height:var(--theoplayer-ad-chrome-control-height,12px);align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{flex-shrink:0}theoplayer-ad-countdown,theoplayer-ad-skip-button[disabled]{text-shadow:0 0 4px rgba(0,0,0,.75)}theoplayer-ad-countdown{min-width:0}theoplayer-ad-skip-button{--theoplayer-ad-skip-font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);--theoplayer-ad-skip-line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25);--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;align-items:end;border-right:0!important;justify-items:end}:host(:not([mobile])) [mobile-only],:host(:not([mobile])) theoplayer-control-bar ::slotted([mobile-only]),:host([mobile]) [mobile-hidden],:host([mobile]) theoplayer-control-bar ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [tv-only],:host(:not([tv])) theoplayer-control-bar ::slotted([tv-only]),:host([tv]) [tv-hidden],:host([tv]) theoplayer-control-bar ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui:not([playing-ad]) theoplayer-control-bar ::slotted([ad-only]),theoplayer-ui[playing-ad] [ad-hidden],theoplayer-ui[playing-ad] theoplayer-control-bar ::slotted([ad-hidden]){display:none!important}theoplayer-ui:not([has-first-play]) theoplayer-control-bar{display:none!important}theoplayer-ui:not([has-first-play]),theoplayer-ui:not([has-first-play]) ::slotted(*){--theoplayer-before-first-play-display:none}:host(:not([mobile])) theoplayer-ui[has-first-play] [part~=center-play-button]{display:none!important}@container theoplayer-default-ui-container (max-width: 200px){:host(:not([mobile])) theoplayer-control-bar{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part~=center-play-button]{display:inline-flex!important}}theoplayer-ui:not([mobile]):not([casting]) theoplayer-ad-clickthrough-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:var(--theoplayer-volume-range-track-width,70px);overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}theoplayer-ui[playing-ad] .theoplayer-ad-control{--theoplayer-control-height:var(--theoplayer-ad-control-height,16px)}</style><theoplayer-ui><theoplayer-control-bar slot="top-chrome" part="top-chrome"><div part="title" ad-hidden><slot name="title"></slot></div><span class="theoplayer-spacer"></span><theoplayer-language-menu-button menu="language-menu" mobile-only ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-only ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-only ad-hidden></theoplayer-chromecast-button><slot name="top-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-only ad-hidden></theoplayer-settings-menu-button><theoplayer-ad-clickthrough-button ad-only></theoplayer-ad-clickthrough-button></theoplayer-control-bar><theoplayer-loading-indicator slot="centered-loading" no-auto-hide></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><slot name="centered-chrome"><theoplayer-seek-button part="seek-back-button seek-button center-button" seek-offset="-10" mobile-only ad-hidden></theoplayer-seek-button><theoplayer-play-button part="center-play-button play-button center-button"></theoplayer-play-button><theoplayer-seek-button part="seek-forward-button seek-button center-button" seek-offset="10" mobile-only ad-hidden></theoplayer-seek-button></slot></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><div part="bottom-chrome"><theoplayer-control-bar part="ad-chrome" ad-only><theoplayer-ad-display></theoplayer-ad-display><theoplayer-ad-countdown></theoplayer-ad-countdown><span class="theoplayer-spacer"></span><theoplayer-ad-skip-button></theoplayer-ad-skip-button></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button part="play-button" mobile-hidden ad-only class="theoplayer-ad-control"></theoplayer-play-button><theoplayer-mute-button part="mute-button" ad-only class="theoplayer-ad-control"></theoplayer-mute-button><theoplayer-time-range part="time-range" show-ad-markers tv-focus class="theoplayer-ad-control"></theoplayer-time-range><theoplayer-chromecast-button tv-hidden ad-only class="theoplayer-ad-control"></theoplayer-chromecast-button><theoplayer-fullscreen-button ad-only class="theoplayer-ad-control"></theoplayer-fullscreen-button></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button part="play-button" mobile-hidden></theoplayer-play-button><theoplayer-mute-button part="mute-button" tv-hidden></theoplayer-mute-button><theoplayer-volume-range part="volume-range" mobile-hidden tv-hidden></theoplayer-volume-range><theoplayer-live-button part="live-button" live-only ad-hidden></theoplayer-live-button><theoplayer-time-display show-duration remaining-when-live></theoplayer-time-display><span class="theoplayer-spacer" style="pointer-events: auto"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button tv-hidden mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button tv-hidden mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-hidden ad-hidden></theoplayer-settings-menu-button><theoplayer-fullscreen-button part="fullscreen-button" tv-hidden></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-settings-menu id="settings-menu" slot="menu" hidden></theoplayer-settings-menu><slot name="error" slot="error"><theoplayer-error-display></theoplayer-error-display></slot><slot name="menu" slot="menu"></slot></theoplayer-ui>');class rF extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FLUID,p.DEVICE_TYPE,p.STREAM_TYPE,p.USER_IDLE_TIMEOUT,p.DVR_THRESHOLD,p.HAS_TITLE]}initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rB().content.cloneNode(!0)),e}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._ui.player}get configuration(){return this._ui.configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this.setConfiguration_(e)}setConfiguration_(e){var t;this._ui.configuration={...e,ads:{...null!=(t=e.ads)?t:{},showCountdown:!1}}}get source(){return this._ui.source}set source(e){this.removeAttribute(p.SOURCE),this._ui.source=e}get fluid(){return this._ui.fluid}set fluid(e){this._ui.fluid=e}get muted(){return this._ui.muted}set muted(e){this._ui.muted=e}get autoplay(){return this._ui.autoplay}set autoplay(e){this._ui.autoplay=e}get streamType(){return this._ui.streamType}set streamType(e){this._ui.streamType=e}get userIdle(){return this._ui.userIdle}get userIdleTimeout(){return this._ui.userIdleTimeout}set userIdleTimeout(e){this._ui.userIdleTimeout=e}get dvrThreshold(){return this._ui.dvrThreshold}set dvrThreshold(e){this._ui.dvrThreshold=e}connectedCallback(){if(a(this),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}this._appliedExtensions||(this._appliedExtensions=!0,function(e){for(let t of rT)t(e)}(this),i(this)),this._onTitleSlotChange()}disconnectedCallback(){clearTimeout(this._timeRangeInertTimeout)}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;e===p.SOURCE?this._ui.source=r?JSON.parse(r):void 0:e===p.CONFIGURATION?this.setConfiguration_(r?JSON.parse(r):{}):e===p.MUTED?this.muted=a:e===p.AUTOPLAY?this.autoplay=a:e===p.FLUID?this.fluid=a:e===p.DEVICE_TYPE?(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),this._ui.setAttribute(p.DEVICE_TYPE,r)):e===p.STREAM_TYPE?this.streamType=r:e===p.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(r):e===p.DVR_THRESHOLD&&(this.dvrThreshold=Number(r)),rF.observedAttributes.indexOf(e)>=0&&i(this)}constructor(e={}){var t,r,a;super(),this._timeRangeInertTimeout=0,this._appliedExtensions=!1,this._updateStreamType=()=>{this.setAttribute(p.STREAM_TYPE,this.streamType),this._timeRange&&x(this._timeRange,p.HIDDEN,"live"===this.streamType)},this._dispatchReadyEvent=()=>{this.dispatchEvent(ed(rR))},this._updateUserIdle=()=>{this._timeRange&&(clearTimeout(this._timeRangeInertTimeout),this.userIdle?this._timeRange.inert=!0:this._timeRangeInertTimeout=setTimeout(()=>{this._timeRange.inert=!1},50)),this.dispatchEvent(ed(rP))},this._onTitleSlotChange=()=>{this._titleSlot&&x(this,p.HAS_TITLE,this._titleSlot.assignedNodes().length>0)},this._shadowRoot=this.initShadowRoot(),this._ui=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rR,this._dispatchReadyEvent),this._ui.addEventListener(rP,this._updateUserIdle),this._ui.addEventListener(rS,this._updateStreamType),this.setConfiguration_(e),this._titleSlot=null!=(r=this._shadowRoot.querySelector('slot[name="title"]'))?r:void 0,null==(t=this._titleSlot)||t.addEventListener("slotchange",this._onTitleSlotChange),this._timeRange=null!=(a=this._shadowRoot.querySelector("theoplayer-time-range"))?a:void 0,this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("streamType"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("dvrThreshold")}}rF.READY_EVENT=rR,customElements.define("theoplayer-default-ui",rF);let rU=o("theolive-bad-network-button",I(`<span part="icon">${tS}<span part="warning-icon"><svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48">
|
|
34
|
+
</slot></span></span>`,":host{background:rgba(0,0,0,.7);background:var(--theoplayer-ad-skip-background,rgba(0,0,0,.7));border:1px solid hsla(0,0%,100%,.5);border:var(--theoplayer-ad-skip-border,1px solid hsla(0,0%,100%,.5));color:#fff;color:var(--theoplayer-ad-skip-color,#fff);display:grid;grid-template-columns:1fr;grid-template-rows:1fr}:host(:hover){background:rgba(0,0,0,.9);background:var(--theoplayer-ad-skip-hover-background,rgba(0,0,0,.9));border:1px solid #fff;border:var(--theoplayer-ad-skip-hover-border,1px solid #fff);color:#fff;color:var(--theoplayer-ad-skip-hover-color,var(--theoplayer-ad-skip-color,#fff))}:host([disabled]){background:transparent;background:var(--theoplayer-ad-skip-countdown-background,transparent);border:1px solid transparent;border:var(--theoplayer-ad-skip-countdown-border,1px solid transparent);color:#fff;color:var(--theoplayer-ad-skip-countdown-color,var(--theoplayer-ad-skip-color,#fff))}[part=countdown],[part=skip]{align-items:center;display:flex;grid-column:1;grid-row:1}[part=skip]{font-size:14px;font-size:var(--theoplayer-ad-skip-font-size,var(--theoplayer-text-font-size,14px));line-height:24px;line-height:var(--theoplayer-ad-skip-line-height,var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px)))}[part=skip-icon]{padding-left:10px;padding-left:var(--theoplayer-control-padding,10px)}[part=skip-icon] ::slotted(svg),[part=skip-icon] svg{height:24px;height:var(--theoplayer-ad-skip-icon-height,var(--theoplayer-control-height,24px));width:24px;width:var(--theoplayer-ad-skip-icon-width,var(--theoplayer-control-height,24px))}")),rE=["adbegin","adend","adloaded","updatead","adskip"];class rw extends H(N,["player"]){static get observedAttributes(){return[...N.observedAttributes]}connectedCallback(){super.connectedCallback(),this._update()}get player(){return this._player}set player(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rE,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rE,this._onAdChange))}handleClick(){var e,t;null==(t=this._player)||null==(e=t.ads)||e.skip()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),rw.observedAttributes.indexOf(e)>=0&&i(this)}constructor(){super({template:rk()}),this._onAdChange=()=>{var e,t,r;(null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(this._player.removeEventListener("timeupdate",this._update),this._player.addEventListener("timeupdate",this._update)):null==(r=this._player)||r.removeEventListener("timeupdate",this._update),this._update()},this._update=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads;if(!r||!r.playing){this.style.display="none";return}let a=_(null!=(t=r.currentAds)?t:[],tU);if(void 0===a||"google-ima"===a.integration){this.style.display="none";return}let i=a.skipOffset;if(void 0===i||i<0||void 0!==a.duration&&i>=a.duration){this.style.display="none";return}let o=this._player.currentTime;if(o<i){let e=Math.ceil(i-o);w(this._countdownEl,`Skip in ${e}s`),this._countdownEl.style.visibility="visible",this._skipEl.style.visibility="hidden",this._skipEl.style.pointerEvents="none",this.style.display="",this.setAttribute(p.DISABLED,""),this.setAttribute(p.ARIA_LIVE,"off")}else this._countdownEl.style.visibility="hidden",this._skipEl.style.visibility="visible",this._skipEl.style.pointerEvents="",this.style.display="",this.removeAttribute(p.DISABLED),this.setAttribute(p.ARIA_LIVE,"polite")},this._countdownEl=this.shadowRoot.querySelector('[part="countdown"]'),this._skipEl=this.shadowRoot.querySelector('[part="skip"]'),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-skip-button",rw);var rx=((d={}).TopControlBar="top-control-bar",d.BottomControlBar="bottom-control-bar",d.Menu="menu",d);let rT=[],rA=(()=>{if("undefined"!=typeof document){for(let e of[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]])if(e[1]in document)return{requestFullscreen_:e[0],exitFullscreen_:e[1],fullscreenElement_:e[2],fullscreenEnabled_:e[3],fullscreenchange_:e[4],fullscreenerror_:e[5]}}})();function rC(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;let e=navigator.userAgent;return!!e&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(e)}function rL(){if("object"!=typeof navigator)return!1;let e=navigator.userAgent;return!!e&&/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(e)}let rS="theoplayerstreamtypechange",rP="theoplayeruseridlechange",rR="theoplayerready",rM="theoplayer-ui-global-styles",rI=!1,rO=o("theoplayer-ui",'<style>:host{aspect-ratio:16/9;aspect-ratio:var(--theoplayer-aspect-ratio,16/9);background:#000;background:var(--theoplayer-background,#000);box-sizing:border-box;container-name:theoplayer-ui-container;container-type:size;display:inline-block;height:var(--theoplayer-height);min-width:300px;min-width:var(--theoplayer-min-width,300px);position:relative}@supports not (aspect-ratio:1){:host{height:0;height:var(--theoplayer-height,calc((var(--theoplayer-aspect-ratio, 16 / 9))*0));padding-bottom:56.25%;padding-bottom:calc(100%/(var(--theoplayer-aspect-ratio, 16 / 9)))}}:host([hidden]){display:none!important}:host([fullscreen]){height:100%!important;padding:0!important;width:100%!important}:host(:-webkit-full-screen){height:100%!important;padding:0!important;width:100%!important}:host(:fullscreen){height:100%!important;padding:0!important;width:100%!important}:host([fullwindow]){bottom:0!important;left:0!important;overflow:hidden!important;position:fixed!important;right:0!important;top:0!important;z-index:1000!important}:host([fluid]){--theoplayer-aspect-ratio:var(--theoplayer-video-width,16) /var(--theoplayer-video-height,9)}[part~=chrome]{position:relative}[part~=layer]{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}[part~=chrome],[part~=layer]:not([part~=media-layer]){display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[part~=media-layer] video{border-radius:0;border-radius:var(--theoplayer-video-border-radius,0);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--theoplayer-video-object-fit,contain);object-fit:var(--theoplayer-video-object-fit,contain)}[part~=media-layer] .theoplayer-ad-linear{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}[part~=media-layer] .theo-ad-remaining-container,[part~=media-layer] .theoplayer-ad-skip,[part~=media-layer] .theoplayer-ad-touch-clickthrough{display:none!important}[part~=chrome],[part~=vertical-layer]{align-items:stretch;flex-flow:column nowrap}[part~=centered]{align-items:center;justify-content:center}[part~=middle]{flex-grow:1}[part~=vertical-layer]:before{background:transparent;background:var(--theoplayer-control-backdrop-background,transparent);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;bottom:var(--theoplayer-menu-offset-bottom,0);padding:10px;padding:var(--theoplayer-menu-layer-padding,10px);top:0;top:var(--theoplayer-menu-offset-top,0)}[part=menu]{background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:flex;justify-self:stretch}[part=menu] ::slotted(*){align-self:stretch;flex-grow:1;justify-self:stretch}:host(:not([mobile])) [part=menu]{margin:auto 0 0 auto;margin:var(--theoplayer-menu-margin-top,auto) var(--theoplayer-menu-margin-right,0) var(--theoplayer-menu-margin-bottom,0) var(--theoplayer-menu-margin-left,auto);max-height:100%;min-width:200px;min-width:var(--theoplayer-menu-min-width,200px)}:host([mobile]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([tv]) [part~=menu-layer]{left:auto}:host([tv]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [part~=vertical-layer],:host([menu-opened][tv]) [part~=vertical-layer]{display:none!important}@container theoplayer-ui-container (max-width: 500px) or (max-height: 300px){:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;left:0;padding:0;right:0;top:0}:host(:not([mobile])) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([menu-opened]) [part~=vertical-layer]{display:none!important}}[part~=error-layer]{align-items:center;background:rgba(0,0,0,.5);background:var(--theoplayer-error-background,rgba(0,0,0,.5));justify-content:center}:host(:not([has-error])) [part~=error-layer],:host([has-error]) [part~=layer]:not([part~=media-layer]):not([part~=error-layer]){display:none!important}[part~=chrome] ::slotted(theoplayer-control-bar){align-self:stretch}theoplayer-gesture-receiver{flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [part~=chrome] ::slotted([tv-only]),:host([tv]) [part~=chrome] ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [part~=chrome] ::slotted([live-hidden]),:host([stream-type=vod]) [part~=chrome] ::slotted([live-only]){display:none!important}:host(:not([playing-ad])) [part~=chrome] ::slotted([ad-only]),:host([playing-ad]) [part~=chrome] ::slotted([ad-hidden]){display:none!important}:host([user-idle]){cursor:none}:host([user-idle]) [part~=chrome] ::slotted(:not([no-auto-hide])){opacity:0;transition:opacity 1s}:host([user-idle]) [part~=vertical-layer]:before{opacity:0;transition:opacity 1s}</style><div part="layer media-layer"></div><div part="layer gesture-layer"><theoplayer-gesture-receiver></theoplayer-gesture-receiver></div><div part="layer vertical-layer"><div part="top chrome"><slot name="top-chrome"></slot></div><div part="middle chrome"><slot name="middle-chrome"></slot></div><div part="layer centered-layer centered loading"><slot name="centered-loading"></slot></div><div part="layer centered-layer centered chrome"><slot name="centered-chrome"></slot></div><div part="bottom chrome"><slot></slot></div></div><div part="layer menu-layer"><theoplayer-menu-group part="menu"><slot name="menu"></slot></theoplayer-menu-group></div><div part="layer error-layer"><slot name="error"></slot></div>'),rN="theoplayer-ui-full-window";class rD extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FULLSCREEN,p.FLUID,p.DEVICE_TYPE,p.PAUSED,p.ENDED,p.CASTING,p.PLAYING_AD,p.HAS_ERROR,p.HAS_FIRST_PLAY,p.STREAM_TYPE,p.DVR_THRESHOLD,p.USER_IDLE,p.USER_IDLE_TIMEOUT]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._player}get configuration(){return this._configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this._setConfiguration(e)}_setConfiguration(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()}get source(){return this._player?this._player.source:this._source}set source(e){this.removeAttribute(p.SOURCE),this._setSource(e)}_setSource(e){this._player?this._player.source=e:this._source=e}get fluid(){return this.hasAttribute(p.FLUID)}set fluid(e){x(this,p.FLUID,e)}get muted(){return this.hasAttribute(p.MUTED)}set muted(e){x(this,p.MUTED,e)}get autoplay(){return this.hasAttribute(p.AUTOPLAY)}set autoplay(e){x(this,p.AUTOPLAY,e)}get fullscreen(){return this.hasAttribute(p.FULLSCREEN)}get paused(){return this.hasAttribute(p.PAUSED)}get ended(){return this.hasAttribute(p.ENDED)}get casting(){return this.hasAttribute(p.CASTING)}get userIdle(){return this.hasAttribute(p.USER_IDLE)}set userIdle(e){this.userIdle!==e&&(x(this,p.USER_IDLE,e),this.dispatchEvent(ed(rP)))}get userIdleTimeout(){var e;let t="tv"===this.deviceType?5:2;return Number(null!=(e=this.getAttribute(p.USER_IDLE_TIMEOUT))?e:t)}set userIdleTimeout(e){e=Number(e),this.setAttribute(p.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}get deviceType(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"}get streamType(){return this.getAttribute(p.STREAM_TYPE)||"vod"}set streamType(e){this.setAttribute(p.STREAM_TYPE,e)}get dvrThreshold(){var e;return Number(null!=(e=this.getAttribute(p.DVR_THRESHOLD))?e:60)}set dvrThreshold(e){e=Number(e),this.setAttribute(p.DVR_THRESHOLD,String(isNaN(e)?0:e))}connectedCallback(){var e;if(a(this),!function(){if(rI)return;if(document.getElementById(rM)){rI=!0;return}let e=document.createElement("style");e.id=rM,w(e,"html.theoplayer-ui-full-window{overflow:hidden!important}html.theoplayer-ui-full-window>body{height:100%!important;margin:0!important;padding:0!important;width:100%!important}"),document.head.appendChild(e),rI=!0}(),this._menuGroup instanceof eC||customElements.upgrade(this._menuGroup),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}for(let e of(this.hasAttribute(p.PAUSED)||this.setAttribute(p.PAUSED,""),this.tryInitializePlayer_(),this._stateReceivers))this.propagateStateToReceiver_(e);V(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(e=this._resizeObserver)||e.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(e_,this._onCloseMenu),this._menuGroup.addEventListener(ef,this._onMenuChange),void 0!==rA&&(document.addEventListener(rA.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rA.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),"tv"===this.deviceType&&window.addEventListener("keydown",this._onTvKeyDown),this.hasAttribute(p.FULLWINDOW)&&window.addEventListener("keydown",this._exitFullscreenOnEsc),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)}tryInitializePlayer_(){void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)&&(this._player=new t.ChromelessPlayer(this._playerEl,this._configuration),this._source&&(this._player.source=this._source,this._source=void 0),this._player.muted=this.muted,this._player.autoplay=this.autoplay,this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this.addPlayerListeners_(this._player),this.propagatePlayerToAllReceivers_(),this.dispatchEvent(ed(rR)))}disconnectedCallback(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange),this._menuGroup.removeEventListener(e_,this._onCloseMenu),this._menuGroup.removeEventListener(ef,this._onMenuChange),void 0!==rA&&(document.removeEventListener(rA.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rA.fullscreenerror_,this._onFullscreenChange)),window.removeEventListener("keydown",this._onTvKeyDown),window.removeEventListener("keydown",this._exitFullscreenOnEsc),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("click",this._onClickAfterPointerUp,!0),this.removeEventListener("pointermove",this._onPointerMove),this.removeEventListener("mouseleave",this._onMouseLeave),this._player&&(this.removePlayerListeners_(this._player),this._player.destroy(),this._player=void 0,this.propagatePlayerToAllReceivers_()),this._stateReceivers.length=0}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;if(e===p.CONFIGURATION)this._setConfiguration(r?JSON.parse(r):{});else if(e===p.SOURCE)this._setSource(r?JSON.parse(r):void 0);else if(e===p.MUTED)this._player&&(this._player.muted=a);else if(e===p.AUTOPLAY)this._player&&(this._player.autoplay=a);else if(e===p.FULLSCREEN)for(let e of this._stateReceivers)e[F].indexOf("fullscreen")>=0&&(e.fullscreen=a);else if(e===p.DEVICE_TYPE)for(let e of(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),window.removeEventListener("keydown",this._onTvKeyDown),"tv"===r&&window.addEventListener("keydown",this._onTvKeyDown),this._stateReceivers))e[F].indexOf("deviceType")>=0&&(e.deviceType=r);else if(e===p.STREAM_TYPE){for(let e of this._stateReceivers)e[F].indexOf("streamType")>=0&&(e.streamType=r);let e=ed(rS,{bubbles:!0,composed:!0,detail:{streamType:r}});this.dispatchEvent(e)}else e===p.FLUID?this._updateAspectRatio():e===p.USER_IDLE?this._updateTextTrackMargins():e===p.PAUSED||e===p.CASTING?(this._updateTextTrackMargins(),this.updateUserIdle_()):e===p.DVR_THRESHOLD&&this._updateStreamType();rD.observedAttributes.indexOf(e)>=0&&i(this)}propagateStateToReceiver_(e){let t=e[F];if(t.indexOf("player")>=0&&(e.player=this._player),t.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),t.indexOf("deviceType")>=0&&(e.deviceType=this.deviceType),t.indexOf("streamType")>=0&&(e.streamType=this.streamType),void 0!==this._player){if(t.indexOf("playbackRate")>=0&&(e.playbackRate=this._player.playbackRate),t.indexOf("error")>=0&&(e.error=this._player.errorObject),t.indexOf("activeVideoQuality")>=0){var r;e.activeVideoQuality=null==(r=this._activeVideoTrack)?void 0:r.activeQuality}t.indexOf("targetVideoQualities")>=0&&(e.targetVideoQualities=eV(this._activeVideoTrack))}t.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)}propagatePlayerToAllReceivers_(){for(let e of this._stateReceivers)e[F].indexOf("player")>=0&&(e.player=this._player)}removeStateFromReceiver_(e){e[F].indexOf("player")>=0&&(e.player=void 0)}openMenu_(e,t){let r=ec.fromRect(this._topChromeEl.getBoundingClientRect()),a=ec.fromRect(this._bottomChromeEl.getBoundingClientRect()),o=!0,n=!0;if(void 0!==t){let e=ec.fromRect(this.getBoundingClientRect()),r=ec.fromRect(t.getBoundingClientRect());e.width>0&&e.height>0&&(o=r.top>=e.top+e.height/2,n=r.left>=e.left+e.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,i(this,{"--theoplayer-menu-offset-top":`${Math.round(r.height)}px`,"--theoplayer-menu-offset-bottom":`${Math.round(a.height)}px`,"--theoplayer-menu-margin-top":o?"auto":"0","--theoplayer-menu-margin-bottom":o?"0":"auto","--theoplayer-menu-margin-left":n?"auto":"0","--theoplayer-menu-margin-right":n?"0":"auto"})}closeMenu_(){var e;null==this._menuGroup.closeMenu||this._menuGroup.closeMenu.call(this._menuGroup),null==(e=this._menuOpener)||e.focus(),this._menuOpener=void 0}computeStreamType_(){var e,t,r;let a=this.source,i=null!=(t=null==a?void 0:a.streamType)?t:this.getAttribute(p.STREAM_TYPE),o=null==(e=this._player)?void 0:e.duration;if(void 0===o||isNaN(o))return i||((null==a?void 0:a.dvr)?"dvr":"vod");if(o!==1/0)return"vod";if("live"===i||"dvr"===i)return i;{let e=this.dvrThreshold;if(e<=0)return"dvr";let t=null==(r=this._player)?void 0:r.seekable;if(t&&t.length>0&&t.end(t.length-1)-t.start(0)>=e)return"dvr"}return"live"}isUserIdle_(){return!this._isUserActive&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()}setUserActive_(){clearTimeout(this._userIdleTimer),this._isUserActive=!0,this.updateUserIdle_()}updateUserIdle_(){this.userIdle=this.isUserIdle_()}isPlayerOrMedia_(e){return e===this||this._playerEl.contains(e)}addPlayerListeners_(e){var t,r,a;e.addEventListener("destroy",this._onDestroy),e.addEventListener("resize",this._updateAspectRatio),e.addEventListener(["error","sourcechange","emptied"],this._updateError),e.addEventListener("volumechange",this._updateMuted),e.addEventListener("play",this._onPlay),e.addEventListener("pause",this._onPause),e.addEventListener(["ended","emptied"],this._updatePausedAndEnded),e.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.addEventListener("ratechange",this._updatePlaybackRate),e.addEventListener("sourcechange",this._onSourceChange),e.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(t=e.theoLive)||t.addEventListener(["distributionloadstart","publicationloadstart"],this._onSourceChange),e.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.addEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}removePlayerListeners_(e){e.removeEventListener("destroy",this._onDestroy),e.removeEventListener("resize",this._updateAspectRatio),e.removeEventListener(["error","sourcechange","emptied"],this._updateError),e.removeEventListener("volumechange",this._updateMuted),e.removeEventListener("play",this._onPlay),e.removeEventListener("pause",this._onPause),e.removeEventListener(["ended","emptied"],this._updatePausedAndEnded),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.removeEventListener("ratechange",this._updatePlaybackRate),e.removeEventListener("sourcechange",this._onSourceChange),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd);try{var t,r,a;null==(t=e.theoLive)||t.removeEventListener(["distributionloadstart","publicationloadstart"],this._onSourceChange),e.videoTracks.removeEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.removeEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.removeEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}catch{}}constructor(e={}){super(),this._configuration={},this._pointerType="",this._lastPointerUpTime=0,this._stateReceivers=[],this._player=void 0,this._source=void 0,this._isUserActive=!1,this._userIdleTimer=0,this._previewTime=NaN,this._activeVideoTrack=void 0,this._onMutation=e=>{for(let t of e)if("childList"===t.type){let{addedNodes:e,removedNodes:r}=t;for(let t=0;t<e.length;t++){let r=e[t];g(r)&&V(r,this._playerEl,this.registerStateReceiver_)}for(let e=0;e<r.length;e++){let t=r[e];g(t)&&V(t,this._playerEl,this.unregisterStateReceiver_)}}},this._onSlotChange=()=>{V(this,this._playerEl,this.registerStateReceiver_),this._updateTextTrackMargins()},this.registerStateReceiver_=e=>{!(this._stateReceivers.indexOf(e)>=0)&&(this._stateReceivers.push(e),this.propagateStateToReceiver_(e))},this.unregisterStateReceiver_=e=>{(function(e,t){let r=e.indexOf(t);return!(r<0)&&(function(e,t){e.splice(t,1)}(e,r),!0)})(this._stateReceivers,e)&&this.removeStateFromReceiver_(e)},this._onToggleMenu=e=>{e.stopPropagation();let t=e.detail.menu;if(!this._menuGroup.getMenuById(t)){console.error(`<theoplayer-ui>: cannot find menu with ID "${t}"`);return}let r=m(e.target)?e.target:void 0;this._menuGroup.isMenuOpen(t)?this.closeMenu_():(this.closeMenu_(),this.openMenu_(t,r))},this._onCloseMenu=e=>{e.stopPropagation(),this.closeMenu_()},this._onMenuChange=()=>{this._menuEl.removeEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.removeEventListener("click",this._onMenuClick),this._menuGroup.hasCurrentMenu()?(this._menuEl.addEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.addEventListener("click",this._onMenuClick),this.setAttribute(p.MENU_OPENED,"")):this.removeAttribute(p.MENU_OPENED),this.updateUserIdle_()},this._onMenuPointerDown=e=>{this._pointerType=e.pointerType},this._onMenuClick=e=>{var t;let r=null!=(t=e.pointerType)?t:this._pointerType;e.target===this._menuEl&&"mouse"===r&&this._menuGroup.closeCurrentMenu()&&e.preventDefault()},this._onEnterFullscreen=e=>{if(e.stopPropagation(),rA&&document[rA.fullscreenEnabled_]&&this[rA.requestFullscreen_]){var t,r;let e=this[rA.requestFullscreen_]({navigationUI:"hide",...null==(r=this._configuration)?void 0:null==(t=r.ui)?void 0:t.fullscreenOptions});e&&e.then&&e.then(y,y)}else this._player&&this._player.presentation.supportsMode("fullscreen")?this._player.presentation.requestMode("fullscreen"):this.hasAttribute(p.FULLWINDOW)||(x(this,p.FULLWINDOW,!0),document.documentElement.classList.add(rN),window.addEventListener("keydown",this._exitFullscreenOnEsc),this._onFullscreenChange())},this._onExitFullscreen=e=>{if(e.stopPropagation(),rA){let e=document[rA.exitFullscreen_]();e&&e.then&&e.then(y,y)}this._player&&"fullscreen"===this._player.presentation.currentMode&&this._player.presentation.requestMode("inline"),this.hasAttribute(p.FULLWINDOW)&&(x(this,p.FULLWINDOW,!1),document.documentElement.classList.remove(rN),window.removeEventListener("keydown",this._exitFullscreenOnEsc),this._onFullscreenChange())},this._onFullscreenChange=()=>{let e=!1;if(void 0!==rA){let t=document[rA.fullscreenElement_];t&&(e=function e(t,r){if(!t||!r)return!1;if(t.contains(r))return!0;let a=r.getRootNode();return!!a.host&&e(t,a.host)}(t,this))}e||void 0===this._player||"fullscreen"!==this._player.presentation.currentMode||(e=!0),this.hasAttribute(p.FULLWINDOW)&&(e=!0),x(this,p.FULLSCREEN,e)},this._exitFullscreenOnEsc=e=>{e.keyCode==S.ESCAPE&&this._onExitFullscreen(e)},this._updateAspectRatio=()=>{if(void 0===this._player)return;let{videoWidth:e,videoHeight:t}=this._player;e>0&&t>0?i(this,{"--theoplayer-video-width":`${e}`,"--theoplayer-video-height":`${t}`}):i(this,{"--theoplayer-video-width":"","--theoplayer-video-height":""})},this._updateError=()=>{var e;let t=null==(e=this._player)?void 0:e.errorObject;for(let e of(x(this,p.HAS_ERROR,void 0!==t),this._stateReceivers))e[F].indexOf("error")>=0&&(e.error=t)},this._onPlay=()=>{this.setAttribute(p.HAS_FIRST_PLAY,""),this.removeAttribute(p.PAUSED),this._updateEnded()},this._onPause=()=>{this.setAttribute(p.PAUSED,""),this._updateEnded()},this._updatePausedAndEnded=()=>{let e=!this._player||this._player.paused;x(this,p.PAUSED,e),this._updateEnded()},this._updateEnded=()=>{let e=!!this._player&&this._player.ended;x(this,p.ENDED,e)},this._updateStreamType=()=>{void 0!==this._player&&(this.streamType=this.computeStreamType_())},this._updatePlaybackRate=()=>{if(void 0===this._player)return;let e=this._player.playbackRate;for(let t of this._stateReceivers)t[F].indexOf("playbackRate")>=0&&(t.playbackRate=e)},this._updateMuted=()=>{void 0!==this._player&&(this.muted=this._player.muted)},this._updateActiveVideoTrack=()=>{if(void 0===this._player)return;let e=_(this._player.videoTracks,e=>e.enabled);if(this._activeVideoTrack!==e){var t,r,a,i;null==(t=this._activeVideoTrack)||t.removeEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(r=this._activeVideoTrack)||r.removeEventListener("targetqualitychanged",this._updateTargetVideoQualities),this._activeVideoTrack=e,this._updateActiveVideoQuality(),this._updateTargetVideoQualities(),null==(a=this._activeVideoTrack)||a.addEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(i=this._activeVideoTrack)||i.addEventListener("targetqualitychanged",this._updateTargetVideoQualities)}},this._updateActiveVideoQuality=()=>{var e;let t=null==(e=this._activeVideoTrack)?void 0:e.activeQuality;for(let e of this._stateReceivers)e[F].indexOf("activeVideoQuality")>=0&&(e.activeVideoQuality=t)},this._updateTargetVideoQualities=()=>{let e=eV(this._activeVideoTrack);for(let t of this._stateReceivers)t[F].indexOf("targetVideoQualities")>=0&&(t.targetVideoQualities=e)},this._updateCasting=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.cast)?void 0:e.casting)&&r;x(this,p.CASTING,a)},this._updatePlayingAd=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)&&r;x(this,p.PLAYING_AD,a)},this._onSourceChange=()=>{this.closeMenu_();let e=void 0!==this._player&&!this._player.paused;x(this,p.HAS_FIRST_PLAY,e)},this.setUserIdle_=()=>{if(clearTimeout(this._userIdleTimer),this._userIdleTimer=0,!(this.userIdleTimeout<0)&&(this._isUserActive=!1,this.updateUserIdle_(),"tv"==this.deviceType&&this.isUserIdle_())){let e=ey();null!==e&&e.blur()}},this.scheduleUserIdle_=()=>{if(this.setUserActive_(),clearTimeout(this._userIdleTimer),this.userIdleTimeout<0){this._userIdleTimer=0;return}this._userIdleTimer=setTimeout(this.setUserIdle_,1e3*this.userIdleTimeout)},this._onTvKeyDown=e=>{if(R(e.keyCode)){this.setUserIdle_();return}let t=function e(t){if(!m(t)||"none"===getComputedStyle(t).display)return;if(null!==t.getAttribute(p.TV_FOCUS))return C(t);let r=T(t);for(let t=0;t<r.length;t++){let a=e(r[t]);if(a)return a}}(this),r=C(this),a=ey();if(!a){let e=null!=t?t:r;e.length>0&&(e[0].focus(),a=e[0])}!this.isUserIdle_()&&(e.keyCode===S.ENTER?null!==a&&(e.preventDefault(),a.click()):P(e.keyCode)&&eg(this,r,e.keyCode)&&(e.preventDefault(),e.stopPropagation()))},this._onKeyUp=e=>{R(e.keyCode)||this.scheduleUserIdle_()},this._onPointerUp=e=>{"mouse"===e.pointerType?this.scheduleUserIdle_():"touch"===e.pointerType&&(this.isPlayerOrMedia_(e.target)&&this._isUserActive?this.setUserIdle_():(this.isUserIdle_()&&(this._lastPointerUpTime=performance.now(),this.addEventListener("click",this._onClickAfterPointerUp,!0)),this.scheduleUserIdle_()))},this._onClickAfterPointerUp=e=>{this.removeEventListener("click",this._onClickAfterPointerUp,!0),performance.now()-this._lastPointerUpTime<50&&(e.preventDefault(),e.stopPropagation())},this._onPointerMove=e=>{"mouse"===e.pointerType&&(this.setUserActive_(),this.isPlayerOrMedia_(e.target)&&this.scheduleUserIdle_())},this._onMouseLeave=()=>{this.setUserIdle_()},this._onChromeSlotTransition=e=>{"opacity"===e.propertyName&&this._updateTextTrackMargins()},this._updateTextTrackMargins=()=>{let e=this._player;if(void 0===e)return;let t=rq(this._topChromeSlot),r=rq(this._bottomChromeSlot);e.textTrackStyle.marginTop=null==t?void 0:t.height,e.textTrackStyle.marginBottom=null==r?void 0:r.height},this._onPreviewTimeChange=e=>{for(let t of(this._previewTime=e.detail.previewTime,this._stateReceivers))t[F].indexOf("previewTime")>=0&&(t.previewTime=this._previewTime)},this._onDestroy=()=>{this._player&&(this.removePlayerListeners_(this._player),this._player=void 0,this.propagatePlayerToAllReceivers_())};let t=this.attachShadow({mode:"open",delegatesFocus:!0});t.appendChild(rO().content.cloneNode(!0)),this._configuration=e,this._playerEl=t.querySelector('[part~="media-layer"]'),this._menuEl=t.querySelector('[part~="menu-layer"]'),this._menuGroup=t.querySelector("theoplayer-menu-group"),this._topChromeEl=t.querySelector('[part~="top"]'),this._topChromeSlot=t.querySelector('slot[name="top-chrome"]'),this._bottomChromeEl=t.querySelector('[part~="bottom"]'),this._bottomChromeSlot=t.querySelector("slot:not([name])"),this._mutationObserver=new MutationObserver(this._onMutation),"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(this._updateTextTrackMargins)),t.addEventListener(ex,this._onToggleMenu),t.addEventListener(tM,this._onEnterFullscreen),t.addEventListener(tI,this._onExitFullscreen),t.addEventListener(tF,this._onPreviewTimeChange),this._topChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._topChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("streamType"),this.tryInitializePlayer_()}}function rq(e){let t;for(let r of A(e).filter(m))if("0"!==getComputedStyle(r).opacity){let e=ec.fromRect(r.getBoundingClientRect());e.width>0&&e.height>0&&(t=t?t.union(e):e)}return t}rD.READY_EVENT=rR,customElements.define("theoplayer-ui",rD);let rB=o("theoplayer-default-ui",'<style>:host{box-sizing:border-box;container-name:theoplayer-default-ui-container;container-type:inline-size;display:inline-block;min-width:300px;min-width:var(--theoplayer-min-width,300px);position:relative}:host([hidden]){display:none!important}theoplayer-ui{display:block;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}[part=title]{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);text-shadow:0 0 4px rgba(0,0,0,.75);-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome]{display:flex}[part=centered-chrome] *,[part=centered-chrome] ::slotted(*){--theoplayer-button-icon-width:var(--theoplayer-centered-chrome-button-icon-width,48px);--theoplayer-control-height:var(--theoplayer-centered-chrome-control-height,48px);--theoplayer-play-button-icon-color:var(--theoplayer-center-play-button-icon-color,unset)}[part=middle-chrome]{flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:var(--theoplayer-mobile-control-backdrop-background,rgba(0,0,0,.5))}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:var(--theoplayer-time-range-control-height,12px);--theoplayer-range-track-pointer-background:var(--theoplayer-time-range-track-pointer-background,hsla(0,0%,100%,.5))}[part=ad-chrome]{--theoplayer-control-height:var(--theoplayer-ad-chrome-control-height,12px);align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{flex-shrink:0}theoplayer-ad-countdown,theoplayer-ad-skip-button[disabled]{text-shadow:0 0 4px rgba(0,0,0,.75)}theoplayer-ad-countdown{min-width:0}theoplayer-ad-skip-button{--theoplayer-ad-skip-font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);--theoplayer-ad-skip-line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25);--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;align-items:end;border-right:0!important;justify-items:end}:host(:not([mobile])) [mobile-only],:host(:not([mobile])) theoplayer-control-bar ::slotted([mobile-only]),:host([mobile]) [mobile-hidden],:host([mobile]) theoplayer-control-bar ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [tv-only],:host(:not([tv])) theoplayer-control-bar ::slotted([tv-only]),:host([tv]) [tv-hidden],:host([tv]) theoplayer-control-bar ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui:not([playing-ad]) theoplayer-control-bar ::slotted([ad-only]),theoplayer-ui[playing-ad] [ad-hidden],theoplayer-ui[playing-ad] theoplayer-control-bar ::slotted([ad-hidden]){display:none!important}theoplayer-ui:not([has-first-play]) theoplayer-control-bar{display:none!important}theoplayer-ui:not([has-first-play]),theoplayer-ui:not([has-first-play]) ::slotted(*){--theoplayer-before-first-play-display:none}:host(:not([mobile])) theoplayer-ui[has-first-play] [part~=center-play-button]{display:none!important}@container theoplayer-default-ui-container (max-width: 200px){:host(:not([mobile])) theoplayer-control-bar{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part~=center-play-button]{display:inline-flex!important}}theoplayer-ui:not([mobile]):not([casting]) theoplayer-ad-clickthrough-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:var(--theoplayer-volume-range-track-width,70px);overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}theoplayer-ui[playing-ad] .theoplayer-ad-control{--theoplayer-control-height:var(--theoplayer-ad-control-height,16px)}</style><theoplayer-ui><theoplayer-control-bar slot="top-chrome" part="top-chrome"><div part="title" ad-hidden><slot name="title"></slot></div><span class="theoplayer-spacer"></span><theoplayer-language-menu-button menu="language-menu" mobile-only ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-only ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-only ad-hidden></theoplayer-chromecast-button><slot name="top-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-only ad-hidden></theoplayer-settings-menu-button><theoplayer-ad-clickthrough-button ad-only></theoplayer-ad-clickthrough-button></theoplayer-control-bar><theoplayer-loading-indicator slot="centered-loading" no-auto-hide></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><slot name="centered-chrome"><theoplayer-seek-button part="seek-back-button seek-button center-button" seek-offset="-10" mobile-only ad-hidden></theoplayer-seek-button><theoplayer-play-button part="center-play-button play-button center-button"></theoplayer-play-button><theoplayer-seek-button part="seek-forward-button seek-button center-button" seek-offset="10" mobile-only ad-hidden></theoplayer-seek-button></slot></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><div part="bottom-chrome"><theoplayer-control-bar part="ad-chrome" ad-only><theoplayer-ad-display></theoplayer-ad-display><theoplayer-ad-countdown></theoplayer-ad-countdown><span class="theoplayer-spacer"></span><theoplayer-ad-skip-button></theoplayer-ad-skip-button></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button part="play-button" mobile-hidden ad-only class="theoplayer-ad-control"></theoplayer-play-button><theoplayer-mute-button part="mute-button" ad-only class="theoplayer-ad-control"></theoplayer-mute-button><theoplayer-time-range part="time-range" show-ad-markers tv-focus class="theoplayer-ad-control"></theoplayer-time-range><theoplayer-chromecast-button tv-hidden ad-only class="theoplayer-ad-control"></theoplayer-chromecast-button><theoplayer-fullscreen-button ad-only class="theoplayer-ad-control"></theoplayer-fullscreen-button></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button part="play-button" mobile-hidden></theoplayer-play-button><theoplayer-mute-button part="mute-button" tv-hidden></theoplayer-mute-button><theoplayer-volume-range part="volume-range" mobile-hidden tv-hidden></theoplayer-volume-range><theoplayer-live-button part="live-button" live-only ad-hidden></theoplayer-live-button><theoplayer-time-display show-duration remaining-when-live></theoplayer-time-display><span class="theoplayer-spacer" style="pointer-events: auto"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button tv-hidden mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button tv-hidden mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-hidden ad-hidden></theoplayer-settings-menu-button><theoplayer-fullscreen-button part="fullscreen-button" tv-hidden></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-settings-menu id="settings-menu" slot="menu" hidden></theoplayer-settings-menu><slot name="error" slot="error"><theoplayer-error-display></theoplayer-error-display></slot><slot name="menu" slot="menu"></slot></theoplayer-ui>');class rF extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FLUID,p.DEVICE_TYPE,p.STREAM_TYPE,p.USER_IDLE_TIMEOUT,p.DVR_THRESHOLD,p.HAS_TITLE]}initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rB().content.cloneNode(!0)),e}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._ui.player}get configuration(){return this._ui.configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this.setConfiguration_(e)}setConfiguration_(e){var t;this._ui.configuration={...e,ads:{...null!=(t=e.ads)?t:{},showCountdown:!1}}}get source(){return this._ui.source}set source(e){this.removeAttribute(p.SOURCE),this._ui.source=e}get fluid(){return this._ui.fluid}set fluid(e){this._ui.fluid=e}get muted(){return this._ui.muted}set muted(e){this._ui.muted=e}get autoplay(){return this._ui.autoplay}set autoplay(e){this._ui.autoplay=e}get streamType(){return this._ui.streamType}set streamType(e){this._ui.streamType=e}get userIdle(){return this._ui.userIdle}get userIdleTimeout(){return this._ui.userIdleTimeout}set userIdleTimeout(e){this._ui.userIdleTimeout=e}get dvrThreshold(){return this._ui.dvrThreshold}set dvrThreshold(e){this._ui.dvrThreshold=e}connectedCallback(){if(a(this),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}this._appliedExtensions||(this._appliedExtensions=!0,function(e){for(let t of rT)t(e)}(this),i(this)),this._onTitleSlotChange()}disconnectedCallback(){clearTimeout(this._timeRangeInertTimeout)}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;e===p.SOURCE?this._ui.source=r?JSON.parse(r):void 0:e===p.CONFIGURATION?this.setConfiguration_(r?JSON.parse(r):{}):e===p.MUTED?this.muted=a:e===p.AUTOPLAY?this.autoplay=a:e===p.FLUID?this.fluid=a:e===p.DEVICE_TYPE?(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),this._ui.setAttribute(p.DEVICE_TYPE,r)):e===p.STREAM_TYPE?this.streamType=r:e===p.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(r):e===p.DVR_THRESHOLD&&(this.dvrThreshold=Number(r)),rF.observedAttributes.indexOf(e)>=0&&i(this)}constructor(e={}){var t,r,a;super(),this._timeRangeInertTimeout=0,this._appliedExtensions=!1,this._updateStreamType=()=>{this.setAttribute(p.STREAM_TYPE,this.streamType),this._timeRange&&x(this._timeRange,p.HIDDEN,"live"===this.streamType)},this._dispatchReadyEvent=()=>{this.dispatchEvent(ed(rR))},this._updateUserIdle=()=>{this._timeRange&&(clearTimeout(this._timeRangeInertTimeout),this.userIdle?this._timeRange.inert=!0:this._timeRangeInertTimeout=setTimeout(()=>{this._timeRange.inert=!1},50)),this.dispatchEvent(ed(rP))},this._onTitleSlotChange=()=>{this._titleSlot&&x(this,p.HAS_TITLE,this._titleSlot.assignedNodes().length>0)},this._shadowRoot=this.initShadowRoot(),this._ui=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rR,this._dispatchReadyEvent),this._ui.addEventListener(rP,this._updateUserIdle),this._ui.addEventListener(rS,this._updateStreamType),this.setConfiguration_(e),this._titleSlot=null!=(r=this._shadowRoot.querySelector('slot[name="title"]'))?r:void 0,null==(t=this._titleSlot)||t.addEventListener("slotchange",this._onTitleSlotChange),this._timeRange=null!=(a=this._shadowRoot.querySelector("theoplayer-time-range"))?a:void 0,this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("streamType"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("dvrThreshold")}}rF.READY_EVENT=rR,customElements.define("theoplayer-default-ui",rF);let rU=o("theolive-bad-network-button",I(`<span part="icon">${tS}<span part="warning-icon"><svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48">
|
|
35
35
|
<path d="m40 936 440-760 440 760H40Zm444.175-117q12.825 0 21.325-8.675 8.5-8.676 8.5-21.5 0-12.825-8.675-21.325-8.676-8.5-21.5-8.5-12.825 0-21.325 8.675-8.5 8.676-8.5 21.5 0 12.825 8.675 21.325 8.676 8.5 21.5 8.5ZM454 708h60V484h-60v224Z"/>
|
|
36
36
|
</svg></span></span>`,"[part=icon]{display:inline-block;position:relative}[part=warning-icon]{display:none;height:60%;min-width:60%;position:absolute;right:-10%;top:0;width:60%}[part=warning-icon] svg{fill:red;fill:var(--theolive-bad-network-mode,red)}"));class rH extends H(eP,["player"]){connectedCallback(){var e;super.connectedCallback(),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"open settings menu"),this._warningIcon=null!=(e=this.shadowRoot.querySelector('[part="warning-icon"]'))?e:void 0}get player(){return this._player}set player(e){this._player!==e&&(this._theoLive&&(this._theoLive.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._theoLive=null==e?void 0:e.theoLive,this._theoLive&&(this._theoLive.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)))}constructor(){super({template:rU()}),this.handleEnterBadNetworkMode_=()=>{this._warningIcon&&(this._warningIcon.style.display="block")},this.handleExitBadNetworkMode_=()=>{this._warningIcon&&(this._warningIcon.style.display="none")}}}customElements.define("theolive-bad-network-button",rH);class rV extends H(eu,["player"]){get player(){return this._player}set player(e){var t,r;this._player!==e&&(this._theoLive&&(this._theoLive.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._theoLive=null==e?void 0:e.theoLive,this._badNetworkMode=null!=(r=null==(t=this._theoLive)?void 0:t.badNetworkMode)&&r,this._theoLive&&(this._theoLive.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this.handlePlayer())}handleEnterBadNetworkMode(){}handleExitBadNetworkMode(){}attributeChangedCallback(e,t,r){r!==t&&e===p.ARIA_CHECKED&&t!==r&&this.handleChecked(this.checked)}constructor(e){super(e),this._badNetworkMode=!1,this.handleEnterBadNetworkMode_=()=>{this._badNetworkMode=!0,this.handleEnterBadNetworkMode()},this.handleExitBadNetworkMode_=()=>{this._badNetworkMode=!1,this.handleExitBadNetworkMode()},this._slotEl=this.shadowRoot.querySelector("slot")}}let rz=o("theolive-automatic-quality-selector",I("<slot></slot>"));customElements.define("theolive-automatic-quality-selector",class extends rV{handleEnterBadNetworkMode(){this.update_()}handleExitBadNetworkMode(){this.update_()}handlePlayer(){this.update_()}update_(){var e,t;let r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)!==!0;this.checked!==r&&(this.checked=r)}handleChecked(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!1)}constructor(){super({template:rz()}),w(this._slotEl,"High Quality")}});let rG=o("theolive-bad-network-quality-selector",I("<slot></slot>"));customElements.define("theolive-bad-network-quality-selector",class extends rV{handleEnterBadNetworkMode(){this.update_()}handleExitBadNetworkMode(){this.update_()}handlePlayer(){this.update_()}update_(){var e,t;let r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)===!0;this.checked!==r&&(this.checked=r)}handleChecked(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!0)}constructor(){super({template:rG()}),w(this._slotEl,"Low Quality")}});let rQ=o("theolive-bad-network-menu",`<style>${eD}</style>
|
|
37
37
|
<theoplayer-radio-group>
|
|
38
38
|
<theolive-automatic-quality-selector></theolive-automatic-quality-selector>
|
|
39
39
|
<theolive-bad-network-quality-selector></theolive-bad-network-quality-selector>
|
|
40
40
|
</theoplayer-radio-group>
|
|
41
|
-
`);class r$ extends HTMLElement{_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._radioGroup instanceof ev||customElements.upgrade(this._radioGroup),this.shadowRoot.addEventListener("change",this._onChange)}disconnectedCallback(){this.shadowRoot.removeEventListener("change",this._onChange)}constructor(){super(),this._onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};let e=this.attachShadow({mode:"open"});e.appendChild(rQ().content.cloneNode(!0)),this._radioGroup=e.querySelector("theoplayer-radio-group")}}customElements.define("theolive-bad-network-menu",r$);let rK=o("theolive-default-ui",'<style>:host{box-sizing:border-box;display:inline-block;font-family:Helvetica,Arial,sans-serif;position:relative;width:100%}:host([hidden]){display:none!important}theoplayer-ui{--theoplayer-loading-delay:0.1s;display:block;font-family:Helvetica,Arial,sans-serif;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}theoplayer-menu::part(heading){display:none!important}[part=centered-chrome]{display:flex}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{flex-grow:1;justify-content:flex-end;pointer-events:none}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:rgba(0,0,0,.5)}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}:host(:not([mobile])) [mobile-only],:host([mobile]) [mobile-hidden]{display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar,theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui[playing-ad] [ad-hidden]{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:70px;overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display{padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}p{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:20px;font-size:var(--theoplayer-text-font-size,20px)}#announcement,#loading-announcement,#offline-announcement{display:none}theolive-bad-network-button{display:none;display:var(--theolive-bad-network-button-display,none)}theoplayer-settings-menu-button{display:inline-flex;display:var(--theolive-quality-button-display,inline-flex)}</style><theoplayer-ui><p id="loading-announcement" no-auto-hide slot="centered-chrome"><slot name="loading-announcement">Loading...</slot></p><p id="offline-announcement" no-auto-hide slot="centered-chrome"><slot name="offline-announcement">The live stream hasn\'t started yet</slot></p><p id="announcement" no-auto-hide slot="centered-chrome"></p><theoplayer-loading-indicator slot="centered-loading" no-auto-hide part="loading-indicator"></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-play-button part="center-play-button play-button center-button"></theoplayer-play-button></div><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-play-button mobile-hidden part="play-button"></theoplayer-play-button><theoplayer-mute-button part="mute-button"></theoplayer-mute-button><theoplayer-volume-range mobile-hidden part="volume-range"></theoplayer-volume-range><theoplayer-live-button ad-hidden live-only part="live-button"></theoplayer-live-button><span class="theoplayer-spacer"></span><theoplayer-settings-menu-button ad-hidden menu="all-quality-menu" part="quality-button"></theoplayer-settings-menu-button><theolive-bad-network-button ad-hidden menu="quality-menu" part="theolive-bad-network-button"></theolive-bad-network-button><theoplayer-fullscreen-button part="fullscreen-button"></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-menu id="quality-menu" slot="menu" menu-close-on-input hidden><theolive-bad-network-menu></theolive-bad-network-menu></theoplayer-menu><theoplayer-menu id="all-quality-menu" slot="menu" menu-close-on-input hidden><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-error-display slot="error" part="error-display"></theoplayer-error-display></theoplayer-ui>');class rY extends rF{initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rK().content.cloneNode(!0)),e}hidePlayerError(){this._root.removeAttribute("has-error"),this._errorDisplay.style.display="none"}stopHidingPlayerError(){this._root.setAttribute("has-error",""),this._errorDisplay.style.display="flex"}hidePlayerPlayButton_(){this._playButton.style.display="none"}stopHidingPlayerPlayButton(){this._playButton.style.display="inline-flex"}showMessage_(e,t){this.hidePlayerError(),this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none","loading"===e?this._loading.style.display="block":"offline"===e?this._offline.style.display="block":(this._announcement.textContent=null!=t?t:"",this._announcement.style.display="block"),this.hidePlayerPlayButton_()}hideMessage_(){this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none",this.stopHidingPlayerPlayButton()}constructor(e={}){super(e),this.onReady=()=>{this._ui.removeEventListener(rR,this.onReady);let e=this.player;if(e){var t,r,a;null==(t=e.theoLive)||t.addEventListener(["distributionloadstart","publicationloadstart"],this.onLoadChannelStart),null==(r=e.theoLive)||r.addEventListener(["distributionoffline","publicationoffline"],this.onChannelOffline),null==(a=e.theoLive)||a.addEventListener(["endpointloaded","publicationloaded"],this.onChannelLoaded),e.addEventListener("error",this.onError)}},this.onLoadChannelStart=()=>{this.showMessage_("loading",void 0)},this.onChannelOffline=()=>{this.showMessage_("offline",void 0)},this.onChannelLoaded=()=>{this.hidePlayerError(),this.hideMessage_()},this.onError=e=>{let t=e.errorObject.code;if(t<13e3||t>=14e3){this.showMessage_("offline",void 0);return}this.stopHidingPlayerError(),this.hideMessage_()},this._loading=this._shadowRoot.querySelector("#loading-announcement"),this._offline=this._shadowRoot.querySelector("#offline-announcement"),this._announcement=this._shadowRoot.querySelector("#announcement"),this._errorDisplay=this._shadowRoot.querySelector("theoplayer-error-display"),this._playButton=this._shadowRoot.querySelector("theoplayer-play-button"),this._root=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rR,this.onReady)}}customElements.define("theolive-default-ui",rY),e.ActiveQualityDisplay=tv,e.AdClickThroughButton=rf,e.AdCountdown=rv,e.AdDisplay=ry,e.AdSkipButton=rw,e.AirPlayButton=rr,e.Attribute=p,e.Button=N,e.CastButton=t2,e.ChromecastButton=t7,e.ChromecastDisplay=re,e.CloseMenuButton=eM,e.ColorStops=tD,e.ControlBar=s,e.DefaultUI=rF,e.DurationDisplay=el,e.ErrorDisplay=t5,e.ExtensionSlot=rx,e.FullscreenButton=tN,e.GestureReceiver=rs,e.LanguageMenu=tn,e.LanguageMenuButton=th,e.LinkButton=B,e.LiveButton=rp,e.LoadingIndicator=ro,e.MediaTrackRadioButton=eN,e.Menu=ew,e.MenuButton=eP,e.MenuGroup=eC,e.MuteButton=Y,e.PlayButton=Q,e.PlaybackRateDisplay=tm,e.PlaybackRateMenu=tg,e.PlaybackRateMenuButton=tc,e.PlaybackRateRadioGroup=tp,e.PreviewThumbnail=tz,e.PreviewTimeDisplay=tK,e.QualityRadioButton=tk,e.QualityRadioGroup=tx,e.RadioButton=eu,e.RadioGroup=ev,e.Range=tB,e.SeekButton=Z,e.SettingsMenu=tL,e.SettingsMenuButton=tR,e.SlotContainer=c,e.StateReceiverMixin=H,e.THEOliveDefaultUI=rY,e.TextTrackOffRadioButton=e$,e.TextTrackRadioButton=eF,e.TextTrackStyleDisplay=e4,e.TextTrackStyleMenu=ta,e.TextTrackStyleRadioGroup=e9,e.TextTrackStyleResetButton=tA,e.TimeDisplay=eo,e.TimeRange=tJ,e.TrackRadioGroup=eW,e.UIContainer=rD,e.VolumeRange=t0,e.buttonTemplate=I,e.linkButtonTemplate=D,e.menuGroupTemplate=eT,e.menuTemplate=ek,e.rangeTemplate=tq,e.registerExtension=function(e){rT.push(e)},e.version="1.16.0"});
|
|
41
|
+
`);class r$ extends HTMLElement{_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._radioGroup instanceof ev||customElements.upgrade(this._radioGroup),this.shadowRoot.addEventListener("change",this._onChange)}disconnectedCallback(){this.shadowRoot.removeEventListener("change",this._onChange)}constructor(){super(),this._onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};let e=this.attachShadow({mode:"open"});e.appendChild(rQ().content.cloneNode(!0)),this._radioGroup=e.querySelector("theoplayer-radio-group")}}customElements.define("theolive-bad-network-menu",r$);let rK=o("theolive-default-ui",'<style>:host{box-sizing:border-box;display:inline-block;font-family:Helvetica,Arial,sans-serif;position:relative;width:100%}:host([hidden]){display:none!important}theoplayer-ui{--theoplayer-loading-delay:0.1s;display:block;font-family:Helvetica,Arial,sans-serif;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}theoplayer-menu::part(heading){display:none!important}[part=centered-chrome]{display:flex}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{flex-grow:1;justify-content:flex-end;pointer-events:none}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:rgba(0,0,0,.5)}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}:host(:not([mobile])) [mobile-only],:host([mobile]) [mobile-hidden]{display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar,theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui[playing-ad] [ad-hidden]{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:70px;overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display{padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}p{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:20px;font-size:var(--theoplayer-text-font-size,20px)}#announcement,#loading-announcement,#offline-announcement{display:none}theolive-bad-network-button{display:none;display:var(--theolive-bad-network-button-display,none)}theoplayer-settings-menu-button{display:inline-flex;display:var(--theolive-quality-button-display,inline-flex)}</style><theoplayer-ui><p id="loading-announcement" no-auto-hide slot="centered-chrome"><slot name="loading-announcement">Loading...</slot></p><p id="offline-announcement" no-auto-hide slot="centered-chrome"><slot name="offline-announcement">The live stream hasn\'t started yet</slot></p><p id="announcement" no-auto-hide slot="centered-chrome"></p><theoplayer-loading-indicator slot="centered-loading" no-auto-hide part="loading-indicator"></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-play-button part="center-play-button play-button center-button"></theoplayer-play-button></div><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-play-button mobile-hidden part="play-button"></theoplayer-play-button><theoplayer-mute-button part="mute-button"></theoplayer-mute-button><theoplayer-volume-range mobile-hidden part="volume-range"></theoplayer-volume-range><theoplayer-live-button ad-hidden live-only part="live-button"></theoplayer-live-button><span class="theoplayer-spacer"></span><theoplayer-settings-menu-button ad-hidden menu="all-quality-menu" part="quality-button"></theoplayer-settings-menu-button><theolive-bad-network-button ad-hidden menu="quality-menu" part="theolive-bad-network-button"></theolive-bad-network-button><theoplayer-fullscreen-button part="fullscreen-button"></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-menu id="quality-menu" slot="menu" menu-close-on-input hidden><theolive-bad-network-menu></theolive-bad-network-menu></theoplayer-menu><theoplayer-menu id="all-quality-menu" slot="menu" menu-close-on-input hidden><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-error-display slot="error" part="error-display"></theoplayer-error-display></theoplayer-ui>');class rY extends rF{initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rK().content.cloneNode(!0)),e}hidePlayerError(){this._root.removeAttribute("has-error"),this._errorDisplay.style.display="none"}stopHidingPlayerError(){this._root.setAttribute("has-error",""),this._errorDisplay.style.display="flex"}hidePlayerPlayButton_(){this._playButton.style.display="none"}stopHidingPlayerPlayButton(){this._playButton.style.display="inline-flex"}showMessage_(e,t){this.hidePlayerError(),this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none","loading"===e?this._loading.style.display="block":"offline"===e?this._offline.style.display="block":(this._announcement.textContent=null!=t?t:"",this._announcement.style.display="block"),this.hidePlayerPlayButton_()}hideMessage_(){this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none",this.stopHidingPlayerPlayButton()}constructor(e={}){super(e),this.onReady=()=>{this._ui.removeEventListener(rR,this.onReady);let e=this.player;if(e){var t,r,a;null==(t=e.theoLive)||t.addEventListener(["distributionloadstart","publicationloadstart"],this.onLoadChannelStart),null==(r=e.theoLive)||r.addEventListener(["distributionoffline","publicationoffline"],this.onChannelOffline),null==(a=e.theoLive)||a.addEventListener(["endpointloaded","publicationloaded"],this.onChannelLoaded),e.addEventListener("error",this.onError)}},this.onLoadChannelStart=()=>{this.showMessage_("loading",void 0)},this.onChannelOffline=()=>{this.showMessage_("offline",void 0)},this.onChannelLoaded=()=>{this.hidePlayerError(),this.hideMessage_()},this.onError=e=>{let t=e.errorObject.code;if(t<13e3||t>=14e3){this.showMessage_("offline",void 0);return}this.stopHidingPlayerError(),this.hideMessage_()},this._loading=this._shadowRoot.querySelector("#loading-announcement"),this._offline=this._shadowRoot.querySelector("#offline-announcement"),this._announcement=this._shadowRoot.querySelector("#announcement"),this._errorDisplay=this._shadowRoot.querySelector("theoplayer-error-display"),this._playButton=this._shadowRoot.querySelector("theoplayer-play-button"),this._root=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rR,this.onReady)}}customElements.define("theolive-default-ui",rY),e.ActiveQualityDisplay=tv,e.AdClickThroughButton=rf,e.AdCountdown=rv,e.AdDisplay=ry,e.AdSkipButton=rw,e.AirPlayButton=rr,e.Attribute=p,e.Button=N,e.CastButton=t2,e.ChromecastButton=t7,e.ChromecastDisplay=re,e.CloseMenuButton=eM,e.ColorStops=tD,e.ControlBar=s,e.DefaultUI=rF,e.DurationDisplay=el,e.ErrorDisplay=t5,e.ExtensionSlot=rx,e.FullscreenButton=tN,e.GestureReceiver=rs,e.LanguageMenu=tn,e.LanguageMenuButton=th,e.LinkButton=B,e.LiveButton=rp,e.LoadingIndicator=ro,e.MediaTrackRadioButton=eN,e.Menu=ew,e.MenuButton=eP,e.MenuGroup=eC,e.MuteButton=Y,e.PlayButton=Q,e.PlaybackRateDisplay=tm,e.PlaybackRateMenu=tg,e.PlaybackRateMenuButton=tc,e.PlaybackRateRadioGroup=tp,e.PreviewThumbnail=tz,e.PreviewTimeDisplay=tK,e.QualityRadioButton=tk,e.QualityRadioGroup=tx,e.RadioButton=eu,e.RadioGroup=ev,e.Range=tB,e.SeekButton=Z,e.SettingsMenu=tL,e.SettingsMenuButton=tR,e.SlotContainer=c,e.StateReceiverMixin=H,e.THEOliveDefaultUI=rY,e.TextTrackOffRadioButton=e$,e.TextTrackRadioButton=eF,e.TextTrackStyleDisplay=e4,e.TextTrackStyleMenu=ta,e.TextTrackStyleRadioGroup=e9,e.TextTrackStyleResetButton=tA,e.TimeDisplay=eo,e.TimeRange=tJ,e.TrackRadioGroup=eW,e.UIContainer=rD,e.VolumeRange=t0,e.buttonTemplate=I,e.linkButtonTemplate=D,e.menuGroupTemplate=eT,e.menuTemplate=ek,e.rangeTemplate=tq,e.registerExtension=function(e){rT.push(e)},e.version="1.16.2"});
|
|
42
42
|
//# sourceMappingURL=THEOplayerUI.js.map
|