ws-scrcpy
ws-scrcpy copied to clipboard
possible to disable controls
Hi,
On scrcpy there is a flag, --no-control which will disable controls (everything which can interact with the device: input keys, mouse events, etc), is it available on ws-scrcpy or any ideas on how to go about it.
Thanks
Hi.
Unlike the original server in scrcpy, server from my fork always accepts control events from users.
Here is the code responsible for handling events: https://github.com/NetrisTV/scrcpy/blob/6b510b71a8433ad15f17318c7ad78b1619959af0/server/src/main/java/com/genymobile/scrcpy/WSServer.java#L130-L131
What exactly are you trying to achieve?
user 1 : using device user 2: can only view screen and will not have access to control it and also user-2 should see a tag in device-list page as busy or in-use.
@drauggres , any update on this ? , i am also trying to achieve the same as @krishtoautomate , or can you please suggest any other way to achieve this?
@drauggres , any update on this ?
No, nothing has changed. In my case I need everyone to be able to control a device. It will take a lot of work to implement this properly, not breaking it for me.
can you please suggest any other way to achieve this?
You can change server side to process control messages only from the first client if there are more than one.
- add a flag to
SocketInfo
class - in
WebSocketConnection.join()
ifsockets
is empty then set the flag - check the flag in
WSServer.onMessage()
and process messages only from sockets with the flag - reassing the flag to a next socket on
WebSocketConnection.leave()
when leaving socket had the flag