@gcorevideo/player 2.22.30 → 2.22.31

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 (49) 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/dist/core.js +1 -1
  6. package/dist/index.css +670 -671
  7. package/dist/index.js +68 -98
  8. package/dist/player.d.ts +63 -33
  9. package/docs/api/{player.seektime.bindevents.md → player.clapprstats.clearmetrics.md} +3 -3
  10. package/docs/api/player.clapprstats.md +14 -0
  11. package/docs/api/player.extendedevents.md +14 -0
  12. package/docs/api/player.md +13 -2
  13. package/docs/api/player.seektime.attributes.md +0 -1
  14. package/docs/api/player.seektime.md +6 -197
  15. package/docs/api/{player.seektime.render.md → player.seektimesettings.md} +7 -7
  16. package/docs/api/player.skiptime.md +3 -184
  17. package/lib/plugins/poster/Poster.d.ts +24 -14
  18. package/lib/plugins/poster/Poster.d.ts.map +1 -1
  19. package/lib/plugins/poster/Poster.js +67 -97
  20. package/lib/testUtils.d.ts +13 -39
  21. package/lib/testUtils.d.ts.map +1 -1
  22. package/lib/testUtils.js +14 -65
  23. package/package.json +1 -1
  24. package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +1 -1
  25. package/src/plugins/poster/Poster.ts +91 -110
  26. package/src/plugins/poster/__tests__/Poster.test.ts +119 -0
  27. package/src/plugins/poster/__tests__/__snapshots__/Poster.test.ts.snap +8 -0
  28. package/src/plugins/source-controller/__tests__/SourceController.test.ts +1 -2
  29. package/src/testUtils.ts +14 -86
  30. package/temp/player.api.json +295 -829
  31. package/tsconfig.tsbuildinfo +1 -1
  32. package/docs/api/player.seektime.durationshown.md +0 -14
  33. package/docs/api/player.seektime.getseektime.md +0 -20
  34. package/docs/api/player.seektime.islivestreamwithdvr.md +0 -14
  35. package/docs/api/player.seektime.mediacontrol.md +0 -14
  36. package/docs/api/player.seektime.mediacontrolcontainer.md +0 -14
  37. package/docs/api/player.seektime.shouldbevisible.md +0 -18
  38. package/docs/api/player.seektime.template.md +0 -14
  39. package/docs/api/player.seektime.update.md +0 -18
  40. package/docs/api/player.skiptime.attributes.md +0 -17
  41. package/docs/api/player.skiptime.bindevents.md +0 -18
  42. package/docs/api/player.skiptime.events.md +0 -18
  43. package/docs/api/player.skiptime.handlerewindclicks.md +0 -18
  44. package/docs/api/player.skiptime.render.md +0 -18
  45. package/docs/api/player.skiptime.setback.md +0 -18
  46. package/docs/api/player.skiptime.setforward.md +0 -18
  47. package/docs/api/player.skiptime.setmidclick.md +0 -18
  48. package/docs/api/player.skiptime.template.md +0 -14
  49. package/docs/api/player.skiptime.togglefullscreen.md +0 -18
@@ -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
-
@@ -7,14 +7,14 @@
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 skip controls to the media control UI.
10
+ `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
11
11
 
12
12
  **Signature:**
13
13
 
14
14
  ```typescript
15
- export declare class SkipTime extends UICorePluginOriginal
15
+ export declare class SkipTime extends UICorePlugin
16
16
  ```
17
- **Extends:** UICorePluginOriginal
17
+ **Extends:** UICorePlugin
18
18
 
19
19
  ## Properties
20
20
 
@@ -41,27 +41,6 @@ Description
41
41
  </th></tr></thead>
42
42
  <tbody><tr><td>
43
43
 
44
- [attributes](./player.skiptime.attributes.md)
45
-
46
-
47
- </td><td>
48
-
49
- `readonly`
50
-
51
-
52
- </td><td>
53
-
54
- { class: string; 'data-skip-time': string; }
55
-
56
-
57
- </td><td>
58
-
59
- **_(BETA)_**
60
-
61
-
62
- </td></tr>
63
- <tr><td>
64
-
65
44
  [container](./player.skiptime.container.md)
66
45
 
67
46
 
@@ -80,27 +59,6 @@ any
80
59
  **_(BETA)_**
81
60
 
82
61
 
83
- </td></tr>
84
- <tr><td>
85
-
86
- [events](./player.skiptime.events.md)
87
-
88
-
89
- </td><td>
90
-
91
- `readonly`
92
-
93
-
94
- </td><td>
95
-
96
- { 'click \[data-skip-left\]': string; 'click \[data-skip-mid\]': string; 'click \[data-skip-right\]': string; }
97
-
98
-
99
- </td><td>
100
-
101
- **_(BETA)_**
102
-
103
-
104
62
  </td></tr>
105
63
  <tr><td>
106
64
 
@@ -143,144 +101,5 @@ string
143
101
  **_(BETA)_**
144
102
 
145
103
 
146
- </td></tr>
147
- <tr><td>
148
-
149
- [template](./player.skiptime.template.md)
150
-
151
-
152
- </td><td>
153
-
154
- `readonly`
155
-
156
-
157
- </td><td>
158
-
159
- any
160
-
161
-
162
- </td><td>
163
-
164
- **_(BETA)_**
165
-
166
-
167
- </td></tr>
168
- </tbody></table>
169
-
170
- ## Methods
171
-
172
- <table><thead><tr><th>
173
-
174
- Method
175
-
176
-
177
- </th><th>
178
-
179
- Modifiers
180
-
181
-
182
- </th><th>
183
-
184
- Description
185
-
186
-
187
- </th></tr></thead>
188
- <tbody><tr><td>
189
-
190
- [bindEvents()](./player.skiptime.bindevents.md)
191
-
192
-
193
- </td><td>
194
-
195
-
196
- </td><td>
197
-
198
- **_(BETA)_**
199
-
200
-
201
- </td></tr>
202
- <tr><td>
203
-
204
- [handleRewindClicks()](./player.skiptime.handlerewindclicks.md)
205
-
206
-
207
- </td><td>
208
-
209
-
210
- </td><td>
211
-
212
- **_(BETA)_**
213
-
214
-
215
- </td></tr>
216
- <tr><td>
217
-
218
- [render()](./player.skiptime.render.md)
219
-
220
-
221
- </td><td>
222
-
223
-
224
- </td><td>
225
-
226
- **_(BETA)_**
227
-
228
-
229
- </td></tr>
230
- <tr><td>
231
-
232
- [setBack()](./player.skiptime.setback.md)
233
-
234
-
235
- </td><td>
236
-
237
-
238
- </td><td>
239
-
240
- **_(BETA)_**
241
-
242
-
243
- </td></tr>
244
- <tr><td>
245
-
246
- [setForward()](./player.skiptime.setforward.md)
247
-
248
-
249
- </td><td>
250
-
251
-
252
- </td><td>
253
-
254
- **_(BETA)_**
255
-
256
-
257
- </td></tr>
258
- <tr><td>
259
-
260
- [setMidClick()](./player.skiptime.setmidclick.md)
261
-
262
-
263
- </td><td>
264
-
265
-
266
- </td><td>
267
-
268
- **_(BETA)_**
269
-
270
-
271
- </td></tr>
272
- <tr><td>
273
-
274
- [toggleFullscreen()](./player.skiptime.togglefullscreen.md)
275
-
276
-
277
- </td><td>
278
-
279
-
280
- </td><td>
281
-
282
- **_(BETA)_**
283
-
284
-
285
104
  </td></tr>
286
105
  </tbody></table>
@@ -1,22 +1,34 @@
1
1
  import { UIContainerPlugin } from '@clappr/core';
2
2
  import '../../../assets/poster/poster.scss';
3
+ export type PosterPluginSettings = {
4
+ /**
5
+ * Custom CSS background
6
+ */
7
+ custom?: string;
8
+ /**
9
+ * Whether to show the poster image when the playback is noop (i.e., when there is no appropriate video playback engine for current media sources set or the media sources are not set at all)
10
+ */
11
+ showForNoOp?: boolean;
12
+ /**
13
+ * Poster image URL
14
+ */
15
+ url?: string;
16
+ /**
17
+ * Whether to show the poster after playback has ended @default true
18
+ */
19
+ showOnVideoEnd?: boolean;
20
+ };
3
21
  /**
4
22
  * `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
5
23
  * @beta
6
24
  * @remarks
7
- * When the playback is stopped, media control UI is disabled.
25
+ * When the playback is stopped or not yet started, the media control UI is disabled and hidden.
26
+ * Media control gets activated once the metadata is loaded after playback is initiated.
27
+ * This plugin displays a big play button on top of the poster image to allow user to start playback.
8
28
  * Note that the poster image, if specified via the player config, will be used to update video element's poster attribute by the
9
29
  * HTML5-video-based playback module.
10
30
  *
11
- * Configuration options:
12
- *
13
- * - `poster.custom` - custom CSS background
14
- *
15
- * - `poster.showForNoOp` - whether to show the poster when the playback is not started
16
- *
17
- * - `poster.url` - the URL of the poster image
18
- *
19
- * - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended
31
+ * Configuration options - {@link PosterPluginSettings}
20
32
  *
21
33
  * @example
22
34
  * ```ts
@@ -31,10 +43,9 @@ import '../../../assets/poster/poster.scss';
31
43
  */
32
44
  export declare class Poster extends UIContainerPlugin {
33
45
  private hasFatalError;
34
- private hasStartedPlaying;
46
+ private playing;
35
47
  private playRequested;
36
48
  private $playButton;
37
- private $playWrapper;
38
49
  /**
39
50
  * @internal
40
51
  */
@@ -47,12 +58,12 @@ export declare class Poster extends UIContainerPlugin {
47
58
  };
48
59
  private static readonly template;
49
60
  private get shouldRender();
61
+ private get isNoOp();
50
62
  /**
51
63
  * @internal
52
64
  */
53
65
  get attributes(): {
54
66
  class: string;
55
- 'data-poster': string;
56
67
  };
57
68
  /**
58
69
  * @internal
@@ -60,7 +71,6 @@ export declare class Poster extends UIContainerPlugin {
60
71
  get events(): {
61
72
  click: string;
62
73
  };
63
- private get showOnVideoEnd();
64
74
  /**
65
75
  * @internal
66
76
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Poster.d.ts","sourceRoot":"","sources":["../../../src/plugins/poster/Poster.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,iBAAiB,EAGlB,MAAM,cAAc,CAAA;AAMrB,OAAO,oCAAoC,CAAA;AAO3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,MAAO,SAAQ,iBAAiB;IAG3C,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,iBAAiB,CAAQ;IAEjC,OAAO,CAAC,aAAa,CAAQ;IAE7B,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