Rafi Sakib
Rafi Sakib

Reputation: 89

Right approach to create an architecture for multiparty video chat

I'm implementing a video chat app for multi-parties. In my app I used socket.io for event management and peer.js for offering connection between peers.

I implemented the mesh architecture in a way that, when anyone in a room starts a call, every peer is calling to every other peer in useEffect hook. So, suppose if A, B, C is in a room, then all of them is calling to other two peers. In this case when A is offering, B is answering and also calling back to A and therefore A is answering. If I'm not wrong, the second offering replaces the first one, right? And when peer D is joining later and calling to others, all four of them now again call each other which is not efficient, I think. So how can you manage to implement it efficiently so that existing calls remain and new offerings being made, or can you please tell me a better convenient approach? Thanks in advance.

Upvotes: 0

Views: 89

Answers (0)

Related Questions