@mattebox/player-cast 0.2.0 → 0.3.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.
@@ -4,7 +4,7 @@ import { icon } from "./icons.js";
4
4
  import { BUTTON_STYLE, SLIDER_STYLE, describe, el, fill, format, iconSlots, show, style } from "./shared.js";
5
5
  import { slider } from "./slider.js";
6
6
  //#region src/cast-screen.ts
7
- const STYLE_CSS = ":host{color:var(--mbx-text);font:400 15px / 1.4 var(--mbx-font);text-align:center;background:#000000d9;justify-content:center;align-items:center;padding:16px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}:host([hidden]){display:none}[part~=box]{flex-direction:column;align-items:center;width:100%;max-width:420px;display:flex}[part~=box]>:not([hidden])~:not([hidden]){margin-top:12px}[part~=title]{font-size:18px;font-weight:600}[part~=row]{justify-content:center;align-items:center;width:100%;display:flex}[part~=row]>:not([hidden])~:not([hidden]){margin-left:12px}[part~=slider]{flex:1}[part~=time]{font-variant-numeric:tabular-nums;color:var(--mbx-muted);font-size:13px}[part~=stop]{height:36px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;background:0 0;border:1px solid;padding:0 16px;font-weight:600}[part~=stop]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=stop]:focus:not(:focus-visible){outline:none}[hidden]{display:none}";
7
+ const STYLE_CSS = ":host{color:var(--mbx-text);font:400 .9375em / 1.4 var(--mbx-font);text-align:center;background:#000000d9;justify-content:center;align-items:center;padding:1.0667em;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}:host([hidden]){display:none}[part~=box]{flex-direction:column;align-items:center;width:100%;max-width:28em;display:flex}[part~=box]>:not([hidden])~:not([hidden]){margin-top:.8em}[part~=title]{font-size:1.2em;font-weight:600}[part~=row]{justify-content:center;align-items:center;width:100%;display:flex}[part~=row]>:not([hidden])~:not([hidden]){margin-left:.8em}[part~=slider]{flex:1}[part~=time]{font-variant-numeric:tabular-nums;color:var(--mbx-muted);font-size:.8667em}[part~=stop]{height:2.4em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;background:0 0;border:1px solid;padding:0 1.0667em;font-weight:600}[part~=stop]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=stop]:focus:not(:focus-visible){outline:none}[hidden]{display:none}";
8
8
  const STATES = ["play", "pause"];
9
9
  const STEP = 5;
10
10
  const PAGE = 30;
@@ -1 +1 @@
1
- var matteboxPlayerCast=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=e==null?void 0:e.live;return t!==void 0&&t.edge!==null}let n=null,r=null,i=null,a=null,o=/* @__PURE__ */ new Set,s=null,c={loaded:!1,paused:!0,time:0,duration:NaN},l=c;function u(){return globalThis}function d(){for(let e of[...o])e()}function f(e){var t;if(n!==null)return n;let r=u();return((t=r.cast)==null?void 0:t.framework)===void 0?`chrome`in r?(n=new Promise(t=>{let n=r.__onGCastApiAvailable;if(r.__onGCastApiAvailable=e=>{var r,i;n==null||n(e),t(e?(r=(i=u().cast)==null?void 0:i.framework)==null?null:r:null)},e===`none`)return;let i=document.createElement(`script`);i.src=`https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1`,i.async=!0,i.addEventListener(`error`,()=>t(null)),document.head.append(i)}),n):(n=Promise.resolve(null),n):(n=Promise.resolve(r.cast.framework),n)}function p(e,t){let n=e.CastContext.getInstance(),o=t==null?`CC1AD845`:t;if(r===null){var s,c;let t=(s=(c=u().chrome)==null||(c=c.cast)==null?void 0:c.AutoJoinPolicy.ORIGIN_SCOPED)==null?`origin_scoped`:s;n.setOptions({receiverApplicationId:o,autoJoinPolicy:t}),r=o,n.addEventListener(e.CastContextEventType.CAST_STATE_CHANGED,d),n.addEventListener(e.CastContextEventType.SESSION_STATE_CHANGED,t=>{var r;m(e,n,(r=t.sessionState)==null?``:r)}),i=new e.RemotePlayer,a=new e.RemotePlayerController(i),a.addEventListener(e.RemotePlayerEventType.ANY_CHANGE,()=>{let e=i;(e==null?void 0:e.isConnected)===!0&&e.isMediaLoaded&&(l={loaded:!0,paused:e.isPaused,time:e.currentTime,duration:e.duration>0?e.duration:1/0}),d()})}else t!==null&&t!==r&&console.error(`mattebox-player: the Cast context already uses receiver ${r}`);return n}function m(e,t,n){let r=e.SessionState;if(n===r.SESSION_STARTED&&s!==null&&s.pending)l=c,s.begin(t);else if(n===r.SESSION_RESUMED){var i;let e=(i=t.getCurrentSession())==null||(i=i.getMediaSession())==null||(i=i.media)==null?void 0:i.contentId,n=[...g].find(t=>t.plays(e));n!==void 0&&s===null&&(s=n,n.adopt())}else if(n===r.SESSION_ENDED||n===r.SESSION_START_FAILED){let e=s;s=null,e==null||e.end(n===r.SESSION_ENDED)}d()}let h=/* @__PURE__ */ new WeakMap,g=/* @__PURE__ */ new Set;var _=class{constructor(e){this.player=e,this.target=null,this.ctx=null,this.fw=null,this.pending=!1,this.casting=!1,this.handoff=null}connect(e,t){g.add(this),f(t).then(t=>{t!==null&&(this.fw=t,this.ctx=p(t,e),d())})}disconnect(){g.delete(this)}state(){let e=this.ctx,t=this.fw;if(e===null||t===null)return`unavailable`;if(this.casting)return`casting`;let n=e.getCastState();return n===t.CastState.NO_DEVICES_AVAILABLE?`unavailable`:n===t.CastState.CONNECTING||this.pending?`connecting`:`idle`}device(){var e,t;return this.casting?(e=(t=this.ctx)==null||(t=t.getCurrentSession())==null?void 0:t.getCastDevice().friendlyName)==null?null:e:null}remote(){return l}start(e){let t=this.ctx;if(!(t===null||this.casting)){if(s!==null&&s!==this){t.endCurrentSession(!0);return}this.target=e,this.pending=!0,s=this,d(),t.requestSession().catch(()=>{s===this&&(s=null),this.pending=!1,d()})}}stop(){var e;this.casting&&((e=this.ctx)==null||e.endCurrentSession(!0))}playPause(){this.casting&&(a==null||a.playOrPause())}seek(e){this.casting&&i!==null&&(i.currentTime=e,a==null||a.seek())}watch(e){return o.add(e),()=>{o.delete(e)}}plays(e){var t;return e!==void 0&&((t=this.player.player)==null||(t=t.session)==null?void 0:t.source.url)===e}begin(e){var t,n,r,i;this.pending=!1;let a=(t=(n=this.player.player)==null?void 0:n.session)==null?null:t,o=this.player.video,s=o.currentTime,c=!o.paused;if(this.freeze(),a===null)return;let l=this.request(a.source,s,c);if(l===null)return;let u=new CustomEvent(`castload`,{detail:l,bubbles:!0,composed:!0,cancelable:!0});((r=this.target)==null?void 0:r.dispatchEvent(u))!==!1&&((i=e.getCurrentSession())==null||i.loadMedia(l).catch(()=>{}))}adopt(){this.freeze()}freeze(){let e=this.player.engine;this.handoff={live:t(e)},this.player.video.pause(),e==null||e.suspend(),this.casting=!0,this.player.toggleAttribute(`casting`,!0),d()}end(e){if(this.pending=!1,!this.casting)return;this.casting=!1;let t=this.handoff;this.handoff=null;let n=this.player.video,r=this.player.engine;r==null||r.resume(),this.player.removeAttribute(`casting`),e&&l.loaded&&((t==null?void 0:t.live)!==!0&&Number.isFinite(l.time)&&(n.currentTime=l.time),l.paused||n.play().catch(()=>void 0))}request(e,n,r){var i,a;let o=(i=u().chrome)==null||(i=i.cast)==null?void 0:i.media;if(o===void 0)return null;let s=this.player.engine,c=(a=e.type)==null?``:a,l=new o.MediaInfo(e.url,c);if(l.streamType=t(s)?o.StreamType.LIVE:o.StreamType.BUFFERED,/mpegurl/i.test(c)){let e=v(s);l.hlsSegmentFormat=e?`ts`:`fmp4`,l.hlsVideoSegmentFormat=e?`mpeg2_ts`:`fmp4`}let d=[];for(let e of this.player.video.querySelectorAll(`track[src]`)){let t=e;if(t.kind!==`subtitles`&&t.kind!==`captions`)continue;let n=new o.Track(d.length+1,o.TrackType.TEXT);n.trackContentId=t.src,n.trackContentType=`text/vtt`,n.subtype=t.kind===`captions`?o.TextTrackType.CAPTIONS:o.TextTrackType.SUBTITLES,n.name=t.label,n.language=t.srclang,d.push(n)}l.tracks=d.length>0?d:null;let f=new o.LoadRequest(l);return f.currentTime=n,f.autoplay=r,f}};function v(e){let t=e==null?void 0:e.stats.snapshot().presentation;if(t==null)return!1;for(let e of t.periods)for(let t of e.tracks)for(let e of t.renditions)if(/mp2t/i.test(e.mimeType))return!0;return!1}function y(e){let t=h.get(e);return t===void 0&&(t=new _(e),h.set(e,t)),t}function b(e){let t=e.parentNode;return t===null?e instanceof ShadowRoot?e.host:null:t}function x(e){let t=e;for(;t!==null;){if(t instanceof HTMLElement&&t.localName===`mattebox-player`)return t;t=b(t)}return null}var S=class extends HTMLElement{constructor(){super(),this.player=null,this.offs=[],this.epoch=0}connectedCallback(){let e=x(this);if(e===null)return;this.epoch+=1;let t=this.epoch,n=()=>{t===this.epoch&&this.isConnected&&(customElements.upgrade(e),`video`in e&&(this.player=e,this.attach(this.player)))};`video`in e?n():customElements.whenDefined(`mattebox-player`).then(n)}disconnectedCallback(){this.epoch+=1;for(let e of this.offs)e();this.offs=[];let e=this.player;e!==null&&(this.player=null,this.detach(e))}attributeChangedCallback(){this.player!==null&&this.render()}listen(e,t,n){for(let r of t)e.addEventListener(r,n);this.offs.push(()=>{for(let r of t)e.removeEventListener(r,n)})}keep(e){this.offs.push(e)}follow(e,t){let n,r=()=>{n==null||n(),n=t(e.engine)};this.listen(e,[`sourcechange`],r),this.offs.push(()=>{n==null||n(),n=void 0}),r()}observe(e,t,n,r=!1){let i=new MutationObserver(n);i.observe(e,{attributes:!0,attributeFilter:[...t],subtree:r}),this.offs.push(()=>{i.disconnect()})}detach(e){}render(){}};let C={play:`M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z`,pause:`M8.66667 6.66667C8.29848 6.66667 8 6.96514 8 7.33333V24.6667C8 25.0349 8.29848 25.3333 8.66667 25.3333H12.6667C13.0349 25.3333 13.3333 25.0349 13.3333 24.6667V7.33333C13.3333 6.96514 13.0349 6.66667 12.6667 6.66667H8.66667Z M19.3333 6.66667C18.9651 6.66667 18.6667 6.96514 18.6667 7.33333V24.6667C18.6667 25.0349 18.9651 25.3333 19.3333 25.3333H23.3333C23.7015 25.3333 24 25.0349 24 24.6667V7.33333C24 6.96514 23.7015 6.66667 23.3333 6.66667H19.3333Z`,cast:`M4 6h24v18H20v-2h6V8H6v1H4V6zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z`,"cast-active":`M4 6h24v18H20A16 16 0 0 0 4 8zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z`},w=`http://www.w3.org/2000/svg`;function T(e){let t=document.createElementNS(w,`svg`);t.setAttribute(`viewBox`,`0 0 32 32`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`part`,`icon`);let n=document.createElementNS(w,`path`);return n.setAttribute(`fill-rule`,`evenodd`),n.setAttribute(`d`,C[e]),t.append(n),t}function E(e){let t=document.createElement(`style`);return t.textContent=e,t}function D(e,t){let n={};for(let r of e){let e=document.createElement(`slot`);e.name=`icon-${r}`,e.append(t(r)),e.hidden=!0,n[r]=e}return n}function O(e,t){for(let n of Object.keys(e))e[n].hidden=n!==t}function k(e,t,n){let r=document.createElement(e);return r.setAttribute(`part`,t),n!==void 0&&(r.textContent=n),r}function A(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r===void 0?e:String(r)})}function j(e){return e<10?`0${e}`:`${e}`}function M(e){let t=Number.isFinite(e)&&e>0?Math.floor(e):0,n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}:${j(r)}:${j(i)}`:`${r}:${j(i)}`}function N(e,t){return Number.isFinite(t)?`${M(e)} of ${M(t)}`:M(e)}let P=[`default`,`active`];var F=class extends S{static get observedAttributes(){return[`label-start`,`label-stop`]}constructor(){super(),this.api=null;let e=this.attachShadow({mode:`open`});this.button=document.createElement(`button`),this.button.type=`button`,this.button.setAttribute(`part`,`button`),this.slots=D(P,e=>T(e===`active`?`cast-active`:`cast`));for(let e of P)this.button.append(this.slots[e]);this.button.addEventListener(`click`,()=>{let e=this.api;e!==null&&(e.state()===`casting`?e.stop():e.start(this))}),e.append(E(`:host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:40px;height:40px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}`),this.button)}attach(e){let t=y(e);this.api=t,t.connect(this.getAttribute(`receiver`),this.getAttribute(`sdk`)),this.keep(t.watch(()=>{this.render()})),this.follow(e,()=>{this.render()})}detach(){var e;(e=this.api)==null||e.disconnect(),this.api=null}render(){var e,t,n;let r=this.player,i=this.api;if(r===null||i===null)return;let a=i.state(),o=a===`casting`;this.hidden=a===`unavailable`,this.button.disabled=!o&&((e=r.player)==null?void 0:e.session)==null,this.button.toggleAttribute(`aria-busy`,a===`connecting`),O(this.slots,o?`active`:`default`),this.button.setAttribute(`aria-label`,o?(t=this.getAttribute(`label-stop`))==null?`Stop casting`:t:(n=this.getAttribute(`label-start`))==null?`Cast`:n)}};function I(e,t,n){return Math.min(n,Math.max(t,e))}function L(e){let{onInput:t}=e,n=k(`div`,`slider`);n.setAttribute(`role`,`slider`),n.tabIndex=0;let r=k(`div`,`rail`),i=k(`div`,`track`),a=k(`div`,`fill`),o=k(`div`,`thumb`);i.append(a),r.append(i,o),n.append(r);let s=0,c=1,l=0,u=!1;function d(){let e=`${(c>s?(l-s)/(c-s):0)*100}%`;a.style.width=e,o.style.left=e}function f(e){let t=r.getBoundingClientRect();return t.width===0?s:s+I((e-t.left)/t.width,0,1)*(c-s)}function p(t){u=t,e.onDrag(t)}function m(e){if(e.button===0){e.preventDefault(),p(!0);try{n.setPointerCapture(e.pointerId)}catch(e){}t(f(e.clientX))}}function h(e){if(u){if(e.buttons===0){g(e);return}t(f(e.clientX))}}function g(e){u&&(p(!1),t(f(e.clientX)))}function _(){u&&p(!1)}function v(n){let r;switch(n.key){case`ArrowRight`:case`ArrowUp`:r=l+e.step();break;case`ArrowLeft`:case`ArrowDown`:r=l-e.step();break;case`PageUp`:r=l+e.page();break;case`PageDown`:r=l-e.page();break;case`Home`:r=s;break;case`End`:r=c;break;default:return}n.preventDefault(),t(I(r,s,c))}return n.addEventListener(`pointerdown`,m),n.addEventListener(`pointermove`,h),n.addEventListener(`pointerup`,g),n.addEventListener(`pointercancel`,_),n.addEventListener(`lostpointercapture`,_),n.addEventListener(`keydown`,v),{root:n,track:i,rail:r,label(e){n.setAttribute(`aria-label`,e)},dragging(){return u},range(e,t){s=e,c=t,n.setAttribute(`aria-valuemin`,String(e)),n.setAttribute(`aria-valuemax`,String(t)),d()},set(e,t){l=I(e,s,c),n.setAttribute(`aria-valuenow`,String(l)),n.setAttribute(`aria-valuetext`,t),d()},dispose(){n.removeEventListener(`pointerdown`,m),n.removeEventListener(`pointermove`,h),n.removeEventListener(`pointerup`,g),n.removeEventListener(`pointercancel`,_),n.removeEventListener(`lostpointercapture`,_),n.removeEventListener(`keydown`,v)}}}let R=[`play`,`pause`];var z=class extends S{static get observedAttributes(){return[`label`,`label-stop`,`label-play`,`label-pause`,`label-seek`]}constructor(){super(),this.api=null,this.held=null;let e=this.attachShadow({mode:`open`}),t=k(`div`,`box`);this.title_=k(`div`,`title`),this.play=document.createElement(`button`),this.play.type=`button`,this.play.setAttribute(`part`,`button play`),this.slots=D(R,T);for(let e of R)this.play.append(this.slots[e]);this.play.addEventListener(`click`,()=>{var e;(e=this.api)==null||e.playPause()}),this.seek=L({step:()=>5,page:()=>30,onInput:e=>{var t;if(this.seek.dragging()){this.held=e,this.paint();return}this.held=null,(t=this.api)==null||t.seek(e)},onDrag:e=>{this.toggleAttribute(`dragging`,e),e||(this.held=null)}}),this.time=k(`span`,`time`),this.row=k(`div`,`row`),this.row.append(this.play,this.seek.root,this.time),this.stop=k(`button`,`stop`),this.stop.type=`button`,this.stop.addEventListener(`click`,()=>{var e;(e=this.api)==null||e.stop()}),t.append(this.title_,this.row,this.stop),e.append(E(`:host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:40px;height:40px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}:host{display:block}:host([hidden]){display:none}[part~=slider]{border-radius:var(--mbx-radius);cursor:pointer;touch-action:none;height:40px;position:relative}[part~=slider]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=slider]:focus:not(:focus-visible){outline:none}[part~=rail]{position:absolute;top:0;bottom:0;left:8px;right:8px}[part~=track]{background:#ffffff59;border-radius:2px;height:4px;position:absolute;top:50%;left:0;right:0;overflow:hidden;transform:translateY(-50%)}[part~=fill]{background:var(--mbx-accent);position:absolute;top:0;bottom:0;left:0}[part~=thumb]{background:var(--mbx-text);pointer-events:none;border-radius:50%;width:12px;height:12px;margin:-6px 0 0 -6px;position:absolute;top:50%}:host{color:var(--mbx-text);font:400 15px / 1.4 var(--mbx-font);text-align:center;background:#000000d9;justify-content:center;align-items:center;padding:16px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}:host([hidden]){display:none}[part~=box]{flex-direction:column;align-items:center;width:100%;max-width:420px;display:flex}[part~=box]>:not([hidden])~:not([hidden]){margin-top:12px}[part~=title]{font-size:18px;font-weight:600}[part~=row]{justify-content:center;align-items:center;width:100%;display:flex}[part~=row]>:not([hidden])~:not([hidden]){margin-left:12px}[part~=slider]{flex:1}[part~=time]{font-variant-numeric:tabular-nums;color:var(--mbx-muted);font-size:13px}[part~=stop]{height:36px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;background:0 0;border:1px solid;padding:0 16px;font-weight:600}[part~=stop]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=stop]:focus:not(:focus-visible){outline:none}[hidden]{display:none}`),t)}connectedCallback(){this.player===null&&(this.hidden=!0),super.connectedCallback()}attach(e){let t=y(e);this.api=t,this.keep(t.watch(()=>{this.render()})),this.render()}detach(){this.api=null,this.hidden=!0}paint(){var e;let t=this.api;if(t===null)return;let n=t.remote(),r=n.loaded&&Number.isFinite(n.duration);if(this.seek.root.hidden=!r,this.time.hidden=!r,!r)return;let i=(e=this.held)==null?n.time:e;this.seek.range(0,n.duration),this.seek.set(i,N(i,n.duration)),this.time.textContent=`${M(i)} / ${M(n.duration)}`}render(){var e,t,n,r,i;let a=this.api;if(a===null)return;let o=a.remote(),s=o.loaded&&!o.paused?`pause`:`play`;O(this.slots,s),this.play.setAttribute(`aria-label`,(e=this.getAttribute(`label-${s}`))==null?s===`play`?`Play`:`Pause`:e),this.seek.label((t=this.getAttribute(`label-seek`))==null?`Seek`:t),this.stop.textContent=(n=this.getAttribute(`label-stop`))==null?`Stop casting`:n;let c=a.state()===`casting`;this.hidden=!c,c&&(this.title_.textContent=A((r=this.getAttribute(`label`))==null?`Casting to {device}`:r,{device:(i=a.device())==null?``:i}),this.play.disabled=!o.loaded,this.paint())}};let B=`mbx-cast-button`,V=`mbx-cast-screen`;return customElements.get(`mbx-cast-button`)===void 0&&customElements.define(B,F),customElements.get(`mbx-cast-screen`)===void 0&&customElements.define(V,z),e.CAST_BUTTON=B,e.CAST_SCREEN=V,e.MbxCastButton=F,e.MbxCastScreen=z,e})({});
1
+ var matteboxPlayerCast=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=e==null?void 0:e.live;return t!==void 0&&t.edge!==null}let n=null,r=null,i=null,a=null,o=/* @__PURE__ */ new Set,s=null,c={loaded:!1,paused:!0,time:0,duration:NaN},l=c;function u(){return globalThis}function d(){for(let e of[...o])e()}function f(e){var t;if(n!==null)return n;let r=u();return((t=r.cast)==null?void 0:t.framework)===void 0?`chrome`in r?(n=new Promise(t=>{let n=r.__onGCastApiAvailable;if(r.__onGCastApiAvailable=e=>{var r,i;n==null||n(e),t(e?(r=(i=u().cast)==null?void 0:i.framework)==null?null:r:null)},e===`none`)return;let i=document.createElement(`script`);i.src=`https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1`,i.async=!0,i.addEventListener(`error`,()=>t(null)),document.head.append(i)}),n):(n=Promise.resolve(null),n):(n=Promise.resolve(r.cast.framework),n)}function p(e,t){let n=e.CastContext.getInstance(),o=t==null?`CC1AD845`:t;if(r===null){var s,c;let t=(s=(c=u().chrome)==null||(c=c.cast)==null?void 0:c.AutoJoinPolicy.ORIGIN_SCOPED)==null?`origin_scoped`:s;n.setOptions({receiverApplicationId:o,autoJoinPolicy:t}),r=o,n.addEventListener(e.CastContextEventType.CAST_STATE_CHANGED,d),n.addEventListener(e.CastContextEventType.SESSION_STATE_CHANGED,t=>{var r;m(e,n,(r=t.sessionState)==null?``:r)}),i=new e.RemotePlayer,a=new e.RemotePlayerController(i),a.addEventListener(e.RemotePlayerEventType.ANY_CHANGE,()=>{let e=i;(e==null?void 0:e.isConnected)===!0&&e.isMediaLoaded&&(l={loaded:!0,paused:e.isPaused,time:e.currentTime,duration:e.duration>0?e.duration:1/0}),d()})}else t!==null&&t!==r&&console.error(`mattebox-player: the Cast context already uses receiver ${r}`);return n}function m(e,t,n){let r=e.SessionState;if(n===r.SESSION_STARTED&&s!==null&&s.pending)l=c,s.begin(t);else if(n===r.SESSION_RESUMED){var i;let e=(i=t.getCurrentSession())==null||(i=i.getMediaSession())==null||(i=i.media)==null?void 0:i.contentId,n=[...g].find(t=>t.plays(e));n!==void 0&&s===null&&(s=n,n.adopt())}else if(n===r.SESSION_ENDED||n===r.SESSION_START_FAILED){let e=s;s=null,e==null||e.end(n===r.SESSION_ENDED)}d()}let h=/* @__PURE__ */ new WeakMap,g=/* @__PURE__ */ new Set;var _=class{constructor(e){this.player=e,this.target=null,this.ctx=null,this.fw=null,this.pending=!1,this.casting=!1,this.handoff=null}connect(e,t){g.add(this),f(t).then(t=>{t!==null&&(this.fw=t,this.ctx=p(t,e),d())})}disconnect(){g.delete(this)}state(){let e=this.ctx,t=this.fw;if(e===null||t===null)return`unavailable`;if(this.casting)return`casting`;let n=e.getCastState();return n===t.CastState.NO_DEVICES_AVAILABLE?`unavailable`:n===t.CastState.CONNECTING||this.pending?`connecting`:`idle`}device(){var e,t;return this.casting?(e=(t=this.ctx)==null||(t=t.getCurrentSession())==null?void 0:t.getCastDevice().friendlyName)==null?null:e:null}remote(){return l}start(e){let t=this.ctx;if(!(t===null||this.casting)){if(s!==null&&s!==this){t.endCurrentSession(!0);return}this.target=e,this.pending=!0,s=this,d(),t.requestSession().catch(()=>{s===this&&(s=null),this.pending=!1,d()})}}stop(){var e;this.casting&&((e=this.ctx)==null||e.endCurrentSession(!0))}playPause(){this.casting&&(a==null||a.playOrPause())}seek(e){this.casting&&i!==null&&(i.currentTime=e,a==null||a.seek())}watch(e){return o.add(e),()=>{o.delete(e)}}plays(e){var t;return e!==void 0&&((t=this.player.player)==null||(t=t.session)==null?void 0:t.source.url)===e}begin(e){var t,n,r,i;this.pending=!1;let a=(t=(n=this.player.player)==null?void 0:n.session)==null?null:t,o=this.player.video,s=o.currentTime,c=!o.paused;if(this.freeze(),a===null)return;let l=this.request(a.source,s,c);if(l===null)return;let u=new CustomEvent(`castload`,{detail:l,bubbles:!0,composed:!0,cancelable:!0});((r=this.target)==null?void 0:r.dispatchEvent(u))!==!1&&((i=e.getCurrentSession())==null||i.loadMedia(l).catch(()=>{}))}adopt(){this.freeze()}freeze(){let e=this.player.engine;this.handoff={live:t(e)},this.player.video.pause(),e==null||e.suspend(),this.casting=!0,this.player.toggleAttribute(`casting`,!0),d()}end(e){if(this.pending=!1,!this.casting)return;this.casting=!1;let t=this.handoff;this.handoff=null;let n=this.player.video,r=this.player.engine;r==null||r.resume(),this.player.removeAttribute(`casting`),e&&l.loaded&&((t==null?void 0:t.live)!==!0&&Number.isFinite(l.time)&&(n.currentTime=l.time),l.paused||n.play().catch(()=>void 0))}request(e,n,r){var i,a;let o=(i=u().chrome)==null||(i=i.cast)==null?void 0:i.media;if(o===void 0)return null;let s=this.player.engine,c=(a=e.type)==null?``:a,l=new o.MediaInfo(e.url,c);if(l.streamType=t(s)?o.StreamType.LIVE:o.StreamType.BUFFERED,/mpegurl/i.test(c)){let e=v(s);l.hlsSegmentFormat=e?`ts`:`fmp4`,l.hlsVideoSegmentFormat=e?`mpeg2_ts`:`fmp4`}let d=[];for(let e of this.player.video.querySelectorAll(`track[src]`)){let t=e;if(t.kind!==`subtitles`&&t.kind!==`captions`)continue;let n=new o.Track(d.length+1,o.TrackType.TEXT);n.trackContentId=t.src,n.trackContentType=`text/vtt`,n.subtype=t.kind===`captions`?o.TextTrackType.CAPTIONS:o.TextTrackType.SUBTITLES,n.name=t.label,n.language=t.srclang,d.push(n)}l.tracks=d.length>0?d:null;let f=new o.LoadRequest(l);return f.currentTime=n,f.autoplay=r,f}};function v(e){let t=e==null?void 0:e.stats.snapshot().presentation;if(t==null)return!1;for(let e of t.periods)for(let t of e.tracks)for(let e of t.renditions)if(/mp2t/i.test(e.mimeType))return!0;return!1}function y(e){let t=h.get(e);return t===void 0&&(t=new _(e),h.set(e,t)),t}function b(e){let t=e.parentNode;return t===null?e instanceof ShadowRoot?e.host:null:t}function x(e){let t=e;for(;t!==null;){if(t instanceof HTMLElement&&t.localName===`mattebox-player`)return t;t=b(t)}return null}var S=class extends HTMLElement{constructor(){super(),this.player=null,this.offs=[],this.epoch=0}connectedCallback(){let e=x(this);if(e===null)return;this.epoch+=1;let t=this.epoch,n=()=>{t===this.epoch&&this.isConnected&&(customElements.upgrade(e),`video`in e&&(this.player=e,this.attach(this.player)))};`video`in e?n():customElements.whenDefined(`mattebox-player`).then(n)}disconnectedCallback(){this.epoch+=1;for(let e of this.offs)e();this.offs=[];let e=this.player;e!==null&&(this.player=null,this.detach(e))}attributeChangedCallback(){this.player!==null&&this.render()}listen(e,t,n){for(let r of t)e.addEventListener(r,n);this.offs.push(()=>{for(let r of t)e.removeEventListener(r,n)})}keep(e){this.offs.push(e)}follow(e,t){let n,r=()=>{n==null||n(),n=t(e.engine)};this.listen(e,[`sourcechange`],r),this.offs.push(()=>{n==null||n(),n=void 0}),r()}observe(e,t,n,r=!1){let i=new MutationObserver(n);i.observe(e,{attributes:!0,attributeFilter:[...t],subtree:r}),this.offs.push(()=>{i.disconnect()})}detach(e){}render(){}};let C={play:`M9 5L26 16L9 27z`,pause:`M8 6h5.5v20h-5.5zM18.5 6h5.5v20h-5.5z`,cast:`M4 6H28V26H20V23.5H25.5V8.5H6.5V11H4zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z`,"cast-active":`M4 6H28V26H20A16 16 0 0 0 4 10zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z`},w=`http://www.w3.org/2000/svg`;function T(e){let t=document.createElementNS(w,`svg`);t.setAttribute(`viewBox`,`0 0 32 32`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`part`,`icon`);let n=document.createElementNS(w,`path`);return n.setAttribute(`fill-rule`,`evenodd`),n.setAttribute(`d`,C[e]),t.append(n),t}function E(e){let t=document.createElement(`style`);return t.textContent=e,t}function D(e,t){let n={};for(let r of e){let e=document.createElement(`slot`);e.name=`icon-${r}`,e.append(t(r)),e.hidden=!0,n[r]=e}return n}function O(e,t){for(let n of Object.keys(e))e[n].hidden=n!==t}function k(e,t,n){let r=document.createElement(e);return r.setAttribute(`part`,t),n!==void 0&&(r.textContent=n),r}function A(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r===void 0?e:String(r)})}function j(e){return e<10?`0${e}`:`${e}`}function M(e){let t=Number.isFinite(e)&&e>0?Math.floor(e):0,n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}:${j(r)}:${j(i)}`:`${r}:${j(i)}`}function N(e,t){return Number.isFinite(t)?`${M(e)} of ${M(t)}`:M(e)}let P=[`default`,`active`];var F=class extends S{static get observedAttributes(){return[`label-start`,`label-stop`]}constructor(){super(),this.api=null;let e=this.attachShadow({mode:`open`});this.button=document.createElement(`button`),this.button.type=`button`,this.button.setAttribute(`part`,`button`),this.slots=D(P,e=>T(e===`active`?`cast-active`:`cast`));for(let e of P)this.button.append(this.slots[e]);this.button.addEventListener(`click`,()=>{let e=this.api;e!==null&&(e.state()===`casting`?e.stop():e.start(this))}),e.append(E(`:host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:2.5em;height:2.5em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}`),this.button)}attach(e){let t=y(e);this.api=t,t.connect(this.getAttribute(`receiver`),this.getAttribute(`sdk`)),this.keep(t.watch(()=>{this.render()})),this.follow(e,()=>{this.render()})}detach(){var e;(e=this.api)==null||e.disconnect(),this.api=null}render(){var e,t,n;let r=this.player,i=this.api;if(r===null||i===null)return;let a=i.state(),o=a===`casting`;this.hidden=a===`unavailable`,this.button.disabled=!o&&((e=r.player)==null?void 0:e.session)==null,this.button.toggleAttribute(`aria-busy`,a===`connecting`),O(this.slots,o?`active`:`default`),this.button.setAttribute(`aria-label`,o?(t=this.getAttribute(`label-stop`))==null?`Stop casting`:t:(n=this.getAttribute(`label-start`))==null?`Cast`:n)}};function I(e,t,n){return Math.min(n,Math.max(t,e))}function L(e){let{onInput:t}=e,n=k(`div`,`slider`);n.setAttribute(`role`,`slider`),n.tabIndex=0;let r=k(`div`,`rail`),i=k(`div`,`track`),a=k(`div`,`fill`),o=k(`div`,`thumb`);i.append(a),r.append(i,o),n.append(r);let s=0,c=1,l=0,u=!1;function d(){let e=`${(c>s?(l-s)/(c-s):0)*100}%`;a.style.width=e,o.style.left=e}function f(e){let t=r.getBoundingClientRect();return t.width===0?s:s+I((e-t.left)/t.width,0,1)*(c-s)}function p(t){u=t,e.onDrag(t)}function m(e){if(e.button===0){e.preventDefault(),p(!0);try{n.setPointerCapture(e.pointerId)}catch(e){}t(f(e.clientX))}}function h(e){if(u){if(e.buttons===0){g(e);return}t(f(e.clientX))}}function g(e){u&&(p(!1),t(f(e.clientX)))}function _(){u&&p(!1)}function v(n){let r;switch(n.key){case`ArrowRight`:case`ArrowUp`:r=l+e.step();break;case`ArrowLeft`:case`ArrowDown`:r=l-e.step();break;case`PageUp`:r=l+e.page();break;case`PageDown`:r=l-e.page();break;case`Home`:r=s;break;case`End`:r=c;break;default:return}n.preventDefault(),t(I(r,s,c))}return n.addEventListener(`pointerdown`,m),n.addEventListener(`pointermove`,h),n.addEventListener(`pointerup`,g),n.addEventListener(`pointercancel`,_),n.addEventListener(`lostpointercapture`,_),n.addEventListener(`keydown`,v),{root:n,track:i,rail:r,label(e){n.setAttribute(`aria-label`,e)},dragging(){return u},range(e,t){s=e,c=t,n.setAttribute(`aria-valuemin`,String(e)),n.setAttribute(`aria-valuemax`,String(t)),d()},set(e,t){l=I(e,s,c),n.setAttribute(`aria-valuenow`,String(l)),n.setAttribute(`aria-valuetext`,t),d()},dispose(){n.removeEventListener(`pointerdown`,m),n.removeEventListener(`pointermove`,h),n.removeEventListener(`pointerup`,g),n.removeEventListener(`pointercancel`,_),n.removeEventListener(`lostpointercapture`,_),n.removeEventListener(`keydown`,v)}}}let R=[`play`,`pause`];var z=class extends S{static get observedAttributes(){return[`label`,`label-stop`,`label-play`,`label-pause`,`label-seek`]}constructor(){super(),this.api=null,this.held=null;let e=this.attachShadow({mode:`open`}),t=k(`div`,`box`);this.title_=k(`div`,`title`),this.play=document.createElement(`button`),this.play.type=`button`,this.play.setAttribute(`part`,`button play`),this.slots=D(R,T);for(let e of R)this.play.append(this.slots[e]);this.play.addEventListener(`click`,()=>{var e;(e=this.api)==null||e.playPause()}),this.seek=L({step:()=>5,page:()=>30,onInput:e=>{var t;if(this.seek.dragging()){this.held=e,this.paint();return}this.held=null,(t=this.api)==null||t.seek(e)},onDrag:e=>{this.toggleAttribute(`dragging`,e),e||(this.held=null)}}),this.time=k(`span`,`time`),this.row=k(`div`,`row`),this.row.append(this.play,this.seek.root,this.time),this.stop=k(`button`,`stop`),this.stop.type=`button`,this.stop.addEventListener(`click`,()=>{var e;(e=this.api)==null||e.stop()}),t.append(this.title_,this.row,this.stop),e.append(E(`:host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:2.5em;height:2.5em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}:host{display:block}:host([hidden]){display:none}[part~=slider]{border-radius:var(--mbx-radius);cursor:pointer;touch-action:none;height:2.6667em;position:relative}[part~=slider]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=slider]:focus:not(:focus-visible){outline:none}[part~=rail]{position:absolute;top:0;bottom:0;left:.5333em;right:.5333em}[part~=track]{background:#ffffff59;border-radius:2px;height:.2667em;position:absolute;top:50%;left:0;right:0;overflow:hidden;transform:translateY(-50%)}[part~=fill]{background:var(--mbx-accent);position:absolute;top:0;bottom:0;left:0}[part~=thumb]{background:var(--mbx-text);pointer-events:none;border-radius:50%;width:.8em;height:.8em;margin:-.4em 0 0 -.4em;position:absolute;top:50%}:host{color:var(--mbx-text);font:400 .9375em / 1.4 var(--mbx-font);text-align:center;background:#000000d9;justify-content:center;align-items:center;padding:1.0667em;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}:host([hidden]){display:none}[part~=box]{flex-direction:column;align-items:center;width:100%;max-width:28em;display:flex}[part~=box]>:not([hidden])~:not([hidden]){margin-top:.8em}[part~=title]{font-size:1.2em;font-weight:600}[part~=row]{justify-content:center;align-items:center;width:100%;display:flex}[part~=row]>:not([hidden])~:not([hidden]){margin-left:.8em}[part~=slider]{flex:1}[part~=time]{font-variant-numeric:tabular-nums;color:var(--mbx-muted);font-size:.8667em}[part~=stop]{height:2.4em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;background:0 0;border:1px solid;padding:0 1.0667em;font-weight:600}[part~=stop]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=stop]:focus:not(:focus-visible){outline:none}[hidden]{display:none}`),t)}connectedCallback(){this.player===null&&(this.hidden=!0),super.connectedCallback()}attach(e){let t=y(e);this.api=t,this.keep(t.watch(()=>{this.render()})),this.render()}detach(){this.api=null,this.hidden=!0}paint(){var e;let t=this.api;if(t===null)return;let n=t.remote(),r=n.loaded&&Number.isFinite(n.duration);if(this.seek.root.hidden=!r,this.time.hidden=!r,!r)return;let i=(e=this.held)==null?n.time:e;this.seek.range(0,n.duration),this.seek.set(i,N(i,n.duration)),this.time.textContent=`${M(i)} / ${M(n.duration)}`}render(){var e,t,n,r,i;let a=this.api;if(a===null)return;let o=a.remote(),s=o.loaded&&!o.paused?`pause`:`play`;O(this.slots,s),this.play.setAttribute(`aria-label`,(e=this.getAttribute(`label-${s}`))==null?s===`play`?`Play`:`Pause`:e),this.seek.label((t=this.getAttribute(`label-seek`))==null?`Seek`:t),this.stop.textContent=(n=this.getAttribute(`label-stop`))==null?`Stop casting`:n;let c=a.state()===`casting`;this.hidden=!c,c&&(this.title_.textContent=A((r=this.getAttribute(`label`))==null?`Casting to {device}`:r,{device:(i=a.device())==null?``:i}),this.play.disabled=!o.loaded,this.paint())}};let B=`mbx-cast-button`,V=`mbx-cast-screen`;return customElements.get(`mbx-cast-button`)===void 0&&customElements.define(B,F),customElements.get(`mbx-cast-screen`)===void 0&&customElements.define(V,z),e.CAST_BUTTON=B,e.CAST_SCREEN=V,e.MbxCastButton=F,e.MbxCastScreen=z,e})({});
@@ -4,7 +4,7 @@ import { icon } from "./icons.js";
4
4
  import { BUTTON_STYLE, SLIDER_STYLE, describe, el, fill, format, iconSlots, show, style } from "./shared.js";
5
5
  import { slider } from "./slider.js";
6
6
  //#region src/cast-screen.ts
7
- const STYLE_CSS = ":host{color:var(--mbx-text);font:400 15px / 1.4 var(--mbx-font);text-align:center;background:#000000d9;justify-content:center;align-items:center;padding:16px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}:host([hidden]){display:none}[part~=box]{flex-direction:column;align-items:center;width:100%;max-width:420px;display:flex}[part~=box]>:not([hidden])~:not([hidden]){margin-top:12px}[part~=title]{font-size:18px;font-weight:600}[part~=row]{justify-content:center;align-items:center;width:100%;display:flex}[part~=row]>:not([hidden])~:not([hidden]){margin-left:12px}[part~=slider]{flex:1}[part~=time]{font-variant-numeric:tabular-nums;color:var(--mbx-muted);font-size:13px}[part~=stop]{height:36px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;background:0 0;border:1px solid;padding:0 16px;font-weight:600}[part~=stop]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=stop]:focus:not(:focus-visible){outline:none}[hidden]{display:none}";
7
+ const STYLE_CSS = ":host{color:var(--mbx-text);font:400 .9375em / 1.4 var(--mbx-font);text-align:center;background:#000000d9;justify-content:center;align-items:center;padding:1.0667em;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}:host([hidden]){display:none}[part~=box]{flex-direction:column;align-items:center;width:100%;max-width:28em;display:flex}[part~=box]>:not([hidden])~:not([hidden]){margin-top:.8em}[part~=title]{font-size:1.2em;font-weight:600}[part~=row]{justify-content:center;align-items:center;width:100%;display:flex}[part~=row]>:not([hidden])~:not([hidden]){margin-left:.8em}[part~=slider]{flex:1}[part~=time]{font-variant-numeric:tabular-nums;color:var(--mbx-muted);font-size:.8667em}[part~=stop]{height:2.4em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;background:0 0;border:1px solid;padding:0 1.0667em;font-weight:600}[part~=stop]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=stop]:focus:not(:focus-visible){outline:none}[hidden]{display:none}";
8
8
  const STATES = ["play", "pause"];
9
9
  const STEP = 5;
10
10
  const PAGE = 30;
@@ -1,10 +1,10 @@
1
1
  //#region src/icons.ts
2
2
  /** Each glyph's subpaths joined into one `d`, drawn even-odd like the player's. */
3
3
  const PATHS = {
4
- play: "M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",
5
- pause: "M8.66667 6.66667C8.29848 6.66667 8 6.96514 8 7.33333V24.6667C8 25.0349 8.29848 25.3333 8.66667 25.3333H12.6667C13.0349 25.3333 13.3333 25.0349 13.3333 24.6667V7.33333C13.3333 6.96514 13.0349 6.66667 12.6667 6.66667H8.66667Z M19.3333 6.66667C18.9651 6.66667 18.6667 6.96514 18.6667 7.33333V24.6667C18.6667 25.0349 18.9651 25.3333 19.3333 25.3333H23.3333C23.7015 25.3333 24 25.0349 24 24.6667V7.33333C24 6.96514 23.7015 6.66667 23.3333 6.66667H19.3333Z",
6
- cast: "M4 6h24v18H20v-2h6V8H6v1H4V6zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z",
7
- "cast-active": "M4 6h24v18H20A16 16 0 0 0 4 8zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z"
4
+ play: "M9 5L26 16L9 27z",
5
+ pause: "M8 6h5.5v20h-5.5zM18.5 6h5.5v20h-5.5z",
6
+ cast: "M4 6H28V26H20V23.5H25.5V8.5H6.5V11H4zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z",
7
+ "cast-active": "M4 6H28V26H20A16 16 0 0 0 4 10zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z"
8
8
  };
9
9
  const SVG = "http://www.w3.org/2000/svg";
10
10
  /** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */
@@ -7,8 +7,8 @@
7
7
  * package. The tokens come through the `--mbx-*` custom properties the
8
8
  * player sets, which inherit into every control.
9
9
  */
10
- const BUTTON_STYLE_CSS = ":host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:40px;height:40px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}";
11
- const SLIDER_STYLE_CSS = ":host{display:block}:host([hidden]){display:none}[part~=slider]{border-radius:var(--mbx-radius);cursor:pointer;touch-action:none;height:40px;position:relative}[part~=slider]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=slider]:focus:not(:focus-visible){outline:none}[part~=rail]{position:absolute;top:0;bottom:0;left:8px;right:8px}[part~=track]{background:#ffffff59;border-radius:2px;height:4px;position:absolute;top:50%;left:0;right:0;overflow:hidden;transform:translateY(-50%)}[part~=fill]{background:var(--mbx-accent);position:absolute;top:0;bottom:0;left:0}[part~=thumb]{background:var(--mbx-text);pointer-events:none;border-radius:50%;width:12px;height:12px;margin:-6px 0 0 -6px;position:absolute;top:50%}";
10
+ const BUTTON_STYLE_CSS = ":host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:2.5em;height:2.5em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}";
11
+ const SLIDER_STYLE_CSS = ":host{display:block}:host([hidden]){display:none}[part~=slider]{border-radius:var(--mbx-radius);cursor:pointer;touch-action:none;height:2.6667em;position:relative}[part~=slider]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=slider]:focus:not(:focus-visible){outline:none}[part~=rail]{position:absolute;top:0;bottom:0;left:.5333em;right:.5333em}[part~=track]{background:#ffffff59;border-radius:2px;height:.2667em;position:absolute;top:50%;left:0;right:0;overflow:hidden;transform:translateY(-50%)}[part~=fill]{background:var(--mbx-accent);position:absolute;top:0;bottom:0;left:0}[part~=thumb]{background:var(--mbx-text);pointer-events:none;border-radius:50%;width:.8em;height:.8em;margin:-.4em 0 0 -.4em;position:absolute;top:50%}";
12
12
  const BUTTON_STYLE = BUTTON_STYLE_CSS;
13
13
  /** The style of a slider: the rail, the track with its fill, and the thumb. */
14
14
  /** The style of a slider: the rail, the track with its fill, and the thumb. */
package/dist/icons.d.ts CHANGED
@@ -1,31 +1,7 @@
1
1
  /**
2
- * The play and pause glyphs, copied from Vidstack's media-icons 0.10.0
3
- * (https://github.com/vidstack/media-icons): filled paths on a 32-unit
4
- * viewBox, drawn for a control bar, one visual weight across the set.
5
- * Copied, not depended on. The notice below is the license's one condition,
6
- * and packages/player/NOTICE repeats it for the published tarball.
7
- *
8
- * MIT License
9
- *
10
- * Copyright (c) 2023 Rahim Alwer
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
2
+ * The play, pause and cast glyphs, Mattebox's own drawings and the same
3
+ * ones the player draws: filled paths on a 32-unit viewBox. The cast glyph
4
+ * is a screen with a corner open for three arcs, filled while casting.
29
5
  */
30
6
  export type IconName = 'play' | 'pause' | 'cast' | 'cast-active';
31
7
  /** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAgBjE,2FAA2F;AAC3F,wBAAgB,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,CAUlD"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAajE,2FAA2F;AAC3F,wBAAgB,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,CAUlD"}
package/dist/icons.js CHANGED
@@ -1,10 +1,10 @@
1
1
  //#region src/icons.ts
2
2
  /** Each glyph's subpaths joined into one `d`, drawn even-odd like the player's. */
3
3
  const PATHS = {
4
- play: "M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",
5
- pause: "M8.66667 6.66667C8.29848 6.66667 8 6.96514 8 7.33333V24.6667C8 25.0349 8.29848 25.3333 8.66667 25.3333H12.6667C13.0349 25.3333 13.3333 25.0349 13.3333 24.6667V7.33333C13.3333 6.96514 13.0349 6.66667 12.6667 6.66667H8.66667Z M19.3333 6.66667C18.9651 6.66667 18.6667 6.96514 18.6667 7.33333V24.6667C18.6667 25.0349 18.9651 25.3333 19.3333 25.3333H23.3333C23.7015 25.3333 24 25.0349 24 24.6667V7.33333C24 6.96514 23.7015 6.66667 23.3333 6.66667H19.3333Z",
6
- cast: "M4 6h24v18H20v-2h6V8H6v1H4V6zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z",
7
- "cast-active": "M4 6h24v18H20A16 16 0 0 0 4 8zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z"
4
+ play: "M9 5L26 16L9 27z",
5
+ pause: "M8 6h5.5v20h-5.5zM18.5 6h5.5v20h-5.5z",
6
+ cast: "M4 6H28V26H20V23.5H25.5V8.5H6.5V11H4zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z",
7
+ "cast-active": "M4 6H28V26H20A16 16 0 0 0 4 10zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z"
8
8
  };
9
9
  const SVG = "http://www.w3.org/2000/svg";
10
10
  /** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */
package/dist/icons.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","names":[],"sources":["../src/icons.ts"],"sourcesContent":["/**\n * The play and pause glyphs, copied from Vidstack's media-icons 0.10.0\n * (https://github.com/vidstack/media-icons): filled paths on a 32-unit\n * viewBox, drawn for a control bar, one visual weight across the set.\n * Copied, not depended on. The notice below is the license's one condition,\n * and packages/player/NOTICE repeats it for the published tarball.\n *\n * MIT License\n *\n * Copyright (c) 2023 Rahim Alwer\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport type IconName = 'play' | 'pause' | 'cast' | 'cast-active';\n\n/** Each glyph's subpaths joined into one `d`, drawn even-odd like the player's. */\nconst PATHS: Readonly<Record<IconName, string>> = {\n play: 'M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z',\n pause:\n 'M8.66667 6.66667C8.29848 6.66667 8 6.96514 8 7.33333V24.6667C8 25.0349 8.29848 25.3333 8.66667 25.3333H12.6667C13.0349 25.3333 13.3333 25.0349 13.3333 24.6667V7.33333C13.3333 6.96514 13.0349 6.66667 12.6667 6.66667H8.66667Z M19.3333 6.66667C18.9651 6.66667 18.6667 6.96514 18.6667 7.33333V24.6667C18.6667 25.0349 18.9651 25.3333 19.3333 25.3333H23.3333C23.7015 25.3333 24 25.0349 24 24.6667V7.33333C24 6.96514 23.7015 6.66667 23.3333 6.66667H19.3333Z',\n // The cast glyphs are this package's own drawing, not media-icons: a\n // screen with the corner open for three arcs, filled while casting.\n cast: 'M4 6h24v18H20v-2h6V8H6v1H4V6zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z',\n 'cast-active':\n 'M4 6h24v18H20A16 16 0 0 0 4 8zM4 21a3 3 0 0 1 3 3H4zM4 15a9 9 0 0 1 9 9h-2a7 7 0 0 0-7-7zM4 10a14 14 0 0 1 14 14h-2A12 12 0 0 0 4 12z',\n};\n\nconst SVG = 'http://www.w3.org/2000/svg';\n\n/** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */\nexport function icon(name: IconName): SVGSVGElement {\n const svg = document.createElementNS(SVG, 'svg');\n svg.setAttribute('viewBox', '0 0 32 32');\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('part', 'icon');\n const path = document.createElementNS(SVG, 'path');\n path.setAttribute('fill-rule', 'evenodd');\n path.setAttribute('d', PATHS[name]);\n svg.append(path);\n return svg;\n}\n"],"mappings":";;AAiCA,MAAM,QAA4C;CAChD,MAAM;CACN,OACE;CAGF,MAAM;CACN,eACE;AACJ;AAEA,MAAM,MAAM;;AAGZ,SAAgB,KAAK,MAA+B;CAClD,MAAM,MAAM,SAAS,gBAAgB,KAAK,KAAK;CAC/C,IAAI,aAAa,WAAW,WAAW;CACvC,IAAI,aAAa,eAAe,MAAM;CACtC,IAAI,aAAa,QAAQ,MAAM;CAC/B,MAAM,OAAO,SAAS,gBAAgB,KAAK,MAAM;CACjD,KAAK,aAAa,aAAa,SAAS;CACxC,KAAK,aAAa,KAAK,MAAM,KAAK;CAClC,IAAI,OAAO,IAAI;CACf,OAAO;AACT"}
1
+ {"version":3,"file":"icons.js","names":[],"sources":["../src/icons.ts"],"sourcesContent":["/**\n * The play, pause and cast glyphs, Mattebox's own drawings and the same\n * ones the player draws: filled paths on a 32-unit viewBox. The cast glyph\n * is a screen with a corner open for three arcs, filled while casting.\n */\n\nexport type IconName = 'play' | 'pause' | 'cast' | 'cast-active';\n\n/** Each glyph's subpaths joined into one `d`, drawn even-odd like the player's. */\nconst PATHS: Readonly<Record<IconName, string>> = {\n play: 'M9 5L26 16L9 27z',\n pause: 'M8 6h5.5v20h-5.5zM18.5 6h5.5v20h-5.5z',\n cast: 'M4 6H28V26H20V23.5H25.5V8.5H6.5V11H4zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z',\n 'cast-active':\n 'M4 6H28V26H20A16 16 0 0 0 4 10zM4 23h3v3h-3zM4 17.5A8.5 8.5 0 0 1 12.5 26L10 26A6 6 0 0 0 4 20zM4 12A14 14 0 0 1 18 26L15.5 26A11.5 11.5 0 0 0 4 14.5z',\n};\n\nconst SVG = 'http://www.w3.org/2000/svg';\n\n/** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */\nexport function icon(name: IconName): SVGSVGElement {\n const svg = document.createElementNS(SVG, 'svg');\n svg.setAttribute('viewBox', '0 0 32 32');\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('part', 'icon');\n const path = document.createElementNS(SVG, 'path');\n path.setAttribute('fill-rule', 'evenodd');\n path.setAttribute('d', PATHS[name]);\n svg.append(path);\n return svg;\n}\n"],"mappings":";;AASA,MAAM,QAA4C;CAChD,MAAM;CACN,OAAO;CACP,MAAM;CACN,eACE;AACJ;AAEA,MAAM,MAAM;;AAGZ,SAAgB,KAAK,MAA+B;CAClD,MAAM,MAAM,SAAS,gBAAgB,KAAK,KAAK;CAC/C,IAAI,aAAa,WAAW,WAAW;CACvC,IAAI,aAAa,eAAe,MAAM;CACtC,IAAI,aAAa,QAAQ,MAAM;CAC/B,MAAM,OAAO,SAAS,gBAAgB,KAAK,MAAM;CACjD,KAAK,aAAa,aAAa,SAAS;CACxC,KAAK,aAAa,KAAK,MAAM,KAAK;CAClC,IAAI,OAAO,IAAI;CACf,OAAO;AACT"}
package/dist/shared.js CHANGED
@@ -7,8 +7,8 @@
7
7
  * package. The tokens come through the `--mbx-*` custom properties the
8
8
  * player sets, which inherit into every control.
9
9
  */
10
- const BUTTON_STYLE_CSS = ":host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:40px;height:40px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}";
11
- const SLIDER_STYLE_CSS = ":host{display:block}:host([hidden]){display:none}[part~=slider]{border-radius:var(--mbx-radius);cursor:pointer;touch-action:none;height:40px;position:relative}[part~=slider]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=slider]:focus:not(:focus-visible){outline:none}[part~=rail]{position:absolute;top:0;bottom:0;left:8px;right:8px}[part~=track]{background:#ffffff59;border-radius:2px;height:4px;position:absolute;top:50%;left:0;right:0;overflow:hidden;transform:translateY(-50%)}[part~=fill]{background:var(--mbx-accent);position:absolute;top:0;bottom:0;left:0}[part~=thumb]{background:var(--mbx-text);pointer-events:none;border-radius:50%;width:12px;height:12px;margin:-6px 0 0 -6px;position:absolute;top:50%}";
10
+ const BUTTON_STYLE_CSS = ":host{display:inline-flex}:host([hidden]){display:none}[part~=button]{width:2.5em;height:2.5em;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}slot[hidden]{display:none}";
11
+ const SLIDER_STYLE_CSS = ":host{display:block}:host([hidden]){display:none}[part~=slider]{border-radius:var(--mbx-radius);cursor:pointer;touch-action:none;height:2.6667em;position:relative}[part~=slider]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=slider]:focus:not(:focus-visible){outline:none}[part~=rail]{position:absolute;top:0;bottom:0;left:.5333em;right:.5333em}[part~=track]{background:#ffffff59;border-radius:2px;height:.2667em;position:absolute;top:50%;left:0;right:0;overflow:hidden;transform:translateY(-50%)}[part~=fill]{background:var(--mbx-accent);position:absolute;top:0;bottom:0;left:0}[part~=thumb]{background:var(--mbx-text);pointer-events:none;border-radius:50%;width:.8em;height:.8em;margin:-.4em 0 0 -.4em;position:absolute;top:50%}";
12
12
  const BUTTON_STYLE = BUTTON_STYLE_CSS;
13
13
  /** The style of a slider: the rail, the track with its fill, and the thumb. */
14
14
  /** The style of a slider: the rail, the track with its fill, and the thumb. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattebox/player-cast",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "<mbx-cast-button> and <mbx-cast-screen>: Chromecast from <mattebox-player>, over Google's sender SDK.",
5
5
  "author": "Josep Boix Requesens",
6
6
  "repository": {
@@ -37,8 +37,7 @@
37
37
  "./package.json": "./package.json"
38
38
  },
39
39
  "files": [
40
- "dist",
41
- "NOTICE"
40
+ "dist"
42
41
  ],
43
42
  "scripts": {
44
43
  "clean": "rm -rf dist",
@@ -50,10 +49,10 @@
50
49
  "release:ci": "semantic-release"
51
50
  },
52
51
  "devDependencies": {
53
- "@mattebox/player-core": "^0.4.0"
52
+ "@mattebox/player-core": "^0.6.0"
54
53
  },
55
54
  "peerDependencies": {
56
- "@mattebox/player": ">=0.7.0",
57
- "mattebox": "^0.8.2"
55
+ "@mattebox/player": ">=0.9.0",
56
+ "mattebox": "^0.14.0"
58
57
  }
59
58
  }
package/NOTICE DELETED
@@ -1,24 +0,0 @@
1
- @mattebox/player-cast carries two glyphs copied from media-icons
2
- (https://github.com/vidstack/media-icons), used under the MIT License:
3
-
4
- MIT License
5
-
6
- Copyright (c) 2023 Rahim Alwer
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy
9
- of this software and associated documentation files (the "Software"), to deal
10
- in the Software without restriction, including without limitation the rights
11
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- copies of the Software, and to permit persons to whom the Software is
13
- furnished to do so, subject to the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included in all
16
- copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- SOFTWARE.