@gcorevideo/player 2.25.7 → 2.25.9

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 (33) hide show
  1. package/assets/bottom-gear/gear-sub-menu.scss +4 -9
  2. package/assets/media-control/container.scss +0 -13
  3. package/assets/media-control/media-control.scss +14 -12
  4. package/assets/media-control/width270.scss +3 -0
  5. package/assets/media-control/width370.scss +4 -0
  6. package/assets/multi-camera/style.scss +0 -5
  7. package/assets/subtitles/combobox.ejs +27 -6
  8. package/assets/subtitles/string.ejs +1 -1
  9. package/assets/subtitles/style.scss +16 -69
  10. package/dist/core.js +1 -1
  11. package/dist/index.css +1036 -1090
  12. package/dist/index.embed.js +139 -101
  13. package/dist/index.js +80 -46
  14. package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
  15. package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
  16. package/lib/plugins/bottom-gear/BottomGear.js +3 -4
  17. package/lib/plugins/media-control/MediaControl.d.ts +4 -0
  18. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  19. package/lib/plugins/media-control/MediaControl.js +7 -0
  20. package/lib/plugins/subtitles/ClosedCaptions.d.ts +8 -5
  21. package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
  22. package/lib/plugins/subtitles/ClosedCaptions.js +67 -38
  23. package/lib/testUtils.d.ts.map +1 -1
  24. package/lib/testUtils.js +2 -0
  25. package/package.json +1 -1
  26. package/src/plugins/bottom-gear/BottomGear.ts +3 -4
  27. package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +1 -1
  28. package/src/plugins/media-control/MediaControl.ts +10 -0
  29. package/src/plugins/subtitles/ClosedCaptions.ts +73 -39
  30. package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +220 -35
  31. package/src/plugins/subtitles/__tests__/__snapshots__/ClosedCaptions.test.ts.snap +8 -19
  32. package/src/testUtils.ts +2 -0
  33. package/tsconfig.tsbuildinfo +1 -1
@@ -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: 32px;
39
+ height: 30px;
45
40
  padding: 5px 10px;
46
41
  line-height: 22px;
47
- color: #fffffe;
42
+ color: var(--gplayer-mc-text-dim-color);
48
43
 
49
44
  &:hover {
50
- color: white;
45
+ color: var(--gplayer-mc-text-color);
51
46
  background-color: rgb(0 0 0 / 40%);
52
47
 
53
48
  a {
54
- color: white;
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;
@@ -13,6 +13,7 @@
13
13
  --player-seekbar-current-color: #ff5700;
14
14
  --player-seekbar-buffer-color: #fff;
15
15
  --gplayer-mc-text-color: #fff;
16
+ --gplayer-mc-text-dim-color: #fffffe;
16
17
  --gplayer-mc-popup-border-color: rgb(255 255 255 / 10%);
17
18
  --gplayer-mc-popup-bg: rgb(74 74 74 / 60%);
18
19
  }
@@ -185,7 +186,6 @@
185
186
  }
186
187
 
187
188
  .media-control-indicator {
188
-
189
189
  &[data-position],
190
190
  &[data-duration] {
191
191
  display: flex;
@@ -444,10 +444,13 @@
444
444
  animation: pulse 0.5s infinite alternate;
445
445
  }
446
446
 
447
+ svg {
448
+ fill: var(--gplayer-mc-text-color);
449
+ }
450
+
447
451
  &__arrow {
448
452
  width: 9px;
449
453
  height: 6px;
450
- // margin-left: 5px;
451
454
  }
452
455
 
453
456
  &__wrap {
@@ -455,7 +458,8 @@
455
458
  }
456
459
 
457
460
  &__popup {
458
- max-width: 114px;
461
+ // max-width: 114px;
462
+ max-width: 200px;
459
463
  list-style-type: none;
460
464
  position: absolute;
461
465
  box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
@@ -464,18 +468,16 @@
464
468
  border-radius: 4px;
465
469
  bottom: 40px;
466
470
  right: -2px;
467
- overflow: hidden;
471
+ overflow-x: hidden;
472
+ overflow-y: auto;
473
+
474
+ padding: 5px 0;
468
475
 
469
476
  li {
470
477
  font-size: var(--gplayer-mc-font-size-dropdown);
471
478
  text-align: right;
472
479
  height: 30px;
473
480
 
474
- &[data-title] {
475
- background-color: #c3c2c2;
476
- padding: 5px;
477
- }
478
-
479
481
  a {
480
482
  display: block;
481
483
  text-decoration: none;
@@ -483,15 +485,15 @@
483
485
  overflow: hidden;
484
486
  white-space: nowrap;
485
487
 
486
- height: 30px;
488
+ // height: 30px;
487
489
  padding: 5px 10px;
488
490
  line-height: 20px;
489
- color: #fffffe;
491
+ color: #fffffe; // TODO color var
490
492
 
491
493
  &:hover {
492
494
  text-decoration: none;
493
495
  background-color: rgb(0 0 0 / 40%);
494
- color: white;
496
+ color: var(--gplayer-mc-text-color);
495
497
  }
496
498
  }
497
499
 
@@ -39,4 +39,7 @@
39
39
  }
40
40
  }
41
41
  }
42
+ .media-control-dd__popup {
43
+ max-width: 114px;
44
+ }
42
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
 
@@ -146,4 +147,7 @@
146
147
  height: 32px;
147
148
  }
148
149
  }
150
+ .media-control-dd__popup {
151
+ max-width: 150px;
152
+ }
149
153
  }
@@ -136,11 +136,6 @@
136
136
  }
137
137
  }
138
138
 
139
- &[data-title] {
140
- background-color: #c3c2c2;
141
- padding: 5px;
142
- }
143
-
144
139
  a {
145
140
  color: #444;
146
141
  padding: 2px 10px;
@@ -1,14 +1,35 @@
1
- <button data-cc-button class='media-control-button media-control-icon gcore-skin-button-color' id="cc-button">
2
- <span class='cc-text'></span>
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-select">
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 href="#" class='gcore-skin-text-color' data-cc-select="<%= t.id %>">
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><a href="#" class='gcore-skin-text-color' data-cc-select="-1"><%= i18n.t('off') %></a></li>
14
- </ul>
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>
@@ -1,3 +1,3 @@
1
- <div class="cc-line" id="cc-line">
1
+ <div class="gplayer-cc-line" id="gplayer-cc-line">
2
2
  <p></p>
3
3
  </div>
@@ -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.7";
43231
+ var version$1 = "2.25.9";
43232
43232
 
43233
43233
  var packages = {
43234
43234
  "node_modules/@clappr/core": {