perf: Fix human time being called way too much (3/3)

This commit is contained in:
Kenny 2022-08-10 16:25:25 -04:00
parent 3392ff1bd7
commit befeba7d1b
2 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,7 @@
}"
></canvas>
<div class="text-center pb-4" style="font-size: 0.8rem">
<b>{{ $vuetube.humanTime(value) }}</b>
<b v-if="seeking">{{ $vuetube.humanTime(value) }}</b>
</div>
</div>
</template>

View File

@ -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);