@glomex/integration-web-component
Version:
Web component and types to integrate the glomex player
1 lines • 3.76 kB
JavaScript
var e,t,n,o,a,E,i,r,T,N,_,s,d,I,l,c,p,A,m,O,R,C;(s=e||(e={})).DEFAULT="turbo-integration",s.SCRIPT="turbo-script",s.IFRAME="turbo-iframe",s.FULLPAGE="turbo-fullpage",s.AMP_VIDEO_IFRAME="turbo-amp-video-iframe",s.AMP_IFRAME="turbo-amp-iframe",(d=t||(t={})).INTEGRATION="glomex-integration",d.EXTERNAL_MEDIA_ITEM="glomex-external-media-item",d.GLOMEX_MEDIA_ITEM="glomex-media-item",(I=n||(n={})).INTEGRATION_CONFIGS="application/glomex-integration-configs+json",I.EXTERNAL_MEDIA_ITEM="application/glomex-external-media-item+json",(l=o||(o={})).HIDDEN="hidden",l.INLINE="inline",l.DOCK="dock",l.LIGHTBOX="lightbox",l.FULLSCREEN="fullscreen",l.AMP_DOCK="amp-dock",(c=a||(a={})).READY="ready",c.INTEGRATION_ABORT="integrationabort",c.INTEGRATION_AD_AVAILABLE="integrationadavailable",c.INTEGRATION_PASSBACK="integrationpassback",c.USER_UPDATE_CONSENT="userupdateconsent",c.PLAYLIST_UPDATE="playlistupdate",c.PLAYER_SET_PRESENTATION_MODE="playersetpresentationmode",c.CONTENT_SELECT="contentselect",c.CONTENT_START="contentstart",c.CONTENT_IMPRESSION="contentimpression",c.CONTENT_BUFFERING_START="contentbufferingstart",c.CONTENT_BUFFERING_END="contentbufferingend",c.CONTENT_STOP="contentstop",c.CONTENT_ERROR="contenterror",c.CONTENT_MARKER_REACHED="contentmarkerreached",c.CONTENT_TIME_UPDATE="timeupdate",c.CONTENT_SEEKING="seeking",c.CONTENT_SEEKED="seeked",c.CONTENT_PLAY="play",c.CONTENT_PAUSE="pause",c.CONTENT_VOLUME_CHANGE="volumechange",c.CONTENT_ENDED="ended",c.AD_IMPRESSION="adimpression",c.AD_BUFFERING_START="adbufferingstart",c.AD_BUFFERING_END="adbufferingend",c.AD_TIME_UPDATE="adtimeupdate",c.AD_VOLUME_CHANGE="advolumechange",c.AD_PAUSED="adpaused",c.AD_RESUMED="adresumed",c.AD_CLICK="adclick",c.AD_SKIPPED="adskipped",c.AD_COMPLETE="adcomplete",(p=E||(E={})).TIME_IN_SECONDS="time",p.PERCENT="percent",p.TIME_IN_SECONDS_RECURRING="timeRecurring",(A=i||(i={})).PREROLL="preroll",A.MIDROLL="midroll",A.POSTROLL="postroll",A.FIRST_QUARTILE="contentFirstQuartile",A.MIDPOINT="contentMidpoint",A.THIRD_QUARTILE="contentThirdQuartile",A.COMPLETE="contentComplete",A.STILL_INTERESTING="stillInteresting",A.REQUEST_RECOMMENDATIONS="requestRecommendations",(m=r||(r={})).NOT_FOUND="NotFound",m.NOT_AVAILABLE="NotAvailable",m.GEOBLOCKED="Geoblocked",m.YOUTH_PROTECTED="YouthProtected",(O=T||(T={})).HLS="application/vnd.apple.mpegurl",O.HLS_LEGACY="application/x-mpegURL",O.DASH="application/dash+xml",O.MP4="video/mp4",O.OGG="video/ogg",O.WEBM="video/webm",O.MP3="audio/mp3",O.AAC="audio/aac",O.WAV="audio/wav",O.OGG_AUDIO="audio/ogg",O.MPEG_AUDIO="audio/mpeg",O.DYNAMIC_CONTENT="application/x-turbo-dynamic-content",O.JOYN="application/x-joyn-source",(R=N||(N={})).LIVE="live",R.VOD="vod",R.INTERACTIVE="interactive",R.EMBED="embed",(C=_||(_={})).CLEAR_PLAYLIST="clearPlaylist",C.SELECT_PLAYLIST_ITEM="selectPlaylistItem",C.ENDED="ended",C.CONTENT_ERROR="contentError",C.API_STOP="apiStop",C.LIVESTREAM_STOP="livestreamStop",C.PAGE_HIDE="pageHide";let D="player.glomex.com",u=`https://${D}/integration/1/integration.js`;function S(e){return`https://${D}/variant/${e}/variant.css`}function M(){if(window.customElements.get(t.INTEGRATION))return;let e=document.createElement("script");e.innerText=`import('${u}');`,e.type="module",(document.head||document.body).appendChild(e)}function L(e){if(document.querySelector(`link[href="${S(e)}"]`))return;let t=document.createElement("link");t.rel="stylesheet",t.href=S(e),(document.head||document.body).appendChild(t)}export{t as ComponentName,_ as ContentStopReason,a as IntegrationEvent,i as KnownMarkerName,E as MarkerType,r as MediaItemErrorCode,T as Mimetype,N as PlaybackMode,o as PresentationMode,n as ScriptType,S as getIntegrationCssUrl,M as loadIntegrationComponent,L as loadIntegrationStyles};