ianramzy / decentralized-video-chat

🚀 Zipcall- Acquired @ 250k users 🚀 Peer to peer browser video calling platform with unmatched video quality and latency.
https://zipcall.io
3.31k stars 502 forks source link

Code to notify user when room is full is in available but it does not work! #30

Open iambenkay opened 4 years ago

iambenkay commented 4 years ago

I noticed that the following line quotes here should limit users once the room has 2 participants but it does not work. https://github.com/ianramzy/decentralized-video-chat/blob/6101706fa742015e6b9d94b93c58dbaf2fab3eeb/server.js#L91

Chaphasilor commented 4 years ago

Could you elaborate on this? What exactly is not working here?

ianramzy commented 4 years ago

The problem here is that once two people are connected in a room the server disconnects, essentially making the room name available again for more to join. To fix this you would need to keep a persistent connection to the server even after calls have connected.

On Wed, Apr 15, 2020 at 5:44 AM Chaphasilor notifications@github.com wrote:

Could you elaborate on this? What exactly is not working here?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ianramzy/decentralized-video-chat/issues/30#issuecomment-613935636, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIKTWLIKCHBQEIEP7PXVFMTRMV6XVANCNFSM4MIKQOEA .

Chaphasilor commented 4 years ago

How about instead of a persistant connection, we make the clients, possibly only the 'host' (or innitiator of the call) ping the server every few minutes? The server just keeps a list of active rooms and removes the rooms after not getting a ping for a few minutes?

Or we could make both clients ping the server and the server hashes each client's IP and links it to the room, so than once one client disconnects from a room, another client can join. We'd need to increase the ping interval, but that shouldn't be an issue.

This should guarantee anonymity for the clients and prevent this issue from happening?

ianramzy commented 4 years ago

Yes that would work, and be a simple solution. Another option is to try and get group calling working.

How about instead of a persistant connection, we make the clients, possibly only the 'host' (or innitiator of the call) ping the server every few minutes? The server just keeps a list of active rooms and removes the rooms after not getting a ping for a few minutes?

Or we could make both clients ping the server and the server hashes each client's IP and links it to the room, so than once one client disconnects from a room, another client can join. We'd need to increase the ping interval, but that shouldn't be an issue.

This should guarantee anonymity for the clients and prevent this issue from happening?

Chaphasilor commented 4 years ago

Wouldn't we still need limit the size of the call? Depending on the topology we use, we can't support a call with 8 people or more...