@theoplayer/web-ui 1.16.1 → 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 +6 -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 +3 -3
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +3 -3
- 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.mjs
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
|
*/import{ChromelessPlayer as e}from"theoplayer/chromeless";function t(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function r(e){t()&&window.ShadyCSS.styleElement(e)}function a(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 i(e,r){let a;return()=>{if(void 0===a){var i;(a=document.createElement("template")).innerHTML=r,r=void 0,i=a,t()&&window.ShadyCSS.prepareTemplate(i,e)}return a}}let o=i("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 n extends HTMLElement{connectedCallback(){r(this)}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}).appendChild(o().content.cloneNode(!0))}}customElements.define("theoplayer-control-bar",n);var s,l,h,d=((s={}).CONFIGURATION="configuration",s.SOURCE="source",s.AUTOPLAY="autoplay",s.MUTED="muted",s.FULLSCREEN="fullscreen",s.FULLWINDOW="fullwindow",s.FLUID="fluid",s.DEVICE_TYPE="device-type",s.MOBILE="mobile",s.TV="tv",s.TV_FOCUS="tv-focus",s.MOBILE_ONLY="mobile-only",s.MOBILE_HIDDEN="mobile-hidden",s.TV_ONLY="tv-only",s.TV_HIDDEN="tv-hidden",s.USER_IDLE="user-idle",s.USER_IDLE_TIMEOUT="user-idle-timeout",s.NO_AUTO_HIDE="no-auto-hide",s.DISABLED="disabled",s.INERT="inert",s.HIDDEN="hidden",s.PAUSED="paused",s.ENDED="ended",s.VOLUME_LEVEL="volume-level",s.CASTING="casting",s.LOADING="loading",s.STREAM_TYPE="stream-type",s.LIVE="live",s.LIVE_ONLY="live-only",s.LIVE_HIDDEN="live-hidden",s.LIVE_THRESHOLD="live-threshold",s.DVR_THRESHOLD="dvr-threshold",s.REMAINING="remaining",s.REMAINING_WHEN_LIVE="remaining-when-live",s.SHOW_DURATION="show-duration",s.SEEK_OFFSET="seek-offset",s.MENU="menu",s.MENU_OPENED="menu-opened",s.MENU_CLOSE_ON_INPUT="menu-close-on-input",s.ARIA_LABEL="aria-label",s.ARIA_LIVE="aria-live",s.ARIA_CHECKED="aria-checked",s.HAS_AUDIO="has-audio",s.HAS_SUBTITLES="has-subtitles",s.HAS_ERROR="has-error",s.HAS_FIRST_PLAY="has-first-play",s.HAS_TITLE="has-title",s.CAST_STATE="cast-state",s.TRACK_TYPE="track-type",s.SHOW_OFF="show-off",s.PLAYING_AD="playing-ad",s.SHOW_AD_MARKERS="show-ad-markers",s.CLICKTHROUGH="clickthrough",s.PROPERTY="property",s.VALUE="value",s);let p=i("theoplayer-slot-container","<style>:host{display:contents}::slotted(:not([no-auto-hide])),slot{opacity:inherit}</style><slot></slot>");class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(p().content.cloneNode(!0))}}function c(){}function y(e){return e.nodeType===Node.ELEMENT_NODE}function g(e){return e instanceof HTMLElement}customElements.define("theoplayer-slot-container",u);let m="function"==typeof Array.isArray?Array.isArray:e=>"[object Array]"===Object.prototype.toString.call(e),v="function"==typeof Array.from?e=>Array.from(e):e=>Array.prototype.slice.call(e),b="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]},_="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},f="function"==typeof String.prototype.startsWith?(e,t)=>e.startsWith(t):(e,t)=>e.substring(0,t.length)===t,k="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 i(e,r){let a;return()=>{if(void 0===a){var i;(a=document.createElement("template")).innerHTML=r,r=void 0,i=a,t()&&window.ShadyCSS.prepareTemplate(i,e)}return a}}let o=i("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 n extends HTMLElement{connectedCallback(){r(this)}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:!0}).appendChild(o().content.cloneNode(!0))}}customElements.define("theoplayer-control-bar",n);var s,l,h,d=((s={}).CONFIGURATION="configuration",s.SOURCE="source",s.AUTOPLAY="autoplay",s.MUTED="muted",s.FULLSCREEN="fullscreen",s.FULLWINDOW="fullwindow",s.FLUID="fluid",s.DEVICE_TYPE="device-type",s.MOBILE="mobile",s.TV="tv",s.TV_FOCUS="tv-focus",s.MOBILE_ONLY="mobile-only",s.MOBILE_HIDDEN="mobile-hidden",s.TV_ONLY="tv-only",s.TV_HIDDEN="tv-hidden",s.USER_IDLE="user-idle",s.USER_IDLE_TIMEOUT="user-idle-timeout",s.NO_AUTO_HIDE="no-auto-hide",s.DISABLED="disabled",s.INERT="inert",s.HIDDEN="hidden",s.PAUSED="paused",s.ENDED="ended",s.VOLUME_LEVEL="volume-level",s.CASTING="casting",s.LOADING="loading",s.STREAM_TYPE="stream-type",s.LIVE="live",s.LIVE_ONLY="live-only",s.LIVE_HIDDEN="live-hidden",s.LIVE_THRESHOLD="live-threshold",s.DVR_THRESHOLD="dvr-threshold",s.REMAINING="remaining",s.REMAINING_WHEN_LIVE="remaining-when-live",s.SHOW_DURATION="show-duration",s.SEEK_OFFSET="seek-offset",s.MENU="menu",s.MENU_OPENED="menu-opened",s.MENU_CLOSE_ON_INPUT="menu-close-on-input",s.ARIA_LABEL="aria-label",s.ARIA_LIVE="aria-live",s.ARIA_CHECKED="aria-checked",s.HAS_AUDIO="has-audio",s.HAS_SUBTITLES="has-subtitles",s.HAS_ERROR="has-error",s.HAS_FIRST_PLAY="has-first-play",s.HAS_TITLE="has-title",s.CAST_STATE="cast-state",s.TRACK_TYPE="track-type",s.SHOW_OFF="show-off",s.PLAYING_AD="playing-ad",s.SHOW_AD_MARKERS="show-ad-markers",s.CLICKTHROUGH="clickthrough",s.PROPERTY="property",s.VALUE="value",s);let p=i("theoplayer-slot-container","<style>:host{display:contents}::slotted(:not([no-auto-hide])),slot{opacity:inherit}</style><slot></slot>");class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(p().content.cloneNode(!0))}}function c(){}function y(e){return e.nodeType===Node.ELEMENT_NODE}function g(e){return e instanceof HTMLElement}customElements.define("theoplayer-slot-container",u);let m="function"==typeof Array.isArray?Array.isArray:e=>"[object Array]"===Object.prototype.toString.call(e),v="function"==typeof Array.from?e=>Array.from(e):e=>Array.prototype.slice.call(e),b="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]},_="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},f="function"==typeof String.prototype.startsWith?(e,t)=>e.startsWith(t):(e,t)=>e.substring(0,t.length)===t,k="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 E(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t}function w(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)}function x(e){if(e.shadowRoot)return e.shadowRoot.children;if("slot"===e.localName.toLowerCase()){let t=e.assignedNodes();if(t.length>0)return t.filter(y)}return g(e)?e.children:[]}function T(e){let t=[];for(let r of e.assignedNodes({flatten:!0}))y(r)&&(t.push(r),"theoplayer-slot-container"===r.nodeName.toLowerCase()&&t.push(...v(r.children)));return t}function A(e){let t=[];return function e(t,r){if(g(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=x(t);for(let t=0;t<a.length;t++)e(a[t],r)}}}}(e,t),t}function C(e){let t=e.nodeName.toLowerCase();if(t.indexOf("-")>=0){if(!customElements.get(t))return customElements.whenDefined(t);customElements.upgrade(e)}}var L=((l={})[l.ENTER=13]="ENTER",l[l.ESCAPE=27]="ESCAPE",l[l.SPACE=32]="SPACE",l[l.END=35]="END",l[l.HOME=36]="HOME",l[l.LEFT=37]="LEFT",l[l.UP=38]="UP",l[l.RIGHT=39]="RIGHT",l[l.DOWN=40]="DOWN",l[l.BACK_SAMSUNG=88]="BACK_SAMSUNG",l[l.BACK_WEBOS=461]="BACK_WEBOS",l[l.BACK_TIZEN=10009]="BACK_TIZEN",l);function S(e){return 37<=e&&e<=40}function P(e){return 10009===e||27===e||88===e||461===e}function R(e){return 13===e||32===e}function M(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 I=i("theoplayer-button",M("<slot></slot>"));class O extends HTMLElement{static get observedAttributes(){return[d.DISABLED]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){r(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(d.ARIA_LIVE)||this.setAttribute(d.ARIA_LIVE,"polite"),this.hasAttribute(d.DISABLED)||this._enable()}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("keyup",this._onKeyUp)}get disabled(){return this.hasAttribute(d.DISABLED)}set disabled(e){w(this,d.DISABLED,e)}attributeChangedCallback(e,t,r){e===d.DISABLED&&r!==t&&(null!=r?this._disable():this._enable()),O.observedAttributes.indexOf(e)>=0&&a(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=>{!R(e.keyCode)||e.metaKey||e.altKey?this.removeEventListener("keyup",this._onKeyUp):this.addEventListener("keyup",this._onKeyUp)},this._onKeyUp=e=>{this.removeEventListener("keyup",this._onKeyUp),R(e.keyCode)&&this.handleClick()};let r=null!=(t=null==e?void 0:e.template)?t:I();this.attachShadow({mode:"open"}).appendChild(r.content.cloneNode(!0)),this._upgradeProperty("disabled")}}function N(e,t=""){return M(`<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",O);let D=i("theoplayer-link-button",N("<slot></slot>"));class q extends HTMLElement{static get observedAttributes(){return[d.DISABLED]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){r(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(d.ARIA_LIVE)||this.setAttribute(d.ARIA_LIVE,"polite"),this.hasAttribute(d.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(d.DISABLED)}set disabled(e){w(this,d.DISABLED,e)}setLink(e,t){this._linkEl.href=e,this._linkEl.target=t}attributeChangedCallback(e,t,r){e===d.DISABLED&&r!==t&&(null!=r?this._disable():this._enable()),O.observedAttributes.indexOf(e)>=0&&a(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===L.SPACE)e.preventDefault(),this._linkEl.click()}},this._onClick=()=>{!this.disabled&&this.handleClick()};let r=null!=(t=null==e?void 0:e.template)?t:D(),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",q);let B="theoplayerUiObservedProperties";function F(e){return B in e&&m(e[B])}function U(e,t){return class extends e{get[B](){return t}}}async function H(e,t,r){if(t.contains(e))return;e.nodeName.indexOf("-")>=0&&!F(e)&&(await Promise.resolve(),await customElements.whenDefined(e.nodeName.toLowerCase()),customElements.upgrade(e)),F(e)&&r(e);let a=x(e);a.length>0&&await Promise.all(v(a).map(e=>H(e,t,r)))}let V=i("theoplayer-play-button",M(`<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>
|
|
@@ -38,5 +38,5 @@ ${t}</style><div part="container"><div part="background"></div><div part="pointe
|
|
|
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(){r(this),this._radioGroup instanceof em||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=i("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);let rW="1.16.1";export{tm as ActiveQualityDisplay,r_ as AdClickThroughButton,rm as AdCountdown,rc as AdDisplay,rE as AdSkipButton,rt as AirPlayButton,d as Attribute,O as Button,t5 as CastButton,t4 as ChromecastButton,t9 as ChromecastDisplay,eR as CloseMenuButton,tN as ColorStops,n as ControlBar,rF as DefaultUI,es as DurationDisplay,t1 as ErrorDisplay,rw as ExtensionSlot,tO as FullscreenButton,rn as GestureReceiver,to as LanguageMenu,tl as LanguageMenuButton,q as LinkButton,rd as LiveButton,ri as LoadingIndicator,eO as MediaTrackRadioButton,eE as Menu,eS as MenuButton,eA as MenuGroup,K as MuteButton,G as PlayButton,tg as PlaybackRateDisplay,ty as PlaybackRateMenu,tu as PlaybackRateMenuButton,td as PlaybackRateRadioGroup,tV as PreviewThumbnail,t$ as PreviewTimeDisplay,tf as QualityRadioButton,tw as QualityRadioGroup,ep as RadioButton,em as RadioGroup,tq as Range,W as SeekButton,tC as SettingsMenu,tP as SettingsMenuButton,u as SlotContainer,U as StateReceiverMixin,rY as THEOliveDefaultUI,eQ as TextTrackOffRadioButton,eB as TextTrackRadioButton,e8 as TextTrackStyleDisplay,tr as TextTrackStyleMenu,e6 as TextTrackStyleRadioGroup,tT as TextTrackStyleResetButton,ei as TimeDisplay,tj as TimeRange,eY as TrackRadioGroup,rD as UIContainer,tX as VolumeRange,M as buttonTemplate,N as linkButtonTemplate,ex as menuGroupTemplate,ef as menuTemplate,tD as rangeTemplate,rT as registerExtension,rW as version};
|
|
41
|
+
`);class r$ extends HTMLElement{_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){r(this),this._radioGroup instanceof em||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=i("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);let rW="1.16.2";export{tm as ActiveQualityDisplay,r_ as AdClickThroughButton,rm as AdCountdown,rc as AdDisplay,rE as AdSkipButton,rt as AirPlayButton,d as Attribute,O as Button,t5 as CastButton,t4 as ChromecastButton,t9 as ChromecastDisplay,eR as CloseMenuButton,tN as ColorStops,n as ControlBar,rF as DefaultUI,es as DurationDisplay,t1 as ErrorDisplay,rw as ExtensionSlot,tO as FullscreenButton,rn as GestureReceiver,to as LanguageMenu,tl as LanguageMenuButton,q as LinkButton,rd as LiveButton,ri as LoadingIndicator,eO as MediaTrackRadioButton,eE as Menu,eS as MenuButton,eA as MenuGroup,K as MuteButton,G as PlayButton,tg as PlaybackRateDisplay,ty as PlaybackRateMenu,tu as PlaybackRateMenuButton,td as PlaybackRateRadioGroup,tV as PreviewThumbnail,t$ as PreviewTimeDisplay,tf as QualityRadioButton,tw as QualityRadioGroup,ep as RadioButton,em as RadioGroup,tq as Range,W as SeekButton,tC as SettingsMenu,tP as SettingsMenuButton,u as SlotContainer,U as StateReceiverMixin,rY as THEOliveDefaultUI,eQ as TextTrackOffRadioButton,eB as TextTrackRadioButton,e8 as TextTrackStyleDisplay,tr as TextTrackStyleMenu,e6 as TextTrackStyleRadioGroup,tT as TextTrackStyleResetButton,ei as TimeDisplay,tj as TimeRange,eY as TrackRadioGroup,rD as UIContainer,tX as VolumeRange,M as buttonTemplate,N as linkButtonTemplate,ex as menuGroupTemplate,ef as menuTemplate,tD as rangeTemplate,rT as registerExtension,rW as version};
|
|
42
42
|
//# sourceMappingURL=THEOplayerUI.mjs.map
|