@gcorevideo/player 2.25.6 → 2.25.8
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/assets/audio-tracks/template.ejs +5 -4
- package/assets/bottom-gear/gear-sub-menu.scss +4 -9
- package/assets/bottom-gear/gear.scss +1 -2
- package/assets/media-control/container.scss +0 -13
- package/assets/media-control/media-control.scss +110 -8
- package/assets/media-control/width270.scss +3 -9
- package/assets/media-control/width370.scss +6 -40
- package/assets/multi-camera/style.scss +0 -5
- package/assets/picture-in-picture/style.scss +1 -2
- package/assets/subtitles/combobox.ejs +27 -6
- package/assets/subtitles/string.ejs +1 -1
- package/assets/subtitles/style.scss +16 -69
- package/dist/core.js +1 -1
- package/dist/index.css +1019 -1117
- package/dist/index.embed.js +180 -123
- package/dist/index.js +161 -107
- package/lib/plugins/audio-selector/AudioTracks.d.ts +4 -3
- package/lib/plugins/audio-selector/AudioTracks.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioTracks.js +41 -23
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +3 -4
- package/lib/plugins/media-control/MediaControl.d.ts +4 -0
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +8 -1
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +7 -4
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +64 -34
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +2 -0
- package/package.json +1 -1
- package/src/plugins/audio-selector/AudioTracks.ts +53 -29
- package/src/plugins/audio-selector/__tests__/AudioTracks.test.ts +60 -45
- package/src/plugins/audio-selector/__tests__/__snapshots__/AudioSelector.test.ts.snap +24 -24
- package/src/plugins/audio-selector/__tests__/__snapshots__/AudioTracks.test.ts.snap +21 -18
- package/src/plugins/bottom-gear/BottomGear.ts +3 -4
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +11 -1
- package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +6 -6
- package/src/plugins/subtitles/ClosedCaptions.ts +66 -35
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +220 -35
- package/src/plugins/subtitles/__tests__/__snapshots__/ClosedCaptions.test.ts.snap +8 -19
- package/src/testUtils.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/assets/audio-tracks/style.scss +0 -111
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
<button
|
|
2
|
-
<span class=
|
|
1
|
+
<button class='gcore-skin-button-color media-control-dd' id="gplayer-audiotracks-button" aria-haspopup="menu" aria-expanded="false">
|
|
2
|
+
<span class="media-control-dd__text" id="gplayer-audiotracks-button-text"><%= title %></span>
|
|
3
|
+
<span class="media-control-dd__arrow"><%= icon %></span>
|
|
3
4
|
</button>
|
|
4
|
-
<ul class=
|
|
5
|
+
<ul class="gcore-skin-bg-color menu media-control-dd__popup" id="gplayer-audiotracks-menu" role="menu">
|
|
5
6
|
<% for (const track of tracks) { %>
|
|
6
7
|
<li>
|
|
7
|
-
<a href="#" class=
|
|
8
|
+
<a href="#" class="gcore-skin-text-color" data-item="<%= track.id %>" role="menuitemradio" aria-checked="<%= track.id === current %>">
|
|
8
9
|
<%= track.label %>
|
|
9
10
|
</a>
|
|
10
11
|
</li>
|
|
@@ -33,25 +33,20 @@
|
|
|
33
33
|
font-size: 12px;
|
|
34
34
|
text-align: left;
|
|
35
35
|
|
|
36
|
-
&[data-title] {
|
|
37
|
-
background-color: #c3c2c2;
|
|
38
|
-
padding: 5px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
36
|
a {
|
|
42
37
|
display: block;
|
|
43
38
|
text-decoration: none;
|
|
44
|
-
height:
|
|
39
|
+
height: 30px;
|
|
45
40
|
padding: 5px 10px;
|
|
46
41
|
line-height: 22px;
|
|
47
|
-
color:
|
|
42
|
+
color: var(--gplayer-mc-text-dim-color);
|
|
48
43
|
|
|
49
44
|
&:hover {
|
|
50
|
-
color:
|
|
45
|
+
color: var(--gplayer-mc-text-color);
|
|
51
46
|
background-color: rgb(0 0 0 / 40%);
|
|
52
47
|
|
|
53
48
|
a {
|
|
54
|
-
color:
|
|
49
|
+
color: var(--gplayer-mc-text-color);
|
|
55
50
|
text-decoration: none;
|
|
56
51
|
}
|
|
57
52
|
}
|
|
@@ -16,19 +16,6 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.cc-line {
|
|
20
|
-
position: absolute;
|
|
21
|
-
bottom: calc(var(--bottom-panel) + 5px);
|
|
22
|
-
width: 100%;
|
|
23
|
-
|
|
24
|
-
p {
|
|
25
|
-
width: auto;
|
|
26
|
-
background-color: rgb(0 0 0 / 40%);
|
|
27
|
-
color: white;
|
|
28
|
-
display: inline-block;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
19
|
.player-poster .circle-poster {
|
|
33
20
|
top: 50%;
|
|
34
21
|
margin-top: -60px;
|
|
@@ -6,13 +6,16 @@
|
|
|
6
6
|
:root {
|
|
7
7
|
--font-size-media-controls: 14px;
|
|
8
8
|
--font-size-media-controls-dropdown: 16px;
|
|
9
|
+
--gplayer-mc-font-size-dropdown: 16px;
|
|
9
10
|
--player-vod-color: #005aff;
|
|
10
11
|
--player-dvr-color: #fff;
|
|
11
12
|
--player-live-color: #ff0101;
|
|
12
13
|
--player-seekbar-current-color: #ff5700;
|
|
13
14
|
--player-seekbar-buffer-color: #fff;
|
|
14
15
|
--gplayer-mc-text-color: #fff;
|
|
15
|
-
--gplayer-mc-
|
|
16
|
+
--gplayer-mc-text-dim-color: #fffffe;
|
|
17
|
+
--gplayer-mc-popup-border-color: rgb(255 255 255 / 10%);
|
|
18
|
+
--gplayer-mc-popup-bg: rgb(74 74 74 / 60%);
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
.media-control-skin-1 {
|
|
@@ -86,10 +89,15 @@
|
|
|
86
89
|
|
|
87
90
|
.media-control-button,
|
|
88
91
|
.media-control-indicator,
|
|
89
|
-
.
|
|
92
|
+
.media-control-item {
|
|
90
93
|
order: 50;
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
.media-control-item {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
|
100
|
+
|
|
93
101
|
[data-playpause],
|
|
94
102
|
[data-playstop] {
|
|
95
103
|
order: 1;
|
|
@@ -121,7 +129,6 @@
|
|
|
121
129
|
|
|
122
130
|
@media (max-width: 420px) {
|
|
123
131
|
gap: 0.5rem;
|
|
124
|
-
overflow: hidden;
|
|
125
132
|
}
|
|
126
133
|
}
|
|
127
134
|
|
|
@@ -179,7 +186,6 @@
|
|
|
179
186
|
}
|
|
180
187
|
|
|
181
188
|
.media-control-indicator {
|
|
182
|
-
|
|
183
189
|
&[data-position],
|
|
184
190
|
&[data-duration] {
|
|
185
191
|
display: flex;
|
|
@@ -393,10 +399,6 @@
|
|
|
393
399
|
}
|
|
394
400
|
}
|
|
395
401
|
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/* TODO distribute between plugins' styles */
|
|
399
|
-
.media-control-skin-1 {
|
|
400
402
|
.seek-time {
|
|
401
403
|
height: 26px;
|
|
402
404
|
line-height: 26px;
|
|
@@ -415,6 +417,106 @@
|
|
|
415
417
|
padding-right: 8px;
|
|
416
418
|
}
|
|
417
419
|
}
|
|
420
|
+
|
|
421
|
+
.media-control-dd {
|
|
422
|
+
display: flex;
|
|
423
|
+
height: 32px;
|
|
424
|
+
line-height: 32px;
|
|
425
|
+
align-items: baseline;
|
|
426
|
+
gap: 4px;
|
|
427
|
+
vertical-align: baseline;
|
|
428
|
+
padding: 0;
|
|
429
|
+
|
|
430
|
+
background-color: transparent;
|
|
431
|
+
color: var(--gplayer-mc-text-color);
|
|
432
|
+
-webkit-font-smoothing: antialiased;
|
|
433
|
+
border: none;
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
|
|
436
|
+
&__text {
|
|
437
|
+
text-overflow: ellipsis;
|
|
438
|
+
overflow: hidden;
|
|
439
|
+
white-space: nowrap;
|
|
440
|
+
max-width: 100px;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
&.changing {
|
|
444
|
+
animation: pulse 0.5s infinite alternate;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
svg {
|
|
448
|
+
fill: var(--gplayer-mc-text-color);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
&__arrow {
|
|
452
|
+
width: 9px;
|
|
453
|
+
height: 6px;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&__wrap {
|
|
457
|
+
position: relative; // for menu positioning
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
&__popup {
|
|
461
|
+
// max-width: 114px;
|
|
462
|
+
max-width: 200px;
|
|
463
|
+
list-style-type: none;
|
|
464
|
+
position: absolute;
|
|
465
|
+
box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
|
|
466
|
+
border: none;
|
|
467
|
+
min-width: 60px;
|
|
468
|
+
border-radius: 4px;
|
|
469
|
+
bottom: 40px;
|
|
470
|
+
right: -2px;
|
|
471
|
+
overflow-x: hidden;
|
|
472
|
+
overflow-y: auto;
|
|
473
|
+
|
|
474
|
+
padding: 5px 0;
|
|
475
|
+
|
|
476
|
+
li {
|
|
477
|
+
font-size: var(--gplayer-mc-font-size-dropdown);
|
|
478
|
+
text-align: right;
|
|
479
|
+
height: 30px;
|
|
480
|
+
|
|
481
|
+
a {
|
|
482
|
+
display: block;
|
|
483
|
+
text-decoration: none;
|
|
484
|
+
text-overflow: ellipsis;
|
|
485
|
+
overflow: hidden;
|
|
486
|
+
white-space: nowrap;
|
|
487
|
+
|
|
488
|
+
// height: 30px;
|
|
489
|
+
padding: 5px 10px;
|
|
490
|
+
line-height: 20px;
|
|
491
|
+
color: #fffffe; // TODO color var
|
|
492
|
+
|
|
493
|
+
&:hover {
|
|
494
|
+
text-decoration: none;
|
|
495
|
+
background-color: rgb(0 0 0 / 40%);
|
|
496
|
+
color: var(--gplayer-mc-text-color);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
&.current a {
|
|
501
|
+
color: #f00;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
&:first-child {
|
|
505
|
+
a {
|
|
506
|
+
border-bottom-left-radius: 4px;
|
|
507
|
+
border-bottom-right-radius: 4px;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
&:last-child {
|
|
512
|
+
a {
|
|
513
|
+
border-top-left-radius: 4px;
|
|
514
|
+
border-top-right-radius: 4px;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
418
520
|
}
|
|
419
521
|
|
|
420
522
|
@keyframes pulse {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
.media-control-skin-1.w270 {
|
|
2
|
-
|
|
3
|
-
.media-control-quality,
|
|
4
|
-
.media-control-audiotracks {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
2
|
.media-control-layer[data-controls] {
|
|
9
3
|
.drawer-container[data-volume] {
|
|
10
4
|
.bar-container[data-volume] {
|
|
@@ -13,17 +7,14 @@
|
|
|
13
7
|
display: block;
|
|
14
8
|
position: absolute;
|
|
15
9
|
|
|
16
|
-
/* bottom: 12px; */
|
|
17
10
|
margin: 0;
|
|
18
11
|
top: -40px;
|
|
19
12
|
padding: 0;
|
|
20
13
|
|
|
21
|
-
/* right: 20px; */
|
|
22
14
|
margin-left: -32px;
|
|
23
15
|
margin-top: -3px;
|
|
24
16
|
width: 80px;
|
|
25
17
|
|
|
26
|
-
/* padding-left: 12px; */
|
|
27
18
|
.bar-background-mask {
|
|
28
19
|
position: absolute;
|
|
29
20
|
width: 100%;
|
|
@@ -48,4 +39,7 @@
|
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
}
|
|
42
|
+
.media-control-dd__popup {
|
|
43
|
+
max-width: 114px;
|
|
44
|
+
}
|
|
51
45
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.media-control-skin-1.w370 {
|
|
2
|
+
// TODO -> cc stylesheet
|
|
2
3
|
.media-control-cc {
|
|
3
4
|
width: 28px;
|
|
4
5
|
|
|
@@ -26,48 +27,10 @@
|
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
.media-control-quality
|
|
30
|
-
.media-control-audiotracks {
|
|
30
|
+
.media-control-quality {
|
|
31
31
|
display: block;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// .level-selector[data-level-selector],
|
|
35
|
-
.media-control-audiotracks[data-audiotracks] {
|
|
36
|
-
margin-top: 3px;
|
|
37
|
-
margin-right: 10px;
|
|
38
|
-
|
|
39
|
-
ul {
|
|
40
|
-
bottom: 30px;
|
|
41
|
-
width: 50px;
|
|
42
|
-
|
|
43
|
-
li {
|
|
44
|
-
height: 23px;
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
|
|
47
|
-
a {
|
|
48
|
-
height: 23px;
|
|
49
|
-
padding: 2px 5px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
button[data-audiotracks-button] {
|
|
55
|
-
|
|
56
|
-
.quality-text,
|
|
57
|
-
.audio-text {
|
|
58
|
-
font-size: 13px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
span.quality-arrow,
|
|
62
|
-
span.audio-arrow {
|
|
63
|
-
width: 7px;
|
|
64
|
-
height: 5px;
|
|
65
|
-
margin-left: 4px;
|
|
66
|
-
margin-top: 11px;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
34
|
.media-control-multicamera {
|
|
72
35
|
.multicamera {
|
|
73
36
|
margin-top: 0;
|
|
@@ -180,8 +143,11 @@
|
|
|
180
143
|
}
|
|
181
144
|
|
|
182
145
|
.media-control-button,
|
|
183
|
-
.
|
|
146
|
+
.media-control-item {
|
|
184
147
|
height: 32px;
|
|
185
148
|
}
|
|
186
149
|
}
|
|
150
|
+
.media-control-dd__popup {
|
|
151
|
+
max-width: 150px;
|
|
152
|
+
}
|
|
187
153
|
}
|
|
@@ -1,14 +1,35 @@
|
|
|
1
|
-
<button
|
|
2
|
-
|
|
1
|
+
<button
|
|
2
|
+
class='media-control-button media-control-icon gcore-skin-button-color media-control-dd'
|
|
3
|
+
id="gplayer-cc-button"
|
|
4
|
+
aria-haspopup="menu"
|
|
5
|
+
aria-expanded="false"
|
|
6
|
+
aria-controls="gplayer-cc-menu"
|
|
7
|
+
>
|
|
3
8
|
</button>
|
|
4
9
|
|
|
5
|
-
<ul class='gcore-skin-bg-color' id="cc-
|
|
10
|
+
<ul class='gcore-skin-bg-color media-control-dd__popup' id="gplayer-cc-menu" role="menu">
|
|
6
11
|
<% for (const t of tracks) { %>
|
|
7
12
|
<li>
|
|
8
|
-
<a
|
|
13
|
+
<a
|
|
14
|
+
href="#"
|
|
15
|
+
class="gcore-skin-text-color"
|
|
16
|
+
data-item="<%= t.id %>"
|
|
17
|
+
role="menuitemradio"
|
|
18
|
+
aria-checked="<%= t.id === current %>"
|
|
19
|
+
>
|
|
9
20
|
<%= t.name %>
|
|
10
21
|
</a>
|
|
11
22
|
</li>
|
|
12
23
|
<% } %>
|
|
13
|
-
<li
|
|
14
|
-
|
|
24
|
+
<li class="current">
|
|
25
|
+
<a
|
|
26
|
+
href="#"
|
|
27
|
+
class='gcore-skin-text-color gcore-skin-active'
|
|
28
|
+
data-item="-1"
|
|
29
|
+
role="menuitemradio"
|
|
30
|
+
aria-checked="<%= current === -1 %>"
|
|
31
|
+
>
|
|
32
|
+
<%= i18n.t('off') %>
|
|
33
|
+
</a>
|
|
34
|
+
</li>
|
|
35
|
+
</ul>
|
|
@@ -13,17 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
ul {
|
|
16
|
-
// TODO extract common styles
|
|
17
|
-
width: auto;
|
|
18
|
-
border-radius: 4px;
|
|
19
|
-
bottom: 52px;
|
|
20
|
-
margin-left: -28px;
|
|
21
|
-
|
|
22
16
|
li {
|
|
23
|
-
font-size: 16px;
|
|
24
17
|
text-align: center;
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
height: 30px;
|
|
27
18
|
|
|
28
19
|
a {
|
|
29
20
|
height: 30px;
|
|
@@ -59,65 +50,6 @@
|
|
|
59
50
|
.media-control-cc {
|
|
60
51
|
position: relative;
|
|
61
52
|
order: 85;
|
|
62
|
-
|
|
63
|
-
button {
|
|
64
|
-
background-color: transparent;
|
|
65
|
-
color: #fff;
|
|
66
|
-
-webkit-font-smoothing: antialiased;
|
|
67
|
-
border: none;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
|
|
70
|
-
.cc-text {
|
|
71
|
-
svg {
|
|
72
|
-
fill: white;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:hover {
|
|
77
|
-
color: #c9c9c9;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.changing {
|
|
81
|
-
animation: pulse 0.5s infinite alternate;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
ul {
|
|
86
|
-
width: 80px;
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
list-style-type: none;
|
|
89
|
-
position: absolute;
|
|
90
|
-
bottom: 25px;
|
|
91
|
-
border: none;
|
|
92
|
-
background-color: #e6e6e6;
|
|
93
|
-
padding: 8px 0;
|
|
94
|
-
box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
li {
|
|
98
|
-
a {
|
|
99
|
-
color: #444;
|
|
100
|
-
padding: 2px 10px;
|
|
101
|
-
display: block;
|
|
102
|
-
text-decoration: none;
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
background-color: #555;
|
|
106
|
-
color: white;
|
|
107
|
-
|
|
108
|
-
a {
|
|
109
|
-
color: white;
|
|
110
|
-
text-decoration: none;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&.current a {
|
|
116
|
-
color: #f00;
|
|
117
|
-
background-color: #555;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
}
|
|
121
53
|
}
|
|
122
54
|
}
|
|
123
55
|
|
|
@@ -128,4 +60,19 @@
|
|
|
128
60
|
// .ios-fullscreen::cue {
|
|
129
61
|
// visibility: visible !important;
|
|
130
62
|
// font-size: 1em !important;
|
|
131
|
-
// }
|
|
63
|
+
// }
|
|
64
|
+
|
|
65
|
+
.container {
|
|
66
|
+
.gplayer-cc-line {
|
|
67
|
+
position: absolute;
|
|
68
|
+
bottom: calc(var(--bottom-panel) + 5px);
|
|
69
|
+
width: 100%;
|
|
70
|
+
|
|
71
|
+
p {
|
|
72
|
+
width: auto;
|
|
73
|
+
background-color: rgb(0 0 0 / 40%);
|
|
74
|
+
color: white;
|
|
75
|
+
display: inline-block;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
package/dist/core.js
CHANGED
|
@@ -43228,7 +43228,7 @@ class Player {
|
|
|
43228
43228
|
}
|
|
43229
43229
|
}
|
|
43230
43230
|
|
|
43231
|
-
var version$1 = "2.25.
|
|
43231
|
+
var version$1 = "2.25.8";
|
|
43232
43232
|
|
|
43233
43233
|
var packages = {
|
|
43234
43234
|
"node_modules/@clappr/core": {
|