From 94aa8acb939d69069076dad9cdb2fd3d5d099ce6 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 16 Nov 2020 15:35:25 +0530 Subject: [PATCH] Reduce latency to < 100ms --- src/components/WatchVideo.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index 1a94a54f..83db3bc8 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -179,8 +179,11 @@ export default { } if (this.audioplayer) { - if (Math.abs(this.audioplayer.currentTime - this.player.currentTime()) > 0.25) { - this.audioplayer.currentTime = this.player.currentTime() + + const delay = this.audioplayer.currentTime - this.player.currentTime() + + if (Math.abs(delay) > 0.1) { + this.audioplayer.currentTime = this.player.currentTime() - delay } } });