@gcorevideo/player 2.28.36 → 2.29.0

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 (42) hide show
  1. package/assets/media-control/media-control.scss +8 -6
  2. package/assets/multi-camera/multicamera.ejs +27 -23
  3. package/assets/multi-camera/style.scss +7 -34
  4. package/assets/style/main.scss +2 -2
  5. package/dist/core.js +8 -6
  6. package/dist/index.css +427 -449
  7. package/dist/index.embed.js +8 -45
  8. package/dist/index.js +77 -181
  9. package/docs/api/player.md +22 -9
  10. package/docs/api/player.mediacontrol.setkeepvisible.md +56 -0
  11. package/docs/api/player.multicamera.md +0 -28
  12. package/docs/api/player.multiccamerasourceinfo.md +27 -0
  13. package/docs/api/{player.multicamera.unbindevents.md → player.multisourcesmode.md} +4 -7
  14. package/docs/api/player.sourcecontroller.md +0 -37
  15. package/lib/playback/dash-playback/DashPlayback.d.ts +2 -1
  16. package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
  17. package/lib/playback/hls-playback/HlsPlayback.d.ts +2 -1
  18. package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
  19. package/lib/playback/types.d.ts +9 -0
  20. package/lib/playback/types.d.ts.map +1 -1
  21. package/lib/playback.types.d.ts +0 -6
  22. package/lib/playback.types.d.ts.map +1 -1
  23. package/lib/plugins/multi-camera/MultiCamera.d.ts +21 -4
  24. package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
  25. package/lib/plugins/multi-camera/MultiCamera.js +70 -134
  26. package/lib/plugins/source-controller/SourceController.d.ts +0 -39
  27. package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
  28. package/lib/plugins/source-controller/SourceController.js +0 -39
  29. package/lib/utils/mediaSources.d.ts +4 -0
  30. package/lib/utils/mediaSources.d.ts.map +1 -1
  31. package/lib/utils/mediaSources.js +8 -6
  32. package/package.json +1 -1
  33. package/src/playback/dash-playback/DashPlayback.ts +1 -2
  34. package/src/playback/hls-playback/HlsPlayback.ts +1 -1
  35. package/src/playback/types.ts +10 -0
  36. package/src/playback.types.ts +0 -6
  37. package/src/plugins/multi-camera/MultiCamera.ts +103 -166
  38. package/src/plugins/source-controller/SourceController.ts +0 -39
  39. package/src/plugins/subtitles/ClosedCaptions.ts +1 -1
  40. package/src/utils/mediaSources.ts +10 -6
  41. package/tsconfig.tsbuildinfo +1 -1
  42. package/docs/api/player.multicamera.activebyid.md +0 -67
@@ -186,6 +186,7 @@
186
186
  }
187
187
 
188
188
  .media-control-indicator {
189
+
189
190
  &[data-position],
190
191
  &[data-duration] {
191
192
  display: flex;
@@ -394,6 +395,7 @@
394
395
  }
395
396
  }
396
397
  }
398
+
397
399
  .seek-time {
398
400
  height: 26px;
399
401
  line-height: 26px;
@@ -472,37 +474,37 @@
472
474
  font-size: var(--gplayer-mc-font-size-dropdown);
473
475
  text-align: right;
474
476
  height: 30px;
475
-
477
+
476
478
  a {
477
479
  display: block;
478
480
  text-decoration: none;
479
481
  text-overflow: ellipsis;
480
482
  overflow: hidden;
481
483
  white-space: nowrap;
482
-
484
+
483
485
  // height: 30px;
484
486
  padding: 5px 10px;
485
487
  line-height: 20px;
486
488
  color: #fffffe; // TODO color var
487
-
489
+
488
490
  &:hover {
489
491
  text-decoration: none;
490
492
  background-color: rgb(0 0 0 / 40%);
491
493
  color: var(--gplayer-mc-text-color);
492
494
  }
493
495
  }
494
-
496
+
495
497
  &.current a {
496
498
  color: #f00;
497
499
  }
498
-
500
+
499
501
  &:first-child {
500
502
  a {
501
503
  border-bottom-left-radius: 4px;
502
504
  border-bottom-right-radius: 4px;
503
505
  }
504
506
  }
505
-
507
+
506
508
  &:last-child {
507
509
  a {
508
510
  border-top-left-radius: 4px;
@@ -1,29 +1,33 @@
1
- <button data-multicamera-button class='gcore-skin-button-color'>
1
+ <button data-multicamera-button class='gcore-skin-button-color media-control-button'>
2
2
  <span class="multicamera-icon"></span>
3
3
  </button>
4
4
 
5
5
  <ul class="gcore-skin-bg-color">
6
- <% for (var i = 0; i < streams.length; i++) { %>
7
- <% if(!streams[i].live && multisources_mode === 'only_live') { %>
6
+ <% for (var i=0; i < streams.length; i++) { %>
7
+ <% if(!streams[i].live && multisources_mode==='only_live' ) { %>
8
8
  <% continue; %>
9
- <% } %>
10
- <li>
11
- <div class="multicamera-item" data-multicamera-selector-live="<%= streams[i].live %>"
12
- data-multicamera-selector-select="<%= streams[i].id %>">
13
- <div class="multicamera-screenshot">
14
- <% if (streams[i].screenshot) { %>
15
- <img src="<%= streams[i].screenshot %>" alt="<%= streams[i].title %>"/>
9
+ <% } %>
10
+ <li>
11
+ <div class="multicamera-item" data-multicamera-selector-live="<%= streams[i].live %>"
12
+ data-multicamera-selector-select="<%= streams[i].id %>">
13
+ <div class="multicamera-screenshot">
14
+ <% if (streams[i].screenshot) { %>
15
+ <img src="<%= streams[i].screenshot %>" alt="<%= streams[i].title %>" />
16
+ <% } %>
17
+ </div>
18
+ <div class="multicamera-text gcore-skin-text-color">
19
+ <% if (streams[i].title) { %>
20
+ <div class="multicamera-title gcore-skin-text-color">
21
+ <%= streams[i].title %>
22
+ </div>
23
+ <% } %>
24
+ <% if (streams[i].description) { %>
25
+ <div class="multicamera-description gcore-skin-text-color">
26
+ <%= streams[i].description %>
27
+ </div>
28
+ <% } %>
29
+ </div>
30
+ </div>
31
+ </li>
16
32
  <% } %>
17
- </div>
18
- <div class="multicamera-text gcore-skin-text-color">
19
- <% if (streams[i].title) { %>
20
- <div class="multicamera-title gcore-skin-text-color"><%= streams[i].title %></div>
21
- <% } %>
22
- <% if (streams[i].description) { %>
23
- <div class="multicamera-description gcore-skin-text-color"><%= streams[i].description %></div>
24
- <% } %>
25
- </div>
26
- </div>
27
- </li>
28
- <% } %>
29
- </ul>
33
+ </ul>
@@ -5,11 +5,8 @@
5
5
  }
6
6
 
7
7
  .multicamera[data-multicamera] {
8
- float: right;
9
- margin-top: 4px;
10
8
  position: relative;
11
- margin-right: 20px;
12
- width: 20px;
9
+ order: 80;
13
10
 
14
11
  button {
15
12
  background-color: transparent;
@@ -20,10 +17,15 @@
20
17
  font-size: 14px;
21
18
  padding: 0;
22
19
 
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ width: 24px;
24
+ height: 20px;
25
+
23
26
  svg {
24
27
  height: 20px;
25
28
  position: relative;
26
- margin-top: 6px;
27
29
  }
28
30
 
29
31
  &:hover {
@@ -33,13 +35,6 @@
33
35
  &.changing {
34
36
  animation: pulse 0.5s infinite alternate;
35
37
  }
36
-
37
- span.quality-arrow {
38
- width: 9px;
39
- height: 6px;
40
- margin-top: 11px;
41
- margin-left: 5px;
42
- }
43
38
  }
44
39
 
45
40
  &>ul {
@@ -135,27 +130,5 @@
135
130
  }
136
131
  }
137
132
  }
138
-
139
- a {
140
- color: #444;
141
- padding: 2px 10px;
142
- display: block;
143
- text-decoration: none;
144
-
145
- &:hover {
146
- background-color: #555;
147
- color: white;
148
-
149
- a {
150
- color: white;
151
- text-decoration: none;
152
- }
153
- }
154
- }
155
-
156
- &.current a {
157
- color: #f00;
158
- }
159
-
160
133
  }
161
134
  }
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  .spinner-three-bounce {
17
- & > .gcore-skin-main-color {
17
+ &>.gcore-skin-main-color {
18
18
  box-shadow: 4px 4px 9px 1px rgb(36 61 81 / 51%);
19
19
  }
20
20
  }
@@ -47,4 +47,4 @@
47
47
  border: 0;
48
48
  padding: 0;
49
49
  }
50
- }
50
+ }
package/dist/core.js CHANGED
@@ -12686,6 +12686,9 @@ var PlayerEvent;
12686
12686
  PlayerEvent["VolumeUpdate"] = "volumeupdate";
12687
12687
  })(PlayerEvent || (PlayerEvent = {}));
12688
12688
 
12689
+ const MIME_TYPES_HLS = ['application/x-mpegurl', 'application/vnd.apple.mpegurl'];
12690
+ const MIME_TYPE_HLS = MIME_TYPES_HLS[0];
12691
+ const MIME_TYPE_DASH = 'application/dash+xml';
12689
12692
  // TODO rewrite using the Playback classes and canPlay static methods
12690
12693
  function buildMediaSourcesList(sources, priorityTransport = 'dash') {
12691
12694
  const playbacks = Loader.registeredPlaybacks;
@@ -12725,22 +12728,21 @@ function wrapSource(s) {
12725
12728
  }
12726
12729
  function guessMimeType(s) {
12727
12730
  if (s.endsWith('.mpd')) {
12728
- return 'application/dash+xml';
12731
+ return MIME_TYPE_DASH;
12729
12732
  }
12730
12733
  if (s.endsWith('.m3u8')) {
12731
- // return 'application/vnd.apple.mpegurl'
12732
- return 'application/x-mpegurl';
12734
+ return MIME_TYPE_HLS;
12733
12735
  }
12734
12736
  }
12735
12737
  function isDashSource(source, mimeType) {
12736
12738
  if (mimeType) {
12737
- return mimeType === 'application/dash+xml'; // TODO consider video/mp4
12739
+ return mimeType === MIME_TYPE_DASH; // TODO consider video/mp4
12738
12740
  }
12739
12741
  return source.endsWith('.mpd');
12740
12742
  }
12741
12743
  function isHlsSource(source, mimeType) {
12742
12744
  if (mimeType) {
12743
- return ['application/vnd.apple.mpegurl', 'application/x-mpegurl'].includes(mimeType.toLowerCase());
12745
+ return MIME_TYPES_HLS.includes(mimeType.toLowerCase());
12744
12746
  }
12745
12747
  return source.endsWith('.m3u8');
12746
12748
  }
@@ -51475,7 +51477,7 @@ class Player {
51475
51477
  }
51476
51478
  }
51477
51479
 
51478
- var version$1 = "2.28.36";
51480
+ var version$1 = "2.29.0";
51479
51481
 
51480
51482
  var packages = {
51481
51483
  "node_modules/@clappr/core": {