From 5dc2f94da2c6f9b08a87e5c4fa99f99540d1c1a7 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 8 Jun 2022 21:48:33 -0400 Subject: [PATCH] mor fixes guh --- NUXT/components/Player/index.vue | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index 9ec679d..3ce5fb6 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -40,11 +40,14 @@ position: absolute; transition: opacity 0.15s; border-radius: 0 100vh 100vh 0; + text-transform: none; + font-size: 0.5rem; " - @click.self="controlsHandler()" @dblclick.stop="skipHandler(-10)" + @click.self="controlsHandler()" > mdi-rewind + mdi-fast-forward +
mdi-skip-next @@ -163,7 +169,7 @@
@@ -299,9 +305,9 @@ export default { return { isFullscreen: false, controls: false, - skipping: false, seeking: false, contain: true, + skipping: 0, progress: 0, buffered: 0, watched: 0, @@ -357,23 +363,24 @@ export default { if (this.isFullscreen) this.exitFullscreen(); }, methods: { + // TODO: make accumulative onclick after first dblclick (don't set timeout untill stopped clicking) skipHandler(time) { this.skipping = time; setTimeout(() => { this.skipping = false; - }, 300); + }, 500); this.$refs.player.currentTime += time; }, - // TODO: fix dis controlsHandler() { if (!this.seeking) this.controls ? (clearTimeout(this.controls), (this.controls = false)) : setTimeout(() => { - if (!this.skipping) { + if (!this.skipping && !this.$refs.player.paused) { this.controls = setTimeout(() => { - if (!this.seeking) this.controls = false; + if (!this.seeking && !this.$refs.player.paused) + this.controls = false; }, 2345); } }, 300);