player cleanup, fixes

This commit is contained in:
ThaUnknown 2020-09-24 21:31:23 +02:00
parent dd10afb8a0
commit dad87aab79
3 changed files with 32 additions and 40 deletions

View file

@ -225,14 +225,14 @@ video::cue {
}
.controls input[type=range]::-webkit-slider-thumb {
height: 0px;
width: 0px;
height: 0;
width: 0;
border-radius: 50%;
background: var(--accent-color);
cursor: pointer;
-webkit-appearance: none;
margin-top: 1px;
transition: all .1s ease
margin-top: 2px;
transition: all .1s ease;
}
#nowPlayingDisplay {

View file

@ -132,41 +132,33 @@
</video>
<a href="#player" class="w-full h-full"></a>
<div class="player d-none flex-column justify-content-between w-full h-full">
<div class="h-full w-full d-flex flex-column justify-content-between" id="ptoggle">
<div class="stats row">
<div id="nowPlayingDisplay" class="col ts">
</div>
<div class="d-flex col justify-content-center">
<div class="d-flex">
<span class="material-icons">
people
</span>
<span class="ts" id="peers">-</span>
</div>
<div class="d-flex">
<span class="material-icons">
arrow_downward
</span>
<span class="ts" id="downSpeed">-</span>
</div>
<div class="d-flex">
<span class="material-icons">
arrow_upward
</span>
<span class="ts" id="upSpeed">-</span>
</div>
</div>
<div class="col d-flex justify-content-end">
<a id="dl">
<span class="material-icons">
get_app
</span>
</a>
</div>
<div class="stats row">
<div id="nowPlayingDisplay" class="col ts">
</div>
<div id="buffering" class="align-self-center hidden">
<div class="d-flex col justify-content-center">
<span class="material-icons">
people
</span>
<span class="ts" id="peers">-</span>
<span class="material-icons">
arrow_downward
</span>
<span class="ts" id="downSpeed">-</span>
<span class="material-icons">
arrow_upward
</span>
<span class="ts" id="upSpeed">-</span>
</div>
<div>
<div class="col d-flex justify-content-end">
<a id="dl" class="material-icons">
<span class="material-icons">
get_app
</span>
</a>
</div>
</div>
<div id="ptoggle" class="h-full d-flex justify-content-center align-items-center">
<div id="buffering" class="hidden">
</div>
</div>
<div class="controls d-flex">

View file

@ -227,9 +227,9 @@ function toTS(sec) {
async function playVideo() {
try {
await video.play();
btnpp.innerHTML = "pause";
bpp.innerHTML = "pause";
} catch (err) {
btnpp.innerHTML = "play_arrow";
bpp.innerHTML = "play_arrow";
}
}
@ -237,7 +237,7 @@ function btnpp() {
if (video.paused) {
playVideo();
} else {
btnpp.innerHTML = "play_arrow";
bpp.innerHTML = "play_arrow";
video.pause();
}
}