tom-james-watson / p2p.chat

p2p video conferencing powered by WebRTC.
MIT License
686 stars 134 forks source link

Feature: passive participation without camera & microphone permissions #41

Open dumblob opened 2 years ago

dumblob commented 2 years ago

There are many situations when it's either undesirable for connecting parties to actively participate (e.g. conferences or low-bandwidth lines etc.) or when the connecting subject itself doesn't want to (or can't due to missing camera/mic) actively participate but only passively consume.

This could be elegantly solved by implementing a "private" access which would ask for camera & microphone permissions by default and "public" access which would be the default after opening a link and which wouldn't ask for any permissions. The mic and camera buttons would then act as "upgrading" buttons which would:

  1. request camera & mic permissions
  2. request password if the room is of type "conference" - i.e. everybody who wants to stream to others must know the password otherwise they can only passively watch & listen (session key should be cached for the case one would turn off & on the camera/mic to avoid requesting the password again)
  3. profit (connect and stream camera & mic)

The advantage of this on-go solution (i.e. "upgrading" & "downgrading") compared to up-front determination of the roles & passwords is one can easily switch roles (which saves bandwidth but more importantly is natural without the feel of "filling forms" and without the need to close web browser and open it again just to switch role or correct the mistake of not remembering to click some special button because I'm not only a passive consumer but an active conference speaker).

Technically this shall actually simplify the current behavior as there wouldn't be any "welcome page" with "requst permissions" button (as opening any room URL would jump straight into the room). And the only thing this proposal adds is the password functionality (there can be some "lock" icon available "in color" to everyone who already knows the password - clicking would indefinitely switch between "password protected streaming" and "everybody can stream" while asking for new password in the former case and asking "are you sure?" in the latter case :wink:). This "lock" icon would be dimmed for all other users (i.e. those who did not "upgrade" their participation) to indicate it's a room of type "conference" and thus requiring password to begin streaming.

Thoughts?