m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.95k stars 449 forks source link

Dim or blur screen for one user #309

Open grbfst opened 1 year ago

grbfst commented 1 year ago

Weird question, but suppose I want to have either the admin or a selected user not see what's going on on the screen. Case: someone using the shared browser is entering his username but does not want anyone else to see so wants to blur the screen for others. Is there a way to do this?

yesBad commented 1 year ago

Not a feature currently. You could lock the room for the time being & kick everyone.

grbfst commented 1 year ago

Anyone who can think of a solution? I'm not a complete Noob in programming but it I can't think of a way. Somewhere along the line the WebRTC stream to one participant needs to be blurred. Willing to donate.

m1k1o commented 1 year ago

Currently all participants receive the same content. In order to change it for one user, that user would need to either use custom track, data sent to him need to be intercepted / replaced or that user needs to be disconnected.

As @yesBad pointed out, you could lock room so that nobody can join, kick that one user. When you are ready, you can allow joining again and that user might join again.

That seems to be easiest solution, you might want to maybe copy "kick" functionality to a "temporary-kick" that basically just instead of kicking user, telling them that and removing password from local storage just tells user that he has been temporary excluded from the room an should wait until admin lets him in again. It would retry every X-seconds in background to login and when the lock would be lifted, he would join again.

mbattista commented 1 year ago

I see three possibilities for this:

  1. With pion replace the track of every recipient with a track that sends a black picture. This very hard to implement. For example do we need a video stream of this black picture, which means a second gstreamer pipeline. Also will this mean a complex state management, since new recipients also should connect with the black picture.
  2. Use gstreamer blur to blur the stream for everybody, even the person typing. Not optimal for the person typing, but safe and much easier to implement.
  3. Chromium has a setting flag, to not briefly show the character types into the password field. This could be implemented very easy for all the chromium based browsers. https://stackoverflow.com/questions/13268004/how-to-hide-the-letters-of-a-password-while-typing#:~:text=Just%20go%20into%20general%2C%20security,when%20you%20type%20it%20in.