From 0254afea71e32a7f3443d240e22fede4f51081dd Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 6 Apr 2022 18:47:30 -0700 Subject: [PATCH] Reduce latency jump amount --- webroot/js/components/latencyCompensator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webroot/js/components/latencyCompensator.js b/webroot/js/components/latencyCompensator.js index eead6d355..87dc586f6 100644 --- a/webroot/js/components/latencyCompensator.js +++ b/webroot/js/components/latencyCompensator.js @@ -76,6 +76,10 @@ class LatencyCompensator { return; } + if (this.player.seeking()) { + return; + } + if (this.inTimeout) { console.log('in timeout...'); return; @@ -175,7 +179,7 @@ class LatencyCompensator { latency > maxLatencyThreshold + MAX_JUMP_LATENCY ) { const seekPosition = - this.player.currentTime() + segment.duration * 2.4; + this.player.currentTime() + segment.duration * 2.0; console.log( 'latency', latency / 1000,