@glomex/integration-web-component 1.1477.0 → 1.1479.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 +66 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -587,6 +587,13 @@ export declare class IntegrationElement extends HTMLElement implements Integrati
|
|
|
587
587
|
* Retrieves the total duration (in seconds) of the current media content.
|
|
588
588
|
*/
|
|
589
589
|
get duration(): number;
|
|
590
|
+
/**
|
|
591
|
+
* Retrieves the seekable range of the current media content.
|
|
592
|
+
* For VoD content, this typically represents the full duration (0 to duration).
|
|
593
|
+
* For live streams, this represents the DVR window that can be seeked to.
|
|
594
|
+
* The `start` and `end` properties are `undefined` if the seek range is not yet available.
|
|
595
|
+
*/
|
|
596
|
+
get seekRange(): SeekRange;
|
|
590
597
|
/**
|
|
591
598
|
* Indicates whether the media playback is currently muted.
|
|
592
599
|
*/
|
|
@@ -1279,7 +1286,7 @@ export declare interface Marker {
|
|
|
1279
1286
|
type: MarkerType;
|
|
1280
1287
|
/**
|
|
1281
1288
|
* Threshold for the marker:
|
|
1282
|
-
* - {@link MarkerType.TIME_IN_SECONDS}: seconds
|
|
1289
|
+
* - {@link MarkerType.TIME_IN_SECONDS}: seconds (use negative values to calculate position from end of content, e.g., -10 means 10 seconds before the end; only valid for VoD content)
|
|
1283
1290
|
* - {@link MarkerType.PERCENT}: percent as fraction (0-1)
|
|
1284
1291
|
* - {@link MarkerType.TIME_IN_SECONDS_RECURRING}: seconds
|
|
1285
1292
|
*/
|
|
@@ -1405,7 +1412,52 @@ export declare interface MediaItem {
|
|
|
1405
1412
|
*/
|
|
1406
1413
|
channel?: Channel;
|
|
1407
1414
|
/**
|
|
1408
|
-
* Markers
|
|
1415
|
+
* Markers control ad breaks and custom time-based events during playback.
|
|
1416
|
+
*
|
|
1417
|
+
* **⚠️ Important:** When providing custom markers, the default PREROLL is **not** added automatically.
|
|
1418
|
+
* You must explicitly include a PREROLL marker if you want ads to play.
|
|
1419
|
+
*
|
|
1420
|
+
* **Reserved marker names:** Only `PREROLL`, `MIDROLL`, and `POSTROLL` from {@link KnownMarkerName}
|
|
1421
|
+
* can be used for ad markers. All other `KnownMarkerName` values are reserved for internal use.
|
|
1422
|
+
* Use custom string names (e.g., `'halfwayPoint'`) for your own markers.
|
|
1423
|
+
*
|
|
1424
|
+
* **Listening for custom markers:** When a custom marker is reached, the player dispatches
|
|
1425
|
+
* an {@link IntegrationEvent.CONTENT_MARKER_REACHED} event. Listen for this event to react
|
|
1426
|
+
* to your custom markers:
|
|
1427
|
+
*
|
|
1428
|
+
* ```js
|
|
1429
|
+
* player.addEventListener('contentmarkerreached', (event) => {
|
|
1430
|
+
* const { markerName, markerData } = event.detail;
|
|
1431
|
+
* if (markerName === 'showEndCreditsOverlay') {
|
|
1432
|
+
* // Show your overlay
|
|
1433
|
+
* }
|
|
1434
|
+
* });
|
|
1435
|
+
* ```
|
|
1436
|
+
*
|
|
1437
|
+
* @example
|
|
1438
|
+
* // Default: pre-roll ads only (same as omitting markers)
|
|
1439
|
+
* markers: [{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 }]
|
|
1440
|
+
*
|
|
1441
|
+
* @example
|
|
1442
|
+
* // Pre-roll + mid-roll at 60 seconds
|
|
1443
|
+
* markers: [
|
|
1444
|
+
* { name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 },
|
|
1445
|
+
* { name: KnownMarkerName.MIDROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 60 }
|
|
1446
|
+
* ]
|
|
1447
|
+
*
|
|
1448
|
+
* @example
|
|
1449
|
+
* // Custom marker at 50% of content
|
|
1450
|
+
* markers: [
|
|
1451
|
+
* { name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 },
|
|
1452
|
+
* { name: 'halfwayPoint', type: MarkerType.PERCENT, threshold: 0.5 }
|
|
1453
|
+
* ]
|
|
1454
|
+
*
|
|
1455
|
+
* @example
|
|
1456
|
+
* // Custom marker 15 seconds before end (e.g., for end credits overlay)
|
|
1457
|
+
* markers: [
|
|
1458
|
+
* { name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 },
|
|
1459
|
+
* { name: 'showEndCreditsOverlay', type: MarkerType.TIME_IN_SECONDS, threshold: -15 }
|
|
1460
|
+
* ]
|
|
1409
1461
|
*
|
|
1410
1462
|
* @defaultValue `[{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 }]`
|
|
1411
1463
|
*/
|
|
@@ -1812,6 +1864,18 @@ export declare enum ScriptType {
|
|
|
1812
1864
|
EXTERNAL_MEDIA_ITEM = "application/glomex-external-media-item+json"
|
|
1813
1865
|
}
|
|
1814
1866
|
|
|
1867
|
+
/**
|
|
1868
|
+
* Represents the seekable range of the media.
|
|
1869
|
+
* For VoD content, this typically represents the full duration (0 to duration).
|
|
1870
|
+
* For live streams, this represents the DVR window that can be seeked to.
|
|
1871
|
+
*/
|
|
1872
|
+
export declare interface SeekRange {
|
|
1873
|
+
/** The start time of the seekable range in seconds, or undefined if not yet available */
|
|
1874
|
+
start?: number;
|
|
1875
|
+
/** The end time of the seekable range in seconds, or undefined if not yet available */
|
|
1876
|
+
end?: number;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1815
1879
|
export declare enum StartMethod {
|
|
1816
1880
|
/** Autoplay occured for above the fold content */
|
|
1817
1881
|
PRE_CLICK = "pre-click-to-play",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glomex/integration-web-component",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1479.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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@biomejs/biome": "catalog:",
|
|
35
|
-
"@glomex/integration": "1.
|
|
35
|
+
"@glomex/integration": "1.1479.0",
|
|
36
36
|
"@microsoft/api-extractor": "catalog:",
|
|
37
37
|
"@rslib/core": "catalog:",
|
|
38
38
|
"npm-run-all": "catalog:",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"license": "MIT",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "a0d1c9d389b78e57bd980b52f95d7d37792c7fcc"
|
|
46
46
|
}
|