UNPKG

@glomex/integration-web-component

Version:

Web component and types to integrate the glomex player

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