aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2021-09-27 20:56:03 +0300
committerRblSb <msrblsb@gmail.com>2021-12-11 14:05:11 +0300
commit68488f8401e1b6a3bcc15033fde09319fc7ec64b (patch)
tree7c72d0161bb55210b478a7b1d06aa66cdb27bcf1 /src
parent3873224e8b764e4507fb127603314ed5412ead81 (diff)
Add rewind latency
Diffstat (limited to 'src')
-rw-r--r--src/client/Main.hx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 079ff50..b3eaea9 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -489,7 +489,9 @@ class Main {
else player.pause();
player.setPauseIndicator(!data.getTime.paused);
if (Math.abs(time - newTime) < synchThreshold) return;
- player.setTime(newTime);
+ // +0.5s for buffering
+ if (!data.getTime.paused) player.setTime(newTime + 0.5);
+ else player.setTime(newTime);
case SetTime:
final synchThreshold = settings.synchThreshold;
@@ -503,7 +505,7 @@ class Main {
player.setPlaybackRate(data.setRate.rate);
case Rewind:
- player.setTime(data.rewind.time);
+ player.setTime(data.rewind.time + 0.5);
case Flashback: // server-only
case SetLeader:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage