@gcorevideo/player 2.28.22 → 2.28.24
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/subtitles/style.scss +9 -8
- package/dist/core.js +1 -1
- package/dist/index.css +186 -176
- package/dist/index.embed.js +51 -22
- package/dist/index.js +45 -22
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +5 -2
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +40 -19
- package/lib/plugins/thumbnails/Thumbnails.js +4 -2
- package/package.json +1 -1
- package/src/plugins/subtitles/ClosedCaptions.ts +47 -32
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +4 -4
- package/src/plugins/thumbnails/Thumbnails.ts +4 -2
- package/src/plugins/thumbnails/__tests__/Thumbnails.test.ts +10 -0
- package/src/plugins/thumbnails/__tests__/__snapshots__/Thumbnails.test.ts.snap +9 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -53,14 +53,15 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
::cue {
|
|
57
|
+
visibility: hidden !important;
|
|
58
|
+
font-size: 0 !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ios-fullscreen::cue {
|
|
62
|
+
visibility: visible !important;
|
|
63
|
+
font-size: 1em !important;
|
|
64
|
+
}
|
|
64
65
|
|
|
65
66
|
.container {
|
|
66
67
|
.gplayer-cc-line {
|
package/dist/core.js
CHANGED
|
@@ -51319,7 +51319,7 @@ class Player {
|
|
|
51319
51319
|
}
|
|
51320
51320
|
}
|
|
51321
51321
|
|
|
51322
|
-
var version$1 = "2.28.
|
|
51322
|
+
var version$1 = "2.28.24";
|
|
51323
51323
|
|
|
51324
51324
|
var packages = {
|
|
51325
51325
|
"node_modules/@clappr/core": {
|
package/dist/index.css
CHANGED
|
@@ -171,6 +171,51 @@
|
|
|
171
171
|
}
|
|
172
172
|
.big-mute-icon[data-big-mute-icon]:hover svg path {
|
|
173
173
|
fill: #151515 !important;
|
|
174
|
+
}.media-control-skin-1 .media-control-item.media-control-gear {
|
|
175
|
+
order: 99;
|
|
176
|
+
}
|
|
177
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-wrapper {
|
|
178
|
+
position: absolute;
|
|
179
|
+
right: 16px;
|
|
180
|
+
bottom: 52px;
|
|
181
|
+
width: 250px;
|
|
182
|
+
min-height: 48px;
|
|
183
|
+
z-index: 9999;
|
|
184
|
+
border-radius: 4px;
|
|
185
|
+
box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
|
|
186
|
+
}
|
|
187
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-options-list {
|
|
188
|
+
padding: 8px 0;
|
|
189
|
+
}
|
|
190
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-option {
|
|
191
|
+
margin: 0;
|
|
192
|
+
text-align: left;
|
|
193
|
+
line-height: 22px;
|
|
194
|
+
padding: 5px 14px;
|
|
195
|
+
width: 250px;
|
|
196
|
+
font-size: 12px;
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
justify-content: flex-start;
|
|
200
|
+
gap: 8px;
|
|
201
|
+
}
|
|
202
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon {
|
|
203
|
+
flex: 24px 0 0;
|
|
204
|
+
height: 20px;
|
|
205
|
+
}
|
|
206
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon.hidden {
|
|
207
|
+
visibility: hidden;
|
|
208
|
+
display: inline-block;
|
|
209
|
+
}
|
|
210
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_label {
|
|
211
|
+
flex: 0 1 100%;
|
|
212
|
+
}
|
|
213
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_arrow-right-icon {
|
|
214
|
+
flex: 0 0 14px;
|
|
215
|
+
height: 20px;
|
|
216
|
+
}
|
|
217
|
+
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_value {
|
|
218
|
+
flex: 1 0 auto;
|
|
174
219
|
}*,
|
|
175
220
|
:focus,
|
|
176
221
|
:visited {
|
|
@@ -234,51 +279,6 @@
|
|
|
234
279
|
}
|
|
235
280
|
.gear-wrapper ul.gear-sub-menu li.current a .check-icon svg {
|
|
236
281
|
display: inline;
|
|
237
|
-
}.media-control-skin-1 .media-control-item.media-control-gear {
|
|
238
|
-
order: 99;
|
|
239
|
-
}
|
|
240
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-wrapper {
|
|
241
|
-
position: absolute;
|
|
242
|
-
right: 16px;
|
|
243
|
-
bottom: 52px;
|
|
244
|
-
width: 250px;
|
|
245
|
-
min-height: 48px;
|
|
246
|
-
z-index: 9999;
|
|
247
|
-
border-radius: 4px;
|
|
248
|
-
box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
|
|
249
|
-
}
|
|
250
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-options-list {
|
|
251
|
-
padding: 8px 0;
|
|
252
|
-
}
|
|
253
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-option {
|
|
254
|
-
margin: 0;
|
|
255
|
-
text-align: left;
|
|
256
|
-
line-height: 22px;
|
|
257
|
-
padding: 5px 14px;
|
|
258
|
-
width: 250px;
|
|
259
|
-
font-size: 12px;
|
|
260
|
-
display: flex;
|
|
261
|
-
align-items: center;
|
|
262
|
-
justify-content: flex-start;
|
|
263
|
-
gap: 8px;
|
|
264
|
-
}
|
|
265
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon {
|
|
266
|
-
flex: 24px 0 0;
|
|
267
|
-
height: 20px;
|
|
268
|
-
}
|
|
269
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon.hidden {
|
|
270
|
-
visibility: hidden;
|
|
271
|
-
display: inline-block;
|
|
272
|
-
}
|
|
273
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_label {
|
|
274
|
-
flex: 0 1 100%;
|
|
275
|
-
}
|
|
276
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_arrow-right-icon {
|
|
277
|
-
flex: 0 0 14px;
|
|
278
|
-
height: 20px;
|
|
279
|
-
}
|
|
280
|
-
.media-control-skin-1 .media-control-item.media-control-gear .gear-option_value {
|
|
281
|
-
flex: 1 0 auto;
|
|
282
282
|
}:root {
|
|
283
283
|
--primary-background-color: #000;
|
|
284
284
|
--secondary-background-color: #262626;
|
|
@@ -679,63 +679,6 @@
|
|
|
679
679
|
.context-menu .context-menu-list-item_icon {
|
|
680
680
|
width: 20px;
|
|
681
681
|
height: 20px;
|
|
682
|
-
}@charset "UTF-8";
|
|
683
|
-
.gplayer-mc-clips {
|
|
684
|
-
display: flex;
|
|
685
|
-
gap: 6px;
|
|
686
|
-
}
|
|
687
|
-
.gplayer-mc-clips .gplayer-mc-clips-text {
|
|
688
|
-
text-overflow: ellipsis;
|
|
689
|
-
white-space: nowrap;
|
|
690
|
-
overflow: hidden;
|
|
691
|
-
display: inline-block;
|
|
692
|
-
text-overflow: ellipsis;
|
|
693
|
-
color: white;
|
|
694
|
-
cursor: default;
|
|
695
|
-
line-height: var(--bottom-panel);
|
|
696
|
-
position: relative;
|
|
697
|
-
max-width: 150px;
|
|
698
|
-
}
|
|
699
|
-
.gplayer-mc-clips .gplayer-mc-clips-text::before {
|
|
700
|
-
content: "•";
|
|
701
|
-
padding-right: 6px;
|
|
702
|
-
}
|
|
703
|
-
.gplayer-mc-clips .gplayer-mc-clips-text.compact {
|
|
704
|
-
max-width: 100px;
|
|
705
|
-
}div.player-error-screen, [data-player] div.player-error-screen {
|
|
706
|
-
color: #CCCACA;
|
|
707
|
-
position: absolute;
|
|
708
|
-
top: 0;
|
|
709
|
-
height: 100%;
|
|
710
|
-
width: 100%;
|
|
711
|
-
background-color: rgba(0, 0, 0, 0.7);
|
|
712
|
-
z-index: 2000;
|
|
713
|
-
display: flex;
|
|
714
|
-
flex-direction: column;
|
|
715
|
-
justify-content: center;
|
|
716
|
-
}
|
|
717
|
-
div.player-error-screen__content[data-error-screen], [data-player] div.player-error-screen__content[data-error-screen] {
|
|
718
|
-
font-size: 14px;
|
|
719
|
-
color: #CCCACA;
|
|
720
|
-
margin-top: 45px;
|
|
721
|
-
}
|
|
722
|
-
div.player-error-screen__title[data-error-screen], [data-player] div.player-error-screen__title[data-error-screen] {
|
|
723
|
-
font-weight: bold;
|
|
724
|
-
line-height: 30px;
|
|
725
|
-
font-size: 18px;
|
|
726
|
-
}
|
|
727
|
-
div.player-error-screen__message[data-error-screen], [data-player] div.player-error-screen__message[data-error-screen] {
|
|
728
|
-
width: 90%;
|
|
729
|
-
margin: 0 auto;
|
|
730
|
-
}
|
|
731
|
-
div.player-error-screen__code[data-error-screen], [data-player] div.player-error-screen__code[data-error-screen] {
|
|
732
|
-
font-size: 13px;
|
|
733
|
-
margin-top: 15px;
|
|
734
|
-
}
|
|
735
|
-
div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
736
|
-
cursor: pointer;
|
|
737
|
-
width: 30px;
|
|
738
|
-
margin: 15px auto 0;
|
|
739
682
|
}.dvr-controls {
|
|
740
683
|
--disabled-opacity: 0.3;
|
|
741
684
|
--circle-radius: 5px;
|
|
@@ -793,6 +736,40 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
793
736
|
.dvr-controls .live-button:hover {
|
|
794
737
|
opacity: 1;
|
|
795
738
|
text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px;
|
|
739
|
+
}div.player-error-screen, [data-player] div.player-error-screen {
|
|
740
|
+
color: #CCCACA;
|
|
741
|
+
position: absolute;
|
|
742
|
+
top: 0;
|
|
743
|
+
height: 100%;
|
|
744
|
+
width: 100%;
|
|
745
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
746
|
+
z-index: 2000;
|
|
747
|
+
display: flex;
|
|
748
|
+
flex-direction: column;
|
|
749
|
+
justify-content: center;
|
|
750
|
+
}
|
|
751
|
+
div.player-error-screen__content[data-error-screen], [data-player] div.player-error-screen__content[data-error-screen] {
|
|
752
|
+
font-size: 14px;
|
|
753
|
+
color: #CCCACA;
|
|
754
|
+
margin-top: 45px;
|
|
755
|
+
}
|
|
756
|
+
div.player-error-screen__title[data-error-screen], [data-player] div.player-error-screen__title[data-error-screen] {
|
|
757
|
+
font-weight: bold;
|
|
758
|
+
line-height: 30px;
|
|
759
|
+
font-size: 18px;
|
|
760
|
+
}
|
|
761
|
+
div.player-error-screen__message[data-error-screen], [data-player] div.player-error-screen__message[data-error-screen] {
|
|
762
|
+
width: 90%;
|
|
763
|
+
margin: 0 auto;
|
|
764
|
+
}
|
|
765
|
+
div.player-error-screen__code[data-error-screen], [data-player] div.player-error-screen__code[data-error-screen] {
|
|
766
|
+
font-size: 13px;
|
|
767
|
+
margin-top: 15px;
|
|
768
|
+
}
|
|
769
|
+
div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
770
|
+
cursor: pointer;
|
|
771
|
+
width: 30px;
|
|
772
|
+
margin: 15px auto 0;
|
|
796
773
|
}*,
|
|
797
774
|
:focus,
|
|
798
775
|
:visited {
|
|
@@ -928,14 +905,6 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
928
905
|
}
|
|
929
906
|
.multicamera[data-multicamera] li.current a {
|
|
930
907
|
color: #f00;
|
|
931
|
-
}.media-control-skin-1 .media-control-item.media-control-pip {
|
|
932
|
-
order: 95;
|
|
933
|
-
}
|
|
934
|
-
.media-control-skin-1 .media-control-item.media-control-pip button {
|
|
935
|
-
height: 20px;
|
|
936
|
-
}
|
|
937
|
-
.media-control-skin-1 .media-control-item.media-control-pip button svg {
|
|
938
|
-
height: 20px;
|
|
939
908
|
}[data-player] {
|
|
940
909
|
--bottom-panel: 40px;
|
|
941
910
|
}
|
|
@@ -1591,12 +1560,14 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1591
1560
|
}
|
|
1592
1561
|
.player-poster .play-wrapper svg path {
|
|
1593
1562
|
fill: #fff;
|
|
1594
|
-
}.
|
|
1595
|
-
|
|
1596
|
-
pointer-events: none;
|
|
1563
|
+
}.media-control-skin-1 .media-control-item.media-control-pip {
|
|
1564
|
+
order: 95;
|
|
1597
1565
|
}
|
|
1598
|
-
.
|
|
1599
|
-
|
|
1566
|
+
.media-control-skin-1 .media-control-item.media-control-pip button {
|
|
1567
|
+
height: 20px;
|
|
1568
|
+
}
|
|
1569
|
+
.media-control-skin-1 .media-control-item.media-control-pip button svg {
|
|
1570
|
+
height: 20px;
|
|
1600
1571
|
}.seek-time {
|
|
1601
1572
|
position: absolute;
|
|
1602
1573
|
white-space: nowrap;
|
|
@@ -1630,6 +1601,12 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1630
1601
|
.seek-time .seek-time__duration::before {
|
|
1631
1602
|
content: "|";
|
|
1632
1603
|
margin-right: 7px;
|
|
1604
|
+
}.quality-levels li.disabled {
|
|
1605
|
+
opacity: 0.5;
|
|
1606
|
+
pointer-events: none;
|
|
1607
|
+
}
|
|
1608
|
+
.quality-levels li.current {
|
|
1609
|
+
background-color: #000;
|
|
1633
1610
|
}.share_plugin[data-share] {
|
|
1634
1611
|
pointer-events: auto;
|
|
1635
1612
|
z-index: 5;
|
|
@@ -1713,27 +1690,6 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1713
1690
|
display: inline-block;
|
|
1714
1691
|
margin-right: 5px;
|
|
1715
1692
|
cursor: pointer;
|
|
1716
|
-
}.container-with-poster-clickable .mc-skip-time {
|
|
1717
|
-
height: 0;
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
.mc-skip-time {
|
|
1721
|
-
position: absolute;
|
|
1722
|
-
width: 100%;
|
|
1723
|
-
height: calc(100% - 50px);
|
|
1724
|
-
z-index: 9998;
|
|
1725
|
-
background-color: transparent;
|
|
1726
|
-
font-family: Roboto, "Open Sans", Arial, sans-serif;
|
|
1727
|
-
}
|
|
1728
|
-
.mc-skip-time .skip-container {
|
|
1729
|
-
width: 100%;
|
|
1730
|
-
height: 100%;
|
|
1731
|
-
display: flex;
|
|
1732
|
-
justify-content: space-between;
|
|
1733
|
-
}
|
|
1734
|
-
.mc-skip-time .skip-container .skip-item {
|
|
1735
|
-
flex: 1 0 0px;
|
|
1736
|
-
height: 100%;
|
|
1737
1693
|
}.spinner-three-bounce[data-spinner] {
|
|
1738
1694
|
position: absolute;
|
|
1739
1695
|
width: 70px;
|
|
@@ -1772,53 +1728,50 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1772
1728
|
40% {
|
|
1773
1729
|
transform: scale(1);
|
|
1774
1730
|
}
|
|
1775
|
-
}.
|
|
1776
|
-
|
|
1777
|
-
justify-content: center;
|
|
1778
|
-
padding: 0;
|
|
1779
|
-
align-items: center;
|
|
1780
|
-
vertical-align: top;
|
|
1781
|
-
}
|
|
1782
|
-
.media-control-skin-1 .media-control-cc button.media-control-button:hover {
|
|
1783
|
-
color: white;
|
|
1784
|
-
}
|
|
1785
|
-
.media-control-skin-1 .media-control-cc ul li {
|
|
1786
|
-
text-align: center;
|
|
1787
|
-
}
|
|
1788
|
-
.media-control-skin-1 .media-control-cc ul li a {
|
|
1789
|
-
height: 30px;
|
|
1790
|
-
padding: 5px 10px;
|
|
1791
|
-
color: #fffffe;
|
|
1792
|
-
}
|
|
1793
|
-
.media-control-skin-1 .media-control-cc ul li a:hover {
|
|
1794
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
1731
|
+
}.container-with-poster-clickable .mc-skip-time {
|
|
1732
|
+
height: 0;
|
|
1795
1733
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1734
|
+
|
|
1735
|
+
.mc-skip-time {
|
|
1736
|
+
position: absolute;
|
|
1737
|
+
width: 100%;
|
|
1738
|
+
height: calc(100% - 50px);
|
|
1739
|
+
z-index: 9998;
|
|
1740
|
+
background-color: transparent;
|
|
1741
|
+
font-family: Roboto, "Open Sans", Arial, sans-serif;
|
|
1798
1742
|
}
|
|
1799
|
-
.
|
|
1800
|
-
|
|
1801
|
-
|
|
1743
|
+
.mc-skip-time .skip-container {
|
|
1744
|
+
width: 100%;
|
|
1745
|
+
height: 100%;
|
|
1746
|
+
display: flex;
|
|
1747
|
+
justify-content: space-between;
|
|
1802
1748
|
}
|
|
1803
|
-
.
|
|
1804
|
-
|
|
1805
|
-
|
|
1749
|
+
.mc-skip-time .skip-container .skip-item {
|
|
1750
|
+
flex: 1 0 0px;
|
|
1751
|
+
height: 100%;
|
|
1752
|
+
}@charset "UTF-8";
|
|
1753
|
+
.gplayer-mc-clips {
|
|
1754
|
+
display: flex;
|
|
1755
|
+
gap: 6px;
|
|
1806
1756
|
}
|
|
1807
|
-
.
|
|
1757
|
+
.gplayer-mc-clips .gplayer-mc-clips-text {
|
|
1758
|
+
text-overflow: ellipsis;
|
|
1759
|
+
white-space: nowrap;
|
|
1760
|
+
overflow: hidden;
|
|
1761
|
+
display: inline-block;
|
|
1762
|
+
text-overflow: ellipsis;
|
|
1763
|
+
color: white;
|
|
1764
|
+
cursor: default;
|
|
1765
|
+
line-height: var(--bottom-panel);
|
|
1808
1766
|
position: relative;
|
|
1809
|
-
|
|
1767
|
+
max-width: 150px;
|
|
1810
1768
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
bottom: calc(var(--bottom-panel) + 5px);
|
|
1815
|
-
width: 100%;
|
|
1769
|
+
.gplayer-mc-clips .gplayer-mc-clips-text::before {
|
|
1770
|
+
content: "•";
|
|
1771
|
+
padding-right: 6px;
|
|
1816
1772
|
}
|
|
1817
|
-
.
|
|
1818
|
-
width:
|
|
1819
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
1820
|
-
color: white;
|
|
1821
|
-
display: inline-block;
|
|
1773
|
+
.gplayer-mc-clips .gplayer-mc-clips-text.compact {
|
|
1774
|
+
max-width: 100px;
|
|
1822
1775
|
}.scrub-thumbnails {
|
|
1823
1776
|
position: absolute;
|
|
1824
1777
|
bottom: 52px;
|
|
@@ -1882,6 +1835,63 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1882
1835
|
}
|
|
1883
1836
|
.scrub-thumbnails .backdrop .carousel img {
|
|
1884
1837
|
width: auto;
|
|
1838
|
+
}.media-control-skin-1 .media-control-cc button.media-control-button {
|
|
1839
|
+
display: flex;
|
|
1840
|
+
justify-content: center;
|
|
1841
|
+
padding: 0;
|
|
1842
|
+
align-items: center;
|
|
1843
|
+
vertical-align: top;
|
|
1844
|
+
}
|
|
1845
|
+
.media-control-skin-1 .media-control-cc button.media-control-button:hover {
|
|
1846
|
+
color: white;
|
|
1847
|
+
}
|
|
1848
|
+
.media-control-skin-1 .media-control-cc ul li {
|
|
1849
|
+
text-align: center;
|
|
1850
|
+
}
|
|
1851
|
+
.media-control-skin-1 .media-control-cc ul li a {
|
|
1852
|
+
height: 30px;
|
|
1853
|
+
padding: 5px 10px;
|
|
1854
|
+
color: #fffffe;
|
|
1855
|
+
}
|
|
1856
|
+
.media-control-skin-1 .media-control-cc ul li a:hover {
|
|
1857
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
1858
|
+
}
|
|
1859
|
+
.media-control-skin-1 .media-control-cc ul li.current a {
|
|
1860
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
1861
|
+
}
|
|
1862
|
+
.media-control-skin-1 .media-control-cc ul li:first-child a {
|
|
1863
|
+
border-bottom-left-radius: 4px;
|
|
1864
|
+
border-bottom-right-radius: 4px;
|
|
1865
|
+
}
|
|
1866
|
+
.media-control-skin-1 .media-control-cc ul li:last-child a {
|
|
1867
|
+
border-top-left-radius: 4px;
|
|
1868
|
+
border-top-right-radius: 4px;
|
|
1869
|
+
}
|
|
1870
|
+
.media-control-skin-1 .media-control-cc {
|
|
1871
|
+
position: relative;
|
|
1872
|
+
order: 85;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
::cue {
|
|
1876
|
+
visibility: hidden !important;
|
|
1877
|
+
font-size: 0 !important;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
.ios-fullscreen::cue {
|
|
1881
|
+
visibility: visible !important;
|
|
1882
|
+
font-size: 1em !important;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
.container .gplayer-cc-line {
|
|
1886
|
+
position: absolute;
|
|
1887
|
+
bottom: calc(var(--bottom-panel) + 5px);
|
|
1888
|
+
width: 100%;
|
|
1889
|
+
}
|
|
1890
|
+
.container .gplayer-cc-line p {
|
|
1891
|
+
width: auto;
|
|
1892
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
1893
|
+
color: white;
|
|
1894
|
+
display: inline-block;
|
|
1885
1895
|
}.player-logo[data-logo] {
|
|
1886
1896
|
position: absolute;
|
|
1887
1897
|
z-index: 2;
|
package/dist/index.embed.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
* @param e
|
|
4
|
+
*/
|
|
5
|
+
function reportError(e) {
|
|
6
|
+
}
|
|
1
7
|
/**
|
|
2
8
|
* @public
|
|
3
9
|
* @param msg
|
|
@@ -58389,7 +58395,7 @@ class SourceController extends CorePlugin {
|
|
|
58389
58395
|
}
|
|
58390
58396
|
}
|
|
58391
58397
|
|
|
58392
|
-
insertStyle(".media-control-skin-1 .media-control-cc button.media-control-button {\n display: flex;\n justify-content: center;\n padding: 0;\n align-items: center;\n vertical-align: top;\n}\n.media-control-skin-1 .media-control-cc button.media-control-button:hover {\n color: white;\n}\n.media-control-skin-1 .media-control-cc ul li {\n text-align: center;\n}\n.media-control-skin-1 .media-control-cc ul li a {\n height: 30px;\n padding: 5px 10px;\n color: #fffffe;\n}\n.media-control-skin-1 .media-control-cc ul li a:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n.media-control-skin-1 .media-control-cc ul li.current a {\n background-color: rgba(0, 0, 0, 0.4);\n}\n.media-control-skin-1 .media-control-cc ul li:first-child a {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.media-control-skin-1 .media-control-cc ul li:last-child a {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.media-control-skin-1 .media-control-cc {\n position: relative;\n order: 85;\n}\n\n.container .gplayer-cc-line {\n position: absolute;\n bottom: calc(var(--bottom-panel) + 5px);\n width: 100%;\n}\n.container .gplayer-cc-line p {\n width: auto;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n display: inline-block;\n}");
|
|
58398
|
+
insertStyle(".media-control-skin-1 .media-control-cc button.media-control-button {\n display: flex;\n justify-content: center;\n padding: 0;\n align-items: center;\n vertical-align: top;\n}\n.media-control-skin-1 .media-control-cc button.media-control-button:hover {\n color: white;\n}\n.media-control-skin-1 .media-control-cc ul li {\n text-align: center;\n}\n.media-control-skin-1 .media-control-cc ul li a {\n height: 30px;\n padding: 5px 10px;\n color: #fffffe;\n}\n.media-control-skin-1 .media-control-cc ul li a:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n.media-control-skin-1 .media-control-cc ul li.current a {\n background-color: rgba(0, 0, 0, 0.4);\n}\n.media-control-skin-1 .media-control-cc ul li:first-child a {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.media-control-skin-1 .media-control-cc ul li:last-child a {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.media-control-skin-1 .media-control-cc {\n position: relative;\n order: 85;\n}\n\n::cue {\n visibility: hidden !important;\n font-size: 0 !important;\n}\n\n.ios-fullscreen::cue {\n visibility: visible !important;\n font-size: 1em !important;\n}\n\n.container .gplayer-cc-line {\n position: absolute;\n bottom: calc(var(--bottom-panel) + 5px);\n width: 100%;\n}\n.container .gplayer-cc-line p {\n width: auto;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n display: inline-block;\n}");
|
|
58393
58399
|
|
|
58394
58400
|
const subtitlesOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16.238 16.1C13.979 16.1 12.578 14.538 12.578 11.997C12.578 9.462 13.973 7.9 16.238 7.9C18.087 7.9 19.5029 9.127 19.6219 10.824H18.032C17.876 9.927 17.168 9.338 16.238 9.338C15.011 9.338 14.249 10.354 14.249 11.997C14.249 13.641 15.011 14.662 16.243 14.662C17.178 14.662 17.881 14.111 18.038 13.251H19.627C19.492 14.938 18.119 16.1 16.238 16.1ZM8.03198 16.1C5.77298 16.1 4.37299 14.538 4.37299 11.997C4.37299 9.462 5.76798 7.9 8.03198 7.9C9.88098 7.9 11.298 9.127 11.416 10.824H9.82697C9.67097 9.927 8.96198 9.338 8.03198 9.338C6.80598 9.338 6.04297 10.354 6.04297 11.997C6.04297 13.641 6.80596 14.662 8.03796 14.662C8.97296 14.662 9.67601 14.111 9.83301 13.251H11.422C11.287 14.938 9.91398 16.1 8.03198 16.1ZM22.5 3H1.5C0.672 3 0 3.671 0 4.5V19.5C0 20.329 0.672 21 1.5 21H22.5C23.329 21 24 20.329 24 19.5V4.5C24 3.671 23.329 3 22.5 3Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
|
|
58395
58401
|
|
|
@@ -58511,7 +58517,11 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58511
58517
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_DESTROYED, () => {
|
|
58512
58518
|
this.clickaway(null);
|
|
58513
58519
|
});
|
|
58514
|
-
this.listenTo(
|
|
58520
|
+
// this.listenTo(
|
|
58521
|
+
// this.core.activeContainer,
|
|
58522
|
+
// 'container:advertisement:start',
|
|
58523
|
+
// this.onStartAd,
|
|
58524
|
+
// )
|
|
58515
58525
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SUBTITLE_AVAILABLE, this.onSubtitleAvailable);
|
|
58516
58526
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SUBTITLE_CHANGED, this.onSubtitleChanged);
|
|
58517
58527
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_CLICK, () => {
|
|
@@ -58531,6 +58541,7 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58531
58541
|
video.classList.remove('ios-fullscreen');
|
|
58532
58542
|
}
|
|
58533
58543
|
});
|
|
58544
|
+
this.isPreselectedApplied = false;
|
|
58534
58545
|
}
|
|
58535
58546
|
onSubtitleAvailable() {
|
|
58536
58547
|
trace(`${T} onSubtitleAvailable`, {
|
|
@@ -58546,10 +58557,13 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58546
58557
|
this.clearSubtitleText();
|
|
58547
58558
|
}
|
|
58548
58559
|
for (const track of this.tracks) {
|
|
58549
|
-
// Native subtitles are always hidden
|
|
58550
|
-
track.track.mode = 'hidden';
|
|
58551
58560
|
if (track.id === id) {
|
|
58552
|
-
|
|
58561
|
+
if (this.useNativeSubtitles) {
|
|
58562
|
+
track.track.mode = 'showing';
|
|
58563
|
+
}
|
|
58564
|
+
else {
|
|
58565
|
+
track.track.mode = 'hidden';
|
|
58566
|
+
}
|
|
58553
58567
|
this.setSubtitleText(this.getSubtitleText(track.track));
|
|
58554
58568
|
track.track.oncuechange = (e) => {
|
|
58555
58569
|
try {
|
|
@@ -58567,7 +58581,7 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58567
58581
|
}
|
|
58568
58582
|
else {
|
|
58569
58583
|
track.track.oncuechange = null;
|
|
58570
|
-
|
|
58584
|
+
track.track.mode = 'disabled';
|
|
58571
58585
|
}
|
|
58572
58586
|
}
|
|
58573
58587
|
}
|
|
@@ -58580,16 +58594,24 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58580
58594
|
catch (error) {
|
|
58581
58595
|
}
|
|
58582
58596
|
}
|
|
58583
|
-
onStartAd() {
|
|
58584
|
-
|
|
58585
|
-
|
|
58586
|
-
|
|
58587
|
-
|
|
58588
|
-
|
|
58589
|
-
onFinishAd
|
|
58590
|
-
|
|
58591
|
-
|
|
58592
|
-
}
|
|
58597
|
+
// private onStartAd() {
|
|
58598
|
+
// if (this.active && this.core.activeContainer) {
|
|
58599
|
+
// this.hide()
|
|
58600
|
+
// this.listenTo(
|
|
58601
|
+
// this.core.activeContainer,
|
|
58602
|
+
// 'container:advertisement:finish',
|
|
58603
|
+
// this.onFinishAd,
|
|
58604
|
+
// )
|
|
58605
|
+
// }
|
|
58606
|
+
// }
|
|
58607
|
+
// private onFinishAd() {
|
|
58608
|
+
// this.show()
|
|
58609
|
+
// this.stopListening(
|
|
58610
|
+
// this.core.activeContainer,
|
|
58611
|
+
// 'container:advertisement:finish',
|
|
58612
|
+
// this.onFinishAd,
|
|
58613
|
+
// )
|
|
58614
|
+
// }
|
|
58593
58615
|
onContainerResize() {
|
|
58594
58616
|
const shouldShow = this.core.activeContainer &&
|
|
58595
58617
|
isFullscreen(this.core.activeContainer.el) &&
|
|
@@ -58633,7 +58655,7 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58633
58655
|
isFullscreen(this.core.activeContainer.el) &&
|
|
58634
58656
|
this.track &&
|
|
58635
58657
|
this.track.track.mode &&
|
|
58636
|
-
Browser.isiOS) {
|
|
58658
|
+
(Browser.isiOS || this.useNativeSubtitles)) {
|
|
58637
58659
|
this.$line.hide();
|
|
58638
58660
|
this.track.track.mode = 'showing';
|
|
58639
58661
|
}
|
|
@@ -58686,7 +58708,7 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58686
58708
|
// event.target does not exist for some reason in tests
|
|
58687
58709
|
const id = (event.target ?? event.currentTarget).dataset?.item ??
|
|
58688
58710
|
'-1';
|
|
58689
|
-
localStorage.setItem(LOCAL_STORAGE_CC_ID, id); // TODO store language instead
|
|
58711
|
+
localStorage.setItem(LOCAL_STORAGE_CC_ID, id); // TODO store language instead?
|
|
58690
58712
|
this.selectItem(this.findById(Number(id)));
|
|
58691
58713
|
this.hideMenu();
|
|
58692
58714
|
return false;
|
|
@@ -58733,10 +58755,10 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58733
58755
|
return this.$el.find('#gplayer-cc-menu li'); // TODO fix semantically
|
|
58734
58756
|
}
|
|
58735
58757
|
selectSubtitles() {
|
|
58736
|
-
this.track ? this.track.id : -1;
|
|
58758
|
+
const trackId = this.track ? this.track.id : -1;
|
|
58737
58759
|
// TODO find out if this is needed
|
|
58738
|
-
|
|
58739
|
-
this.core.activePlayback.closedCaptionsTrackId = -1
|
|
58760
|
+
this.core.activePlayback.closedCaptionsTrackId = trackId;
|
|
58761
|
+
// this.core.activePlayback.closedCaptionsTrackId = -1
|
|
58740
58762
|
}
|
|
58741
58763
|
getSubtitleText(track) {
|
|
58742
58764
|
const currentTime = this.core.activePlayback?.getCurrentTime() ?? 0;
|
|
@@ -58798,6 +58820,11 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58798
58820
|
mediaControl.slot('cc', this.$el);
|
|
58799
58821
|
}
|
|
58800
58822
|
}
|
|
58823
|
+
get useNativeSubtitles() {
|
|
58824
|
+
const mode = this.core.options.cc?.mode ?? this.core.options.subtitles?.mode ?? 'custom';
|
|
58825
|
+
// TODO or Safari? or iOS?
|
|
58826
|
+
return mode === 'native';
|
|
58827
|
+
}
|
|
58801
58828
|
clickaway = mediaControlClickaway(() => this.hideMenu());
|
|
58802
58829
|
}
|
|
58803
58830
|
|
|
@@ -61802,7 +61829,8 @@ class Thumbnails extends UICorePlugin {
|
|
|
61802
61829
|
}
|
|
61803
61830
|
}
|
|
61804
61831
|
function parseVTT(vtt) {
|
|
61805
|
-
const correctedVTT = vtt.startsWith('WEBVTT') ? vtt : 'WEBVTT\n\n' + vtt
|
|
61832
|
+
const correctedVTT = (vtt.startsWith('WEBVTT') ? vtt : 'WEBVTT\n\n' + vtt)
|
|
61833
|
+
.replace(/(\d+:\d+:\d+),(\d+)/g, '$1.$2');
|
|
61806
61834
|
const parser = new browserIndexExports.WebVTT.Parser(window);
|
|
61807
61835
|
const cues = [];
|
|
61808
61836
|
parser.oncue = (cue) => {
|
|
@@ -61813,6 +61841,7 @@ function parseVTT(vtt) {
|
|
|
61813
61841
|
text: cue.text
|
|
61814
61842
|
});
|
|
61815
61843
|
};
|
|
61844
|
+
parser.onparsingerror = reportError;
|
|
61816
61845
|
// TextEncoder is available in all modern browsers and Node >=v11
|
|
61817
61846
|
const uint8Array = typeof TextEncoder !== 'undefined'
|
|
61818
61847
|
? new TextEncoder().encode(correctedVTT)
|