@mux/mux-player 1.4.0 → 1.5.0
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/dist/index.cjs.js +865 -832
- package/dist/index.mjs +806 -773
- package/dist/mux-player.js +920 -887
- package/dist/mux-player.mjs +920 -887
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/html.d.ts +11 -17
- package/dist/types/index.d.ts +3 -2
- package/dist/types/template.d.ts +2 -1
- package/dist/types-ts3.4/html.d.ts +11 -17
- package/dist/types-ts3.4/index.d.ts +3 -1
- package/dist/types-ts3.4/template.d.ts +2 -1
- package/package.json +5 -6
- package/dist/types/media-theme-mux/icons.d.ts +0 -17
- package/dist/types/media-theme-mux/media-theme-mux.d.ts +0 -39
- package/dist/types-ts3.4/media-theme-mux/icons.d.ts +0 -17
- package/dist/types-ts3.4/media-theme-mux/media-theme-mux.d.ts +0 -39
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var co=Object.create;var Dt=Object.defineProperty;var mo=Object.getOwnPropertyDescriptor;var ho=Object.getOwnPropertyNames;var po=Object.getPrototypeOf,bo=Object.prototype.hasOwnProperty;var Eo=(i,e)=>{for(var t in e)Dt(i,t,{get:e[t],enumerable:!0})},tr=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ho(e))!bo.call(i,r)&&r!==t&&Dt(i,r,{get:()=>e[r],enumerable:!(a=mo(e,r))||a.enumerable});return i};var fo=(i,e,t)=>(t=i!=null?co(po(i)):{},tr(e||!i||!i.__esModule?Dt(t,"default",{value:i,enumerable:!0}):t,i)),vo=i=>tr(Dt({},"__esModule",{value:!0}),i);var Di=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var v=(i,e,t)=>(Di(i,e,"read from private field"),t?t.call(i):e.get(i)),I=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},V=(i,e,t,a)=>(Di(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var S=(i,e,t)=>(Di(i,e,"access private method"),t);var Tl={};Eo(Tl,{MediaError:()=>g.MediaError,default:()=>yl,getVideoAttribute:()=>ge});module.exports=vo(Tl);var Pe=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Pe{}globalThis.DocumentFragment=i}var Je=class extends Pe{},xi=class extends Pe{},go={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(Je)}},et,Ri=class{constructor(e,t={}){I(this,et,void 0);V(this,et,t==null?void 0:t.detail)}get detail(){return v(this,et)}initCustomEvent(){}};et=new WeakMap;function Ao(i,e){return new Je}var ir={document:{createElement:Ao},DocumentFragment,customElements:go,CustomEvent:Ri,EventTarget:Pe,HTMLElement:Je,HTMLVideoElement:xi},ar=typeof window=="undefined"||typeof globalThis.customElements=="undefined",D=ar?ir:globalThis,H=ar?ir.document:globalThis.document;var p={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_CAPTIONS_REQUEST:"mediashowcaptionsrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_CAPTIONS_REQUEST:"mediadisablecaptionsrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},tt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaairplayunavailablechange",MEDIA_PIP_UNAVAILABLE:"mediapipunavailablechange",MEDIA_PAUSED:"mediapausedchange",MEDIA_HAS_PLAYED:"mediahasplayedchange",MEDIA_MUTED:"mediamutedchange",MEDIA_VOLUME_LEVEL:"mediavolumelevelchange",MEDIA_VOLUME:"mediavolumechange",MEDIA_VOLUME_UNAVAILABLE:"mediavolumeunavailablechange",MEDIA_IS_PIP:"mediaispipchange",MEDIA_IS_CASTING:"mediaiscastingchange",MEDIA_CAPTIONS_LIST:"mediacaptionslistchange",MEDIA_SUBTITLES_LIST:"mediasubtitleslistchange",MEDIA_CAPTIONS_SHOWING:"mediacaptionsshowingchange",MEDIA_SUBTITLES_SHOWING:"mediasubtitlesshowingchange",MEDIA_IS_FULLSCREEN:"mediaisfullscreenchange",MEDIA_PLAYBACK_RATE:"mediaplaybackratechange",MEDIA_CURRENT_TIME:"mediacurrenttimechange",MEDIA_DURATION:"mediadurationchange",MEDIA_SEEKABLE:"mediaseekablechange",MEDIA_PREVIEW_IMAGE:"mediapreviewimagechange",MEDIA_PREVIEW_COORDS:"mediapreviewcoordschange",MEDIA_LOADING:"medialoadingchange",USER_INACTIVE:"userinactivechange"},A={MEDIA_CHROME_ATTRIBUTES:"media-chrome-attributes",MEDIA_CONTROLLER:"media-controller"},o={MEDIA_AIRPLAY_UNAVAILABLE:"media-airplay-unavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"media-fullscreen-unavailable",MEDIA_PIP_UNAVAILABLE:"media-pip-unavailable",MEDIA_CAST_UNAVAILABLE:"media-cast-unavailable",MEDIA_PAUSED:"media-paused",MEDIA_HAS_PLAYED:"media-has-played",MEDIA_MUTED:"media-muted",MEDIA_VOLUME_LEVEL:"media-volume-level",MEDIA_VOLUME:"media-volume",MEDIA_VOLUME_UNAVAILABLE:"media-volume-unavailable",MEDIA_IS_PIP:"media-is-pip",MEDIA_IS_CASTING:"media-is-casting",MEDIA_CAPTIONS_LIST:"media-captions-list",MEDIA_SUBTITLES_LIST:"media-subtitles-list",MEDIA_CAPTIONS_SHOWING:"media-captions-showing",MEDIA_SUBTITLES_SHOWING:"media-subtitles-showing",MEDIA_IS_FULLSCREEN:"media-is-fullscreen",MEDIA_PLAYBACK_RATE:"media-playback-rate",MEDIA_CURRENT_TIME:"media-current-time",MEDIA_DURATION:"media-duration",MEDIA_SEEKABLE:"media-seekable",MEDIA_PREVIEW_TIME:"media-preview-time",MEDIA_PREVIEW_IMAGE:"media-preview-image",MEDIA_PREVIEW_COORDS:"media-preview-coords",MEDIA_LOADING:"media-loading",MEDIA_BUFFERED:"media-buffered",MEDIA_STREAM_TYPE:"media-stream-type"},kl=Object.entries(tt).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"user-inactive"}),rr=Object.entries(o).reduce((i,[e,t])=>{let a=tt[e];return a&&(i[t]=a),i},{"user-inactive":"userinactivechange"}),Ue={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},_e={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Pi={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},q={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},xt={LIVE:"live",ON_DEMAND:"on-demand"};var B={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},C={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`},yo={...B,...C};function Rt(i,e=!1){return i.split("_").map(function(t,a){return(a||e?t[0].toUpperCase():t[0].toLowerCase())+t.slice(1).toLowerCase()}).join("")}function Ui(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function nr(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function or(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var sr=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],To=(i,e)=>{let t=i===1?sr[e].singular:sr[e].plural;return`${i} ${t}`},ye=i=>{if(!nr(i))return"";let e=Math.abs(i),t=e!==i,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((l,c)=>l&&To(l,c)).filter(l=>l).join(", ")}${t?" remaining":""}`};function j(i,e){let t=!1;i<0&&(t=!0,i=0-i),i=i<0?0:i;let a=Math.floor(i%60),r=Math.floor(i/60%60),n=Math.floor(i/3600),s=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="-"),n=n>0||l>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var Pt=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},lr={HTMLElement:class extends Pt{},DocumentFragment:class extends Pt{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){}},Mo={createElement:function(){return new lr.HTMLElement}},dr=typeof window=="undefined"||typeof window.customElements=="undefined",u=dr?lr:window,d=dr?Mo:window.document;function h(i,e){u.customElements.get(i)||(u.customElements.define(i,e),u[e.name]=e)}var ko=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Te=(i,e,t)=>(ko(i,e,"read from private field"),t?t.call(i):e.get(i)),Oi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ut,Oe,Ni,ur=d.createElement("template");ur.innerHTML=`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: inline-flex;
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
min-width: 100%;
|
|
51
51
|
}
|
|
52
52
|
</style>
|
|
53
|
-
`;var
|
|
53
|
+
`;var Ot=class extends u.HTMLElement{constructor(e={}){super(),Oi(this,Ut,n=>{this.handleClick(n)}),Oi(this,Oe,n=>{let{key:s}=n;if(!this.keysUsed.includes(s)){this.removeEventListener("keyup",Te(this,Oe));return}this.handleClick(n)}),Oi(this,Ni,n=>{let{metaKey:s,altKey:l,key:c}=n;if(s||l||!this.keysUsed.includes(c)){this.removeEventListener("keyup",Te(this,Oe));return}this.addEventListener("keyup",Te(this,Oe),{once:!0})});let t=this.attachShadow({mode:"open"}),a=ur.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=d.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",Te(this,Ut)),this.addEventListener("keydown",Te(this,Ni)),this.setAttribute("tabindex","0")}disable(){this.removeEventListener("click",Te(this,Ut)),this.removeEventListener("keyup",Te(this,Oe)),this.removeAttribute("tabindex")}attributeChangedCallback(e,t,a){var r,n;if(e===A.MEDIA_CONTROLLER){if(t){let s=d.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=d.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}else e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;this.disable();let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}get keysUsed(){return["Enter"," "]}handleClick(e){}};Ut=new WeakMap;Oe=new WeakMap;Ni=new WeakMap;h("media-chrome-button",Ot);var x=Ot;var So=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
54
54
|
<path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
|
|
55
55
|
</svg>
|
|
56
|
-
`,
|
|
57
|
-
<slot name="airplay">${
|
|
58
|
-
`;var
|
|
56
|
+
`,cr=d.createElement("template");cr.innerHTML=`
|
|
57
|
+
<slot name="airplay">${So}</slot>
|
|
58
|
+
`;var Bi=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:cr,...e})}connectedCallback(){this.setAttribute("aria-label",C.AIRPLAY()),super.connectedCallback()}handleClick(){let e=new u.CustomEvent(p.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};h("media-airplay-button",Bi);var Lo='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>',Co='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>',hr=d.createElement("template");hr.innerHTML=`
|
|
59
59
|
<style>
|
|
60
60
|
:host([${o.MEDIA_IS_CASTING}]) slot:not([name=exit]) > *,
|
|
61
61
|
:host([${o.MEDIA_IS_CASTING}]) ::slotted(:not([slot=exit])) {
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
}
|
|
70
70
|
</style>
|
|
71
71
|
|
|
72
|
-
<slot name="enter">${
|
|
73
|
-
<slot name="exit">${
|
|
74
|
-
`;var
|
|
72
|
+
<slot name="enter">${Lo}</slot>
|
|
73
|
+
<slot name="exit">${Co}</slot>
|
|
74
|
+
`;var mr=i=>{let t=i.getAttribute(o.MEDIA_IS_CASTING)!=null?C.EXIT_CAST():C.ENTER_CAST();i.setAttribute("aria-label",t)},$i=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:hr,...e})}connectedCallback(){mr(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_CASTING&&mr(this),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_IS_CASTING)!=null?p.MEDIA_EXIT_CAST_REQUEST:p.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new u.CustomEvent(e,{composed:!0,bubbles:!0}))}};h("media-cast-button",$i);var Nt=(i,e,t=".value")=>{let a=i.querySelector(t);!a||(a.textContent=e)},wo=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},Bt=(i,e)=>wo(i,e)[0],it=(i,e)=>!i||!e?!1:i.contains(e)?!0:it(i,e.getRootNode().host),at=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||at(i.getRootNode().host,e)};function ae(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{}}}}var br=d.createElement("template");br.innerHTML=`
|
|
75
75
|
<style>
|
|
76
76
|
:host {
|
|
77
77
|
display: inline-block;
|
|
78
78
|
box-sizing: border-box;
|
|
79
79
|
}
|
|
80
80
|
</style>
|
|
81
|
-
`;var
|
|
81
|
+
`;var Vi=class extends u.HTMLElement{static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}constructor(e={}){super();let t=this.attachShadow({mode:"open"}),a=br.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=d.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}attributeChangedCallback(e,t,a){var r,n;if(e===A.MEDIA_CONTROLLER){if(t){let s=d.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=d.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}}connectedCallback(){var e;this.setAttribute("tabindex",-1),this.setAttribute("aria-hidden",!0);let t=pr(this);this.getAttribute(A.MEDIA_CONTROLLER)&&((e=t==null?void 0:t.associateElement)==null||e.call(t,this)),t==null||t.addEventListener("pointerdown",this),t==null||t.addEventListener("click",this)}disconnectedCallback(){var e;let t=pr(this);this.getAttribute(A.MEDIA_CONTROLLER)&&((e=t==null?void 0:t.unassociateElement)==null||e.call(t,this)),t==null||t.removeEventListener("pointerdown",this),t==null||t.removeEventListener("click",this)}handleEvent(e){var t;let a=(t=e.composedPath())==null?void 0:t[0];if(!!["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:n,clientY:s}=e,{left:l,top:c,width:m,height:E}=this.getBoundingClientRect(),f=n-l,w=s-c;if(f<0||w<0||f>m||w>E||m===0&&E===0)return;let{pointerType:T=this._pointerType}=e;if(this._pointerType=void 0,T===Pi.TOUCH){this.handleTap(e);return}else if(T===Pi.MOUSE){this.handleMouseClick(e);return}}}}handleTap(e){}handleMouseClick(e){let t=this.getAttribute(o.MEDIA_PAUSED)!=null?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new u.CustomEvent(t,{composed:!0,bubbles:!0}))}};function pr(i){let e=i.getAttribute(A.MEDIA_CONTROLLER);return e?d.getElementById(e):at(i,"media-controller")}h("media-gesture-receiver",Vi);var Er=d.createElement("template");Er.innerHTML=`
|
|
82
82
|
<style>
|
|
83
83
|
|
|
84
84
|
:host([media-is-fullscreen]) ::slotted([slot=media]) {
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
|
|
190
190
|
<slot part="bottom chrome"></slot>
|
|
191
191
|
</span>
|
|
192
|
-
`;var ss=Object.values(o),$t=class extends u.HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(vr.content.cloneNode(!0));let i=n=>{let s=this.media;for(let l of n)l.type==="childList"&&(l.removedNodes.forEach(c=>{if(c.slot=="media"&&l.target==this){let m=l.previousSibling&&l.previousSibling.previousElementSibling;if(!m||!s)this.mediaUnsetCallback(c);else{let f=m.slot!=="media";for(;(m=m.previousSibling)!==null;)m.slot=="media"&&(f=!1);f&&this.mediaUnsetCallback(c)}}}),s&&l.addedNodes.forEach(c=>{c==s&&this.handleMediaUpdated(s).then(m=>this.mediaSetCallback(m))}))};new MutationObserver(i).observe(this,{childList:!0,subtree:!0});let a=this.media,r=this.querySelector(":scope > slot[slot=media]");r&&r.addEventListener("slotchange",()=>{if(!r.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(a);return}this.media&&(a=this.media,this.handleMediaUpdated(this.media).then(s=>this.mediaSetCallback(s)))})}static get observedAttributes(){return["autohide","gestures-disabled"].concat(ss)}attributeChangedCallback(i,e,a){i.toLowerCase()=="autohide"&&(this.autohide=a)}get media(){let i=this.querySelector(":scope > [slot=media]");return(i==null?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i}mediaSetCallback(i){this._mediaClickPlayToggle=()=>{let e=i.paused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new u.CustomEvent(e,{composed:!0,bubbles:!0}))}}handleMediaUpdated(i){let e=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!i)return a(i);let r=i.nodeName.toLowerCase();return r.includes("-")?u.customElements.whenDefined(r).then(()=>e(i)):e(i)}mediaUnsetCallback(){}connectedCallback(){let e=this.getAttribute("audio")!=null?O.AUDIO_PLAYER():O.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",e),this.media&&this.handleMediaUpdated(this.media).then(s=>this.mediaSetCallback(s)),this.setAttribute("user-inactive","user-inactive");let a=()=>{if(this.autohide<0)return;this.setAttribute("user-inactive","user-inactive");let s=new u.CustomEvent(rt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(s)},r=()=>{this.removeAttribute("user-inactive");let s=new u.CustomEvent(rt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(s)},n=()=>{r(),u.clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=u.setTimeout(()=>{a()},this.autohide*1e3))};this.addEventListener("keyup",()=>{n()}),this.addEventListener("pointerup",s=>{s.pointerType==="touch"?[this,this.media].includes(s.target)&&!this.hasAttribute("user-inactive")?a():n():s.composedPath().some(l=>{var c;return["media-play-button","media-fullscreen-button"].includes((c=l==null?void 0:l.nodeName)==null?void 0:c.toLowerCase())})&&n()}),this.addEventListener("pointermove",s=>{s.pointerType==="mouse"&&s.target!==this&&(r(),u.clearTimeout(this._inactiveTimeout),[this,this.media].includes(s.target)&&n())}),this.addEventListener("mouseleave",()=>{a()}),this.addEventListener("keyup",()=>{this.setAttribute("media-keyboard-control","")}),this.addEventListener("mouseup",()=>{this.removeAttribute("media-keyboard-control")})}set autohide(i){i=Number(i),this._autohide=isNaN(i)?0:i}get autohide(){return this._autohide===void 0?2:this._autohide}};p("media-container-temp",$t);var Ar=$t;var _r=(t,i,e)=>{if(!i.has(t))throw TypeError("Cannot "+e)},R=(t,i,e)=>(_r(t,i,"read from private field"),e?e.call(t):i.get(t)),Pi=(t,i,e)=>{if(i.has(t))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(t):i.set(t,e)},Ui=(t,i,e,a)=>(_r(t,i,"write to private field"),a?a.call(t,e):i.set(t,e),e),Ve,He,F,Bt=class{constructor(i,e){Pi(this,Ve,void 0),Pi(this,He,void 0),Pi(this,F,[]),Ui(this,Ve,i),Ui(this,He,e)}[Symbol.iterator](){return R(this,F).values()}get length(){return R(this,F).length}get value(){var i;return(i=R(this,F).join(" "))!=null?i:""}set value(i){var e;i!==this.value&&(Ui(this,F,[]),this.add(...(e=i==null?void 0:i.split(" "))!=null?e:[]))}toString(){return this.value}item(i){return R(this,F)[i]}values(){return R(this,F).values()}keys(){return R(this,F).keys()}forEach(i){R(this,F).forEach(i)}add(...i){var e,a;i.forEach(r=>{this.contains(r)||R(this,F).push(r)}),!(this.value===""&&!((e=R(this,Ve))!=null&&e.hasAttribute(`${R(this,He)}`)))&&((a=R(this,Ve))==null||a.setAttribute(`${R(this,He)}`,`${this.value}`))}remove(...i){var e;i.forEach(a=>{R(this,F).splice(R(this,F).indexOf(a),1)}),(e=R(this,Ve))==null||e.setAttribute(`${R(this,He)}`,`${this.value}`)}contains(i){return R(this,F).includes(i)}toggle(i,e){return typeof e!="undefined"?e?(this.add(i),!0):(this.remove(i),!1):this.contains(i)?(this.remove(i),!1):(this.add(i),!0)}replace(i,e){this.remove(i),this.add(e)}};Ve=new WeakMap;He=new WeakMap;F=new WeakMap;var x={enter:"requestFullscreen",exit:"exitFullscreen",event:"fullscreenchange",element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};d.fullscreenElement===void 0&&(x.enter="webkitRequestFullScreen",x.exit=d.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",x.event="webkitfullscreenchange",x.element="webkitFullscreenElement",x.error="webkitfullscreenerror",x.enabled="webkitFullscreenEnabled");function Vt(t,i=!1){return t.split("_").map(function(e,a){return(a||i?e[0].toUpperCase():e[0].toLowerCase())+e.slice(1).toLowerCase()}).join("")}var Oi=(t="")=>t.split(/\s+/),yr=(t="")=>{let[i,e]=t.split(":"),a=e?decodeURIComponent(e):void 0;return{language:i,label:a}},ls=(t="",i={})=>Oi(t).map(e=>{let a=yr(e);return{...i,...a}}),ds=t=>Array.isArray(t)?t.map(i=>typeof i=="string"?yr(i):i):typeof t=="string"?ls(t):[t],cs=({label:t,language:i}={})=>t?`${i}:${encodeURIComponent(t)}`:i,q=(t=[])=>Array.prototype.map.call(t,cs).join(" "),us=(t,i)=>e=>e[t]===i,Tr=t=>{let i=Object.entries(t).map(([e,a])=>us(e,a));return e=>i.every(a=>a(e))},st=(t,i=[],e=[])=>{let a=ds(e).map(Tr),r=n=>a.some(s=>s(n));Array.from(i).filter(r).forEach(n=>{n.mode=t})},We=(t,i=()=>!0)=>{if(!(t!=null&&t.textTracks))return[];let e=typeof i=="function"?i:Tr(i);return Array.from(t.textTracks).filter(e)},Ni=t=>{let i=!!t.getAttribute(o.MEDIA_CAPTIONS_SHOWING),e=!t.hasAttribute("no-subtitles-fallback")&&!!t.getAttribute(o.MEDIA_SUBTITLES_SHOWING);return i||e},Ht=t=>{var i,e,a,r;if(Ni(t)){let s=t.getAttribute(o.MEDIA_CAPTIONS_SHOWING);if(s){let c=new window.CustomEvent(h.MEDIA_DISABLE_CAPTIONS_REQUEST,{composed:!0,bubbles:!0,detail:s});t.dispatchEvent(c)}let l=t.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(l&&!t.hasAttribute("no-subtitles-fallback")){let c=new window.CustomEvent(h.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:l});t.dispatchEvent(c)}}else{let[s]=(e=Oi((i=t.getAttribute(o.MEDIA_CAPTIONS_LIST))!=null?i:""))!=null?e:[];if(s){let l=new window.CustomEvent(h.MEDIA_SHOW_CAPTIONS_REQUEST,{composed:!0,bubbles:!0,detail:s});t.dispatchEvent(l)}else if(t.hasAttribute("no-subtitles-fallback"))console.error("Attempting to enable closed captions but none are available! Please verify your media content if this is unexpected.");else{let[l]=(r=Oi((a=t.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?a:""))!=null?r:[];if(l){let c=new window.CustomEvent(h.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:l});t.dispatchEvent(c)}}}};var Sr=(t,i,e)=>{if(!i.has(t))throw TypeError("Cannot "+e)},Fe=(t,i,e)=>(Sr(t,i,"read from private field"),e?e.call(t):i.get(t)),$i=(t,i,e)=>{if(i.has(t))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(t):i.set(t,e)},Ke=(t,i,e)=>(Sr(t,i,"access private method"),e),Ee,Ye,ut,Ft,Vi,Lr=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],ms=10,Ir=0,Yt=class extends Ar{constructor(){super(),$i(this,Ye),$i(this,Ft),$i(this,Ee,new Bt(this,"hotkeys")),_s||(this._airplayUnavailable=Q.UNSUPPORTED),kr||(this._fullscreenUnavailable=Q.UNAVAILABLE),ys||(this._castUnavailable=Q.UNSUPPORTED),vs||(this._pipUnavailable=Q.UNSUPPORTED),ct!==void 0?ct||(this._volumeUnavailable=Q.UNSUPPORTED):As.then(()=>{ct||(this._volumeUnavailable=Q.UNSUPPORTED,this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,this._volumeUnavailable))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associatedElements=[],this.associateElement(this);let i={MEDIA_PLAY_REQUEST:()=>this.media.play(),MEDIA_PAUSE_REQUEST:()=>this.media.pause(),MEDIA_MUTE_REQUEST:()=>this.media.muted=!0,MEDIA_UNMUTE_REQUEST:()=>{let e=this.media;e.muted=!1,e.volume===0&&(e.volume=.25)},MEDIA_VOLUME_REQUEST:e=>{let a=this.media,r=e.detail;a.volume=r,r>0&&a.muted&&(a.muted=!1);try{u.localStorage.setItem("media-chrome-pref-volume",r.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:()=>{if(!kr){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}let e=this.media;d.pictureInPictureElement&&d.exitPictureInPicture(),super[x.enter]?super[x.enter]():e.webkitEnterFullscreen?e.webkitEnterFullscreen():e.requestFullscreen?e.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{d[x.exit]()},MEDIA_ENTER_PIP_REQUEST:()=>{let e=this.media;if(!d.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!e.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}d[x.element]&&d[x.exit]();let a=r=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};e.requestPictureInPicture().catch(r=>{if(r.code===11)if(e.readyState===0&&e.preload==="none"){let n=function(){e.removeEventListener("loadedmetadata",s),e.preload="none"},s=function(){e.requestPictureInPicture().catch(a),n()};e.addEventListener("loadedmetadata",s),e.preload="metadata",setTimeout(()=>{e.readyState===0&&a(),n()},1e3)}else throw r;else throw r})},MEDIA_EXIT_PIP_REQUEST:()=>{d.pictureInPictureElement&&d.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:()=>{var e;let a=this.media;!((e=globalThis.CastableVideoElement)!=null&&e.castEnabled)||(d[x.element]&&d[x.exit](),a.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var e;(e=globalThis.CastableVideoElement)!=null&&e.castElement&&globalThis.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:e=>{let a=this.media,r=e.detail;(a.readyState>0||a.readyState===void 0)&&(a.currentTime=r)},MEDIA_PLAYBACK_RATE_REQUEST:e=>{this.media.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:e=>{var a;let r=this.media;if(!r)return;let n=e.detail;n===null&&this.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),this.propagateMediaState(o.MEDIA_PREVIEW_TIME,n);let[s]=We(r,{kind:$e.METADATA,label:"thumbnails"});if(!(s&&s.cues))return;if(n===null){this.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),this.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let l=Array.prototype.find.call(s.cues,_=>_.startTime>=n);if(!l)return;let c=/'^(?:[a-z]+:)?\/\//i.test(l.text)||(a=r.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,m=new URL(l.text,c),f=new URLSearchParams(m.hash).get("#xywh");this.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,m.href),this.propagateMediaState(o.MEDIA_PREVIEW_COORDS,f.split(",").join(" "))},MEDIA_SHOW_CAPTIONS_REQUEST:e=>{let a=Kt(this),{detail:r=[]}=e;st(Me.SHOWING,a,r)},MEDIA_DISABLE_CAPTIONS_REQUEST:e=>{let a=Kt(this),{detail:r=[]}=e;st(Me.DISABLED,a,r)},MEDIA_SHOW_SUBTITLES_REQUEST:e=>{let a=dt(this),{detail:r=[]}=e;st(Me.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:e=>{let a=dt(this),{detail:r=[]}=e;st(Me.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:()=>{let{media:e}=this;if(!!e){if(!(e.webkitShowPlaybackTargetPicker&&u.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}e.webkitShowPlaybackTargetPicker()}}};if(Object.keys(i).forEach(e=>{let a=`_handle${Vt(e,!0)}`;this[a]=r=>{if(r.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}i[e](r,this.media)},this.addEventListener(h[e],this[a])}),this._mediaStatePropagators={"play,pause,emptied":()=>{this.propagateMediaState(o.MEDIA_PAUSED,Cr(this))},"playing,emptied":()=>{var e;this.propagateMediaState(o.MEDIA_HAS_PLAYED,!((e=this.media)!=null&&e.paused))},volumechange:()=>{this.propagateMediaState(o.MEDIA_MUTED,wr(this)),this.propagateMediaState(o.MEDIA_VOLUME,xr(this)),this.propagateMediaState(o.MEDIA_VOLUME_LEVEL,Dr(this))},[x.event]:e=>{let r=!!d[x.element]&&(e==null?void 0:e.target),n=nt(this,r);this.propagateMediaState(o.MEDIA_IS_FULLSCREEN,n)},"enterpictureinpicture,leavepictureinpicture":e=>{var a;let r;if(e)r=e.type=="enterpictureinpicture";else{let n=(a=this.getRootNode().pictureInPictureElement)!=null?a:d.pictureInPictureElement;r=this.media&&nt(this.media,n)}this.propagateMediaState(o.MEDIA_IS_PIP,r)},"entercast,leavecast,castchange":e=>{var a;let r=(a=globalThis.CastableVideoElement)==null?void 0:a.castElement,n=this.media&&nt(this.media,r);(e==null?void 0:e.type)==="castchange"&&(e==null?void 0:e.detail)==="CONNECTING"&&(n="connecting"),this.propagateMediaState(o.MEDIA_IS_CASTING,n)},"timeupdate,loadedmetadata":()=>{this.propagateMediaState(o.MEDIA_CURRENT_TIME,Rr(this))},"durationchange,loadedmetadata,emptied":()=>{this.propagateMediaState(o.MEDIA_DURATION,Pr(this))},"loadedmetadata,emptied,progress":()=>{var e;this.propagateMediaState(o.MEDIA_SEEKABLE,(e=Ur(this))==null?void 0:e.join(":"))},"progress,emptied":()=>{var e;this.propagateMediaState(o.MEDIA_BUFFERED,Is((e=this.media)==null?void 0:e.buffered))},"ratechange,loadstart":()=>{this.propagateMediaState(o.MEDIA_PLAYBACK_RATE,Or(this))},"waiting,playing,emptied":()=>{var e;let a=((e=this.media)==null?void 0:e.readyState)<3;this.propagateMediaState(o.MEDIA_LOADING,a)}},this._airplayUnavailable!==Q.UNSUPPORTED){let e=a=>{(a==null?void 0:a.availability)==="available"?this._airplayUnavailable=void 0:(a==null?void 0:a.availability)==="not-available"&&(this._airplayUnavailable=Q.UNAVAILABLE),this.propagateMediaState(o.MEDIA_AIRPLAY_UNAVAILABLE,this._airplayUnavailable)};this._mediaStatePropagators.webkitplaybacktargetavailabilitychanged=e}if(this._castUnavailable!==Q.UNSUPPORTED){let e=()=>{var a;let r=(a=globalThis.CastableVideoElement)==null?void 0:a.castState;r!=null&&r.includes("CONNECT")?this._castUnavailable=void 0:this._castUnavailable=Q.UNAVAILABLE,this.propagateMediaState(o.MEDIA_CAST_UNAVAILABLE,this._castUnavailable)};this._mediaStatePropagators.castchange=e}this._textTrackMediaStatePropagators={"addtrack,removetrack,loadstart":()=>{this.propagateMediaState(o.MEDIA_CAPTIONS_LIST,q(Kt(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_LIST,q(dt(this))||void 0),this.propagateMediaState(o.MEDIA_CAPTIONS_SHOWING,q(Hi(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_SHOWING,q(Mr(this))||void 0)},change:()=>{this.propagateMediaState(o.MEDIA_CAPTIONS_SHOWING,q(Hi(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_SHOWING,q(Mr(this))||void 0)}},this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat("nohotkeys","hotkeys")}attributeChangedCallback(i,e,a){i==="nohotkeys"?a!==e&&a===""?(this.hasAttribute("hotkeys")&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==e&&a===null&&this.enableHotkeys():i==="hotkeys"&&(Fe(this,Ee).value=a),super.attributeChangedCallback(i,e,a)}mediaSetCallback(i){super.mediaSetCallback(i),i.hasAttribute("tabindex")||i.setAttribute("tabindex",-1),Object.keys(this._mediaStatePropagators).forEach(e=>{let a=e.split(","),r=this._mediaStatePropagators[e];a.forEach(n=>{(n==x.event?this.getRootNode():i).addEventListener(n,r)}),r()}),Object.entries(this._textTrackMediaStatePropagators).forEach(([e,a])=>{e.split(",").forEach(n=>{i.textTracks&&i.textTracks.addEventListener(n,a)}),a()});try{let e=u.localStorage.getItem("media-chrome-pref-volume");e!==null&&(i.volume=e)}catch(e){console.debug("Error getting volume pref",e)}}mediaUnsetCallback(i){super.mediaUnsetCallback(i),Object.keys(this._mediaStatePropagators).forEach(e=>{let a=e.split(","),r=this._mediaStatePropagators[e];a.forEach(n=>{(n==x.event?this.getRootNode():i).removeEventListener(n,r)})}),Object.entries(this._textTrackMediaStatePropagators).forEach(([e,a])=>{e.split(",").forEach(n=>{i.textTracks&&i.textTracks.removeEventListener(n,a)}),a()}),this.propagateMediaState(o.MEDIA_PAUSED,!0)}propagateMediaState(i,e){Le(this.mediaStateReceivers,i,e);let a=new u.CustomEvent(dr[i],{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(a)}associateElement(i){if(!i)return;let{associatedElementSubscriptions:e}=this;if(e.has(i))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=Es(i,a,r);Object.keys(h).forEach(s=>{i.addEventListener(h[s],this[`_handle${Vt(s,!0)}`])}),e.set(i,n)}unassociateElement(i){if(!i)return;let{associatedElementSubscriptions:e}=this;if(!e.has(i))return;e.get(i)(),e.delete(i),Object.keys(h).forEach(r=>{i.removeEventListener(h[r],this[`_handle${Vt(r,!0)}`])})}registerMediaStateReceiver(i){if(!i)return;let e=this.mediaStateReceivers;e.indexOf(i)>-1||(e.push(i),Le([i],o.MEDIA_VOLUME_UNAVAILABLE,this._volumeUnavailable),Le([i],o.MEDIA_AIRPLAY_UNAVAILABLE,this._airplayUnavailable),Le([i],o.MEDIA_FULLSCREEN_UNAVAILABLE,this._fullscreenUnavailable),Le([i],o.MEDIA_CAST_UNAVAILABLE,this._castUnavailable),Le([i],o.MEDIA_PIP_UNAVAILABLE,this._pipUnavailable),this.media&&Object.keys(o).forEach(r=>{r.includes("UNAVAILABLE")||Le([i],o[r],Bi[o[r]]?Bi[o[r]](this):Bi.default(this,o[r]))}))}unregisterMediaStateReceiver(i){let e=this.mediaStateReceivers,a=e.indexOf(i);a<0||e.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Ke(this,Ft,Vi))}disableHotkeys(){this.removeEventListener("keydown",Ke(this,Ft,Vi)),this.removeEventListener("keyup",Ke(this,Ye,ut))}get hotkeys(){return Fe(this,Ee)}keyboardShortcutHandler(i){var e,a,r,n;if(((n=(r=(e=i.target.getAttribute("keysused"))==null?void 0:e.split(" "))!=null?r:(a=i.target)==null?void 0:a.keysUsed)!=null?n:[]).map(y=>y==="Space"?" ":y).filter(Boolean).includes(i.key))return;let l,c,m,f,_,S=ms;if(!Fe(this,Ee).contains(`no${i.key.toLowerCase()}`)&&!(i.key===" "&&Fe(this,Ee).contains("nospace")))switch(i.key){case" ":case"k":l=this.getAttribute(o.MEDIA_PAUSED)!=null?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new u.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"m":l=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?h.MEDIA_UNMUTE_REQUEST:h.MEDIA_MUTE_REQUEST,this.dispatchEvent(new u.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"f":l=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?h.MEDIA_EXIT_FULLSCREEN_REQUEST:h.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new u.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"c":Ht(this);break;case"ArrowLeft":c=this.getAttribute(o.MEDIA_CURRENT_TIME),m=c&&!Number.isNaN(+c)?+c:Ir,f=Math.max(m-S,0),_=new u.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:f}),this.dispatchEvent(_);break;case"ArrowRight":c=this.getAttribute(o.MEDIA_CURRENT_TIME),m=c&&!Number.isNaN(+c)?+c:Ir,f=Math.max(m+S,0),_=new u.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:f}),this.dispatchEvent(_);break;default:break}}};Ee=new WeakMap;Ye=new WeakSet;ut=function(t){let{key:i}=t;if(!Lr.includes(i)){this.removeEventListener("keyup",Ke(this,Ye,ut));return}this.keyboardShortcutHandler(t)};Ft=new WeakSet;Vi=function(t){let{metaKey:i,altKey:e,key:a}=t;if(i||e||!Lr.includes(a)){this.removeEventListener("keyup",Ke(this,Ye,ut));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(Fe(this,Ee).contains(`no${a.toLowerCase()}`)||a===" "&&Fe(this,Ee).contains("nospace"))&&t.preventDefault(),this.addEventListener("keyup",Ke(this,Ye,ut),{once:!0})};var Bi={default(t,i){return t.getAttribute(i)},[o.MEDIA_CAPTIONS_LIST](t){return q(Kt(t))||void 0},[o.MEDIA_SUBTITLES_LIST](t){return q(dt(t))||void 0},[o.MEDIA_SUBTITLES_LIST](t){return q(dt(t))||void 0},[o.MEDIA_CAPTIONS_SHOWING](t){return q(Hi(t))||void 0},[o.MEDIA_PAUSED](t){return Cr(t)},[o.MEDIA_MUTED](t){return wr(t)},[o.MEDIA_VOLUME](t){return xr(t)},[o.MEDIA_VOLUME_LEVEL](t){return Dr(t)},[o.MEDIA_CURRENT_TIME](t){return Rr(t)},[o.MEDIA_DURATION](t){return Pr(t)},[o.MEDIA_SEEKABLE](t){var i;return(i=Ur(t))==null?void 0:i.join(":")},[o.MEDIA_PLAYBACK_RATE](t){return Or(t)}},Cr=t=>t.media?t.media.paused:!0,wr=t=>!!(t.media&&t.media.muted),xr=t=>{let i=t.media;return i?i.volume:1},Dr=t=>{let i="high";if(!t.media)return i;let{muted:e,volume:a}=t.media;return a===0||e?i="off":a<.5?i="low":a<.75&&(i="medium"),i},Rr=t=>{let i=t.media;return i?i.currentTime:0},Pr=t=>{let i=t==null?void 0:t.media;return Number.isFinite(i==null?void 0:i.duration)?i.duration:NaN},Ur=t=>{var i;let e=t==null?void 0:t.media;if(!((i=e==null?void 0:e.seekable)!=null&&i.length))return;let a=e.seekable.start(0),r=e.seekable.end(e.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},Or=t=>{let i=t.media;return i?i.playbackRate:1},dt=t=>We(t.media,{kind:$e.SUBTITLES}),Kt=t=>We(t.media,{kind:$e.CAPTIONS}),Mr=t=>We(t.media,{kind:$e.SUBTITLES,mode:Me.SHOWING}),Hi=t=>We(t.media,{kind:$e.CAPTIONS,mode:Me.SHOWING}),hs=Object.values(o),Nr=t=>{var i,e,a,r;let{observedAttributes:n}=t.constructor;!n&&((i=t.nodeName)==null?void 0:i.includes("-"))&&(u.customElements.upgrade(t),{observedAttributes:n}=t.constructor);let s=(r=(a=(e=t==null?void 0:t.getAttribute)==null?void 0:e.call(t,o.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(l=>hs.includes(l)):[]},Wi=t=>!!Nr(t).length,ps=async(t,i,e)=>(t.isConnected||await $r(0),e==null?t.removeAttribute(i):typeof e=="boolean"?e?t.setAttribute(i,""):t.removeAttribute(i):Number.isNaN(e)?t.removeAttribute(i):t.setAttribute(i,e)),bs=t=>{var i;return!!((i=t.closest)!=null&&i.call(t,'*[slot="media"]'))},lt=(t,i)=>{if(bs(t))return;let e=(r,n)=>{var s,l;Wi(r)&&n(r);let{children:c=[]}=r!=null?r:{},m=(l=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?l:[];[...c,...m].forEach(_=>lt(_,n))},a=t==null?void 0:t.nodeName.toLowerCase();if(a.includes("-")&&!Wi(t)){u.customElements.whenDefined(a).then(()=>{e(t,i)});return}e(t,i)},Le=(t,i,e)=>{t.forEach(a=>{!Nr(a).includes(i)||ps(a,i,e)})},Es=(t,i,e)=>{lt(t,i);let a=c=>{var m;let f=(m=c==null?void 0:c.composedPath()[0])!=null?m:c.target;i(f)},r=c=>{var m;let f=(m=c==null?void 0:c.composedPath()[0])!=null?m:c.target;e(f)};t.addEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=c=>{c.forEach(m=>{let{addedNodes:f=[],removedNodes:_=[],type:S,target:y,attributeName:W}=m;S==="childList"?(Array.prototype.forEach.call(f,P=>lt(P,i)),Array.prototype.forEach.call(_,P=>lt(P,e))):S==="attributes"&&W===o.MEDIA_CHROME_ATTRIBUTES&&(Wi(y)?i(y):e(y))})},s=new MutationObserver(n);return s.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{lt(t,e),s.disconnect(),t.removeEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r)}},Wt,Fi=()=>{var t,i;return Wt||(Wt=(i=(t=d)==null?void 0:t.createElement)==null?void 0:i.call(t,"video"),Wt)},fs=async(t=Fi())=>{if(!t)return!1;let i=t.volume;return t.volume=i/2+.1,await $r(0),t.volume!==i},$r=t=>new Promise(i=>setTimeout(i,t)),gs=(t=Fi())=>typeof(t==null?void 0:t.requestPictureInPicture)=="function",vs=gs(),ct,As=fs().then(t=>(ct=t,ct)),_s=!!u.WebKitPlaybackTargetAvailabilityEvent,ys=!!u.chrome,Ts=(t=Fi())=>{let i=d[x.enabled];return!i&&t&&(i="webkitSupportsFullscreen"in t),i},kr=Ts();function Is(t=[]){return Array.from(t).map((i,e)=>[Number(t.start(e).toFixed(3)),Number(t.end(e).toFixed(3))].join(":")).join(" ")}p("media-controller",Yt);var mt=Yt;var Vr=d.createElement("template"),Br=`
|
|
192
|
+
`;var Do=Object.values(o),$t=class extends u.HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Er.content.cloneNode(!0));let e=n=>{let s=this.media;for(let l of n)l.type==="childList"&&(l.removedNodes.forEach(c=>{if(c.slot=="media"&&l.target==this){let m=l.previousSibling&&l.previousSibling.previousElementSibling;if(!m||!s)this.mediaUnsetCallback(c);else{let E=m.slot!=="media";for(;(m=m.previousSibling)!==null;)m.slot=="media"&&(E=!1);E&&this.mediaUnsetCallback(c)}}}),s&&l.addedNodes.forEach(c=>{c==s&&this.handleMediaUpdated(s).then(m=>this.mediaSetCallback(m))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=this.media,r=this.querySelector(":scope > slot[slot=media]");r&&r.addEventListener("slotchange",()=>{if(!r.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(a);return}this.media&&(a=this.media,this.handleMediaUpdated(this.media).then(s=>this.mediaSetCallback(s)))})}static get observedAttributes(){return["autohide","gestures-disabled"].concat(Do)}attributeChangedCallback(e,t,a){e.toLowerCase()=="autohide"&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}mediaSetCallback(e){this._mediaClickPlayToggle=()=>{let t=e.paused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new u.CustomEvent(t,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let t=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return a(e);let r=e.nodeName.toLowerCase();return r.includes("-")?u.customElements.whenDefined(r).then(()=>t(e)):t(e)}mediaUnsetCallback(e){}connectedCallback(){let t=this.getAttribute("audio")!=null?B.AUDIO_PLAYER():B.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.media&&this.handleMediaUpdated(this.media).then(s=>this.mediaSetCallback(s)),this.setAttribute("user-inactive","user-inactive");let a=()=>{if(this.autohide<0)return;this.setAttribute("user-inactive","user-inactive");let s=new u.CustomEvent(tt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(s)},r=()=>{this.removeAttribute("user-inactive");let s=new u.CustomEvent(tt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(s)},n=()=>{r(),u.clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=u.setTimeout(()=>{a()},this.autohide*1e3))};this.addEventListener("keyup",()=>{n()}),this.addEventListener("pointerup",s=>{s.pointerType==="touch"?[this,this.media].includes(s.target)&&!this.hasAttribute("user-inactive")?a():n():s.composedPath().some(l=>{var c;return["media-play-button","media-fullscreen-button"].includes((c=l==null?void 0:l.nodeName)==null?void 0:c.toLowerCase())})&&n()}),this.addEventListener("pointermove",s=>{s.pointerType==="mouse"&&s.target!==this&&(r(),u.clearTimeout(this._inactiveTimeout),[this,this.media].includes(s.target)&&n())}),this.addEventListener("mouseleave",()=>{a()}),this.addEventListener("keyup",()=>{this.setAttribute("media-keyboard-control","")}),this.addEventListener("mouseup",()=>{this.removeAttribute("media-keyboard-control")})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};h("media-container-temp",$t);var fr=$t;var vr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},N=(i,e,t)=>(vr(i,e,"read from private field"),t?t.call(i):e.get(i)),Hi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Wi=(i,e,t,a)=>(vr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ne,Be,F,Vt=class{constructor(e,t){Hi(this,Ne,void 0),Hi(this,Be,void 0),Hi(this,F,[]),Wi(this,Ne,e),Wi(this,Be,t)}[Symbol.iterator](){return N(this,F).values()}get length(){return N(this,F).length}get value(){var e;return(e=N(this,F).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(Wi(this,F,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return N(this,F)[e]}values(){return N(this,F).values()}keys(){return N(this,F).keys()}forEach(e){N(this,F).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||N(this,F).push(r)}),!(this.value===""&&!((t=N(this,Ne))!=null&&t.hasAttribute(`${N(this,Be)}`)))&&((a=N(this,Ne))==null||a.setAttribute(`${N(this,Be)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{N(this,F).splice(N(this,F).indexOf(a),1)}),(t=N(this,Ne))==null||t.setAttribute(`${N(this,Be)}`,`${this.value}`)}contains(e){return N(this,F).includes(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};Ne=new WeakMap;Be=new WeakMap;F=new WeakMap;var U={enter:"requestFullscreen",exit:"exitFullscreen",event:"fullscreenchange",element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};d.fullscreenElement===void 0&&(U.enter="webkitRequestFullScreen",U.exit=d.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",U.event="webkitfullscreenchange",U.element="webkitFullscreenElement",U.error="webkitfullscreenerror",U.enabled="webkitFullscreenEnabled");var Fi=(i="")=>i.split(/\s+/),gr=(i="")=>{let[e,t]=i.split(":"),a=t?decodeURIComponent(t):void 0;return{language:e,label:a}},xo=(i="",e={})=>Fi(i).map(t=>{let a=gr(t);return{...e,...a}}),Ro=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?gr(e):e):typeof i=="string"?xo(i):[i],Po=({label:i,language:e}={})=>i?`${e}:${encodeURIComponent(i)}`:e,Q=(i=[])=>Array.prototype.map.call(i,Po).join(" "),Uo=(i,e)=>t=>t[i]===e,Ar=i=>{let e=Object.entries(i).map(([t,a])=>Uo(t,a));return t=>e.every(a=>a(t))},rt=(i,e=[],t=[])=>{let a=Ro(t).map(Ar),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},$e=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Ar(e);return Array.from(i.textTracks).filter(t)},Ki=i=>{let e=!!i.getAttribute(o.MEDIA_CAPTIONS_SHOWING),t=!i.hasAttribute("no-subtitles-fallback")&&!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);return e||t},Ht=i=>{var e,t,a,r;if(Ki(i)){let s=i.getAttribute(o.MEDIA_CAPTIONS_SHOWING);if(s){let c=new window.CustomEvent(p.MEDIA_DISABLE_CAPTIONS_REQUEST,{composed:!0,bubbles:!0,detail:s});i.dispatchEvent(c)}let l=i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(l&&!i.hasAttribute("no-subtitles-fallback")){let c=new window.CustomEvent(p.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:l});i.dispatchEvent(c)}}else{let[s]=(t=Fi((e=i.getAttribute(o.MEDIA_CAPTIONS_LIST))!=null?e:""))!=null?t:[];if(s){let l=new window.CustomEvent(p.MEDIA_SHOW_CAPTIONS_REQUEST,{composed:!0,bubbles:!0,detail:s});i.dispatchEvent(l)}else if(i.hasAttribute("no-subtitles-fallback"))console.error("Attempting to enable closed captions but none are available! Please verify your media content if this is unexpected.");else{let[l]=(r=Fi((a=i.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?a:""))!=null?r:[];if(l){let c=new window.CustomEvent(p.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:l});i.dispatchEvent(c)}}}};var Ir=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ve=(i,e,t)=>(Ir(i,e,"read from private field"),t?t.call(i):e.get(i)),Yi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},He=(i,e,t)=>(Ir(i,e,"access private method"),t),ue,We,lt,Kt,Gi,Oo=Object.values(xt),Mr=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],No=10,_r=0,Gt=class extends fr{constructor(){super(),Yi(this,We),Yi(this,Kt),Yi(this,ue,new Vt(this,"hotkeys")),Go||(this._airplayUnavailable=q.UNSUPPORTED),Tr||(this._fullscreenUnavailable=q.UNAVAILABLE),Zo||(this._castUnavailable=q.UNSUPPORTED),Ko||(this._pipUnavailable=q.UNSUPPORTED),st!==void 0?st||(this._volumeUnavailable=q.UNSUPPORTED):Yo.then(()=>{st||(this._volumeUnavailable=q.UNSUPPORTED,this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,this._volumeUnavailable))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associatedElements=[],this.associateElement(this);let e={MEDIA_PLAY_REQUEST:()=>this.media.play(),MEDIA_PAUSE_REQUEST:()=>this.media.pause(),MEDIA_MUTE_REQUEST:()=>this.media.muted=!0,MEDIA_UNMUTE_REQUEST:()=>{let t=this.media;t.muted=!1,t.volume===0&&(t.volume=.25)},MEDIA_VOLUME_REQUEST:t=>{let a=this.media,r=t.detail;a.volume=r,r>0&&a.muted&&(a.muted=!1);try{u.localStorage.setItem("media-chrome-pref-volume",r.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:()=>{if(!Tr){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}let t=this.media;d.pictureInPictureElement&&d.exitPictureInPicture(),super[U.enter]?super[U.enter]():t.webkitEnterFullscreen?t.webkitEnterFullscreen():t.requestFullscreen?t.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{d[U.exit]()},MEDIA_ENTER_PIP_REQUEST:()=>{let t=this.media;if(!d.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!t.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}d[U.element]&&d[U.exit]();let a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};t.requestPictureInPicture().catch(r=>{if(r.code===11)if(t.readyState===0&&t.preload==="none"){let n=()=>{t.removeEventListener("loadedmetadata",s),t.preload="none"},s=()=>{t.requestPictureInPicture().catch(a),n()};t.addEventListener("loadedmetadata",s),t.preload="metadata",setTimeout(()=>{t.readyState===0&&a(),n()},1e3)}else throw r;else throw r})},MEDIA_EXIT_PIP_REQUEST:()=>{d.pictureInPictureElement&&d.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:()=>{var t;let a=this.media;!((t=globalThis.CastableVideoElement)!=null&&t.castEnabled)||(d[U.element]&&d[U.exit](),a.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var t;(t=globalThis.CastableVideoElement)!=null&&t.castElement&&globalThis.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:t=>{let a=this.media,r=t.detail;(a.readyState>0||a.readyState===void 0)&&(a.currentTime=r)},MEDIA_PLAYBACK_RATE_REQUEST:t=>{this.media.playbackRate=t.detail},MEDIA_PREVIEW_REQUEST:t=>{var a;let r=this.media;if(!r)return;let n=t.detail;n===null&&this.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),this.propagateMediaState(o.MEDIA_PREVIEW_TIME,n);let[s]=$e(r,{kind:Ue.METADATA,label:"thumbnails"});if(!(s&&s.cues))return;if(n===null){this.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),this.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let l=Array.prototype.find.call(s.cues,f=>f.startTime>=n);if(!l)return;let c=/'^(?:[a-z]+:)?\/\//i.test(l.text)||(a=r.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,m=new URL(l.text,c),E=new URLSearchParams(m.hash).get("#xywh");this.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,m.href),this.propagateMediaState(o.MEDIA_PREVIEW_COORDS,E.split(",").join(" "))},MEDIA_SHOW_CAPTIONS_REQUEST:t=>{let a=Yt(this),{detail:r=[]}=t;rt(_e.SHOWING,a,r)},MEDIA_DISABLE_CAPTIONS_REQUEST:t=>{let a=Yt(this),{detail:r=[]}=t;rt(_e.DISABLED,a,r)},MEDIA_SHOW_SUBTITLES_REQUEST:t=>{let a=ot(this),{detail:r=[]}=t;rt(_e.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:t=>{let a=ot(this),{detail:r=[]}=t;rt(_e.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:()=>{let{media:t}=this;if(!!t){if(!(t.webkitShowPlaybackTargetPicker&&u.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}t.webkitShowPlaybackTargetPicker()}}};if(Object.keys(e).forEach(t=>{let a=`_handle${Rt(t,!0)}`;this[a]=r=>{if(r.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}e[t](r,this.media)},this.addEventListener(p[t],this[a])}),this._mediaStatePropagators={"play,pause,emptied":()=>{this.propagateMediaState(o.MEDIA_PAUSED,kr(this))},"playing,emptied":()=>{var t;this.propagateMediaState(o.MEDIA_HAS_PLAYED,!((t=this.media)!=null&&t.paused))},volumechange:()=>{this.propagateMediaState(o.MEDIA_MUTED,Sr(this)),this.propagateMediaState(o.MEDIA_VOLUME,Lr(this)),this.propagateMediaState(o.MEDIA_VOLUME_LEVEL,Cr(this))},[U.event]:t=>{let r=!!d[U.element]&&(t==null?void 0:t.target),n=it(this,r);this.propagateMediaState(o.MEDIA_IS_FULLSCREEN,n)},"enterpictureinpicture,leavepictureinpicture":t=>{var a;let r;if(t)r=t.type=="enterpictureinpicture";else{let n=(a=this.getRootNode().pictureInPictureElement)!=null?a:d.pictureInPictureElement;r=this.media&&it(this.media,n)}this.propagateMediaState(o.MEDIA_IS_PIP,r)},"entercast,leavecast,castchange":t=>{var a;let r=(a=globalThis.CastableVideoElement)==null?void 0:a.castElement,n=this.media&&it(this.media,r);(t==null?void 0:t.type)==="castchange"&&(t==null?void 0:t.detail)==="CONNECTING"&&(n="connecting"),this.propagateMediaState(o.MEDIA_IS_CASTING,n)},"timeupdate,loadedmetadata":()=>{this.propagateMediaState(o.MEDIA_CURRENT_TIME,wr(this))},"durationchange,loadedmetadata,emptied":()=>{this.propagateMediaState(o.MEDIA_DURATION,Dr(this)),this.propagateMediaState(o.MEDIA_STREAM_TYPE)},"loadedmetadata,emptied,progress":()=>{var t;this.propagateMediaState(o.MEDIA_SEEKABLE,(t=xr(this))==null?void 0:t.join(":"))},"progress,emptied":()=>{var t;this.propagateMediaState(o.MEDIA_BUFFERED,zo((t=this.media)==null?void 0:t.buffered))},"ratechange,loadstart":()=>{this.propagateMediaState(o.MEDIA_PLAYBACK_RATE,Rr(this))},"waiting,playing,emptied":()=>{var t;let a=((t=this.media)==null?void 0:t.readyState)<3;this.propagateMediaState(o.MEDIA_LOADING,a)}},this._airplayUnavailable!==q.UNSUPPORTED){let t=a=>{(a==null?void 0:a.availability)==="available"?this._airplayUnavailable=void 0:(a==null?void 0:a.availability)==="not-available"&&(this._airplayUnavailable=q.UNAVAILABLE),this.propagateMediaState(o.MEDIA_AIRPLAY_UNAVAILABLE,this._airplayUnavailable)};this._mediaStatePropagators.webkitplaybacktargetavailabilitychanged=t}if(this._castUnavailable!==q.UNSUPPORTED){let t=()=>{var a;let r=(a=globalThis.CastableVideoElement)==null?void 0:a.castState;r!=null&&r.includes("CONNECT")?this._castUnavailable=void 0:this._castUnavailable=q.UNAVAILABLE,this.propagateMediaState(o.MEDIA_CAST_UNAVAILABLE,this._castUnavailable)};this._mediaStatePropagators.castchange=t}this._textTrackMediaStatePropagators={"addtrack,removetrack,loadstart":()=>{this.propagateMediaState(o.MEDIA_CAPTIONS_LIST,Q(Yt(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_LIST,Q(ot(this))||void 0),this.propagateMediaState(o.MEDIA_CAPTIONS_SHOWING,Q(Zi(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_SHOWING,Q(yr(this))||void 0)},change:()=>{this.propagateMediaState(o.MEDIA_CAPTIONS_SHOWING,Q(Zi(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_SHOWING,Q(yr(this))||void 0)}},this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat("nohotkeys","hotkeys","default-stream-type")}attributeChangedCallback(e,t,a){e==="nohotkeys"?a!==t&&a===""?(this.hasAttribute("hotkeys")&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys():e==="hotkeys"?Ve(this,ue).value=a:e==="default-stream-type"&&this.propagateMediaState(o.MEDIA_STREAM_TYPE),super.attributeChangedCallback(e,t,a)}mediaSetCallback(e){super.mediaSetCallback(e),e.hasAttribute("tabindex")||e.setAttribute("tabindex",-1),Object.keys(this._mediaStatePropagators).forEach(t=>{let a=t.split(","),r=this._mediaStatePropagators[t];a.forEach(n=>{(n==U.event?this.getRootNode():e).addEventListener(n,r)}),r()}),Object.entries(this._textTrackMediaStatePropagators).forEach(([t,a])=>{t.split(",").forEach(n=>{e.textTracks&&e.textTracks.addEventListener(n,a)}),a()});try{let t=u.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(this._mediaStatePropagators).forEach(t=>{let a=t.split(","),r=this._mediaStatePropagators[t];a.forEach(n=>{(n==U.event?this.getRootNode():e).removeEventListener(n,r)})}),Object.entries(this._textTrackMediaStatePropagators).forEach(([t,a])=>{t.split(",").forEach(n=>{e.textTracks&&e.textTracks.removeEventListener(n,a)}),a()}),this.propagateMediaState(o.MEDIA_PAUSED,!0)}propagateMediaState(e,t){arguments.length===1&&(t=Wt[e](this)),Ie(this.mediaStateReceivers,e,t);let a=new u.CustomEvent(rr[e],{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(a)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=Ho(e,a,r);Object.keys(p).forEach(s=>{e.addEventListener(p[s],this[`_handle${Rt(s,!0)}`])}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.keys(p).forEach(r=>{e.removeEventListener(p[r],this[`_handle${Rt(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Ie([e],o.MEDIA_VOLUME_UNAVAILABLE,this._volumeUnavailable),Ie([e],o.MEDIA_AIRPLAY_UNAVAILABLE,this._airplayUnavailable),Ie([e],o.MEDIA_FULLSCREEN_UNAVAILABLE,this._fullscreenUnavailable),Ie([e],o.MEDIA_CAST_UNAVAILABLE,this._castUnavailable),Ie([e],o.MEDIA_PIP_UNAVAILABLE,this._pipUnavailable),this.media&&Object.keys(o).forEach(r=>{r.includes("UNAVAILABLE")||Ie([e],o[r],Wt[o[r]]?Wt[o[r]](this):Wt.default(this,o[r]))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",He(this,Kt,Gi))}disableHotkeys(){this.removeEventListener("keydown",He(this,Kt,Gi)),this.removeEventListener("keyup",He(this,We,lt))}get hotkeys(){return Ve(this,ue)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute("keysused"))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(T=>T==="Space"?" ":T).filter(Boolean).includes(e.key))return;let l,c,m,E,f,w=No;if(!Ve(this,ue).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&Ve(this,ue).contains("nospace")))switch(e.key){case" ":case"k":l=this.getAttribute(o.MEDIA_PAUSED)!=null?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new u.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"m":l=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST,this.dispatchEvent(new u.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"f":l=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new u.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"c":Ht(this);break;case"ArrowLeft":c=this.getAttribute(o.MEDIA_CURRENT_TIME),m=c&&!Number.isNaN(+c)?+c:_r,E=Math.max(m-w,0),f=new u.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:E}),this.dispatchEvent(f);break;case"ArrowRight":c=this.getAttribute(o.MEDIA_CURRENT_TIME),m=c&&!Number.isNaN(+c)?+c:_r,E=Math.max(m+w,0),f=new u.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:E}),this.dispatchEvent(f);break;default:break}}};ue=new WeakMap;We=new WeakSet;lt=function(i){let{key:e}=i;if(!Mr.includes(e)){this.removeEventListener("keyup",He(this,We,lt));return}this.keyboardShortcutHandler(i)};Kt=new WeakSet;Gi=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Mr.includes(a)){this.removeEventListener("keyup",He(this,We,lt));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(Ve(this,ue).contains(`no${a.toLowerCase()}`)||a===" "&&Ve(this,ue).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",He(this,We,lt),{once:!0})};var Wt={default(i,e){return i.getAttribute(e)},[o.MEDIA_CAPTIONS_LIST](i){return Q(Yt(i))||void 0},[o.MEDIA_SUBTITLES_LIST](i){return Q(ot(i))||void 0},[o.MEDIA_SUBTITLES_LIST](i){return Q(ot(i))||void 0},[o.MEDIA_CAPTIONS_SHOWING](i){return Q(Zi(i))||void 0},[o.MEDIA_PAUSED](i){return kr(i)},[o.MEDIA_MUTED](i){return Sr(i)},[o.MEDIA_VOLUME](i){return Lr(i)},[o.MEDIA_VOLUME_LEVEL](i){return Cr(i)},[o.MEDIA_CURRENT_TIME](i){return wr(i)},[o.MEDIA_DURATION](i){return Dr(i)},[o.MEDIA_SEEKABLE](i){var e;return(e=xr(i))==null?void 0:e.join(":")},[o.MEDIA_PLAYBACK_RATE](i){return Rr(i)},[o.MEDIA_STREAM_TYPE](i){let e=i.media;if(!e)return;let t=e.duration;if(t===1/0)return xt.LIVE;if(Number.isFinite(t))return xt.ON_DEMAND;{let a=i.getAttribute("default-stream-type");if(Oo.includes(a))return a}return null}},kr=i=>i.media?i.media.paused:!0,Sr=i=>!!(i.media&&i.media.muted),Lr=i=>{let e=i.media;return e?e.volume:1},Cr=i=>{let e="high";if(!i.media)return e;let{muted:t,volume:a}=i.media;return a===0||t?e="off":a<.5?e="low":a<.75&&(e="medium"),e},wr=i=>{let e=i.media;return e?e.currentTime:0},Dr=i=>{let e=i==null?void 0:i.media;return Number.isFinite(e==null?void 0:e.duration)?e.duration:NaN},xr=i=>{var e;let t=i==null?void 0:i.media;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},Rr=i=>{let e=i.media;return e?e.playbackRate:1},ot=i=>$e(i.media,{kind:Ue.SUBTITLES}),Yt=i=>$e(i.media,{kind:Ue.CAPTIONS}),yr=i=>$e(i.media,{kind:Ue.SUBTITLES,mode:_e.SHOWING}),Zi=i=>$e(i.media,{kind:Ue.CAPTIONS,mode:_e.SHOWING}),Bo=Object.values(o),Pr=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)==null?void 0:e.includes("-"))&&(u.customElements.upgrade(i),{observedAttributes:n}=i.constructor);let s=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,A.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(l=>Bo.includes(l)):[]},qi=i=>!!Pr(i).length,$o=async(i,e,t)=>(i.isConnected||await Ur(0),t==null?i.removeAttribute(e):typeof t=="boolean"?t?i.setAttribute(e,""):i.removeAttribute(e):Number.isNaN(t)?i.removeAttribute(e):i.setAttribute(e,t)),Vo=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},nt=(i,e)=>{if(Vo(i))return;let t=(r,n)=>{var s,l;qi(r)&&n(r);let{children:c=[]}=r!=null?r:{},m=(l=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?l:[];[...c,...m].forEach(f=>nt(f,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!qi(i)){u.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Ie=(i,e,t)=>{i.forEach(a=>{!Pr(a).includes(e)||$o(a,e,t)})},Ho=(i,e,t)=>{nt(i,e);let a=c=>{var m;let E=(m=c==null?void 0:c.composedPath()[0])!=null?m:c.target;e(E)},r=c=>{var m;let E=(m=c==null?void 0:c.composedPath()[0])!=null?m:c.target;t(E)};i.addEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=c=>{c.forEach(m=>{let{addedNodes:E=[],removedNodes:f=[],type:w,target:T,attributeName:P}=m;w==="childList"?(Array.prototype.forEach.call(E,M=>nt(M,e)),Array.prototype.forEach.call(f,M=>nt(M,t))):w==="attributes"&&P===A.MEDIA_CHROME_ATTRIBUTES&&(qi(T)?e(T):t(T))})},s=new MutationObserver(n);return s.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{nt(i,t),s.disconnect(),i.removeEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,r)}},Ft,Qi=()=>{var i,e;return Ft||(Ft=(e=(i=d)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),Ft)},Wo=async(i=Qi())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await Ur(0),i.volume!==e},Ur=i=>new Promise(e=>setTimeout(e,i)),Fo=(i=Qi())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",Ko=Fo(),st,Yo=Wo().then(i=>(st=i,st)),Go=!!u.WebKitPlaybackTargetAvailabilityEvent,Zo=!!u.chrome,qo=(i=Qi())=>{let e=d[U.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},Tr=qo(),Qo=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});function zo(i=Qo){return Array.from(i).map((e,t)=>[Number(i.start(t).toFixed(3)),Number(i.end(t).toFixed(3))].join(":")).join(" ")}h("media-controller",Gt);var dt=Gt;var Nr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Xo=(i,e,t)=>(Nr(i,e,"read from private field"),t?t.call(i):e.get(i)),jo=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Jo=(i,e,t,a)=>(Nr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Zt,Br=d.createElement("template"),Or=`
|
|
193
193
|
height: var(--thumb-height);
|
|
194
194
|
width: var(--media-range-thumb-width, 10px);
|
|
195
195
|
border: var(--media-range-thumb-border, none);
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
transition: var(--media-range-thumb-transition, none);
|
|
201
201
|
transform: var(--media-range-thumb-transform, none);
|
|
202
202
|
opacity: var(--media-range-thumb-opacity, 1);
|
|
203
|
-
`,
|
|
203
|
+
`,zi=`
|
|
204
204
|
width: var(--media-range-track-width, 100%);
|
|
205
205
|
min-width: 40px;
|
|
206
206
|
height: var(--track-height);
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
transition: var(--media-range-track-transition, none);
|
|
214
214
|
transform: translate(var(--media-range-track-translate-x, 0), var(--media-range-track-translate-y, 0));
|
|
215
215
|
cursor: pointer;
|
|
216
|
-
`;
|
|
216
|
+
`;Br.innerHTML=`
|
|
217
217
|
<style>
|
|
218
218
|
:host {
|
|
219
219
|
--thumb-height: var(--media-range-thumb-height, 10px);
|
|
@@ -262,19 +262,19 @@
|
|
|
262
262
|
|
|
263
263
|
input[type=range]::-webkit-slider-thumb {
|
|
264
264
|
-webkit-appearance: none;
|
|
265
|
-
${
|
|
265
|
+
${Or}
|
|
266
266
|
|
|
267
267
|
margin-top: calc(calc(0px - var(--thumb-height) + var(--track-height)) / 2);
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
input[type=range]::-moz-range-thumb {
|
|
272
|
-
${
|
|
272
|
+
${Or}
|
|
273
273
|
translate: var(--media-range-track-translate-x, 0) var(--media-range-track-translate-y, 0);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
input[type=range]::-webkit-slider-runnable-track { ${
|
|
277
|
-
input[type=range]::-moz-range-track { ${
|
|
276
|
+
input[type=range]::-webkit-slider-runnable-track { ${zi} }
|
|
277
|
+
input[type=range]::-moz-range-track { ${zi} }
|
|
278
278
|
input[type=range]::-ms-track {
|
|
279
279
|
|
|
280
280
|
width: 100%;
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
border-color: transparent;
|
|
285
285
|
color: transparent;
|
|
286
286
|
|
|
287
|
-
${
|
|
287
|
+
${zi}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
#background,
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
<div id="hoverzone"></div>
|
|
363
363
|
<input id="range" type="range" min="0" max="1000" step="any" value="0">
|
|
364
364
|
</div>
|
|
365
|
-
`;var
|
|
365
|
+
`;var qt=class extends u.HTMLElement{constructor(){super(),jo(this,Zt,void 0),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Br.content.cloneNode(!0)),this.container=this.shadowRoot.querySelector("#container"),this.range=this.shadowRoot.querySelector("#range"),this.range.addEventListener("input",this.updateBar.bind(this)),Jo(this,Zt,parseInt(getComputedStyle(this).getPropertyValue("--media-range-thumb-width")||"10",10))}static get observedAttributes(){return["disabled","aria-disabled",A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n;if(e===A.MEDIA_CONTROLLER){if(t){let s=d.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=d.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}else(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?this.range.removeAttribute(e):this.range.setAttribute(e,a))}connectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}this.updateBar()}disconnectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}updatePointerBar(e){let t=this.range.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a));let{style:r}=ae(this.shadowRoot,"#pointer");r.setProperty("width",`${a*t.width}px`)}updateBar(){let e=this.getBarColors(),t="linear-gradient(to right, ",a=0;e.forEach(n=>{n[1]<a||(t=t+`${n[0]} ${a}%, ${n[0]} ${n[1]}%,`,a=n[1])}),t=t.slice(0,t.length-1)+")";let{style:r}=ae(this.shadowRoot,"#range");r.setProperty("--media-range-track-progress-internal",t)}getBarColors(){let e=this.range,t=e.value-e.min,a=e.max-e.min,r=t/a*100,n=0;return e.value>e.min&&e.value<e.max&&(n=Xo(this,Zt)*(.5-r/100)/e.offsetWidth*100),[["var(--media-range-bar-color, #fff)",r+n],["transparent",100]]}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};Zt=new WeakMap;h("media-chrome-range",qt);var ut=qt;var $r=d.createElement("template");$r.innerHTML=`
|
|
366
366
|
<style>
|
|
367
367
|
:host {
|
|
368
368
|
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
</style>
|
|
382
382
|
|
|
383
383
|
<slot></slot>
|
|
384
|
-
`;var
|
|
384
|
+
`;var Xi=class extends u.HTMLElement{static get observedAttributes(){return[A.MEDIA_CONTROLLER]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild($r.content.cloneNode(!0))}attributeChangedCallback(e,t,a){var r,n;if(e===A.MEDIA_CONTROLLER){if(t){let s=d.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=d.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}}connectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}};h("media-control-bar",Xi);var Vr=d.createElement("template");Vr.innerHTML=`
|
|
385
385
|
<style>
|
|
386
386
|
:host {
|
|
387
387
|
display: inline-flex;
|
|
@@ -416,11 +416,11 @@
|
|
|
416
416
|
<span id="container">
|
|
417
417
|
<slot></slot>
|
|
418
418
|
</span>
|
|
419
|
-
`;var
|
|
419
|
+
`;var Qt=class extends u.HTMLElement{static get observedAttributes(){return[A.MEDIA_CONTROLLER]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Vr.content.cloneNode(!0)),this.container=this.shadowRoot.querySelector("#container")}attributeChangedCallback(e,t,a){var r,n;if(e===A.MEDIA_CONTROLLER){if(t){let s=d.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=d.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}}connectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}};h("media-text-display",Qt);var ce=Qt;var ji=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_CURRENT_TIME&&(this.container.innerHTML=j(a)),super.attributeChangedCallback(e,t,a)}};h("media-current-time-display",ji);var Ji=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===o.MEDIA_DURATION&&(this.container.innerHTML=j(a)),super.attributeChangedCallback(e,t,a)}};h("media-duration-display",Ji);var es=" / ",ts=(i,{timesSep:e=es}={})=>{var t,a,r;let n=i.getAttribute("remaining")!=null,s=i.getAttribute("show-duration")!=null,l=(t=i.mediaCurrentTime)!=null?t:0,c=(r=(a=i.mediaDuration)!=null?a:i.mediaSeekableEnd)!=null?r:0,m=n?j(0-(c-l)):j(l);return s?`${m}${e}${j(c)}`:m},is="video not loaded, unknown time.",as=i=>{let e=i.mediaCurrentTime,t=i.mediaDuration||i.mediaSeekableEnd;if(e==null||t==null){i.setAttribute("aria-valuetext",is);return}let a=i.hasAttribute("remaining"),r=i.hasAttribute("show-duration"),n=a?ye(0-(t-e)):ye(e);if(!r){i.setAttribute("aria-valuetext",n);return}let s=ye(t),l=`${n} of ${s}`;i.setAttribute("aria-valuetext",l)},ea=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,"remaining","show-duration","disabled"]}constructor(){super()}connectedCallback(){this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",B.PLAYBACK_TIME()),super.connectedCallback()}disconnectedCallback(){this.disable()}attributeChangedCallback(e,t,a){if([o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,"remaining","show-duration"].includes(e)){let r=ts(this);as(this),this.container.innerHTML=r}else e==="disabled"&&a!==t&&(a==null?this.enable():this.disable());super.attributeChangedCallback(e,t,a)}enable(){this.setAttribute("tabindex",0)}disable(){this.removeAttribute("tabindex")}get mediaDuration(){let e=this.getAttribute(o.MEDIA_DURATION);return e!=null?+e:void 0}get mediaCurrentTime(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME);return e!=null?+e:void 0}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}get mediaSeekableEnd(){var e;let[,t]=(e=this.mediaSeekable)!=null?e:[];return t}get mediaSeekableStart(){var e;let[t]=(e=this.mediaSeekable)!=null?e:[];return t}};h("media-time-display",ea);var rs=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
420
420
|
<path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
|
|
421
|
-
</svg>`,
|
|
421
|
+
</svg>`,ns=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
422
422
|
<path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
|
|
423
|
-
</svg>`,
|
|
423
|
+
</svg>`,Wr=d.createElement("template");Wr.innerHTML=`
|
|
424
424
|
<style>
|
|
425
425
|
:host([aria-checked="true"]) slot:not([name=on]) > *,
|
|
426
426
|
:host([aria-checked="true"]) ::slotted(:not([slot=on])) {
|
|
@@ -434,15 +434,15 @@
|
|
|
434
434
|
}
|
|
435
435
|
</style>
|
|
436
436
|
|
|
437
|
-
<slot name="on">${
|
|
438
|
-
<slot name="off">${
|
|
439
|
-
`;var
|
|
440
|
-
<slot name="forward">${
|
|
441
|
-
`;var
|
|
437
|
+
<slot name="on">${rs}</slot>
|
|
438
|
+
<slot name="off">${ns}</slot>
|
|
439
|
+
`;var Hr=i=>{i.setAttribute("aria-checked",Ki(i))},ta=class extends x{static get observedAttributes(){return[...super.observedAttributes,"no-subtitles-fallback","default-showing",o.MEDIA_CAPTIONS_LIST,o.MEDIA_CAPTIONS_SHOWING,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Wr,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",B.CLOSED_CAPTIONS()),Hr(this)}attributeChangedCallback(e,t,a){if([o.MEDIA_CAPTIONS_SHOWING,o.MEDIA_SUBTITLES_SHOWING].includes(e)&&Hr(this),this.hasAttribute("default-showing")&&this.getAttribute("aria-checked")!=="true"){let r=!this.hasAttribute("no-subtitles-fallback");if((r?[o.MEDIA_CAPTIONS_LIST,o.MEDIA_SUBTITLES_LIST]:[o.MEDIA_CAPTIONS_LIST]).includes(e)){let s=!!this.getAttribute(o.MEDIA_CAPTIONS_LIST)||!!(r&&this.getAttribute(o.MEDIA_SUBTITLES_LIST));this._captionsReady!==s&&(this._captionsReady=s,this._captionsReady&&this.handleClick())}}super.attributeChangedCallback(e,t,a)}handleClick(){Ht(this)}};h("media-captions-button",ta);var ia="30",os=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">${ia}</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg>`,Yr=d.createElement("template");Yr.innerHTML=`
|
|
440
|
+
<slot name="forward">${os}</slot>
|
|
441
|
+
`;var ss=0,Fr=i=>{let e=Math.abs(+i.getAttribute("seek-offset")),t=C.SEEK_FORWARD_N_SECS({seekOffset:e});i.setAttribute("aria-label",t)},Kr=i=>{let e=Bt(i,"forward"),t=i.getAttribute("seek-offset");Nt(e,t)},aa=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,"seek-offset"]}constructor(e={}){super({slotTemplate:Yr,...e})}connectedCallback(){this.hasAttribute("seek-offset")||this.setAttribute("seek-offset",ia),Fr(this),Kr(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e==="seek-offset"&&(a==null&&this.setAttribute("seek-offset",ia),Kr(this),Fr(this)),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME),t=+this.getAttribute("seek-offset"),r=(e&&!Number.isNaN(+e)?+e:ss)+t,n=new u.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};h("media-seek-forward-button",aa);var ls=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
442
442
|
<path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
|
|
443
|
-
</svg>`,
|
|
443
|
+
</svg>`,ds=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
444
444
|
<path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
|
|
445
|
-
</svg>`,
|
|
445
|
+
</svg>`,Zr=d.createElement("template");Zr.innerHTML=`
|
|
446
446
|
<style>
|
|
447
447
|
:host([${o.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]) > *,
|
|
448
448
|
:host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted(:not([slot=exit])) {
|
|
@@ -456,15 +456,15 @@
|
|
|
456
456
|
}
|
|
457
457
|
</style>
|
|
458
458
|
|
|
459
|
-
<slot name="enter">${
|
|
460
|
-
<slot name="exit">${
|
|
461
|
-
`;var
|
|
459
|
+
<slot name="enter">${ls}</slot>
|
|
460
|
+
<slot name="exit">${ds}</slot>
|
|
461
|
+
`;var Gr=i=>{let t=i.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?C.EXIT_FULLSCREEN():C.ENTER_FULLSCREEN();i.setAttribute("aria-label",t)},ra=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Zr,...e})}connectedCallback(){Gr(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_FULLSCREEN&&Gr(this),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new u.CustomEvent(e,{composed:!0,bubbles:!0}))}};h("media-fullscreen-button",ra);var us=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
462
462
|
<path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
|
|
463
|
-
</svg>`,
|
|
463
|
+
</svg>`,qr=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
464
464
|
<path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>
|
|
465
|
-
</svg>`,
|
|
465
|
+
</svg>`,cs=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
466
466
|
<path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>
|
|
467
|
-
</svg>`,
|
|
467
|
+
</svg>`,zr=d.createElement("template");zr.innerHTML=`
|
|
468
468
|
<style>
|
|
469
469
|
|
|
470
470
|
:host(:not([${o.MEDIA_VOLUME_LEVEL}])) slot:not([name=high]) > *,
|
|
@@ -490,13 +490,13 @@
|
|
|
490
490
|
}
|
|
491
491
|
</style>
|
|
492
492
|
|
|
493
|
-
<slot name="off">${
|
|
494
|
-
<slot name="low">${
|
|
495
|
-
<slot name="medium">${
|
|
496
|
-
<slot name="high">${
|
|
497
|
-
`;var
|
|
493
|
+
<slot name="off">${us}</slot>
|
|
494
|
+
<slot name="low">${qr}</slot>
|
|
495
|
+
<slot name="medium">${qr}</slot>
|
|
496
|
+
<slot name="high">${cs}</slot>
|
|
497
|
+
`;var Qr=i=>{let t=i.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?C.UNMUTE():C.MUTE();i.setAttribute("aria-label",t)},na=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:zr,...e})}connectedCallback(){Qr(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_VOLUME_LEVEL&&Qr(this),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST;this.dispatchEvent(new u.CustomEvent(e,{composed:!0,bubbles:!0}))}};h("media-mute-button",na);var Xr=`<svg aria-hidden="true" viewBox="0 0 28 24">
|
|
498
498
|
<path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>
|
|
499
|
-
</svg>`,
|
|
499
|
+
</svg>`,Jr=d.createElement("template");Jr.innerHTML=`
|
|
500
500
|
<style>
|
|
501
501
|
:host([${o.MEDIA_IS_PIP}]) slot:not([name=exit]) > *,
|
|
502
502
|
:host([${o.MEDIA_IS_PIP}]) ::slotted(:not([slot=exit])) {
|
|
@@ -510,13 +510,13 @@
|
|
|
510
510
|
}
|
|
511
511
|
</style>
|
|
512
512
|
|
|
513
|
-
<slot name="enter">${
|
|
514
|
-
<slot name="exit">${
|
|
515
|
-
`;var
|
|
513
|
+
<slot name="enter">${Xr}</slot>
|
|
514
|
+
<slot name="exit">${Xr}</slot>
|
|
515
|
+
`;var jr=i=>{let t=i.getAttribute(o.MEDIA_IS_PIP)!=null?C.EXIT_PIP():C.ENTER_PIP();i.setAttribute("aria-label",t)},oa=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Jr,...e})}connectedCallback(){jr(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_PIP&&jr(this),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_IS_PIP)!=null?p.MEDIA_EXIT_PIP_REQUEST:p.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new u.CustomEvent(e,{composed:!0,bubbles:!0}))}};h("media-pip-button",oa);var ms=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
516
516
|
<path d="m6 21 15-9L6 3v18Z"/>
|
|
517
|
-
</svg
|
|
517
|
+
</svg>`,hs=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
518
518
|
<path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
|
|
519
|
-
</svg>`,
|
|
519
|
+
</svg>`,tn=d.createElement("template");tn.innerHTML=`
|
|
520
520
|
<style>
|
|
521
521
|
:host([${o.MEDIA_PAUSED}]) slot[name=pause] > *,
|
|
522
522
|
:host([${o.MEDIA_PAUSED}]) ::slotted([slot=pause]) {
|
|
@@ -529,11 +529,11 @@
|
|
|
529
529
|
}
|
|
530
530
|
</style>
|
|
531
531
|
|
|
532
|
-
<slot name="play">${
|
|
533
|
-
<slot name="pause">${
|
|
534
|
-
`;var
|
|
532
|
+
<slot name="play">${ms}</slot>
|
|
533
|
+
<slot name="pause">${hs}</slot>
|
|
534
|
+
`;var en=i=>{let t=i.getAttribute(o.MEDIA_PAUSED)!=null?C.PLAY():C.PAUSE();i.setAttribute("aria-label",t)},sa=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED]}constructor(e={}){super({slotTemplate:tn,...e})}connectedCallback(){en(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_PAUSED&&en(this),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_PAUSED)!=null?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new u.CustomEvent(e,{composed:!0,bubbles:!0}))}};h("media-play-button",sa);var an=[1,1.25,1.5,1.75,2],zt=1,rn=d.createElement("template");rn.innerHTML=`
|
|
535
535
|
<span id="container"></span>
|
|
536
|
-
`;var
|
|
536
|
+
`;var la=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,"rates"]}constructor(e={}){super({slotTemplate:rn,...e}),this._rates=an,this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${zt}x`}attributeChangedCallback(e,t,a){if(e==="rates"){let r=(a!=null?a:"").trim().split(/\s*,?\s+/).map(n=>Number(n)).filter(n=>!Number.isNaN(n)).sort((n,s)=>n-s);this._rates=r.length?r:an;return}if(e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?zt:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",B.PLAYBACK_RATE({playbackRate:n}));return}super.attributeChangedCallback(e,t,a)}handleClick(){var e,t;let a=+this.getAttribute(o.MEDIA_PLAYBACK_RATE)||zt,r=(t=(e=this._rates.find(s=>s>a))!=null?e:this._rates[0])!=null?t:zt,n=new u.CustomEvent(p.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};h("media-playback-rate-button",la);var nn=d.createElement("template");nn.innerHTML=`
|
|
537
537
|
<style>
|
|
538
538
|
:host {
|
|
539
539
|
pointer-events: none;
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
</style>
|
|
560
560
|
|
|
561
561
|
<img aria-hidden="true" id="image"/>
|
|
562
|
-
`;var
|
|
562
|
+
`;var ps=i=>{i.style.removeProperty("background-image")},bs=(i,e)=>{i.style["background-image"]=`url('${e}')`},da=class extends u.HTMLElement{static get observedAttributes(){return[o.MEDIA_HAS_PLAYED,"placeholder-src","src"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(nn.content.cloneNode(!0)),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e==="src"&&(a==null?this.image.removeAttribute("src"):this.image.setAttribute("src",a)),e==="placeholder-src"&&(a==null?ps(this.image):bs(this.image,a))}};h("media-poster-image",da);var ba=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},O=(i,e,t)=>(ba(i,e,"read from private field"),t?t.call(i):e.get(i)),K=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},me=(i,e,t,a)=>(ba(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ct=(i,e,t)=>(ba(i,e,"access private method"),t),mt,Xt,ht,ti,ii,jt,ca,Jt,Fe,pt,ma,ai,ni,ei,ha,pa,on,Es="video not loaded, unknown time.",ua=i=>{let e=i.range,t=ye(+e.value),a=ye(+e.max),r=t&&a?`${t} of ${a}`:Es;e.setAttribute("aria-valuetext",r)},sn=d.createElement("template");sn.innerHTML=`
|
|
563
563
|
<style>
|
|
564
564
|
:host {
|
|
565
565
|
--media-preview-background-color: rgba(20,20,30, .5);
|
|
@@ -663,9 +663,9 @@
|
|
|
663
663
|
|
|
664
664
|
</slot>
|
|
665
665
|
</div>
|
|
666
|
-
`;var
|
|
667
|
-
<slot name="backward">${
|
|
668
|
-
`;var
|
|
666
|
+
`;var ri=class extends ut{constructor(){super(),K(this,jt),K(this,ei),K(this,pa),K(this,mt,void 0),K(this,Xt,void 0),K(this,ht,void 0),K(this,ti,void 0),K(this,ii,void 0),K(this,Jt,t=>{if([...O(this,mt)].some(E=>t.composedPath().includes(E)))return;this.updatePointerBar(t);let a=+this.getAttribute(o.MEDIA_DURATION);if(!a)return;let r=this.range.getBoundingClientRect(),n=(t.clientX-r.left)/r.width;n=Math.max(0,Math.min(1,n));let s=ct(this,jt,ca).call(this,O(this,Xt),n),{style:l}=ae(this.shadowRoot,"#preview-rail");l.transform=`translateX(${s})`;let c=n*a,m=new u.CustomEvent(p.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:c});this.dispatchEvent(m)}),K(this,Fe,!1),K(this,pt,t=>{(!t.composedPath().includes(this)||[...O(this,mt)].some(a=>t.composedPath().includes(a)))&&(u.removeEventListener("pointermove",O(this,pt)),me(this,Fe,!1),O(this,ai).call(this))}),K(this,ma,()=>{u.addEventListener("pointermove",O(this,Jt),!1)}),K(this,ai,()=>{u.removeEventListener("pointermove",O(this,Jt));let t=new u.CustomEvent(p.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:null});this.dispatchEvent(t)}),K(this,ni,()=>{let t=this.getAttribute(o.MEDIA_DURATION);!O(this,Fe)&&t&&(me(this,Fe,!0),O(this,ma).call(this),u.addEventListener("pointermove",O(this,pt),!1))}),this.container.appendChild(sn.content.cloneNode(!0)),this.range.addEventListener("input",()=>{cancelAnimationFrame(this._refreshId);let a=this.range.value,r=new u.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}),this._refreshBar=()=>{let t=(performance.now()-this._updateTimestamp)/1e3;this.range.value=this.mediaCurrentTime+t*this.mediaPlaybackRate,this.updateBar(),this.updateCurrentBox(),this._refreshId=requestAnimationFrame(this._refreshBar)},me(this,mt,this.shadowRoot.querySelectorAll('[part~="box"]')),me(this,Xt,this.shadowRoot.querySelector('[part~="preview-box"]')),me(this,ht,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);me(this,ti,parseInt(e.getPropertyValue("--media-box-padding-left"))),me(this,ii,parseInt(e.getPropertyValue("--media-box-padding-right"))),ct(this,ei,ha).call(this)}static get observedAttributes(){return[...super.observedAttributes,"thumbnails","disabled",o.MEDIA_PAUSED,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_TIME,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING]}connectedCallback(){this.range.setAttribute("aria-label",B.SEEK()),super.connectedCallback()}disconnectedCallback(){cancelAnimationFrame(this._refreshId),super.disconnectedCallback()}attributeChangedCallback(e,t,a){var r,n,s,l,c;(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_LOADING)&&(this._updateTimestamp=performance.now(),this.range.value=this.mediaCurrentTime,ua(this),this.updateBar(),this.updateCurrentBox(),cancelAnimationFrame(this._refreshId),!this.mediaPaused&&!this.mediaLoading&&(this._refreshId=requestAnimationFrame(this._refreshBar))),e===o.MEDIA_DURATION&&(this.range.max=Math.floor((n=(r=this.mediaSeekableEnd)!=null?r:this.mediaDuration)!=null?n:1e3),ua(this),this.updateBar(),this.updateCurrentBox()),e===o.MEDIA_SEEKABLE&&(this.range.min=(s=this.mediaSeekableStart)!=null?s:0,this.range.max=Math.floor((c=(l=this.mediaSeekableEnd)!=null?l:this.mediaDuration)!=null?c:1e3),ua(this),this.updateBar()),e===o.MEDIA_BUFFERED&&this.updateBar(),e==="disabled"&&(a==null?ct(this,ei,ha).call(this):ct(this,pa,on).call(this)),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return this.hasAttribute(o.MEDIA_PAUSED)}get mediaLoading(){return this.hasAttribute(o.MEDIA_LOADING)}get mediaDuration(){let e=this.getAttribute(o.MEDIA_DURATION);return e!=null?+e:void 0}get mediaCurrentTime(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME);return e!=null?+e:void 0}get mediaPlaybackRate(){let e=this.getAttribute(o.MEDIA_PLAYBACK_RATE);return e!=null?+e:1}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}get mediaSeekableEnd(){var e;let[,t]=(e=this.mediaSeekable)!=null?e:[];return t}get mediaSeekableStart(){var e;let[t]=(e=this.mediaSeekable)!=null?e:[];return t}getBarColors(){var e;let t=super.getBarColors(),{range:a}=this,r=a.max-a.min,n=this.mediaBuffered;if(!n.length||!Number.isFinite(r)||r<=0)return t;let s=this.mediaCurrentTime,[,l=a.min]=(e=n.find(([E,f])=>E<=s&&s<=f))!=null?e:[],m=(l-a.min)/r*100;return t.splice(1,0,["var(--media-time-buffered-color, rgba(255,255,255, .4))",m]),t}updateCurrentBox(){if(!O(this,ht).assignedElements().length)return;let e=this.range.value/(this.range.max-this.range.min),t=ct(this,jt,ca).call(this,O(this,ht),e),{style:a}=ae(this.shadowRoot,"#current-rail");a.transform=`translateX(${t})`}};mt=new WeakMap;Xt=new WeakMap;ht=new WeakMap;ti=new WeakMap;ii=new WeakMap;jt=new WeakSet;ca=function(i,e){var t;let a=`${e*100*100}%`,r=i.offsetWidth;if(!r)return a;let n=(t=this.getAttribute("bounds")?at(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?t:this,s=this.range.getBoundingClientRect(),l=n.getBoundingClientRect(),c=(O(this,ti)-(s.left-l.left-r/2))/s.width*100,m=(l.right-s.left-r/2-O(this,ii))/s.width*100;return Number.isNaN(c)||(a=`max(${c*100}%, ${a})`),Number.isNaN(m)||(a=`min(${a}, ${m*100}%)`),a};Jt=new WeakMap;Fe=new WeakMap;pt=new WeakMap;ma=new WeakMap;ai=new WeakMap;ni=new WeakMap;ei=new WeakSet;ha=function(){this.addEventListener("pointermove",O(this,ni),!1)};pa=new WeakSet;on=function(){u.removeEventListener("pointermove",O(this,pt)),this.removeEventListener("pointermove",O(this,ni)),me(this,Fe,!1),O(this,ai).call(this)};h("media-time-range",ri);var Ea=ri;var fa=class extends Ea{constructor(){super(),console.warn("MediaChrome: <media-progress-range> is deprecated. Use <media-time-range> instead.")}};h("media-progress-range",fa);var va="30",fs=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">${va}</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg>`,un=d.createElement("template");un.innerHTML=`
|
|
667
|
+
<slot name="backward">${fs}</slot>
|
|
668
|
+
`;var vs=0,ln=i=>{let e=Math.abs(+i.getAttribute("seek-offset")),t=C.SEEK_BACK_N_SECS({seekOffset:e});i.setAttribute("aria-label",t)},dn=i=>{let e=Bt(i,"backward"),t=i.getAttribute("seek-offset");Nt(e,t)},ga=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME]}constructor(e={}){super({slotTemplate:un,...e})}connectedCallback(){this.hasAttribute("seek-offset")||this.setAttribute("seek-offset",va),ln(this),dn(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e==="seek-offset"&&(a==null&&this.setAttribute("seek-offset",va),dn(this),ln(this)),super.attributeChangedCallback(e,t,a)}handleClick(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME),t=+this.getAttribute("seek-offset"),a=e&&!Number.isNaN(+e)?+e:vs,r=Math.max(a-t,0),n=new u.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};h("media-seek-backward-button",ga);var Aa=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_PREVIEW_TIME&&a!=null&&(this.container.textContent=j(a)),super.attributeChangedCallback(e,t,a)}};h("media-preview-time-display",Aa);var cn=d.createElement("template");cn.innerHTML=`
|
|
669
669
|
<style>
|
|
670
670
|
:host {
|
|
671
671
|
box-sizing: border-box;
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
}
|
|
680
680
|
</style>
|
|
681
681
|
<img crossorigin loading="eager" decoding="async" />
|
|
682
|
-
`;var
|
|
682
|
+
`;var _a=class extends u.HTMLElement{static get observedAttributes(){return[A.MEDIA_CONTROLLER,"time",o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(cn.content.cloneNode(!0))}connectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}attributeChangedCallback(e,t,a){var r,n;if(["time",o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===A.MEDIA_CONTROLLER){if(t){let s=d.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=d.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}}update(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS),t=this.getAttribute(o.MEDIA_PREVIEW_IMAGE);if(!(e&&t))return;let[a,r,n,s]=e.split(/\s+/).map(wt=>+wt),l=t.split("#")[0],c=getComputedStyle(this),{maxWidth:m,maxHeight:E,minWidth:f,minHeight:w}=c,T=Math.min(parseInt(m)/n,parseInt(E)/s),P=Math.max(parseInt(f)/n,parseInt(w)/s),M=T<1,R=M?T:P>1?P:1,{style:L}=ae(this.shadowRoot,":host"),G=ae(this.shadowRoot,"img").style,Z=this.shadowRoot.querySelector("img"),ie=M?"min":"max";L.setProperty(`${ie}-width`,"initial","important"),L.setProperty(`${ie}-height`,"initial","important"),L.width=`${n*R}px`,L.height=`${s*R}px`;let Re=()=>{G.width=`${this.imgWidth*R}px`,G.height=`${this.imgHeight*R}px`,G.display="block"};Z.src!==l&&(Z.onload=()=>{this.imgWidth=Z.naturalWidth,this.imgHeight=Z.naturalHeight,Re()},Z.src=l,Re()),Re(),G.transform=`translate(-${a*R}px, -${r*R}px)`}};h("media-preview-thumbnail",_a);var mn=d.createElement("template"),gs=`
|
|
683
683
|
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
684
684
|
<path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
|
685
685
|
<animateTransform
|
|
@@ -692,7 +692,7 @@
|
|
|
692
692
|
repeatCount="indefinite" />
|
|
693
693
|
</path>
|
|
694
694
|
</svg>
|
|
695
|
-
`;
|
|
695
|
+
`;mn.innerHTML=`
|
|
696
696
|
<style>
|
|
697
697
|
:host {
|
|
698
698
|
display: inline-block;
|
|
@@ -729,724 +729,28 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
729
729
|
}
|
|
730
730
|
</style>
|
|
731
731
|
|
|
732
|
-
<slot name="loading">${
|
|
733
|
-
<div id="status" role="status" aria-live="polite">${
|
|
734
|
-
`;var
|
|
732
|
+
<slot name="loading">${gs}</slot>
|
|
733
|
+
<div id="status" role="status" aria-live="polite">${B.MEDIA_LOADING()}</div>
|
|
734
|
+
`;var As=500,ya=class extends u.HTMLElement{static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,"loading-delay"]}constructor(){super();let e=this.attachShadow({mode:"open"}),t=mn.content.cloneNode(!0);e.appendChild(t)}attributeChangedCallback(e,t,a){var r,n,s;if(e===o.MEDIA_LOADING||e===o.MEDIA_PAUSED){let l=this.getAttribute(o.MEDIA_PAUSED)!=null,c=this.getAttribute(o.MEDIA_LOADING)!=null,m=!l&&c;if(!m)this.loadingDelayHandle&&(clearTimeout(this.loadingDelayHandle),this.loadingDelayHandle=void 0),this.removeAttribute("is-loading");else if(!this.loadingDelayHandle&&m){let E=+((r=this.getAttribute("loading-delay"))!=null?r:As);this.loadingDelayHandle=setTimeout(()=>{this.setAttribute("is-loading",""),this.loadingDelayHandle=void 0},E)}}else if(e===A.MEDIA_CONTROLLER){if(t){let l=d.getElementById(t);(n=l==null?void 0:l.unassociateElement)==null||n.call(l,this)}if(a){let l=d.getElementById(a);(s=l==null?void 0:l.associateElement)==null||s.call(l,this)}}}connectedCallback(){var e;let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;this.loadingDelayHandle&&(clearTimeout(this.loadingDelayHandle),this.loadingDelayHandle=void 0);let t=this.getAttribute(A.MEDIA_CONTROLLER);if(t){let a=d.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}};h("media-loading-indicator",ya);var hn=d.createElement("template");hn.innerHTML=`
|
|
735
735
|
<style>
|
|
736
736
|
:host {
|
|
737
737
|
}
|
|
738
738
|
</style>
|
|
739
739
|
<slot></slot>
|
|
740
|
-
`;var
|
|
741
|
-
${a}${t.file}`}ve(i)}var N={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},De={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Cn=Object.freeze({length:0,start(t){let i=t>>>0;if(i>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${i}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let i=t>>>0;if(i>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${i}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),ol=wn.VideoEvents.filter(t=>t!=="error"),sl=Object.values(N).filter(t=>![N.PLAYSINLINE].includes(t)),ll=Object.values(De);function xn(t){t.querySelectorAll(":scope > track").forEach(i=>{var e;(e=t.media)==null||e.append(i.cloneNode())}),ol.forEach(i=>{var e;(e=t.media)==null||e.addEventListener(i,a=>{t.dispatchEvent(new Event(a.type))})})}var La=class extends k.HTMLElement{static get observedAttributes(){return[...sl,...ll]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(a=>{var r;(r=this.media)==null||r.append(a.cloneNode())});let i=a=>{for(let r of a)r.type==="childList"&&(r.removedNodes.forEach(n=>{var l,c;let s=(l=this.media)==null?void 0:l.querySelector(`track[src="${n.src}"]`);s&&((c=this.media)==null||c.removeChild(s))}),r.addedNodes.forEach(n=>{var s;(s=this.media)==null||s.append(n.cloneNode())}))};new MutationObserver(i).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(i,e,a){var r,n;switch(i){case De.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case De.VOLUME:{let s=(r=ne(a))!=null?r:1;this.media&&(this.media.volume=s);return}case De.PLAYBACKRATE:{let s=(n=ne(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var i,e;return(e=(i=this.media)==null?void 0:i.play())!=null?e:Promise.reject()}pause(){var i;(i=this.media)==null||i.pause()}requestCast(i){var e;return(e=this.media)==null?void 0:e.requestCast(i)}get media(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("mux-video")}get paused(){var i,e;return(e=(i=this.media)==null?void 0:i.paused)!=null?e:!0}get duration(){var i,e;return(e=(i=this.media)==null?void 0:i.duration)!=null?e:NaN}get ended(){var i,e;return(e=(i=this.media)==null?void 0:i.ended)!=null?e:!1}get buffered(){var i,e;return(e=(i=this.media)==null?void 0:i.buffered)!=null?e:Cn}get seekable(){var i,e;return(e=(i=this.media)==null?void 0:i.seekable)!=null?e:Cn}get readyState(){var i,e;return(e=(i=this.media)==null?void 0:i.readyState)!=null?e:0}get videoWidth(){var i,e;return(e=(i=this.media)==null?void 0:i.videoWidth)!=null?e:0}get videoHeight(){var i,e;return(e=(i=this.media)==null?void 0:i.videoHeight)!=null?e:0}get currentTime(){var i,e;return(e=(i=this.media)==null?void 0:i.currentTime)!=null?e:0}set currentTime(i){this.media&&(this.media.currentTime=Number(i))}get volume(){var i,e;return(e=(i=this.media)==null?void 0:i.volume)!=null?e:1}set volume(i){this.media&&(this.media.volume=Number(i))}get playbackRate(){var i,e;return(e=(i=this.media)==null?void 0:i.playbackRate)!=null?e:1}set playbackRate(i){this.media&&(this.media.playbackRate=Number(i))}get defaultPlaybackRate(){var i;return(i=ne(this.getAttribute(De.PLAYBACKRATE)))!=null?i:1}set defaultPlaybackRate(i){i!=null?this.setAttribute(De.PLAYBACKRATE,`${i}`):this.removeAttribute(De.PLAYBACKRATE)}get crossOrigin(){return vt(this,N.CROSSORIGIN)}set crossOrigin(i){this.setAttribute(N.CROSSORIGIN,`${i}`)}get autoplay(){return vt(this,N.AUTOPLAY)!=null}set autoplay(i){i?this.setAttribute(N.AUTOPLAY,typeof i=="string"?i:""):this.removeAttribute(N.AUTOPLAY)}get loop(){return vt(this,N.LOOP)!=null}set loop(i){i?this.setAttribute(N.LOOP,""):this.removeAttribute(N.LOOP)}get muted(){var i,e;return(e=(i=this.media)==null?void 0:i.muted)!=null?e:!1}set muted(i){this.media&&(this.media.muted=Boolean(i))}get defaultMuted(){return vt(this,N.MUTED)!=null}set defaultMuted(i){i?this.setAttribute(N.MUTED,""):this.removeAttribute(N.MUTED)}get playsInline(){return vt(this,N.PLAYSINLINE)!=null}set playsInline(i){J("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(i){["","none","metadata","auto"].includes(i)?this.setAttribute(N.PRELOAD,i):this.removeAttribute(N.PRELOAD)}};function vt(t,i){return t.media?t.media.getAttribute(i):t.getAttribute(i)}var Ca=La;var ni=new Map;function oi(t){if(ni.has(t))return ni.get(t);let i=t.length,e=0,a=0,r=0,n=[];for(let s=0;s<i;s+=1){let l=t[s],c=t[s+1],m=t[s-1];l==="{"&&c==="{"&&m!=="\\"?(r+=1,r===1&&(a=s),s+=1):l==="}"&&c==="}"&&m!=="\\"&&r&&(r-=1,r===0&&(a>e&&(n.push(Object.freeze({type:"string",start:e,end:a,value:t.slice(e,a)})),e=a),n.push(Object.freeze({type:"part",start:a,end:s+2,value:t.slice(e+2,s).trim()})),s+=1,e=s+1))}return e<i&&n.push(Object.freeze({type:"string",start:e,end:i,value:t.slice(e,i)})),ni.set(t,Object.freeze(n)),ni.get(t)}var Re=new WeakMap,Dn=new WeakMap,z=class{constructor(i,e){this.expression=e,Re.set(this,i),i.updateParent("")}get attributeName(){return Re.get(this).attr.name}get attributeNamespace(){return Re.get(this).attr.namespaceURI}get value(){return Dn.get(this)}set value(i){Dn.set(this,i||""),Re.get(this).updateParent(i)}get element(){return Re.get(this).element}get booleanValue(){return Re.get(this).booleanValue}set booleanValue(i){Re.get(this).booleanValue=i}},At=class{constructor(i,e){this.element=i,this.attr=e,this.partList=[]}get booleanValue(){return this.element.hasAttributeNS(this.attr.namespaceURI,this.attr.name)}set booleanValue(i){if(this.partList.length!==1)throw new DOMException("Operation not supported","NotSupportedError");this.partList[0].value=i?"":null}append(i){this.partList.push(i)}updateParent(i){if(this.partList.length===1&&i===null)this.element.removeAttributeNS(this.attr.namespaceURI,this.attr.name);else{let e=this.partList.map(a=>typeof a=="string"?a:a.value).join("");this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,e)}}};var Ae=new WeakMap,ee=class{constructor(i,e){this.expression=e,Ae.set(this,[i]),i.textContent=""}get value(){return Ae.get(this).map(i=>i.textContent).join("")}set value(i){this.replace(i)}get previousSibling(){return Ae.get(this)[0].previousSibling}get nextSibling(){return Ae.get(this)[Ae.get(this).length-1].nextSibling}replace(...i){let e=i.map(a=>typeof a=="string"?new Text(a):a);e.length||e.push(new Text("")),Ae.get(this)[0].before(...e);for(let a of Ae.get(this))a.remove();Ae.set(this,e)}};function _t(t){return{processCallback(i,e,a){var r;if(!(typeof a!="object"||!a)){for(let n of e)if(n.expression in a){let s=(r=a[n.expression])!==null&&r!==void 0?r:"";t(n,s)}}}}}function wa(t,i){t.value=String(i)}function Rn(t,i){return typeof i=="boolean"&&t instanceof z&&typeof t.element[t.attributeName]=="boolean"?(t.booleanValue=i,!0):!1}var xa=_t(wa),dl=_t((t,i)=>{Rn(t,i)||wa(t,i)});function*cl(t){let i=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null,!1),e;for(;e=i.nextNode();)if(e instanceof Element&&e.hasAttributes())for(let a=0;a<e.attributes.length;a+=1){let r=e.attributes.item(a);if(r&&r.value.includes("{{")){let n=new At(e,r);for(let s of oi(r.value))if(s.type==="string")n.append(s.value);else{let l=new z(n,s.value);n.append(l),yield l}}}else if(e instanceof Text&&e.textContent&&e.textContent.includes("{{")){let a=oi(e.textContent);for(let r=0;r<a.length;r+=1){let n=a[r];n.end<e.textContent.length&&e.splitText(n.end),n.type==="part"&&(yield new ee(e,n.value));break}}}var si=new WeakMap,li=new WeakMap,oe=class extends DocumentFragment{constructor(i,e,a=xa){var r,n;super(),Object.getPrototypeOf(this)!==oe.prototype&&Object.setPrototypeOf(this,oe.prototype),this.appendChild(i.content.cloneNode(!0)),li.set(this,Array.from(cl(this))),si.set(this,a),(n=(r=si.get(this)).createCallback)===null||n===void 0||n.call(r,this,li.get(this),e),si.get(this).processCallback(this,li.get(this),e)}update(i){si.get(this).processCallback(this,li.get(this),i)}};var yt=new WeakMap,Tt=class{constructor(i,e){this.element=i;this.type=e;this.element.addEventListener(this.type,this);let a=yt.get(this.element);a&&a.set(this.type,this)}set(i){if(typeof i=="function")this.handleEvent=i.bind(this.element);else if(typeof i=="object"&&typeof i.handleEvent=="function")this.handleEvent=i.handleEvent.bind(i);else{this.element.removeEventListener(this.type,this);let e=yt.get(this.element);e&&e.delete(this.type)}}static for(i){yt.has(i.element)||yt.set(i.element,new Map);let e=i.attributeName.slice(2),a=yt.get(i.element);return a&&a.has(e)?a.get(e):new Tt(i.element,e)}};function ul(t,i){return t instanceof z&&t.attributeName.startsWith("on")?(Tt.for(t).set(i),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function ml(t,i){return i instanceof It&&t instanceof ee?(i.renderInto(t),!0):!1}function hl(t,i){return i instanceof DocumentFragment&&t instanceof ee?(i.childNodes.length&&t.replace(...i.childNodes),!0):!1}function pl(t,i){if(t instanceof z){let e=t.attributeNamespace,a=t.element.getAttributeNS(e,t.attributeName);return String(i)!==a&&(t.value=String(i)),!0}return t.value=String(i),!0}function bl(t,i){if(typeof i=="boolean"&&t instanceof z){let e=t.attributeNamespace,a=t.element.hasAttributeNS(e,t.attributeName);return i!==a&&(t.booleanValue=i),!0}return!1}function El(t,i){return i===!1&&t instanceof ee?(t.replace(""),!0):!1}function fl(t,i){bl(t,i)||ul(t,i)||El(t,i)||ml(t,i)||hl(t,i)||pl(t,i)}var Da=new WeakMap,Pn=new WeakMap,Un=new WeakMap,It=class{constructor(i,e,a){this.strings=i;this.values=e;this.processor=a}get template(){if(Da.has(this.strings))return Da.get(this.strings);{let i=document.createElement("template"),e=this.strings.length-1;return i.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<e?`{{ ${n} }}`:""),""),Da.set(this.strings,i),i}}renderInto(i){let e=this.template;if(Pn.get(i)!==e){Pn.set(i,e);let r=new oe(e,this.values,this.processor);Un.set(i,r),i instanceof ee?i.replace(...r.children):i.appendChild(r);return}let a=Un.get(i);a&&a.update(this.values)}},On=new Map,gl=_t(fl);function b(t,...i){let e=[""],a=[],r,n=!1,s=(l,c=[])=>{e[e.length-1]=e[e.length-1]+l[0],c.forEach((m,f)=>{(r=m==null?void 0:m.$static$)!==void 0?(r.forEach(_=>{s(_.strings,_.values)}),e[e.length-1]=e[e.length-1]+l[f+1],n=!0):(a.push(m),e.push(l[f+1]))})};if(s(t,i),n){let l=e.join("$$html$$");t=On.get(l),t===void 0&&(e.raw=e,On.set(l,t=e)),i=a}return new It(t,i,gl)}function di(t,i){t.renderInto(i)}function D(t,i){let e=document.createElement("template");return e.innerHTML=t,new oe(e,i)}var Ra=(...t)=>({$static$:t.map(i=>i instanceof It?i:/\w-/.test(i)?{strings:[i]}:{strings:[]})});var $n=`
|
|
740
|
+
`;var Ta=class extends u.HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(hn.content.cloneNode(!0))}};h("media-title-bar",Ta);var _s=100,ys=i=>{var e;if(i.getAttribute(o.MEDIA_MUTED)!=null)return 0;let a=+((e=i.getAttribute(o.MEDIA_VOLUME))!=null?e:1);return Math.round(a*i.range.max)},Ts=({value:i,max:e})=>`${Math.round(i/e*100)}%`,Ia=class extends ut{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.max=_s,this.range.addEventListener("input",()=>{let t=this.range.value/this.range.max,a=new u.CustomEvent(p.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(a)})}connectedCallback(){this.range.setAttribute("aria-label",B.VOLUME()),super.connectedCallback()}attributeChangedCallback(e,t,a){if(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED){let r=ys(this);this.range.value=r,this.range.setAttribute("aria-valuetext",Ts(this.range)),this.updateBar()}super.attributeChangedCallback(e,t,a)}};h("media-volume-range",Ia);var Is=Object.defineProperty,Ms=(i,e,t)=>e in i?Is(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ks=(i,e,t)=>(Ms(i,typeof e!="symbol"?e+"":e,t),t),oi=class extends u.HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){this.shadowRoot.textContent="";let e=d.createElement("template");e.innerHTML=this.constructor.template,this.shadowRoot.append(e.content.cloneNode(!0))}get mediaController(){return this.shadowRoot.querySelector("media-controller")}};ks(oi,"template","");h("media-theme-base",oi);var Ma=class extends dt{};u.customElements.get("media-chrome")||u.customElements.define("media-chrome",Ma);var ka=class extends dt{constructor(){super(),console.warn("MediaChrome: <media-container> is deprecated. Use <media-controller>.")}};u.customElements.get("media-container")||u.customElements.define("media-container",ka);var g=fo(require("@mux/mux-video")),k=require("@mux/playback-core");var Sn=require("@mux/mux-video");var Ss="en",Me={code:Ss};var pn="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=Me)==null?void 0:r[i])!=null?n:i,a=e?Me.code:pn;return new Sa(t,a)}var Sa=class{constructor(e,t=(a=>(a=Me.code)!=null?a:pn)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,a)=>{var r;return(r=e[a])!=null?r:""})}toString(){return this.message}};function bn(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${Ls(t)}: ${a}; `)}),e?e.trim():void 0}function Ls(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function En(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function re(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function si(i){let e=Cs(i).toString();return e?"?"+e:""}function Cs(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function he(i){let e=(i!=null?i:"").split(".")[1];if(!e)return{};let t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}var La=(i,e)=>!i||!e?!1:i.contains(e)?!0:La(i,e.getRootNode().host);var bt=require("@mux/playback-core");var Ca="mux.com",ws=()=>{try{return"1.5.0"}catch{}return"UNKNOWN"},Ds=ws(),di=()=>Ds,wa=(i,{token:e,domain:t=Ca}={})=>`https://stream.${t}/${i}.m3u8${si(!!e?{token:e}:{redundant_streams:!0})}`,gn=(i,{token:e,thumbnailTime:t,domain:a=Ca}={})=>{let r=e==null?t:void 0,{aud:n}=he(e);if(!(e&&n!=="t"))return`https://image.${a}/${i}/thumbnail.jpg${si({token:e,time:r})}`},An=(i,{token:e,domain:t=Ca}={})=>{let{aud:a}=he(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${si({token:e})}`};var xs={crossorigin:"crossOrigin",playsinline:"playsInline"};function _n(i){var e;return(e=xs[i])!=null?e:En(i)}var yn=i=>{var t,a;let{media:e}=i;return(a=(t=e==null?void 0:e._hls)==null?void 0:t.liveSyncPosition)!=null?a:e!=null&&e.seekable.length?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Da=i=>{let e=yn(i);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}i.currentTime=e},Rs=1,Ps=5,fn=3,vn=.5,Tn=i=>{var n;let{streamType:e}=i,t=yn(i),a=(n=i.media)==null?void 0:n.currentTime;if(t==null||a==null)return!1;let r=t-a;return e===bt.StreamTypes.LL_LIVE||e===bt.StreamTypes.LL_DVR?r<=Rs*(fn+vn):e===bt.StreamTypes.LIVE||e===bt.StreamTypes.DVR?r<=Ps*(fn+vn):!1},ke,Se,W,li=class{constructor(e,t){I(this,ke,void 0);I(this,Se,void 0);I(this,W,[]);V(this,ke,e),V(this,Se,t)}[Symbol.iterator](){return v(this,W).values()}get length(){return v(this,W).length}get value(){var e;return(e=v(this,W).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(V(this,W,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return v(this,W)[e]}values(){return v(this,W).values()}keys(){return v(this,W).keys()}forEach(e){v(this,W).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||v(this,W).push(r)}),!(this.value===""&&!((t=v(this,ke))!=null&&t.hasAttribute(`${v(this,Se)}`)))&&((a=v(this,ke))==null||a.setAttribute(`${v(this,Se)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{v(this,W).splice(v(this,W).indexOf(a),1)}),(t=v(this,ke))==null||t.setAttribute(`${v(this,Se)}`,`${this.value}`)}contains(e){return v(this,W).includes(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};ke=new WeakMap,Se=new WeakMap,W=new WeakMap;var In=`[mux-player ${di()}]`;function pe(...i){console.warn(In,...i)}function J(...i){console.error(In,...i)}function ui(i){var t;let e=(t=i.message)!=null?t:"";if(i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
|
|
741
|
+
${a}${i.file}`}pe(e)}var $={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Le={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},kn=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),Us=Sn.VideoEvents.filter(i=>i!=="error"),Os=Object.values($).filter(i=>![$.PLAYSINLINE].includes(i)),Ns=Object.values(Le);function Ln(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),Us.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var xa=class extends D.HTMLElement{static get observedAttributes(){return[...Os,...Ns]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(a=>{var r;(r=this.media)==null||r.append(a.cloneNode())});let e=a=>{for(let r of a)r.type==="childList"&&(r.removedNodes.forEach(n=>{var l,c;let s=(l=this.media)==null?void 0:l.querySelector(`track[src="${n.src}"]`);s&&((c=this.media)==null||c.removeChild(s))}),r.addedNodes.forEach(n=>{var s;(s=this.media)==null||s.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,a){var r,n;switch(e){case Le.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Le.VOLUME:{let s=(r=re(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Le.PLAYBACKRATE:{let s=(n=re(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get paused(){var e,t;return(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:kn}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:kn}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=re(this.getAttribute(Le.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Le.PLAYBACKRATE,`${e}`):this.removeAttribute(Le.PLAYBACKRATE)}get crossOrigin(){return Et(this,$.CROSSORIGIN)}set crossOrigin(e){this.setAttribute($.CROSSORIGIN,`${e}`)}get autoplay(){return Et(this,$.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute($.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute($.AUTOPLAY)}get loop(){return Et(this,$.LOOP)!=null}set loop(e){e?this.setAttribute($.LOOP,""):this.removeAttribute($.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=Boolean(e))}get defaultMuted(){return Et(this,$.MUTED)!=null}set defaultMuted(e){e?this.setAttribute($.MUTED,""):this.removeAttribute($.MUTED)}get playsInline(){return Et(this,$.PLAYSINLINE)!=null}set playsInline(e){J("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute($.PRELOAD,e):this.removeAttribute($.PRELOAD)}};function Et(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Ra=xa;var Bs=Object.defineProperty,$s=(i,e,t)=>e in i?Bs(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Vs=(i,e,t)=>($s(i,typeof e!="symbol"?e+"":e,t),t),Rn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>(Rn(i,e,"read from private field"),t?t.call(i):e.get(i)),ee=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ne=(i,e,t,a)=>(Rn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ke,ci,Ce,ft,be,Ee,fe,we,Ye,mi,z,Cn=1,wn=0,Hs=1,Ws={processCallback(i,e,t){if(!!t){for(let[a,r]of e)if(a in t){let n=t[a];typeof n=="boolean"&&r instanceof Y&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof Y?r.element[r.attributeName]=n:r.value=n}}}},oe=class extends u.DocumentFragment{constructor(e,t,a=Ws){var r;super(),ee(this,Ke,void 0),ee(this,ci,void 0),this.append(e.content.cloneNode(!0)),ne(this,Ke,Pn(this)),ne(this,ci,a),(r=a.createCallback)==null||r.call(a,this,_(this,Ke),t),a.processCallback(this,_(this,Ke),t)}update(e){_(this,ci).processCallback(this,_(this,Ke),e)}};Ke=new WeakMap;ci=new WeakMap;var Pn=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new Pa;for([t,a]of xn(r.value))if(!t)n.append(a);else{let s=new Y(i,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of i.childNodes)if(r.nodeType===Cn&&!(r instanceof HTMLTemplateElement))Pn(r,e);else if(r.nodeType===Cn||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of xn(r.data))if(!t)n.push(new Text(a));else{let s=new se(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new vt(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},Dn={},xn=i=>{let e="",t=0,a=Dn[i],r=0,n;if(a)return a;for(a=[];n=i[r];r++)n==="{"&&i[r+1]==="{"&&i[r-1]!=="\\"&&i[r+2]&&++t==1?(e&&a.push([wn,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([Hs,e.trim()]),e="",r++):e+=n||"";return e&&a.push([wn,(t>0?"{{":"")+e]),Dn[i]=a},Fs=11,hi=class{get value(){return""}set value(e){}toString(){return this.value}},Un=new WeakMap,Pa=class{constructor(){ee(this,Ce,[])}[Symbol.iterator](){return _(this,Ce).values()}get length(){return _(this,Ce).length}item(e){return _(this,Ce)[e]}append(...e){for(let t of e)t instanceof Y&&Un.set(t,this),_(this,Ce).push(t)}toString(){return _(this,Ce).join("")}};Ce=new WeakMap;var Y=class extends hi{constructor(e,t,a){super(),ee(this,we),ee(this,ft,""),ee(this,be,void 0),ee(this,Ee,void 0),ee(this,fe,void 0),ne(this,be,e),ne(this,Ee,t),ne(this,fe,a)}get attributeName(){return _(this,Ee)}get attributeNamespace(){return _(this,fe)}get element(){return _(this,be)}get value(){return _(this,ft)}set value(e){_(this,ft)!==e&&(ne(this,ft,e),!_(this,we,Ye)||_(this,we,Ye).length===1?e==null?_(this,be).removeAttributeNS(_(this,fe),_(this,Ee)):_(this,be).setAttributeNS(_(this,fe),_(this,Ee),e):_(this,be).setAttributeNS(_(this,fe),_(this,Ee),_(this,we,Ye)))}get booleanValue(){return _(this,be).hasAttributeNS(_(this,fe),_(this,Ee))}set booleanValue(e){if(!_(this,we,Ye)||_(this,we,Ye).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};ft=new WeakMap;be=new WeakMap;Ee=new WeakMap;fe=new WeakMap;we=new WeakSet;Ye=function(){return Un.get(this)};var se=class extends hi{constructor(e,t){super(),ee(this,mi,void 0),ee(this,z,void 0),ne(this,mi,e),ne(this,z,t?[...t]:[new Text])}get replacementNodes(){return _(this,z)}get parentNode(){return _(this,mi)}get nextSibling(){return _(this,z)[_(this,z).length-1].nextSibling}get previousSibling(){return _(this,z)[0].previousSibling}get value(){return _(this,z).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===Fs?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text("")),_(this,z)[0].before(...t);for(let a of _(this,z))t.includes(a)||a.remove();ne(this,z,t)}};mi=new WeakMap;z=new WeakMap;var vt=class extends se{constructor(e,t){let a=t.getAttribute("directive")||t.getAttribute("type"),r=t.getAttribute("expression")||t.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),Vs(this,"directive"),this.expression=r,this.template=t,this.directive=a}};var Ks=/([>&])?\s*(\w+)\s*(.*)/,Ys=/^(\?\?|\|)?\s*(['"\w]*)/,Gs={"|":{string:i=>String(i)},"??":(i,e)=>i!=null?i:e},pi=class{constructor(e){this.template=e}},Oa={partial:(i,e)=>{e[i.expression]=new pi(i.template)},if:(i,e)=>{Qs(i.expression,e)?i.replace(new oe(i.template,e,bi)):i.replace("")}},Zs=Object.keys(Oa),bi={processCallback(i,e,t){var a,r,n;if(!!t)for(let[s,l]of e){if(l instanceof vt){if(!l.directive){let M=Zs.find(R=>l.template.hasAttribute(R));M&&(l.directive=M,l.expression=l.template.getAttribute(M))}(a=Oa[l.directive])==null||a.call(Oa,l,t);continue}let[,c,m,E]=(r=s.match(Ks))!=null?r:[],f=t[m],[,w,T]=(n=E.match(Ys))!=null?n:[],P=Gs[w];if(typeof P=="function")f=P(f,gt(T,t));else if(P&&f!=null){let M=P[T];M&&(f=M(f))}if(f){if(f instanceof pi){if(c!==">")continue;let M={...t},R=s.matchAll(/(\w+)\s*=\s*(['"\w]*)/g);for(let[,L,G]of R)M[L]=gt(G,t);f=new oe(f.template,M,bi)}l instanceof Y&&l.attributeName.startsWith("aria-")&&(f=String(f)),l instanceof Y?typeof f=="boolean"?l.booleanValue=f:typeof f=="function"?l.element[l.attributeName]=f:l.value=f:l.value=f}else l instanceof Y&&(l.booleanValue=!1)}}},qs={"==":(i,e)=>i==e,"!=":(i,e)=>i!=e};function Qs(i,e){var t;let a=zs(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=]=/,ws:/\s+/,param:/[$a-z_][$\w]*/i});if(a.length===0||a.some(({type:n})=>!n))return console.warn(`Warning: invalid expression \`${i}\``),!1;if(a.length===1)return Ua(a[0])?gt(a[0].token,e):(console.warn(`Warning: invalid expression \`${i}\``),!1);let r=a.filter(({type:n})=>n!=="ws");if(r.length===3){let n=qs[(t=r[1])==null?void 0:t.token];return!n||!Ua(r[0])||!Ua(r[2])?(console.warn(`Warning: invalid expression \`${i}\``),!1):n(gt(r[0].token,e),gt(r[2].token,e))}}function Ua({type:i}){return["number","boolean","string","param"].includes(i)}function gt(i,e){let t=i[0],a=i.slice(-1);return i==="true"||i==="false"?i==="true":t===a&&["'",'"'].includes(t)?i.slice(1,-1):or(i)?parseFloat(i):e[i]}function zs(i,e){let t,a,r,n=[];for(;i;){r=null,t=i.length;for(let s in e)a=e[s].exec(i),a&&a.index<t&&(r={token:a[0],type:s,matches:a.slice(1)},t=a.index);t&&n.push({token:i.substr(0,t),type:void 0}),r&&n.push(r),i=i.substr(t+(r?r.token.length:0))}return n}var Xs=Object.defineProperty,js=(i,e,t)=>e in i?Xs(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,At=(i,e,t)=>(js(i,typeof e!="symbol"?e+"":e,t),t),$n=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},On=(i,e,t)=>($n(i,e,"read from private field"),t?t.call(i):e.get(i)),Nn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Bn=(i,e,t,a)=>($n(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ei,fi,Ge=class extends u.HTMLElement{constructor(){super(),At(this,"renderRoot"),At(this,"renderer"),Nn(this,Ei,void 0),Nn(this,fi,void 0),this.renderRoot=this.attachShadow({mode:"open"}),new MutationObserver(()=>this.render()).observe(this,{attributes:!0}),this.createRenderer()}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e,t;let a=this.getAttribute("template");if(a){let r=(e=this.getRootNode())==null?void 0:e.getElementById(a);if(r)return r}return(t=On(this,Ei))!=null?t:this.constructor.template}set template(e){Bn(this,Ei,e),this.createRenderer()}get props(){let e={};for(let t of this.attributes)t.value!=null?e[Ui(t.name)]=t.value===""?!0:t.value:e[Ui(t.name)]=!1;return e}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&this.createRenderer()}createRenderer(){this.template&&this.template!==On(this,fi)&&(Bn(this,fi,this.template),this.renderer=new oe(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};Ei=new WeakMap;fi=new WeakMap;At(Ge,"template");At(Ge,"observedAttributes",["template"]);At(Ge,"processor",bi);h("media-theme",Ge);var Hn=`
|
|
742
742
|
:host {
|
|
743
743
|
cursor: pointer;
|
|
744
744
|
}
|
|
745
745
|
media-time-display {
|
|
746
746
|
color: inherit;
|
|
747
747
|
}
|
|
748
|
-
`,
|
|
748
|
+
`,Wn=H.createElement("template");Wn.innerHTML=`
|
|
749
749
|
<style>
|
|
750
|
-
${
|
|
750
|
+
${Hn}
|
|
751
751
|
</style>
|
|
752
752
|
<media-time-display show-duration></media-time-display>
|
|
753
|
-
`;var
|
|
754
|
-
--secondary-color: transparent;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
:host {
|
|
758
|
-
--_primary-color: var(--primary-color, #fff);
|
|
759
|
-
|
|
760
|
-
--media-icon-color: var(--_primary-color);
|
|
761
|
-
--media-range-thumb-background: var(--_primary-color);
|
|
762
|
-
--media-range-bar-color: var(--_primary-color);
|
|
763
|
-
--media-control-background: var(--secondary-color);
|
|
764
|
-
--media-control-hover-background: var(--secondary-color);
|
|
765
|
-
--media-time-buffered-color: rgba(255, 255, 255, 0.4);
|
|
766
|
-
--media-range-track-background: rgba(255, 255, 255, 0.5);
|
|
767
|
-
--media-range-track-border-radius: 3px;
|
|
768
|
-
--media-preview-thumbnail-border: 1px solid #fff;
|
|
769
|
-
--media-preview-thumbnail-border-radius: 2px;
|
|
770
|
-
--media-preview-time-margin: 5px 0 2px;
|
|
771
|
-
color: var(--_primary-color);
|
|
772
|
-
display: inline-block;
|
|
773
|
-
width: 100%;
|
|
774
|
-
height: 100%;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
:host(.two-tone:not([audio])) {
|
|
778
|
-
--mux-time-range-padding: 0px; /* px is needed in calc() */
|
|
779
|
-
--media-preview-thumbnail-border: 0;
|
|
780
|
-
--media-preview-thumbnail-border-radius: 2px 2px 0 0;
|
|
781
|
-
--media-preview-time-border-radius: 0 0 2px 2px;
|
|
782
|
-
--media-preview-time-margin: 0 0 8px;
|
|
783
|
-
--media-preview-time-text-shadow: none;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
:host([audio]) {
|
|
787
|
-
--media-preview-time-border-radius: 3px;
|
|
788
|
-
--media-preview-time-margin: 0 0 5px;
|
|
789
|
-
--media-preview-time-text-shadow: none;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
:host(.two-tone:not([audio])) media-time-range {
|
|
793
|
-
--media-range-track-border-radius: 0;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
:host([audio]) ::slotted([slot='media']) {
|
|
797
|
-
height: 0px;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
:host([audio]) :is(media-poster-image, media-loading-indicator) {
|
|
801
|
-
display: none;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
:host([audio]) media-controller {
|
|
805
|
-
background: transparent;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
:host([audio]) media-controller::part(vertical-layer) {
|
|
809
|
-
background: transparent;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
:host([audio]) media-control-bar {
|
|
813
|
-
width: 100%;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
[disabled],
|
|
817
|
-
[aria-disabled='true'] {
|
|
818
|
-
opacity: 60%;
|
|
819
|
-
cursor: not-allowed;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
media-captions-button:not(:is([media-captions-list], [media-subtitles-list])) {
|
|
823
|
-
--captions-button: none;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
media-volume-range[media-volume-unavailable] {
|
|
827
|
-
--volume-range: none;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
media-airplay-button[media-airplay-unavailable] {
|
|
831
|
-
--airplay-button: none;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
media-fullscreen-button[media-fullscreen-unavailable] {
|
|
835
|
-
--fullscreen-button: none;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
media-cast-button[media-cast-unavailable] {
|
|
839
|
-
--cast-button: none;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
media-pip-button[media-pip-unavailable] {
|
|
843
|
-
--pip-button: none;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
media-controller {
|
|
847
|
-
width: 100%;
|
|
848
|
-
height: 100%;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
:host media-time-range {
|
|
852
|
-
color: var(--_primary-color);
|
|
853
|
-
--media-range-thumb-opacity: 0;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
:host(:not([audio])) media-time-range {
|
|
857
|
-
--media-range-padding-left: var(--mux-time-range-padding, 10px);
|
|
858
|
-
--media-range-padding-right: var(--mux-time-range-padding, 10px);
|
|
859
|
-
--media-range-padding: 0;
|
|
860
|
-
z-index: 10;
|
|
861
|
-
height: 10px;
|
|
862
|
-
bottom: -3px;
|
|
863
|
-
background: linear-gradient(
|
|
864
|
-
180deg,
|
|
865
|
-
transparent,
|
|
866
|
-
transparent 3px,
|
|
867
|
-
var(--media-control-background, rgba(20, 20, 30, 0.7)) 3px,
|
|
868
|
-
var(--media-control-background, rgba(20, 20, 30, 0.7)) 7px,
|
|
869
|
-
transparent 7px,
|
|
870
|
-
transparent
|
|
871
|
-
);
|
|
872
|
-
width: 100%;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
media-control-bar {
|
|
876
|
-
--media-control-padding: 9px 7px;
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
.size-small media-control-bar {
|
|
880
|
-
--media-control-padding: 9px 5px;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
.size-extra-small media-control-bar {
|
|
884
|
-
--media-control-padding: 4px 3px;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
media-control-bar :is([role='button'], [role='switch'], button) {
|
|
888
|
-
line-height: 0;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
media-control-bar :is(media-text-display, mxp-time-display):first-child {
|
|
892
|
-
--media-control-padding: 9px 5px 9px 10px;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
.spacer {
|
|
896
|
-
flex-grow: 1;
|
|
897
|
-
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
/* Add a small space on the right to have the play button and
|
|
901
|
-
* fullscreen button aligned in relation to the progress bar. */
|
|
902
|
-
media-control-bar:not([slot])::after {
|
|
903
|
-
content: '';
|
|
904
|
-
width: 2px;
|
|
905
|
-
height: 100%;
|
|
906
|
-
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
media-control-bar[slot='top-chrome'] {
|
|
910
|
-
min-height: 42px;
|
|
911
|
-
pointer-events: none;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
:host([title]) media-control-bar[slot='top-chrome']::before {
|
|
915
|
-
content: '';
|
|
916
|
-
position: absolute;
|
|
917
|
-
width: 100%;
|
|
918
|
-
padding-bottom: min(160px, 25%);
|
|
919
|
-
background: linear-gradient(rgb(0 0 0 / 0.4), transparent);
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
media-control-bar[slot='top-chrome'] > * {
|
|
923
|
-
--media-control-background: transparent;
|
|
924
|
-
--media-control-hover-background: transparent;
|
|
925
|
-
position: relative;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
media-controller::part(vertical-layer) {
|
|
929
|
-
transition: background-color 1s;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
media-controller:is([media-paused], :not([user-inactive]))::part(vertical-layer) {
|
|
933
|
-
background-color: var(--controls-backdrop-color, var(--controls, transparent));
|
|
934
|
-
transition: background-color 0.25s;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
.center-controls {
|
|
938
|
-
--media-button-icon-width: 100%;
|
|
939
|
-
--media-button-icon-height: auto;
|
|
940
|
-
pointer-events: none;
|
|
941
|
-
width: 100%;
|
|
942
|
-
display: flex;
|
|
943
|
-
flex-flow: row;
|
|
944
|
-
align-items: center;
|
|
945
|
-
justify-content: center;
|
|
946
|
-
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
947
|
-
paint-order: stroke;
|
|
948
|
-
stroke: rgba(102, 102, 102, 1);
|
|
949
|
-
stroke-width: 0.3px;
|
|
950
|
-
text-shadow: 0 0 2px rgb(0 0 0 / 0.25), 0 0 6px rgb(0 0 0 / 0.25);
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
.center-controls media-play-button {
|
|
954
|
-
--media-control-background: transparent;
|
|
955
|
-
--media-control-hover-background: transparent;
|
|
956
|
-
padding: 0;
|
|
957
|
-
width: max(43px, min(10%, 55px));
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
.center-controls media-seek-backward-button,
|
|
961
|
-
.center-controls media-seek-forward-button {
|
|
962
|
-
--media-control-background: transparent;
|
|
963
|
-
--media-control-hover-background: transparent;
|
|
964
|
-
padding: 0;
|
|
965
|
-
margin: 0 2%;
|
|
966
|
-
width: max(33px, min(8%, 40px));
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
media-control-bar:not([slot]) media-seek-backward-button {
|
|
970
|
-
padding-right: 5px;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
media-control-bar:not([slot]) media-seek-forward-button {
|
|
974
|
-
padding-left: 5px;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
media-loading-indicator {
|
|
978
|
-
--media-loading-icon-width: 100%;
|
|
979
|
-
--media-button-icon-height: auto;
|
|
980
|
-
pointer-events: none;
|
|
981
|
-
position: absolute;
|
|
982
|
-
width: min(15%, 150px);
|
|
983
|
-
display: flex;
|
|
984
|
-
flex-flow: row;
|
|
985
|
-
align-items: center;
|
|
986
|
-
justify-content: center;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
/* Intentionally don't target the div for transition but the children
|
|
990
|
-
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
991
|
-
media-loading-indicator + div * {
|
|
992
|
-
transition: opacity 0.15s;
|
|
993
|
-
opacity: 1;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
media-loading-indicator[media-loading]:not([media-paused]) ~ div > * {
|
|
997
|
-
opacity: 0;
|
|
998
|
-
transition-delay: 400ms;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
media-volume-range {
|
|
1002
|
-
width: min(100%, 100px);
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
media-time-display {
|
|
1006
|
-
white-space: nowrap;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
:is(media-time-display, media-text-display, media-playback-rate-button[role='button']) {
|
|
1010
|
-
color: inherit;
|
|
1011
|
-
line-height: 24px;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
.title-display {
|
|
1015
|
-
font-size: 16px;
|
|
1016
|
-
text-shadow: 0 0 2px rgb(0 0 0 / 0.6);
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
:host([audio]) .title-display {
|
|
1020
|
-
flex-grow: 1;
|
|
1021
|
-
font-size: 21px;
|
|
1022
|
-
}
|
|
1023
|
-
`;var Hn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="airplay">
|
|
1024
|
-
<path d="M13.19 14.22a.25.25 0 0 0-.38 0l-5.46 6.37a.25.25 0 0 0 .19.41h10.92a.25.25 0 0 0 .19-.41l-5.46-6.37Z"/>
|
|
1025
|
-
<path d="M22 3H4a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h2.94L8 16.75H4.25V4.25h17.5v12.5H18L19.06 18H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"/>
|
|
1026
|
-
</svg>
|
|
1027
|
-
`;var Wn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="off">
|
|
1028
|
-
<path d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-1.81-.12-4.67-.18-7.53-.18-2.86 0-5.72.06-7.53.18a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c1.81.12 4.67.18 7.53.18 2.86 0 5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.137-.21-8.283 0-12.42a1.11 1.11 0 0 1 .91-1.11c1.67-.11 4.43-.18 7.43-.18s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.137.21 8.283 0 12.42ZM10.843 14a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.099 2.099 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42c.23-.103.479-.158.73-.16.241-.004.48.044.7.14.199.088.373.222.51.39l1.08-.89a2.179 2.179 0 0 0-.47-.44 2.81 2.81 0 0 0-.54-.32 2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0 4.08 4.08 0 0 0-1.38.15 3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06c.316.293.687.52 1.09.67.443.16.91.238 1.38.23a3.2 3.2 0 0 0 1.28-.27c.401-.183.747-.47 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18 1.54 1.54 0 0 1-.7-.18 1.69 1.69 0 0 1-.57-.42 2.12 2.12 0 0 1-.43-.58 2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58c.241-.003.48.045.7.14.199.088.373.222.51.39l1.08-.92a2.43 2.43 0 0 0-.47-.44 3.22 3.22 0 0 0-.53-.29 2.999 2.999 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0 4.06 4.06 0 0 0-1.36.15 3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38c.16.402.405.764.72 1.06a3.17 3.17 0 0 0 1.09.67c.44.16.904.237 1.37.23.441 0 .877-.092 1.28-.27a2.45 2.45 0 0 0 1-.83l-1.15-.85a1.49 1.49 0 0 1-.54.49Z"/>
|
|
1029
|
-
</svg>
|
|
1030
|
-
`;var Fn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="on">
|
|
1031
|
-
<path d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.41 10.1a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 4 4 0 0 1-1.28-.83 3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.53 3.53 0 0 1 .84-1.21 3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 1.35.24c.225.091.44.205.64.34a2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1c-.009.34.046.68.16 1 .104.283.26.545.46.77.188.21.415.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 1.35.24c.225.091.44.205.64.34.21.144.395.32.55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.352 2.352 0 0 0-.46.77 3.01 3.01 0 0 0-.16 1c-.003.34.05.678.16 1 .108.282.263.542.46.77.188.21.416.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"/>
|
|
1032
|
-
</svg>
|
|
1033
|
-
`;var Kn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
1034
|
-
<path d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z"/>
|
|
1035
|
-
<path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z"/>
|
|
1036
|
-
<path d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"/>
|
|
1037
|
-
</svg>
|
|
1038
|
-
`;var Yn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
1039
|
-
<path d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z"/>
|
|
1040
|
-
<path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z"/>
|
|
1041
|
-
<path d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"/>
|
|
1042
|
-
<path d="M20.5 5.5h-15v5.811c3.52.906 6.283 3.67 7.189 7.19H20.5V5.5Z"/>
|
|
1043
|
-
</svg>
|
|
1044
|
-
`;var Gn=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="enter">
|
|
1045
|
-
<path d="M20.25 14.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 1 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM8.75 19.5H4.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 1 0 0-1.5Zm0-16.5h-5a.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V4.5h4.25a.76.76 0 0 0 .75-.75.76.76 0 0 0-.75-.75Z"/>
|
|
1046
|
-
</svg>
|
|
1047
|
-
`;var Zn=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="exit">
|
|
1048
|
-
<path d="M20.25 14.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 1 0 1.5 0V16h4.25a.75.75 0 1 0 0-1.5Zm-5-5h5a.75.75 0 1 0 0-1.5H16V3.75a.75.75 0 1 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 1 0 0 1.5H8v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5a.76.76 0 0 0-.75.75V8H3.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 8.75 3Z"/>
|
|
1049
|
-
</svg>
|
|
1050
|
-
`;var Qn=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="pause">
|
|
1051
|
-
<path d="M6 19.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v15ZM14.5 4a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3Z"/>
|
|
1052
|
-
</svg>
|
|
1053
|
-
`;var qn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
1054
|
-
<path d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"/>
|
|
1055
|
-
</svg>
|
|
1056
|
-
`;var zn=`<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
1057
|
-
<path d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"/>
|
|
1058
|
-
</svg>
|
|
1059
|
-
`;var jn=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="play">
|
|
1060
|
-
<path d="m6.73 20.93 14.05-8.54a.46.46 0 0 0 0-.78L6.73 3.07a.48.48 0 0 0-.73.39v17.07a.48.48 0 0 0 .73.4Z"/>
|
|
1061
|
-
</svg>
|
|
1062
|
-
`;var Xn=`<svg aria-hidden="true" viewBox="0 0 22 24" slot="backward">
|
|
1063
|
-
<path d="M11 6V3L5.37 7 11 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 11 6Z"/>
|
|
1064
|
-
<text
|
|
1065
|
-
class="value"
|
|
1066
|
-
transform="translate(2.5 21)"
|
|
1067
|
-
style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
|
|
1068
|
-
>
|
|
1069
|
-
{{value}}
|
|
1070
|
-
</text>
|
|
1071
|
-
</svg>
|
|
1072
|
-
`;var Jn=`<svg aria-hidden="true" viewBox="0 0 22 24" slot="forward">
|
|
1073
|
-
<path d="M11 6V3l5.61 4L11 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 11 6Z"/>
|
|
1074
|
-
<text
|
|
1075
|
-
class="value"
|
|
1076
|
-
transform="translate(10 21)"
|
|
1077
|
-
style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
|
|
1078
|
-
>
|
|
1079
|
-
{{value}}
|
|
1080
|
-
</text>
|
|
1081
|
-
</svg>
|
|
1082
|
-
`;var eo=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="high">
|
|
1083
|
-
<path d="m11.14 4.86-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.21a.5.5 0 0 0-.86-.35Zm2.74-1.56v1.52A7.52 7.52 0 0 1 19.47 12a7.52 7.52 0 0 1-5.59 7.18v1.52A9 9 0 0 0 21 12a9 9 0 0 0-7.12-8.7Zm3.56 8.7a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"/>
|
|
1084
|
-
</svg>
|
|
1085
|
-
`;var to=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="low">
|
|
1086
|
-
<path d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"/>
|
|
1087
|
-
</svg>
|
|
1088
|
-
`;var io=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="medium">
|
|
1089
|
-
<path d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"/>
|
|
1090
|
-
</svg>
|
|
1091
|
-
`;var ao=`<svg aria-hidden="true" viewBox="0 0 24 24" slot="off">
|
|
1092
|
-
<path d="m3 4.05 4.48 4.47-.33.33a.49.49 0 0 1-.36.15H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.48.48 0 0 0 .36.15.5.5 0 0 0 .5-.5v-5.75l4.67 4.66a7.71 7.71 0 0 1-2.79 1.47v1.52a9.32 9.32 0 0 0 3.87-1.91L20 21l1-1L4.06 3 3 4.05Zm5.36 5.36 2.39 2.39V17L8 14.26a1.74 1.74 0 0 0-1.24-.51H4.25v-3.5h2.54A1.74 1.74 0 0 0 8 9.74l.36-.33ZM19.47 12a7.19 7.19 0 0 1-.89 3.47l1.11 1.1A8.64 8.64 0 0 0 21 12a9 9 0 0 0-7.12-8.7v1.52A7.52 7.52 0 0 1 19.47 12ZM12 8.88V5.21a.5.5 0 0 0-.5-.5.48.48 0 0 0-.36.15L9.56 6.44 12 8.88ZM15.91 12a4.284 4.284 0 0 1-.07.72l1.22 1.22a5.2 5.2 0 0 0 .38-1.94 5.49 5.49 0 0 0-3.56-5.1v1.66A4 4 0 0 1 15.91 12Z"/>
|
|
1093
|
-
</svg>
|
|
1094
|
-
`;var ro=()=>D(Hn),no=()=>D(Wn),oo=()=>D(Fn),so=()=>D(Kn),lo=()=>D(Yn),co=()=>D(Gn),uo=()=>D(Zn),mo=()=>D(Qn),ho=()=>D(qn),po=()=>D(zn),bo=()=>D(jn),Eo=t=>D(Xn,t),fo=t=>D(Jn,t),go=()=>D(eo),vo=()=>D(to),Ao=()=>D(io),_o=()=>D(ao);var V=require("@mux/playback-core");var se={LG:"large",SM:"small",XS:"extra-small"},mi,yo,ui=class extends va{constructor(){super();T(this,mi);I(this,mi,yo).call(this)}static get observedAttributes(){return["audio","has-open-dialog","has-src","nohotkeys","hotkeys","stream-type","player-size","default-hidden-captions","forward-seek-offset","backward-seek-offset","playbackrates","default-show-remaining-time","poster","placeholder","title"]}attributeChangedCallback(){this.render()}render(){var a,r,n;let e={hasSrc:this.hasAttribute("has-src"),isDialogOpen:this.hasAttribute("has-open-dialog"),audio:this.hasAttribute("audio"),nohotkeys:this.hasAttribute("nohotkeys"),hotkeys:this.getAttribute("hotkeys"),streamType:this.getAttribute("stream-type"),playerSize:this.getAttribute("player-size"),defaultHiddenCaptions:this.hasAttribute("default-hidden-captions"),forwardSeekOffset:this.getAttribute("forward-seek-offset"),backwardSeekOffset:this.getAttribute("backward-seek-offset"),playbackRates:this.getAttribute("playbackrates"),defaultShowRemainingTime:this.hasAttribute("default-show-remaining-time"),poster:this.getAttribute("poster"),placeholder:this.getAttribute("placeholder"),title:this.getAttribute("title")};e.nohotkeys=e.nohotkeys||!e.hasSrc||e.isDialogOpen,[V.StreamTypes.LIVE,V.StreamTypes.LL_LIVE,V.StreamTypes.DVR,V.StreamTypes.LL_DVR].includes(e.streamType)&&(e.hotkeys=e.hotkeys||"",e.hotkeys+=" noarrowleft noarrowright"),di(b`
|
|
1095
|
-
<style>
|
|
1096
|
-
${Vn}
|
|
1097
|
-
</style>
|
|
1098
|
-
<media-controller
|
|
1099
|
-
gestures-disabled="${!e.hasSrc||e.isDialogOpen}"
|
|
1100
|
-
hotkeys="${e.hotkeys||!1}"
|
|
1101
|
-
nohotkeys="${e.nohotkeys||!1}"
|
|
1102
|
-
audio="${e.audio||!1}"
|
|
1103
|
-
class="size-${e.playerSize}"
|
|
1104
|
-
exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
|
|
1105
|
-
>
|
|
1106
|
-
<slot name="media" slot="media"></slot>
|
|
1107
|
-
<media-poster-image
|
|
1108
|
-
slot="poster"
|
|
1109
|
-
part="poster"
|
|
1110
|
-
src="${(a=e.poster)!=null?a:!1}"
|
|
1111
|
-
placeholder-src="${(r=e.placeholder)!=null?r:!1}"
|
|
1112
|
-
></media-poster-image>
|
|
1113
|
-
<media-loading-indicator slot="centered-chrome" no-auto-hide></media-loading-indicator>
|
|
1114
|
-
${$l(e)}
|
|
1115
|
-
<slot></slot>
|
|
1116
|
-
</media-controller>
|
|
1117
|
-
`,this.shadowRoot),(n=this.shadowRoot)==null||n.querySelectorAll("*").forEach(s=>{if(!s.localName.includes("-"))return;let l=s.localName.match(/^([^-]+)-(.*)-(button|range|display)$/);if(!l)return;let[,,c,m]=l;c==="text"&&s.classList.contains("title-display")&&(c="title");let f=s.closest('[slot="top-chrome"]')?"top":s.closest('[slot="centered-chrome"]')?"center":"bottom";s.setAttribute("part",`${f} ${c} ${m}`)})}};mi=new WeakSet,yo=function(){var e,a;try{(e=window==null?void 0:window.CSS)==null||e.registerProperty({name:"--primary-color",syntax:"<color>",inherits:!0,initialValue:"white"}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--secondary-color",syntax:"<color>",inherits:!0,initialValue:"transparent"})}catch{}};k.customElements.get("media-theme-mux")||k.customElements.define("media-theme-mux",ui);var $l=t=>{let{streamType:i,playerSize:e,audio:a}=t;if(a)switch(i){case V.StreamTypes.LIVE:case V.StreamTypes.LL_LIVE:return Hl(t);case V.StreamTypes.DVR:case V.StreamTypes.LL_DVR:return Vl(t);case V.StreamTypes.ON_DEMAND:default:return Bl(t)}switch(i){case V.StreamTypes.LIVE:case V.StreamTypes.LL_LIVE:switch(e){case se.LG:return Zl(t);case se.SM:return Gl(t);case se.XS:return Yl(t)}case V.StreamTypes.DVR:case V.StreamTypes.LL_DVR:switch(e){case se.LG:return zl(t);case se.SM:return ql(t);case se.XS:return Ql(t)}case V.StreamTypes.ON_DEMAND:default:switch(e){case se.LG:return Kl(t);case se.SM:return Fl(t);case se.XS:return Wl(t)}}},H=t=>b`
|
|
1118
|
-
<media-play-button disabled="${!t.hasSrc||t.isDialogOpen}" aria-disabled="${!t.hasSrc||t.isDialogOpen&&"true"}">
|
|
1119
|
-
${bo()}
|
|
1120
|
-
${mo()}
|
|
1121
|
-
</media-play-button>`,qe=({backwardSeekOffset:t,hasSrc:i,isDialogOpen:e})=>b`
|
|
1122
|
-
<media-seek-backward-button seek-offset="${t}" disabled="${!i||e}" aria-disabled="${!i||e&&"true"}">
|
|
1123
|
-
${Eo({value:t})}
|
|
1124
|
-
</media-seek-backward-button>`,ze=({forwardSeekOffset:t,hasSrc:i,isDialogOpen:e})=>b`
|
|
1125
|
-
<media-seek-forward-button seek-offset="${t}" disabled="${!i||e}" aria-disabled="${!i||e&&"true"}">
|
|
1126
|
-
${fo({value:t})}
|
|
1127
|
-
</media-seek-forward-button>`,Y=({isDialogOpen:t})=>b`
|
|
1128
|
-
<media-mute-button disabled="${t}" aria-disabled="${t&&"true"}">
|
|
1129
|
-
${go()}
|
|
1130
|
-
${Ao()}
|
|
1131
|
-
${vo()}
|
|
1132
|
-
${_o()}
|
|
1133
|
-
</media-mute-button>`,le=({defaultHiddenCaptions:t,isDialogOpen:i})=>b`
|
|
1134
|
-
<media-captions-button default-showing="${!t}" disabled="${i}" aria-disabled="${i&&"true"}">
|
|
1135
|
-
${no()}
|
|
1136
|
-
${oo()}
|
|
1137
|
-
</media-captions-button>`,de=t=>b`
|
|
1138
|
-
<media-airplay-button disabled="${!t.hasSrc||t.isDialogOpen}" aria-disabled="${!t.hasSrc||t.isDialogOpen&&"true"}">
|
|
1139
|
-
${ro()}
|
|
1140
|
-
</media-airplay-button>`,je=t=>b`
|
|
1141
|
-
<media-pip-button disabled="${!t.hasSrc||t.isDialogOpen}" aria-disabled="${!t.hasSrc||t.isDialogOpen&&"true"}">
|
|
1142
|
-
${ho()}
|
|
1143
|
-
${po()}
|
|
1144
|
-
</media-pip-button>`,ce=t=>b`
|
|
1145
|
-
<media-fullscreen-button disabled="${!t.hasSrc||t.isDialogOpen}" aria-disabled="${!t.hasSrc||t.isDialogOpen&&"true"}">
|
|
1146
|
-
${co()}
|
|
1147
|
-
${uo()}
|
|
1148
|
-
</media-fullscreen-button>`,ue=t=>b`
|
|
1149
|
-
<media-cast-button disabled="${!t.hasSrc||t.isDialogOpen}" aria-disabled="${!t.hasSrc||t.isDialogOpen&&"true"}">
|
|
1150
|
-
${so()}
|
|
1151
|
-
${lo()}
|
|
1152
|
-
</media-cast-button>`,hi=({playbackRates:t,isDialogOpen:i})=>b`
|
|
1153
|
-
<media-playback-rate-button rates="${t!=null?t:!1}" disabled="${i}" aria-disabled="${i&&"true"}">
|
|
1154
|
-
</media-playback-rate-button>`,me=({isDialogOpen:t})=>b`
|
|
1155
|
-
<media-volume-range disabled="${t}" aria-disabled="${t&&"true"}">
|
|
1156
|
-
</media-volume-range>`,_e=t=>b`
|
|
1157
|
-
<media-time-range disabled="${!t.hasSrc||t.isDialogOpen}" aria-disabled="${!t.hasSrc||t.isDialogOpen&&"true"}">
|
|
1158
|
-
</media-time-range>`,pi=({defaultShowRemainingTime:t,hasSrc:i,isDialogOpen:e})=>b`
|
|
1159
|
-
<mxp-time-display remaining="${t}" disabled="${!i||e}" aria-disabled="${!i||e&&"true"}">
|
|
1160
|
-
</mxp-time-display>`,he=({title:t})=>b`
|
|
1161
|
-
<media-text-display part="title" class="title-display">${t}</media-text-display>`,Bl=t=>b`
|
|
1162
|
-
${t.title?b`<media-control-bar>${he(t)}</media-control-bar>`:b``}
|
|
1163
|
-
<media-control-bar>
|
|
1164
|
-
${H(t)}
|
|
1165
|
-
${qe(t)}
|
|
1166
|
-
${ze(t)}
|
|
1167
|
-
${pi(t)}
|
|
1168
|
-
${_e(t)}
|
|
1169
|
-
${Y(t)}
|
|
1170
|
-
${me(t)}
|
|
1171
|
-
${hi(t)}
|
|
1172
|
-
${de(t)}
|
|
1173
|
-
${ue(t)}
|
|
1174
|
-
</media-control-bar>
|
|
1175
|
-
`,Vl=t=>b`
|
|
1176
|
-
${t.title?b`<media-control-bar>${he(t)}</media-control-bar>`:b``}
|
|
1177
|
-
<media-control-bar>
|
|
1178
|
-
${H(t)}
|
|
1179
|
-
<slot name="seek-live"></slot>
|
|
1180
|
-
${qe(t)}
|
|
1181
|
-
${ze(t)}
|
|
1182
|
-
${pi(t)}
|
|
1183
|
-
${_e(t)}
|
|
1184
|
-
${Y(t)}
|
|
1185
|
-
${me(t)}
|
|
1186
|
-
${hi(t)}
|
|
1187
|
-
${de(t)}
|
|
1188
|
-
${ue(t)}
|
|
1189
|
-
</media-control-bar>
|
|
1190
|
-
`,Hl=t=>b`
|
|
1191
|
-
${t.title?b`<media-control-bar>${he(t)}</media-control-bar>`:b``}
|
|
1192
|
-
<media-control-bar>
|
|
1193
|
-
${H(t)}
|
|
1194
|
-
<slot name="seek-live"></slot>
|
|
1195
|
-
${Y(t)}
|
|
1196
|
-
${me(t)}
|
|
1197
|
-
<div class="spacer"></div>
|
|
1198
|
-
${de(t)}
|
|
1199
|
-
${ue(t)}
|
|
1200
|
-
</media-control-bar>
|
|
1201
|
-
`,Wl=t=>b`
|
|
1202
|
-
${_e(t)}
|
|
1203
|
-
<media-control-bar>
|
|
1204
|
-
${H(t)}
|
|
1205
|
-
${Y(t)}
|
|
1206
|
-
<div class="spacer"></div>
|
|
1207
|
-
${le(t)}
|
|
1208
|
-
${ce(t)}
|
|
1209
|
-
</media-control-bar>
|
|
1210
|
-
`,Fl=t=>b`
|
|
1211
|
-
<media-control-bar slot="top-chrome">
|
|
1212
|
-
${t.title?he(t):b``}
|
|
1213
|
-
</media-control-bar>
|
|
1214
|
-
<div slot="centered-chrome" class="center-controls">
|
|
1215
|
-
${qe(t)}
|
|
1216
|
-
${H(t)}
|
|
1217
|
-
${ze(t)}
|
|
1218
|
-
</div>
|
|
1219
|
-
${_e(t)}
|
|
1220
|
-
<media-control-bar>
|
|
1221
|
-
${pi(t)}
|
|
1222
|
-
${Y(t)}
|
|
1223
|
-
${me(t)}
|
|
1224
|
-
<div class="spacer"></div>
|
|
1225
|
-
${hi(t)}
|
|
1226
|
-
${le(t)}
|
|
1227
|
-
${de(t)}
|
|
1228
|
-
${ue(t)}
|
|
1229
|
-
${je(t)}
|
|
1230
|
-
${ce(t)}
|
|
1231
|
-
</media-control-bar>
|
|
1232
|
-
`,Kl=t=>b`
|
|
1233
|
-
<media-control-bar slot="top-chrome">
|
|
1234
|
-
${t.title?he(t):b``}
|
|
1235
|
-
</media-control-bar>
|
|
1236
|
-
<div slot="centered-chrome" class="center-controls">
|
|
1237
|
-
${H(t)}
|
|
1238
|
-
</div>
|
|
1239
|
-
${_e(t)}
|
|
1240
|
-
<media-control-bar>
|
|
1241
|
-
${H(t)}
|
|
1242
|
-
${qe(t)}
|
|
1243
|
-
${ze(t)}
|
|
1244
|
-
${pi(t)}
|
|
1245
|
-
${Y(t)}
|
|
1246
|
-
${me(t)}
|
|
1247
|
-
<div class="spacer"></div>
|
|
1248
|
-
${hi(t)}
|
|
1249
|
-
${le(t)}
|
|
1250
|
-
${de(t)}
|
|
1251
|
-
${ue(t)}
|
|
1252
|
-
${je(t)}
|
|
1253
|
-
${ce(t)}
|
|
1254
|
-
</media-control-bar>
|
|
1255
|
-
`,Yl=t=>b`
|
|
1256
|
-
<media-control-bar slot="top-chrome">
|
|
1257
|
-
<slot name="seek-live"></slot>
|
|
1258
|
-
</media-control-bar>
|
|
1259
|
-
<media-control-bar>
|
|
1260
|
-
${H(t)}
|
|
1261
|
-
${Y(t)}
|
|
1262
|
-
<div class="spacer"></div>
|
|
1263
|
-
${le(t)}
|
|
1264
|
-
${ce(t)}
|
|
1265
|
-
</media-control-bar>
|
|
1266
|
-
`,Gl=t=>b`
|
|
1267
|
-
<media-control-bar slot="top-chrome">
|
|
1268
|
-
<slot name="seek-live"></slot>
|
|
1269
|
-
${t.title?he(t):b``}
|
|
1270
|
-
</media-control-bar>
|
|
1271
|
-
<div slot="centered-chrome" class="center-controls">
|
|
1272
|
-
${H(t)}
|
|
1273
|
-
</div>
|
|
1274
|
-
<media-control-bar>
|
|
1275
|
-
${Y(t)}
|
|
1276
|
-
${me(t)}
|
|
1277
|
-
<div class="spacer"></div>
|
|
1278
|
-
${le(t)}
|
|
1279
|
-
${de(t)}
|
|
1280
|
-
${ue(t)}
|
|
1281
|
-
${je(t)}
|
|
1282
|
-
${ce(t)}
|
|
1283
|
-
</media-control-bar>
|
|
1284
|
-
`,Zl=t=>b`
|
|
1285
|
-
<media-control-bar slot="top-chrome">
|
|
1286
|
-
<slot name="seek-live"></slot>
|
|
1287
|
-
${t.title?he(t):b``}
|
|
1288
|
-
</media-control-bar>
|
|
1289
|
-
<div slot="centered-chrome" class="center-controls">
|
|
1290
|
-
${H(t)}
|
|
1291
|
-
</div>
|
|
1292
|
-
<media-control-bar>
|
|
1293
|
-
${H(t)}
|
|
1294
|
-
${Y(t)}
|
|
1295
|
-
${me(t)}
|
|
1296
|
-
<div class="spacer"></div>
|
|
1297
|
-
${le(t)}
|
|
1298
|
-
${de(t)}
|
|
1299
|
-
${ue(t)}
|
|
1300
|
-
${je(t)}
|
|
1301
|
-
${ce(t)}
|
|
1302
|
-
</media-control-bar>
|
|
1303
|
-
`,Ql=t=>b`
|
|
1304
|
-
<media-control-bar slot="top-chrome">
|
|
1305
|
-
<slot name="seek-live"></slot>
|
|
1306
|
-
</media-control-bar>
|
|
1307
|
-
${_e(t)}
|
|
1308
|
-
<media-control-bar>
|
|
1309
|
-
${H(t)}
|
|
1310
|
-
${Y(t)}
|
|
1311
|
-
<div class="spacer"></div>
|
|
1312
|
-
${le(t)}
|
|
1313
|
-
${ce(t)}
|
|
1314
|
-
</media-control-bar>
|
|
1315
|
-
`,ql=t=>b`
|
|
1316
|
-
<media-control-bar slot="top-chrome">
|
|
1317
|
-
<slot name="seek-live"></slot>
|
|
1318
|
-
${t.title?he(t):b``}
|
|
1319
|
-
</media-control-bar>
|
|
1320
|
-
<div slot="centered-chrome" class="center-controls">
|
|
1321
|
-
${qe(t)}
|
|
1322
|
-
${H(t)}
|
|
1323
|
-
${ze(t)}
|
|
1324
|
-
</div>
|
|
1325
|
-
${_e(t)}
|
|
1326
|
-
<media-control-bar>
|
|
1327
|
-
${Y(t)}
|
|
1328
|
-
${me(t)}
|
|
1329
|
-
<div class="spacer"></div>
|
|
1330
|
-
${le(t)}
|
|
1331
|
-
${de(t)}
|
|
1332
|
-
${ue(t)}
|
|
1333
|
-
${je(t)}
|
|
1334
|
-
${ce(t)}
|
|
1335
|
-
</media-control-bar>
|
|
1336
|
-
`,zl=t=>b`
|
|
1337
|
-
<media-control-bar slot="top-chrome">
|
|
1338
|
-
<slot name="seek-live"></slot>
|
|
1339
|
-
${t.title?he(t):b``}
|
|
1340
|
-
</media-control-bar>
|
|
1341
|
-
<div slot="centered-chrome" class="center-controls">
|
|
1342
|
-
${H(t)}
|
|
1343
|
-
</div>
|
|
1344
|
-
${_e(t)}
|
|
1345
|
-
<media-control-bar>
|
|
1346
|
-
${H(t)}
|
|
1347
|
-
${qe(t)}
|
|
1348
|
-
${ze(t)}
|
|
1349
|
-
${Y(t)}
|
|
1350
|
-
${me(t)}
|
|
1351
|
-
<div class="spacer"></div>
|
|
1352
|
-
${le(t)}
|
|
1353
|
-
${de(t)}
|
|
1354
|
-
${ue(t)}
|
|
1355
|
-
${je(t)}
|
|
1356
|
-
${ce(t)}
|
|
1357
|
-
</media-control-bar>
|
|
1358
|
-
`;var Io=`
|
|
1359
|
-
:host {
|
|
1360
|
-
z-index: 100;
|
|
1361
|
-
display: flex;
|
|
1362
|
-
justify-content: center;
|
|
1363
|
-
align-items: center;
|
|
1364
|
-
width: 100%;
|
|
1365
|
-
height: 100%;
|
|
1366
|
-
position: absolute;
|
|
1367
|
-
top: 0;
|
|
1368
|
-
left: 0;
|
|
1369
|
-
box-sizing: border-box;
|
|
1370
|
-
color: #fff;
|
|
1371
|
-
line-height: 18px;
|
|
1372
|
-
font-family: Arial, sans-serif;
|
|
1373
|
-
padding: var(--media-dialog-backdrop-padding, 0);
|
|
1374
|
-
background: var(--media-dialog-backdrop-background,
|
|
1375
|
-
linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))
|
|
1376
|
-
);
|
|
1377
|
-
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1378
|
-
transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;
|
|
1379
|
-
transform: var(--media-dialog-transform-open, none) !important;
|
|
1380
|
-
visibility: visible !important;
|
|
1381
|
-
opacity: 1 !important;
|
|
1382
|
-
pointer-events: auto !important;
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
:host(:not([open])) {
|
|
1386
|
-
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1387
|
-
transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;
|
|
1388
|
-
transform: var(--media-dialog-transform-close, none) !important;
|
|
1389
|
-
visibility: hidden !important;
|
|
1390
|
-
opacity: 0 !important;
|
|
1391
|
-
pointer-events: none !important;
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
:focus-visible {
|
|
1395
|
-
box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
.dialog {
|
|
1399
|
-
position: relative;
|
|
1400
|
-
box-sizing: border-box;
|
|
1401
|
-
background: var(--media-dialog-background, none);
|
|
1402
|
-
padding: var(--media-dialog-padding, 10px);
|
|
1403
|
-
width: min(320px, 100%);
|
|
1404
|
-
word-wrap: break-word;
|
|
1405
|
-
max-height: 100%;
|
|
1406
|
-
overflow: auto;
|
|
1407
|
-
text-align: center;
|
|
1408
|
-
line-height: 1.4;
|
|
1409
|
-
}
|
|
1410
|
-
`,Mo=Z.createElement("template");Mo.innerHTML=`
|
|
1411
|
-
<style>
|
|
1412
|
-
${Io}
|
|
1413
|
-
</style>
|
|
1414
|
-
|
|
1415
|
-
<div class="dialog">
|
|
1416
|
-
<slot></slot>
|
|
1417
|
-
</div>
|
|
1418
|
-
`;var ye=class extends k.HTMLElement{constructor(){var e;super();this.attachShadow({mode:"open"}),(e=this.shadowRoot)==null||e.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),To(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),jl(this))}attributeChangedCallback(e,a,r){e==="open"&&a!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&To(this)}};ye.styles=Io,ye.template=Mo,ye.observedAttributes=["open"];function To(t){let i=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(t.dispatchEvent(i),i.defaultPrevented)return;let e=t.querySelector("[autofocus]:not([disabled])");!e&&t.tabIndex>=0&&(e=t),e||(e=ko(t.shadowRoot)),t._previouslyFocusedElement=Z.activeElement,Z.activeElement instanceof HTMLElement&&Z.activeElement.blur(),t.addEventListener("transitionend",()=>{e instanceof HTMLElement&&e.focus({preventScroll:!0})},{once:!0})}function ko(t){let e=["button","input","keygen","select","textarea"].map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');let a=t==null?void 0:t.querySelector(e.join(", "));if(!a&&"attachShadow"in Element.prototype){let r=(t==null?void 0:t.querySelectorAll("*"))||[];for(let n=0;n<r.length&&!(r[n].tagName&&r[n].shadowRoot&&(a=ko(r[n].shadowRoot),a));n++);}return a}function jl(t){t._previouslyFocusedElement instanceof HTMLElement&&t._previouslyFocusedElement.focus()}k.customElements.get("media-dialog")||(k.customElements.define("media-dialog",ye),k.MediaDialog=ye);var Pa=ye;var So=Z.createElement("template");So.innerHTML=`
|
|
1419
|
-
<style>
|
|
1420
|
-
${Pa.styles}
|
|
1421
|
-
|
|
1422
|
-
.close {
|
|
1423
|
-
background: none;
|
|
1424
|
-
color: inherit;
|
|
1425
|
-
border: none;
|
|
1426
|
-
padding: 0;
|
|
1427
|
-
font: inherit;
|
|
1428
|
-
cursor: pointer;
|
|
1429
|
-
outline: inherit;
|
|
1430
|
-
width: 28px;
|
|
1431
|
-
height: 28px;
|
|
1432
|
-
position: absolute;
|
|
1433
|
-
top: 1rem;
|
|
1434
|
-
right: 1rem;
|
|
1435
|
-
}
|
|
1436
|
-
</style>
|
|
1437
|
-
|
|
1438
|
-
<div class="dialog">
|
|
1439
|
-
<slot></slot>
|
|
1440
|
-
</div>
|
|
1441
|
-
|
|
1442
|
-
<slot name="close">
|
|
1443
|
-
<button class="close" tabindex="0">
|
|
1444
|
-
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1445
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
1446
|
-
</svg>
|
|
1447
|
-
</button>
|
|
1448
|
-
</slot>
|
|
1449
|
-
`;var kt=class extends Pa{constructor(){var i,e;super(),(e=(i=this.shadowRoot)==null?void 0:i.querySelector(".close"))==null||e.addEventListener("click",()=>{this.close()})}};kt.template=So;k.customElements.get("mxp-dialog")||(k.customElements.define("mxp-dialog",kt),k.MxpDialog=kt);var Lo=`:host {
|
|
753
|
+
`;var Vn=["Enter"," "],_t,qe,vi,Ze=class extends D.HTMLElement{constructor(){var t,a;super();I(this,qe);I(this,_t,void 0);this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0)),this.timeDisplayEl=(a=this.shadowRoot)==null?void 0:a.querySelector("media-time-display")}static get observedAttributes(){return["hide-duration","remaining","disabled","aria-disabled"]}toggleTimeDisplay(){var t,a,r;(t=this.timeDisplayEl)!=null&&t.hasAttribute("remaining")?(a=this.timeDisplayEl)==null||a.removeAttribute("remaining"):(r=this.timeDisplayEl)==null||r.setAttribute("remaining","")}connectedCallback(){let t=a=>{let{key:r}=a;if(!Vn.includes(r)){this.removeEventListener("keyup",t);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!Vn.includes(s)){this.removeEventListener("keyup",t);return}this.addEventListener("keyup",t)}),this.addEventListener("click",this.toggleTimeDisplay),V(this,_t,setInterval(S(this,qe,vi).bind(this),200)),requestAnimationFrame(()=>S(this,qe,vi).call(this))}disconnectedCallback(){clearInterval(v(this,_t))}attributeChangedCallback(t,a,r){var n,s;t==="hide-duration"&&S(this,qe,vi).call(this),["remaining","disabled","aria-disabled"].includes(t)&&a!==r&&(r==null?(n=this.timeDisplayEl)==null||n.removeAttribute(t):(s=this.timeDisplayEl)==null||s.setAttribute(t,r))}};_t=new WeakMap,qe=new WeakSet,vi=function(){var a,r,n,s;getComputedStyle(this).getPropertyValue("--media-duration-display").trim()==="none"||this.getAttribute("hide-duration")!=null?(a=this.timeDisplayEl)!=null&&a.hasAttribute("show-duration")&&((r=this.timeDisplayEl)==null||r.removeAttribute("show-duration")):(n=this.timeDisplayEl)!=null&&n.hasAttribute("show-duration")||(s=this.timeDisplayEl)==null||s.setAttribute("show-duration","")},Ze.styles=Hn,Ze.template=Wn;D.customElements.get("mxp-time-display")||(D.customElements.define("mxp-time-display",Ze),D.MxpTimeDisplay=Ze);var Fn=`:host {
|
|
1450
754
|
display: inline-block;
|
|
1451
755
|
width: 100%;
|
|
1452
756
|
}
|
|
@@ -1612,91 +916,820 @@ a {
|
|
|
1612
916
|
::part(title display) {
|
|
1613
917
|
display: var(--media-controls, var(--media-title-display));
|
|
1614
918
|
}
|
|
1615
|
-
`;var
|
|
919
|
+
`;var Kn=`<template id="media-theme-mux">
|
|
920
|
+
<style>
|
|
921
|
+
:host(:not([audio])) {
|
|
922
|
+
--secondary-color: transparent;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
:host {
|
|
926
|
+
--_primary-color: var(--primary-color, #fff);
|
|
927
|
+
|
|
928
|
+
--media-icon-color: var(--_primary-color);
|
|
929
|
+
--media-range-thumb-background: var(--_primary-color);
|
|
930
|
+
--media-range-bar-color: var(--_primary-color);
|
|
931
|
+
--media-control-background: var(--secondary-color);
|
|
932
|
+
--media-control-hover-background: var(--secondary-color);
|
|
933
|
+
--media-time-buffered-color: rgba(255, 255, 255, 0.4);
|
|
934
|
+
--media-range-track-background: rgba(255, 255, 255, 0.5);
|
|
935
|
+
--media-range-track-border-radius: 3px;
|
|
936
|
+
--media-preview-thumbnail-border: 1px solid #fff;
|
|
937
|
+
--media-preview-thumbnail-border-radius: 2px;
|
|
938
|
+
--media-preview-time-margin: 5px 0 2px;
|
|
939
|
+
color: var(--_primary-color);
|
|
940
|
+
display: inline-block;
|
|
941
|
+
width: 100%;
|
|
942
|
+
height: 100%;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
:host(.two-tone:not([audio])) {
|
|
946
|
+
--mux-time-range-padding: 0px; /* px is needed in calc() */
|
|
947
|
+
--media-preview-thumbnail-border: 0;
|
|
948
|
+
--media-preview-thumbnail-border-radius: 2px 2px 0 0;
|
|
949
|
+
--media-preview-time-border-radius: 0 0 2px 2px;
|
|
950
|
+
--media-preview-time-margin: 0 0 8px;
|
|
951
|
+
--media-preview-time-text-shadow: none;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
:host([audio]) {
|
|
955
|
+
--media-preview-time-border-radius: 3px;
|
|
956
|
+
--media-preview-time-margin: 0 0 5px;
|
|
957
|
+
--media-preview-time-text-shadow: none;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
:host(.two-tone:not([audio])) media-time-range {
|
|
961
|
+
--media-range-track-border-radius: 0;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
:host([audio]) ::slotted([slot='media']) {
|
|
965
|
+
height: 0px;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
:host([audio]) :is(media-poster-image, media-loading-indicator) {
|
|
969
|
+
display: none;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
:host([audio]) media-controller {
|
|
973
|
+
background: transparent;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
:host([audio]) media-controller::part(vertical-layer) {
|
|
977
|
+
background: transparent;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
:host([audio]) media-control-bar {
|
|
981
|
+
width: 100%;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
[disabled],
|
|
985
|
+
[aria-disabled='true'] {
|
|
986
|
+
opacity: 60%;
|
|
987
|
+
cursor: not-allowed;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
media-captions-button:not(:is([media-captions-list], [media-subtitles-list])) {
|
|
991
|
+
--captions-button: none;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
media-volume-range[media-volume-unavailable] {
|
|
995
|
+
--volume-range: none;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
media-airplay-button[media-airplay-unavailable] {
|
|
999
|
+
--airplay-button: none;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
media-fullscreen-button[media-fullscreen-unavailable] {
|
|
1003
|
+
--fullscreen-button: none;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
media-cast-button[media-cast-unavailable] {
|
|
1007
|
+
--cast-button: none;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
media-pip-button[media-pip-unavailable] {
|
|
1011
|
+
--pip-button: none;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
media-controller {
|
|
1015
|
+
width: 100%;
|
|
1016
|
+
height: 100%;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
:host media-time-range {
|
|
1020
|
+
color: var(--_primary-color);
|
|
1021
|
+
--media-range-thumb-opacity: 0;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
:host(:not([audio])) media-time-range {
|
|
1025
|
+
--media-range-padding-left: var(--mux-time-range-padding, 10px);
|
|
1026
|
+
--media-range-padding-right: var(--mux-time-range-padding, 10px);
|
|
1027
|
+
--media-range-padding: 0;
|
|
1028
|
+
z-index: 10;
|
|
1029
|
+
height: 10px;
|
|
1030
|
+
bottom: -3px;
|
|
1031
|
+
background: linear-gradient(
|
|
1032
|
+
180deg,
|
|
1033
|
+
transparent,
|
|
1034
|
+
transparent 3px,
|
|
1035
|
+
var(--media-control-background, rgba(20, 20, 30, 0.7)) 3px,
|
|
1036
|
+
var(--media-control-background, rgba(20, 20, 30, 0.7)) 7px,
|
|
1037
|
+
transparent 7px,
|
|
1038
|
+
transparent
|
|
1039
|
+
);
|
|
1040
|
+
width: 100%;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
media-control-bar {
|
|
1044
|
+
--media-control-padding: 9px 7px;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.size-small media-control-bar {
|
|
1048
|
+
--media-control-padding: 9px 5px;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.size-extra-small media-control-bar {
|
|
1052
|
+
--media-control-padding: 4px 3px;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
media-control-bar :is([role='button'], [role='switch'], button) {
|
|
1056
|
+
line-height: 0;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
media-control-bar :is(media-text-display, mxp-time-display):first-child {
|
|
1060
|
+
--media-control-padding: 9px 5px 9px 10px;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.spacer {
|
|
1064
|
+
flex-grow: 1;
|
|
1065
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/* Add a small space on the right to have the play button and
|
|
1069
|
+
* fullscreen button aligned in relation to the progress bar. */
|
|
1070
|
+
media-control-bar:not([slot])::after {
|
|
1071
|
+
content: '';
|
|
1072
|
+
width: 2px;
|
|
1073
|
+
height: 100%;
|
|
1074
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
media-control-bar[slot='top-chrome'] {
|
|
1078
|
+
min-height: 42px;
|
|
1079
|
+
pointer-events: none;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
:host([title]) media-control-bar[slot='top-chrome']::before {
|
|
1083
|
+
content: '';
|
|
1084
|
+
position: absolute;
|
|
1085
|
+
width: 100%;
|
|
1086
|
+
padding-bottom: min(160px, 25%);
|
|
1087
|
+
background: linear-gradient(rgb(0 0 0 / 0.4), transparent);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
media-control-bar[slot='top-chrome'] > * {
|
|
1091
|
+
--media-control-background: transparent;
|
|
1092
|
+
--media-control-hover-background: transparent;
|
|
1093
|
+
position: relative;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
media-controller::part(vertical-layer) {
|
|
1097
|
+
transition: background-color 1s;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
media-controller:is([media-paused], :not([user-inactive]))::part(vertical-layer) {
|
|
1101
|
+
background-color: var(--controls-backdrop-color, var(--controls, transparent));
|
|
1102
|
+
transition: background-color 0.25s;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.center-controls {
|
|
1106
|
+
--media-button-icon-width: 100%;
|
|
1107
|
+
--media-button-icon-height: auto;
|
|
1108
|
+
pointer-events: none;
|
|
1109
|
+
width: 100%;
|
|
1110
|
+
display: flex;
|
|
1111
|
+
flex-flow: row;
|
|
1112
|
+
align-items: center;
|
|
1113
|
+
justify-content: center;
|
|
1114
|
+
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
1115
|
+
paint-order: stroke;
|
|
1116
|
+
stroke: rgba(102, 102, 102, 1);
|
|
1117
|
+
stroke-width: 0.3px;
|
|
1118
|
+
text-shadow: 0 0 2px rgb(0 0 0 / 0.25), 0 0 6px rgb(0 0 0 / 0.25);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.center-controls media-play-button {
|
|
1122
|
+
--media-control-background: transparent;
|
|
1123
|
+
--media-control-hover-background: transparent;
|
|
1124
|
+
padding: 0;
|
|
1125
|
+
width: max(43px, min(10%, 55px));
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.center-controls media-seek-backward-button,
|
|
1129
|
+
.center-controls media-seek-forward-button {
|
|
1130
|
+
--media-control-background: transparent;
|
|
1131
|
+
--media-control-hover-background: transparent;
|
|
1132
|
+
padding: 0;
|
|
1133
|
+
margin: 0 2%;
|
|
1134
|
+
width: max(33px, min(8%, 40px));
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
media-control-bar:not([slot]) media-seek-backward-button {
|
|
1138
|
+
padding-right: 5px;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
media-control-bar:not([slot]) media-seek-forward-button {
|
|
1142
|
+
padding-left: 5px;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
media-loading-indicator {
|
|
1146
|
+
--media-loading-icon-width: 100%;
|
|
1147
|
+
--media-button-icon-height: auto;
|
|
1148
|
+
pointer-events: none;
|
|
1149
|
+
position: absolute;
|
|
1150
|
+
width: min(15%, 150px);
|
|
1151
|
+
display: flex;
|
|
1152
|
+
flex-flow: row;
|
|
1153
|
+
align-items: center;
|
|
1154
|
+
justify-content: center;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/* Intentionally don't target the div for transition but the children
|
|
1158
|
+
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
1159
|
+
media-loading-indicator + div * {
|
|
1160
|
+
transition: opacity 0.15s;
|
|
1161
|
+
opacity: 1;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
media-loading-indicator[media-loading]:not([media-paused]) ~ div > * {
|
|
1165
|
+
opacity: 0;
|
|
1166
|
+
transition-delay: 400ms;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
media-volume-range {
|
|
1170
|
+
width: min(100%, 100px);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
media-time-display {
|
|
1174
|
+
white-space: nowrap;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
:is(media-time-display, media-text-display, media-playback-rate-button[role='button']) {
|
|
1178
|
+
color: inherit;
|
|
1179
|
+
line-height: 24px;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.title-display {
|
|
1183
|
+
font-size: 16px;
|
|
1184
|
+
text-shadow: 0 0 2px rgb(0 0 0 / 0.6);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
:host([audio]) .title-display {
|
|
1188
|
+
flex-grow: 1;
|
|
1189
|
+
font-size: 21px;
|
|
1190
|
+
}
|
|
1191
|
+
</style>
|
|
1192
|
+
<media-controller
|
|
1193
|
+
gestures-disabled="{{disabled}}"
|
|
1194
|
+
hotkeys="{{hotkeys}}"
|
|
1195
|
+
nohotkeys="{{nohotkeys}}"
|
|
1196
|
+
audio="{{audio}}"
|
|
1197
|
+
class="size-{{playerSize}}"
|
|
1198
|
+
exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
|
|
1199
|
+
>
|
|
1200
|
+
<slot name="media" slot="media"></slot>
|
|
1201
|
+
<media-poster-image
|
|
1202
|
+
slot="poster"
|
|
1203
|
+
part="poster"
|
|
1204
|
+
src="{{poster}}"
|
|
1205
|
+
placeholder-src="{{placeholder}}"
|
|
1206
|
+
></media-poster-image>
|
|
1207
|
+
<media-loading-indicator slot="centered-chrome" no-auto-hide></media-loading-indicator>
|
|
1208
|
+
|
|
1209
|
+
<template partial="TitleDisplay">
|
|
1210
|
+
<template if="title">
|
|
1211
|
+
<media-text-display part="top title display" class="title-display"> {{title}} </media-text-display>
|
|
1212
|
+
</template>
|
|
1213
|
+
</template>
|
|
1214
|
+
|
|
1215
|
+
<template partial="PlayButton">
|
|
1216
|
+
<media-play-button
|
|
1217
|
+
part="{{section ?? 'bottom'}} play button"
|
|
1218
|
+
disabled="{{disabled}}"
|
|
1219
|
+
aria-disabled="{{disabled}}"
|
|
1220
|
+
>
|
|
1221
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="play">
|
|
1222
|
+
<path d="m6.73 20.93 14.05-8.54a.46.46 0 0 0 0-.78L6.73 3.07a.48.48 0 0 0-.73.39v17.07a.48.48 0 0 0 .73.4Z" />
|
|
1223
|
+
</svg>
|
|
1224
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="pause">
|
|
1225
|
+
<path
|
|
1226
|
+
d="M6 19.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v15ZM14.5 4a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3Z"
|
|
1227
|
+
/>
|
|
1228
|
+
</svg>
|
|
1229
|
+
</media-play-button>
|
|
1230
|
+
</template>
|
|
1231
|
+
|
|
1232
|
+
<template partial="SeekBackwardButton">
|
|
1233
|
+
<media-seek-backward-button
|
|
1234
|
+
seek-offset="{{backwardSeekOffset}}"
|
|
1235
|
+
part="{{section ?? 'bottom'}} seek-backward button"
|
|
1236
|
+
disabled="{{disabled}}"
|
|
1237
|
+
aria-disabled="{{disabled}}"
|
|
1238
|
+
>
|
|
1239
|
+
<svg aria-hidden="true" viewBox="0 0 22 24" slot="backward">
|
|
1240
|
+
<path d="M11 6V3L5.37 7 11 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 11 6Z" />
|
|
1241
|
+
<text class="value" transform="translate(2.5 21)" style="font-size: 8px; font-family: 'ArialMT', 'Arial'">
|
|
1242
|
+
{{backwardSeekOffset}}
|
|
1243
|
+
</text>
|
|
1244
|
+
</svg>
|
|
1245
|
+
</media-seek-backward-button>
|
|
1246
|
+
</template>
|
|
1247
|
+
|
|
1248
|
+
<template partial="SeekForwardButton">
|
|
1249
|
+
<media-seek-forward-button
|
|
1250
|
+
seek-offset="{{forwardSeekOffset}}"
|
|
1251
|
+
part="{{section ?? 'bottom'}} seek-forward button"
|
|
1252
|
+
disabled="{{disabled}}"
|
|
1253
|
+
aria-disabled="{{disabled}}"
|
|
1254
|
+
>
|
|
1255
|
+
<svg aria-hidden="true" viewBox="0 0 22 24" slot="forward">
|
|
1256
|
+
<path d="M11 6V3l5.61 4L11 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 11 6Z" />
|
|
1257
|
+
<text class="value" transform="translate(10 21)" style="font-size: 8px; font-family: 'ArialMT', 'Arial'">
|
|
1258
|
+
{{forwardSeekOffset}}
|
|
1259
|
+
</text>
|
|
1260
|
+
</svg>
|
|
1261
|
+
</media-seek-forward-button>
|
|
1262
|
+
</template>
|
|
1263
|
+
|
|
1264
|
+
<template partial="MuteButton">
|
|
1265
|
+
<media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1266
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="high">
|
|
1267
|
+
<path
|
|
1268
|
+
d="m11.14 4.86-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.21a.5.5 0 0 0-.86-.35Zm2.74-1.56v1.52A7.52 7.52 0 0 1 19.47 12a7.52 7.52 0 0 1-5.59 7.18v1.52A9 9 0 0 0 21 12a9 9 0 0 0-7.12-8.7Zm3.56 8.7a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
|
|
1269
|
+
/>
|
|
1270
|
+
</svg>
|
|
1271
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="low">
|
|
1272
|
+
<path
|
|
1273
|
+
d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
|
|
1274
|
+
/>
|
|
1275
|
+
</svg>
|
|
1276
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="medium">
|
|
1277
|
+
<path
|
|
1278
|
+
d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
|
|
1279
|
+
/>
|
|
1280
|
+
</svg>
|
|
1281
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="off">
|
|
1282
|
+
<path
|
|
1283
|
+
d="m3 4.05 4.48 4.47-.33.33a.49.49 0 0 1-.36.15H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.48.48 0 0 0 .36.15.5.5 0 0 0 .5-.5v-5.75l4.67 4.66a7.71 7.71 0 0 1-2.79 1.47v1.52a9.32 9.32 0 0 0 3.87-1.91L20 21l1-1L4.06 3 3 4.05Zm5.36 5.36 2.39 2.39V17L8 14.26a1.74 1.74 0 0 0-1.24-.51H4.25v-3.5h2.54A1.74 1.74 0 0 0 8 9.74l.36-.33ZM19.47 12a7.19 7.19 0 0 1-.89 3.47l1.11 1.1A8.64 8.64 0 0 0 21 12a9 9 0 0 0-7.12-8.7v1.52A7.52 7.52 0 0 1 19.47 12ZM12 8.88V5.21a.5.5 0 0 0-.5-.5.48.48 0 0 0-.36.15L9.56 6.44 12 8.88ZM15.91 12a4.284 4.284 0 0 1-.07.72l1.22 1.22a5.2 5.2 0 0 0 .38-1.94 5.49 5.49 0 0 0-3.56-5.1v1.66A4 4 0 0 1 15.91 12Z"
|
|
1284
|
+
/>
|
|
1285
|
+
</svg>
|
|
1286
|
+
</media-mute-button>
|
|
1287
|
+
</template>
|
|
1288
|
+
|
|
1289
|
+
<template partial="PipButton">
|
|
1290
|
+
<media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1291
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
1292
|
+
<path
|
|
1293
|
+
d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
|
|
1294
|
+
/>
|
|
1295
|
+
</svg>
|
|
1296
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
1297
|
+
<path
|
|
1298
|
+
d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
|
|
1299
|
+
/>
|
|
1300
|
+
</svg>
|
|
1301
|
+
</media-pip-button>
|
|
1302
|
+
</template>
|
|
1303
|
+
|
|
1304
|
+
<template partial="CaptionsButton">
|
|
1305
|
+
<media-captions-button
|
|
1306
|
+
default-showing="{{defaultShowingCaptions}}"
|
|
1307
|
+
part="bottom captions button"
|
|
1308
|
+
disabled="{{disabled}}"
|
|
1309
|
+
aria-disabled="{{disabled}}"
|
|
1310
|
+
>
|
|
1311
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="on">
|
|
1312
|
+
<path
|
|
1313
|
+
d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.41 10.1a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 4 4 0 0 1-1.28-.83 3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.53 3.53 0 0 1 .84-1.21 3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 1.35.24c.225.091.44.205.64.34a2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1c-.009.34.046.68.16 1 .104.283.26.545.46.77.188.21.415.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 1.35.24c.225.091.44.205.64.34.21.144.395.32.55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.352 2.352 0 0 0-.46.77 3.01 3.01 0 0 0-.16 1c-.003.34.05.678.16 1 .108.282.263.542.46.77.188.21.416.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"
|
|
1314
|
+
/>
|
|
1315
|
+
</svg>
|
|
1316
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="off">
|
|
1317
|
+
<path
|
|
1318
|
+
d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-1.81-.12-4.67-.18-7.53-.18-2.86 0-5.72.06-7.53.18a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c1.81.12 4.67.18 7.53.18 2.86 0 5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.137-.21-8.283 0-12.42a1.11 1.11 0 0 1 .91-1.11c1.67-.11 4.43-.18 7.43-.18s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.137.21 8.283 0 12.42ZM10.843 14a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.099 2.099 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42c.23-.103.479-.158.73-.16.241-.004.48.044.7.14.199.088.373.222.51.39l1.08-.89a2.179 2.179 0 0 0-.47-.44 2.81 2.81 0 0 0-.54-.32 2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0 4.08 4.08 0 0 0-1.38.15 3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06c.316.293.687.52 1.09.67.443.16.91.238 1.38.23a3.2 3.2 0 0 0 1.28-.27c.401-.183.747-.47 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18 1.54 1.54 0 0 1-.7-.18 1.69 1.69 0 0 1-.57-.42 2.12 2.12 0 0 1-.43-.58 2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58c.241-.003.48.045.7.14.199.088.373.222.51.39l1.08-.92a2.43 2.43 0 0 0-.47-.44 3.22 3.22 0 0 0-.53-.29 2.999 2.999 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0 4.06 4.06 0 0 0-1.36.15 3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38c.16.402.405.764.72 1.06a3.17 3.17 0 0 0 1.09.67c.44.16.904.237 1.37.23.441 0 .877-.092 1.28-.27a2.45 2.45 0 0 0 1-.83l-1.15-.85a1.49 1.49 0 0 1-.54.49Z"
|
|
1319
|
+
/>
|
|
1320
|
+
</svg>
|
|
1321
|
+
</media-captions-button>
|
|
1322
|
+
</template>
|
|
1323
|
+
|
|
1324
|
+
<template partial="AirplayButton">
|
|
1325
|
+
<media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1326
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="airplay">
|
|
1327
|
+
<path
|
|
1328
|
+
d="M13.19 14.22a.25.25 0 0 0-.38 0l-5.46 6.37a.25.25 0 0 0 .19.41h10.92a.25.25 0 0 0 .19-.41l-5.46-6.37Z"
|
|
1329
|
+
/>
|
|
1330
|
+
<path
|
|
1331
|
+
d="M22 3H4a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h2.94L8 16.75H4.25V4.25h17.5v12.5H18L19.06 18H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
|
|
1332
|
+
/>
|
|
1333
|
+
</svg>
|
|
1334
|
+
</media-airplay-button>
|
|
1335
|
+
</template>
|
|
1336
|
+
|
|
1337
|
+
<template partial="FullscreenButton">
|
|
1338
|
+
<media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1339
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="enter">
|
|
1340
|
+
<path
|
|
1341
|
+
d="M20.25 14.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 1 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM8.75 19.5H4.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 1 0 0-1.5Zm0-16.5h-5a.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V4.5h4.25a.76.76 0 0 0 .75-.75.76.76 0 0 0-.75-.75Z"
|
|
1342
|
+
/>
|
|
1343
|
+
</svg>
|
|
1344
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="exit">
|
|
1345
|
+
<path
|
|
1346
|
+
d="M20.25 14.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 1 0 1.5 0V16h4.25a.75.75 0 1 0 0-1.5Zm-5-5h5a.75.75 0 1 0 0-1.5H16V3.75a.75.75 0 1 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 1 0 0 1.5H8v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5a.76.76 0 0 0-.75.75V8H3.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 8.75 3Z"
|
|
1347
|
+
/>
|
|
1348
|
+
</svg>
|
|
1349
|
+
</media-fullscreen-button>
|
|
1350
|
+
</template>
|
|
1351
|
+
|
|
1352
|
+
<template partial="CastButton">
|
|
1353
|
+
<media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1354
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
1355
|
+
<path d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z" />
|
|
1356
|
+
<path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z" />
|
|
1357
|
+
<path
|
|
1358
|
+
d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
|
|
1359
|
+
/>
|
|
1360
|
+
</svg>
|
|
1361
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
1362
|
+
<path d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z" />
|
|
1363
|
+
<path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z" />
|
|
1364
|
+
<path
|
|
1365
|
+
d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
|
|
1366
|
+
/>
|
|
1367
|
+
<path d="M20.5 5.5h-15v5.811c3.52.906 6.283 3.67 7.189 7.19H20.5V5.5Z" />
|
|
1368
|
+
</svg>
|
|
1369
|
+
</media-cast-button>
|
|
1370
|
+
</template>
|
|
1371
|
+
|
|
1372
|
+
<template partial="PlaybackRateButton">
|
|
1373
|
+
<media-playback-rate-button
|
|
1374
|
+
rates="{{playbackRates}}"
|
|
1375
|
+
part="bottom playback-rate button"
|
|
1376
|
+
disabled="{{disabled}}"
|
|
1377
|
+
aria-disabled="{{disabled}}"
|
|
1378
|
+
></media-playback-rate-button>
|
|
1379
|
+
</template>
|
|
1380
|
+
|
|
1381
|
+
<template partial="VolumeRange">
|
|
1382
|
+
<media-volume-range
|
|
1383
|
+
part="bottom volume range"
|
|
1384
|
+
disabled="{{disabled}}"
|
|
1385
|
+
aria-disabled="{{disabled}}"
|
|
1386
|
+
></media-volume-range>
|
|
1387
|
+
</template>
|
|
1388
|
+
|
|
1389
|
+
<template partial="TimeDisplay">
|
|
1390
|
+
<mxp-time-display
|
|
1391
|
+
remaining="{{defaultShowRemainingTime}}"
|
|
1392
|
+
part="bottom time display"
|
|
1393
|
+
disabled="{{disabled}}"
|
|
1394
|
+
aria-disabled="{{disabled}}"
|
|
1395
|
+
></mxp-time-display>
|
|
1396
|
+
</template>
|
|
1397
|
+
|
|
1398
|
+
<template partial="TimeRange">
|
|
1399
|
+
<media-time-range
|
|
1400
|
+
part="bottom time range"
|
|
1401
|
+
disabled="{{disabled}}"
|
|
1402
|
+
aria-disabled="{{disabled}}"
|
|
1403
|
+
></media-time-range>
|
|
1404
|
+
</template>
|
|
1405
|
+
|
|
1406
|
+
<template if="layout == 'audio on-demand'">
|
|
1407
|
+
<template if="title">
|
|
1408
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
1409
|
+
</template>
|
|
1410
|
+
<media-control-bar>
|
|
1411
|
+
{{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>TimeRange}} {{>MuteButton}}
|
|
1412
|
+
{{>VolumeRange}} {{>PlaybackRateButton}} {{>AirplayButton}} {{>CastButton}}
|
|
1413
|
+
</media-control-bar>
|
|
1414
|
+
</template>
|
|
1415
|
+
|
|
1416
|
+
<template if="layout == 'audio dvr'">
|
|
1417
|
+
<template if="title">
|
|
1418
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
1419
|
+
</template>
|
|
1420
|
+
<media-control-bar>
|
|
1421
|
+
{{>PlayButton}}
|
|
1422
|
+
<slot name="seek-live"></slot>
|
|
1423
|
+
{{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>TimeRange}} {{>MuteButton}} {{>VolumeRange}}
|
|
1424
|
+
{{>PlaybackRateButton}} {{>AirplayButton}} {{>CastButton}}
|
|
1425
|
+
</media-control-bar>
|
|
1426
|
+
</template>
|
|
1427
|
+
|
|
1428
|
+
<template if="layout == 'audio live'">
|
|
1429
|
+
<template if="title">
|
|
1430
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
1431
|
+
</template>
|
|
1432
|
+
<media-control-bar>
|
|
1433
|
+
{{>PlayButton}}
|
|
1434
|
+
<slot name="seek-live"></slot>
|
|
1435
|
+
{{>MuteButton}} {{>VolumeRange}}
|
|
1436
|
+
<div class="spacer"></div>
|
|
1437
|
+
{{>AirplayButton}} {{>CastButton}}
|
|
1438
|
+
</media-control-bar>
|
|
1439
|
+
</template>
|
|
1440
|
+
|
|
1441
|
+
<template if="layout == 'on-demand extra-small'">
|
|
1442
|
+
{{>TimeRange}}
|
|
1443
|
+
<media-control-bar>
|
|
1444
|
+
{{>PlayButton}} {{>MuteButton}}
|
|
1445
|
+
<div class="spacer"></div>
|
|
1446
|
+
{{>CaptionsButton}} {{>FullscreenButton}}
|
|
1447
|
+
</media-control-bar>
|
|
1448
|
+
</template>
|
|
1449
|
+
|
|
1450
|
+
<template if="layout == 'on-demand small'">
|
|
1451
|
+
<media-control-bar slot="top-chrome"> {{>TitleDisplay}} </media-control-bar>
|
|
1452
|
+
<div slot="centered-chrome" class="center-controls">
|
|
1453
|
+
{{>SeekBackwardButton section="center"}} {{>PlayButton section="center"}} {{>SeekForwardButton
|
|
1454
|
+
section="center"}}
|
|
1455
|
+
</div>
|
|
1456
|
+
{{>TimeRange}}
|
|
1457
|
+
<media-control-bar>
|
|
1458
|
+
{{>TimeDisplay}} {{>MuteButton}} {{>VolumeRange}}
|
|
1459
|
+
<div class="spacer"></div>
|
|
1460
|
+
{{>PlaybackRateButton}} {{>CaptionsButton}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
|
|
1461
|
+
{{>FullscreenButton}}
|
|
1462
|
+
</media-control-bar>
|
|
1463
|
+
</template>
|
|
1464
|
+
|
|
1465
|
+
<template if="layout == 'on-demand large'">
|
|
1466
|
+
<media-control-bar slot="top-chrome"> {{>TitleDisplay}} </media-control-bar>
|
|
1467
|
+
<div slot="centered-chrome" class="center-controls">{{>PlayButton section="center"}}</div>
|
|
1468
|
+
{{>TimeRange}}
|
|
1469
|
+
<media-control-bar>
|
|
1470
|
+
{{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}} {{>VolumeRange}}
|
|
1471
|
+
<div class="spacer"></div>
|
|
1472
|
+
{{>PlaybackRateButton}} {{>CaptionsButton}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
|
|
1473
|
+
{{>FullscreenButton}}
|
|
1474
|
+
</media-control-bar>
|
|
1475
|
+
</template>
|
|
1476
|
+
|
|
1477
|
+
<template if="layout == 'live extra-small'">
|
|
1478
|
+
<media-control-bar slot="top-chrome">
|
|
1479
|
+
<slot name="seek-live"></slot>
|
|
1480
|
+
</media-control-bar>
|
|
1481
|
+
<media-control-bar>
|
|
1482
|
+
{{>PlayButton}} {{>MuteButton}}
|
|
1483
|
+
<div class="spacer"></div>
|
|
1484
|
+
{{>CaptionsButton}} {{>FullscreenButton}}
|
|
1485
|
+
</media-control-bar>
|
|
1486
|
+
</template>
|
|
1487
|
+
|
|
1488
|
+
<template if="layout == 'live small'">
|
|
1489
|
+
<media-control-bar slot="top-chrome">
|
|
1490
|
+
<slot name="seek-live"></slot>
|
|
1491
|
+
{{>TitleDisplay}}
|
|
1492
|
+
</media-control-bar>
|
|
1493
|
+
<div slot="centered-chrome" class="center-controls">{{>PlayButton section="center"}}</div>
|
|
1494
|
+
<media-control-bar>
|
|
1495
|
+
{{>MuteButton}} {{>VolumeRange}}
|
|
1496
|
+
<div class="spacer"></div>
|
|
1497
|
+
{{>CaptionsButton}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
|
|
1498
|
+
</media-control-bar>
|
|
1499
|
+
</template>
|
|
1500
|
+
|
|
1501
|
+
<template if="layout == 'live large'">
|
|
1502
|
+
<media-control-bar slot="top-chrome">
|
|
1503
|
+
<slot name="seek-live"></slot>
|
|
1504
|
+
{{>TitleDisplay}}
|
|
1505
|
+
</media-control-bar>
|
|
1506
|
+
<div slot="centered-chrome" class="center-controls">{{>PlayButton section="center"}}</div>
|
|
1507
|
+
<media-control-bar>
|
|
1508
|
+
{{>PlayButton}} {{>MuteButton}} {{>VolumeRange}}
|
|
1509
|
+
<div class="spacer"></div>
|
|
1510
|
+
{{>CaptionsButton}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
|
|
1511
|
+
</media-control-bar>
|
|
1512
|
+
</template>
|
|
1513
|
+
|
|
1514
|
+
<template if="layout == 'dvr extra-small'">
|
|
1515
|
+
<media-control-bar slot="top-chrome">
|
|
1516
|
+
<slot name="seek-live"></slot>
|
|
1517
|
+
</media-control-bar>
|
|
1518
|
+
{{>TimeRange}}
|
|
1519
|
+
<media-control-bar>
|
|
1520
|
+
{{>PlayButton}} {{>MuteButton}}
|
|
1521
|
+
<div class="spacer"></div>
|
|
1522
|
+
{{>CaptionsButton}} {{>FullscreenButton}}
|
|
1523
|
+
</media-control-bar>
|
|
1524
|
+
</template>
|
|
1525
|
+
|
|
1526
|
+
<template if="layout == 'dvr small'">
|
|
1527
|
+
<media-control-bar slot="top-chrome">
|
|
1528
|
+
<slot name="seek-live"></slot>
|
|
1529
|
+
{{>TitleDisplay}}
|
|
1530
|
+
</media-control-bar>
|
|
1531
|
+
<div slot="centered-chrome" class="center-controls">
|
|
1532
|
+
{{>SeekBackwardButton section="center"}} {{>PlayButton section="center"}} {{>SeekForwardButton
|
|
1533
|
+
section="center"}}
|
|
1534
|
+
</div>
|
|
1535
|
+
{{>TimeRange}}
|
|
1536
|
+
<media-control-bar>
|
|
1537
|
+
{{>MuteButton}} {{>VolumeRange}}
|
|
1538
|
+
<div class="spacer"></div>
|
|
1539
|
+
{{>CaptionsButton}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
|
|
1540
|
+
</media-control-bar>
|
|
1541
|
+
</template>
|
|
1542
|
+
|
|
1543
|
+
<template if="layout == 'dvr large'">
|
|
1544
|
+
<media-control-bar slot="top-chrome">
|
|
1545
|
+
<slot name="seek-live"></slot>
|
|
1546
|
+
{{>TitleDisplay}}
|
|
1547
|
+
</media-control-bar>
|
|
1548
|
+
<div slot="centered-chrome" class="center-controls">{{>PlayButton section="center"}}</div>
|
|
1549
|
+
{{>TimeRange}}
|
|
1550
|
+
<media-control-bar>
|
|
1551
|
+
{{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>MuteButton}} {{>VolumeRange}}
|
|
1552
|
+
<div class="spacer"></div>
|
|
1553
|
+
{{>CaptionsButton}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
|
|
1554
|
+
</media-control-bar>
|
|
1555
|
+
</template>
|
|
1556
|
+
|
|
1557
|
+
<slot></slot>
|
|
1558
|
+
</media-controller>
|
|
1559
|
+
</template>
|
|
1560
|
+
`;var Gn=`
|
|
1561
|
+
:host {
|
|
1562
|
+
z-index: 100;
|
|
1563
|
+
display: flex;
|
|
1564
|
+
justify-content: center;
|
|
1565
|
+
align-items: center;
|
|
1566
|
+
width: 100%;
|
|
1567
|
+
height: 100%;
|
|
1568
|
+
position: absolute;
|
|
1569
|
+
top: 0;
|
|
1570
|
+
left: 0;
|
|
1571
|
+
box-sizing: border-box;
|
|
1572
|
+
color: #fff;
|
|
1573
|
+
line-height: 18px;
|
|
1574
|
+
font-family: Arial, sans-serif;
|
|
1575
|
+
padding: var(--media-dialog-backdrop-padding, 0);
|
|
1576
|
+
background: var(--media-dialog-backdrop-background,
|
|
1577
|
+
linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))
|
|
1578
|
+
);
|
|
1579
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1580
|
+
transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;
|
|
1581
|
+
transform: var(--media-dialog-transform-open, none) !important;
|
|
1582
|
+
visibility: visible !important;
|
|
1583
|
+
opacity: 1 !important;
|
|
1584
|
+
pointer-events: auto !important;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
:host(:not([open])) {
|
|
1588
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1589
|
+
transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;
|
|
1590
|
+
transform: var(--media-dialog-transform-close, none) !important;
|
|
1591
|
+
visibility: hidden !important;
|
|
1592
|
+
opacity: 0 !important;
|
|
1593
|
+
pointer-events: none !important;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
:focus-visible {
|
|
1597
|
+
box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
.dialog {
|
|
1601
|
+
position: relative;
|
|
1602
|
+
box-sizing: border-box;
|
|
1603
|
+
background: var(--media-dialog-background, none);
|
|
1604
|
+
padding: var(--media-dialog-padding, 10px);
|
|
1605
|
+
width: min(320px, 100%);
|
|
1606
|
+
word-wrap: break-word;
|
|
1607
|
+
max-height: 100%;
|
|
1608
|
+
overflow: auto;
|
|
1609
|
+
text-align: center;
|
|
1610
|
+
line-height: 1.4;
|
|
1611
|
+
}
|
|
1612
|
+
`,Zn=H.createElement("template");Zn.innerHTML=`
|
|
1613
|
+
<style>
|
|
1614
|
+
${Gn}
|
|
1615
|
+
</style>
|
|
1616
|
+
|
|
1617
|
+
<div class="dialog">
|
|
1618
|
+
<slot></slot>
|
|
1619
|
+
</div>
|
|
1620
|
+
`;var ve=class extends D.HTMLElement{constructor(){var t;super();this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),Yn(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),tl(this))}attributeChangedCallback(t,a,r){t==="open"&&a!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&Yn(this)}};ve.styles=Gn,ve.template=Zn,ve.observedAttributes=["open"];function Yn(i){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(i.dispatchEvent(e),e.defaultPrevented)return;let t=i.querySelector("[autofocus]:not([disabled])");!t&&i.tabIndex>=0&&(t=i),t||(t=qn(i.shadowRoot)),i._previouslyFocusedElement=H.activeElement,H.activeElement instanceof HTMLElement&&H.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function qn(i){let t=["button","input","keygen","select","textarea"].map(function(r){return r+":not([disabled])"});t.push('[tabindex]:not([disabled]):not([tabindex=""])');let a=i==null?void 0:i.querySelector(t.join(", "));if(!a&&"attachShadow"in Element.prototype){let r=(i==null?void 0:i.querySelectorAll("*"))||[];for(let n=0;n<r.length&&!(r[n].tagName&&r[n].shadowRoot&&(a=qn(r[n].shadowRoot),a));n++);}return a}function tl(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}D.customElements.get("media-dialog")||(D.customElements.define("media-dialog",ve),D.MediaDialog=ve);var Na=ve;var Qn=H.createElement("template");Qn.innerHTML=`
|
|
1621
|
+
<style>
|
|
1622
|
+
${Na.styles}
|
|
1623
|
+
|
|
1624
|
+
.close {
|
|
1625
|
+
background: none;
|
|
1626
|
+
color: inherit;
|
|
1627
|
+
border: none;
|
|
1628
|
+
padding: 0;
|
|
1629
|
+
font: inherit;
|
|
1630
|
+
cursor: pointer;
|
|
1631
|
+
outline: inherit;
|
|
1632
|
+
width: 28px;
|
|
1633
|
+
height: 28px;
|
|
1634
|
+
position: absolute;
|
|
1635
|
+
top: 1rem;
|
|
1636
|
+
right: 1rem;
|
|
1637
|
+
}
|
|
1638
|
+
</style>
|
|
1639
|
+
|
|
1640
|
+
<div class="dialog">
|
|
1641
|
+
<slot></slot>
|
|
1642
|
+
</div>
|
|
1643
|
+
|
|
1644
|
+
<slot name="close">
|
|
1645
|
+
<button class="close" tabindex="0">
|
|
1646
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1647
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
1648
|
+
</svg>
|
|
1649
|
+
</button>
|
|
1650
|
+
</slot>
|
|
1651
|
+
`;var yt=class extends Na{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};yt.template=Qn;D.customElements.get("mxp-dialog")||(D.customElements.define("mxp-dialog",yt),D.MxpDialog=yt);var Tt=new WeakMap,It=class{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=Tt.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let t=Tt.get(this.element);t&&t.delete(this.type)}}static for(e){Tt.has(e.element)||Tt.set(e.element,new Map);let t=e.attributeName.slice(2),a=Tt.get(e.element);return a&&a.has(t)?a.get(t):new It(e.element,t)}};function il(i,e){return i instanceof Y&&i.attributeName.startsWith("on")?(It.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function al(i,e){return e instanceof gi&&i instanceof se?(e.renderInto(i),!0):!1}function rl(i,e){return e instanceof DocumentFragment&&i instanceof se?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function nl(i,e){if(i instanceof Y){let t=i.attributeNamespace,a=i.element.getAttributeNS(t,i.attributeName);return String(e)!==a&&(i.value=String(e)),!0}return i.value=String(e),!0}function ol(i,e){if(typeof e=="boolean"&&i instanceof Y){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function sl(i,e){return e===!1&&i instanceof se?(i.replace(""),!0):!1}function ll(i,e){ol(i,e)||il(i,e)||sl(i,e)||al(i,e)||rl(i,e)||nl(i,e)}var Ba=new Map,zn=new WeakMap,Xn=new WeakMap,gi=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Ba.has(this.stringsKey))return Ba.get(this.stringsKey);{let e=H.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),Ba.set(this.stringsKey,e),e}}renderInto(e){let t=this.template;if(zn.get(e)!==t){zn.set(e,t);let r=new oe(t,this.values,this.processor);Xn.set(e,r),e instanceof se?e.replace(...r.children):e.appendChild(r);return}let a=Xn.get(e);a&&a.update(this.values)}},dl={processCallback(i,e,t){var a;if(!!t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";ll(n,s)}}}};function X(i,...e){return new gi(i,e,dl)}function jn(i,e){i.renderInto(e)}var De=require("@mux/playback-core"),$a=H.createElement("template");"innerHTML"in $a&&($a.innerHTML=Kn);var Jn=i=>X`
|
|
1616
1652
|
<style>
|
|
1617
|
-
${
|
|
1653
|
+
${Fn}
|
|
1618
1654
|
</style>
|
|
1619
|
-
${
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1655
|
+
${$a.content.cloneNode(!0)}
|
|
1656
|
+
${ml(i)}
|
|
1657
|
+
`,Va=i=>[De.StreamTypes.LIVE,De.StreamTypes.LL_LIVE].includes(i.streamType),Ha=i=>[De.StreamTypes.LIVE,De.StreamTypes.LL_LIVE,De.StreamTypes.DVR,De.StreamTypes.LL_DVR].includes(i.streamType),ul=i=>{let e="";return i.audio&&(e+="audio "),Va(i)?e+="live":Ha(i)?e+="dvr":e+=i.streamType||"on-demand",!i.audio&&i.playerSize&&(e+=` ${i.playerSize}`),e},cl=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Ha(i)&&(e+=" noarrowleft noarrowright"),e},ml=i=>{var e,t,a,r,n,s,l,c,m,E,f,w,T,P,M,R,L,G,Z,ie,Re,wt,Ka,Ya,Ga,Za,qa,Qa,za,Xa,ja,Ja;return X`
|
|
1658
|
+
<media-theme
|
|
1659
|
+
template="${(e=i.theme)!=null?e:"media-theme-mux"}"
|
|
1660
|
+
class="size-${i.playerSize}${i.secondaryColor?" two-tone":""}"
|
|
1661
|
+
player-size="${(t=i.playerSize)!=null?t:!1}"
|
|
1662
|
+
layout="${ul(i)}"
|
|
1663
|
+
hotkeys="${cl(i)||!1}"
|
|
1664
|
+
nohotkeys="${i.noHotKeys||!i.hasSrc||i.isDialogOpen||!1}"
|
|
1665
|
+
disabled="${!i.hasSrc||i.isDialogOpen}"
|
|
1666
|
+
audio="${(a=i.audio)!=null?a:!1}"
|
|
1667
|
+
style="${(r=bn({"--primary-color":i.primaryColor,"--secondary-color":i.secondaryColor}))!=null?r:!1}"
|
|
1668
|
+
default-showing-captions="${!i.defaultHiddenCaptions}"
|
|
1669
|
+
forward-seek-offset="${(n=i.forwardSeekOffset)!=null?n:!1}"
|
|
1670
|
+
backward-seek-offset="${(s=i.backwardSeekOffset)!=null?s:!1}"
|
|
1671
|
+
playback-rates="${(l=i.playbackRates)!=null?l:!1}"
|
|
1672
|
+
default-show-remaining-time="${(c=i.defaultShowRemainingTime)!=null?c:!1}"
|
|
1673
|
+
title="${(m=i.title)!=null?m:!1}"
|
|
1674
|
+
poster="${i.poster===""?!1:(E=i.poster)!=null?E:!1}"
|
|
1675
|
+
placeholder="${(f=i.placeholder)!=null?f:!1}"
|
|
1639
1676
|
exportparts="top, center, bottom, layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer, poster, seek-live, play, button, seek-backward, seek-forward, mute, captions, airplay, pip, fullscreen, cast, playback-rate, volume, range, time, display"
|
|
1640
1677
|
>
|
|
1641
1678
|
<mux-video
|
|
1642
1679
|
slot="media"
|
|
1643
|
-
crossorigin="${(
|
|
1680
|
+
crossorigin="${(w=i.crossOrigin)!=null?w:""}"
|
|
1644
1681
|
playsinline
|
|
1645
|
-
autoplay="${(
|
|
1646
|
-
muted="${(
|
|
1647
|
-
loop="${(
|
|
1648
|
-
preload="${(
|
|
1649
|
-
debug="${(
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
stream-type="${(
|
|
1663
|
-
custom-domain="${(ja=t.customDomain)!=null?ja:!1}"
|
|
1664
|
-
src="${t.src?t.src:t.playbackId?Ma(t.playbackId,{domain:t.customDomain,token:t.tokens.playback}):!1}"
|
|
1665
|
-
cast-src="${t.src?t.src:t.playbackId?Ma(t.playbackId,{domain:t.customDomain,token:t.tokens.playback}):!1}"
|
|
1666
|
-
cast-stream-type="${Co(t)?"live":!1}"
|
|
1682
|
+
autoplay="${(T=i.autoplay)!=null?T:!1}"
|
|
1683
|
+
muted="${(P=i.muted)!=null?P:!1}"
|
|
1684
|
+
loop="${(M=i.loop)!=null?M:!1}"
|
|
1685
|
+
preload="${(R=i.preload)!=null?R:!1}"
|
|
1686
|
+
debug="${(L=i.debug)!=null?L:!1}"
|
|
1687
|
+
prefer-cmcd="${(G=i.preferCmcd)!=null?G:!1}"
|
|
1688
|
+
disable-cookies="${(Z=i.disableCookies)!=null?Z:!1}"
|
|
1689
|
+
prefer-playback="${(ie=i.preferPlayback)!=null?ie:!1}"
|
|
1690
|
+
start-time="${i.startTime!=null?i.startTime:!1}"
|
|
1691
|
+
beacon-collection-domain="${(Re=i.beaconCollectionDomain)!=null?Re:!1}"
|
|
1692
|
+
player-software-name="${(wt=i.playerSoftwareName)!=null?wt:!1}"
|
|
1693
|
+
player-software-version="${(Ka=i.playerSoftwareVersion)!=null?Ka:!1}"
|
|
1694
|
+
env-key="${(Ya=i.envKey)!=null?Ya:!1}"
|
|
1695
|
+
stream-type="${(Ga=i.streamType)!=null?Ga:!1}"
|
|
1696
|
+
custom-domain="${(Za=i.customDomain)!=null?Za:!1}"
|
|
1697
|
+
src="${i.src?i.src:i.playbackId?wa(i.playbackId,{domain:i.customDomain,token:i.tokens.playback}):!1}"
|
|
1698
|
+
cast-src="${i.src?i.src:i.playbackId?wa(i.playbackId,{domain:i.customDomain,token:i.tokens.playback}):!1}"
|
|
1699
|
+
cast-stream-type="${Va(i)?"live":!1}"
|
|
1667
1700
|
exportparts="video"
|
|
1668
1701
|
>
|
|
1669
|
-
${
|
|
1702
|
+
${i.storyboard?X`<track label="thumbnails" default kind="metadata" src="${i.storyboard}" />`:X``}
|
|
1670
1703
|
</mux-video>
|
|
1671
|
-
${
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1704
|
+
${Ha(i)?X`<button
|
|
1705
|
+
slot="seek-live"
|
|
1706
|
+
part="${Va(i)?"top":"bottom"} seek-live button"
|
|
1707
|
+
disabled="${i.inLiveWindow||!i.hasSrc||i.isDialogOpen}"
|
|
1708
|
+
aria-disabled="${(i.inLiveWindow||!i.hasSrc||i.isDialogOpen)&&"true"}"
|
|
1709
|
+
in-live-window="${i.inLiveWindow}"
|
|
1710
|
+
onclick="${function(lo){var er;if((er=i.onSeekToLive)==null||er.call(i,lo),i.paused){let uo=new CustomEvent("mediaplayrequest",{composed:!0,bubbles:!0});this.dispatchEvent(uo)}}}"
|
|
1711
|
+
>
|
|
1712
|
+
<svg viewBox="0 0 8 8"><circle cx="4" cy="4" r="4"></circle></svg>
|
|
1713
|
+
Live
|
|
1714
|
+
</button>`:X``}
|
|
1682
1715
|
<mxp-dialog
|
|
1683
1716
|
no-auto-hide
|
|
1684
|
-
open="${(
|
|
1685
|
-
onclose="${
|
|
1686
|
-
oninitfocus="${
|
|
1717
|
+
open="${(qa=i.isDialogOpen)!=null?qa:!1}"
|
|
1718
|
+
onclose="${i.onCloseErrorDialog}"
|
|
1719
|
+
oninitfocus="${i.onInitFocusDialog}"
|
|
1687
1720
|
>
|
|
1688
|
-
${(
|
|
1721
|
+
${(Qa=i.dialog)!=null&&Qa.title?X`<h3>${i.dialog.title}</h3>`:X``}
|
|
1689
1722
|
<p>
|
|
1690
|
-
${(
|
|
1691
|
-
${(
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1723
|
+
${(za=i.dialog)==null?void 0:za.message}
|
|
1724
|
+
${(Xa=i.dialog)!=null&&Xa.linkUrl?X`<a
|
|
1725
|
+
href="${i.dialog.linkUrl}"
|
|
1726
|
+
target="_blank"
|
|
1727
|
+
rel="external noopener"
|
|
1728
|
+
aria-label="${(ja=i.dialog.linkText)!=null?ja:""} ${y("(opens in a new window)")}"
|
|
1729
|
+
>${(Ja=i.dialog.linkText)!=null?Ja:i.dialog.linkUrl}</a
|
|
1730
|
+
>`:X``}
|
|
1698
1731
|
</p>
|
|
1699
1732
|
</mxp-dialog>
|
|
1700
|
-
|
|
1701
|
-
`};var St=require("@mux/mux-video");function bi(t,i,e,a,r){var l,c,m;let n={},s={};switch(t.code){case St.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=A("Network Error",r),n.message=t.message,(l=t.data)==null?void 0:l.response.code){case 412:{n.title=A("Video is not currently available",r),n.message=A("The live stream or video file are not yet ready.",r),s.message=A("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=A("Video does not exist",r),n.message="",s.message=A("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=A("Invalid playback URL",r),n.message=A("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=A("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:f,aud:_,sub:S}=ge(a),y=Date.now()>f*1e3,W=S!==e,P=_!=="v",U={timeStyle:"medium",dateStyle:"medium"};if(y){n.title=A("Video URL has expired",r),n.message=A("The video\u2019s secured playback-token has expired.",r),s.message=A("This playback is using signed URLs and the playback-token has expired. Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(Ce.code,U).format(f*1e3),currentDate:new Intl.DateTimeFormat(Ce.code,U).format(Date.now())}),s.file="403-expired-token.md";break}if(W){n.title=A("Video URL is formatted incorrectly",r),n.message=A("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=A("The specified playback ID {playbackId} and the playback ID encoded in the playback-token {tokenPlaybackId} do not match.",r).format({playbackId:e,tokenPlaybackId:S}),s.file="403-playback-id-mismatch.md";break}if(P){n.title=A("Video URL is formatted incorrectly",r),n.message=A("The playback-token is formatted with incorrect information.",r),s.message=A("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:_}),s.file="403-incorrect-aud-value.md";break}s.message=A("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case St.MediaError.MEDIA_ERR_DECODE:{let{message:f}=t;n={title:A("Media Error",r),message:f},s.file="media-decode-error.md";break}case St.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let f=(m=(c=t.data)==null?void 0:c.response)==null?void 0:m.code;if(f>=400&&f<500){t.code=St.MediaError.MEDIA_ERR_NETWORK,t.data={response:{code:f}},{dialog:n,devlog:s}=bi(t,i,e,a);break}n={title:A("Source Not Supported",r),message:t.message},s.file="media-src-not-supported.md";break}default:n={title:A("Error",r),message:t.message};break}return i&&(n={title:A("Your device appears to be offline",r),message:A("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var td=Object.values(M.StreamTypes),id=700,ad=300,Ua={LG:"large",SM:"small",XS:"extra-small"};function Ei(t){let i=t.getBoundingClientRect();return i.width<ad?Ua.XS:i.width<id?Ua.SM:Ua.LG}var pe={SRC:"src",POSTER:"poster"},E={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",TITLE:"title",PLACEHOLDER:"placeholder"};function rd(t,i){var a,r;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src,poster:t.poster,storyboard:t.storyboard,placeholder:t.getAttribute("placeholder"),theme:t.getAttribute("theme"),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(E.NOHOTKEYS),hotKeys:t.getAttribute(E.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,experimentalCmcd:t.experimentalCmcd,preferCmcd:t.preferCmcd,debug:t.debug,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,metadata:t.metadata,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,streamType:t.streamType,primaryColor:t.primaryColor,secondaryColor:t.secondaryColor,forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultShowRemainingTime:t.defaultShowRemainingTime,playbackRates:t.getAttribute(E.PLAYBACK_RATES),customDomain:(a=t.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,playerSize:Ei((r=t.mediaController)!=null?r:t),metadataVideoId:t.getAttribute(g.Attributes.METADATA_VIDEO_ID),metadataVideoTitle:t.getAttribute(g.Attributes.METADATA_VIDEO_TITLE),metadataViewerUserId:t.getAttribute(g.Attributes.METADATA_VIEWER_USER_ID),title:t.getAttribute(E.TITLE),...i}}var nd=Object.values(g.Attributes),od=Object.values(pe),sd=Object.values(E),ld=ai(),dd="mux-player",xo={dialog:void 0,isDialogOpen:!1,inLiveWindow:!1},Ue,Ct,be,wt,Je,te,et,fi,Ie,Xe,tt,gi,xt,Oa,vi,Do,Ai,Ro,_i,Po,yi,Uo,Ti,Oo,Ii,No,Lt=class extends Ca{constructor(){super();T(this,et);T(this,Ie);T(this,tt);T(this,xt);T(this,vi);T(this,Ai);T(this,_i);T(this,yi);T(this,Ti);T(this,Ii);T(this,Ue,!1);T(this,Ct,{});T(this,be,!0);T(this,wt,new ii(this,"hotkeys"));T(this,Je,void 0);T(this,te,{...xo,onCloseErrorDialog:()=>I(this,Ie,Xe).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:e=>{Ta(this,Z.activeElement)||e.preventDefault()},onSeekToLive:()=>Sa(this)});this.attachShadow({mode:"open"}),this.isConnected&&I(this,et,fi).call(this)}static get observedAttributes(){var e;return[...(e=Ca.observedAttributes)!=null?e:[],...od,...nd,...sd]}get theme(){var e,a;return Array.from((a=(e=this.shadowRoot)==null?void 0:e.children)!=null?a:[]).find(({localName:r})=>r.startsWith("media-theme-"))}get mediaController(){var e,a;return(a=(e=this.theme)==null?void 0:e.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){I(this,xt,Oa).call(this),I(this,vi,Do).call(this)}disconnectedCallback(){I(this,Ai,Ro).call(this)}attributeChangedCallback(e,a,r){switch(v(this,Ue)||I(this,et,fi).call(this),super.attributeChangedCallback(e,a,r),e){case E.HOTKEYS:v(this,wt).value=r;break;case E.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&ve(A("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case E.THUMBNAIL_TOKEN:{let{aud:s}=ge(r);r&&s!=="t"&&ve(A("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case E.STORYBOARD_TOKEN:{let{aud:s}=ge(r);r&&s!=="s"&&ve(A("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case g.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&J(A("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r})),this.streamType?this.streamType!=null&&!td.includes(this.streamType)&&ri({file:"invalid-stream-type.md",message:A("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand`, `live`, `ll-live`, `live:dvr`, or `ll-live:dvr`").format({streamType:this.streamType})}):ri({file:"invalid-stream-type.md",message:String(A("No stream-type value supplied. Defaulting to `on-demand`. Please provide stream-type as either: `on-demand`, `live`, `ll-live`, `live:dvr`, or `ll-live:dvr`"))});break}}[g.Attributes.PLAYBACK_ID,pe.SRC,E.PLAYBACK_TOKEN].includes(e)&&a!==r&&$(this,te,{...v(this,te),...xo}),I(this,tt,gi).call(this,{[In(e)]:r})}get experimentalCmcd(){return this.hasAttribute(g.Attributes.EXPERIMENTAL_CMCD)}set experimentalCmcd(e){!!e!==this.experimentalCmcd&&(e?this.setAttribute(g.Attributes.EXPERIMENTAL_CMCD,""):this.removeAttribute(g.Attributes.EXPERIMENTAL_CMCD))}get preferCmcd(){var e;return(e=this.getAttribute(g.Attributes.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?M.CmcdTypeValues.includes(e)?this.setAttribute(g.Attributes.PREFER_CMCD,e):ve(`Invalid value for preferCmcd. Must be one of ${M.CmcdTypeValues.join()}`):this.removeAttribute(g.Attributes.PREFER_CMCD))}get hasPlayed(){var e,a;return(a=(e=this.mediaController)==null?void 0:e.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){return v(this,te).inLiveWindow}get _hls(){var e;return(e=this.media)==null?void 0:e._hls}get mux(){var e;return(e=this.media)==null?void 0:e.mux}get playbackId(){var e;return(e=this.getAttribute(g.Attributes.PLAYBACK_ID))!=null?e:void 0}set playbackId(e){e?this.setAttribute(g.Attributes.PLAYBACK_ID,e):this.removeAttribute(g.Attributes.PLAYBACK_ID)}get src(){var e,a;return this.playbackId?(e=Te(this,pe.SRC))!=null?e:void 0:(a=this.getAttribute(pe.SRC))!=null?a:void 0}set src(e){e?this.setAttribute(pe.SRC,e):this.removeAttribute(pe.SRC)}get poster(){var a;let e=this.getAttribute(pe.POSTER);if(e!=null)return e;if(this.playbackId&&!this.audio)return yn(this.playbackId,{domain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(e){e||e===""?this.setAttribute(pe.POSTER,e):this.removeAttribute(pe.POSTER)}get storyboard(){if(this.playbackId&&!this.audio&&(!this.streamType||![M.StreamTypes.LIVE,M.StreamTypes.LL_LIVE,M.StreamTypes.DVR,M.StreamTypes.LL_DVR].includes(this.streamType)))return Tn(this.playbackId,{domain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(E.AUDIO)}set audio(e){if(!e){this.removeAttribute(E.AUDIO);return}this.setAttribute(E.AUDIO,"")}get hotkeys(){return v(this,wt)}get nohotkeys(){return this.hasAttribute(E.NOHOTKEYS)}set nohotkeys(e){if(!e){this.removeAttribute(E.NOHOTKEYS);return}this.setAttribute(E.NOHOTKEYS,"")}get thumbnailTime(){return ne(this.getAttribute(E.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(E.THUMBNAIL_TIME,`${e}`)}get title(){var e;return(e=this.getAttribute(E.TITLE))!=null?e:""}set title(e){e!==this.title&&(e?this.setAttribute(E.TITLE,e):this.removeAttribute("title"),super.title=e)}get placeholder(){var e;return(e=Te(this,E.PLACEHOLDER))!=null?e:""}set placeholder(e){this.setAttribute(E.PLACEHOLDER,`${e}`)}get primaryColor(){var e;return(e=this.getAttribute(E.PRIMARY_COLOR))!=null?e:void 0}set primaryColor(e){this.setAttribute(E.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e;return(e=this.getAttribute(E.SECONDARY_COLOR))!=null?e:"rgb(0 0 0 / .65)"}set secondaryColor(e){this.setAttribute(E.SECONDARY_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(E.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(E.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(E.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(!!this.hasAttribute(E.PLAYBACK_RATES))return this.getAttribute(E.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,a)=>e-a)}set playbackRates(e){if(!e){this.removeAttribute(E.PLAYBACK_RATES);return}this.setAttribute(E.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return(e=ne(this.getAttribute(E.FORWARD_SEEK_OFFSET)))!=null?e:10}set forwardSeekOffset(e){this.setAttribute(E.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return(e=ne(this.getAttribute(E.BACKWARD_SEEK_OFFSET)))!=null?e:10}set backwardSeekOffset(e){this.setAttribute(E.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(E.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(E.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(E.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var e;return(e=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_NAME))!=null?e:dd}get playerSoftwareVersion(){var e;return(e=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_VERSION))!=null?e:ld}get beaconCollectionDomain(){var e;return(e=this.getAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))}get customDomain(){var e;return(e=this.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(g.Attributes.CUSTOM_DOMAIN,e):this.removeAttribute(g.Attributes.CUSTOM_DOMAIN))}get envKey(){var e;return(e=Te(this,g.Attributes.ENV_KEY))!=null?e:void 0}set envKey(e){this.setAttribute(g.Attributes.ENV_KEY,`${e}`)}get debug(){return Te(this,g.Attributes.DEBUG)!=null}set debug(e){e?this.setAttribute(g.Attributes.DEBUG,""):this.removeAttribute(g.Attributes.DEBUG)}get disableCookies(){return Te(this,g.Attributes.DISABLE_COOKIES)!=null}set disableCookies(e){e?this.setAttribute(g.Attributes.DISABLE_COOKIES,""):this.removeAttribute(g.Attributes.DISABLE_COOKIES)}get streamType(){return Te(this,g.Attributes.STREAM_TYPE)}set streamType(e){this.setAttribute(g.Attributes.STREAM_TYPE,`${e}`)}get startTime(){return ne(Te(this,g.Attributes.START_TIME))}set startTime(e){this.setAttribute(g.Attributes.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(g.Attributes.PREFER_PLAYBACK);if(e===M.PlaybackTypes.MSE||e===M.PlaybackTypes.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===M.PlaybackTypes.MSE||e===M.PlaybackTypes.NATIVE?this.setAttribute(g.Attributes.PREFER_PLAYBACK,e):this.removeAttribute(g.Attributes.PREFER_PLAYBACK))}get metadata(){var e;return(e=this.media)==null?void 0:e.metadata}set metadata(e){if(v(this,Ue)||I(this,et,fi).call(this),!this.media){J("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata=e}get tokens(){let e=this.getAttribute(E.PLAYBACK_TOKEN),a=this.getAttribute(E.THUMBNAIL_TOKEN),r=this.getAttribute(E.STORYBOARD_TOKEN);return{...v(this,Ct),...e!=null?{playback:e}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(e){$(this,Ct,e!=null?e:{})}get playbackToken(){var e;return(e=this.getAttribute(E.PLAYBACK_TOKEN))!=null?e:void 0}set playbackToken(e){this.setAttribute(E.PLAYBACK_TOKEN,`${e}`)}get thumbnailToken(){var e;return(e=this.getAttribute(E.THUMBNAIL_TOKEN))!=null?e:void 0}set thumbnailToken(e){this.setAttribute(E.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return(e=this.getAttribute(E.STORYBOARD_TOKEN))!=null?e:void 0}set storyboardToken(e){this.setAttribute(E.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,a,r,n){var l;let s=(l=this.media)==null?void 0:l.nativeEl;if(!!s)return(0,M.addTextTrack)(s,e,a,r,n)}removeTextTrack(e){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,M.removeTextTrack)(a,e)}get textTracks(){var e;return(e=this.media)==null?void 0:e.textTracks}};Ue=new WeakMap,Ct=new WeakMap,be=new WeakMap,wt=new WeakMap,Je=new WeakMap,te=new WeakMap,et=new WeakSet,fi=function(){var e,a,r;if(!v(this,Ue)){$(this,Ue,!0),I(this,Ie,Xe).call(this,{playerSize:Ei(this)});try{if(customElements.upgrade(this.theme),!(this.theme instanceof k.HTMLElement))throw""}catch{J(`<${(e=this.theme)==null?void 0:e.localName}> failed to upgrade!`)}try{if(customElements.upgrade(this.media),!(this.media instanceof g.default))throw""}catch{J("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof mt))throw""}catch{J("<media-controller> failed to upgrade!")}xn(this),I(this,yi,Uo).call(this),I(this,Ti,Oo).call(this),I(this,_i,Po).call(this),$(this,be,(r=(a=this.mediaController)==null?void 0:a.hasAttribute("user-inactive"))!=null?r:!0),I(this,Ii,No).call(this)}},Ie=new WeakSet,Xe=function(e){Object.assign(v(this,te),e),I(this,tt,gi).call(this)},tt=new WeakSet,gi=function(e={}){di(wo(rd(this,{...v(this,te),...e})),this.shadowRoot)},xt=new WeakSet,Oa=function(){var e,a;v(this,te).playerSize!=Ei((e=this.mediaController)!=null?e:this)&&I(this,Ie,Xe).call(this,{playerSize:Ei((a=this.mediaController)!=null?a:this)})},vi=new WeakSet,Do=function(){var e;$(this,Je,new ResizeObserver(()=>I(this,xt,Oa).call(this))),v(this,Je).observe((e=this.mediaController)!=null?e:this)},Ai=new WeakSet,Ro=function(){var e;(e=v(this,Je))==null||e.disconnect()},_i=new WeakSet,Po=function(){var a,r,n,s,l;(a=this.mediaController)==null||a.addEventListener("mediaplayrequest",c=>{var m;((m=c.target)==null?void 0:m.localName)==="media-play-button"&&this.streamType&&[M.StreamTypes.LIVE,M.StreamTypes.LL_LIVE,M.StreamTypes.DVR,M.StreamTypes.LL_DVR].includes(this.streamType)&&this.hasPlayed&&Sa(this)});let e=()=>{let c=kn(this),m=v(this,te).inLiveWindow;c!==m&&(I(this,Ie,Xe).call(this,{inLiveWindow:c}),this.dispatchEvent(new CustomEvent("inlivewindowchange",{composed:!0,bubbles:!0,detail:this.inLiveWindow})))};(r=this.media)==null||r.addEventListener("progress",e),(n=this.media)==null||n.addEventListener("waiting",e),(s=this.media)==null||s.addEventListener("timeupdate",e),(l=this.media)==null||l.addEventListener("emptied",e)},yi=new WeakSet,Uo=function(){var a;let e=r=>{let{detail:n}=r;if(n instanceof g.MediaError||(n=new g.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){ve(n),n.data&&ve(`${n.name} data:`,n.data);return}let{dialog:s,devlog:l}=bi(n,!window.navigator.onLine,this.playbackId,this.playbackToken);l.message&&ri(l),J(n),n.data&&J(`${n.name} data:`,n.data),I(this,Ie,Xe).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(r={})=>{var s,l,c;if(!((s=this.media)!=null&&s.error))return r;let{devlog:n}=bi((l=this.media)==null?void 0:l.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(c=this.media)==null?void 0:c.error.code,player_error_message:n.message?String(n.message):r.player_error_message}}),(a=this.media)==null||a.addEventListener("error",r=>{var s,l;let{detail:n}=r;if(!n){let{message:c,code:m}=(l=(s=this.media)==null?void 0:s.error)!=null?l:{};n=new g.MediaError(c,m)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Ti=new WeakSet,Oo=function(){var a,r,n,s;let e=()=>I(this,tt,gi).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",e),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.addEventListener("removetrack",e)},Ii=new WeakSet,No=function(){var f,_,S;let e=this.mediaController,a=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(a)return;let r,n=new WeakMap,s=()=>this.streamType&&[M.StreamTypes.LIVE,M.StreamTypes.LL_LIVE].includes(this.streamType)&&!this.secondaryColor&&this.offsetWidth>=800,l=(y,W,P=!1)=>{if(s())return;Array.from(y&&y.activeCues||[]).forEach(C=>{if(!(!C.snapToLines||C.line<-5||C.line>=0&&C.line<10))if(!W||this.paused){let ie=C.text.split(`
|
|
1702
|
-
`).length,
|
|
1733
|
+
</media-theme>
|
|
1734
|
+
`};var Mt=require("@mux/mux-video");function Ai(i,e,t,a,r){var l,c,m;let n={},s={};switch(i.code){case Mt.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(l=i.data)==null?void 0:l.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:E,aud:f,sub:w}=he(a),T=Date.now()>E*1e3,P=w!==t,M=f!=="v",R={timeStyle:"medium",dateStyle:"medium"};if(T){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("This playback is using signed URLs and the playback-token has expired. Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(Me.code,R).format(E*1e3),currentDate:new Intl.DateTimeFormat(Me.code,R).format(Date.now())}),s.file="403-expired-token.md";break}if(P){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The specified playback ID {playbackId} and the playback ID encoded in the playback-token {tokenPlaybackId} do not match.",r).format({playbackId:t,tokenPlaybackId:w}),s.file="403-playback-id-mismatch.md";break}if(M){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:f}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case Mt.MediaError.MEDIA_ERR_DECODE:{let{message:E}=i;n={title:y("Media Error",r),message:E},s.file="media-decode-error.md";break}case Mt.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let E=(m=(c=i.data)==null?void 0:c.response)==null?void 0:m.code;if(E>=400&&E<500){i.code=Mt.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:E}},{dialog:n,devlog:s}=Ai(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var hl=Object.values(k.StreamTypes),pl=700,bl=300,Wa={LG:"large",SM:"small",XS:"extra-small"};function _i(i){let e=i.getBoundingClientRect();return e.width<bl?Wa.XS:e.width<pl?Wa.SM:Wa.LG}var le={SRC:"src",POSTER:"poster"},b={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",TITLE:"title",PLACEHOLDER:"placeholder"};function El(i,e){var a,r;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src,poster:i.poster,storyboard:i.storyboard,placeholder:i.getAttribute("placeholder"),theme:i.getAttribute("theme"),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(b.NOHOTKEYS),hotKeys:i.getAttribute(b.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,metadata:i.metadata,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,preferPlayback:i.preferPlayback,audio:i.audio,streamType:i.streamType,primaryColor:i.primaryColor,secondaryColor:i.secondaryColor,forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultShowRemainingTime:i.defaultShowRemainingTime,playbackRates:i.getAttribute(b.PLAYBACK_RATES),customDomain:(a=i.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,playerSize:_i((r=i.mediaController)!=null?r:i),title:i.getAttribute(b.TITLE),...e}}var fl=Object.values(g.Attributes),vl=Object.values(le),gl=Object.values(b),Al=di(),_l="mux-player",eo={dialog:void 0,isDialogOpen:!1,inLiveWindow:!1},xe,St,de,Lt,ze,te,Xe,yi,Ii,to,Ae,Qe,je,Ti,Ct,Fa,Mi,io,ki,ao,Si,ro,Li,no,Ci,oo,wi,so,kt=class extends Ra{constructor(){super();I(this,Xe);I(this,Ii);I(this,Ae);I(this,je);I(this,Ct);I(this,Mi);I(this,ki);I(this,Si);I(this,Li);I(this,Ci);I(this,wi);I(this,xe,!1);I(this,St,{});I(this,de,!0);I(this,Lt,new li(this,"hotkeys"));I(this,ze,void 0);I(this,te,{...eo,onCloseErrorDialog:()=>S(this,Ae,Qe).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{La(this,H.activeElement)||t.preventDefault()},onSeekToLive:()=>Da(this)});this.attachShadow({mode:"open"}),S(this,Ii,to).call(this),this.isConnected&&S(this,Xe,yi).call(this)}static get observedAttributes(){var t;return[...(t=Ra.observedAttributes)!=null?t:[],...vl,...fl,...gl]}get theme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,a;return(a=(t=this.theme)==null?void 0:t.shadowRoot)==null?void 0:a.querySelector("media-controller")}get metadataFromAttrs(){return this.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,a)=>{let r=this.getAttribute(a);return r!==null&&(t[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),t},{})}connectedCallback(){var a;S(this,Ct,Fa).call(this);let t=(a=this.shadowRoot)==null?void 0:a.querySelector("mux-video");t&&(t.metadata=this.metadataFromAttrs),S(this,Mi,io).call(this)}disconnectedCallback(){S(this,ki,ao).call(this)}attributeChangedCallback(t,a,r){switch(v(this,xe)||S(this,Xe,yi).call(this),super.attributeChangedCallback(t,a,r),t){case b.HOTKEYS:v(this,Lt).value=r;break;case b.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&pe(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case b.THUMBNAIL_TOKEN:{let{aud:s}=he(r);r&&s!=="t"&&pe(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case b.STORYBOARD_TOKEN:{let{aud:s}=he(r);r&&s!=="s"&&pe(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case g.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&J(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r})),this.streamType?this.streamType!=null&&!hl.includes(this.streamType)&&ui({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand`, `live`, `ll-live`, `live:dvr`, or `ll-live:dvr`").format({streamType:this.streamType})}):ui({file:"invalid-stream-type.md",message:String(y("No stream-type value supplied. Defaulting to `on-demand`. Please provide stream-type as either: `on-demand`, `live`, `ll-live`, `live:dvr`, or `ll-live:dvr`"))});break}}[g.Attributes.PLAYBACK_ID,le.SRC,b.PLAYBACK_TOKEN].includes(t)&&a!==r&&V(this,te,{...v(this,te),...eo}),S(this,je,Ti).call(this,{[_n(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(g.Attributes.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?k.CmcdTypeValues.includes(t)?this.setAttribute(g.Attributes.PREFER_CMCD,t):pe(`Invalid value for preferCmcd. Must be one of ${k.CmcdTypeValues.join()}`):this.removeAttribute(g.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){return v(this,te).inLiveWindow}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get playbackId(){var t;return(t=this.getAttribute(g.Attributes.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(g.Attributes.PLAYBACK_ID,t):this.removeAttribute(g.Attributes.PLAYBACK_ID)}get src(){var t,a;return this.playbackId?(t=ge(this,le.SRC))!=null?t:void 0:(a=this.getAttribute(le.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(le.SRC,t):this.removeAttribute(le.SRC)}get poster(){var a;let t=this.getAttribute(le.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return gn(this.playbackId,{domain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(le.POSTER,t):this.removeAttribute(le.POSTER)}get storyboard(){if(this.playbackId&&!this.audio&&(!this.streamType||![k.StreamTypes.LIVE,k.StreamTypes.LL_LIVE,k.StreamTypes.DVR,k.StreamTypes.LL_DVR].includes(this.streamType)))return An(this.playbackId,{domain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(b.AUDIO)}set audio(t){if(!t){this.removeAttribute(b.AUDIO);return}this.setAttribute(b.AUDIO,"")}get hotkeys(){return v(this,Lt)}get nohotkeys(){return this.hasAttribute(b.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(b.NOHOTKEYS);return}this.setAttribute(b.NOHOTKEYS,"")}get thumbnailTime(){return re(this.getAttribute(b.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(b.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(b.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(b.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=ge(this,b.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(b.PLACEHOLDER,`${t}`)}get primaryColor(){var t;return(t=this.getAttribute(b.PRIMARY_COLOR))!=null?t:void 0}set primaryColor(t){this.setAttribute(b.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t;return(t=this.getAttribute(b.SECONDARY_COLOR))!=null?t:"rgb(0 0 0 / .65)"}set secondaryColor(t){this.setAttribute(b.SECONDARY_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(b.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(b.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(b.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(!!this.hasAttribute(b.PLAYBACK_RATES))return this.getAttribute(b.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,a)=>t-a)}set playbackRates(t){if(!t){this.removeAttribute(b.PLAYBACK_RATES);return}this.setAttribute(b.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=re(this.getAttribute(b.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(b.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=re(this.getAttribute(b.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(b.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(b.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(b.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(b.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:_l}get playerSoftwareVersion(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:Al}get beaconCollectionDomain(){var t;return(t=this.getAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))}get customDomain(){var t;return(t=this.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(g.Attributes.CUSTOM_DOMAIN,t):this.removeAttribute(g.Attributes.CUSTOM_DOMAIN))}get envKey(){var t;return(t=ge(this,g.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(g.Attributes.ENV_KEY,`${t}`)}get debug(){return ge(this,g.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(g.Attributes.DEBUG,""):this.removeAttribute(g.Attributes.DEBUG)}get disableCookies(){return ge(this,g.Attributes.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(g.Attributes.DISABLE_COOKIES,""):this.removeAttribute(g.Attributes.DISABLE_COOKIES)}get streamType(){return ge(this,g.Attributes.STREAM_TYPE)}set streamType(t){this.setAttribute(g.Attributes.STREAM_TYPE,`${t}`)}get startTime(){return re(ge(this,g.Attributes.START_TIME))}set startTime(t){this.setAttribute(g.Attributes.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(g.Attributes.PREFER_PLAYBACK);if(t===k.PlaybackTypes.MSE||t===k.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===k.PlaybackTypes.MSE||t===k.PlaybackTypes.NATIVE?this.setAttribute(g.Attributes.PREFER_PLAYBACK,t):this.removeAttribute(g.Attributes.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(v(this,xe)||S(this,Xe,yi).call(this),!this.media){J("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...this.metadataFromAttrs,...t}}get tokens(){let t=this.getAttribute(b.PLAYBACK_TOKEN),a=this.getAttribute(b.THUMBNAIL_TOKEN),r=this.getAttribute(b.STORYBOARD_TOKEN);return{...v(this,St),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){V(this,St,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(b.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(b.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(b.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(b.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(b.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(b.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var l;let s=(l=this.media)==null?void 0:l.nativeEl;if(!!s)return(0,k.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,k.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};xe=new WeakMap,St=new WeakMap,de=new WeakMap,Lt=new WeakMap,ze=new WeakMap,te=new WeakMap,Xe=new WeakSet,yi=function(){var t,a;if(!v(this,xe)){V(this,xe,!0),S(this,Ae,Qe).call(this,{playerSize:_i(this)});try{if(customElements.upgrade(this.theme),!(this.theme instanceof D.HTMLElement))throw""}catch{J("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof g.default))throw""}catch{J("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof dt))throw""}catch{J("<media-controller> failed to upgrade!")}Ln(this),S(this,Li,no).call(this),S(this,Ci,oo).call(this),S(this,Si,ro).call(this),V(this,de,(a=(t=this.mediaController)==null?void 0:t.hasAttribute("user-inactive"))!=null?a:!0),S(this,wi,so).call(this)}},Ii=new WeakSet,to=function(){var t,a;try{(t=window==null?void 0:window.CSS)==null||t.registerProperty({name:"--primary-color",syntax:"<color>",inherits:!0,initialValue:"white"}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--secondary-color",syntax:"<color>",inherits:!0,initialValue:"transparent"})}catch{}},Ae=new WeakSet,Qe=function(t){Object.assign(v(this,te),t),S(this,je,Ti).call(this)},je=new WeakSet,Ti=function(t={}){jn(Jn(El(this,{...v(this,te),...t})),this.shadowRoot)},Ct=new WeakSet,Fa=function(){var t,a;v(this,te).playerSize!=_i((t=this.mediaController)!=null?t:this)&&S(this,Ae,Qe).call(this,{playerSize:_i((a=this.mediaController)!=null?a:this)})},Mi=new WeakSet,io=function(){var t;V(this,ze,new ResizeObserver(()=>S(this,Ct,Fa).call(this))),v(this,ze).observe((t=this.mediaController)!=null?t:this)},ki=new WeakSet,ao=function(){var t;(t=v(this,ze))==null||t.disconnect()},Si=new WeakSet,ro=function(){var a,r,n,s,l;(a=this.mediaController)==null||a.addEventListener("mediaplayrequest",c=>{var m;((m=c.target)==null?void 0:m.localName)==="media-play-button"&&this.streamType&&[k.StreamTypes.LIVE,k.StreamTypes.LL_LIVE,k.StreamTypes.DVR,k.StreamTypes.LL_DVR].includes(this.streamType)&&this.hasPlayed&&Da(this)});let t=()=>{let c=Tn(this),m=v(this,te).inLiveWindow;c!==m&&(S(this,Ae,Qe).call(this,{inLiveWindow:c}),this.dispatchEvent(new CustomEvent("inlivewindowchange",{composed:!0,bubbles:!0,detail:this.inLiveWindow})))};(r=this.media)==null||r.addEventListener("progress",t),(n=this.media)==null||n.addEventListener("waiting",t),(s=this.media)==null||s.addEventListener("timeupdate",t),(l=this.media)==null||l.addEventListener("emptied",t)},Li=new WeakSet,no=function(){var a;let t=r=>{let{detail:n}=r;if(n instanceof g.MediaError||(n=new g.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){pe(n),n.data&&pe(`${n.name} data:`,n.data);return}let{dialog:s,devlog:l}=Ai(n,!window.navigator.onLine,this.playbackId,this.playbackToken);l.message&&ui(l),J(n),n.data&&J(`${n.name} data:`,n.data),S(this,Ae,Qe).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,l,c;if(!((s=this.media)!=null&&s.error))return r;let{devlog:n}=Ai((l=this.media)==null?void 0:l.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(c=this.media)==null?void 0:c.error.code,player_error_message:n.message?String(n.message):r.player_error_message}}),(a=this.media)==null||a.addEventListener("error",r=>{var s,l;let{detail:n}=r;if(!n){let{message:c,code:m}=(l=(s=this.media)==null?void 0:s.error)!=null?l:{};n=new g.MediaError(c,m)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Ci=new WeakSet,oo=function(){var a,r,n,s;let t=()=>S(this,je,Ti).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",t),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.addEventListener("removetrack",t)},wi=new WeakSet,so=function(){var E,f,w;let t=this.mediaController,a=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(a)return;let r,n=new WeakMap,s=()=>this.streamType&&[k.StreamTypes.LIVE,k.StreamTypes.LL_LIVE].includes(this.streamType)&&!this.secondaryColor&&this.offsetWidth>=800,l=(T,P,M=!1)=>{if(s())return;Array.from(T&&T.activeCues||[]).forEach(L=>{if(!(!L.snapToLines||L.line<-5||L.line>=0&&L.line<10))if(!P||this.paused){let G=L.text.split(`
|
|
1735
|
+
`).length,Z=a?-2:-3;this.streamType&&[k.StreamTypes.LIVE,k.StreamTypes.LL_LIVE].includes(this.streamType)&&(Z=a?-1:-2);let ie=Z-G;if(L.line===ie&&!M)return;n.has(L)||n.set(L,L.line),L.line=ie-1,L.line=ie}else setTimeout(()=>{L.line=n.get(L)||"auto"},500)})},c=()=>{var T;l(r,(T=t==null?void 0:t.hasAttribute("user-inactive"))!=null?T:!1)},m=()=>{var M;let P=Array.from(((M=t==null?void 0:t.media)==null?void 0:M.textTracks)||[]).filter(R=>["subtitles","captions"].includes(R.kind)&&R.mode==="showing")[0];P!==r&&(r==null||r.removeEventListener("cuechange",c)),r=P,r==null||r.addEventListener("cuechange",c),l(r,v(this,de))};if(m(),(E=t==null?void 0:t.media)==null||E.textTracks.addEventListener("change",m),(f=t==null?void 0:t.media)==null||f.textTracks.addEventListener("addtrack",m),navigator.userAgent.includes("Chrome/")){let T=()=>{l(r,v(this,de),!0),this.paused||window.requestAnimationFrame(T)};(w=t==null?void 0:t.media)==null||w.addEventListener("playing",()=>{T()})}t==null||t.addEventListener("userinactivechange",()=>{let T=t==null?void 0:t.hasAttribute("user-inactive");v(this,de)!==T&&(V(this,de,T),l(r,v(this,de)))})};function ge(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}D.customElements.get("mux-player")||(D.customElements.define("mux-player",kt),D.MuxPlayerElement=kt);var yl=kt;
|