@glomex/integration-web-component 1.1531.0 → 1.1534.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.
- package/dist/index.d.ts +79 -27
- package/dist/index.js +1 -1
- package/package.json +18 -15
package/dist/index.d.ts
CHANGED
|
@@ -140,6 +140,7 @@ export declare interface Channel {
|
|
|
140
140
|
|
|
141
141
|
export declare enum ComponentName {
|
|
142
142
|
INTEGRATION = "glomex-integration",
|
|
143
|
+
TURBO_INTEGRATION = "turbo-integration",
|
|
143
144
|
EXTERNAL_MEDIA_ITEM = "external-media-item",
|
|
144
145
|
GLOMEX_MEDIA_ITEM = "glomex-media-item",
|
|
145
146
|
JOYN_MEDIA_ITEM = "joyn-media-item"
|
|
@@ -407,23 +408,16 @@ export declare interface ExtraContext {
|
|
|
407
408
|
};
|
|
408
409
|
}
|
|
409
410
|
|
|
410
|
-
/**
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
* import { getIntegrationCssUrl } from '@glomex/integration-web-component';
|
|
416
|
-
*
|
|
417
|
-
* const cssUrl = getIntegrationCssUrl('my-integration-id');
|
|
418
|
-
* // => 'https://player.glomex.com/variant/my-integration-id/variant.css'
|
|
419
|
-
* ```
|
|
420
|
-
*/
|
|
421
|
-
export declare function getIntegrationCssUrl(integrationId: string): string;
|
|
411
|
+
/** Returns the custom element name for the given tenant. */
|
|
412
|
+
export declare function getIntegrationComponentName(tenant?: string): string;
|
|
413
|
+
|
|
414
|
+
/** Returns the CSS URL for a given integration, tenant and environment. */
|
|
415
|
+
export declare function getIntegrationCssUrl(integrationId: string, tenant?: string, env?: string): string;
|
|
422
416
|
|
|
423
417
|
/**
|
|
424
|
-
* Returns the {@link SharedContext} singleton from the loaded
|
|
418
|
+
* Returns the {@link SharedContext} singleton from the loaded integration.
|
|
425
419
|
*
|
|
426
|
-
* Waits for the
|
|
420
|
+
* Waits for the integration custom element to be defined, then
|
|
427
421
|
* reads the singleton from its static property — guaranteeing the same
|
|
428
422
|
* instance that the running player uses.
|
|
429
423
|
*
|
|
@@ -440,7 +434,7 @@ export declare function getIntegrationCssUrl(integrationId: string): string;
|
|
|
440
434
|
* });
|
|
441
435
|
* ```
|
|
442
436
|
*/
|
|
443
|
-
export declare function getSharedContext(): Promise<SharedContext>;
|
|
437
|
+
export declare function getSharedContext(tenant?: string): Promise<SharedContext>;
|
|
444
438
|
|
|
445
439
|
/**
|
|
446
440
|
* Web component that allows to override title and poster of a given glomex content id. It can be placed
|
|
@@ -551,6 +545,12 @@ export declare class IntegrationElement extends HTMLElement implements Integrati
|
|
|
551
545
|
* @attribute integration-id
|
|
552
546
|
*/
|
|
553
547
|
integrationId?: string;
|
|
548
|
+
/**
|
|
549
|
+
* {@inheritDoc IntegrationProperties.tenant}
|
|
550
|
+
* @attribute tenant
|
|
551
|
+
* @ignore
|
|
552
|
+
*/
|
|
553
|
+
tenant?: string;
|
|
554
554
|
/**
|
|
555
555
|
* {@inheritDoc IntegrationProperties.playlistId}
|
|
556
556
|
* @attribute playlist-id
|
|
@@ -1322,6 +1322,16 @@ export declare interface IntegrationProperties {
|
|
|
1322
1322
|
* The identifier for this integration. This value is used to determine the configuration and behavior of the integration.
|
|
1323
1323
|
*/
|
|
1324
1324
|
integrationId?: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* The tenant determines which platform endpoints the player connects to.
|
|
1327
|
+
* Defaults to `glomex` when not specified.
|
|
1328
|
+
* @ignore
|
|
1329
|
+
* @example
|
|
1330
|
+
* ```html
|
|
1331
|
+
* <glomex-integration tenant="joyn" integration-id="..."></glomex-integration>
|
|
1332
|
+
* ```
|
|
1333
|
+
*/
|
|
1334
|
+
tenant?: string;
|
|
1325
1335
|
/**
|
|
1326
1336
|
* Defines the playlist / content identifier that should be loaded and managed by the integration. It can be a single content id, a playlist id or `auto`.
|
|
1327
1337
|
* It must be empty when the content is provided via the `media-item` web components inside the integration.
|
|
@@ -1461,18 +1471,10 @@ export declare enum KnownMarkerName {
|
|
|
1461
1471
|
}
|
|
1462
1472
|
|
|
1463
1473
|
/**
|
|
1464
|
-
* Loads the
|
|
1465
|
-
*
|
|
1466
|
-
* is already defined.
|
|
1467
|
-
*
|
|
1468
|
-
* @example
|
|
1469
|
-
* ```ts
|
|
1470
|
-
* import { loadIntegrationComponent } from '@glomex/integration-web-component';
|
|
1471
|
-
*
|
|
1472
|
-
* loadIntegrationComponent();
|
|
1473
|
-
* ```
|
|
1474
|
+
* Loads the integration custom element by injecting the tenant-specific
|
|
1475
|
+
* script into the document. Does nothing if the element is already defined.
|
|
1474
1476
|
*/
|
|
1475
|
-
export declare function loadIntegrationComponent(): void;
|
|
1477
|
+
export declare function loadIntegrationComponent(tenant?: string, env?: string): void;
|
|
1476
1478
|
|
|
1477
1479
|
/**
|
|
1478
1480
|
* Loads the variant CSS for the given integration ID by injecting a
|
|
@@ -1486,7 +1488,7 @@ export declare function loadIntegrationComponent(): void;
|
|
|
1486
1488
|
* loadIntegrationStyles('my-integration-id');
|
|
1487
1489
|
* ```
|
|
1488
1490
|
*/
|
|
1489
|
-
export declare function loadIntegrationStyles(integrationId: string): void;
|
|
1491
|
+
export declare function loadIntegrationStyles(integrationId: string, tenant?: string, env?: string): void;
|
|
1490
1492
|
|
|
1491
1493
|
/**
|
|
1492
1494
|
* Known markers that the integration interprets.
|
|
@@ -2606,6 +2608,56 @@ declare interface TextTrackList_2 extends MediaTrackList<TextTrack_2> {
|
|
|
2606
2608
|
}
|
|
2607
2609
|
export { TextTrackList_2 as TextTrackList }
|
|
2608
2610
|
|
|
2611
|
+
/**
|
|
2612
|
+
* A multi-tenant integration custom element that automatically determines
|
|
2613
|
+
* the correct tenant from the domain the script was loaded from.
|
|
2614
|
+
*
|
|
2615
|
+
* When the integration bundle is served from `player.joyn.de` the tenant
|
|
2616
|
+
* resolves to `"joyn"`; when served from `player.glomex.com` it resolves
|
|
2617
|
+
* to `"glomex"`, and so on. The mapping is driven by the `domains` list
|
|
2618
|
+
* in each tenant configuration (see `@glomex/turbo-shared-types`).
|
|
2619
|
+
*
|
|
2620
|
+
* For **local development** the tenant can still be overridden via the
|
|
2621
|
+
* `tenant` HTML attribute / DOM property so that developers can test any
|
|
2622
|
+
* tenant without deploying to the corresponding CDN.
|
|
2623
|
+
*
|
|
2624
|
+
* > The legacy `<glomex-integration>` element is kept for backwards
|
|
2625
|
+
* > compatibility. New tenants should use `<turbo-integration>`.
|
|
2626
|
+
*
|
|
2627
|
+
* @tagname turbo-integration
|
|
2628
|
+
*
|
|
2629
|
+
* @example Basic usage (tenant is auto-detected from the script URL)
|
|
2630
|
+
*
|
|
2631
|
+
* ```html
|
|
2632
|
+
* <turbo-integration
|
|
2633
|
+
* integration-id="joyn-vod"
|
|
2634
|
+
* >
|
|
2635
|
+
* <joyn-media-item id="MEDIA_ID"></joyn-media-item>
|
|
2636
|
+
* </turbo-integration>
|
|
2637
|
+
* ```
|
|
2638
|
+
*
|
|
2639
|
+
* @example Override tenant for local development
|
|
2640
|
+
*
|
|
2641
|
+
* ```html
|
|
2642
|
+
* <turbo-integration
|
|
2643
|
+
* integration-id="joyn-vod"
|
|
2644
|
+
* tenant="joyn"
|
|
2645
|
+
* ></turbo-integration>
|
|
2646
|
+
* ```
|
|
2647
|
+
*/
|
|
2648
|
+
export declare class TurboIntegrationElement extends IntegrationElement {
|
|
2649
|
+
constructor();
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* Properties for the `<turbo-integration>` custom element.
|
|
2654
|
+
*
|
|
2655
|
+
* Identical to {@link IntegrationProperties}. The `tenant` is normally
|
|
2656
|
+
* auto-detected from the domain the integration script was loaded from,
|
|
2657
|
+
* but can be overridden for local development.
|
|
2658
|
+
*/
|
|
2659
|
+
export declare type TurboIntegrationProperties = IntegrationProperties;
|
|
2660
|
+
|
|
2609
2661
|
declare type UiAction = (typeof ALLOWED_UI_ACTIONS)[number];
|
|
2610
2662
|
|
|
2611
2663
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){if("provider"in e)return e;let t=e.sources?.some(e=>e.mimetype===
|
|
1
|
+
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?w.JOYN:w.EXTERNAL,item:e}}(T=h||(h={})).DEFAULT="turbo-integration",T.SCRIPT="turbo-script",T.IFRAME="turbo-iframe",T.FULLPAGE="turbo-fullpage",T.AMP_VIDEO_IFRAME="turbo-amp-video-iframe",T.AMP_IFRAME="turbo-amp-iframe",(_=x||(x={})).INTEGRATION="glomex-integration",_.TURBO_INTEGRATION="turbo-integration",_.EXTERNAL_MEDIA_ITEM="external-media-item",_.GLOMEX_MEDIA_ITEM="glomex-media-item",_.JOYN_MEDIA_ITEM="joyn-media-item",(N=G||(G={})).INTEGRATION_CONFIGS="application/integration-configs+json",N.INTEGRATION_CONFIGS_LEGACY="application/glomex-integration-configs+json",N.EXTERNAL_MEDIA_ITEM="application/external-media-item+json",N.EXTERNAL_MEDIA_ITEM_LEGACY="application/glomex-external-media-item+json";let t="turbo-player";(m=F||(F={})).NET_ID="netId",m.PPID="ppid",m.UTIQ_ID="utiqId",m.LIVERAMP_ID="liverampId",m.PAIR_ID="pairId",m.ATS_DIRECT="atsDirect",(p=b||(b={})).AAID="aaid",p.AFAI="afai",p.ASIA="asia",p.ASID="asid",p.TIFA="tifa",p.VAID="vaid",p.IDFA="idfa",p.IDFV="idfv",p.LGUDID="lgudid",p.MSAI="msai",p.OAID="oaid",p.PSNAI="psnai",p.RIDA="rida",p.VIDA="vida",p.WAID="waid",(A=k||(k={})).HIDDEN="hidden",A.INLINE="inline",A.DOCK="dock",A.LIGHTBOX="lightbox",A.LIGHTBOX_EXTERNAL="lightbox-external",A.FULLSCREEN="fullscreen",A.AMP_DOCK="amp-dock",(R=V||(V={})).READY="ready",R.INTEGRATION_ABORT="integrationabort",R.INTEGRATION_AD_AVAILABLE="integrationadavailable",R.INTEGRATION_PASSBACK="integrationpassback",R.USER_UPDATE_CONSENT="userupdateconsent",R.PLAYLIST_UPDATE="playlistupdate",R.PLAYER_SET_PRESENTATION_MODE="playersetpresentationmode",R.CONTENT_SELECT="contentselect",R.CONTENT_START="contentstart",R.CONTENT_IMPRESSION="contentimpression",R.CONTENT_BUFFERING_START="contentbufferingstart",R.CONTENT_BUFFERING_END="contentbufferingend",R.CONTENT_STOP="contentstop",R.CONTENT_SUSPEND="contentsuspend",R.CONTENT_ERROR="contenterror",R.CONTENT_MARKER_REACHED="contentmarkerreached",R.CONTENT_TIME_UPDATE="timeupdate",R.CONTENT_SEEKING="seeking",R.CONTENT_SEEKED="seeked",R.CONTENT_PLAY="play",R.CONTENT_PAUSE="pause",R.CONTENT_VOLUME_CHANGE="volumechange",R.CONTENT_RATECHANGE="ratechange",R.CONTENT_ENDED="ended",R.AD_BREAK_REQUEST="adbreakrequest",R.AD_BREAK_REQUEST_ERROR="adbreakrequesterror",R.AD_LOADED="adloaded",R.AD_IMPRESSION="adimpression",R.AD_BUFFERING_START="adbufferingstart",R.AD_BUFFERING_END="adbufferingend",R.AD_TIME_UPDATE="adtimeupdate",R.AD_VOLUME_CHANGE="advolumechange",R.AD_PAUSED="adpaused",R.AD_RESUMED="adresumed",R.AD_CLICK="adclick",R.AD_SKIPPED="adskipped",R.AD_COMPLETE="adcomplete",R.AD_ERROR="aderror",R.UI_INTERACTION="uiinteraction",(u=Y||(Y={})).TIME_IN_SECONDS="time",u.PERCENT="percent",u.TIME_IN_SECONDS_RECURRING="timeRecurring",(g=B||(B={})).PREROLL="preroll",g.MIDROLL="midroll",g.POSTROLL="postroll",g.FIRST_QUARTILE="contentFirstQuartile",g.MIDPOINT="contentMidpoint",g.THIRD_QUARTILE="contentThirdQuartile",g.COMPLETE="contentComplete",g.STILL_INTERESTING="stillInteresting",g.REQUEST_RECOMMENDATIONS="requestRecommendations",(O=H||(H={})).NOT_FOUND="NotFound",O.FORBIDDEN="Forbidden",O.HIDDEN="Hidden",O.NO_CONTENT="NoContent",O.GENERIC="Generic",(D=X||(X={})).NOT_FOUND="NotFound",D.NOT_AVAILABLE="NotAvailable",D.GEOBLOCKED="Geoblocked",D.YOUTH_PROTECTED="YouthProtected",D.TERMINATED="Terminated",D.EXPIRED="Expired",D.LOGIN_REQUIRED="LoginRequired",D.HIGHER_TIER_ACCOUNT_REQUIRED="HigherTierAccountRequired",D.VPN_DETECTED="VpnDetected",D.AGE_VERIFICATION_REQUIRED="AgeVerificationRequired",D.PIN_REQUIRED="PinRequired",D.INVALID_PIN="InvalidPin",D.GENERIC="Generic",(L=w||(w={})).GLOMEX="glomex",L.JOYN="joyn",L.EXTERNAL="external",(C=K||(K={})).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",(S=j||(j={})).LIVE="live",S.VOD="vod",S.INTERACTIVE="interactive",S.EMBED="embed",(P=Q||(Q={})).COMPILATION="compilation",P.CLIP="clip",P.INTERACTIVE="interactive",P.LIVE_ON_DEMAND="live-on-demand",P.LIVE="live",P.MOVIE="movie",P.SERIES="series",P.SPORTS_MATCH="sports-match",P.TRAILER="trailer",(M=q||(q={})).FAIRPLAY="com.apple.fps",M.WIDEVINE="com.widevine.alpha",M.PLAYREADY="com.microsoft.playready",(y=$||($={})).PREROLL="preroll",y.MIDROLL="midroll",y.POSTROLL="postroll",y.OVERLAY="overlay",(f=J||(J={})).LINEAR="linear",f.OVERLAY="overlay",f.CUTIN="cutin",f.PAUSE="pause",(v=W||(W={})).PRE_CLICK="pre-click-to-play",v.CLICK="click-to-play",v.AUTOPLAY_SCROLL="autoplay-scroll",v.AUTOPLAY_SCROLL_OUT="autoplay-scroll-out",v.CLICK_NEXT="click-to-play-next",v.CLICK_REPLAY="click-to-play-replay",v.AUTOPLAY_NEXT="autoplay-next",(U=z||(z={})).CLEAR_PLAYLIST="clearPlaylist",U.SELECT_PLAYLIST_ITEM="selectPlaylistItem",U.ENDED="ended",U.CONTENT_ERROR="contentError",U.API_STOP="apiStop",U.LIVESTREAM_STOP="livestreamStop",U.LIVESTREAM_NOT_STARTED="livestreamNotStarted",U.PAGE_HIDE="pageHide",U.BEFORE_UNLOAD="beforeUnload";let o=["glomex","joyn"],a={glomex:{name:"glomex",domains:["player.glomex.com","player.mes.glomex.cloud","player.stage.mes.glomex.cloud"],configVersion:1,skipLegacyAuth:!1,configService:{prod:"https://config-vvs.glomex.com",stage:"https://vvs-config.stage.mes.glomex.cloud"},integrationService:{prod:"https://integration-cloudfront-eu-west-1.mes.glomex.cloud",stage:"https://integration-cloudfront-eu-west-1.stage.mes.glomex.cloud"},salesHouseService:{prod:"https://sales-house-configuration.mes.glomex.cloud/v2/config/",stage:"https://sales-house-configuration.stage.mes.glomex.cloud/v2/config/"},variantService:{prod:"https://player.glomex.com",stage:"https://player.stage.mes.glomex.cloud"},integrationLoader:{scriptBase:{prod:"https://player.glomex.com",stage:"https://player.stage.mes.glomex.cloud"},cssPath:"/variant/{id}/variant.css",componentName:"glomex-integration"}},joyn:{name:"joyn",domains:["player.joyn.de","player.stg.joyn.de","dg62ywrecl0tk.cloudfront.net","d15my2nums9uz9.cloudfront.net"],configVersion:2,skipLegacyAuth:!0,configService:{prod:"https://d15my2nums9uz9.cloudfront.net",stage:"https://dg62ywrecl0tk.cloudfront.net",local:"https://localhost:5174"},integrationService:void 0,salesHouseService:void 0,integrationLoader:{cssPath:"/config/{id}/styles.css",componentName:"turbo-integration"}}};function n(e){var t;return e&&"string"==typeof(t=e)&&o.includes(t)?a[e]:a.glomex}function i(e,t){let o=n(e);var a=o.integrationLoader.scriptBase??o.configService,i=t||"prod";if(a)return"local"===i&&a.local?a.local:"stage"===i||"local"===i?a.stage:a.prod}function r(e,t,o){let a=n(t),r=i(t,o);return`${r}${a.integrationLoader.cssPath.replace("{id}",e)}`}function E(e){return n(e).integrationLoader.componentName}function s(e,t,o){return r(e,t,o)}function d(e){return E(e)}function l(e,t){let o=E(e);if(window.customElements.get(o))return;let a=`${i(e,t)}/integration/1/integration.js`,n=document.createElement("script");n.innerText=`import('${a}');`,n.type="module",(document.head||document.body).appendChild(n)}function c(e,t,o){let a=r(e,t,o);if(document.querySelector(`link[href="${a}"]`))return;let n=document.createElement("link");n.rel="stylesheet",n.href=a,(document.head||document.body).appendChild(n)}async function I(e){let t=E(e);await customElements.whenDefined(t);let o=customElements.get(t);if(!o?.sharedContext)throw Error(`sharedContext not available on ${t} element`);return o.sharedContext}var T,_,N,m,p,A,R,u,g,O,D,L,C,S,P,M,y,f,v,U,h,x,G,F,b,k,V,Y,B,H,X,w,K,j,Q,q,$,J,W,z,Z="turbo",ee="glomex";export{$ as AdBreakName,J as AdFormat,x as ComponentName,z as ContentStopReason,b as DeviceIdName,q as DrmSystem,t as EXTERNAL_PLAYER_NAME,V as IntegrationEvent,B as KnownMarkerName,Y as MarkerType,X as MediaItemErrorCode,w as MediaItemProvider,H as MediaProviderErrorCode,K as Mimetype,h as Origin,j as PlaybackMode,k as PresentationMode,Q as ProgramType,G as ScriptType,W as StartMethod,F as UserIdName,d as getIntegrationComponentName,s as getIntegrationCssUrl,I as getSharedContext,l as loadIntegrationComponent,c as loadIntegrationStyles,e as normalizeMediaItem,Z as INTERNAL_PREFIX,ee as PUBLIC_PREFIX};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glomex/integration-web-component",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1534.0",
|
|
4
4
|
"description": "Web component and types to integrate the glomex player",
|
|
5
5
|
"documentation": "https://docs.glomex.com",
|
|
6
6
|
"homepage": "https://glomex.com",
|
|
@@ -22,23 +22,26 @@
|
|
|
22
22
|
"dist/**/*.js",
|
|
23
23
|
"dist/**/*.d.ts"
|
|
24
24
|
],
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@biomejs/biome": "^2.3.11",
|
|
27
|
-
"@microsoft/api-extractor": "^7.55.2",
|
|
28
|
-
"@rslib/core": "^0.19.1",
|
|
29
|
-
"npm-run-all": "^4.1.5",
|
|
30
|
-
"typescript": "^5.9.3",
|
|
31
|
-
"@glomex/integration": "1.1531.0"
|
|
32
|
-
},
|
|
33
|
-
"publishConfig": {
|
|
34
|
-
"access": "public"
|
|
35
|
-
},
|
|
36
|
-
"license": "MIT",
|
|
37
25
|
"scripts": {
|
|
26
|
+
"prepack": "npm run build",
|
|
38
27
|
"build": "rm -rf dist && npm-run-all --sequential build:ts build:rslib",
|
|
39
28
|
"build:ts": "tsc --build --force",
|
|
40
29
|
"build:rslib": "rslib build",
|
|
41
30
|
"lint": "tsc --noEmit && biome ci",
|
|
42
31
|
"watch": "npm-run-all --parallel \"build:* --watch\""
|
|
43
|
-
}
|
|
44
|
-
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@biomejs/biome": "catalog:",
|
|
35
|
+
"@glomex/integration": "1.1534.0",
|
|
36
|
+
"@glomex/turbo-shared-types": "1.1532.0",
|
|
37
|
+
"@microsoft/api-extractor": "catalog:",
|
|
38
|
+
"@rslib/core": "catalog:",
|
|
39
|
+
"npm-run-all": "catalog:",
|
|
40
|
+
"typescript": "catalog:"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"gitHead": "deb8ddec5e96480e67f6c4d3f4b048ea077f842c"
|
|
47
|
+
}
|