@eluvio/elv-player-js 1.0.95 → 1.0.96
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/package.json +1 -1
- package/src/PlayerControls.js +20 -6
- package/src/index.js +1 -1
- package/src/static/icons/x.svg +1 -0
- package/src/static/stylesheets/player.scss +53 -10
package/package.json
CHANGED
package/src/PlayerControls.js
CHANGED
|
@@ -4,6 +4,7 @@ import PauseIcon from "./static/icons/media/Pause icon.svg";
|
|
|
4
4
|
import FullscreenIcon from "./static/icons/media/Full Screen icon.svg";
|
|
5
5
|
import ExitFullscreenIcon from "./static/icons/minimize.svg";
|
|
6
6
|
import SettingsIcon from "./static/icons/media/Settings icon.svg";
|
|
7
|
+
import CloseIcon from "./static/icons/x.svg";
|
|
7
8
|
import MutedIcon from "./static/icons/media/no volume icon.svg";
|
|
8
9
|
import VolumeLowIcon from "./static/icons/media/low volume icon.svg";
|
|
9
10
|
import VolumeHighIcon from "./static/icons/media/Volume icon.svg";
|
|
@@ -675,6 +676,21 @@ class PlayerControls {
|
|
|
675
676
|
}
|
|
676
677
|
}
|
|
677
678
|
|
|
679
|
+
InitializeMenu(mode) {
|
|
680
|
+
this.settingsMenu.innerHTML = "";
|
|
681
|
+
this.settingsMenu.classList.remove("eluvio-player__controls__settings-menu-hidden");
|
|
682
|
+
this.settingsMenu.setAttribute("data-mode", mode);
|
|
683
|
+
|
|
684
|
+
const closeButton = CreateImageButton({
|
|
685
|
+
parent: this.settingsMenu,
|
|
686
|
+
svg: CloseIcon,
|
|
687
|
+
type: "button",
|
|
688
|
+
classes: ["eluvio-player__controls__settings-menu__close"]
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
closeButton.addEventListener("click", () => this.HideSettingsMenu());
|
|
692
|
+
}
|
|
693
|
+
|
|
678
694
|
AddSetting({Retrieve, Set}) {
|
|
679
695
|
if(!Retrieve) { return; }
|
|
680
696
|
|
|
@@ -692,8 +708,7 @@ class PlayerControls {
|
|
|
692
708
|
|
|
693
709
|
if(Set) {
|
|
694
710
|
optionSelectionButton.addEventListener("click", () => {
|
|
695
|
-
this.
|
|
696
|
-
this.settingsMenu.setAttribute("data-mode", "settings-submenu");
|
|
711
|
+
this.InitializeMenu("settings-submenu");
|
|
697
712
|
|
|
698
713
|
const backButton = CreateElement({
|
|
699
714
|
parent: this.settingsMenu,
|
|
@@ -703,11 +718,12 @@ class PlayerControls {
|
|
|
703
718
|
|
|
704
719
|
CreateElement({
|
|
705
720
|
parent: backButton,
|
|
706
|
-
|
|
721
|
+
classes: ["eluvio-player__controls__settings-menu__option-back__icon"]
|
|
707
722
|
}).innerHTML = LeftArrow;
|
|
708
723
|
|
|
709
724
|
CreateElement({
|
|
710
725
|
parent: backButton,
|
|
726
|
+
classes: ["eluvio-player__controls__settings-menu__option-back__text"]
|
|
711
727
|
}).innerHTML = label;
|
|
712
728
|
|
|
713
729
|
backButton.addEventListener("click", () => this.ShowSettingsMenu());
|
|
@@ -738,9 +754,7 @@ class PlayerControls {
|
|
|
738
754
|
}
|
|
739
755
|
|
|
740
756
|
ShowSettingsMenu() {
|
|
741
|
-
this.
|
|
742
|
-
this.settingsMenu.classList.remove("eluvio-player__controls__settings-menu-hidden");
|
|
743
|
-
this.settingsMenu.setAttribute("data-mode", "settings");
|
|
757
|
+
this.InitializeMenu("settings");
|
|
744
758
|
|
|
745
759
|
if(this.GetLevels) {
|
|
746
760
|
this.AddSetting({Retrieve: this.GetLevels, Set: this.SetLevel});
|
package/src/index.js
CHANGED
|
@@ -667,7 +667,7 @@ export class EluvioPlayer {
|
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
const UpdateAudioTracks = () => {
|
|
670
|
-
if(this.video.audioTracks.length <= 1) { return; }
|
|
670
|
+
if(!this.video.audioTracks || this.video.audioTracks.length <= 1) { return; }
|
|
671
671
|
|
|
672
672
|
this.controls.SetAudioTrackControls({
|
|
673
673
|
GetAudioTracks: () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
@@ -345,6 +345,7 @@ $button-height: 35px;
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
&__settings-menu {
|
|
348
|
+
backdrop-filter: blur(5px);
|
|
348
349
|
background: $menu-color;
|
|
349
350
|
border-radius: 3px;
|
|
350
351
|
bottom: 45px;
|
|
@@ -363,6 +364,22 @@ $button-height: 35px;
|
|
|
363
364
|
|
|
364
365
|
button {
|
|
365
366
|
border: 1px solid transparent;
|
|
367
|
+
|
|
368
|
+
&.eluvio-player__controls__settings-menu__close {
|
|
369
|
+
border: 1.5px solid $button-color;
|
|
370
|
+
border-radius: 100%;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
&__close {
|
|
375
|
+
display: none;
|
|
376
|
+
position: absolute;
|
|
377
|
+
right: 20px;
|
|
378
|
+
top: 20px;
|
|
379
|
+
|
|
380
|
+
* {
|
|
381
|
+
color: $button-color;
|
|
382
|
+
}
|
|
366
383
|
}
|
|
367
384
|
|
|
368
385
|
&__option {
|
|
@@ -378,28 +395,37 @@ $button-height: 35px;
|
|
|
378
395
|
width: 100%;
|
|
379
396
|
|
|
380
397
|
&-back {
|
|
398
|
+
align-items: center;
|
|
381
399
|
display: flex;
|
|
382
|
-
|
|
400
|
+
position: relative;
|
|
383
401
|
width: 100%;
|
|
402
|
+
}
|
|
384
403
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
404
|
+
&-back__icon {
|
|
405
|
+
height: 15px;
|
|
406
|
+
left: 20px;
|
|
407
|
+
margin-right: 5px;
|
|
408
|
+
position: absolute;
|
|
409
|
+
width: 15px;
|
|
390
410
|
|
|
391
|
-
|
|
411
|
+
svg {
|
|
412
|
+
height: 100%;
|
|
392
413
|
width: 100%;
|
|
393
414
|
}
|
|
394
415
|
}
|
|
395
416
|
|
|
417
|
+
&-back__text {
|
|
418
|
+
padding-inline: 25px;
|
|
419
|
+
width: 100%;
|
|
420
|
+
}
|
|
421
|
+
|
|
396
422
|
&-selected {
|
|
397
|
-
color: $
|
|
423
|
+
color: $white;
|
|
398
424
|
}
|
|
399
425
|
|
|
400
426
|
&:hover {
|
|
401
427
|
background: $menu-active-color;
|
|
402
|
-
color: $
|
|
428
|
+
color: $white;
|
|
403
429
|
}
|
|
404
430
|
|
|
405
431
|
&.focus-visible {
|
|
@@ -668,11 +694,28 @@ $button-height: 35px;
|
|
|
668
694
|
}
|
|
669
695
|
|
|
670
696
|
.eluvio-player__controls__settings-menu {
|
|
697
|
+
align-items: center;
|
|
671
698
|
height: 100%;
|
|
672
|
-
|
|
699
|
+
max-height: 100%;
|
|
700
|
+
padding: 80px 0 30px;
|
|
673
701
|
right: 0;
|
|
674
702
|
top: 0;
|
|
675
703
|
width: 100%;
|
|
704
|
+
|
|
705
|
+
&__option {
|
|
706
|
+
font-size: 20px;
|
|
707
|
+
margin-bottom: 5px;
|
|
708
|
+
text-align: center;
|
|
709
|
+
|
|
710
|
+
&-back {
|
|
711
|
+
font-size: 24px;
|
|
712
|
+
margin-bottom: 20px;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
&__close {
|
|
717
|
+
display: unset;
|
|
718
|
+
}
|
|
676
719
|
}
|
|
677
720
|
|
|
678
721
|
.eluvio-player__hotspot-overlay {
|