Still converting to bootstrap 5. Updated media player

This commit is contained in:
emeric
2022-05-23 23:06:40 +02:00
parent 158f1bc65c
commit 6fa5cad955
9 changed files with 91 additions and 42 deletions
+52 -3
View File
@@ -1,4 +1,17 @@
/* Generic rules */
.link-success {
transition: color 0.15s ease;
}
.link-secondary {
transition: color 0.15s ease;
}
.Lms-bg-dark-hover {
transition: background-color 0.15s ease;
}
.Lms-bg-dark-hover:hover {
background-color: var(--bs-dark);
}
@@ -8,8 +21,9 @@ body {
padding-bottom: 78px;
}
a img:hover {
filter: brightness(85%);
.Lms-badge-cluster {
transition: filter 0.15s ease;
cursor: pointer;
}
.Lms-badge-cluster:hover {
@@ -29,7 +43,11 @@ a img:hover {
.Lms-cover {
opacity: 0;
transition: opacity 1s;
transition: opacity 0.5s ease-in, filter 0.15s ease;
}
.Lms-cover-anchor:hover {
filter: brightness(85%);
}
.Lms-cover-container {
@@ -66,6 +84,37 @@ a img:hover {
z-index: 999;
}
.Lms-player-seek-common {
position: absolute;
width:100%;
top: 0;
left: 0;
height: 6px;
}
.Lms-player-seek {
cursor: pointer;
z-index: 1;
touch-action: manipulation;
-webkit-appearance: none;
-moz-appearance: none;
background: transparent;
}
.Lms-player-seek::-webkit-slider-thumb {
-webkit-appearance: none;
-moz-appearance: none;
height: 0;
width: 0;
}
.Lms-player-seek::-moz-range-thumb {
-webkit-appearance: none;
-moz-appearance: none;
height: 0;
width: 0;
}
.Lms-responsive-square {
width: 100%;
+7 -6
View File
@@ -31,13 +31,16 @@ LMS.mediaplayer = function () {
var _lastStartPlaying = null;
var _updateControls = function() {
const pauseClass = "fa-pause";
const playClass = "fa-play";
if (_elems.audio.paused) {
_elems.playpause.classList.remove("fa-pause");
_elems.playpause.classList.add("fa-play");
_elems.playpause.firstElementChild.classList.remove(pauseClass);
_elems.playpause.firstElementChild.classList.add(playClass);
}
else {
_elems.playpause.classList.remove("fa-play");
_elems.playpause.classList.add("fa-pause");
_elems.playpause.firstElementChild.classList.remove(playClass);
_elems.playpause.firstElementChild.classList.add(pauseClass);
}
}
@@ -178,8 +181,6 @@ LMS.mediaplayer = function () {
_elems.volumeslider = document.getElementById("lms-mp-volume-slider");
_elems.transcodingActive = document.getElementById("lms-transcoding-active");
$(_elems.transcodingActive).tooltip();
var source = _audioCtx.createMediaElementSource(_elems.audio);
source.connect(_gainNode);
_gainNode.connect(_audioCtx.destination);