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.hx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/Player.hx b/src/client/Player.hx
index e5ea87c..64248fe 100644
--- a/src/client/Player.hx
+++ b/src/client/Player.hx
@@ -279,8 +279,11 @@ class Player {
if (!main.isLeader()) {
// user click, so we can unpause by removing leader
// (doesn't work in Firefox because of no video click propagation)
- final allowUnpause = (hasAutoPause && inUserInteraction);
- if (allowUnpause || main.hasUnpauseWithoutLeader()) {
+ var allowUnpause = hasAutoPause && inUserInteraction;
+ if (!allowUnpause) allowUnpause = main.hasUnpauseWithoutLeader();
+ // do not remove leader with custom rate
+ if (getPlaybackRate() != 1) allowUnpause = false;
+ if (allowUnpause) {
main.removeLeader();
} else {
// paused and no leader - instant pause
@@ -299,7 +302,9 @@ class Player {
});
if (hasAutoPause) {
// do not remove leader if user cannot request it back
- if (main.hasPermission(RequestLeaderPerm)) main.toggleLeader();
+ if (main.hasPermission(RequestLeaderPerm) && getPlaybackRate() == 1) {
+ main.removeLeader();
+ }
}
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage