aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-10-10 20:58:39 +0300
committerRblSb <msrblsb@gmail.com>2020-10-10 20:58:39 +0300
commit66fb4a0158d8cfd9887db04ba44b7dd3f38cbdd3 (patch)
treea207d13faa6436569ab3c379fb3d870301721096 /src
parent7df8a33c7b1c6cc7d18bde2586a3224b02686a95 (diff)
Keep video cache on play event
Diffstat (limited to 'src')
-rw-r--r--src/client/Main.hx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 73f733c..b714b38 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -412,7 +412,12 @@ class Main {
case Play:
player.setPauseIndicator(true);
if (isLeader()) return;
- player.setTime(data.play.time);
+ final synchThreshold = settings.synchThreshold;
+ final newTime = data.play.time;
+ final time = player.getTime();
+ if (Math.abs(time - newTime) >= synchThreshold) {
+ player.setTime(newTime);
+ }
player.play();
case GetTime:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage