UNPKG

@aidenlx/player

Version:

Headless web components that make integrating media on the a web a breeze.

35 lines (31 loc) 1.06 kB
import{a as n,b as s}from"./chunk.DZBVSYZM.js";import{A as o,b as e,ia as i,p as r}from"./chunk.PWTX2M5C.js";var t=i` :host { display: block; contain: content; background: #000; } :host([hidden]) { display: none; } ::slotted(vds-media-ui) { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; /* Position above media container. */ z-index: 1; } .provider { width: 100%; height: 100%; pointer-events: auto; touch-action: manipulation; } `;var p=r(()=>n());function T(a){class d extends a{constructor(...l){super(...l);this.as=p.provide(this);o(this,"vds-media-player-connect")}static get styles(){return super.styles?[t,super.styles]:[t]}render(){return this.renderPlayer()}renderPlayer(){return e` <div class="provider" ${s(this.as.value)}> ${this.renderProvider()} </div> ${this.renderUi()} `}renderProvider(){return e``}renderUi(){return e`<slot name="ui"></slot>`}}return d}export{p as a,T as b};