@glomex/integration-web-component
Version:
Web component and types to integrate the glomex player
1 lines • 6.16 kB
JavaScript
function e(e){if("provider"in e)return e;let t=e.sources?.some(e=>e.mimetype===k.JOYN);return{id:e.id||"",provider:t?h.JOYN:h.EXTERNAL,item:e}}(I=S||(S={})).DEFAULT="turbo-integration",I.SCRIPT="turbo-script",I.IFRAME="turbo-iframe",I.FULLPAGE="turbo-fullpage",I.AMP_VIDEO_IFRAME="turbo-amp-video-iframe",I.AMP_IFRAME="turbo-amp-iframe",(T=M||(M={})).INTEGRATION="glomex-integration",T.EXTERNAL_MEDIA_ITEM="external-media-item",T.GLOMEX_MEDIA_ITEM="glomex-media-item",T.JOYN_MEDIA_ITEM="joyn-media-item",(d=g||(g={})).INTEGRATION_CONFIGS="application/integration-configs+json",d.INTEGRATION_CONFIGS_LEGACY="application/glomex-integration-configs+json",d.EXTERNAL_MEDIA_ITEM="application/external-media-item+json",d.EXTERNAL_MEDIA_ITEM_LEGACY="application/glomex-external-media-item+json";let t="turbo-player";(_=U||(U={})).NET_ID="netId",_.SEVEN_PASS_ID="sevenPassId",_.PPID="ppid",_.UTIQ_ID="utiqId",_.LIVERAMP_ID="liverampId",_.PAIR_ID="pairId",(N=G||(G={})).AAID="aaid",N.AFAI="afai",N.ASIA="asia",N.ASID="asid",N.TIFA="tifa",N.VAID="vaid",N.IDFA="idfa",N.IDFV="idfv",N.LGUDID="lgudid",N.MSAI="msai",N.OAID="oaid",N.PSNAI="psnai",N.RIDA="rida",N.VIDA="vida",N.WAID="waid",(A=y||(y={})).HIDDEN="hidden",A.INLINE="inline",A.DOCK="dock",A.LIGHTBOX="lightbox",A.LIGHTBOX_EXTERNAL="lightbox-external",A.FULLSCREEN="fullscreen",A.AMP_DOCK="amp-dock",(s=v||(v={})).READY="ready",s.INTEGRATION_ABORT="integrationabort",s.INTEGRATION_AD_AVAILABLE="integrationadavailable",s.INTEGRATION_PASSBACK="integrationpassback",s.USER_UPDATE_CONSENT="userupdateconsent",s.PLAYLIST_UPDATE="playlistupdate",s.PLAYER_SET_PRESENTATION_MODE="playersetpresentationmode",s.CONTENT_SELECT="contentselect",s.CONTENT_START="contentstart",s.CONTENT_IMPRESSION="contentimpression",s.CONTENT_BUFFERING_START="contentbufferingstart",s.CONTENT_BUFFERING_END="contentbufferingend",s.CONTENT_STOP="contentstop",s.CONTENT_ERROR="contenterror",s.CONTENT_MARKER_REACHED="contentmarkerreached",s.CONTENT_TIME_UPDATE="timeupdate",s.CONTENT_SEEKING="seeking",s.CONTENT_SEEKED="seeked",s.CONTENT_PLAY="play",s.CONTENT_PAUSE="pause",s.CONTENT_VOLUME_CHANGE="volumechange",s.CONTENT_RATECHANGE="ratechange",s.CONTENT_ENDED="ended",s.AD_BREAK_REQUEST="adbreakrequest",s.AD_BREAK_REQUEST_ERROR="adbreakrequesterror",s.AD_LOADED="adloaded",s.AD_IMPRESSION="adimpression",s.AD_BUFFERING_START="adbufferingstart",s.AD_BUFFERING_END="adbufferingend",s.AD_TIME_UPDATE="adtimeupdate",s.AD_VOLUME_CHANGE="advolumechange",s.AD_PAUSED="adpaused",s.AD_RESUMED="adresumed",s.AD_CLICK="adclick",s.AD_SKIPPED="adskipped",s.AD_COMPLETE="adcomplete",s.AD_ERROR="aderror",s.UI_INTERACTION="uiinteraction",(l=F||(F={})).TIME_IN_SECONDS="time",l.PERCENT="percent",l.TIME_IN_SECONDS_RECURRING="timeRecurring",(R=b||(b={})).PREROLL="preroll",R.MIDROLL="midroll",R.POSTROLL="postroll",R.FIRST_QUARTILE="contentFirstQuartile",R.MIDPOINT="contentMidpoint",R.THIRD_QUARTILE="contentThirdQuartile",R.COMPLETE="contentComplete",R.STILL_INTERESTING="stillInteresting",R.REQUEST_RECOMMENDATIONS="requestRecommendations",(c=f||(f={})).NOT_FOUND="NotFound",c.FORBIDDEN="Forbidden",c.HIDDEN="Hidden",c.NO_CONTENT="NoContent",c.GENERIC="Generic",(p=x||(x={})).NOT_FOUND="NotFound",p.NOT_AVAILABLE="NotAvailable",p.GEOBLOCKED="Geoblocked",p.YOUTH_PROTECTED="YouthProtected",p.TERMINATED="Terminated",p.EXPIRED="Expired",p.LOGIN_REQUIRED="LoginRequired",p.HIGHER_TIER_ACCOUNT_REQUIRED="HigherTierAccountRequired",p.VPN_DETECTED="VpnDetected",p.AGE_VERIFICATION_REQUIRED="AgeVerificationRequired",p.PIN_REQUIRED="PinRequired",p.INVALID_PIN="InvalidPin",p.GENERIC="Generic",(O=h||(h={})).GLOMEX="glomex",O.JOYN="joyn",O.EXTERNAL="external",(m=k||(k={})).HLS="application/vnd.apple.mpegurl",m.HLS_LEGACY="application/x-mpegURL",m.DASH="application/dash+xml",m.MP4="video/mp4",m.OGG="video/ogg",m.WEBM="video/webm",m.MP3="audio/mp3",m.AAC="audio/aac",m.WAV="audio/wav",m.OGG_AUDIO="audio/ogg",m.MPEG_AUDIO="audio/mpeg",m.DYNAMIC_CONTENT="application/x-turbo-dynamic-content",m.JOYN="application/x-joyn-source",(D=Y||(Y={})).LIVE="live",D.VOD="vod",D.INTERACTIVE="interactive",D.EMBED="embed",(C=V||(V={})).PREROLL="preroll",C.MIDROLL="midroll",C.POSTROLL="postroll",C.OVERLAY="overlay",(L=B||(B={})).LINEAR="linear",L.OVERLAY="overlay",L.CUTIN="cutin",L.PAUSE="pause",(u=H||(H={})).PRE_CLICK="pre-click-to-play",u.CLICK="click-to-play",u.AUTOPLAY_SCROLL="autoplay-scroll",u.AUTOPLAY_SCROLL_OUT="autoplay-scroll-out",u.CLICK_NEXT="click-to-play-next",u.CLICK_REPLAY="click-to-play-replay",u.AUTOPLAY_NEXT="autoplay-next",(P=X||(X={})).CLEAR_PLAYLIST="clearPlaylist",P.SELECT_PLAYLIST_ITEM="selectPlaylistItem",P.ENDED="ended",P.CONTENT_ERROR="contentError",P.API_STOP="apiStop",P.LIVESTREAM_STOP="livestreamStop",P.PAGE_HIDE="pageHide",P.BEFORE_UNLOAD="beforeUnload";let a="player.glomex.com",n=`https://${a}/integration/1/integration.js`;function o(e){return`https://${a}/variant/${e}/variant.css`}function E(){if(window.customElements.get(M.INTEGRATION))return;let e=document.createElement("script");e.innerText=`import('${n}');`,e.type="module",(document.head||document.body).appendChild(e)}function i(e){if(document.querySelector(`link[href="${o(e)}"]`))return;let t=document.createElement("link");t.rel="stylesheet",t.href=o(e),(document.head||document.body).appendChild(t)}async function r(){await customElements.whenDefined(M.INTEGRATION);let e=customElements.get(M.INTEGRATION);if(!e?.sharedContext)throw Error("sharedContext not available on glomex-integration element");return e.sharedContext}var I,T,d,_,N,A,s,l,R,c,p,O,m,D,C,L,u,P,S,M,g,U,G,y,v,F,b,f,x,h,k,Y,V,B,H,X,K="turbo",w="glomex";export{V as AdBreakName,B as AdFormat,M as ComponentName,X as ContentStopReason,G as DeviceIdName,t as EXTERNAL_PLAYER_NAME,v as IntegrationEvent,b as KnownMarkerName,F as MarkerType,x as MediaItemErrorCode,h as MediaItemProvider,f as MediaProviderErrorCode,k as Mimetype,S as Origin,Y as PlaybackMode,y as PresentationMode,g as ScriptType,H as StartMethod,U as UserIdName,o as getIntegrationCssUrl,r as getSharedContext,E as loadIntegrationComponent,i as loadIntegrationStyles,e as normalizeMediaItem,K as INTERNAL_PREFIX,w as PUBLIC_PREFIX};