@glomex/integration-web-component 1.1312.4 → 1.1314.4
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/build/index.d.ts +108 -32
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare interface Ad {
|
|
|
9
9
|
breakIndex: number;
|
|
10
10
|
breakName: string;
|
|
11
11
|
mimetype: string;
|
|
12
|
+
totalAds: number;
|
|
12
13
|
nonLinearWidth?: number;
|
|
13
14
|
nonLinearHeight?: number;
|
|
14
15
|
}
|
|
@@ -30,6 +31,45 @@ export declare enum ComponentName {
|
|
|
30
31
|
GLOMEX_MEDIA_ITEM = "glomex-media-item"
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Describes the contract that an external API tracking script must implement so that it can be
|
|
36
|
+
* imported and executed by the integration. The API script must be hosted on the remote server
|
|
37
|
+
* with CORS enabled.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { IntegrationEvent } from '@glomex/integration';
|
|
42
|
+
* export const connectIntegration: ConnectIntegration = (
|
|
43
|
+
* integration,
|
|
44
|
+
* // userId will be undefined when no consent is given
|
|
45
|
+
* { userCountryCode, userId, integrationEnvironment }
|
|
46
|
+
* ) => {
|
|
47
|
+
* integration.addEventListener(IntegrationEvent.CONTENT_PLAY, () => {
|
|
48
|
+
* console.log('play', integration.content);
|
|
49
|
+
* });
|
|
50
|
+
* };
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```js
|
|
55
|
+
* export const connectIntegration = (
|
|
56
|
+
* integration,
|
|
57
|
+
* // userId will be undefined when no consent is given
|
|
58
|
+
* { userCountryCode, userId, integrationEnvironment }
|
|
59
|
+
* ) => {
|
|
60
|
+
* const { IntegrationEvent } = integration.constructor;
|
|
61
|
+
* integration.addEventListener(IntegrationEvent.CONTENT_PLAY, () => {
|
|
62
|
+
* console.log('play', integration.content);
|
|
63
|
+
* });
|
|
64
|
+
* };
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare type ConnectIntegration = (integration: IntegrationElement, context: {
|
|
68
|
+
userCountryCode?: string;
|
|
69
|
+
userId?: string;
|
|
70
|
+
integrationEnvironment?: string;
|
|
71
|
+
}) => (() => void) | undefined;
|
|
72
|
+
|
|
33
73
|
export declare interface Consent {
|
|
34
74
|
gdprApplies: boolean;
|
|
35
75
|
consentString?: string;
|
|
@@ -44,6 +84,18 @@ export declare interface Consent {
|
|
|
44
84
|
addtlConsent?: string;
|
|
45
85
|
}
|
|
46
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Selected source of the given content.
|
|
89
|
+
*/
|
|
90
|
+
declare interface ContentSource {
|
|
91
|
+
id: string;
|
|
92
|
+
mimetype: Mimetype;
|
|
93
|
+
src: string;
|
|
94
|
+
playbackMode: PlaybackMode;
|
|
95
|
+
entitlementToken?: string;
|
|
96
|
+
drm: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
47
99
|
export declare interface CustomMarker {
|
|
48
100
|
/** {@inheritDoc Marker.name} */
|
|
49
101
|
name: string;
|
|
@@ -226,6 +278,7 @@ export declare function getIntegrationCssUrl(integrationId: string): string;
|
|
|
226
278
|
* ```
|
|
227
279
|
*/
|
|
228
280
|
export declare class GlomexMediaItemElement extends HTMLElement {
|
|
281
|
+
#private;
|
|
229
282
|
/**
|
|
230
283
|
* {@inheritDoc MediaItem#id}
|
|
231
284
|
*/
|
|
@@ -233,7 +286,7 @@ export declare class GlomexMediaItemElement extends HTMLElement {
|
|
|
233
286
|
/**
|
|
234
287
|
* Overridden poster of the media item.
|
|
235
288
|
*/
|
|
236
|
-
poster
|
|
289
|
+
poster: string;
|
|
237
290
|
/**
|
|
238
291
|
* Overridden title of the media item.
|
|
239
292
|
*/
|
|
@@ -242,11 +295,7 @@ export declare class GlomexMediaItemElement extends HTMLElement {
|
|
|
242
295
|
|
|
243
296
|
export declare interface GlomexMediaItemWithOverrides {
|
|
244
297
|
id: string;
|
|
245
|
-
overrides:
|
|
246
|
-
title?: string;
|
|
247
|
-
poster?: string;
|
|
248
|
-
teaserVideo?: string;
|
|
249
|
-
};
|
|
298
|
+
overrides: Partial<Omit<MediaItem, 'id' | 'sources' | 'isExternal'>>;
|
|
250
299
|
}
|
|
251
300
|
|
|
252
301
|
/**
|
|
@@ -322,6 +371,10 @@ export declare class IntegrationElement extends HTMLElement implements Integrati
|
|
|
322
371
|
* Pauses the current media playback.
|
|
323
372
|
*/
|
|
324
373
|
pause(): void;
|
|
374
|
+
/**
|
|
375
|
+
* Snapshots current video frame.
|
|
376
|
+
*/
|
|
377
|
+
getCurrentVideoFrame(): Promise<ImageBitmap>;
|
|
325
378
|
/**
|
|
326
379
|
* Returns the current playback time (in seconds) of the media.
|
|
327
380
|
*/
|
|
@@ -365,10 +418,18 @@ export declare class IntegrationElement extends HTMLElement implements Integrati
|
|
|
365
418
|
* Returns `true` if the media playback is currently paused; otherwise, returns `false`.
|
|
366
419
|
*/
|
|
367
420
|
get paused(): boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Indicates whether the media playback has ended.
|
|
423
|
+
*/
|
|
424
|
+
get ended(): boolean;
|
|
368
425
|
/**
|
|
369
426
|
* Indicates whether the media is currently in a seeking state.
|
|
370
427
|
*/
|
|
371
428
|
get seeking(): boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Indicates whether the media is currently in a buffering state.
|
|
431
|
+
*/
|
|
432
|
+
get buffering(): boolean;
|
|
372
433
|
/**
|
|
373
434
|
* Retrieves the current presentation mode of the media player.
|
|
374
435
|
* This mode may affect how the media is displayed.
|
|
@@ -418,6 +479,8 @@ export declare class IntegrationElement extends HTMLElement implements Integrati
|
|
|
418
479
|
* Retrieves details about the currently selected ad, if any.
|
|
419
480
|
*/
|
|
420
481
|
get currentAd(): Ad | undefined;
|
|
482
|
+
/** Version of the integration */
|
|
483
|
+
get version(): string;
|
|
421
484
|
/**
|
|
422
485
|
* Sets the presentation mode of the media player to the specified mode. This mode affects how the integration gets displayed
|
|
423
486
|
* (e.g. inline, dock, lightbox, fullscreen).
|
|
@@ -479,7 +542,10 @@ export declare interface IntegrationElementEventMap {
|
|
|
479
542
|
mode: PresentationMode;
|
|
480
543
|
}>;
|
|
481
544
|
/** @eventProperty */
|
|
482
|
-
contentselect: CustomEvent<unknown
|
|
545
|
+
contentselect: CustomEvent<unknown & {
|
|
546
|
+
sessionId: string;
|
|
547
|
+
source: ContentSource;
|
|
548
|
+
}>;
|
|
483
549
|
/** @eventProperty */
|
|
484
550
|
contentstart: CustomEvent<unknown>;
|
|
485
551
|
/** @eventProperty */
|
|
@@ -636,6 +702,11 @@ export declare interface IntegrationProperties {
|
|
|
636
702
|
* Allows the publisher to provide an optional placement attribute, which supplies additional contextual information for enhanced analytics tracking.
|
|
637
703
|
*/
|
|
638
704
|
placement?: string;
|
|
705
|
+
/**
|
|
706
|
+
* Allows the publisher to provide an optional ppid (publisher provided user id) attribute, which supplies additional contextual information for enhanced analytics tracking.
|
|
707
|
+
*/
|
|
708
|
+
ppid?: string;
|
|
709
|
+
env?: 'stage' | 'local';
|
|
639
710
|
variant?: string;
|
|
640
711
|
}
|
|
641
712
|
|
|
@@ -698,6 +769,19 @@ export declare interface MediaItem {
|
|
|
698
769
|
* Unique identifier of the media item.
|
|
699
770
|
*/
|
|
700
771
|
id: string;
|
|
772
|
+
/**
|
|
773
|
+
* Additional ids that identify the media item in other systems
|
|
774
|
+
*/
|
|
775
|
+
additionalIds?: {
|
|
776
|
+
joynId?: string;
|
|
777
|
+
joynMediaId?: string;
|
|
778
|
+
externalId?: string;
|
|
779
|
+
};
|
|
780
|
+
/**
|
|
781
|
+
* Whether the media item is external. This automatically gets set when an external media item is assigned.
|
|
782
|
+
* @ignore
|
|
783
|
+
*/
|
|
784
|
+
isExternal?: boolean;
|
|
701
785
|
/**
|
|
702
786
|
* Poster image of the media item.
|
|
703
787
|
*/
|
|
@@ -833,15 +917,27 @@ export declare interface MediaItem {
|
|
|
833
917
|
ageRatingDetails?: string[];
|
|
834
918
|
/** Keywords of the media item */
|
|
835
919
|
keywords?: string[];
|
|
836
|
-
/** Show
|
|
920
|
+
/** Show (often referred to as series, format or tv-show) the media item belongs to */
|
|
837
921
|
show?: {
|
|
922
|
+
id?: string;
|
|
838
923
|
name: string;
|
|
924
|
+
episodeNumber?: number;
|
|
925
|
+
seasonNumber?: number;
|
|
926
|
+
};
|
|
927
|
+
/** Competition the media item belongs to */
|
|
928
|
+
competition?: {
|
|
929
|
+
id?: string;
|
|
930
|
+
name?: string;
|
|
931
|
+
};
|
|
932
|
+
/** Compilation the media item belongs to */
|
|
933
|
+
compilation?: {
|
|
839
934
|
id?: string;
|
|
935
|
+
name?: string;
|
|
840
936
|
};
|
|
841
937
|
/** Category id and name of the media item */
|
|
842
938
|
category?: {
|
|
843
|
-
name: string;
|
|
844
939
|
id?: string;
|
|
940
|
+
name: string;
|
|
845
941
|
};
|
|
846
942
|
/** Error information if the media item is not available upfront. */
|
|
847
943
|
error?: MediaItemError;
|
|
@@ -869,7 +965,7 @@ export declare interface MediaItem {
|
|
|
869
965
|
endTime?: number;
|
|
870
966
|
};
|
|
871
967
|
/**
|
|
872
|
-
* Only relevant for glomex-internal use.
|
|
968
|
+
* Only relevant for glomex-internal use. Mark it to allow teaser experiments.
|
|
873
969
|
* @ignore
|
|
874
970
|
*/
|
|
875
971
|
allowTeaserExperiments?: boolean;
|
|
@@ -880,26 +976,6 @@ export declare interface MediaItem {
|
|
|
880
976
|
* @ignore
|
|
881
977
|
*/
|
|
882
978
|
apiScriptUrl?: string;
|
|
883
|
-
/**
|
|
884
|
-
* An external episode identifier. Often the id the episode was imported from.
|
|
885
|
-
*/
|
|
886
|
-
externalEpisodeId?: string;
|
|
887
|
-
/**
|
|
888
|
-
* An additional external show name. Often the name the show was imported from.
|
|
889
|
-
*/
|
|
890
|
-
externalShowName?: string;
|
|
891
|
-
/**
|
|
892
|
-
* An additional external show identifier. Often the id the show was imported from.
|
|
893
|
-
*/
|
|
894
|
-
externalShowId?: string;
|
|
895
|
-
/**
|
|
896
|
-
* An additional external channel name. Often the name the channel was imported from.
|
|
897
|
-
*/
|
|
898
|
-
externalChannelName?: string;
|
|
899
|
-
/**
|
|
900
|
-
* Whether the media item is exclusive for the web.
|
|
901
|
-
*/
|
|
902
|
-
isWebExclusive?: boolean;
|
|
903
979
|
}
|
|
904
980
|
|
|
905
981
|
/**
|
|
@@ -966,7 +1042,7 @@ declare interface MediaSourceBase {
|
|
|
966
1042
|
/**
|
|
967
1043
|
* Unique identifier of the media source.
|
|
968
1044
|
*
|
|
969
|
-
* @defaultValue
|
|
1045
|
+
* @defaultValue `V1StGXR8_Z5jdHi6B-myT` a generated identifier
|
|
970
1046
|
*/
|
|
971
1047
|
id?: string;
|
|
972
1048
|
/**
|
|
@@ -1032,7 +1108,7 @@ declare interface MediaSourceDynamicContent extends MediaSourceBase {
|
|
|
1032
1108
|
|
|
1033
1109
|
declare interface MediaSourceJoyn {
|
|
1034
1110
|
/**
|
|
1035
|
-
*
|
|
1111
|
+
* Media / asset identifier of joyn.
|
|
1036
1112
|
*/
|
|
1037
1113
|
id: string;
|
|
1038
1114
|
mimetype: Mimetype.JOYN;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glomex/integration-web-component",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1314.4",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@biomejs/biome": "^1.9.4",
|
|
32
|
-
"@glomex/integration": "^1.
|
|
32
|
+
"@glomex/integration": "^1.1314.2",
|
|
33
33
|
"@microsoft/api-extractor": "^7.52.1",
|
|
34
34
|
"@rslib/core": "^0.5.4",
|
|
35
35
|
"typescript": "^5.8.2"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "51eb5cdd07185bef6a932201345f00019d53a20b"
|
|
41
41
|
}
|