@mux/mux-video
Advanced tools
Comparing version 0.24.2-canary.0 to 0.24.2-canary.1
@@ -1,2 +0,2 @@ | ||
"use strict";var Zt=Object.defineProperty;var fi=Object.getOwnPropertyDescriptor;var mi=Object.getOwnPropertyNames;var pi=Object.getPrototypeOf,gi=Object.prototype.hasOwnProperty;var Ei=Reflect.get;var Ti=(e,i,t)=>i in e?Zt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var bi=(e,i)=>{for(var t in i)Zt(e,t,{get:i[t],enumerable:!0})},vi=(e,i,t,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of mi(i))!gi.call(e,n)&&n!==t&&Zt(e,n,{get:()=>i[n],enumerable:!(s=fi(i,n))||s.enumerable});return e};var yi=e=>vi(Zt({},"__esModule",{value:!0}),e);var T=(e,i,t)=>(Ti(e,typeof i!="symbol"?i+"":i,t),t),be=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var r=(e,i,t)=>(be(e,i,"read from private field"),t?t.call(e):i.get(e)),u=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},h=(e,i,t,s)=>(be(e,i,"write to private field"),s?s.call(e,t):i.set(e,t),t);var A=(e,i,t)=>(be(e,i,"access private method"),t),te=(e,i,t)=>Ei(pi(e),t,i);var xi={};bi(xi,{Attributes:()=>o,MediaError:()=>m.MediaError,VideoEvents:()=>ie,default:()=>wi,generatePlayerInitTime:()=>m.generatePlayerInitTime,playerSoftwareName:()=>Le,playerSoftwareVersion:()=>Oe});module.exports=yi(xi);var Et=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class e extends Et{}globalThis.DocumentFragment=e}var Mt=class extends Et{},ve=class extends Et{},Ai={get(e){},define(e,i,t){},getName(e){return null},upgrade(e){},whenDefined(e){return Promise.resolve(Mt)}},Nt,ye=class{constructor(i,t={}){u(this,Nt,void 0);h(this,Nt,t==null?void 0:t.detail)}get detail(){return r(this,Nt)}initCustomEvent(){}};Nt=new WeakMap;function ki(e,i){return new Mt}var Ne={document:{createElement:ki},DocumentFragment,customElements:Ai,CustomEvent:ye,EventTarget:Et,HTMLElement:Mt,HTMLVideoElement:ve},we=typeof window=="undefined"||typeof globalThis.customElements=="undefined",ee=we?Ne:globalThis,Gi=we?Ne.document:globalThis.document;var m=require("@mux/playback-core");var Si=()=>{try{return"0.24.1"}catch{}return"UNKNOWN"},Ri=Si(),xe=()=>Ri;var ie=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];function Ci(e){return` | ||
"use strict";var $t=Object.defineProperty;var ai=Object.getOwnPropertyDescriptor;var di=Object.getOwnPropertyNames;var ui=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var hi=Reflect.get;var Re=e=>{throw TypeError(e)};var li=(e,i,t)=>i in e?$t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var fi=(e,i)=>{for(var t in i)$t(e,t,{get:i[t],enumerable:!0})},mi=(e,i,t,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of di(i))!ci.call(e,n)&&n!==t&&$t(e,n,{get:()=>i[n],enumerable:!(s=ai(i,n))||s.enumerable});return e};var pi=e=>mi($t({},"__esModule",{value:!0}),e);var b=(e,i,t)=>li(e,typeof i!="symbol"?i+"":i,t),ce=(e,i,t)=>i.has(e)||Re("Cannot "+t);var r=(e,i,t)=>(ce(e,i,"read from private field"),t?t.call(e):i.get(e)),h=(e,i,t)=>i.has(e)?Re("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,t),c=(e,i,t,s)=>(ce(e,i,"write to private field"),s?s.call(e,t):i.set(e,t),t),y=(e,i,t)=>(ce(e,i,"access private method"),t);var Ht=(e,i,t)=>hi(ui(e),t,i);var Pi={};fi(Pi,{Attributes:()=>o,MediaError:()=>m.MediaError,VideoEvents:()=>Xt,default:()=>Ii,generatePlayerInitTime:()=>m.generatePlayerInitTime,playerSoftwareName:()=>Ae,playerSoftwareVersion:()=>ye});module.exports=pi(Pi);var Et=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class e extends Et{}globalThis.DocumentFragment=e}var Mt=class extends Et{},he=class extends Et{},gi={get(e){},define(e,i,t){},getName(e){return null},upgrade(e){},whenDefined(e){return Promise.resolve(Mt)}},Nt,le=class{constructor(i,t={}){h(this,Nt);c(this,Nt,t==null?void 0:t.detail)}get detail(){return r(this,Nt)}initCustomEvent(){}};Nt=new WeakMap;function Ei(e,i){return new Mt}var Ce={document:{createElement:Ei},DocumentFragment,customElements:gi,CustomEvent:le,EventTarget:Et,HTMLElement:Mt,HTMLVideoElement:he},_e=typeof window=="undefined"||typeof globalThis.customElements=="undefined",zt=_e?Ce:globalThis,Mi=_e?Ce.document:globalThis.document;var m=require("@mux/playback-core");var bi=()=>{try{return"0.24.1"}catch{}return"UNKNOWN"},Ti=bi(),Ie=()=>Ti;var Xt=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],Le=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function vi(e){return` | ||
<style> | ||
@@ -15,6 +15,6 @@ :host { | ||
<slot name="media"> | ||
<audio${Ye(e)}></audio> | ||
<audio${Ve(e)}></audio> | ||
</slot> | ||
<slot></slot> | ||
`}function _i(e){return` | ||
`}function yi(e){return` | ||
<style> | ||
@@ -41,6 +41,6 @@ :host { | ||
<slot name="media"> | ||
<video${Ye(e)}></video> | ||
<video${Ve(e)}></video> | ||
</slot> | ||
<slot></slot> | ||
`}function Fe(e,{tag:i,is:t}){var l,p,d,b,O,Ge,pt,D,a,g,R,ot,y,Ae,N,Be,L,ke,Jt,Ke,Qt,qe;let s=(p=(l=globalThis.document)==null?void 0:l.createElement)==null?void 0:p.call(l,i,{is:t}),n=s?Ii(s):[];return d=class extends e{constructor(){super(...arguments);u(this,R);u(this,y);u(this,N);u(this,L);u(this,Jt);u(this,Qt);u(this,pt,!1);u(this,D,null);u(this,a,new Map);u(this,g,void 0);T(this,"get");T(this,"set");T(this,"call")}static get observedAttributes(){var E,_,C;return A(E=d,O,Ge).call(E),[...(C=(_=s==null?void 0:s.constructor)==null?void 0:_.observedAttributes)!=null?C:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var f,E,_,C,S;return A(this,R,ot).call(this),(S=(C=(E=(f=r(this,D))!=null?f:this.querySelector(":scope > [slot=media]"))!=null?E:this.querySelector(i))!=null?C:(_=this.shadowRoot)==null?void 0:_.querySelector(i))!=null?S:null}set nativeEl(f){h(this,D,f)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(f){this.toggleAttribute("muted",f)}get src(){return this.getAttribute("src")}set src(f){this.setAttribute("src",`${f}`)}get preload(){var f,E;return(E=this.getAttribute("preload"))!=null?E:(f=this.nativeEl)==null?void 0:f.preload}set preload(f){this.setAttribute("preload",`${f}`)}init(){var f;if(!this.shadowRoot){this.attachShadow({mode:"open"});let E=Pi(this.attributes);t&&(E.is=t),i&&(E.part=i),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(E)}this.nativeEl.muted=this.hasAttribute("muted");for(let E of n)A(this,Jt,Ke).call(this,E);h(this,g,new MutationObserver(A(this,N,Be).bind(this))),this.shadowRoot.addEventListener("slotchange",this),A(this,y,Ae).call(this);for(let E of this.constructor.Events)(f=this.shadowRoot)==null||f.addEventListener(E,this,!0)}handleEvent(f){if(f.type==="slotchange"){A(this,y,Ae).call(this);return}f.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(f.type,{detail:f.detail}))}attributeChangedCallback(f,E,_){A(this,R,ot).call(this),A(this,Qt,qe).call(this,f,E,_)}connectedCallback(){A(this,R,ot).call(this)}},b=new WeakMap,O=new WeakSet,Ge=function(){if(r(this,b))return;h(this,b,!0);let f=new Set(this.observedAttributes);f.delete("muted");for(let E of n)if(!(E in this.prototype))if(typeof s[E]=="function")this.prototype[E]=function(..._){return A(this,R,ot).call(this),(()=>{var I;if(this.call)return this.call(E,..._);let S=(I=this.nativeEl)==null?void 0:I[E];return S==null?void 0:S.apply(this.nativeEl,_)})()};else{let _={get(){var S,I,Lt;A(this,R,ot).call(this);let C=E.toLowerCase();if(f.has(C)){let gt=this.getAttribute(C);return gt===null?!1:gt===""?!0:gt}return(Lt=(S=this.get)==null?void 0:S.call(this,E))!=null?Lt:(I=this.nativeEl)==null?void 0:I[E]}};E!==E.toUpperCase()&&(_.set=function(C){A(this,R,ot).call(this);let S=E.toLowerCase();if(f.has(S)){C===!0||C===!1||C==null?this.toggleAttribute(S,!!C):this.setAttribute(S,C);return}if(this.set){this.set(E,C);return}this.nativeEl&&(this.nativeEl[E]=C)}),Object.defineProperty(this.prototype,E,_)}},pt=new WeakMap,D=new WeakMap,a=new WeakMap,g=new WeakMap,R=new WeakSet,ot=function(){r(this,pt)||(h(this,pt,!0),this.init())},y=new WeakSet,Ae=function(){var C;let f=new Map(r(this,a)),E=(C=this.shadowRoot)==null?void 0:C.querySelector("slot:not([name])");(E==null?void 0:E.assignedElements({flatten:!0}).filter(S=>["track","source"].includes(S.localName))).forEach(S=>{var Lt,gt;f.delete(S);let I=r(this,a).get(S);I||(I=S.cloneNode(),r(this,a).set(S,I),(Lt=r(this,g))==null||Lt.observe(S,{attributes:!0})),(gt=this.nativeEl)==null||gt.append(I),A(this,L,ke).call(this,I)}),f.forEach((S,I)=>{S.remove(),r(this,a).delete(I)})},N=new WeakSet,Be=function(f){var E;for(let _ of f)if(_.type==="attributes"){let{target:C,attributeName:S}=_,I=r(this,a).get(C);I&&S&&(I.setAttribute(S,(E=C.getAttribute(S))!=null?E:""),A(this,L,ke).call(this,I))}},L=new WeakSet,ke=function(f){f&&f.localName==="track"&&f.default&&(f.kind==="chapters"||f.kind==="metadata")&&f.track.mode==="disabled"&&(f.track.mode="hidden")},Jt=new WeakSet,Ke=function(f){if(Object.prototype.hasOwnProperty.call(this,f)){let E=this[f];delete this[f],this[f]=E}},Qt=new WeakSet,qe=function(f,E,_){var C,S,I;["id","class"].includes(f)||!d.observedAttributes.includes(f)&&this.constructor.observedAttributes.includes(f)||(_===null?(C=this.nativeEl)==null||C.removeAttribute(f):((S=this.nativeEl)==null?void 0:S.getAttribute(f))!==_&&((I=this.nativeEl)==null||I.setAttribute(f,_)))},u(d,O),T(d,"getTemplateHTML",i.endsWith("audio")?Ci:_i),T(d,"shadowRootOptions",{mode:"open"}),T(d,"Events",ie),u(d,b,!1),d}function Ii(e){let i=[];for(let t=Object.getPrototypeOf(e);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let s=Object.getOwnPropertyNames(t);i.push(...s)}return i}function Ye(e){let i="";for(let t in e){let s=e[t];s===""?i+=` ${t}`:i+=` ${t}="${s}"`}return i}function Pi(e){let i={};for(let t of e)i[t.name]=t.value;return i}var De,re=Fe((De=globalThis.HTMLElement)!=null?De:class{},{tag:"video"}),Ve,Fi=Fe((Ve=globalThis.HTMLElement)!=null?Ve:class{},{tag:"audio"});var G=new WeakMap,Tt=class extends Error{},se=class extends Error{};var Ue=globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(i=>{let t=i.deref();t&&e(t)})}}:Set;function je(e){var i,t,s;(t=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&t.isAvailable?(s=globalThis.cast)!=null&&s.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}function We(){return globalThis.chrome}function $e(){var t;let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if((t=globalThis.chrome)!=null&&t.cast||document.querySelector(`script[src="${e}"]`))return;let i=document.createElement("script");i.src=e,document.head.append(i)}function U(){var e,i;return(i=(e=globalThis.cast)==null?void 0:e.framework)==null?void 0:i.CastContext.getInstance()}function wt(){var e;return(e=U())==null?void 0:e.getCurrentSession()}function ne(){var e;return(e=wt())==null?void 0:e.getSessionObj().media[0]}function He(e){return new Promise((i,t)=>{ne().editTracksInfo(e,i,t)})}function ze(e){return new Promise((i,t)=>{ne().getStatus(e,i,t)})}function Se(e){return U().setOptions({...Re(),...e})}function Re(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var oe=new Ue,j=new WeakSet,P;je(()=>{var e,i,t,s;if(!((i=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&i.isAvailable)){console.debug("chrome.cast.isAvailable",(s=(t=globalThis.chrome)==null?void 0:t.cast)==null?void 0:s.isAvailable);return}P||(P=cast.framework,U().addEventListener(P.CastContextEventType.CAST_STATE_CHANGED,n=>{oe.forEach(l=>{var p,d;return(d=(p=G.get(l)).onCastStateChanged)==null?void 0:d.call(p,n)})}),U().addEventListener(P.CastContextEventType.SESSION_STATE_CHANGED,n=>{oe.forEach(l=>{var p,d;return(d=(p=G.get(l)).onSessionStateChanged)==null?void 0:d.call(p,n)})}),oe.forEach(n=>{var l,p;return(p=(l=G.get(n)).init)==null?void 0:p.call(l)}))});var Xe=0,k,xt,M,B,dt,ut,W,de,K,at,ue,Je,Dt,Ce,ce,Qe,Vt,_e,he,Ze,Gt,Ie,ae=class extends EventTarget{constructor(t){super();u(this,K);u(this,ue);u(this,Dt);u(this,ce);u(this,Vt);u(this,he);u(this,Gt);u(this,k,void 0);u(this,xt,void 0);u(this,M,void 0);u(this,B,void 0);u(this,dt,"disconnected");u(this,ut,!1);u(this,W,new Set);u(this,de,new WeakMap);h(this,k,t),oe.add(this),G.set(this,{init:()=>A(this,Vt,_e).call(this),onCastStateChanged:()=>A(this,Dt,Ce).call(this),onSessionStateChanged:()=>A(this,ce,Qe).call(this),getCastPlayer:()=>r(this,K,at)}),A(this,Vt,_e).call(this)}get state(){return r(this,dt)}async watchAvailability(t){if(r(this,k).disableRemotePlayback)throw new Tt("disableRemotePlayback attribute is present.");return r(this,de).set(t,++Xe),r(this,W).add(t),Xe}async cancelWatchAvailability(t){if(r(this,k).disableRemotePlayback)throw new Tt("disableRemotePlayback attribute is present.");t?r(this,W).delete(t):r(this,W).clear()}async prompt(){var s,n,l,p;if(r(this,k).disableRemotePlayback)throw new Tt("disableRemotePlayback attribute is present.");if(!((n=(s=globalThis.chrome)==null?void 0:s.cast)!=null&&n.isAvailable))throw new se("The RemotePlayback API is disabled on this platform.");let t=j.has(r(this,k));j.add(r(this,k)),Se(r(this,k).castOptions),Object.entries(r(this,B)).forEach(([d,b])=>{r(this,M).controller.addEventListener(d,b)});try{await U().requestSession()}catch(d){if(d==="cancel"){t||j.delete(r(this,k));return}throw new Error(d)}(p=(l=G.get(r(this,k)))==null?void 0:l.loadOnPrompt)==null||p.call(l)}};k=new WeakMap,xt=new WeakMap,M=new WeakMap,B=new WeakMap,dt=new WeakMap,ut=new WeakMap,W=new WeakMap,de=new WeakMap,K=new WeakSet,at=function(){if(j.has(r(this,k)))return r(this,M)},ue=new WeakSet,Je=function(){j.has(r(this,k))&&(Object.entries(r(this,B)).forEach(([t,s])=>{r(this,M).controller.removeEventListener(t,s)}),j.delete(r(this,k)),r(this,k).muted=r(this,M).isMuted,r(this,k).currentTime=r(this,M).savedPlayerState.currentTime,r(this,M).savedPlayerState.isPaused===!1&&r(this,k).play())},Dt=new WeakSet,Ce=function(){let t=U().getCastState();if(j.has(r(this,k))&&t==="CONNECTING"&&(h(this,dt,"connecting"),this.dispatchEvent(new Event("connecting"))),!r(this,ut)&&(t!=null&&t.includes("CONNECT"))){h(this,ut,!0);for(let s of r(this,W))s(!0)}else if(r(this,ut)&&(!t||t==="NO_DEVICES_AVAILABLE")){h(this,ut,!1);for(let s of r(this,W))s(!1)}},ce=new WeakSet,Qe=async function(){var s;let{SESSION_RESUMED:t}=P.SessionState;if(U().getSessionState()===t&&r(this,k).castSrc===((s=ne())==null?void 0:s.media.contentId)){j.add(r(this,k)),Object.entries(r(this,B)).forEach(([n,l])=>{r(this,M).controller.addEventListener(n,l)});try{await ze(new chrome.cast.media.GetStatusRequest)}catch(n){console.error(n)}r(this,B)[P.RemotePlayerEventType.IS_PAUSED_CHANGED](),r(this,B)[P.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},Vt=new WeakSet,_e=function(){!P||r(this,xt)||(h(this,xt,!0),Se(r(this,k).castOptions),r(this,k).textTracks.addEventListener("change",()=>A(this,Gt,Ie).call(this)),A(this,Dt,Ce).call(this),h(this,M,new P.RemotePlayer),new P.RemotePlayerController(r(this,M)),h(this,B,{[P.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:t})=>{t===!0?(h(this,dt,"connected"),this.dispatchEvent(new Event("connect"))):(A(this,ue,Je).call(this),h(this,dt,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[P.RemotePlayerEventType.DURATION_CHANGED]:()=>{r(this,k).dispatchEvent(new Event("durationchange"))},[P.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{r(this,k).dispatchEvent(new Event("volumechange"))},[P.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{r(this,k).dispatchEvent(new Event("volumechange"))},[P.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var t;(t=r(this,K,at))!=null&&t.isMediaLoaded&&r(this,k).dispatchEvent(new Event("timeupdate"))},[P.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{r(this,k).dispatchEvent(new Event("resize"))},[P.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{r(this,k).dispatchEvent(new Event(this.paused?"pause":"play"))},[P.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var t,s;((t=r(this,K,at))==null?void 0:t.playerState)!==chrome.cast.media.PlayerState.PAUSED&&r(this,k).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(s=r(this,K,at))==null?void 0:s.playerState]))},[P.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var t;(t=r(this,K,at))!=null&&t.isMediaLoaded&&(await Promise.resolve(),A(this,he,Ze).call(this))}}))},he=new WeakSet,Ze=function(){A(this,Gt,Ie).call(this)},Gt=new WeakSet,Ie=async function(){var D,a,g,R,Xt;if(!r(this,K,at))return;let s=((a=(D=r(this,M).mediaInfo)==null?void 0:D.tracks)!=null?a:[]).filter(({type:y})=>y===chrome.cast.media.TrackType.TEXT),n=[...r(this,k).textTracks].filter(({kind:y})=>y==="subtitles"||y==="captions"),l=s.map(({language:y,name:nt,trackId:N})=>{var L;let{mode:w}=(L=n.find(V=>V.language===y&&V.label===nt))!=null?L:{};return w?{mode:w,trackId:N}:!1}).filter(Boolean),d=l.filter(({mode:y})=>y!=="showing").map(({trackId:y})=>y),b=l.find(({mode:y})=>y==="showing"),O=(Xt=(R=(g=wt())==null?void 0:g.getSessionObj().media[0])==null?void 0:R.activeTrackIds)!=null?Xt:[],Y=O;if(O.length&&(Y=Y.filter(y=>!d.includes(y))),b!=null&&b.trackId&&(Y=[...Y,b.trackId]),Y=[...new Set(Y)],!((y,nt)=>y.length===nt.length&&y.every(N=>nt.includes(N)))(O,Y))try{let y=new chrome.cast.media.EditTracksInfoRequest(Y);await He(y)}catch(y){console.error(y)}};var ti=e=>{var i,t,s,n,l,p,d,v,O,ei;return t=class extends e{constructor(){super(...arguments);u(this,d);u(this,O);u(this,s,{paused:!1});u(this,n,Re());u(this,l,void 0);u(this,p,void 0)}get remote(){return r(this,p)?r(this,p):We()?($e(),G.set(this,{loadOnPrompt:()=>A(this,O,ei).call(this)}),h(this,p,new ae(this))):super.remote}attributeChangedCallback(a,g,R){if(super.attributeChangedCallback(a,g,R),a==="cast-receiver"&&R){r(this,n).receiverApplicationId=R;return}if(r(this,d,v))switch(a){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var nt,N;if(!r(this,d,v))return super.load();let a=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);a.customData=this.castCustomData;let g=[...this.querySelectorAll("track")].filter(({kind:w,src:L})=>L&&(w==="subtitles"||w==="captions")),R=[],Xt=0;g.length&&(a.tracks=g.map(w=>{let L=++Xt;R.length===0&&w.track.mode==="showing"&&R.push(L);let V=new chrome.cast.media.Track(L,chrome.cast.media.TrackType.TEXT);return V.trackContentId=w.src,V.trackContentType="text/vtt",V.subtype=w.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,V.name=w.label,V.language=w.srclang,V})),this.castStreamType==="live"?a.streamType=chrome.cast.media.StreamType.LIVE:a.streamType=chrome.cast.media.StreamType.BUFFERED,a.metadata=new chrome.cast.media.GenericMediaMetadata,a.metadata.title=this.title,a.metadata.images=[{url:this.poster}];let y=new chrome.cast.media.LoadRequest(a);y.currentTime=(nt=super.currentTime)!=null?nt:0,y.autoplay=!r(this,s).paused,y.activeTrackIds=R,await((N=wt())==null?void 0:N.loadMedia(y)),this.dispatchEvent(new Event("volumechange"))}play(){var a;if(r(this,d,v)){r(this,d,v).isPaused&&((a=r(this,d,v).controller)==null||a.playOrPause());return}return super.play()}pause(){var a;if(r(this,d,v)){r(this,d,v).isPaused||(a=r(this,d,v).controller)==null||a.playOrPause();return}super.pause()}get castOptions(){return r(this,n)}get castReceiver(){var a;return(a=this.getAttribute("cast-receiver"))!=null?a:void 0}set castReceiver(a){this.castReceiver!=a&&this.setAttribute("cast-receiver",`${a}`)}get castSrc(){var a,g,R;return(R=(g=this.getAttribute("cast-src"))!=null?g:(a=this.querySelector("source"))==null?void 0:a.src)!=null?R:this.currentSrc}set castSrc(a){this.castSrc!=a&&this.setAttribute("cast-src",`${a}`)}get castContentType(){var a;return(a=this.getAttribute("cast-content-type"))!=null?a:void 0}set castContentType(a){this.setAttribute("cast-content-type",`${a}`)}get castStreamType(){var a,g;return(g=(a=this.getAttribute("cast-stream-type"))!=null?a:this.streamType)!=null?g:void 0}set castStreamType(a){this.setAttribute("cast-stream-type",`${a}`)}get castCustomData(){return r(this,l)}set castCustomData(a){let g=typeof a;if(!["object","undefined"].includes(g)){console.error(`castCustomData must be nullish or an object but value was of type ${g}`);return}h(this,l,a)}get readyState(){if(r(this,d,v))switch(r(this,d,v).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return r(this,d,v)?r(this,d,v).isPaused:super.paused}get muted(){var a;return r(this,d,v)?(a=r(this,d,v))==null?void 0:a.isMuted:super.muted}set muted(a){var g;if(r(this,d,v)){(a&&!r(this,d,v).isMuted||!a&&r(this,d,v).isMuted)&&((g=r(this,d,v).controller)==null||g.muteOrUnmute());return}super.muted=a}get volume(){var a,g;return r(this,d,v)?(g=(a=r(this,d,v))==null?void 0:a.volumeLevel)!=null?g:1:super.volume}set volume(a){var g;if(r(this,d,v)){r(this,d,v).volumeLevel=+a,(g=r(this,d,v).controller)==null||g.setVolumeLevel();return}super.volume=a}get duration(){var a,g,R;return r(this,d,v)&&((a=r(this,d,v))!=null&&a.isMediaLoaded)?(R=(g=r(this,d,v))==null?void 0:g.duration)!=null?R:NaN:super.duration}get currentTime(){var a,g,R;return r(this,d,v)&&((a=r(this,d,v))!=null&&a.isMediaLoaded)?(R=(g=r(this,d,v))==null?void 0:g.currentTime)!=null?R:0:super.currentTime}set currentTime(a){var g;if(r(this,d,v)){r(this,d,v).currentTime=a,(g=r(this,d,v).controller)==null||g.seek();return}super.currentTime=a}},s=new WeakMap,n=new WeakMap,l=new WeakMap,p=new WeakMap,d=new WeakSet,v=function(){var a,g;return(g=(a=G.get(this.remote))==null?void 0:a.getCastPlayer)==null?void 0:g.call(a)},O=new WeakSet,ei=async function(){r(this,s).paused=te(t.prototype,this,"paused"),te(t.prototype,this,"pause").call(this),this.muted=te(t.prototype,this,"muted");try{await this.load()}catch(a){console.error(a)}},T(t,"observedAttributes",[...(i=e.observedAttributes)!=null?i:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t};var q=class extends Event{constructor(t,s){super(t);T(this,"track");this.track=s.track}};var Pe=new WeakMap;function c(e){var i;return(i=Pe.get(e))!=null?i:Oi(e,{})}function Oi(e,i){let t=Pe.get(e);return t||Pe.set(e,t={}),Object.assign(t,i)}function le(e,i){let t=e.videoTracks;c(i).media=e,c(i).renditionSet||(c(i).renditionSet=new Set);let s=c(t).trackSet;s.add(i);let n=s.size-1;n in ht.prototype||Object.defineProperty(ht.prototype,n,{get(){return[...c(this).trackSet][n]}}),queueMicrotask(()=>{t.dispatchEvent(new q("addtrack",{track:i}))})}function fe(e){var s;let i=(s=c(e).media)==null?void 0:s.videoTracks;if(!i)return;c(i).trackSet.delete(e),queueMicrotask(()=>{i.dispatchEvent(new q("removetrack",{track:e}))})}function ii(e){var s;let i=(s=c(e).media.videoTracks)!=null?s:[],t=!1;for(let n of i)n!==e&&(n.selected=!1,t=!0);if(t){if(c(i).changeRequested)return;c(i).changeRequested=!0,queueMicrotask(()=>{delete c(i).changeRequested,i.dispatchEvent(new Event("change"))})}}var $,H,z,ct,Bt,ht=class extends EventTarget{constructor(){super();u(this,ct);u(this,$,void 0);u(this,H,void 0);u(this,z,void 0);c(this).trackSet=new Set}[Symbol.iterator](){return r(this,ct,Bt).values()}get length(){return r(this,ct,Bt).size}getTrackById(t){var s;return(s=[...r(this,ct,Bt)].find(n=>n.id===t))!=null?s:null}get selectedIndex(){return[...r(this,ct,Bt)].findIndex(t=>t.selected)}get onaddtrack(){return r(this,$)}set onaddtrack(t){r(this,$)&&(this.removeEventListener("addtrack",r(this,$)),h(this,$,void 0)),typeof t=="function"&&(h(this,$,t),this.addEventListener("addtrack",t))}get onremovetrack(){return r(this,H)}set onremovetrack(t){r(this,H)&&(this.removeEventListener("removetrack",r(this,H)),h(this,H,void 0)),typeof t=="function"&&(h(this,H,t),this.addEventListener("removetrack",t))}get onchange(){return r(this,z)}set onchange(t){r(this,z)&&(this.removeEventListener("change",r(this,z)),h(this,z,void 0)),typeof t=="function"&&(h(this,z,t),this.addEventListener("change",t))}};$=new WeakMap,H=new WeakMap,z=new WeakMap,ct=new WeakSet,Bt=function(){return c(this).trackSet};var F=class extends Event{constructor(t,s){super(t);T(this,"rendition");this.rendition=s.rendition}};function ri(e,i){let t=c(e).media.videoRenditions;c(i).media=c(e).media,c(i).track=e;let s=c(e).renditionSet;s.add(i);let n=s.size-1;n in lt.prototype||Object.defineProperty(lt.prototype,n,{get(){return bt(this)[n]}}),queueMicrotask(()=>{e.selected&&t.dispatchEvent(new F("addrendition",{rendition:i}))})}function si(e){let i=c(e).media.videoRenditions,t=c(e).track;c(t).renditionSet.delete(e),queueMicrotask(()=>{c(e).track.selected&&i.dispatchEvent(new F("removerendition",{rendition:e}))})}function ni(e){let i=c(e).media.videoRenditions;!i||c(i).changeRequested||(c(i).changeRequested=!0,queueMicrotask(()=>{delete c(i).changeRequested,c(e).track.selected&&i.dispatchEvent(new Event("change"))}))}function bt(e){return[...c(e).media.videoTracks].filter(t=>t.selected).flatMap(t=>[...c(t).renditionSet])}var X,J,Q,lt=class extends EventTarget{constructor(){super(...arguments);u(this,X,void 0);u(this,J,void 0);u(this,Q,void 0)}[Symbol.iterator](){return bt(this).values()}get length(){return bt(this).length}getRenditionById(t){var s;return(s=bt(this).find(n=>`${n.id}`==`${t}`))!=null?s:null}get selectedIndex(){return bt(this).findIndex(t=>t.selected)}set selectedIndex(t){for(let[s,n]of bt(this).entries())n.selected=s===t}get onaddrendition(){return r(this,X)}set onaddrendition(t){r(this,X)&&(this.removeEventListener("addrendition",r(this,X)),h(this,X,void 0)),typeof t=="function"&&(h(this,X,t),this.addEventListener("addrendition",t))}get onremoverendition(){return r(this,J)}set onremoverendition(t){r(this,J)&&(this.removeEventListener("removerendition",r(this,J)),h(this,J,void 0)),typeof t=="function"&&(h(this,J,t),this.addEventListener("removerendition",t))}get onchange(){return r(this,Q)}set onchange(t){r(this,Q)&&(this.removeEventListener("change",r(this,Q)),h(this,Q,void 0)),typeof t=="function"&&(h(this,Q,t),this.addEventListener("change",t))}};X=new WeakMap,J=new WeakMap,Q=new WeakMap;var vt,Kt=class{constructor(){T(this,"src");T(this,"id");T(this,"width");T(this,"height");T(this,"bitrate");T(this,"frameRate");T(this,"codec");u(this,vt,!1)}get selected(){return r(this,vt)}set selected(i){r(this,vt)!==i&&(h(this,vt,i),ni(this))}};vt=new WeakMap;var yt,At=class{constructor(){T(this,"id");T(this,"kind");T(this,"label","");T(this,"language","");T(this,"sourceBuffer");u(this,yt,!1)}addRendition(i,t,s,n,l,p){let d=new Kt;return d.src=i,d.width=t,d.height=s,d.frameRate=p,d.bitrate=l,d.codec=n,ri(this,d),d}removeRendition(i){si(i)}get selected(){return r(this,yt)}set selected(i){r(this,yt)!==i&&(h(this,yt,i),i===!0&&ii(this))}};yt=new WeakMap;function oi(e,i){let t=c(e).media.audioRenditions;c(i).media=c(e).media,c(i).track=e;let s=c(e).renditionSet;s.add(i);let n=s.size-1;n in ft.prototype||Object.defineProperty(ft.prototype,n,{get(){return kt(this)[n]}}),queueMicrotask(()=>{e.enabled&&t.dispatchEvent(new F("addrendition",{rendition:i}))})}function ai(e){let i=c(e).media.audioRenditions,t=c(e).track;c(t).renditionSet.delete(e),queueMicrotask(()=>{c(e).track.enabled&&i.dispatchEvent(new F("removerendition",{rendition:e}))})}function di(e){let i=c(e).media.audioRenditions;!i||c(i).changeRequested||(c(i).changeRequested=!0,queueMicrotask(()=>{delete c(i).changeRequested,c(e).track.enabled&&i.dispatchEvent(new Event("change"))}))}function kt(e){return[...c(e).media.audioTracks].filter(t=>t.enabled).flatMap(t=>[...c(t).renditionSet])}var Z,tt,et,ft=class extends EventTarget{constructor(){super(...arguments);u(this,Z,void 0);u(this,tt,void 0);u(this,et,void 0)}[Symbol.iterator](){return kt(this).values()}get length(){return kt(this).length}getRenditionById(t){var s;return(s=kt(this).find(n=>`${n.id}`==`${t}`))!=null?s:null}get selectedIndex(){return kt(this).findIndex(t=>t.selected)}set selectedIndex(t){for(let[s,n]of kt(this).entries())n.selected=s===t}get onaddrendition(){return r(this,Z)}set onaddrendition(t){r(this,Z)&&(this.removeEventListener("addrendition",r(this,Z)),h(this,Z,void 0)),typeof t=="function"&&(h(this,Z,t),this.addEventListener("addrendition",t))}get onremoverendition(){return r(this,tt)}set onremoverendition(t){r(this,tt)&&(this.removeEventListener("removerendition",r(this,tt)),h(this,tt,void 0)),typeof t=="function"&&(h(this,tt,t),this.addEventListener("removerendition",t))}get onchange(){return r(this,et)}set onchange(t){r(this,et)&&(this.removeEventListener("change",r(this,et)),h(this,et,void 0)),typeof t=="function"&&(h(this,et,t),this.addEventListener("change",t))}};Z=new WeakMap,tt=new WeakMap,et=new WeakMap;var St,qt=class{constructor(){T(this,"src");T(this,"id");T(this,"bitrate");T(this,"codec");u(this,St,!1)}get selected(){return r(this,St)}set selected(i){r(this,St)!==i&&(h(this,St,i),di(this))}};St=new WeakMap;function pe(e,i){let t=e.audioTracks;c(i).media=e,c(i).renditionSet||(c(i).renditionSet=new Set);let s=c(t).trackSet;s.add(i);let n=s.size-1;n in mt.prototype||Object.defineProperty(mt.prototype,n,{get(){return[...c(this).trackSet][n]}}),queueMicrotask(()=>{t.dispatchEvent(new q("addtrack",{track:i}))})}function ge(e){var s;let i=(s=c(e).media)==null?void 0:s.audioTracks;if(!i)return;c(i).trackSet.delete(e),queueMicrotask(()=>{i.dispatchEvent(new q("removetrack",{track:e}))})}function ui(e){let i=c(e).media.audioTracks;!i||c(i).changeRequested||(c(i).changeRequested=!0,queueMicrotask(()=>{delete c(i).changeRequested,i.dispatchEvent(new Event("change"))}))}var it,rt,st,Rt,me,mt=class extends EventTarget{constructor(){super();u(this,Rt);u(this,it,void 0);u(this,rt,void 0);u(this,st,void 0);c(this).trackSet=new Set}[Symbol.iterator](){return r(this,Rt,me).values()}get length(){return r(this,Rt,me).size}getTrackById(t){var s;return(s=[...r(this,Rt,me)].find(n=>n.id===t))!=null?s:null}get onaddtrack(){return r(this,it)}set onaddtrack(t){r(this,it)&&(this.removeEventListener("addtrack",r(this,it)),h(this,it,void 0)),typeof t=="function"&&(h(this,it,t),this.addEventListener("addtrack",t))}get onremovetrack(){return r(this,rt)}set onremovetrack(t){r(this,rt)&&(this.removeEventListener("removetrack",r(this,rt)),h(this,rt,void 0)),typeof t=="function"&&(h(this,rt,t),this.addEventListener("removetrack",t))}get onchange(){return r(this,st)}set onchange(t){r(this,st)&&(this.removeEventListener("change",r(this,st)),h(this,st,void 0)),typeof t=="function"&&(h(this,st,t),this.addEventListener("change",t))}};it=new WeakMap,rt=new WeakMap,st=new WeakMap,Rt=new WeakSet,me=function(){return c(this).trackSet};var Ct,_t=class{constructor(){T(this,"id");T(this,"kind");T(this,"label","");T(this,"language","");T(this,"sourceBuffer");u(this,Ct,!1)}addRendition(i,t,s){let n=new qt;return n.src=i,n.codec=t,n.bitrate=s,oi(this,n),n}removeRendition(i){ai(i)}get enabled(){return r(this,Ct)}set enabled(i){r(this,Ct)!==i&&(h(this,Ct,i),ui(this))}};Ct=new WeakMap;var ci=Ee(globalThis.HTMLMediaElement,"video"),hi=Ee(globalThis.HTMLMediaElement,"audio");function li(e){if(!(e!=null&&e.prototype))return e;let i=Ee(e,"video");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){return Li(this)}});let t=Ee(e,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){return Mi(this)}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(l,p="",d=""){let b=new At;return b.kind=l,b.label=p,b.language=d,le(this,b),b}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=fe),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(l,p="",d=""){let b=new _t;return b.kind=l,b.label=p,b.language=d,pe(this,b),b}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=ge),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return s(this)}});let s=l=>{let p=c(l).videoRenditions;return p||(p=new lt,c(p).media=l,c(l).videoRenditions=p),p};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return n(this)}});let n=l=>{let p=c(l).audioRenditions;return p||(p=new ft,c(p).media=l,c(l).audioRenditions=p),p};return e}function Ee(e,i){var t;if(e!=null&&e.prototype)return(t=Object.getOwnPropertyDescriptor(e.prototype,`${i}Tracks`))==null?void 0:t.get}function Li(e){var t;let i=c(e).videoTracks;if(!i&&(i=new ht,c(e).videoTracks=i,ci)){let s=ci.call((t=e.nativeEl)!=null?t:e);for(let n of s)le(e,n);s.addEventListener("change",()=>{i.dispatchEvent(new Event("change"))}),s.addEventListener("addtrack",n=>{if([...i].some(l=>l instanceof At)){for(let l of s)fe(l);return}le(e,n.track)}),s.addEventListener("removetrack",n=>{fe(n.track)})}return i}function Mi(e){var t;let i=c(e).audioTracks;if(!i&&(i=new mt,c(e).audioTracks=i,hi)){let s=hi.call((t=e.nativeEl)!=null?t:e);for(let n of s)pe(e,n);s.addEventListener("change",()=>{i.dispatchEvent(new Event("change"))}),s.addEventListener("addtrack",n=>{if([...i].some(l=>l instanceof _t)){for(let l of s)ge(l);return}pe(e,n.track)}),s.addEventListener("removetrack",n=>{ge(n.track)})}return i}ie.push("castchange","entercast","leavecast");var o={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},Ni=Object.values(o),Oe=xe(),Le="mux-video",x,It,Yt,Pt,Ut,jt,Wt,$t,Ht,Ot,Te,Me=class extends re{constructor(){super();u(this,Ot);u(this,x,void 0);u(this,It,void 0);u(this,Yt,void 0);u(this,Pt,{});u(this,Ut,{});u(this,jt,void 0);u(this,Wt,void 0);u(this,$t,void 0);u(this,Ht,void 0);h(this,Yt,(0,m.generatePlayerInitTime)())}static get NAME(){return Le}static get VERSION(){return Oe}static get observedAttributes(){var t;return[...Ni,...(t=re.observedAttributes)!=null?t:[]]}get preferCmcd(){var t;return(t=this.getAttribute(o.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?m.CmcdTypeValues.includes(t)?this.setAttribute(o.PREFER_CMCD,t):console.warn(`Invalid value for preferCmcd. Must be one of ${m.CmcdTypeValues.join()}`):this.removeAttribute(o.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(o.PLAYER_INIT_TIME)?+this.getAttribute(o.PLAYER_INIT_TIME):r(this,Yt)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(o.PLAYER_INIT_TIME):this.setAttribute(o.PLAYER_INIT_TIME,`${+t}`))}get playerSoftwareName(){var t;return(t=r(this,$t))!=null?t:Le}set playerSoftwareName(t){h(this,$t,t)}get playerSoftwareVersion(){var t;return(t=r(this,Wt))!=null?t:Oe}set playerSoftwareVersion(t){h(this,Wt,t)}get _hls(){var t;return(t=r(this,x))==null?void 0:t.engine}get mux(){var t;return(t=this.nativeEl)==null?void 0:t.mux}get error(){var t;return(t=(0,m.getError)(this.nativeEl))!=null?t:null}get errorTranslator(){return r(this,Ht)}set errorTranslator(t){h(this,Ht,t)}get src(){return this.getAttribute("src")}set src(t){t!==this.src&&(t==null?this.removeAttribute("src"):this.setAttribute("src",t))}get type(){var t;return(t=this.getAttribute(o.TYPE))!=null?t:void 0}set type(t){t!==this.type&&(t?this.setAttribute(o.TYPE,t):this.removeAttribute(o.TYPE))}get autoplay(){let t=this.getAttribute("autoplay");return t===null?!1:t===""?!0:t}set autoplay(t){let s=this.autoplay;t!==s&&(t?this.setAttribute("autoplay",typeof t=="string"?t:""):this.removeAttribute("autoplay"))}get preload(){let t=this.getAttribute("preload");return t===""?"auto":["none","metadata","auto"].includes(t)?t:super.preload}set preload(t){t!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(t)?this.setAttribute("preload",t):this.removeAttribute("preload"))}get debug(){return this.getAttribute(o.DEBUG)!=null}set debug(t){t!==this.debug&&(t?this.setAttribute(o.DEBUG,""):this.removeAttribute(o.DEBUG))}get disableTracking(){return this.hasAttribute(o.DISABLE_TRACKING)}set disableTracking(t){t!==this.disableTracking&&this.toggleAttribute(o.DISABLE_TRACKING,!!t)}get disableCookies(){return this.hasAttribute(o.DISABLE_COOKIES)}set disableCookies(t){t!==this.disableCookies&&(t?this.setAttribute(o.DISABLE_COOKIES,""):this.removeAttribute(o.DISABLE_COOKIES))}get startTime(){let t=this.getAttribute(o.START_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set startTime(t){t!==this.startTime&&(t==null?this.removeAttribute(o.START_TIME):this.setAttribute(o.START_TIME,`${t}`))}get playbackId(){var t;return this.hasAttribute(o.PLAYBACK_ID)?this.getAttribute(o.PLAYBACK_ID):(t=(0,m.toPlaybackIdFromSrc)(this.src))!=null?t:void 0}set playbackId(t){t!==this.playbackId&&(t?this.setAttribute(o.PLAYBACK_ID,t):this.removeAttribute(o.PLAYBACK_ID))}get maxResolution(){var t;return(t=this.getAttribute(o.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(o.MAX_RESOLUTION,t):this.removeAttribute(o.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(o.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(o.MIN_RESOLUTION,t):this.removeAttribute(o.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(o.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(o.RENDITION_ORDER,t):this.removeAttribute(o.RENDITION_ORDER))}get programStartTime(){let t=this.getAttribute(o.PROGRAM_START_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set programStartTime(t){t==null?this.removeAttribute(o.PROGRAM_START_TIME):this.setAttribute(o.PROGRAM_START_TIME,`${t}`)}get programEndTime(){let t=this.getAttribute(o.PROGRAM_END_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set programEndTime(t){t==null?this.removeAttribute(o.PROGRAM_END_TIME):this.setAttribute(o.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){let t=this.getAttribute(o.ASSET_START_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set assetStartTime(t){t==null?this.removeAttribute(o.ASSET_START_TIME):this.setAttribute(o.ASSET_START_TIME,`${t}`)}get assetEndTime(){let t=this.getAttribute(o.ASSET_END_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set assetEndTime(t){t==null?this.removeAttribute(o.ASSET_END_TIME):this.setAttribute(o.ASSET_END_TIME,`${t}`)}get customDomain(){var t;return(t=this.getAttribute(o.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(o.CUSTOM_DOMAIN,t):this.removeAttribute(o.CUSTOM_DOMAIN))}get drmToken(){var t;return(t=this.getAttribute(o.DRM_TOKEN))!=null?t:void 0}set drmToken(t){t!==this.drmToken&&(t?this.setAttribute(o.DRM_TOKEN,t):this.removeAttribute(o.DRM_TOKEN))}get playbackToken(){var t,s,n,l;if(this.hasAttribute(o.PLAYBACK_TOKEN))return(t=this.getAttribute(o.PLAYBACK_TOKEN))!=null?t:void 0;if(this.hasAttribute(o.PLAYBACK_ID)){let[,p]=(0,m.toPlaybackIdParts)((s=this.playbackId)!=null?s:"");return(n=new URLSearchParams(p).get("token"))!=null?n:void 0}if(this.src)return(l=new URLSearchParams(this.src).get("token"))!=null?l:void 0}set playbackToken(t){t!==this.playbackToken&&(t?this.setAttribute(o.PLAYBACK_TOKEN,t):this.removeAttribute(o.PLAYBACK_TOKEN))}get tokens(){let t=this.getAttribute(o.PLAYBACK_TOKEN),s=this.getAttribute(o.DRM_TOKEN);return{...r(this,Ut),...t!=null?{playback:t}:{},...s!=null?{drm:s}:{}}}set tokens(t){h(this,Ut,t!=null?t:{})}get ended(){return(0,m.getEnded)(this.nativeEl,this._hls)}get envKey(){var t;return(t=this.getAttribute(o.ENV_KEY))!=null?t:void 0}set envKey(t){t!==this.envKey&&(t?this.setAttribute(o.ENV_KEY,t):this.removeAttribute(o.ENV_KEY))}get beaconCollectionDomain(){var t;return(t=this.getAttribute(o.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(o.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(o.BEACON_COLLECTION_DOMAIN))}get streamType(){var t;return(t=this.getAttribute(o.STREAM_TYPE))!=null?t:(0,m.getStreamType)(this.nativeEl)}set streamType(t){t!==this.streamType&&(t?this.setAttribute(o.STREAM_TYPE,t):this.removeAttribute(o.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(o.TARGET_LIVE_WINDOW)?+this.getAttribute(o.TARGET_LIVE_WINDOW):(0,m.getTargetLiveWindow)(this.nativeEl)}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(o.TARGET_LIVE_WINDOW):this.setAttribute(o.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t,s;if(this.hasAttribute(o.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:n}=this,l=(t=this.nativeEl.seekable.end(0))!=null?t:0,p=(s=this.nativeEl.seekable.start(0))!=null?s:0;return Math.max(p,l-n)}return(0,m.getLiveEdgeStart)(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(o.LIVE_EDGE_OFFSET))return+this.getAttribute(o.LIVE_EDGE_OFFSET)}set liveEdgeOffset(t){t!=this.liveEdgeOffset&&(t==null?this.removeAttribute(o.LIVE_EDGE_OFFSET):this.setAttribute(o.LIVE_EDGE_OFFSET,`${+t}`))}get seekable(){return(0,m.getSeekable)(this.nativeEl)}async addCuePoints(t){return(0,m.addCuePoints)(this.nativeEl,t)}get activeCuePoint(){return(0,m.getActiveCuePoint)(this.nativeEl)}get cuePoints(){return(0,m.getCuePoints)(this.nativeEl)}async addChapters(t){return(0,m.addChapters)(this.nativeEl,t)}get activeChapter(){return(0,m.getActiveChapter)(this.nativeEl)}get chapters(){return(0,m.getChapters)(this.nativeEl)}getStartDate(){return(0,m.getStartDate)(this.nativeEl,this._hls)}get currentPdt(){return(0,m.getCurrentPdt)(this.nativeEl,this._hls)}get preferPlayback(){let t=this.getAttribute(o.PREFER_PLAYBACK);if(t===m.PlaybackTypes.MSE||t===m.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===m.PlaybackTypes.MSE||t===m.PlaybackTypes.NATIVE?this.setAttribute(o.PREFER_PLAYBACK,t):this.removeAttribute(o.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(s=>s.startsWith("metadata-")&&![o.METADATA_URL].includes(s)).reduce((s,n)=>{let l=this.getAttribute(n);return l!=null&&(s[n.replace(/^metadata-/,"").replace(/-/g,"_")]=l),s},{}),...r(this,Pt)}}set metadata(t){h(this,Pt,t!=null?t:{}),this.mux&&this.mux.emit("hb",r(this,Pt))}get _hlsConfig(){return r(this,jt)}set _hlsConfig(t){h(this,jt,t)}load(){h(this,x,(0,m.initialize)(this,this.nativeEl,r(this,x)))}unload(){(0,m.teardown)(this.nativeEl,r(this,x)),h(this,x,void 0)}attributeChangedCallback(t,s,n){var p,d;switch(re.observedAttributes.includes(t)&&!["src","autoplay","preload"].includes(t)&&super.attributeChangedCallback(t,s,n),t){case o.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=n!=null?n:void 0;break;case o.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=n!=null?n:void 0;break;case"src":{let b=!!s,O=!!n;!b&&O?A(this,Ot,Te).call(this):b&&!O?this.unload():b&&O&&(this.unload(),A(this,Ot,Te).call(this));break}case"autoplay":if(n===s)break;(p=r(this,x))==null||p.setAutoplay(this.autoplay);break;case"preload":if(n===s)break;(d=r(this,x))==null||d.setPreload(n);break;case o.PLAYBACK_ID:this.src=(0,m.toMuxVideoURL)(this);break;case o.DEBUG:{let b=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=b);break}case o.METADATA_URL:n&&fetch(n).then(b=>b.json()).then(b=>this.metadata=b).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${n}!`));break;case o.STREAM_TYPE:(n==null||n!==s)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case o.TARGET_LIVE_WINDOW:(n==null||n!==s)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;default:break}}connectedCallback(){var t;(t=super.connectedCallback)==null||t.call(this),this.nativeEl&&this.src&&!r(this,x)&&A(this,Ot,Te).call(this)}disconnectedCallback(){this.unload()}};x=new WeakMap,It=new WeakMap,Yt=new WeakMap,Pt=new WeakMap,Ut=new WeakMap,jt=new WeakMap,Wt=new WeakMap,$t=new WeakMap,Ht=new WeakMap,Ot=new WeakSet,Te=async function(){r(this,It)||(await h(this,It,Promise.resolve()),h(this,It,null),this.load())};var zt,Ft=class extends ti(li(Me)){constructor(){super(...arguments);u(this,zt,void 0)}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var t;return(t=r(this,zt))!=null?t:this.muxCastCustomData}set castCustomData(t){h(this,zt,t)}};zt=new WeakMap;ee.customElements.get("mux-video")||(ee.customElements.define("mux-video",Ft),ee.MuxVideoElement=Ft);var wi=Ft; | ||
`}function De(e,{tag:i,is:t}){var l,p,d,T,N,Me,rt,a,g,C,S,at,fe,Ne,me,we,xe;let s=(p=(l=globalThis.document)==null?void 0:l.createElement)==null?void 0:p.call(l,i,{is:t}),n=s?Ai(s):[];return d=class extends e{constructor(){super(...arguments);h(this,S);h(this,rt,!1);h(this,a,null);h(this,g,new Map);h(this,C);b(this,"get");b(this,"set");b(this,"call")}static get observedAttributes(){var E,P,R;return y(E=d,N,Me).call(E),[...(R=(P=s==null?void 0:s.constructor)==null?void 0:P.observedAttributes)!=null?R:[],...Le]}get nativeEl(){var f,E,P,R,k;return y(this,S,at).call(this),(k=(R=(E=(f=r(this,a))!=null?f:this.querySelector(":scope > [slot=media]"))!=null?E:this.querySelector(i))!=null?R:(P=this.shadowRoot)==null?void 0:P.querySelector(i))!=null?k:null}set nativeEl(f){c(this,a,f)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(f){this.toggleAttribute("muted",f)}get src(){return this.getAttribute("src")}set src(f){this.setAttribute("src",`${f}`)}get preload(){var f,E;return(E=this.getAttribute("preload"))!=null?E:(f=this.nativeEl)==null?void 0:f.preload}set preload(f){this.setAttribute("preload",`${f}`)}init(){var f;if(!this.shadowRoot){this.attachShadow({mode:"open"});let E=ki(this.attributes);t&&(E.is=t),i&&(E.part=i),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(E)}this.nativeEl.muted=this.hasAttribute("muted");for(let E of n)y(this,S,we).call(this,E);c(this,C,new MutationObserver(y(this,S,Ne).bind(this))),this.shadowRoot.addEventListener("slotchange",this),y(this,S,fe).call(this);for(let E of this.constructor.Events)(f=this.shadowRoot)==null||f.addEventListener(E,this,!0)}handleEvent(f){if(f.type==="slotchange"){y(this,S,fe).call(this);return}f.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(f.type,{detail:f.detail}))}attributeChangedCallback(f,E,P){y(this,S,at).call(this),y(this,S,xe).call(this,f,E,P)}connectedCallback(){y(this,S,at).call(this)}},T=new WeakMap,N=new WeakSet,Me=function(){if(r(this,T))return;c(this,T,!0);let f=new Set(this.observedAttributes);f.delete("muted");for(let E of n)if(!(E in this.prototype))if(typeof s[E]=="function")this.prototype[E]=function(...P){return y(this,S,at).call(this),(()=>{var O;if(this.call)return this.call(E,...P);let k=(O=this.nativeEl)==null?void 0:O[E];return k==null?void 0:k.apply(this.nativeEl,P)})()};else{let P={get(){var k,O,Lt;y(this,S,at).call(this);let R=E.toLowerCase();if(f.has(R)){let gt=this.getAttribute(R);return gt===null?!1:gt===""?!0:gt}return(Lt=(k=this.get)==null?void 0:k.call(this,E))!=null?Lt:(O=this.nativeEl)==null?void 0:O[E]}};E!==E.toUpperCase()&&(P.set=function(R){y(this,S,at).call(this);let k=E.toLowerCase();if(f.has(k)){R===!0||R===!1||R==null?this.toggleAttribute(k,!!R):this.setAttribute(k,R);return}if(this.set){this.set(E,R);return}this.nativeEl&&(this.nativeEl[E]=R)}),Object.defineProperty(this.prototype,E,P)}},rt=new WeakMap,a=new WeakMap,g=new WeakMap,C=new WeakMap,S=new WeakSet,at=function(){r(this,rt)||(c(this,rt,!0),this.init())},fe=function(){var R;let f=new Map(r(this,g)),E=(R=this.shadowRoot)==null?void 0:R.querySelector("slot:not([name])");(E==null?void 0:E.assignedElements({flatten:!0}).filter(k=>["track","source"].includes(k.localName))).forEach(k=>{var Lt,gt;f.delete(k);let O=r(this,g).get(k);O||(O=k.cloneNode(),r(this,g).set(k,O),(Lt=r(this,C))==null||Lt.observe(k,{attributes:!0})),(gt=this.nativeEl)==null||gt.append(O),y(this,S,me).call(this,O)}),f.forEach((k,O)=>{k.remove(),r(this,g).delete(O)})},Ne=function(f){var E;for(let P of f)if(P.type==="attributes"){let{target:R,attributeName:k}=P,O=r(this,g).get(R);O&&k&&(O.setAttribute(k,(E=R.getAttribute(k))!=null?E:""),y(this,S,me).call(this,O))}},me=function(f){f&&f.localName==="track"&&f.default&&(f.kind==="chapters"||f.kind==="metadata")&&f.track.mode==="disabled"&&(f.track.mode="hidden")},we=function(f){if(Object.prototype.hasOwnProperty.call(this,f)){let E=this[f];delete this[f],this[f]=E}},xe=function(f,E,P){var R,k,O;["id","class"].includes(f)||!d.observedAttributes.includes(f)&&this.constructor.observedAttributes.includes(f)||(P===null?(R=this.nativeEl)==null||R.removeAttribute(f):((k=this.nativeEl)==null?void 0:k.getAttribute(f))!==P&&((O=this.nativeEl)==null||O.setAttribute(f,P)))},h(d,N),b(d,"getTemplateHTML",i.endsWith("audio")?vi:yi),b(d,"shadowRootOptions",{mode:"open"}),b(d,"Events",Xt),h(d,T,!1),d}function Ai(e){let i=[];for(let t=Object.getPrototypeOf(e);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let s=Object.getOwnPropertyNames(t);i.push(...s)}return i}function Ve(e){let i="";for(let t in e){if(!Le.includes(t))continue;let s=e[t];s===""?i+=` ${t}`:i+=` ${t}="${s}"`}return i}function ki(e){let i={};for(let t of e)i[t.name]=t.value;return i}var Pe,Jt=De((Pe=globalThis.HTMLElement)!=null?Pe:class{},{tag:"video"}),Oe,Di=De((Oe=globalThis.HTMLElement)!=null?Oe:class{},{tag:"audio"});var V=new WeakMap,bt=class extends Error{},Qt=class extends Error{};var Ge=globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(i=>{let t=i.deref();t&&e(t)})}}:Set;function Be(e){var i,t,s;(t=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&t.isAvailable?(s=globalThis.cast)!=null&&s.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}function Ke(){return globalThis.chrome}function qe(){var t;let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if((t=globalThis.chrome)!=null&&t.cast||document.querySelector(`script[src="${e}"]`))return;let i=document.createElement("script");i.src=e,document.head.append(i)}function F(){var e,i;return(i=(e=globalThis.cast)==null?void 0:e.framework)==null?void 0:i.CastContext.getInstance()}function wt(){var e;return(e=F())==null?void 0:e.getCurrentSession()}function Zt(){var e;return(e=wt())==null?void 0:e.getSessionObj().media[0]}function Fe(e){return new Promise((i,t)=>{Zt().editTracksInfo(e,i,t)})}function Ye(e){return new Promise((i,t)=>{Zt().getStatus(e,i,t)})}function pe(e){return F().setOptions({...ge(),...e})}function ge(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var te=new Ge,Y=new WeakSet,L;Be(()=>{var e,i,t,s;if(!((i=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&i.isAvailable)){console.debug("chrome.cast.isAvailable",(s=(t=globalThis.chrome)==null?void 0:t.cast)==null?void 0:s.isAvailable);return}L||(L=cast.framework,F().addEventListener(L.CastContextEventType.CAST_STATE_CHANGED,n=>{te.forEach(l=>{var p,d;return(d=(p=V.get(l)).onCastStateChanged)==null?void 0:d.call(p,n)})}),F().addEventListener(L.CastContextEventType.SESSION_STATE_CHANGED,n=>{te.forEach(l=>{var p,d;return(d=(p=V.get(l)).onSessionStateChanged)==null?void 0:d.call(p,n)})}),te.forEach(n=>{var l,p;return(p=(l=V.get(n)).init)==null?void 0:p.call(l)}))});var Ue=0,A,xt,M,G,ut,ct,U,ie,I,dt,je,Ee,We,be,$e,Te,ee=class extends EventTarget{constructor(t){super();h(this,I);h(this,A);h(this,xt);h(this,M);h(this,G);h(this,ut,"disconnected");h(this,ct,!1);h(this,U,new Set);h(this,ie,new WeakMap);c(this,A,t),te.add(this),V.set(this,{init:()=>y(this,I,be).call(this),onCastStateChanged:()=>y(this,I,Ee).call(this),onSessionStateChanged:()=>y(this,I,We).call(this),getCastPlayer:()=>r(this,I,dt)}),y(this,I,be).call(this)}get state(){return r(this,ut)}async watchAvailability(t){if(r(this,A).disableRemotePlayback)throw new bt("disableRemotePlayback attribute is present.");return r(this,ie).set(t,++Ue),r(this,U).add(t),Ue}async cancelWatchAvailability(t){if(r(this,A).disableRemotePlayback)throw new bt("disableRemotePlayback attribute is present.");t?r(this,U).delete(t):r(this,U).clear()}async prompt(){var s,n,l,p;if(r(this,A).disableRemotePlayback)throw new bt("disableRemotePlayback attribute is present.");if(!((n=(s=globalThis.chrome)==null?void 0:s.cast)!=null&&n.isAvailable))throw new Qt("The RemotePlayback API is disabled on this platform.");let t=Y.has(r(this,A));Y.add(r(this,A)),pe(r(this,A).castOptions),Object.entries(r(this,G)).forEach(([d,T])=>{r(this,M).controller.addEventListener(d,T)});try{await F().requestSession()}catch(d){if(d==="cancel"){t||Y.delete(r(this,A));return}throw new Error(d)}(p=(l=V.get(r(this,A)))==null?void 0:l.loadOnPrompt)==null||p.call(l)}};A=new WeakMap,xt=new WeakMap,M=new WeakMap,G=new WeakMap,ut=new WeakMap,ct=new WeakMap,U=new WeakMap,ie=new WeakMap,I=new WeakSet,dt=function(){if(Y.has(r(this,A)))return r(this,M)},je=function(){Y.has(r(this,A))&&(Object.entries(r(this,G)).forEach(([t,s])=>{r(this,M).controller.removeEventListener(t,s)}),Y.delete(r(this,A)),r(this,A).muted=r(this,M).isMuted,r(this,A).currentTime=r(this,M).savedPlayerState.currentTime,r(this,M).savedPlayerState.isPaused===!1&&r(this,A).play())},Ee=function(){let t=F().getCastState();if(Y.has(r(this,A))&&t==="CONNECTING"&&(c(this,ut,"connecting"),this.dispatchEvent(new Event("connecting"))),!r(this,ct)&&(t!=null&&t.includes("CONNECT"))){c(this,ct,!0);for(let s of r(this,U))s(!0)}else if(r(this,ct)&&(!t||t==="NO_DEVICES_AVAILABLE")){c(this,ct,!1);for(let s of r(this,U))s(!1)}},We=async function(){var s;let{SESSION_RESUMED:t}=L.SessionState;if(F().getSessionState()===t&&r(this,A).castSrc===((s=Zt())==null?void 0:s.media.contentId)){Y.add(r(this,A)),Object.entries(r(this,G)).forEach(([n,l])=>{r(this,M).controller.addEventListener(n,l)});try{await Ye(new chrome.cast.media.GetStatusRequest)}catch(n){console.error(n)}r(this,G)[L.RemotePlayerEventType.IS_PAUSED_CHANGED](),r(this,G)[L.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},be=function(){!L||r(this,xt)||(c(this,xt,!0),pe(r(this,A).castOptions),r(this,A).textTracks.addEventListener("change",()=>y(this,I,Te).call(this)),y(this,I,Ee).call(this),c(this,M,new L.RemotePlayer),new L.RemotePlayerController(r(this,M)),c(this,G,{[L.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:t})=>{t===!0?(c(this,ut,"connected"),this.dispatchEvent(new Event("connect"))):(y(this,I,je).call(this),c(this,ut,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[L.RemotePlayerEventType.DURATION_CHANGED]:()=>{r(this,A).dispatchEvent(new Event("durationchange"))},[L.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{r(this,A).dispatchEvent(new Event("volumechange"))},[L.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{r(this,A).dispatchEvent(new Event("volumechange"))},[L.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var t;(t=r(this,I,dt))!=null&&t.isMediaLoaded&&r(this,A).dispatchEvent(new Event("timeupdate"))},[L.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{r(this,A).dispatchEvent(new Event("resize"))},[L.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{r(this,A).dispatchEvent(new Event(this.paused?"pause":"play"))},[L.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var t,s;((t=r(this,I,dt))==null?void 0:t.playerState)!==chrome.cast.media.PlayerState.PAUSED&&r(this,A).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(s=r(this,I,dt))==null?void 0:s.playerState]))},[L.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var t;(t=r(this,I,dt))!=null&&t.isMediaLoaded&&(await Promise.resolve(),y(this,I,$e).call(this))}}))},$e=function(){y(this,I,Te).call(this)},Te=async function(){var a,g,C,S,st;if(!r(this,I,dt))return;let s=((g=(a=r(this,M).mediaInfo)==null?void 0:a.tracks)!=null?g:[]).filter(({type:_})=>_===chrome.cast.media.TrackType.TEXT),n=[...r(this,A).textTracks].filter(({kind:_})=>_==="subtitles"||_==="captions"),l=s.map(({language:_,name:nt,trackId:w})=>{var D;let{mode:ot}=(D=n.find(Se=>Se.language===_&&Se.label===nt))!=null?D:{};return ot?{mode:ot,trackId:w}:!1}).filter(Boolean),d=l.filter(({mode:_})=>_!=="showing").map(({trackId:_})=>_),T=l.find(({mode:_})=>_==="showing"),N=(st=(S=(C=wt())==null?void 0:C.getSessionObj().media[0])==null?void 0:S.activeTrackIds)!=null?st:[],q=N;if(N.length&&(q=q.filter(_=>!d.includes(_))),T!=null&&T.trackId&&(q=[...q,T.trackId]),q=[...new Set(q)],!((_,nt)=>_.length===nt.length&&_.every(w=>nt.includes(w)))(N,q))try{let _=new chrome.cast.media.EditTracksInfoRequest(q);await Fe(_)}catch(_){console.error(_)}};var He=e=>{var i,t,s,n,l,p,d,v,ze;return t=class extends e{constructor(){super(...arguments);h(this,d);h(this,s,{paused:!1});h(this,n,ge());h(this,l);h(this,p)}get remote(){return r(this,p)?r(this,p):Ke()?(this.disableRemotePlayback||qe(),V.set(this,{loadOnPrompt:()=>y(this,d,ze).call(this)}),c(this,p,new ee(this))):super.remote}attributeChangedCallback(a,g,C){if(super.attributeChangedCallback(a,g,C),a==="cast-receiver"&&C){r(this,n).receiverApplicationId=C;return}if(r(this,d,v))switch(a){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var _,nt;if(!r(this,d,v))return super.load();let a=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);a.customData=this.castCustomData;let g=[...this.querySelectorAll("track")].filter(({kind:w,src:ot})=>ot&&(w==="subtitles"||w==="captions")),C=[],S=0;g.length&&(a.tracks=g.map(w=>{let ot=++S;C.length===0&&w.track.mode==="showing"&&C.push(ot);let D=new chrome.cast.media.Track(ot,chrome.cast.media.TrackType.TEXT);return D.trackContentId=w.src,D.trackContentType="text/vtt",D.subtype=w.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,D.name=w.label,D.language=w.srclang,D})),this.castStreamType==="live"?a.streamType=chrome.cast.media.StreamType.LIVE:a.streamType=chrome.cast.media.StreamType.BUFFERED,a.metadata=new chrome.cast.media.GenericMediaMetadata,a.metadata.title=this.title,a.metadata.images=[{url:this.poster}];let st=new chrome.cast.media.LoadRequest(a);st.currentTime=(_=super.currentTime)!=null?_:0,st.autoplay=!r(this,s).paused,st.activeTrackIds=C,await((nt=wt())==null?void 0:nt.loadMedia(st)),this.dispatchEvent(new Event("volumechange"))}play(){var a;if(r(this,d,v)){r(this,d,v).isPaused&&((a=r(this,d,v).controller)==null||a.playOrPause());return}return super.play()}pause(){var a;if(r(this,d,v)){r(this,d,v).isPaused||(a=r(this,d,v).controller)==null||a.playOrPause();return}super.pause()}get castOptions(){return r(this,n)}get castReceiver(){var a;return(a=this.getAttribute("cast-receiver"))!=null?a:void 0}set castReceiver(a){this.castReceiver!=a&&this.setAttribute("cast-receiver",`${a}`)}get castSrc(){var a,g,C;return(C=(g=this.getAttribute("cast-src"))!=null?g:(a=this.querySelector("source"))==null?void 0:a.src)!=null?C:this.currentSrc}set castSrc(a){this.castSrc!=a&&this.setAttribute("cast-src",`${a}`)}get castContentType(){var a;return(a=this.getAttribute("cast-content-type"))!=null?a:void 0}set castContentType(a){this.setAttribute("cast-content-type",`${a}`)}get castStreamType(){var a,g;return(g=(a=this.getAttribute("cast-stream-type"))!=null?a:this.streamType)!=null?g:void 0}set castStreamType(a){this.setAttribute("cast-stream-type",`${a}`)}get castCustomData(){return r(this,l)}set castCustomData(a){let g=typeof a;if(!["object","undefined"].includes(g)){console.error(`castCustomData must be nullish or an object but value was of type ${g}`);return}c(this,l,a)}get readyState(){if(r(this,d,v))switch(r(this,d,v).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return r(this,d,v)?r(this,d,v).isPaused:super.paused}get muted(){var a;return r(this,d,v)?(a=r(this,d,v))==null?void 0:a.isMuted:super.muted}set muted(a){var g;if(r(this,d,v)){(a&&!r(this,d,v).isMuted||!a&&r(this,d,v).isMuted)&&((g=r(this,d,v).controller)==null||g.muteOrUnmute());return}super.muted=a}get volume(){var a,g;return r(this,d,v)?(g=(a=r(this,d,v))==null?void 0:a.volumeLevel)!=null?g:1:super.volume}set volume(a){var g;if(r(this,d,v)){r(this,d,v).volumeLevel=+a,(g=r(this,d,v).controller)==null||g.setVolumeLevel();return}super.volume=a}get duration(){var a,g,C;return r(this,d,v)&&((a=r(this,d,v))!=null&&a.isMediaLoaded)?(C=(g=r(this,d,v))==null?void 0:g.duration)!=null?C:NaN:super.duration}get currentTime(){var a,g,C;return r(this,d,v)&&((a=r(this,d,v))!=null&&a.isMediaLoaded)?(C=(g=r(this,d,v))==null?void 0:g.currentTime)!=null?C:0:super.currentTime}set currentTime(a){var g;if(r(this,d,v)){r(this,d,v).currentTime=a,(g=r(this,d,v).controller)==null||g.seek();return}super.currentTime=a}},s=new WeakMap,n=new WeakMap,l=new WeakMap,p=new WeakMap,d=new WeakSet,v=function(){var a,g;return(g=(a=V.get(this.remote))==null?void 0:a.getCastPlayer)==null?void 0:g.call(a)},ze=async function(){r(this,s).paused=Ht(t.prototype,this,"paused"),Ht(t.prototype,this,"pause").call(this),this.muted=Ht(t.prototype,this,"muted");try{await this.load()}catch(a){console.error(a)}},b(t,"observedAttributes",[...(i=e.observedAttributes)!=null?i:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t};var B=class extends Event{constructor(t,s){super(t);b(this,"track");this.track=s.track}};var ve=new WeakMap;function u(e){var i;return(i=ve.get(e))!=null?i:Si(e,{})}function Si(e,i){let t=ve.get(e);return t||ve.set(e,t={}),Object.assign(t,i)}function re(e,i){let t=e.videoTracks;u(i).media=e,u(i).renditionSet||(u(i).renditionSet=new Set);let s=u(t).trackSet;s.add(i);let n=s.size-1;n in lt.prototype||Object.defineProperty(lt.prototype,n,{get(){return[...u(this).trackSet][n]}}),queueMicrotask(()=>{t.dispatchEvent(new B("addtrack",{track:i}))})}function se(e){var s;let i=(s=u(e).media)==null?void 0:s.videoTracks;if(!i)return;u(i).trackSet.delete(e),queueMicrotask(()=>{i.dispatchEvent(new B("removetrack",{track:e}))})}function Xe(e){var s;let i=(s=u(e).media.videoTracks)!=null?s:[],t=!1;for(let n of i)n!==e&&(n.selected=!1,t=!0);if(t){if(u(i).changeRequested)return;u(i).changeRequested=!0,queueMicrotask(()=>{delete u(i).changeRequested,i.dispatchEvent(new Event("change"))})}}var j,W,$,ht,Dt,lt=class extends EventTarget{constructor(){super();h(this,ht);h(this,j);h(this,W);h(this,$);u(this).trackSet=new Set}[Symbol.iterator](){return r(this,ht,Dt).values()}get length(){return r(this,ht,Dt).size}getTrackById(t){var s;return(s=[...r(this,ht,Dt)].find(n=>n.id===t))!=null?s:null}get selectedIndex(){return[...r(this,ht,Dt)].findIndex(t=>t.selected)}get onaddtrack(){return r(this,j)}set onaddtrack(t){r(this,j)&&(this.removeEventListener("addtrack",r(this,j)),c(this,j,void 0)),typeof t=="function"&&(c(this,j,t),this.addEventListener("addtrack",t))}get onremovetrack(){return r(this,W)}set onremovetrack(t){r(this,W)&&(this.removeEventListener("removetrack",r(this,W)),c(this,W,void 0)),typeof t=="function"&&(c(this,W,t),this.addEventListener("removetrack",t))}get onchange(){return r(this,$)}set onchange(t){r(this,$)&&(this.removeEventListener("change",r(this,$)),c(this,$,void 0)),typeof t=="function"&&(c(this,$,t),this.addEventListener("change",t))}};j=new WeakMap,W=new WeakMap,$=new WeakMap,ht=new WeakSet,Dt=function(){return u(this).trackSet};var K=class extends Event{constructor(t,s){super(t);b(this,"rendition");this.rendition=s.rendition}};function Je(e,i){let t=u(e).media.videoRenditions;u(i).media=u(e).media,u(i).track=e;let s=u(e).renditionSet;s.add(i);let n=s.size-1;n in ft.prototype||Object.defineProperty(ft.prototype,n,{get(){return Tt(this)[n]}}),queueMicrotask(()=>{e.selected&&t.dispatchEvent(new K("addrendition",{rendition:i}))})}function Qe(e){let i=u(e).media.videoRenditions,t=u(e).track;u(t).renditionSet.delete(e),queueMicrotask(()=>{u(e).track.selected&&i.dispatchEvent(new K("removerendition",{rendition:e}))})}function Ze(e){let i=u(e).media.videoRenditions;!i||u(i).changeRequested||(u(i).changeRequested=!0,queueMicrotask(()=>{delete u(i).changeRequested,u(e).track.selected&&i.dispatchEvent(new Event("change"))}))}function Tt(e){return[...u(e).media.videoTracks].filter(t=>t.selected).flatMap(t=>[...u(t).renditionSet])}var H,z,X,ft=class extends EventTarget{constructor(){super(...arguments);h(this,H);h(this,z);h(this,X)}[Symbol.iterator](){return Tt(this).values()}get length(){return Tt(this).length}getRenditionById(t){var s;return(s=Tt(this).find(n=>`${n.id}`==`${t}`))!=null?s:null}get selectedIndex(){return Tt(this).findIndex(t=>t.selected)}set selectedIndex(t){for(let[s,n]of Tt(this).entries())n.selected=s===t}get onaddrendition(){return r(this,H)}set onaddrendition(t){r(this,H)&&(this.removeEventListener("addrendition",r(this,H)),c(this,H,void 0)),typeof t=="function"&&(c(this,H,t),this.addEventListener("addrendition",t))}get onremoverendition(){return r(this,z)}set onremoverendition(t){r(this,z)&&(this.removeEventListener("removerendition",r(this,z)),c(this,z,void 0)),typeof t=="function"&&(c(this,z,t),this.addEventListener("removerendition",t))}get onchange(){return r(this,X)}set onchange(t){r(this,X)&&(this.removeEventListener("change",r(this,X)),c(this,X,void 0)),typeof t=="function"&&(c(this,X,t),this.addEventListener("change",t))}};H=new WeakMap,z=new WeakMap,X=new WeakMap;var vt,Vt=class{constructor(){b(this,"src");b(this,"id");b(this,"width");b(this,"height");b(this,"bitrate");b(this,"frameRate");b(this,"codec");h(this,vt,!1)}get selected(){return r(this,vt)}set selected(i){r(this,vt)!==i&&(c(this,vt,i),Ze(this))}};vt=new WeakMap;var yt,At=class{constructor(){b(this,"id");b(this,"kind");b(this,"label","");b(this,"language","");b(this,"sourceBuffer");h(this,yt,!1)}addRendition(i,t,s,n,l,p){let d=new Vt;return d.src=i,d.width=t,d.height=s,d.frameRate=p,d.bitrate=l,d.codec=n,Je(this,d),d}removeRendition(i){Qe(i)}get selected(){return r(this,yt)}set selected(i){r(this,yt)!==i&&(c(this,yt,i),i===!0&&Xe(this))}};yt=new WeakMap;function ti(e,i){let t=u(e).media.audioRenditions;u(i).media=u(e).media,u(i).track=e;let s=u(e).renditionSet;s.add(i);let n=s.size-1;n in mt.prototype||Object.defineProperty(mt.prototype,n,{get(){return kt(this)[n]}}),queueMicrotask(()=>{e.enabled&&t.dispatchEvent(new K("addrendition",{rendition:i}))})}function ei(e){let i=u(e).media.audioRenditions,t=u(e).track;u(t).renditionSet.delete(e),queueMicrotask(()=>{u(e).track.enabled&&i.dispatchEvent(new K("removerendition",{rendition:e}))})}function ii(e){let i=u(e).media.audioRenditions;!i||u(i).changeRequested||(u(i).changeRequested=!0,queueMicrotask(()=>{delete u(i).changeRequested,u(e).track.enabled&&i.dispatchEvent(new Event("change"))}))}function kt(e){return[...u(e).media.audioTracks].filter(t=>t.enabled).flatMap(t=>[...u(t).renditionSet])}var J,Q,Z,mt=class extends EventTarget{constructor(){super(...arguments);h(this,J);h(this,Q);h(this,Z)}[Symbol.iterator](){return kt(this).values()}get length(){return kt(this).length}getRenditionById(t){var s;return(s=kt(this).find(n=>`${n.id}`==`${t}`))!=null?s:null}get selectedIndex(){return kt(this).findIndex(t=>t.selected)}set selectedIndex(t){for(let[s,n]of kt(this).entries())n.selected=s===t}get onaddrendition(){return r(this,J)}set onaddrendition(t){r(this,J)&&(this.removeEventListener("addrendition",r(this,J)),c(this,J,void 0)),typeof t=="function"&&(c(this,J,t),this.addEventListener("addrendition",t))}get onremoverendition(){return r(this,Q)}set onremoverendition(t){r(this,Q)&&(this.removeEventListener("removerendition",r(this,Q)),c(this,Q,void 0)),typeof t=="function"&&(c(this,Q,t),this.addEventListener("removerendition",t))}get onchange(){return r(this,Z)}set onchange(t){r(this,Z)&&(this.removeEventListener("change",r(this,Z)),c(this,Z,void 0)),typeof t=="function"&&(c(this,Z,t),this.addEventListener("change",t))}};J=new WeakMap,Q=new WeakMap,Z=new WeakMap;var St,Gt=class{constructor(){b(this,"src");b(this,"id");b(this,"bitrate");b(this,"codec");h(this,St,!1)}get selected(){return r(this,St)}set selected(i){r(this,St)!==i&&(c(this,St,i),ii(this))}};St=new WeakMap;function oe(e,i){let t=e.audioTracks;u(i).media=e,u(i).renditionSet||(u(i).renditionSet=new Set);let s=u(t).trackSet;s.add(i);let n=s.size-1;n in pt.prototype||Object.defineProperty(pt.prototype,n,{get(){return[...u(this).trackSet][n]}}),queueMicrotask(()=>{t.dispatchEvent(new B("addtrack",{track:i}))})}function ae(e){var s;let i=(s=u(e).media)==null?void 0:s.audioTracks;if(!i)return;u(i).trackSet.delete(e),queueMicrotask(()=>{i.dispatchEvent(new B("removetrack",{track:e}))})}function ri(e){let i=u(e).media.audioTracks;!i||u(i).changeRequested||(u(i).changeRequested=!0,queueMicrotask(()=>{delete u(i).changeRequested,i.dispatchEvent(new Event("change"))}))}var tt,et,it,Rt,ne,pt=class extends EventTarget{constructor(){super();h(this,Rt);h(this,tt);h(this,et);h(this,it);u(this).trackSet=new Set}[Symbol.iterator](){return r(this,Rt,ne).values()}get length(){return r(this,Rt,ne).size}getTrackById(t){var s;return(s=[...r(this,Rt,ne)].find(n=>n.id===t))!=null?s:null}get onaddtrack(){return r(this,tt)}set onaddtrack(t){r(this,tt)&&(this.removeEventListener("addtrack",r(this,tt)),c(this,tt,void 0)),typeof t=="function"&&(c(this,tt,t),this.addEventListener("addtrack",t))}get onremovetrack(){return r(this,et)}set onremovetrack(t){r(this,et)&&(this.removeEventListener("removetrack",r(this,et)),c(this,et,void 0)),typeof t=="function"&&(c(this,et,t),this.addEventListener("removetrack",t))}get onchange(){return r(this,it)}set onchange(t){r(this,it)&&(this.removeEventListener("change",r(this,it)),c(this,it,void 0)),typeof t=="function"&&(c(this,it,t),this.addEventListener("change",t))}};tt=new WeakMap,et=new WeakMap,it=new WeakMap,Rt=new WeakSet,ne=function(){return u(this).trackSet};var Ct,_t=class{constructor(){b(this,"id");b(this,"kind");b(this,"label","");b(this,"language","");b(this,"sourceBuffer");h(this,Ct,!1)}addRendition(i,t,s){let n=new Gt;return n.src=i,n.codec=t,n.bitrate=s,ti(this,n),n}removeRendition(i){ei(i)}get enabled(){return r(this,Ct)}set enabled(i){r(this,Ct)!==i&&(c(this,Ct,i),ri(this))}};Ct=new WeakMap;var si=de(globalThis.HTMLMediaElement,"video"),ni=de(globalThis.HTMLMediaElement,"audio");function oi(e){if(!(e!=null&&e.prototype))return e;let i=de(e,"video");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){return Ri(this)}});let t=de(e,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){return Ci(this)}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(l,p="",d=""){let T=new At;return T.kind=l,T.label=p,T.language=d,re(this,T),T}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=se),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(l,p="",d=""){let T=new _t;return T.kind=l,T.label=p,T.language=d,oe(this,T),T}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=ae),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return s(this)}});let s=l=>{let p=u(l).videoRenditions;return p||(p=new ft,u(p).media=l,u(l).videoRenditions=p),p};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return n(this)}});let n=l=>{let p=u(l).audioRenditions;return p||(p=new mt,u(p).media=l,u(l).audioRenditions=p),p};return e}function de(e,i){var t;if(e!=null&&e.prototype)return(t=Object.getOwnPropertyDescriptor(e.prototype,`${i}Tracks`))==null?void 0:t.get}function Ri(e){var t;let i=u(e).videoTracks;if(!i&&(i=new lt,u(e).videoTracks=i,si)){let s=si.call((t=e.nativeEl)!=null?t:e);for(let n of s)re(e,n);s.addEventListener("change",()=>{i.dispatchEvent(new Event("change"))}),s.addEventListener("addtrack",n=>{if([...i].some(l=>l instanceof At)){for(let l of s)se(l);return}re(e,n.track)}),s.addEventListener("removetrack",n=>{se(n.track)})}return i}function Ci(e){var t;let i=u(e).audioTracks;if(!i&&(i=new pt,u(e).audioTracks=i,ni)){let s=ni.call((t=e.nativeEl)!=null?t:e);for(let n of s)oe(e,n);s.addEventListener("change",()=>{i.dispatchEvent(new Event("change"))}),s.addEventListener("addtrack",n=>{if([...i].some(l=>l instanceof _t)){for(let l of s)ae(l);return}oe(e,n.track)}),s.addEventListener("removetrack",n=>{ae(n.track)})}return i}Xt.push("castchange","entercast","leavecast");var o={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},_i=Object.values(o),ye=Ie(),Ae="mux-video",x,It,Kt,Pt,qt,Ft,Yt,Ut,jt,Ot,ue,ke=class extends Jt{constructor(){super();h(this,Ot);h(this,x);h(this,It);h(this,Kt);h(this,Pt,{});h(this,qt,{});h(this,Ft);h(this,Yt);h(this,Ut);h(this,jt);c(this,Kt,(0,m.generatePlayerInitTime)())}static get NAME(){return Ae}static get VERSION(){return ye}static get observedAttributes(){var t;return[..._i,...(t=Jt.observedAttributes)!=null?t:[]]}get preferCmcd(){var t;return(t=this.getAttribute(o.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?m.CmcdTypeValues.includes(t)?this.setAttribute(o.PREFER_CMCD,t):console.warn(`Invalid value for preferCmcd. Must be one of ${m.CmcdTypeValues.join()}`):this.removeAttribute(o.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(o.PLAYER_INIT_TIME)?+this.getAttribute(o.PLAYER_INIT_TIME):r(this,Kt)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(o.PLAYER_INIT_TIME):this.setAttribute(o.PLAYER_INIT_TIME,`${+t}`))}get playerSoftwareName(){var t;return(t=r(this,Ut))!=null?t:Ae}set playerSoftwareName(t){c(this,Ut,t)}get playerSoftwareVersion(){var t;return(t=r(this,Yt))!=null?t:ye}set playerSoftwareVersion(t){c(this,Yt,t)}get _hls(){var t;return(t=r(this,x))==null?void 0:t.engine}get mux(){var t;return(t=this.nativeEl)==null?void 0:t.mux}get error(){var t;return(t=(0,m.getError)(this.nativeEl))!=null?t:null}get errorTranslator(){return r(this,jt)}set errorTranslator(t){c(this,jt,t)}get src(){return this.getAttribute("src")}set src(t){t!==this.src&&(t==null?this.removeAttribute("src"):this.setAttribute("src",t))}get type(){var t;return(t=this.getAttribute(o.TYPE))!=null?t:void 0}set type(t){t!==this.type&&(t?this.setAttribute(o.TYPE,t):this.removeAttribute(o.TYPE))}get autoplay(){let t=this.getAttribute("autoplay");return t===null?!1:t===""?!0:t}set autoplay(t){let s=this.autoplay;t!==s&&(t?this.setAttribute("autoplay",typeof t=="string"?t:""):this.removeAttribute("autoplay"))}get preload(){let t=this.getAttribute("preload");return t===""?"auto":["none","metadata","auto"].includes(t)?t:super.preload}set preload(t){t!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(t)?this.setAttribute("preload",t):this.removeAttribute("preload"))}get debug(){return this.getAttribute(o.DEBUG)!=null}set debug(t){t!==this.debug&&(t?this.setAttribute(o.DEBUG,""):this.removeAttribute(o.DEBUG))}get disableTracking(){return this.hasAttribute(o.DISABLE_TRACKING)}set disableTracking(t){t!==this.disableTracking&&this.toggleAttribute(o.DISABLE_TRACKING,!!t)}get disableCookies(){return this.hasAttribute(o.DISABLE_COOKIES)}set disableCookies(t){t!==this.disableCookies&&(t?this.setAttribute(o.DISABLE_COOKIES,""):this.removeAttribute(o.DISABLE_COOKIES))}get startTime(){let t=this.getAttribute(o.START_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set startTime(t){t!==this.startTime&&(t==null?this.removeAttribute(o.START_TIME):this.setAttribute(o.START_TIME,`${t}`))}get playbackId(){var t;return this.hasAttribute(o.PLAYBACK_ID)?this.getAttribute(o.PLAYBACK_ID):(t=(0,m.toPlaybackIdFromSrc)(this.src))!=null?t:void 0}set playbackId(t){t!==this.playbackId&&(t?this.setAttribute(o.PLAYBACK_ID,t):this.removeAttribute(o.PLAYBACK_ID))}get maxResolution(){var t;return(t=this.getAttribute(o.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(o.MAX_RESOLUTION,t):this.removeAttribute(o.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(o.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(o.MIN_RESOLUTION,t):this.removeAttribute(o.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(o.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(o.RENDITION_ORDER,t):this.removeAttribute(o.RENDITION_ORDER))}get programStartTime(){let t=this.getAttribute(o.PROGRAM_START_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set programStartTime(t){t==null?this.removeAttribute(o.PROGRAM_START_TIME):this.setAttribute(o.PROGRAM_START_TIME,`${t}`)}get programEndTime(){let t=this.getAttribute(o.PROGRAM_END_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set programEndTime(t){t==null?this.removeAttribute(o.PROGRAM_END_TIME):this.setAttribute(o.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){let t=this.getAttribute(o.ASSET_START_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set assetStartTime(t){t==null?this.removeAttribute(o.ASSET_START_TIME):this.setAttribute(o.ASSET_START_TIME,`${t}`)}get assetEndTime(){let t=this.getAttribute(o.ASSET_END_TIME);if(t==null)return;let s=+t;return Number.isNaN(s)?void 0:s}set assetEndTime(t){t==null?this.removeAttribute(o.ASSET_END_TIME):this.setAttribute(o.ASSET_END_TIME,`${t}`)}get customDomain(){var t;return(t=this.getAttribute(o.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(o.CUSTOM_DOMAIN,t):this.removeAttribute(o.CUSTOM_DOMAIN))}get drmToken(){var t;return(t=this.getAttribute(o.DRM_TOKEN))!=null?t:void 0}set drmToken(t){t!==this.drmToken&&(t?this.setAttribute(o.DRM_TOKEN,t):this.removeAttribute(o.DRM_TOKEN))}get playbackToken(){var t,s,n,l;if(this.hasAttribute(o.PLAYBACK_TOKEN))return(t=this.getAttribute(o.PLAYBACK_TOKEN))!=null?t:void 0;if(this.hasAttribute(o.PLAYBACK_ID)){let[,p]=(0,m.toPlaybackIdParts)((s=this.playbackId)!=null?s:"");return(n=new URLSearchParams(p).get("token"))!=null?n:void 0}if(this.src)return(l=new URLSearchParams(this.src).get("token"))!=null?l:void 0}set playbackToken(t){t!==this.playbackToken&&(t?this.setAttribute(o.PLAYBACK_TOKEN,t):this.removeAttribute(o.PLAYBACK_TOKEN))}get tokens(){let t=this.getAttribute(o.PLAYBACK_TOKEN),s=this.getAttribute(o.DRM_TOKEN);return{...r(this,qt),...t!=null?{playback:t}:{},...s!=null?{drm:s}:{}}}set tokens(t){c(this,qt,t!=null?t:{})}get ended(){return(0,m.getEnded)(this.nativeEl,this._hls)}get envKey(){var t;return(t=this.getAttribute(o.ENV_KEY))!=null?t:void 0}set envKey(t){t!==this.envKey&&(t?this.setAttribute(o.ENV_KEY,t):this.removeAttribute(o.ENV_KEY))}get beaconCollectionDomain(){var t;return(t=this.getAttribute(o.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(o.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(o.BEACON_COLLECTION_DOMAIN))}get streamType(){var t;return(t=this.getAttribute(o.STREAM_TYPE))!=null?t:(0,m.getStreamType)(this.nativeEl)}set streamType(t){t!==this.streamType&&(t?this.setAttribute(o.STREAM_TYPE,t):this.removeAttribute(o.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(o.TARGET_LIVE_WINDOW)?+this.getAttribute(o.TARGET_LIVE_WINDOW):(0,m.getTargetLiveWindow)(this.nativeEl)}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(o.TARGET_LIVE_WINDOW):this.setAttribute(o.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t,s;if(this.hasAttribute(o.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:n}=this,l=(t=this.nativeEl.seekable.end(0))!=null?t:0,p=(s=this.nativeEl.seekable.start(0))!=null?s:0;return Math.max(p,l-n)}return(0,m.getLiveEdgeStart)(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(o.LIVE_EDGE_OFFSET))return+this.getAttribute(o.LIVE_EDGE_OFFSET)}set liveEdgeOffset(t){t!=this.liveEdgeOffset&&(t==null?this.removeAttribute(o.LIVE_EDGE_OFFSET):this.setAttribute(o.LIVE_EDGE_OFFSET,`${+t}`))}get seekable(){return(0,m.getSeekable)(this.nativeEl)}async addCuePoints(t){return(0,m.addCuePoints)(this.nativeEl,t)}get activeCuePoint(){return(0,m.getActiveCuePoint)(this.nativeEl)}get cuePoints(){return(0,m.getCuePoints)(this.nativeEl)}async addChapters(t){return(0,m.addChapters)(this.nativeEl,t)}get activeChapter(){return(0,m.getActiveChapter)(this.nativeEl)}get chapters(){return(0,m.getChapters)(this.nativeEl)}getStartDate(){return(0,m.getStartDate)(this.nativeEl,this._hls)}get currentPdt(){return(0,m.getCurrentPdt)(this.nativeEl,this._hls)}get preferPlayback(){let t=this.getAttribute(o.PREFER_PLAYBACK);if(t===m.PlaybackTypes.MSE||t===m.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===m.PlaybackTypes.MSE||t===m.PlaybackTypes.NATIVE?this.setAttribute(o.PREFER_PLAYBACK,t):this.removeAttribute(o.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(s=>s.startsWith("metadata-")&&![o.METADATA_URL].includes(s)).reduce((s,n)=>{let l=this.getAttribute(n);return l!=null&&(s[n.replace(/^metadata-/,"").replace(/-/g,"_")]=l),s},{}),...r(this,Pt)}}set metadata(t){c(this,Pt,t!=null?t:{}),this.mux&&this.mux.emit("hb",r(this,Pt))}get _hlsConfig(){return r(this,Ft)}set _hlsConfig(t){c(this,Ft,t)}load(){c(this,x,(0,m.initialize)(this,this.nativeEl,r(this,x)))}unload(){(0,m.teardown)(this.nativeEl,r(this,x)),c(this,x,void 0)}attributeChangedCallback(t,s,n){var p,d;switch(Jt.observedAttributes.includes(t)&&!["src","autoplay","preload"].includes(t)&&super.attributeChangedCallback(t,s,n),t){case o.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=n!=null?n:void 0;break;case o.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=n!=null?n:void 0;break;case"src":{let T=!!s,N=!!n;!T&&N?y(this,Ot,ue).call(this):T&&!N?this.unload():T&&N&&(this.unload(),y(this,Ot,ue).call(this));break}case"autoplay":if(n===s)break;(p=r(this,x))==null||p.setAutoplay(this.autoplay);break;case"preload":if(n===s)break;(d=r(this,x))==null||d.setPreload(n);break;case o.PLAYBACK_ID:this.src=(0,m.toMuxVideoURL)(this);break;case o.DEBUG:{let T=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=T);break}case o.METADATA_URL:n&&fetch(n).then(T=>T.json()).then(T=>this.metadata=T).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${n}!`));break;case o.STREAM_TYPE:(n==null||n!==s)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case o.TARGET_LIVE_WINDOW:(n==null||n!==s)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;default:break}}connectedCallback(){var t;(t=super.connectedCallback)==null||t.call(this),this.nativeEl&&this.src&&!r(this,x)&&y(this,Ot,ue).call(this)}disconnectedCallback(){this.unload()}};x=new WeakMap,It=new WeakMap,Kt=new WeakMap,Pt=new WeakMap,qt=new WeakMap,Ft=new WeakMap,Yt=new WeakMap,Ut=new WeakMap,jt=new WeakMap,Ot=new WeakSet,ue=async function(){r(this,It)||(await c(this,It,Promise.resolve()),c(this,It,null),this.load())};var Wt,Bt=class extends He(oi(ke)){constructor(){super(...arguments);h(this,Wt)}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var t;return(t=r(this,Wt))!=null?t:this.muxCastCustomData}set castCustomData(t){c(this,Wt,t)}};Wt=new WeakMap;zt.customElements.get("mux-video")||(zt.customElements.define("mux-video",Bt),zt.MuxVideoElement=Bt);var Ii=Bt; | ||
//# sourceMappingURL=index.cjs.js.map |
import MuxVideoElement from '@mux/mux-video'; | ||
import React from 'react'; | ||
declare const _default: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<MuxVideoElement>, Exclude<keyof React.HTMLAttributes<MuxVideoElement>, "play" | "pause" | "seeking" | "error" | "ended" | "height" | "width" | "audioTracks" | "type" | "debug" | "disableCookies" | "errorTranslator" | "beaconCollectionDomain" | "muted" | "preload" | "metadata" | "src" | "seekable" | "autoplay" | "buffered" | "controls" | "crossOrigin" | "currentSrc" | "currentTime" | "defaultMuted" | "defaultPlaybackRate" | "disableRemotePlayback" | "duration" | "loop" | "mediaKeys" | "networkState" | "onencrypted" | "onwaitingforkey" | "paused" | "playbackRate" | "played" | "preservesPitch" | "readyState" | "remote" | "sinkId" | "srcObject" | "textTracks" | "volume" | "addTextTrack" | "canPlayType" | "fastSeek" | "load" | "setMediaKeys" | "setSinkId" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "mux" | "chapters" | "_hlsConfig" | "customDomain" | "disableTracking" | "drmToken" | "playbackToken" | "envKey" | "liveEdgeStart" | "maxResolution" | "minResolution" | "playbackId" | "playerInitTime" | "preferCmcd" | "preferPlayback" | "programStartTime" | "programEndTime" | "assetStartTime" | "assetEndTime" | "renditionOrder" | "startTime" | "streamType" | "targetLiveWindow" | "tokens" | "playerSoftwareName" | "playerSoftwareVersion" | "liveEdgeOffset" | "_hls" | "playsInline" | "poster" | "disablePictureInPicture" | "muxCastCustomData" | "castCustomData" | "addCuePoints" | "activeCuePoint" | "cuePoints" | "addChapters" | "activeChapter" | "getStartDate" | "currentPdt" | "unload" | "nativeEl" | "init" | "handleEvent" | "onenterpictureinpicture" | "onleavepictureinpicture" | "videoHeight" | "videoWidth" | "cancelVideoFrameCallback" | "getVideoPlaybackQuality" | "requestPictureInPicture" | "requestVideoFrameCallback" | "videoTracks" | "addVideoTrack" | "addAudioTrack" | "removeVideoTrack" | "removeAudioTrack" | "videoRenditions" | "audioRenditions">> & {} & Partial<Pick<MuxVideoElement, Exclude<keyof MuxVideoElement, keyof HTMLElement | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "adoptedCallback">>> & React.RefAttributes<MuxVideoElement>>; | ||
declare const _default: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<MuxVideoElement>, Exclude<keyof React.HTMLAttributes<MuxVideoElement>, "play" | "pause" | "seeking" | "error" | "ended" | "height" | "width" | "audioTracks" | "type" | "debug" | "disableCookies" | "errorTranslator" | "beaconCollectionDomain" | "muted" | "preload" | "metadata" | "src" | "seekable" | "autoplay" | "buffered" | "controls" | "crossOrigin" | "currentSrc" | "currentTime" | "defaultMuted" | "defaultPlaybackRate" | "disableRemotePlayback" | "duration" | "loop" | "mediaKeys" | "networkState" | "onencrypted" | "onwaitingforkey" | "paused" | "playbackRate" | "played" | "preservesPitch" | "readyState" | "remote" | "sinkId" | "srcObject" | "textTracks" | "volume" | "addTextTrack" | "canPlayType" | "fastSeek" | "load" | "setMediaKeys" | "setSinkId" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "mux" | "getVideoPlaybackQuality" | "chapters" | "_hlsConfig" | "customDomain" | "disableTracking" | "drmToken" | "playbackToken" | "envKey" | "liveEdgeStart" | "maxResolution" | "minResolution" | "playbackId" | "playerInitTime" | "preferCmcd" | "preferPlayback" | "programStartTime" | "programEndTime" | "assetStartTime" | "assetEndTime" | "renditionOrder" | "startTime" | "streamType" | "targetLiveWindow" | "tokens" | "playerSoftwareName" | "playerSoftwareVersion" | "liveEdgeOffset" | "_hls" | "playsInline" | "poster" | "disablePictureInPicture" | "muxCastCustomData" | "castCustomData" | "addCuePoints" | "activeCuePoint" | "cuePoints" | "addChapters" | "activeChapter" | "getStartDate" | "currentPdt" | "unload" | "nativeEl" | "init" | "handleEvent" | "onenterpictureinpicture" | "onleavepictureinpicture" | "videoHeight" | "videoWidth" | "cancelVideoFrameCallback" | "requestPictureInPicture" | "requestVideoFrameCallback" | "videoTracks" | "addVideoTrack" | "addAudioTrack" | "removeVideoTrack" | "removeAudioTrack" | "videoRenditions" | "audioRenditions">> & {} & Partial<Pick<MuxVideoElement, Exclude<keyof MuxVideoElement, keyof HTMLElement | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "adoptedCallback">>> & React.RefAttributes<MuxVideoElement>>; | ||
export default _default; |
import MuxVideoElement from '@mux/mux-video'; | ||
import React from 'react'; | ||
declare const _default: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<MuxVideoElement>, "play" | "pause" | "seeking" | "error" | "ended" | "height" | "width" | "audioTracks" | "type" | "debug" | "disableCookies" | "errorTranslator" | "beaconCollectionDomain" | "muted" | "preload" | "metadata" | "src" | "seekable" | "autoplay" | "buffered" | "controls" | "crossOrigin" | "currentSrc" | "currentTime" | "defaultMuted" | "defaultPlaybackRate" | "disableRemotePlayback" | "duration" | "loop" | "mediaKeys" | "networkState" | "onencrypted" | "onwaitingforkey" | "paused" | "playbackRate" | "played" | "preservesPitch" | "readyState" | "remote" | "sinkId" | "srcObject" | "textTracks" | "volume" | "addTextTrack" | "canPlayType" | "fastSeek" | "load" | "setMediaKeys" | "setSinkId" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "mux" | "chapters" | "_hlsConfig" | "customDomain" | "disableTracking" | "drmToken" | "playbackToken" | "envKey" | "liveEdgeStart" | "maxResolution" | "minResolution" | "playbackId" | "playerInitTime" | "preferCmcd" | "preferPlayback" | "programStartTime" | "programEndTime" | "assetStartTime" | "assetEndTime" | "renditionOrder" | "startTime" | "streamType" | "targetLiveWindow" | "tokens" | "playerSoftwareName" | "playerSoftwareVersion" | "liveEdgeOffset" | "_hls" | "playsInline" | "poster" | "disablePictureInPicture" | "muxCastCustomData" | "castCustomData" | "addCuePoints" | "activeCuePoint" | "cuePoints" | "addChapters" | "activeChapter" | "getStartDate" | "currentPdt" | "unload" | "nativeEl" | "init" | "handleEvent" | "onenterpictureinpicture" | "onleavepictureinpicture" | "videoHeight" | "videoWidth" | "cancelVideoFrameCallback" | "getVideoPlaybackQuality" | "requestPictureInPicture" | "requestVideoFrameCallback" | "videoTracks" | "addVideoTrack" | "addAudioTrack" | "removeVideoTrack" | "removeAudioTrack" | "videoRenditions" | "audioRenditions"> & {} & Partial<Omit<MuxVideoElement, keyof HTMLElement | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "adoptedCallback">> & React.RefAttributes<MuxVideoElement>>; | ||
declare const _default: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<MuxVideoElement>, "play" | "pause" | "seeking" | "error" | "ended" | "height" | "width" | "audioTracks" | "type" | "debug" | "disableCookies" | "errorTranslator" | "beaconCollectionDomain" | "muted" | "preload" | "metadata" | "src" | "seekable" | "autoplay" | "buffered" | "controls" | "crossOrigin" | "currentSrc" | "currentTime" | "defaultMuted" | "defaultPlaybackRate" | "disableRemotePlayback" | "duration" | "loop" | "mediaKeys" | "networkState" | "onencrypted" | "onwaitingforkey" | "paused" | "playbackRate" | "played" | "preservesPitch" | "readyState" | "remote" | "sinkId" | "srcObject" | "textTracks" | "volume" | "addTextTrack" | "canPlayType" | "fastSeek" | "load" | "setMediaKeys" | "setSinkId" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "mux" | "getVideoPlaybackQuality" | "chapters" | "_hlsConfig" | "customDomain" | "disableTracking" | "drmToken" | "playbackToken" | "envKey" | "liveEdgeStart" | "maxResolution" | "minResolution" | "playbackId" | "playerInitTime" | "preferCmcd" | "preferPlayback" | "programStartTime" | "programEndTime" | "assetStartTime" | "assetEndTime" | "renditionOrder" | "startTime" | "streamType" | "targetLiveWindow" | "tokens" | "playerSoftwareName" | "playerSoftwareVersion" | "liveEdgeOffset" | "_hls" | "playsInline" | "poster" | "disablePictureInPicture" | "muxCastCustomData" | "castCustomData" | "addCuePoints" | "activeCuePoint" | "cuePoints" | "addChapters" | "activeChapter" | "getStartDate" | "currentPdt" | "unload" | "nativeEl" | "init" | "handleEvent" | "onenterpictureinpicture" | "onleavepictureinpicture" | "videoHeight" | "videoWidth" | "cancelVideoFrameCallback" | "requestPictureInPicture" | "requestVideoFrameCallback" | "videoTracks" | "addVideoTrack" | "addAudioTrack" | "removeVideoTrack" | "removeAudioTrack" | "videoRenditions" | "audioRenditions"> & {} & Partial<Omit<MuxVideoElement, keyof HTMLElement | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "adoptedCallback">> & React.RefAttributes<MuxVideoElement>>; | ||
export default _default; |
{ | ||
"name": "@mux/mux-video", | ||
"version": "0.24.2-canary.0", | ||
"version": "0.24.2-canary.1", | ||
"description": "A custom mux video element for the browser that Just Works™", | ||
@@ -37,12 +37,12 @@ "keywords": [ | ||
".": { | ||
"types@<4.3.5": "./dist/types-ts3.4/index.d.ts", | ||
"types": "./dist/types/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs.js", | ||
"types@<4.3.5": "./dist/types-ts3.4/index.d.ts", | ||
"types": "./dist/types/index.d.ts", | ||
"default": "./dist/index.cjs.js" | ||
}, | ||
"./react": { | ||
"types": "./dist/types/react.d.ts", | ||
"import": "./dist/react.mjs", | ||
"require": "./dist/react.cjs.js", | ||
"types": "./dist/types/react.d.ts", | ||
"default": "./dist/react.cjs.js" | ||
@@ -85,4 +85,4 @@ } | ||
"@mux/playback-core": "0.28.1", | ||
"castable-video": "~1.1.3", | ||
"custom-media-element": "~1.4.1", | ||
"castable-video": "~1.1.4", | ||
"custom-media-element": "~1.4.2", | ||
"media-tracks": "~0.3.2" | ||
@@ -92,5 +92,5 @@ }, | ||
"@open-wc/testing": "^4.0.0", | ||
"@typescript-eslint/eslint-plugin": "^8.3.0", | ||
"@typescript-eslint/parser": "^8.3.0", | ||
"@web/dev-server-esbuild": "^1.0.2", | ||
"@typescript-eslint/eslint-plugin": "^8.18.1", | ||
"@typescript-eslint/parser": "^8.18.1", | ||
"@web/dev-server-esbuild": "^1.0.3", | ||
"@web/dev-server-import-maps": "^0.2.1", | ||
@@ -100,5 +100,5 @@ "@web/test-runner": "^0.19.0", | ||
"downlevel-dts": "^0.11.0", | ||
"esbuild": "^0.19.8", | ||
"eslint": "^9.9.1", | ||
"hls.js": "~1.5.11", | ||
"esbuild": "^0.24.1", | ||
"eslint": "^9.17.0", | ||
"hls.js": "~1.5.18", | ||
"npm-run-all": "^4.1.5", | ||
@@ -108,4 +108,4 @@ "react": "^18.2.0", | ||
"shx": "^0.3.4", | ||
"typescript": "^5.5.4" | ||
"typescript": "^5.7.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6252502
5273
Updatedcastable-video@~1.1.4
Updatedcustom-media-element@~1.4.2