From befeba7d1b1a6fe8b8ca436f2a3b64cf944bdb0c Mon Sep 17 00:00:00 2001 From: Kenny <27463495+Frontesque@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:25:25 -0400 Subject: [PATCH] perf: :zap: Fix human time being called way too much (3/3) --- NUXT/components/Player/seekbar.vue | 2 +- NUXT/components/Player/watchtime.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NUXT/components/Player/seekbar.vue b/NUXT/components/Player/seekbar.vue index 0edc2c8..22aa621 100644 --- a/NUXT/components/Player/seekbar.vue +++ b/NUXT/components/Player/seekbar.vue @@ -46,7 +46,7 @@ }" >
- {{ $vuetube.humanTime(value) }} + {{ $vuetube.humanTime(value) }}
diff --git a/NUXT/components/Player/watchtime.vue b/NUXT/components/Player/watchtime.vue index fb53982..c8b8688 100644 --- a/NUXT/components/Player/watchtime.vue +++ b/NUXT/components/Player/watchtime.vue @@ -49,6 +49,7 @@ export default { watch: { controls(newVal) { if (newVal) { // controls are VISIBLE + this.updateWatchTime(); // Call to immediately update this.runWatchTimeUpdates = setInterval(this.updateWatchTime, 250); } else { // Controls are INVISIBLE clearInterval(this.runWatchTimeUpdates);