@broadcastingplatforms/player 1.4.10 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bp-player.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * BP Player (v1.4.10)
2
+ * BP Player (v1.5.0)
3
3
  * Universal video player web component
4
4
  */
5
5
  "use strict";var BPPlayer=(()=>{var kv=Object.create;var Cr=Object.defineProperty;var Gu=Object.getOwnPropertyDescriptor;var Lv=Object.getOwnPropertyNames;var zu=Object.getPrototypeOf,wv=Object.prototype.hasOwnProperty;var Iv=Reflect.get;var Yu=i=>{throw TypeError(i)};var Cv=(i,e,t)=>e in i?Cr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Qu=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Rv=(i,e)=>{for(var t in e)Cr(i,t,{get:e[t],enumerable:!0})},Zu=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Lv(e))!wv.call(i,n)&&n!==t&&Cr(i,n,{get:()=>e[n],enumerable:!(r=Gu(e,n))||r.enumerable});return i};var Mv=(i,e,t)=>(t=i!=null?kv(zu(i)):{},Zu(e||!i||!i.__esModule?Cr(t,"default",{value:i,enumerable:!0}):t,i)),xv=i=>Zu(Cr({},"__esModule",{value:!0}),i),V=(i,e,t,r)=>{for(var n=r>1?void 0:r?Gu(e,t):e,o=i.length-1,s;o>=0;o--)(s=i[o])&&(n=(r?s(e,t,n):s(n))||n);return r&&n&&Cr(e,t,n),n};var q=(i,e,t)=>Cv(i,typeof e!="symbol"?e+"":e,t),rd=(i,e,t)=>e.has(i)||Yu("Cannot "+t);var c=(i,e,t)=>(rd(i,e,"read from private field"),t?t.call(i):e.get(i)),k=(i,e,t)=>e.has(i)?Yu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),v=(i,e,t,r)=>(rd(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),C=(i,e,t)=>(rd(i,e,"access private method"),t);var nd=(i,e,t)=>Iv(zu(i),t,e);var xb={};Rv(xb,{Attribute:()=>vo,BPDefaultUI:()=>ae,BPErrorDisplay:()=>Kt,BPLiveError:()=>rt,BPLiveService:()=>xr,BPOverlay:()=>Ot,BPPlayer:()=>Re,Hls:()=>xe.default,HlsVideo:()=>Ri,HlsVideoElement:()=>Tu,LiveKitVideo:()=>Lr,LiveKitVideoElement:()=>Lu,NANOPLAYER_NO_REPLAY_CODES:()=>vh,NanoVideo:()=>Di,NanoVideoElement:()=>Su,StateReceiverMixin:()=>gh,StateReceiverProps:()=>Bi,addGlobalStyles:()=>Pr,classifyLiveKitError:()=>$s,classifyNanoPlayerError:()=>Hs,createInitialState:()=>ao,createPlayerCore:()=>Bs,createTemplate:()=>Th,forEachStateReceiverElement:()=>Wi,isBPLiveClipSource:()=>co,isBPLiveSource:()=>Vs,isBPLiveStreamSource:()=>lo,isStateReceiverElement:()=>Ws,propagateStateToReceiver:()=>po,removeStateFromReceiver:()=>mo,templateWithStyles:()=>Ah,toggleAttribute:()=>ge});var Ps=globalThis,Ds=Ps.ShadowRoot&&(Ps.ShadyCSS===void 0||Ps.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,od=Symbol(),Xu=new WeakMap,Xn=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==od)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ds&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Xu.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Xu.set(t,e))}return e}toString(){return this.cssText}},ju=i=>new Xn(typeof i=="string"?i:i+"",void 0,od),jn=(i,...e)=>{let t=i.length===1?i[0]:e.reduce((r,n,o)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[o+1],i[0]);return new Xn(t,i,od)},Ju=(i,e)=>{if(Ds)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),n=Ps.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},sd=Ds?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ju(t)})(i):i;var{is:Pv,defineProperty:Dv,getOwnPropertyDescriptor:Ov,getOwnPropertyNames:Nv,getOwnPropertySymbols:Uv,getPrototypeOf:Hv}=Object,Jt=globalThis,eh=Jt.trustedTypes,$v=eh?eh.emptyScript:"",ad=Jt.reactiveElementPolyfillSupport,Jn=(i,e)=>i,eo={toAttribute(i,e){switch(e){case Boolean:i=i?$v:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Os=(i,e)=>!Pv(i,e),th={attribute:!0,type:String,converter:eo,reflect:!1,useDefault:!1,hasChanged:Os};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Jt.litPropertyMetadata??(Jt.litPropertyMetadata=new WeakMap);var Ht=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=th){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Dv(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){let{get:n,set:o}=Ov(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n==null?void 0:n.call(this);o==null||o.call(this,s),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??th}static _$Ei(){if(this.hasOwnProperty(Jn("elementProperties")))return;let e=Hv(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Jn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Jn("properties"))){let t=this.properties,r=[...Nv(t),...Uv(t)];for(let n of r)this.createProperty(n,t[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)t.unshift(sd(n))}else e!==void 0&&t.push(sd(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ju(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostConnected)==null?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostDisconnected)==null?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){var o;let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let s=(((o=r.converter)==null?void 0:o.toAttribute)!==void 0?r.converter:eo).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){var o,s;let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let l=r.getPropertyOptions(n),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((o=l.converter)==null?void 0:o.fromAttribute)!==void 0?l.converter:eo;this._$Em=n;let h=d.fromAttribute(t,l.type);this[n]=h??((s=this._$Ej)==null?void 0:s.get(n))??h,this._$Em=null}}requestUpdate(e,t,r,n=!1,o){var s;if(e!==void 0){let l=this.constructor;if(n===!1&&(o=this[e]),r??(r=l.getPropertyOptions(e)),!((r.hasChanged??Os)(o,t)||r.useDefault&&r.reflect&&o===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(l._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:o},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),n===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){let{wrapped:l}=s,d=this[o];l!==!0||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(r=this._$EO)==null||r.forEach(n=>{var o;return(o=n.hostUpdate)==null?void 0:o.call(n)}),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostUpdated)==null?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ht.elementStyles=[],Ht.shadowRootOptions={mode:"open"},Ht[Jn("elementProperties")]=new Map,Ht[Jn("finalized")]=new Map,ad==null||ad({ReactiveElement:Ht}),(Jt.reactiveElementVersions??(Jt.reactiveElementVersions=[])).push("2.1.2");var io=globalThis,ih=i=>i,Ns=io.trustedTypes,rh=Ns?Ns.createPolicy("lit-html",{createHTML:i=>i}):void 0,dh="$lit$",ei=`lit$${Math.random().toFixed(9).slice(2)}$`,ch="?"+ei,Vv=`<${ch}>`,Hi=document,ro=()=>Hi.createComment(""),no=i=>i===null||typeof i!="object"&&typeof i!="function",vd=Array.isArray,Bv=i=>vd(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",ld=`[
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * BP Player (v1.4.10)
2
+ * BP Player (v1.5.0)
3
3
  * Universal video player web component
4
4
  */
5
5
  var Fu=Object.defineProperty;var gv=Object.getOwnPropertyDescriptor;var bv=Object.getPrototypeOf;var _v=Reflect.get;var qu=i=>{throw TypeError(i)};var yv=(i,e,t)=>e in i?Fu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var V=(i,e,t,r)=>{for(var n=r>1?void 0:r?gv(e,t):e,o=i.length-1,s;o>=0;o--)(s=i[o])&&(n=(r?s(e,t,n):s(n))||n);return r&&n&&Fu(e,t,n),n};var F=(i,e,t)=>yv(i,typeof e!="symbol"?e+"":e,t),jl=(i,e,t)=>e.has(i)||qu("Cannot "+t);var c=(i,e,t)=>(jl(i,e,"read from private field"),t?t.call(i):e.get(i)),k=(i,e,t)=>e.has(i)?qu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),v=(i,e,t,r)=>(jl(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),C=(i,e,t)=>(jl(i,e,"access private method"),t);var Jl=(i,e,t)=>_v(bv(i),t,e);var Ls=globalThis,ws=Ls.ShadowRoot&&(Ls.ShadyCSS===void 0||Ls.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ed=Symbol(),Ku=new WeakMap,Yn=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==ed)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ws&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Ku.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ku.set(t,e))}return e}toString(){return this.cssText}},Gu=i=>new Yn(typeof i=="string"?i:i+"",void 0,ed),Qn=(i,...e)=>{let t=i.length===1?i[0]:e.reduce((r,n,o)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[o+1],i[0]);return new Yn(t,i,ed)},zu=(i,e)=>{if(ws)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),n=Ls.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},td=ws?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return Gu(t)})(i):i;var{is:Tv,defineProperty:Av,getOwnPropertyDescriptor:Sv,getOwnPropertyNames:kv,getOwnPropertySymbols:Lv,getPrototypeOf:wv}=Object,jt=globalThis,Yu=jt.trustedTypes,Iv=Yu?Yu.emptyScript:"",id=jt.reactiveElementPolyfillSupport,Zn=(i,e)=>i,Xn={toAttribute(i,e){switch(e){case Boolean:i=i?Iv:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Is=(i,e)=>!Tv(i,e),Qu={attribute:!0,type:String,converter:Xn,reflect:!1,useDefault:!1,hasChanged:Is};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),jt.litPropertyMetadata??(jt.litPropertyMetadata=new WeakMap);var Ut=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qu){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Av(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){let{get:n,set:o}=Sv(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n==null?void 0:n.call(this);o==null||o.call(this,s),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qu}static _$Ei(){if(this.hasOwnProperty(Zn("elementProperties")))return;let e=wv(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Zn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Zn("properties"))){let t=this.properties,r=[...kv(t),...Lv(t)];for(let n of r)this.createProperty(n,t[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)t.unshift(td(n))}else e!==void 0&&t.push(td(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return zu(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostConnected)==null?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostDisconnected)==null?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){var o;let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let s=(((o=r.converter)==null?void 0:o.toAttribute)!==void 0?r.converter:Xn).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){var o,s;let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let l=r.getPropertyOptions(n),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((o=l.converter)==null?void 0:o.fromAttribute)!==void 0?l.converter:Xn;this._$Em=n;let h=d.fromAttribute(t,l.type);this[n]=h??((s=this._$Ej)==null?void 0:s.get(n))??h,this._$Em=null}}requestUpdate(e,t,r,n=!1,o){var s;if(e!==void 0){let l=this.constructor;if(n===!1&&(o=this[e]),r??(r=l.getPropertyOptions(e)),!((r.hasChanged??Is)(o,t)||r.useDefault&&r.reflect&&o===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(l._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:o},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),n===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){let{wrapped:l}=s,d=this[o];l!==!0||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(r=this._$EO)==null||r.forEach(n=>{var o;return(o=n.hostUpdate)==null?void 0:o.call(n)}),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostUpdated)==null?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ut.elementStyles=[],Ut.shadowRootOptions={mode:"open"},Ut[Zn("elementProperties")]=new Map,Ut[Zn("finalized")]=new Map,id==null||id({ReactiveElement:Ut}),(jt.reactiveElementVersions??(jt.reactiveElementVersions=[])).push("2.1.2");var Jn=globalThis,Zu=i=>i,Cs=Jn.trustedTypes,Xu=Cs?Cs.createPolicy("lit-html",{createHTML:i=>i}):void 0,rh="$lit$",Jt=`lit$${Math.random().toFixed(9).slice(2)}$`,nh="?"+Jt,Cv=`<${nh}>`,Ni=document,eo=()=>Ni.createComment(""),to=i=>i===null||typeof i!="object"&&typeof i!="function",cd=Array.isArray,Rv=i=>cd(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",rd=`[
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * BP Player (v1.4.10)
2
+ * BP Player (v1.5.0)
3
3
  * Universal video player web component
4
4
  */
5
5
  var Wb=Object.defineProperty;var Px=Object.getOwnPropertyDescriptor;var wx=Object.getPrototypeOf;var Dx=Reflect.get;var qb=n=>{throw TypeError(n)};var Mx=(n,e,t)=>e in n?Wb(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _e=(n,e,t,i)=>{for(var s=i>1?void 0:i?Px(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(s=(i?a(e,t,s):a(s))||s);return i&&s&&Wb(e,t,s),s};var we=(n,e,t)=>Mx(n,typeof e!="symbol"?e+"":e,t),dp=(n,e,t)=>e.has(n)||qb("Cannot "+t);var x=(n,e,t)=>(dp(n,e,"read from private field"),t?t.call(n):e.get(n)),ne=(n,e,t)=>e.has(n)?qb("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),B=(n,e,t,i)=>(dp(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t),oe=(n,e,t)=>(dp(n,e,"access private method"),t);var up=(n,e,t)=>Dx(wx(n),t,e);var Jd=globalThis,Zd=Jd.ShadowRoot&&(Jd.ShadyCSS===void 0||Jd.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,hp=Symbol(),jb=new WeakMap,Pl=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==hp)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Zd&&e===void 0){let i=t!==void 0&&t.length===1;i&&(e=jb.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&jb.set(t,e))}return e}toString(){return this.cssText}},Yb=n=>new Pl(typeof n=="string"?n:n+"",void 0,hp),wl=(n,...e)=>{let t=n.length===1?n[0]:e.reduce((i,s,r)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[r+1],n[0]);return new Pl(t,n,hp)},zb=(n,e)=>{if(Zd)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let i=document.createElement("style"),s=Jd.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)}},fp=Zd?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return Yb(t)})(n):n;var{is:Ox,defineProperty:Nx,getOwnPropertyDescriptor:Ux,getOwnPropertyNames:Fx,getOwnPropertySymbols:Bx,getPrototypeOf:$x}=Object,Rs=globalThis,Qb=Rs.trustedTypes,Vx=Qb?Qb.emptyScript:"",mp=Rs.reactiveElementPolyfillSupport,Dl=(n,e)=>n,Ml={toAttribute(n,e){switch(e){case Boolean:n=n?Vx:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},eu=(n,e)=>!Ox(n,e),Xb={attribute:!0,type:String,converter:Ml,reflect:!1,useDefault:!1,hasChanged:eu};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Rs.litPropertyMetadata??(Rs.litPropertyMetadata=new WeakMap);var ns=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Xb){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Nx(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:r}=Ux(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:s,set(a){let o=s==null?void 0:s.call(this);r==null||r.call(this,a),this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Xb}static _$Ei(){if(this.hasOwnProperty(Dl("elementProperties")))return;let e=$x(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Dl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Dl("properties"))){let t=this.properties,i=[...Fx(t),...Bx(t)];for(let s of i)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(let[t,i]of this.elementProperties){let s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let s of i)t.unshift(fp(s))}else e!==void 0&&t.push(fp(e));return t}static _$Eu(e,t){let i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return zb(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){var r;let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){let a=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Ml).toAttribute(t,i.type);this._$Em=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$Em=null}}_$AK(e,t){var r,a;let i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let o=i.getPropertyOptions(s),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)==null?void 0:r.fromAttribute)!==void 0?o.converter:Ml;this._$Em=s;let c=l.fromAttribute(t,o.type);this[s]=c??((a=this._$Ej)==null?void 0:a.get(s))??c,this._$Em=null}}requestUpdate(e,t,i,s=!1,r){var a;if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),i??(i=o.getPropertyOptions(e)),!((i.hasChanged??eu)(r,t)||i.useDefault&&i.reflect&&r===((a=this._$Ej)==null?void 0:a.get(e))&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},a){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,a??t??this[e]),r!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,a]of s){let{wrapped:o}=a,l=this[r];o!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,a,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var r;return(r=s.hostUpdate)==null?void 0:r.call(s)}),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};ns.elementStyles=[],ns.shadowRootOptions={mode:"open"},ns[Dl("elementProperties")]=new Map,ns[Dl("finalized")]=new Map,mp==null||mp({ReactiveElement:ns}),(Rs.reactiveElementVersions??(Rs.reactiveElementVersions=[])).push("2.1.2");var Nl=globalThis,Jb=n=>n,tu=Nl.trustedTypes,Zb=tu?tu.createPolicy("lit-html",{createHTML:n=>n}):void 0,rT="$lit$",xs=`lit$${Math.random().toFixed(9).slice(2)}$`,aT="?"+xs,Hx=`<${aT}>`,wr=document,Ul=()=>wr.createComment(""),Fl=n=>n===null||typeof n!="object"&&typeof n!="function",Sp=Array.isArray,Gx=n=>Sp(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",pp=`[
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broadcastingplatforms/player",
3
- "version": "1.4.10",
3
+ "version": "1.5.0",
4
4
  "description": "Universal video player web component built with Lit",
5
5
  "type": "module",
6
6
  "main": "dist/bp-player.js",