@gcorevideo/player 2.22.30 → 2.23.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.
Files changed (69) hide show
  1. package/assets/media-control/container.scss +2 -3
  2. package/assets/poster/poster.ejs +3 -1
  3. package/assets/poster/poster.scss +3 -3
  4. package/assets/style/main.scss +1 -1
  5. package/assets/thumbnails/scrub-thumbnails.ejs +5 -10
  6. package/assets/thumbnails/style.scss +4 -5
  7. package/dist/core.js +1 -1
  8. package/dist/index.css +533 -532
  9. package/dist/index.js +273 -377
  10. package/dist/player.d.ts +63 -33
  11. package/docs/api/{player.seektime.bindevents.md → player.clapprstats.clearmetrics.md} +3 -3
  12. package/docs/api/player.clapprstats.md +14 -0
  13. package/docs/api/player.extendedevents.md +14 -0
  14. package/docs/api/player.md +13 -2
  15. package/docs/api/player.seektime.attributes.md +0 -1
  16. package/docs/api/player.seektime.md +6 -197
  17. package/docs/api/{player.seektime.render.md → player.seektimesettings.md} +7 -7
  18. package/docs/api/player.skiptime.md +3 -184
  19. package/lib/plugins/clips/Clips.d.ts +7 -0
  20. package/lib/plugins/clips/Clips.d.ts.map +1 -1
  21. package/lib/plugins/clips/Clips.js +8 -0
  22. package/lib/plugins/media-control/MediaControl.d.ts +1 -7
  23. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  24. package/lib/plugins/media-control/MediaControl.js +9 -18
  25. package/lib/plugins/poster/Poster.d.ts +24 -14
  26. package/lib/plugins/poster/Poster.d.ts.map +1 -1
  27. package/lib/plugins/poster/Poster.js +67 -97
  28. package/lib/plugins/thumbnails/Thumbnails.d.ts +36 -33
  29. package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -1
  30. package/lib/plugins/thumbnails/Thumbnails.js +174 -259
  31. package/lib/plugins/thumbnails/utils.d.ts +5 -0
  32. package/lib/plugins/thumbnails/utils.d.ts.map +1 -0
  33. package/lib/plugins/thumbnails/utils.js +12 -0
  34. package/lib/testUtils.d.ts +13 -39
  35. package/lib/testUtils.d.ts.map +1 -1
  36. package/lib/testUtils.js +15 -67
  37. package/package.json +2 -1
  38. package/src/plugins/clips/Clips.ts +10 -1
  39. package/src/plugins/media-control/MediaControl.ts +10 -21
  40. package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +1 -1
  41. package/src/plugins/poster/Poster.ts +91 -110
  42. package/src/plugins/poster/__tests__/Poster.test.ts +119 -0
  43. package/src/plugins/poster/__tests__/__snapshots__/Poster.test.ts.snap +8 -0
  44. package/src/plugins/source-controller/__tests__/SourceController.test.ts +1 -2
  45. package/src/plugins/thumbnails/Thumbnails.ts +228 -330
  46. package/src/plugins/thumbnails/__tests__/Thumbnails.test.ts +72 -0
  47. package/src/plugins/thumbnails/__tests__/__snapshots__/Thumbnails.test.ts.snap +10 -0
  48. package/src/plugins/thumbnails/utils.ts +12 -0
  49. package/src/testUtils.ts +15 -88
  50. package/temp/player.api.json +295 -829
  51. package/tsconfig.tsbuildinfo +1 -1
  52. package/docs/api/player.seektime.durationshown.md +0 -14
  53. package/docs/api/player.seektime.getseektime.md +0 -20
  54. package/docs/api/player.seektime.islivestreamwithdvr.md +0 -14
  55. package/docs/api/player.seektime.mediacontrol.md +0 -14
  56. package/docs/api/player.seektime.mediacontrolcontainer.md +0 -14
  57. package/docs/api/player.seektime.shouldbevisible.md +0 -18
  58. package/docs/api/player.seektime.template.md +0 -14
  59. package/docs/api/player.seektime.update.md +0 -18
  60. package/docs/api/player.skiptime.attributes.md +0 -17
  61. package/docs/api/player.skiptime.bindevents.md +0 -18
  62. package/docs/api/player.skiptime.events.md +0 -18
  63. package/docs/api/player.skiptime.handlerewindclicks.md +0 -18
  64. package/docs/api/player.skiptime.render.md +0 -18
  65. package/docs/api/player.skiptime.setback.md +0 -18
  66. package/docs/api/player.skiptime.setforward.md +0 -18
  67. package/docs/api/player.skiptime.setmidclick.md +0 -18
  68. package/docs/api/player.skiptime.template.md +0 -14
  69. package/docs/api/player.skiptime.togglefullscreen.md +0 -18
package/dist/player.d.ts CHANGED
@@ -96,7 +96,7 @@ declare class AudioTracks extends UICorePlugin {
96
96
  private onTrackSelect;
97
97
  private selectAudioTrack;
98
98
  private hideMenu;
99
- private toggleContextMenu;
99
+ private toggleMenu;
100
100
  private buttonElement;
101
101
  private buttonElementText;
102
102
  private trackElement;
@@ -227,7 +227,7 @@ export declare class BigMuteButton extends UICorePlugin {
227
227
  * ```
228
228
  */
229
229
  export declare class BottomGear extends UICorePlugin {
230
- private isHd;
230
+ private hd;
231
231
  /**
232
232
  * @internal
233
233
  */
@@ -349,6 +349,7 @@ export declare class ClapprStats extends ContainerPlugin {
349
349
  * @returns Measurements collected so far
350
350
  */
351
351
  exportMetrics(): ClapprStatsMetrics;
352
+ clearMetrics(): void;
352
353
  private onBitrate;
353
354
  private stopReporting;
354
355
  private startTimers;
@@ -603,7 +604,7 @@ export declare interface ClipsPluginSettings {
603
604
  */
604
605
  declare class ClosedCaptions extends UICorePlugin {
605
606
  private isPreselectedApplied;
606
- private isShowing;
607
+ private active;
607
608
  private track;
608
609
  private tracks;
609
610
  private $line;
@@ -633,8 +634,8 @@ declare class ClosedCaptions extends UICorePlugin {
633
634
  * @internal
634
635
  */
635
636
  get events(): {
636
- 'click [data-cc-select]': string;
637
- 'click [data-cc-button]': string;
637
+ 'click #cc-select li a': string;
638
+ 'click #cc-button': string;
638
639
  };
639
640
  private get preselectedLanguage();
640
641
  /**
@@ -932,7 +933,8 @@ export declare type ErrorScreenSettings = {
932
933
  };
933
934
 
934
935
  export declare enum ExtendedEvents {
935
- MEDIACONTROL_VOLUME = "mediacontrol:volume"
936
+ MEDIACONTROL_VOLUME = "mediacontrol:volume",
937
+ MEDIACONTROL_MENU_COLLAPSE = "mediacontrol:menu:collapse"
936
938
  }
937
939
 
938
940
  /**
@@ -1182,7 +1184,6 @@ export declare class MediaControl extends UICorePlugin {
1182
1184
  'click [data-stop]': string;
1183
1185
  'click [data-playstop]': string;
1184
1186
  'click [data-fullscreen]': string;
1185
- 'click .bar-container[data-seekbar]': string;
1186
1187
  'click .bar-container[data-volume]': string;
1187
1188
  'click .drawer-icon[data-volume]': string;
1188
1189
  'mouseenter .drawer-container[data-volume]': string;
@@ -1538,6 +1539,7 @@ declare class NerdStats extends UICorePlugin {
1538
1539
  private updateResolution;
1539
1540
  private estimateQuality;
1540
1541
  private updateMetrics;
1542
+ private updateCustomMetrics;
1541
1543
  private updateEstimatedQuality;
1542
1544
  private setStatsBoxSize;
1543
1545
  /**
@@ -2446,45 +2448,59 @@ export declare interface QualityLevelsPluginSettings {
2446
2448
  export { reportError_2 as reportError }
2447
2449
 
2448
2450
  /**
2449
- * `PLUGIN` that adds a seek time indicator to the media control UI.
2451
+ * `PLUGIN` that adds a seek time indicator when the mouse pointer is over the seek bar.
2450
2452
  * @beta
2453
+ * @remarks
2454
+ * Configuration options - {@link SeekTimeSettings}
2451
2455
  */
2452
2456
  export declare class SeekTime extends UICorePlugin {
2453
2457
  get name(): string;
2454
2458
  get supportedVersion(): {
2455
2459
  min: string;
2456
2460
  };
2457
- get template(): any;
2461
+ private static readonly template;
2458
2462
  get attributes(): {
2459
2463
  class: string;
2460
- 'data-seek-time': string;
2461
2464
  };
2462
- get mediaControl(): any;
2463
- get mediaControlContainer(): any;
2464
- get isLiveStreamWithDvr(): any;
2465
- get durationShown(): boolean;
2465
+ private get isLiveStreamWithDvr();
2466
+ private get showDuration();
2466
2467
  private hoveringOverSeekBar;
2467
2468
  private hoverPosition;
2468
2469
  private displayedDuration;
2469
2470
  private displayedSeekTime;
2470
2471
  private duration;
2471
- private rendered;
2472
- private $durationEl;
2473
- private $seekTimeEl;
2472
+ /**
2473
+ * @internal
2474
+ */
2474
2475
  bindEvents(): void;
2476
+ private onCoreReady;
2475
2477
  private onContainerChanged;
2476
2478
  private onTimeUpdate;
2477
2479
  private showTime;
2478
2480
  private hideTime;
2479
2481
  private calculateHoverPosition;
2480
- getSeekTime(): {
2481
- seekTime: number;
2482
- };
2483
- update(): void;
2484
- shouldBeVisible(): any;
2482
+ private getSeekTime;
2483
+ private update;
2484
+ private shouldBeVisible;
2485
+ /**
2486
+ * @internal
2487
+ */
2485
2488
  render(): this;
2489
+ private mount;
2486
2490
  }
2487
2491
 
2492
+ /**
2493
+ * Configuration options for the SeekTime plugin.
2494
+ * @beta
2495
+ */
2496
+ export declare type SeekTimeSettings = {
2497
+ /**
2498
+ * Whether to show the duration of the video. Applies only to the VOD streams.
2499
+ * @beta
2500
+ */
2501
+ duration?: boolean;
2502
+ };
2503
+
2488
2504
  export { SentryTracer }
2489
2505
 
2490
2506
  export { setTracer }
@@ -2530,7 +2546,7 @@ export declare class Share extends UICorePlugin {
2530
2546
  }
2531
2547
 
2532
2548
  /**
2533
- * `PLUGIN` that adds skip controls to the media control UI.
2549
+ * `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
2534
2550
  * @beta
2535
2551
  */
2536
2552
  export declare class SkipTime extends UICorePlugin {
@@ -2539,24 +2555,38 @@ export declare class SkipTime extends UICorePlugin {
2539
2555
  min: string;
2540
2556
  };
2541
2557
  get container(): any;
2542
- get template(): any;
2558
+ private static readonly template;
2559
+ /**
2560
+ * @internal
2561
+ */
2543
2562
  get attributes(): {
2544
2563
  class: string;
2545
- 'data-skip-time': string;
2546
2564
  };
2547
2565
  private position;
2566
+ /**
2567
+ * @internal
2568
+ */
2548
2569
  get events(): {
2549
- 'click [data-skip-left]': string;
2550
- 'click [data-skip-mid]': string;
2551
- 'click [data-skip-right]': string;
2570
+ 'click #mc-skip-left': string;
2571
+ 'click #mc-skip-mid': string;
2572
+ 'click #mc-skip-right': string;
2552
2573
  };
2574
+ /**
2575
+ * @internal
2576
+ */
2553
2577
  bindEvents(): void;
2554
- setBack(): void;
2555
- handleRewindClicks(): void;
2556
- setMidClick(): void;
2557
- setForward(): void;
2558
- toggleFullscreen(): void;
2578
+ private onContainerChanged;
2579
+ private setBack;
2580
+ private handleRewindClicks;
2581
+ private handleSkip;
2582
+ private setMidClick;
2583
+ private setForward;
2584
+ private toggleFullscreen;
2585
+ /**
2586
+ * @internal
2587
+ */
2559
2588
  render(): this;
2589
+ private mount;
2560
2590
  }
2561
2591
 
2562
2592
  /**
@@ -1,8 +1,8 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [SeekTime](./player.seektime.md) &gt; [bindEvents](./player.seektime.bindevents.md)
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [ClapprStats](./player.clapprstats.md) &gt; [clearMetrics](./player.clapprstats.clearmetrics.md)
4
4
 
5
- ## SeekTime.bindEvents() method
5
+ ## ClapprStats.clearMetrics() method
6
6
 
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
@@ -10,7 +10,7 @@
10
10
  **Signature:**
11
11
 
12
12
  ```typescript
13
- bindEvents(): void;
13
+ clearMetrics(): void;
14
14
  ```
15
15
  **Returns:**
16
16
 
@@ -74,6 +74,20 @@ Description
74
74
  </th></tr></thead>
75
75
  <tbody><tr><td>
76
76
 
77
+ [clearMetrics()](./player.clapprstats.clearmetrics.md)
78
+
79
+
80
+ </td><td>
81
+
82
+
83
+ </td><td>
84
+
85
+ **_(BETA)_**
86
+
87
+
88
+ </td></tr>
89
+ <tr><td>
90
+
77
91
  [exportMetrics()](./player.clapprstats.exportmetrics.md)
78
92
 
79
93
 
@@ -30,6 +30,20 @@ Description
30
30
  </th></tr></thead>
31
31
  <tbody><tr><td>
32
32
 
33
+ MEDIACONTROL\_MENU\_COLLAPSE
34
+
35
+
36
+ </td><td>
37
+
38
+ `"mediacontrol:menu:collapse"`
39
+
40
+
41
+ </td><td>
42
+
43
+
44
+ </td></tr>
45
+ <tr><td>
46
+
33
47
  MEDIACONTROL\_VOLUME
34
48
 
35
49
 
@@ -281,7 +281,7 @@ Description
281
281
 
282
282
  </td><td>
283
283
 
284
- **_(BETA)_** `PLUGIN` that adds a seek time indicator to the media control UI.
284
+ **_(BETA)_** `PLUGIN` that adds a seek time indicator when the mouse pointer is over the seek bar.
285
285
 
286
286
 
287
287
  </td></tr>
@@ -303,7 +303,7 @@ Description
303
303
 
304
304
  </td><td>
305
305
 
306
- **_(BETA)_** `PLUGIN` that adds skip controls to the media control UI.
306
+ **_(BETA)_** `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
307
307
 
308
308
 
309
309
  </td></tr>
@@ -1016,6 +1016,17 @@ A media source to fetch the media data from
1016
1016
 
1017
1017
 
1018
1018
 
1019
+ </td></tr>
1020
+ <tr><td>
1021
+
1022
+ [SeekTimeSettings](./player.seektimesettings.md)
1023
+
1024
+
1025
+ </td><td>
1026
+
1027
+ **_(BETA)_** Configuration options for the SeekTime plugin.
1028
+
1029
+
1019
1030
  </td></tr>
1020
1031
  <tr><td>
1021
1032
 
@@ -12,6 +12,5 @@
12
12
  ```typescript
13
13
  get attributes(): {
14
14
  class: string;
15
- 'data-seek-time': string;
16
15
  };
17
16
  ```
@@ -7,7 +7,7 @@
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
9
9
 
10
- `PLUGIN` that adds a seek time indicator to the media control UI.
10
+ `PLUGIN` that adds a seek time indicator when the mouse pointer is over the seek bar.
11
11
 
12
12
  **Signature:**
13
13
 
@@ -16,6 +16,10 @@ export declare class SeekTime extends UICorePlugin
16
16
  ```
17
17
  **Extends:** UICorePlugin
18
18
 
19
+ ## Remarks
20
+
21
+ Configuration options - [SeekTimeSettings](./player.seektimesettings.md)
22
+
19
23
  ## Properties
20
24
 
21
25
  <table><thead><tr><th>
@@ -51,91 +55,7 @@ Description
51
55
 
52
56
  </td><td>
53
57
 
54
- { class: string; 'data-seek-time': string; }
55
-
56
-
57
- </td><td>
58
-
59
- **_(BETA)_**
60
-
61
-
62
- </td></tr>
63
- <tr><td>
64
-
65
- [durationShown](./player.seektime.durationshown.md)
66
-
67
-
68
- </td><td>
69
-
70
- `readonly`
71
-
72
-
73
- </td><td>
74
-
75
- boolean
76
-
77
-
78
- </td><td>
79
-
80
- **_(BETA)_**
81
-
82
-
83
- </td></tr>
84
- <tr><td>
85
-
86
- [isLiveStreamWithDvr](./player.seektime.islivestreamwithdvr.md)
87
-
88
-
89
- </td><td>
90
-
91
- `readonly`
92
-
93
-
94
- </td><td>
95
-
96
- any
97
-
98
-
99
- </td><td>
100
-
101
- **_(BETA)_**
102
-
103
-
104
- </td></tr>
105
- <tr><td>
106
-
107
- [mediaControl](./player.seektime.mediacontrol.md)
108
-
109
-
110
- </td><td>
111
-
112
- `readonly`
113
-
114
-
115
- </td><td>
116
-
117
- any
118
-
119
-
120
- </td><td>
121
-
122
- **_(BETA)_**
123
-
124
-
125
- </td></tr>
126
- <tr><td>
127
-
128
- [mediaControlContainer](./player.seektime.mediacontrolcontainer.md)
129
-
130
-
131
- </td><td>
132
-
133
- `readonly`
134
-
135
-
136
- </td><td>
137
-
138
- any
58
+ { class: string; }
139
59
 
140
60
 
141
61
  </td><td>
@@ -185,116 +105,5 @@ string
185
105
  **_(BETA)_**
186
106
 
187
107
 
188
- </td></tr>
189
- <tr><td>
190
-
191
- [template](./player.seektime.template.md)
192
-
193
-
194
- </td><td>
195
-
196
- `readonly`
197
-
198
-
199
- </td><td>
200
-
201
- any
202
-
203
-
204
- </td><td>
205
-
206
- **_(BETA)_**
207
-
208
-
209
- </td></tr>
210
- </tbody></table>
211
-
212
- ## Methods
213
-
214
- <table><thead><tr><th>
215
-
216
- Method
217
-
218
-
219
- </th><th>
220
-
221
- Modifiers
222
-
223
-
224
- </th><th>
225
-
226
- Description
227
-
228
-
229
- </th></tr></thead>
230
- <tbody><tr><td>
231
-
232
- [bindEvents()](./player.seektime.bindevents.md)
233
-
234
-
235
- </td><td>
236
-
237
-
238
- </td><td>
239
-
240
- **_(BETA)_**
241
-
242
-
243
- </td></tr>
244
- <tr><td>
245
-
246
- [getSeekTime()](./player.seektime.getseektime.md)
247
-
248
-
249
- </td><td>
250
-
251
-
252
- </td><td>
253
-
254
- **_(BETA)_**
255
-
256
-
257
- </td></tr>
258
- <tr><td>
259
-
260
- [render()](./player.seektime.render.md)
261
-
262
-
263
- </td><td>
264
-
265
-
266
- </td><td>
267
-
268
- **_(BETA)_**
269
-
270
-
271
- </td></tr>
272
- <tr><td>
273
-
274
- [shouldBeVisible()](./player.seektime.shouldbevisible.md)
275
-
276
-
277
- </td><td>
278
-
279
-
280
- </td><td>
281
-
282
- **_(BETA)_**
283
-
284
-
285
- </td></tr>
286
- <tr><td>
287
-
288
- [update()](./player.seektime.update.md)
289
-
290
-
291
- </td><td>
292
-
293
-
294
- </td><td>
295
-
296
- **_(BETA)_**
297
-
298
-
299
108
  </td></tr>
300
109
  </tbody></table>
@@ -1,18 +1,18 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [SeekTime](./player.seektime.md) &gt; [render](./player.seektime.render.md)
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [SeekTimeSettings](./player.seektimesettings.md)
4
4
 
5
- ## SeekTime.render() method
5
+ ## SeekTimeSettings type
6
6
 
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
9
9
 
10
+ Configuration options for the SeekTime plugin.
11
+
10
12
  **Signature:**
11
13
 
12
14
  ```typescript
13
- render(): this;
15
+ export type SeekTimeSettings = {
16
+ duration?: boolean;
17
+ };
14
18
  ```
15
- **Returns:**
16
-
17
- this
18
-