aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Main.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Main.hx')
-rw-r--r--src/client/Main.hx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 7b8228e..a7417fb 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -30,6 +30,7 @@ class Main {
public final settings:ClientSettings;
public var isSyncActive = true;
public var forceSyncNextTick = false;
+ public var isVideoEnabled = true;
public final host:String;
public var globalIp(default, null) = "";
public var isPlaylistOpen = true;
@@ -359,11 +360,13 @@ class Main {
}
public function toggleVideoElement():Bool {
- if (player.hasVideo()) player.removeVideo();
- else if (!player.isListEmpty()) {
+ isVideoEnabled = !isVideoEnabled;
+ if (!isVideoEnabled && player.hasVideo()) {
+ player.removeVideo();
+ } else if (isVideoEnabled && !player.isListEmpty()) {
player.setVideo(player.getItemPos());
}
- return player.hasVideo();
+ return isVideoEnabled;
}
public function isListEmpty():Bool {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage