I have a problem with WebRTC group chatting. [I have achived this on my code]
client-1
create's offerSDP for client-2
client-2
accepts the offerSDP and replay answerSDP to the client-1
(the creator)client-1
accept and set it as remoteDescription. Now video chat happening.fine,
Now client-3
comes in.
In my code client-3
receives client-1's
offerSDP and emit's answerSDP to all the client's present in the server.
client-1
and client-2
will get the answerSDP from client-3
and both will recevies client-3's
video.Problem:
client-1
has [localvideo, client-2_video, client-3_video]client-2
has [localvideo, client-1_video, client-3_video]client-3
has [localvideo, client-1_video]. Here this client not knowing about client-2why? what i have to do here? Helo me please.
You need to exchange a unique offer/answer pair for each connection. It's not possible to re-use them for different connections.
In your example client-3
would need to receive an offer from client-1
AND client-2
. And it would need to send a unique answer to both of those other clients as well.