@gcorevideo/player 2.21.3 → 2.21.4
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-selector/style.scss +1 -1
- package/assets/audio-selector/track-selector.ejs +3 -3
- package/assets/bottom-gear/bottomgear.ejs +2 -2
- package/assets/media-control/container.scss +1 -1
- package/assets/media-control/media-control.ejs +1 -6
- package/assets/media-control/media-control.scss +6 -4
- package/assets/media-control/width270.scss +1 -1
- package/assets/media-control/width370.scss +4 -4
- package/assets/playback-rate/button.ejs +2 -2
- package/assets/playback-rate/list.ejs +4 -4
- package/assets/subtitles/combobox.ejs +5 -5
- package/assets/subtitles/string.ejs +1 -1
- package/assets/subtitles/style.scss +2 -2
- package/dist/core.js +2 -1
- package/dist/index.css +972 -967
- package/dist/index.js +126 -106
- package/dist/player.d.ts +141 -119
- package/dist/plugins/index.css +801 -796
- package/dist/plugins/index.js +119 -104
- package/docs/api/player.bottomgear.getelement.md +2 -2
- package/docs/api/player.bottomgear.md +1 -1
- package/docs/api/{player.subtitles.hide.md → player.closedcaptions.hide.md} +2 -2
- package/docs/api/{player.subtitles.md → player.closedcaptions.md} +11 -11
- package/docs/api/{player.subtitles.show.md → player.closedcaptions.show.md} +2 -2
- package/docs/api/player.closedcaptionspluginsettings.md +13 -0
- package/docs/api/player.gearitemelement.md +6 -4
- package/docs/api/player.gearoptionsitem.md +16 -0
- package/docs/api/player.md +48 -12
- package/docs/api/player.mediacontrol.putelement.md +2 -2
- package/docs/api/player.mediacontrolelement.md +1 -1
- package/docs/api/player.playbackrate.md +1 -1
- package/docs/api/player.subtitlespluginsettings.md +18 -0
- package/docs/api/player.texttrackitem.id.md +11 -0
- package/docs/api/player.texttrackitem.md +87 -0
- package/docs/api/player.texttrackitem.name.md +11 -0
- package/docs/api/player.texttrackitem.track.md +11 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.plugins.d.ts +2 -1
- package/lib/index.plugins.d.ts.map +1 -1
- package/lib/index.plugins.js +2 -1
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +1 -0
- package/lib/plugins/audio-selector/AudioSelector.d.ts +2 -3
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +6 -7
- package/lib/plugins/bottom-gear/BottomGear.d.ts +6 -2
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +2 -1
- package/lib/plugins/media-control/MediaControl.d.ts +5 -5
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +46 -39
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +1 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +4 -4
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +0 -1
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +23 -14
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +118 -0
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -0
- package/lib/plugins/subtitles/ClosedCaptions.js +348 -0
- package/lib/plugins/subtitles/Subtitles.d.ts +12 -9
- package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -1
- package/lib/plugins/subtitles/Subtitles.js +31 -32
- package/lib/testUtils.d.ts +22 -18
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +22 -36
- package/package.json +1 -1
- package/src/index.plugins.ts +2 -1
- package/src/index.ts +1 -1
- package/src/playback/dash-playback/DashPlayback.ts +1 -0
- package/src/plugins/audio-selector/AudioSelector.ts +9 -8
- package/src/plugins/bottom-gear/BottomGear.ts +11 -4
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +1 -1
- package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +2 -2
- package/src/plugins/media-control/MediaControl.ts +53 -46
- package/src/plugins/media-control/__tests__/MediaControl.test.ts +43 -0
- package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +175 -0
- package/src/plugins/picture-in-picture/PictureInPicture.ts +5 -5
- package/src/plugins/playback-rate/PlaybackRate.ts +142 -100
- package/src/plugins/playback-rate/__tests__/PlaybackRate.test.ts +65 -0
- package/src/plugins/playback-rate/__tests__/__snapshots__/PlaybackRate.test.ts.snap +11 -0
- package/src/plugins/subtitles/{Subtitles.ts → ClosedCaptions.ts} +42 -34
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +58 -0
- package/src/plugins/subtitles/__tests__/__snapshots__/ClosedCaptions.test.ts.snap +25 -0
- package/src/testUtils.ts +22 -36
- package/temp/player.api.json +269 -89
- package/tsconfig.tsbuildinfo +1 -1
- package/src/plugins/index.ts +0 -39
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<button data-
|
|
1
|
+
<button data-audiotracks-button class='gcore-skin-button-color' id="audiotracks-button">
|
|
2
2
|
<span class='audio-text'><%= title %></span> <span class="audio-arrow"></span>
|
|
3
3
|
</button>
|
|
4
|
-
<ul class='gcore-skin-bg-color'>
|
|
4
|
+
<ul class='gcore-skin-bg-color' id="audiotracks-select">
|
|
5
5
|
<% for (const track of tracks) { %>
|
|
6
6
|
<li>
|
|
7
|
-
<a href="#" class='gcore-skin-text-color' data-
|
|
7
|
+
<a href="#" class='gcore-skin-text-color' data-audiotracks-select="<%= track.id %>">
|
|
8
8
|
<%= track.label %>
|
|
9
9
|
</a>
|
|
10
10
|
</li>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<button type="button" class="button-gear media-control-button gplayer-lite-btn gcore-skin-button-color gear-icon" data-gear-button="-1">
|
|
1
|
+
<button type="button" class="button-gear media-control-button gplayer-lite-btn gcore-skin-button-color gear-icon" data-gear-button="-1" id="gear-button">
|
|
2
2
|
<%= icon %>
|
|
3
3
|
</button>
|
|
4
4
|
<div class="gear-wrapper gcore-skin-bg-color">
|
|
5
|
-
<ul class="gear-options-list">
|
|
5
|
+
<ul class="gear-options-list" id="gear-options">
|
|
6
6
|
<% for (const item of items) { %>
|
|
7
7
|
<li data-<%= item %>></li>
|
|
8
8
|
<% } %>
|
|
@@ -52,9 +52,6 @@
|
|
|
52
52
|
<div class="media-clip-text gcore-skin-text-color" data-<%= name %>></div>
|
|
53
53
|
</div>
|
|
54
54
|
<% }; %>
|
|
55
|
-
<% var renderPlaybackRate = function(name) { %>
|
|
56
|
-
<div class="media-control-playbackrate" data-<%= name %>></div>
|
|
57
|
-
<% }; %>
|
|
58
55
|
<% var renderVR = function(name) { %>
|
|
59
56
|
<div class="media-control-vr" data-<%= name %>></div>
|
|
60
57
|
<% }; %>
|
|
@@ -84,13 +81,11 @@
|
|
|
84
81
|
renderNerd(setting)
|
|
85
82
|
} else if (setting === "multicamera") {
|
|
86
83
|
renderMultiCamera(setting)
|
|
87
|
-
} else if (setting === "playbackrate") {
|
|
88
|
-
renderPlaybackRate(setting)
|
|
89
84
|
} else if (setting === "vr") {
|
|
90
85
|
renderVR(setting)
|
|
91
86
|
} else if (setting === "clipsText") {
|
|
92
87
|
renderClipsText(setting)
|
|
93
|
-
} else {
|
|
88
|
+
} else if (setting === "fullscreen") {
|
|
94
89
|
renderButton(setting);
|
|
95
90
|
}
|
|
96
91
|
});
|
|
@@ -86,6 +86,10 @@
|
|
|
86
86
|
align-items: center;
|
|
87
87
|
gap: 1rem;
|
|
88
88
|
justify-content: flex-end;
|
|
89
|
+
@media (max-width: 420px) {
|
|
90
|
+
gap: 0.5rem;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
}
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
button.media-control-button {
|
|
@@ -125,7 +129,6 @@
|
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
&[data-fullscreen] {
|
|
128
|
-
float: right;
|
|
129
132
|
order: 100;
|
|
130
133
|
background-color: transparent;
|
|
131
134
|
border: 0;
|
|
@@ -387,9 +390,8 @@
|
|
|
387
390
|
|
|
388
391
|
/* TODO distribute between plugins' styles */
|
|
389
392
|
.media-control-skin-1[data-media-control-skin-1] {
|
|
390
|
-
.media-control-
|
|
391
|
-
|
|
392
|
-
button[data-subtitles-button] {
|
|
393
|
+
.media-control-cc {
|
|
394
|
+
button[data-cc-button] {
|
|
393
395
|
display: flex;
|
|
394
396
|
justify-content: center;
|
|
395
397
|
padding: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.media-control-skin-1[data-media-control-skin-1].w370 {
|
|
2
|
-
.media-control-
|
|
2
|
+
.media-control-cc {
|
|
3
3
|
width: 28px;
|
|
4
4
|
|
|
5
5
|
svg {
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.media-control-quality,
|
|
30
|
-
.media-control-
|
|
30
|
+
.media-control-audiotracks {
|
|
31
31
|
display: block;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.level-selector[data-level-selector],
|
|
35
|
-
.media-control-
|
|
35
|
+
.media-control-audiotracks[data-audiotracks] {
|
|
36
36
|
margin-top: 3px;
|
|
37
37
|
margin-right: 10px;
|
|
38
38
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
button[data-level-selector-button],
|
|
55
|
-
button[data-
|
|
55
|
+
button[data-audiotracks-button] {
|
|
56
56
|
|
|
57
57
|
.quality-text,
|
|
58
58
|
.audio-text {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<button class='gplayer-lite-btn gcore-skin-text-color gear-option'>
|
|
1
|
+
<button class='gplayer-lite-btn gcore-skin-text-color gear-option' id="playback-rate-button">
|
|
2
2
|
<span class="gear-option_speed-icon"><%= speedIcon %></span>
|
|
3
|
-
<span
|
|
3
|
+
<span class="gear-option_label"><%= i18n.t('playback_rate') %></span>
|
|
4
4
|
<span class="gear-option_arrow-right-icon"><%= arrowRightIcon %></span>
|
|
5
5
|
<span class='gear-option_value'><%= title %></span>
|
|
6
6
|
</button>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<button class="gplayer-lite-btn go-back gcore-skin-text-color">
|
|
2
2
|
<span class="arrow-left-icon"><%= arrowLeftIcon %></span>
|
|
3
|
-
|
|
3
|
+
<%= i18n.t('playback_rate') %>
|
|
4
4
|
</button>
|
|
5
5
|
<ul class="gear-sub-menu">
|
|
6
|
-
<% for (
|
|
6
|
+
<% for (const item of playbackRates) { %>
|
|
7
7
|
<li>
|
|
8
|
-
<a href="#" class='gear-sub-menu_btn gcore-skin-text-color' data-rate="<%=
|
|
8
|
+
<a href="#" class='gear-sub-menu_btn gcore-skin-text-color' data-rate="<%= item.value %>">
|
|
9
9
|
<span class="check-icon"><%= checkIcon %></span>
|
|
10
|
-
<%=
|
|
10
|
+
<%= item.label %>
|
|
11
11
|
</a>
|
|
12
12
|
</li>
|
|
13
13
|
<% } %>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<button data-
|
|
2
|
-
<span class='
|
|
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>
|
|
3
3
|
</button>
|
|
4
4
|
|
|
5
|
-
<ul class='gcore-skin-bg-color'>
|
|
5
|
+
<ul class='gcore-skin-bg-color' id="cc-select">
|
|
6
6
|
<% for (const t of tracks) { %>
|
|
7
7
|
<li>
|
|
8
|
-
<a href="#" class='gcore-skin-text-color' data-
|
|
8
|
+
<a href="#" class='gcore-skin-text-color' data-cc-select="<%= t.id %>">
|
|
9
9
|
<%= t.name %>
|
|
10
10
|
</a>
|
|
11
11
|
</li>
|
|
12
12
|
<% } %>
|
|
13
|
-
<li><a href="#" class='gcore-skin-text-color' data-
|
|
13
|
+
<li><a href="#" class='gcore-skin-text-color' data-cc-select="-1">Off</a></li>
|
|
14
14
|
</ul>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
outline: none !important;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.media-control-
|
|
7
|
+
.media-control-cc[data-cc] {
|
|
8
8
|
position: relative;
|
|
9
9
|
order: 85;
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
border: none;
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.cc-text {
|
|
19
19
|
svg {
|
|
20
20
|
fill: white;
|
|
21
21
|
}
|
package/dist/core.js
CHANGED
|
@@ -12850,6 +12850,7 @@ class DashPlayback extends BasePlayback {
|
|
|
12850
12850
|
this.trigger(Events$1.PLAYBACK_DVR, status);
|
|
12851
12851
|
this.trigger(Events$1.PLAYBACK_STATS_ADD, { dvr: status });
|
|
12852
12852
|
}
|
|
12853
|
+
// TODO move to the base class
|
|
12853
12854
|
_updateSettings() {
|
|
12854
12855
|
if (this._playbackType === Playback.VOD) {
|
|
12855
12856
|
// @ts-expect-error
|
|
@@ -43213,7 +43214,7 @@ class Player {
|
|
|
43213
43214
|
}
|
|
43214
43215
|
}
|
|
43215
43216
|
|
|
43216
|
-
var version$1 = "2.21.
|
|
43217
|
+
var version$1 = "2.21.4";
|
|
43217
43218
|
|
|
43218
43219
|
var packages = {
|
|
43219
43220
|
"node_modules/@clappr/core": {
|