@gcorevideo/player 2.24.11 → 2.24.14
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/README.md +1 -0
- package/assets/dvr-controls/dvr_controls.scss +35 -73
- package/assets/dvr-controls/index.ejs +8 -2
- package/assets/media-control/width370.scss +1 -1
- package/dist/core.js +18 -17
- package/dist/index.css +867 -896
- package/dist/index.embed.js +91 -65
- package/dist/index.js +156 -128
- package/dist/player.d.ts +3264 -0
- package/lib/playback/dash-playback/DashPlayback.d.ts +2 -0
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +17 -11
- package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
- package/lib/playback/hls-playback/HlsPlayback.js +0 -5
- package/lib/plugins/audio-selector/AudioTracks.js +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +1 -1
- package/lib/plugins/clips/Clips.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +3 -3
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +14 -12
- package/lib/plugins/media-control/MediaControl.d.ts +14 -5
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +55 -29
- package/lib/plugins/picture-in-picture/PictureInPicture.js +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +1 -1
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +2 -0
- package/package.json +1 -1
- package/src/playback/dash-playback/DashPlayback.ts +20 -13
- package/src/playback/hls-playback/HlsPlayback.ts +3 -8
- package/src/plugins/audio-selector/AudioTracks.ts +1 -1
- package/src/plugins/audio-selector/__tests__/AudioTracks.test.ts +2 -2
- package/src/plugins/bottom-gear/BottomGear.ts +1 -1
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +2 -2
- package/src/plugins/clips/Clips.ts +1 -1
- package/src/plugins/clips/__tests__/Clips.test.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +14 -14
- package/src/plugins/dvr-controls/__tests__/DvrControls.test.ts +20 -17
- package/src/plugins/dvr-controls/__tests__/__snapshots__/DvrControls.test.ts.snap +4 -2
- package/src/plugins/media-control/MediaControl.ts +69 -35
- package/src/plugins/media-control/__tests__/MediaControl.test.ts +128 -112
- package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +227 -24
- package/src/plugins/picture-in-picture/PictureInPicture.ts +1 -1
- package/src/plugins/subtitles/ClosedCaptions.ts +1 -1
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +1 -1
- package/src/testUtils.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`MediaControl > mount >
|
|
3
|
+
exports[`MediaControl > mount > base > should attach node to DOM tree 1`] = `
|
|
4
4
|
"<div class="media-control-background" data-background=""></div>
|
|
5
5
|
|
|
6
6
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -18,6 +18,8 @@ exports[`MediaControl > mount > audiotracks > should put the element in the righ
|
|
|
18
18
|
|
|
19
19
|
<div class="media-control-left-panel" data-media-control="">
|
|
20
20
|
|
|
21
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
22
|
+
|
|
21
23
|
<div class="drawer-container" data-volume="">
|
|
22
24
|
<div class="drawer-icon-container" data-volume="">
|
|
23
25
|
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
@@ -35,11 +37,19 @@ exports[`MediaControl > mount > audiotracks > should put the element in the righ
|
|
|
35
37
|
|
|
36
38
|
</div>
|
|
37
39
|
|
|
40
|
+
<div class="media-control-indicator gcore-skin-text-color" data-position="">00:00</div>
|
|
41
|
+
|
|
42
|
+
<div class="media-control-indicator gcore-skin-text-color" data-duration="">00:00</div>
|
|
43
|
+
|
|
38
44
|
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
39
45
|
|
|
40
46
|
</div>
|
|
41
47
|
|
|
42
48
|
|
|
49
|
+
<div class="media-control-center-panel" data-media-control="">
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
43
53
|
|
|
44
54
|
<div class="media-control-right-panel" data-media-control="">
|
|
45
55
|
|
|
@@ -49,13 +59,13 @@ exports[`MediaControl > mount > audiotracks > should put the element in the righ
|
|
|
49
59
|
|
|
50
60
|
<div class="media-control-vr" data-vr=""></div>
|
|
51
61
|
|
|
52
|
-
|
|
62
|
+
</div>
|
|
53
63
|
|
|
54
|
-
</div>
|
|
64
|
+
<div id="test-element">test</div></div>
|
|
55
65
|
<style>:root {}</style>"
|
|
56
66
|
`;
|
|
57
67
|
|
|
58
|
-
exports[`MediaControl > mount >
|
|
68
|
+
exports[`MediaControl > mount > center > should attach node to DOM tree 1`] = `
|
|
59
69
|
"<div class="media-control-background" data-background=""></div>
|
|
60
70
|
|
|
61
71
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -73,6 +83,8 @@ exports[`MediaControl > mount > cc > should put the element in the right panel 1
|
|
|
73
83
|
|
|
74
84
|
<div class="media-control-left-panel" data-media-control="">
|
|
75
85
|
|
|
86
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
87
|
+
|
|
76
88
|
<div class="drawer-container" data-volume="">
|
|
77
89
|
<div class="drawer-icon-container" data-volume="">
|
|
78
90
|
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
@@ -90,11 +102,19 @@ exports[`MediaControl > mount > cc > should put the element in the right panel 1
|
|
|
90
102
|
|
|
91
103
|
</div>
|
|
92
104
|
|
|
105
|
+
<div class="media-control-indicator gcore-skin-text-color" data-position="">00:00</div>
|
|
106
|
+
|
|
107
|
+
<div class="media-control-indicator gcore-skin-text-color" data-duration="">00:00</div>
|
|
108
|
+
|
|
93
109
|
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
94
110
|
|
|
95
111
|
</div>
|
|
96
112
|
|
|
97
113
|
|
|
114
|
+
<div class="media-control-center-panel" data-media-control="">
|
|
115
|
+
|
|
116
|
+
<div id="test-element">test</div></div>
|
|
117
|
+
|
|
98
118
|
|
|
99
119
|
<div class="media-control-right-panel" data-media-control="">
|
|
100
120
|
|
|
@@ -104,13 +124,13 @@ exports[`MediaControl > mount > cc > should put the element in the right panel 1
|
|
|
104
124
|
|
|
105
125
|
<div class="media-control-vr" data-vr=""></div>
|
|
106
126
|
|
|
107
|
-
|
|
127
|
+
</div>
|
|
108
128
|
|
|
109
129
|
</div>
|
|
110
130
|
<style>:root {}</style>"
|
|
111
131
|
`;
|
|
112
132
|
|
|
113
|
-
exports[`MediaControl > mount >
|
|
133
|
+
exports[`MediaControl > mount > left > should attach node to DOM tree 1`] = `
|
|
114
134
|
"<div class="media-control-background" data-background=""></div>
|
|
115
135
|
|
|
116
136
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -128,6 +148,8 @@ exports[`MediaControl > mount > gear > should put the element in the right panel
|
|
|
128
148
|
|
|
129
149
|
<div class="media-control-left-panel" data-media-control="">
|
|
130
150
|
|
|
151
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
152
|
+
|
|
131
153
|
<div class="drawer-container" data-volume="">
|
|
132
154
|
<div class="drawer-icon-container" data-volume="">
|
|
133
155
|
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
@@ -145,11 +167,19 @@ exports[`MediaControl > mount > gear > should put the element in the right panel
|
|
|
145
167
|
|
|
146
168
|
</div>
|
|
147
169
|
|
|
170
|
+
<div class="media-control-indicator gcore-skin-text-color" data-position="">00:00</div>
|
|
171
|
+
|
|
172
|
+
<div class="media-control-indicator gcore-skin-text-color" data-duration="">00:00</div>
|
|
173
|
+
|
|
148
174
|
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
149
175
|
|
|
150
|
-
</div>
|
|
176
|
+
<div id="test-element">test</div></div>
|
|
151
177
|
|
|
152
178
|
|
|
179
|
+
<div class="media-control-center-panel" data-media-control="">
|
|
180
|
+
|
|
181
|
+
</div>
|
|
182
|
+
|
|
153
183
|
|
|
154
184
|
<div class="media-control-right-panel" data-media-control="">
|
|
155
185
|
|
|
@@ -159,13 +189,13 @@ exports[`MediaControl > mount > gear > should put the element in the right panel
|
|
|
159
189
|
|
|
160
190
|
<div class="media-control-vr" data-vr=""></div>
|
|
161
191
|
|
|
162
|
-
|
|
192
|
+
</div>
|
|
163
193
|
|
|
164
194
|
</div>
|
|
165
195
|
<style>:root {}</style>"
|
|
166
196
|
`;
|
|
167
197
|
|
|
168
|
-
exports[`MediaControl > mount >
|
|
198
|
+
exports[`MediaControl > mount > right > should attach node to DOM tree 1`] = `
|
|
169
199
|
"<div class="media-control-background" data-background=""></div>
|
|
170
200
|
|
|
171
201
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -183,6 +213,8 @@ exports[`MediaControl > mount > pip > should put the element in the right panel
|
|
|
183
213
|
|
|
184
214
|
<div class="media-control-left-panel" data-media-control="">
|
|
185
215
|
|
|
216
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
217
|
+
|
|
186
218
|
<div class="drawer-container" data-volume="">
|
|
187
219
|
<div class="drawer-icon-container" data-volume="">
|
|
188
220
|
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
@@ -200,11 +232,19 @@ exports[`MediaControl > mount > pip > should put the element in the right panel
|
|
|
200
232
|
|
|
201
233
|
</div>
|
|
202
234
|
|
|
235
|
+
<div class="media-control-indicator gcore-skin-text-color" data-position="">00:00</div>
|
|
236
|
+
|
|
237
|
+
<div class="media-control-indicator gcore-skin-text-color" data-duration="">00:00</div>
|
|
238
|
+
|
|
203
239
|
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
204
240
|
|
|
205
241
|
</div>
|
|
206
242
|
|
|
207
243
|
|
|
244
|
+
<div class="media-control-center-panel" data-media-control="">
|
|
245
|
+
|
|
246
|
+
</div>
|
|
247
|
+
|
|
208
248
|
|
|
209
249
|
<div class="media-control-right-panel" data-media-control="">
|
|
210
250
|
|
|
@@ -214,13 +254,13 @@ exports[`MediaControl > mount > pip > should put the element in the right panel
|
|
|
214
254
|
|
|
215
255
|
<div class="media-control-vr" data-vr=""></div>
|
|
216
256
|
|
|
217
|
-
<div
|
|
257
|
+
<div id="test-element">test</div></div>
|
|
218
258
|
|
|
219
259
|
</div>
|
|
220
260
|
<style>:root {}</style>"
|
|
221
261
|
`;
|
|
222
262
|
|
|
223
|
-
exports[`MediaControl >
|
|
263
|
+
exports[`MediaControl > mount > root > should attach node to DOM tree 1`] = `
|
|
224
264
|
"<div class="media-control-background" data-background=""></div>
|
|
225
265
|
|
|
226
266
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -266,6 +306,71 @@ exports[`MediaControl > rendering timing > once metadata is loaded > should wait
|
|
|
266
306
|
</div>
|
|
267
307
|
|
|
268
308
|
|
|
309
|
+
<div class="media-control-center-panel" data-media-control="">
|
|
310
|
+
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
<div class="media-control-right-panel" data-media-control="">
|
|
315
|
+
|
|
316
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color" data-fullscreen="" aria-label="fullscreen">/assets/icons/new/fullscreen-off.svg</button>
|
|
317
|
+
|
|
318
|
+
<div class="media-control-multicamera" data-multicamera=""></div>
|
|
319
|
+
|
|
320
|
+
<div class="media-control-vr" data-vr=""></div>
|
|
321
|
+
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
</div>
|
|
325
|
+
<style>:root {}</style><div id="test-element">test</div>"
|
|
326
|
+
`;
|
|
327
|
+
|
|
328
|
+
exports[`MediaControl > rendering timing > once metadata is loaded > should wait a delay before rendering anything 1`] = `
|
|
329
|
+
"<div class="media-control-background" data-background=""></div>
|
|
330
|
+
|
|
331
|
+
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
<div class="media-control-left-panel" data-media-control="">
|
|
345
|
+
|
|
346
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
347
|
+
|
|
348
|
+
<div class="drawer-container" data-volume="">
|
|
349
|
+
<div class="drawer-icon-container" data-volume="">
|
|
350
|
+
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
351
|
+
<span class="drawer-text" data-volume=""></span>
|
|
352
|
+
</div>
|
|
353
|
+
|
|
354
|
+
<div class="bar-container volume-bar-hide" data-volume="">
|
|
355
|
+
<div class="bar-background" data-volume="">
|
|
356
|
+
<div class="bar-fill-1 gcore-skin-main-color" data-volume="" style="width: 100%;"></div>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="bar-scrubber" data-volume="" style="left: 100%;">
|
|
359
|
+
<div class="bar-scrubber-icon gcore-skin-main-color" data-volume=""></div>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
|
|
363
|
+
</div>
|
|
364
|
+
|
|
365
|
+
<div class="media-control-indicator gcore-skin-text-color" data-position="">00:00</div>
|
|
366
|
+
|
|
367
|
+
<div class="media-control-indicator gcore-skin-text-color" data-duration="">00:00</div>
|
|
368
|
+
|
|
369
|
+
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
370
|
+
|
|
371
|
+
</div>
|
|
372
|
+
|
|
373
|
+
|
|
269
374
|
<div class="media-control-center-panel" data-media-control="">
|
|
270
375
|
|
|
271
376
|
<div class="bar-container" data-seekbar="">
|
|
@@ -366,7 +471,7 @@ exports[`MediaControl > seekbar > should render 1`] = `
|
|
|
366
471
|
<style>:root {}</style>"
|
|
367
472
|
`;
|
|
368
473
|
|
|
369
|
-
exports[`MediaControl >
|
|
474
|
+
exports[`MediaControl > slot > audiotracks > should put the element in the right panel 1`] = `
|
|
370
475
|
"<div class="media-control-background" data-background=""></div>
|
|
371
476
|
|
|
372
477
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -384,8 +489,6 @@ exports[`MediaControl > updateSettings > dvr > when disabled > should disable DV
|
|
|
384
489
|
|
|
385
490
|
<div class="media-control-left-panel" data-media-control="">
|
|
386
491
|
|
|
387
|
-
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
388
|
-
|
|
389
492
|
<div class="drawer-container" data-volume="">
|
|
390
493
|
<div class="drawer-icon-container" data-volume="">
|
|
391
494
|
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
@@ -403,9 +506,60 @@ exports[`MediaControl > updateSettings > dvr > when disabled > should disable DV
|
|
|
403
506
|
|
|
404
507
|
</div>
|
|
405
508
|
|
|
406
|
-
<div class="media-control-indicator gcore-skin-text-color" data-
|
|
509
|
+
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
510
|
+
|
|
511
|
+
</div>
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
<div class="media-control-right-panel" data-media-control="">
|
|
516
|
+
|
|
517
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color" data-fullscreen="" aria-label="fullscreen">/assets/icons/new/fullscreen-off.svg</button>
|
|
518
|
+
|
|
519
|
+
<div class="media-control-multicamera" data-multicamera=""></div>
|
|
520
|
+
|
|
521
|
+
<div class="media-control-vr" data-vr=""></div>
|
|
522
|
+
|
|
523
|
+
<div class="my-media-control" data-audiotracks="">test</div></div>
|
|
524
|
+
|
|
525
|
+
</div>
|
|
526
|
+
<style>:root {}</style>"
|
|
527
|
+
`;
|
|
528
|
+
|
|
529
|
+
exports[`MediaControl > slot > cc > should put the element in the right panel 1`] = `
|
|
530
|
+
"<div class="media-control-background" data-background=""></div>
|
|
531
|
+
|
|
532
|
+
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
407
538
|
|
|
408
|
-
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
<div class="media-control-left-panel" data-media-control="">
|
|
546
|
+
|
|
547
|
+
<div class="drawer-container" data-volume="">
|
|
548
|
+
<div class="drawer-icon-container" data-volume="">
|
|
549
|
+
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
550
|
+
<span class="drawer-text" data-volume=""></span>
|
|
551
|
+
</div>
|
|
552
|
+
|
|
553
|
+
<div class="bar-container" data-volume="">
|
|
554
|
+
<div class="bar-background" data-volume="">
|
|
555
|
+
<div class="bar-fill-1 gcore-skin-main-color" data-volume="" style="width: 100%;"></div>
|
|
556
|
+
</div>
|
|
557
|
+
<div class="bar-scrubber" data-volume="" style="left: 100%;">
|
|
558
|
+
<div class="bar-scrubber-icon gcore-skin-main-color" data-volume=""></div>
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
</div>
|
|
409
563
|
|
|
410
564
|
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
411
565
|
|
|
@@ -421,13 +575,13 @@ exports[`MediaControl > updateSettings > dvr > when disabled > should disable DV
|
|
|
421
575
|
|
|
422
576
|
<div class="media-control-vr" data-vr=""></div>
|
|
423
577
|
|
|
424
|
-
</div>
|
|
578
|
+
<div class="my-media-control" data-cc="">test</div></div>
|
|
425
579
|
|
|
426
580
|
</div>
|
|
427
581
|
<style>:root {}</style>"
|
|
428
582
|
`;
|
|
429
583
|
|
|
430
|
-
exports[`MediaControl >
|
|
584
|
+
exports[`MediaControl > slot > gear > should put the element in the right panel 1`] = `
|
|
431
585
|
"<div class="media-control-background" data-background=""></div>
|
|
432
586
|
|
|
433
587
|
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
@@ -445,8 +599,6 @@ exports[`MediaControl > updateSettings > dvr > when enabled > should enable DVR
|
|
|
445
599
|
|
|
446
600
|
<div class="media-control-left-panel" data-media-control="">
|
|
447
601
|
|
|
448
|
-
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color paused" data-playpause="" aria-label="playpause">/assets/icons/new/play.svg</button>
|
|
449
|
-
|
|
450
602
|
<div class="drawer-container" data-volume="">
|
|
451
603
|
<div class="drawer-icon-container" data-volume="">
|
|
452
604
|
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
@@ -464,13 +616,64 @@ exports[`MediaControl > updateSettings > dvr > when enabled > should enable DVR
|
|
|
464
616
|
|
|
465
617
|
</div>
|
|
466
618
|
|
|
467
|
-
<div class="media-control-indicator gcore-skin-text-color" data-
|
|
619
|
+
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
620
|
+
|
|
621
|
+
</div>
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
<div class="media-control-right-panel" data-media-control="">
|
|
626
|
+
|
|
627
|
+
<button type="button" class="media-control-button media-control-icon gcore-skin-button-color" data-fullscreen="" aria-label="fullscreen">/assets/icons/new/fullscreen-off.svg</button>
|
|
628
|
+
|
|
629
|
+
<div class="media-control-multicamera" data-multicamera=""></div>
|
|
630
|
+
|
|
631
|
+
<div class="media-control-vr" data-vr=""></div>
|
|
632
|
+
|
|
633
|
+
<div class="my-media-control" data-gear="">test</div></div>
|
|
634
|
+
|
|
635
|
+
</div>
|
|
636
|
+
<style>:root {}</style>"
|
|
637
|
+
`;
|
|
638
|
+
|
|
639
|
+
exports[`MediaControl > slot > pip > should put the element in the right panel 1`] = `
|
|
640
|
+
"<div class="media-control-background" data-background=""></div>
|
|
641
|
+
|
|
642
|
+
<div class="media-control-layer gcore-skin-bg-color" data-controls="">
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
468
647
|
|
|
469
|
-
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
<div class="media-control-left-panel" data-media-control="">
|
|
656
|
+
|
|
657
|
+
<div class="drawer-container" data-volume="">
|
|
658
|
+
<div class="drawer-icon-container" data-volume="">
|
|
659
|
+
<div class="drawer-icon media-control-icon gcore-skin-button-color" data-volume="">/assets/icons/new/volume-max.svg</div>
|
|
660
|
+
<span class="drawer-text" data-volume=""></span>
|
|
661
|
+
</div>
|
|
662
|
+
|
|
663
|
+
<div class="bar-container" data-volume="">
|
|
664
|
+
<div class="bar-background" data-volume="">
|
|
665
|
+
<div class="bar-fill-1 gcore-skin-main-color" data-volume="" style="width: 100%;"></div>
|
|
666
|
+
</div>
|
|
667
|
+
<div class="bar-scrubber" data-volume="" style="left: 100%;">
|
|
668
|
+
<div class="bar-scrubber-icon gcore-skin-main-color" data-volume=""></div>
|
|
669
|
+
</div>
|
|
670
|
+
</div>
|
|
671
|
+
|
|
672
|
+
</div>
|
|
470
673
|
|
|
471
674
|
<div class="media-control-indicator gcore-skin-text-color" data-clips=""></div>
|
|
472
675
|
|
|
473
|
-
|
|
676
|
+
</div>
|
|
474
677
|
|
|
475
678
|
|
|
476
679
|
|
|
@@ -482,7 +685,7 @@ exports[`MediaControl > updateSettings > dvr > when enabled > should enable DVR
|
|
|
482
685
|
|
|
483
686
|
<div class="media-control-vr" data-vr=""></div>
|
|
484
687
|
|
|
485
|
-
</div>
|
|
688
|
+
<div class="my-media-control" data-pip="">test</div></div>
|
|
486
689
|
|
|
487
690
|
</div>
|
|
488
691
|
<style>:root {}</style>"
|
|
@@ -61,7 +61,7 @@ describe('ClosedCaptions', () => {
|
|
|
61
61
|
it('should render', () => {
|
|
62
62
|
expect(cc.el.innerHTML).toMatchSnapshot()
|
|
63
63
|
expect(cc.$el.find('#cc-button').length).toEqual(1)
|
|
64
|
-
expect(mediaControl.
|
|
64
|
+
expect(mediaControl.slot).toHaveBeenCalledWith('cc', cc.$el)
|
|
65
65
|
})
|
|
66
66
|
describe('when button is clicked', () => {
|
|
67
67
|
beforeEach(() => {
|
package/src/testUtils.ts
CHANGED
|
@@ -128,6 +128,8 @@ export function createMockMediaControl(core: any) {
|
|
|
128
128
|
// @ts-ignore
|
|
129
129
|
mediaControl.mount = vi.fn()
|
|
130
130
|
// @ts-ignore
|
|
131
|
+
mediaControl.slot = vi.fn()
|
|
132
|
+
// @ts-ignore
|
|
131
133
|
mediaControl.container = core.activeContainer
|
|
132
134
|
// @ts-ignore
|
|
133
135
|
mediaControl.getAvailableHeight = vi.fn().mockReturnValue(300)
|