SyncTube icon indicating copy to clipboard operation
SyncTube copied to clipboard

Disable Leader

Open fosytherrac opened this issue 2 years ago • 5 comments

Is there a way to disable the "Leader"?

I want everyone to be able to Stop and Play without being the "Leader". This is the reason my friends wont use it :(

If there isnt, is there a way you could implement such a feature that can turn on/off the "Leader" control? (via environment variable or toggle switch)

fosytherrac avatar Feb 07 '23 11:02 fosytherrac

You can try {"requestLeaderOnPause": true} in user/config.json, so every play/pause event will give/remove leader automatically. Because of browser limitations, you cannot detect if pause is triggered by player interface click, i think, only listen when pause is happened. And pause event can be triggered by some unwanted events, like buffering or tab switch, see https://github.com/RblSb/SyncTube/issues/13 As alternative there is currently right click on Leader button for fast pause, long tap on touch devices, and alt-P hotkey. We can put custom Pause button on page somewhere, but not sure how else to improve this situation.

RblSb avatar Feb 08 '23 08:02 RblSb

Yes! This almost works great. But this unfortunately only works with Pausing.

Is there a way to add it to also have the same function on pressing play?

fosytherrac avatar Feb 08 '23 22:02 fosytherrac

Unpause in this mode works for the person who paused it. But yea, i can maybe test additional option when evebody can unpause, if you still interested.

RblSb avatar Mar 12 '23 22:03 RblSb

this would be very cool, i am sure this would improve the project even more! but dont stress about it. :)

fosytherrac avatar Mar 15 '23 19:03 fosytherrac

That you need to click the leader button before you can continue video playback is really annoying. Even a workaround for that would be great. requestLeaderOnPause is very nice though.

haveachin avatar Dec 28 '23 22:12 haveachin

I improved this option a bit in https://github.com/RblSb/SyncTube/commit/0634cc7c846b7385439b32cb3b92dc67bc351a5f, so you can unpause raw videos when someone else is a leader by clicking on paused video safely. Sadly doesn't work for youtube player, because i cannot catch real clicks even with some invisible player overlay and then pass it through overlay. Allowing non-user play events can be pretty bad and break any pause stability with enough clients...

So i added it with unpauseWithoutLeader option too.

RblSb avatar Jan 25 '25 13:01 RblSb

very cool, thank you 👍

fosytherrac avatar Mar 27 '25 09:03 fosytherrac