mirror of https://github.com/VueTubeApp/VueTube
perf: ⚡ Fix human time being called way too much (3/3)
This commit is contained in:
parent
3392ff1bd7
commit
befeba7d1b
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue