I have a problem with WebRTC group chatting. [I have achived this on my code]
client-1create's offerSDP forclient-2client-2accepts the offerSDP and replay answerSDP to theclient-1(the creator)client-1accept 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.
- Now Both
client-1andclient-2will get the answerSDP fromclient-3and both will receviesclient-3'svideo.
Problem:
client-1has [localvideo, client-2_video, client-3_video]client-2has [localvideo, client-1_video, client-3_video]client-3has [localvideo, client-1_video]. Here this client not knowing about client-2
why? 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-3would need to receive an offer fromclient-1ANDclient-2. And it would need to send a unique answer to both of those other clients as well.