aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Player.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Player.hx')
-rw-r--r--src/client/Player.hx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/Player.hx b/src/client/Player.hx
index ad10814..cdbccfd 100644
--- a/src/client/Player.hx
+++ b/src/client/Player.hx
@@ -280,8 +280,14 @@ class Player {
public function refresh():Void {
if (items.length == 0) return;
+ final time = getTime();
removeVideo();
setVideo(itemPos);
+ // restore server time for leader with next GetTime
+ if (main.isLeader()) {
+ setTime(time);
+ main.forceSyncNextTick = true;
+ }
}
function duration(time:Float):String {
@@ -323,6 +329,10 @@ class Player {
return items[itemPos].duration;
}
+ public function isVideoLoaded():Bool {
+ return player.isVideoLoaded();
+ }
+
public function play():Void {
if (!main.isSyncActive) return;
if (player == null) return;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage