@mux/mux-video 0.30.6-canary.1 → 0.30.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.cjs.js +1 -1
- package/dist/base.mjs +1 -1
- package/dist/mux-video.js +1 -1
- package/dist/mux-video.mjs +1 -1
- package/package.json +2 -2
package/dist/base.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var K=n=>{throw TypeError(n)};var W=(n,a)=>{for(var e in a)P(n,e,{get:a[e],enumerable:!0})},V=(n,a,e,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of G(a))!F.call(n,s)&&s!==e&&P(n,s,{get:()=>a[s],enumerable:!(i=U(a,s))||i.enumerable});return n};var H=n=>V(P({},"__esModule",{value:!0}),n);var C=(n,a,e)=>a.has(n)||K("Cannot "+e);var o=(n,a,e)=>(C(n,a,"read from private field"),e?e.call(n):a.get(n)),d=(n,a,e)=>a.has(n)?K("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,e),E=(n,a,e,i)=>(C(n,a,"write to private field"),i?i.call(n,e):a.set(n,e),e),_=(n,a,e)=>(C(n,a,"access private method"),e);var X={};W(X,{Attributes:()=>t,Events:()=>T.Events,MediaError:()=>r.MediaError,MuxVideoBaseElement:()=>v,generatePlayerInitTime:()=>r.generatePlayerInitTime,playerSoftwareName:()=>k,playerSoftwareVersion:()=>D});module.exports=H(X);var r=require("@mux/playback-core");var $=()=>{try{return"0.30.
|
|
1
|
+
"use strict";var P=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var K=n=>{throw TypeError(n)};var W=(n,a)=>{for(var e in a)P(n,e,{get:a[e],enumerable:!0})},V=(n,a,e,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of G(a))!F.call(n,s)&&s!==e&&P(n,s,{get:()=>a[s],enumerable:!(i=U(a,s))||i.enumerable});return n};var H=n=>V(P({},"__esModule",{value:!0}),n);var C=(n,a,e)=>a.has(n)||K("Cannot "+e);var o=(n,a,e)=>(C(n,a,"read from private field"),e?e.call(n):a.get(n)),d=(n,a,e)=>a.has(n)?K("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,e),E=(n,a,e,i)=>(C(n,a,"write to private field"),i?i.call(n,e):a.set(n,e),e),_=(n,a,e)=>(C(n,a,"access private method"),e);var X={};W(X,{Attributes:()=>t,Events:()=>T.Events,MediaError:()=>r.MediaError,MuxVideoBaseElement:()=>v,generatePlayerInitTime:()=>r.generatePlayerInitTime,playerSoftwareName:()=>k,playerSoftwareVersion:()=>D});module.exports=H(X);var r=require("@mux/playback-core");var $=()=>{try{return"0.30.6"}catch{}return"UNKNOWN"},w=$(),B=()=>w;var T=require("custom-media-element");var Y=`
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`;var t={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-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",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},z=Object.values(t),D=B(),k="mux-video",m,O,g,R,I,M,S,y,b,N,u,f,L,p,v=class extends T.CustomVideoElement{constructor(){super();d(this,u);d(this,m);d(this,O);d(this,g,{});d(this,R,{});d(this,I);d(this,M);d(this,S);d(this,y);d(this,b,"");d(this,N,e=>{var h;let i=(0,r.getMetadata)(this.nativeEl),s=(h=this.metadata)!=null?h:{};this.metadata={...i,...s},(i==null?void 0:i["com.mux.video.branding"])==="mux-free-plan"&&(E(this,b,"default"),this.updateLogo())});d(this,L);E(this,O,(0,r.generatePlayerInitTime)())}static get NAME(){return k}static get VERSION(){return D}static get observedAttributes(){var e;return[...z,...(e=T.CustomVideoElement.observedAttributes)!=null?e:[]]}static getLogoHTML(e){return!e||e==="false"?"":e==="default"?Y:`<img part="logo" src="${e}" />`}static getTemplateHTML(e={}){var i;return`
|
|
3
3
|
${T.CustomVideoElement.getTemplateHTML(e)}
|
|
4
4
|
<style>
|
package/dist/base.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var D=n=>{throw TypeError(n)};var P=(n,a,e)=>a.has(n)||D("Cannot "+e);var s=(n,a,e)=>(P(n,a,"read from private field"),e?e.call(n):a.get(n)),u=(n,a,e)=>a.has(n)?D("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,e),l=(n,a,e,i)=>(P(n,a,"write to private field"),i?i.call(n,e):a.set(n,e),e),g=(n,a,e)=>(P(n,a,"access private method"),e);import{initialize as F,teardown as W,generatePlayerInitTime as V,PlaybackTypes as N,toMuxVideoURL as H,MediaError as me,getError as $,CmcdTypeValues as x,addCuePoints as w,getCuePoints as z,getActiveCuePoint as X,addChapters as j,getActiveChapter as q,getMetadata as Z,getStartDate as J,getCurrentPdt as Q,getStreamType as ee,getTargetLiveWindow as te,getLiveEdgeStart as ie,getSeekable as re,getEnded as se,getChapters as ne,toPlaybackIdFromSrc as ae,toPlaybackIdParts as oe,getCoreReference as ue}from"@mux/playback-core";var U=()=>{try{return"0.30.
|
|
1
|
+
var D=n=>{throw TypeError(n)};var P=(n,a,e)=>a.has(n)||D("Cannot "+e);var s=(n,a,e)=>(P(n,a,"read from private field"),e?e.call(n):a.get(n)),u=(n,a,e)=>a.has(n)?D("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,e),l=(n,a,e,i)=>(P(n,a,"write to private field"),i?i.call(n,e):a.set(n,e),e),g=(n,a,e)=>(P(n,a,"access private method"),e);import{initialize as F,teardown as W,generatePlayerInitTime as V,PlaybackTypes as N,toMuxVideoURL as H,MediaError as me,getError as $,CmcdTypeValues as x,addCuePoints as w,getCuePoints as z,getActiveCuePoint as X,addChapters as j,getActiveChapter as q,getMetadata as Z,getStartDate as J,getCurrentPdt as Q,getStreamType as ee,getTargetLiveWindow as te,getLiveEdgeStart as ie,getSeekable as re,getEnded as se,getChapters as ne,toPlaybackIdFromSrc as ae,toPlaybackIdParts as oe,getCoreReference as ue}from"@mux/playback-core";var U=()=>{try{return"0.30.6"}catch{}return"UNKNOWN"},G=U(),k=()=>G;import{CustomVideoElement as L,Events as pe}from"custom-media-element";var v=`
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`;var t={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-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",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},de=Object.values(t),K=k(),B="mux-video",T,_,c,p,O,R,I,M,m,S,o,A,y,b,Y=class extends L{constructor(){super();u(this,o);u(this,T);u(this,_);u(this,c,{});u(this,p,{});u(this,O);u(this,R);u(this,I);u(this,M);u(this,m,"");u(this,S,e=>{var E;let i=Z(this.nativeEl),r=(E=this.metadata)!=null?E:{};this.metadata={...i,...r},(i==null?void 0:i["com.mux.video.branding"])==="mux-free-plan"&&(l(this,m,"default"),this.updateLogo())});u(this,y);l(this,_,V())}static get NAME(){return B}static get VERSION(){return K}static get observedAttributes(){var e;return[...de,...(e=L.observedAttributes)!=null?e:[]]}static getLogoHTML(e){return!e||e==="false"?"":e==="default"?v:`<img part="logo" src="${e}" />`}static getTemplateHTML(e={}){var i;return`
|
|
3
3
|
${L.getTemplateHTML(e)}
|
|
4
4
|
<style>
|
package/dist/mux-video.js
CHANGED
|
@@ -106,7 +106,7 @@ Schedule: ${l.map(p=>mt(p))} pos: ${this.timelinePos}`),d.length&&this.log(`Remo
|
|
|
106
106
|
<video${ef(s)}></video>
|
|
107
107
|
</slot>
|
|
108
108
|
<slot></slot>
|
|
109
|
-
`}function Zh(s,{tag:e,is:t}){var n,a,o,l,u,zh,c,h,f,m,p,g,xi,Cl,Ol,Xh,Ml,Qh,Jh;let i=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=i?_T(i):[];return o=class extends s{constructor(){super(...arguments);X(this,g);X(this,c,!1);X(this,h,null);X(this,f,new Map);X(this,m);X(this,p);re(this,"get");re(this,"set");re(this,"call")}static get observedAttributes(){var D,P,O;return me(D=o,u,zh).call(D),[...(O=(P=i==null?void 0:i.constructor)==null?void 0:P.observedAttributes)!=null?O:[],...jh]}get nativeEl(){var b,D,P,O,N;return me(this,g,xi).call(this),(N=(O=(D=(b=I(this,h))!=null?b:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?O:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?N:null}set nativeEl(b){j(this,h,b)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(b){this.toggleAttribute("muted",b)}get src(){return this.getAttribute("src")}set src(b){this.setAttribute("src",`${b}`)}get preload(){var b,D;return(D=this.getAttribute("preload"))!=null?D:(b=this.nativeEl)==null?void 0:b.preload}set preload(b){this.setAttribute("preload",`${b}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let b=ST(this.attributes);t&&(b.is=t),e&&(b.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(b)}this.nativeEl.muted=this.hasAttribute("muted");for(let b of r)me(this,g,Qh).call(this,b);me(this,g,Cl).call(this)}handleEvent(b){b.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(b.type,{detail:b.detail}))}attributeChangedCallback(b,D,P){me(this,g,xi).call(this),me(this,g,Jh).call(this,b,D,P)}connectedCallback(){me(this,g,xi).call(this),I(this,p)||me(this,g,Cl).call(this)}disconnectedCallback(){var b,D,P;(b=I(this,m))==null||b.disconnect(),j(this,m,void 0),I(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",I(this,p)),j(this,p,void 0));for(let O of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(O,this,!0);I(this,f).forEach(O=>O.remove()),I(this,f).clear(),j(this,h,null)}},l=new WeakMap,u=new WeakSet,zh=function(){if(I(this,l))return;j(this,l,!0);let b=new Set(this.observedAttributes);b.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof i[D]=="function")this.prototype[D]=function(...P){return me(this,g,xi).call(this),(()=>{var F;if(this.call)return this.call(D,...P);let N=(F=this.nativeEl)==null?void 0:F[D];return N==null?void 0:N.apply(this.nativeEl,P)})()};else{let P={get(){var N,F,M;me(this,g,xi).call(this);let O=D.toLowerCase();if(b.has(O)){let G=this.getAttribute(O);return G===null?!1:G===""?!0:G}return(M=(N=this.get)==null?void 0:N.call(this,D))!=null?M:(F=this.nativeEl)==null?void 0:F[D]}};D!==D.toUpperCase()&&(P.set=function(O){me(this,g,xi).call(this);let N=D.toLowerCase();if(b.has(N)){O===!0||O===!1||O==null?this.toggleAttribute(N,!!O):this.setAttribute(N,O);return}if(this.set){this.set(D,O);return}this.nativeEl&&(this.nativeEl[D]=O)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,xi=function(){I(this,c)||(j(this,c,!0),this.init())},Cl=function(){var b,D;j(this,m,new MutationObserver(me(this,g,Xh).bind(this))),j(this,p,()=>me(this,g,Ol).call(this)),(b=this.shadowRoot)==null||b.addEventListener("slotchange",I(this,p)),me(this,g,Ol).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Ol=function(){var O;let b=new Map(I(this,f)),D=(O=this.shadowRoot)==null?void 0:O.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter(N=>["track","source"].includes(N.localName))).forEach(N=>{var M,G;b.delete(N);let F=I(this,f).get(N);F||(F=N.cloneNode(),I(this,f).set(N,F),(M=I(this,m))==null||M.observe(N,{attributes:!0})),(G=this.nativeEl)==null||G.append(F),me(this,g,Ml).call(this,F)}),b.forEach((N,F)=>{N.remove(),I(this,f).delete(F)})},Xh=function(b){var D;for(let P of b)if(P.type==="attributes"){let{target:O,attributeName:N}=P,F=I(this,f).get(O);F&&N&&(F.setAttribute(N,(D=O.getAttribute(N))!=null?D:""),me(this,g,Ml).call(this,F))}},Ml=function(b){b&&b.localName==="track"&&b.default&&(b.kind==="chapters"||b.kind==="metadata")&&b.track.mode==="disabled"&&(b.track.mode="hidden")},Qh=function(b){if(Object.prototype.hasOwnProperty.call(this,b)){let D=this[b];delete this[b],this[b]=D}},Jh=function(b,D,P){var O,N,F;["id","class"].includes(b)||!o.observedAttributes.includes(b)&&this.constructor.observedAttributes.includes(b)||(P===null?(O=this.nativeEl)==null||O.removeAttribute(b):((N=this.nativeEl)==null?void 0:N.getAttribute(b))!==P&&((F=this.nativeEl)==null||F.setAttribute(b,P)))},X(o,u),re(o,"getTemplateHTML",e.endsWith("audio")?ET:TT),re(o,"shadowRootOptions",{mode:"open"}),re(o,"Events",Wh),X(o,l,!1),o}function _T(s){let e=[];for(let t=Object.getPrototypeOf(s);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let i=Object.getOwnPropertyNames(t);e.push(...i)}return e}function ef(s){let e="";for(let t in s){if(!jh.includes(t))continue;let i=s[t];i===""?e+=` ${t}`:e+=` ${t}="${i}"`}return e}function ST(s){let e={};for(let t of s)e[t.name]=t.value;return e}var qh,Hs=Zh((qh=globalThis.HTMLElement)!=null?qh:class{},{tag:"video"}),Yh,QT=Zh((Yh=globalThis.HTMLElement)!=null?Yh:class{},{tag:"audio"});var rf=s=>{throw TypeError(s)},Nl=(s,e,t)=>e.has(s)||rf("Cannot "+t),ke=(s,e,t)=>(Nl(s,e,"read from private field"),t?t.call(s):e.get(s)),ot=(s,e,t)=>e.has(s)?rf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),yt=(s,e,t,i)=>(Nl(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t),En=(s,e,t)=>(Nl(s,e,"access private method"),t),bT=()=>{try{return"0.30.
|
|
109
|
+
`}function Zh(s,{tag:e,is:t}){var n,a,o,l,u,zh,c,h,f,m,p,g,xi,Cl,Ol,Xh,Ml,Qh,Jh;let i=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=i?_T(i):[];return o=class extends s{constructor(){super(...arguments);X(this,g);X(this,c,!1);X(this,h,null);X(this,f,new Map);X(this,m);X(this,p);re(this,"get");re(this,"set");re(this,"call")}static get observedAttributes(){var D,P,O;return me(D=o,u,zh).call(D),[...(O=(P=i==null?void 0:i.constructor)==null?void 0:P.observedAttributes)!=null?O:[],...jh]}get nativeEl(){var b,D,P,O,N;return me(this,g,xi).call(this),(N=(O=(D=(b=I(this,h))!=null?b:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?O:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?N:null}set nativeEl(b){j(this,h,b)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(b){this.toggleAttribute("muted",b)}get src(){return this.getAttribute("src")}set src(b){this.setAttribute("src",`${b}`)}get preload(){var b,D;return(D=this.getAttribute("preload"))!=null?D:(b=this.nativeEl)==null?void 0:b.preload}set preload(b){this.setAttribute("preload",`${b}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let b=ST(this.attributes);t&&(b.is=t),e&&(b.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(b)}this.nativeEl.muted=this.hasAttribute("muted");for(let b of r)me(this,g,Qh).call(this,b);me(this,g,Cl).call(this)}handleEvent(b){b.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(b.type,{detail:b.detail}))}attributeChangedCallback(b,D,P){me(this,g,xi).call(this),me(this,g,Jh).call(this,b,D,P)}connectedCallback(){me(this,g,xi).call(this),I(this,p)||me(this,g,Cl).call(this)}disconnectedCallback(){var b,D,P;(b=I(this,m))==null||b.disconnect(),j(this,m,void 0),I(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",I(this,p)),j(this,p,void 0));for(let O of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(O,this,!0);I(this,f).forEach(O=>O.remove()),I(this,f).clear(),j(this,h,null)}},l=new WeakMap,u=new WeakSet,zh=function(){if(I(this,l))return;j(this,l,!0);let b=new Set(this.observedAttributes);b.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof i[D]=="function")this.prototype[D]=function(...P){return me(this,g,xi).call(this),(()=>{var F;if(this.call)return this.call(D,...P);let N=(F=this.nativeEl)==null?void 0:F[D];return N==null?void 0:N.apply(this.nativeEl,P)})()};else{let P={get(){var N,F,M;me(this,g,xi).call(this);let O=D.toLowerCase();if(b.has(O)){let G=this.getAttribute(O);return G===null?!1:G===""?!0:G}return(M=(N=this.get)==null?void 0:N.call(this,D))!=null?M:(F=this.nativeEl)==null?void 0:F[D]}};D!==D.toUpperCase()&&(P.set=function(O){me(this,g,xi).call(this);let N=D.toLowerCase();if(b.has(N)){O===!0||O===!1||O==null?this.toggleAttribute(N,!!O):this.setAttribute(N,O);return}if(this.set){this.set(D,O);return}this.nativeEl&&(this.nativeEl[D]=O)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,xi=function(){I(this,c)||(j(this,c,!0),this.init())},Cl=function(){var b,D;j(this,m,new MutationObserver(me(this,g,Xh).bind(this))),j(this,p,()=>me(this,g,Ol).call(this)),(b=this.shadowRoot)==null||b.addEventListener("slotchange",I(this,p)),me(this,g,Ol).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Ol=function(){var O;let b=new Map(I(this,f)),D=(O=this.shadowRoot)==null?void 0:O.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter(N=>["track","source"].includes(N.localName))).forEach(N=>{var M,G;b.delete(N);let F=I(this,f).get(N);F||(F=N.cloneNode(),I(this,f).set(N,F),(M=I(this,m))==null||M.observe(N,{attributes:!0})),(G=this.nativeEl)==null||G.append(F),me(this,g,Ml).call(this,F)}),b.forEach((N,F)=>{N.remove(),I(this,f).delete(F)})},Xh=function(b){var D;for(let P of b)if(P.type==="attributes"){let{target:O,attributeName:N}=P,F=I(this,f).get(O);F&&N&&(F.setAttribute(N,(D=O.getAttribute(N))!=null?D:""),me(this,g,Ml).call(this,F))}},Ml=function(b){b&&b.localName==="track"&&b.default&&(b.kind==="chapters"||b.kind==="metadata")&&b.track.mode==="disabled"&&(b.track.mode="hidden")},Qh=function(b){if(Object.prototype.hasOwnProperty.call(this,b)){let D=this[b];delete this[b],this[b]=D}},Jh=function(b,D,P){var O,N,F;["id","class"].includes(b)||!o.observedAttributes.includes(b)&&this.constructor.observedAttributes.includes(b)||(P===null?(O=this.nativeEl)==null||O.removeAttribute(b):((N=this.nativeEl)==null?void 0:N.getAttribute(b))!==P&&((F=this.nativeEl)==null||F.setAttribute(b,P)))},X(o,u),re(o,"getTemplateHTML",e.endsWith("audio")?ET:TT),re(o,"shadowRootOptions",{mode:"open"}),re(o,"Events",Wh),X(o,l,!1),o}function _T(s){let e=[];for(let t=Object.getPrototypeOf(s);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let i=Object.getOwnPropertyNames(t);e.push(...i)}return e}function ef(s){let e="";for(let t in s){if(!jh.includes(t))continue;let i=s[t];i===""?e+=` ${t}`:e+=` ${t}="${i}"`}return e}function ST(s){let e={};for(let t of s)e[t.name]=t.value;return e}var qh,Hs=Zh((qh=globalThis.HTMLElement)!=null?qh:class{},{tag:"video"}),Yh,QT=Zh((Yh=globalThis.HTMLElement)!=null?Yh:class{},{tag:"audio"});var rf=s=>{throw TypeError(s)},Nl=(s,e,t)=>e.has(s)||rf("Cannot "+t),ke=(s,e,t)=>(Nl(s,e,"read from private field"),t?t.call(s):e.get(s)),ot=(s,e,t)=>e.has(s)?rf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),yt=(s,e,t,i)=>(Nl(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t),En=(s,e,t)=>(Nl(s,e,"access private method"),t),bT=()=>{try{return"0.30.6"}catch{}return"UNKNOWN"},AT=bT(),xT=()=>AT,RT=`
|
|
110
110
|
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,C={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-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",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},IT=Object.values(C),tf=xT(),sf="mux-video",qs,Tn,Ys,_n,Sn,bn,An,xn,Ws,Rn,lt,Ri,In,js,nf=class extends Hs{constructor(){super(),ot(this,lt),ot(this,qs),ot(this,Tn),ot(this,Ys,{}),ot(this,_n,{}),ot(this,Sn),ot(this,bn),ot(this,An),ot(this,xn),ot(this,Ws,""),ot(this,Rn,s=>{var e;let t=Oh(this.nativeEl),i=(e=this.metadata)!=null?e:{};this.metadata={...t,...i},(t==null?void 0:t["com.mux.video.branding"])==="mux-free-plan"&&(yt(this,Ws,"default"),this.updateLogo())}),ot(this,In),yt(this,Tn,wh())}static get NAME(){return sf}static get VERSION(){return tf}static get observedAttributes(){var s;return[...IT,...(s=Hs.observedAttributes)!=null?s:[]]}static getLogoHTML(s){return!s||s==="false"?"":s==="default"?RT:`<img part="logo" src="${s}" />`}static getTemplateHTML(s={}){var e;return`
|
|
111
111
|
${Hs.getTemplateHTML(s)}
|
|
112
112
|
<style>
|
package/dist/mux-video.mjs
CHANGED
|
@@ -106,7 +106,7 @@ Schedule: ${l.map(p=>mt(p))} pos: ${this.timelinePos}`),d.length&&this.log(`Remo
|
|
|
106
106
|
<video${ef(s)}></video>
|
|
107
107
|
</slot>
|
|
108
108
|
<slot></slot>
|
|
109
|
-
`}function Zh(s,{tag:e,is:t}){var n,a,o,l,u,zh,c,h,f,m,p,g,xi,Cl,Ol,Xh,Ml,Qh,Jh;let i=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=i?_T(i):[];return o=class extends s{constructor(){super(...arguments);X(this,g);X(this,c,!1);X(this,h,null);X(this,f,new Map);X(this,m);X(this,p);re(this,"get");re(this,"set");re(this,"call")}static get observedAttributes(){var D,P,O;return me(D=o,u,zh).call(D),[...(O=(P=i==null?void 0:i.constructor)==null?void 0:P.observedAttributes)!=null?O:[],...jh]}get nativeEl(){var b,D,P,O,N;return me(this,g,xi).call(this),(N=(O=(D=(b=I(this,h))!=null?b:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?O:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?N:null}set nativeEl(b){j(this,h,b)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(b){this.toggleAttribute("muted",b)}get src(){return this.getAttribute("src")}set src(b){this.setAttribute("src",`${b}`)}get preload(){var b,D;return(D=this.getAttribute("preload"))!=null?D:(b=this.nativeEl)==null?void 0:b.preload}set preload(b){this.setAttribute("preload",`${b}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let b=ST(this.attributes);t&&(b.is=t),e&&(b.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(b)}this.nativeEl.muted=this.hasAttribute("muted");for(let b of r)me(this,g,Qh).call(this,b);me(this,g,Cl).call(this)}handleEvent(b){b.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(b.type,{detail:b.detail}))}attributeChangedCallback(b,D,P){me(this,g,xi).call(this),me(this,g,Jh).call(this,b,D,P)}connectedCallback(){me(this,g,xi).call(this),I(this,p)||me(this,g,Cl).call(this)}disconnectedCallback(){var b,D,P;(b=I(this,m))==null||b.disconnect(),j(this,m,void 0),I(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",I(this,p)),j(this,p,void 0));for(let O of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(O,this,!0);I(this,f).forEach(O=>O.remove()),I(this,f).clear(),j(this,h,null)}},l=new WeakMap,u=new WeakSet,zh=function(){if(I(this,l))return;j(this,l,!0);let b=new Set(this.observedAttributes);b.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof i[D]=="function")this.prototype[D]=function(...P){return me(this,g,xi).call(this),(()=>{var F;if(this.call)return this.call(D,...P);let N=(F=this.nativeEl)==null?void 0:F[D];return N==null?void 0:N.apply(this.nativeEl,P)})()};else{let P={get(){var N,F,M;me(this,g,xi).call(this);let O=D.toLowerCase();if(b.has(O)){let G=this.getAttribute(O);return G===null?!1:G===""?!0:G}return(M=(N=this.get)==null?void 0:N.call(this,D))!=null?M:(F=this.nativeEl)==null?void 0:F[D]}};D!==D.toUpperCase()&&(P.set=function(O){me(this,g,xi).call(this);let N=D.toLowerCase();if(b.has(N)){O===!0||O===!1||O==null?this.toggleAttribute(N,!!O):this.setAttribute(N,O);return}if(this.set){this.set(D,O);return}this.nativeEl&&(this.nativeEl[D]=O)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,xi=function(){I(this,c)||(j(this,c,!0),this.init())},Cl=function(){var b,D;j(this,m,new MutationObserver(me(this,g,Xh).bind(this))),j(this,p,()=>me(this,g,Ol).call(this)),(b=this.shadowRoot)==null||b.addEventListener("slotchange",I(this,p)),me(this,g,Ol).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Ol=function(){var O;let b=new Map(I(this,f)),D=(O=this.shadowRoot)==null?void 0:O.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter(N=>["track","source"].includes(N.localName))).forEach(N=>{var M,G;b.delete(N);let F=I(this,f).get(N);F||(F=N.cloneNode(),I(this,f).set(N,F),(M=I(this,m))==null||M.observe(N,{attributes:!0})),(G=this.nativeEl)==null||G.append(F),me(this,g,Ml).call(this,F)}),b.forEach((N,F)=>{N.remove(),I(this,f).delete(F)})},Xh=function(b){var D;for(let P of b)if(P.type==="attributes"){let{target:O,attributeName:N}=P,F=I(this,f).get(O);F&&N&&(F.setAttribute(N,(D=O.getAttribute(N))!=null?D:""),me(this,g,Ml).call(this,F))}},Ml=function(b){b&&b.localName==="track"&&b.default&&(b.kind==="chapters"||b.kind==="metadata")&&b.track.mode==="disabled"&&(b.track.mode="hidden")},Qh=function(b){if(Object.prototype.hasOwnProperty.call(this,b)){let D=this[b];delete this[b],this[b]=D}},Jh=function(b,D,P){var O,N,F;["id","class"].includes(b)||!o.observedAttributes.includes(b)&&this.constructor.observedAttributes.includes(b)||(P===null?(O=this.nativeEl)==null||O.removeAttribute(b):((N=this.nativeEl)==null?void 0:N.getAttribute(b))!==P&&((F=this.nativeEl)==null||F.setAttribute(b,P)))},X(o,u),re(o,"getTemplateHTML",e.endsWith("audio")?ET:TT),re(o,"shadowRootOptions",{mode:"open"}),re(o,"Events",Wh),X(o,l,!1),o}function _T(s){let e=[];for(let t=Object.getPrototypeOf(s);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let i=Object.getOwnPropertyNames(t);e.push(...i)}return e}function ef(s){let e="";for(let t in s){if(!jh.includes(t))continue;let i=s[t];i===""?e+=` ${t}`:e+=` ${t}="${i}"`}return e}function ST(s){let e={};for(let t of s)e[t.name]=t.value;return e}var qh,Hs=Zh((qh=globalThis.HTMLElement)!=null?qh:class{},{tag:"video"}),Yh,QT=Zh((Yh=globalThis.HTMLElement)!=null?Yh:class{},{tag:"audio"});var rf=s=>{throw TypeError(s)},Nl=(s,e,t)=>e.has(s)||rf("Cannot "+t),ke=(s,e,t)=>(Nl(s,e,"read from private field"),t?t.call(s):e.get(s)),ot=(s,e,t)=>e.has(s)?rf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),yt=(s,e,t,i)=>(Nl(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t),En=(s,e,t)=>(Nl(s,e,"access private method"),t),bT=()=>{try{return"0.30.
|
|
109
|
+
`}function Zh(s,{tag:e,is:t}){var n,a,o,l,u,zh,c,h,f,m,p,g,xi,Cl,Ol,Xh,Ml,Qh,Jh;let i=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=i?_T(i):[];return o=class extends s{constructor(){super(...arguments);X(this,g);X(this,c,!1);X(this,h,null);X(this,f,new Map);X(this,m);X(this,p);re(this,"get");re(this,"set");re(this,"call")}static get observedAttributes(){var D,P,O;return me(D=o,u,zh).call(D),[...(O=(P=i==null?void 0:i.constructor)==null?void 0:P.observedAttributes)!=null?O:[],...jh]}get nativeEl(){var b,D,P,O,N;return me(this,g,xi).call(this),(N=(O=(D=(b=I(this,h))!=null?b:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?O:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?N:null}set nativeEl(b){j(this,h,b)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(b){this.toggleAttribute("muted",b)}get src(){return this.getAttribute("src")}set src(b){this.setAttribute("src",`${b}`)}get preload(){var b,D;return(D=this.getAttribute("preload"))!=null?D:(b=this.nativeEl)==null?void 0:b.preload}set preload(b){this.setAttribute("preload",`${b}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let b=ST(this.attributes);t&&(b.is=t),e&&(b.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(b)}this.nativeEl.muted=this.hasAttribute("muted");for(let b of r)me(this,g,Qh).call(this,b);me(this,g,Cl).call(this)}handleEvent(b){b.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(b.type,{detail:b.detail}))}attributeChangedCallback(b,D,P){me(this,g,xi).call(this),me(this,g,Jh).call(this,b,D,P)}connectedCallback(){me(this,g,xi).call(this),I(this,p)||me(this,g,Cl).call(this)}disconnectedCallback(){var b,D,P;(b=I(this,m))==null||b.disconnect(),j(this,m,void 0),I(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",I(this,p)),j(this,p,void 0));for(let O of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(O,this,!0);I(this,f).forEach(O=>O.remove()),I(this,f).clear(),j(this,h,null)}},l=new WeakMap,u=new WeakSet,zh=function(){if(I(this,l))return;j(this,l,!0);let b=new Set(this.observedAttributes);b.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof i[D]=="function")this.prototype[D]=function(...P){return me(this,g,xi).call(this),(()=>{var F;if(this.call)return this.call(D,...P);let N=(F=this.nativeEl)==null?void 0:F[D];return N==null?void 0:N.apply(this.nativeEl,P)})()};else{let P={get(){var N,F,M;me(this,g,xi).call(this);let O=D.toLowerCase();if(b.has(O)){let G=this.getAttribute(O);return G===null?!1:G===""?!0:G}return(M=(N=this.get)==null?void 0:N.call(this,D))!=null?M:(F=this.nativeEl)==null?void 0:F[D]}};D!==D.toUpperCase()&&(P.set=function(O){me(this,g,xi).call(this);let N=D.toLowerCase();if(b.has(N)){O===!0||O===!1||O==null?this.toggleAttribute(N,!!O):this.setAttribute(N,O);return}if(this.set){this.set(D,O);return}this.nativeEl&&(this.nativeEl[D]=O)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,xi=function(){I(this,c)||(j(this,c,!0),this.init())},Cl=function(){var b,D;j(this,m,new MutationObserver(me(this,g,Xh).bind(this))),j(this,p,()=>me(this,g,Ol).call(this)),(b=this.shadowRoot)==null||b.addEventListener("slotchange",I(this,p)),me(this,g,Ol).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Ol=function(){var O;let b=new Map(I(this,f)),D=(O=this.shadowRoot)==null?void 0:O.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter(N=>["track","source"].includes(N.localName))).forEach(N=>{var M,G;b.delete(N);let F=I(this,f).get(N);F||(F=N.cloneNode(),I(this,f).set(N,F),(M=I(this,m))==null||M.observe(N,{attributes:!0})),(G=this.nativeEl)==null||G.append(F),me(this,g,Ml).call(this,F)}),b.forEach((N,F)=>{N.remove(),I(this,f).delete(F)})},Xh=function(b){var D;for(let P of b)if(P.type==="attributes"){let{target:O,attributeName:N}=P,F=I(this,f).get(O);F&&N&&(F.setAttribute(N,(D=O.getAttribute(N))!=null?D:""),me(this,g,Ml).call(this,F))}},Ml=function(b){b&&b.localName==="track"&&b.default&&(b.kind==="chapters"||b.kind==="metadata")&&b.track.mode==="disabled"&&(b.track.mode="hidden")},Qh=function(b){if(Object.prototype.hasOwnProperty.call(this,b)){let D=this[b];delete this[b],this[b]=D}},Jh=function(b,D,P){var O,N,F;["id","class"].includes(b)||!o.observedAttributes.includes(b)&&this.constructor.observedAttributes.includes(b)||(P===null?(O=this.nativeEl)==null||O.removeAttribute(b):((N=this.nativeEl)==null?void 0:N.getAttribute(b))!==P&&((F=this.nativeEl)==null||F.setAttribute(b,P)))},X(o,u),re(o,"getTemplateHTML",e.endsWith("audio")?ET:TT),re(o,"shadowRootOptions",{mode:"open"}),re(o,"Events",Wh),X(o,l,!1),o}function _T(s){let e=[];for(let t=Object.getPrototypeOf(s);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let i=Object.getOwnPropertyNames(t);e.push(...i)}return e}function ef(s){let e="";for(let t in s){if(!jh.includes(t))continue;let i=s[t];i===""?e+=` ${t}`:e+=` ${t}="${i}"`}return e}function ST(s){let e={};for(let t of s)e[t.name]=t.value;return e}var qh,Hs=Zh((qh=globalThis.HTMLElement)!=null?qh:class{},{tag:"video"}),Yh,QT=Zh((Yh=globalThis.HTMLElement)!=null?Yh:class{},{tag:"audio"});var rf=s=>{throw TypeError(s)},Nl=(s,e,t)=>e.has(s)||rf("Cannot "+t),ke=(s,e,t)=>(Nl(s,e,"read from private field"),t?t.call(s):e.get(s)),ot=(s,e,t)=>e.has(s)?rf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),yt=(s,e,t,i)=>(Nl(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t),En=(s,e,t)=>(Nl(s,e,"access private method"),t),bT=()=>{try{return"0.30.6"}catch{}return"UNKNOWN"},AT=bT(),xT=()=>AT,RT=`
|
|
110
110
|
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,C={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-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",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},IT=Object.values(C),tf=xT(),sf="mux-video",qs,Tn,Ys,_n,Sn,bn,An,xn,Ws,Rn,lt,Ri,In,js,nf=class extends Hs{constructor(){super(),ot(this,lt),ot(this,qs),ot(this,Tn),ot(this,Ys,{}),ot(this,_n,{}),ot(this,Sn),ot(this,bn),ot(this,An),ot(this,xn),ot(this,Ws,""),ot(this,Rn,s=>{var e;let t=Oh(this.nativeEl),i=(e=this.metadata)!=null?e:{};this.metadata={...t,...i},(t==null?void 0:t["com.mux.video.branding"])==="mux-free-plan"&&(yt(this,Ws,"default"),this.updateLogo())}),ot(this,In),yt(this,Tn,wh())}static get NAME(){return sf}static get VERSION(){return tf}static get observedAttributes(){var s;return[...IT,...(s=Hs.observedAttributes)!=null?s:[]]}static getLogoHTML(s){return!s||s==="false"?"":s==="default"?RT:`<img part="logo" src="${s}" />`}static getTemplateHTML(s={}){var e;return`
|
|
111
111
|
${Hs.getTemplateHTML(s)}
|
|
112
112
|
<style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mux/mux-video",
|
|
3
|
-
"version": "0.30.6
|
|
3
|
+
"version": "0.30.6",
|
|
4
4
|
"description": "A custom mux video element for the browser that Just Works™",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"video",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"@mux/mux-data-google-ima": "^0.3.4",
|
|
128
|
-
"@mux/playback-core": "0.
|
|
128
|
+
"@mux/playback-core": "0.34.0",
|
|
129
129
|
"castable-video": "~1.1.12",
|
|
130
130
|
"custom-media-element": "~1.4.6",
|
|
131
131
|
"media-tracks": "~0.3.5"
|