@gcorevideo/player 2.21.1 → 2.21.3

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 (35) hide show
  1. package/assets/media-control/media-control.ejs +0 -5
  2. package/assets/media-control/media-control.scss +44 -54
  3. package/assets/media-control/width370.scss +3 -5
  4. package/assets/subtitles/combobox.ejs +7 -9
  5. package/assets/subtitles/style.scss +8 -15
  6. package/dist/core.js +4 -1
  7. package/dist/index.css +733 -750
  8. package/dist/index.js +135 -159
  9. package/dist/plugins/index.css +1401 -1418
  10. package/dist/plugins/index.js +124 -155
  11. package/lib/playback/BasePlayback.d.ts +1 -0
  12. package/lib/playback/BasePlayback.d.ts.map +1 -1
  13. package/lib/playback/BasePlayback.js +3 -0
  14. package/lib/playback.types.d.ts +5 -0
  15. package/lib/playback.types.d.ts.map +1 -1
  16. package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
  17. package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
  18. package/lib/plugins/bottom-gear/BottomGear.js +2 -1
  19. package/lib/plugins/media-control/MediaControl.d.ts +0 -1
  20. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  21. package/lib/plugins/media-control/MediaControl.js +7 -5
  22. package/lib/plugins/playback-rate/PlaybackRate.d.ts +1 -0
  23. package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
  24. package/lib/plugins/playback-rate/PlaybackRate.js +1 -0
  25. package/lib/plugins/subtitles/Subtitles.d.ts +21 -19
  26. package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -1
  27. package/lib/plugins/subtitles/Subtitles.js +121 -151
  28. package/package.json +1 -1
  29. package/src/playback/BasePlayback.ts +4 -0
  30. package/src/playback.types.ts +6 -0
  31. package/src/plugins/bottom-gear/BottomGear.ts +3 -1
  32. package/src/plugins/media-control/MediaControl.ts +37 -20
  33. package/src/plugins/playback-rate/PlaybackRate.ts +1 -0
  34. package/src/plugins/subtitles/Subtitles.ts +144 -179
  35. package/tsconfig.tsbuildinfo +1 -1
@@ -42,9 +42,6 @@
42
42
  <% var renderNerd = function(name) { %>
43
43
  <div class="media-control-nerd" data-<%= name %>></div>
44
44
  <% }; %>
45
- <% var renderSubtitles = function(name) { %>
46
- <div class="media-control-subtitles" data-<%= name %>></div>
47
- <% }; %>
48
45
  <% var renderMultiCamera = function(name) { %>
49
46
  <div class="media-control-multicamera" data-<%= name %>></div>
50
47
  <% }; %>
@@ -87,8 +84,6 @@
87
84
  renderNerd(setting)
88
85
  } else if (setting === "multicamera") {
89
86
  renderMultiCamera(setting)
90
- } else if (setting === "subtitles") {
91
- renderSubtitles(setting)
92
87
  } else if (setting === "playbackrate") {
93
88
  renderPlaybackRate(setting)
94
89
  } else if (setting === "vr") {
@@ -99,6 +99,7 @@
99
99
 
100
100
  svg {
101
101
  height: 20px;
102
+
102
103
  path {
103
104
  fill: white;
104
105
  }
@@ -142,6 +143,7 @@
142
143
  }
143
144
 
144
145
  .media-control-indicator {
146
+
145
147
  &[data-position],
146
148
  &[data-duration] {
147
149
  display: flex;
@@ -237,7 +239,7 @@
237
239
  }
238
240
  }
239
241
 
240
- .bar-container[data-seekbar].seek-disabled + .bar-scrubber[data-seekbar] {
242
+ .bar-container[data-seekbar].seek-disabled+.bar-scrubber[data-seekbar] {
241
243
  cursor: default;
242
244
  display: none;
243
245
  }
@@ -385,69 +387,58 @@
385
387
 
386
388
  /* TODO distribute between plugins' styles */
387
389
  .media-control-skin-1[data-media-control-skin-1] {
388
- .media-control-quality,
389
- .media-control-audio-tracks {
390
- display: block;
391
- }
392
-
393
390
  .media-control-subtitles {
394
- .subtitles[data-subtitles] {
395
- width: 40px;
396
- margin-top: 0;
397
391
 
398
- button[data-subtitles-button] {
399
- display: flex;
400
- justify-content: center;
401
- padding: 0;
402
- align-items: center;
392
+ button[data-subtitles-button] {
393
+ display: flex;
394
+ justify-content: center;
395
+ padding: 0;
396
+ align-items: center;
403
397
 
404
- &:hover {
405
- color: white;
406
- }
398
+ &:hover {
399
+ color: white;
407
400
  }
401
+ }
408
402
 
409
- ul {
410
- background-color: rgb(74 74 74 / 60%);
411
- border: none;
412
- width: auto;
413
- transform: rotate(180deg);
414
- border-radius: 4px;
415
- bottom: 52px;
416
- margin-left: -28px;
417
-
418
- li {
419
- transform: rotate(-180deg);
420
- font-size: 16px;
421
- text-align: center;
422
- white-space: nowrap;
423
- height: 30px;
424
-
425
- a {
426
- height: 30px;
427
- padding: 5px 10px;
428
- color: #fffffe;
403
+ ul { // TODO extract common styles
404
+ background-color: rgb(74 74 74 / 60%);
405
+ border: none;
406
+ width: auto;
407
+ border-radius: 4px;
408
+ bottom: 52px;
409
+ margin-left: -28px;
410
+
411
+ li {
412
+ font-size: 16px;
413
+ text-align: center;
414
+ white-space: nowrap;
415
+ height: 30px;
429
416
 
430
- &:hover {
431
- background-color: rgb(0 0 0 / 40%);
432
- }
433
- }
417
+ a {
418
+ height: 30px;
419
+ padding: 5px 10px;
420
+ color: #fffffe;
434
421
 
435
- &.current a {
422
+ &:hover {
436
423
  background-color: rgb(0 0 0 / 40%);
437
424
  }
425
+ }
438
426
 
439
- &:first-child {
440
- a {
441
- border-bottom-left-radius: 4px;
442
- border-bottom-right-radius: 4px;
443
- }
427
+ &.current a {
428
+ background-color: rgb(0 0 0 / 40%);
429
+ }
430
+
431
+ &:first-child {
432
+ a {
433
+ border-bottom-left-radius: 4px;
434
+ border-bottom-right-radius: 4px;
444
435
  }
436
+ }
445
437
 
446
- &:last-child {
447
- a {
448
- border-top-left-radius: 4px;
449
- border-top-right-radius: 4px;
450
- }
438
+ &:last-child {
439
+ a {
440
+ border-top-left-radius: 4px;
441
+ border-top-right-radius: 4px;
451
442
  }
452
443
  }
453
444
  }
@@ -476,5 +467,4 @@
476
467
  display: none !important;
477
468
  }
478
469
  }
479
- }
480
-
470
+ }
@@ -1,11 +1,9 @@
1
1
  .media-control-skin-1[data-media-control-skin-1].w370 {
2
2
  .media-control-subtitles {
3
- .subtitles[data-subtitles] {
4
- width: 28px;
3
+ width: 28px;
5
4
 
6
- svg {
7
- height: 17px;
8
- }
5
+ svg {
6
+ height: 17px;
9
7
  }
10
8
  }
11
9
 
@@ -3,14 +3,12 @@
3
3
  </button>
4
4
 
5
5
  <ul class='gcore-skin-bg-color'>
6
- <li><a href="#" class='gcore-skin-text-color' data-subtitles-select="off">off</a></li>
7
- <% for (const track of tracks) { %>
8
- <% if (track.kind === 'subtitles' || track.kind === 'captions') { %>
9
- <li>
10
- <a href="#" class='gcore-skin-text-color' data-subtitles-select="<%= track.language %>">
11
- <%= track.label %>
12
- </a>
13
- </li>
14
- <% } %>
6
+ <% for (const t of tracks) { %>
7
+ <li>
8
+ <a href="#" class='gcore-skin-text-color' data-subtitles-select="<%= t.id %>">
9
+ <%= t.name %>
10
+ </a>
11
+ </li>
15
12
  <% } %>
13
+ <li><a href="#" class='gcore-skin-text-color' data-subtitles-select="-1">Off</a></li>
16
14
  </ul>
@@ -1,19 +1,18 @@
1
- *, :focus, :visited {
1
+ *,
2
+ :focus,
3
+ :visited {
2
4
  outline: none !important;
3
5
  }
4
6
 
5
- .subtitles[data-subtitles] {
6
- float: right;
7
+ .media-control-subtitles[data-subtitles] {
7
8
  position: relative;
8
- width: 50px;
9
+ order: 85;
9
10
 
10
11
  button {
11
12
  background-color: transparent;
12
13
  color: #fff;
13
- font-family: Roboto, "Open Sans", Arial, sans-serif;
14
14
  -webkit-font-smoothing: antialiased;
15
15
  border: none;
16
- font-size: 14px;
17
16
  cursor: pointer;
18
17
 
19
18
  .subtitle-text {
@@ -31,7 +30,7 @@
31
30
  }
32
31
  }
33
32
 
34
- & > ul {
33
+ ul {
35
34
  width: 80px;
36
35
  list-style-type: none;
37
36
  position: absolute;
@@ -39,16 +38,10 @@
39
38
  border: 1px solid black;
40
39
  display: none;
41
40
  background-color: #e6e6e6;
41
+ padding: 8px 0;
42
42
  }
43
43
 
44
44
  li {
45
- font-size: 10px;
46
-
47
- &[data-title] {
48
- background-color: #c3c2c2;
49
- padding: 5px;
50
- }
51
-
52
45
  a {
53
46
  color: #444;
54
47
  padding: 2px 10px;
@@ -96,4 +89,4 @@
96
89
  .ios-fullscreen::cue {
97
90
  visibility: visible !important;
98
91
  font-size: 1em !important;
99
- }
92
+ }
package/dist/core.js CHANGED
@@ -12542,6 +12542,9 @@ var PlaybackErrorCode;
12542
12542
  * @internal
12543
12543
  */
12544
12544
  class BasePlayback extends HTML5Video$1 {
12545
+ get isHTML5Video() {
12546
+ return true;
12547
+ }
12545
12548
  createError(errorData, options) {
12546
12549
  const i18n = this.i18n ||
12547
12550
  // @ts-ignore
@@ -43210,7 +43213,7 @@ class Player {
43210
43213
  }
43211
43214
  }
43212
43215
 
43213
- var version$1 = "2.21.1";
43216
+ var version$1 = "2.21.3";
43214
43217
 
43215
43218
  var packages = {
43216
43219
  "node_modules/@clappr/core": {