I am developing a multiuser video chat application, where each user has a different role.
While listening for RTCPeerConnection.onAddStream
event, I am not able to figure out the source of the mediaStream.
Is there an easy way to add metadata at the source of MediaStream, which can be helpful at the receiving end?
Presently I am solving this issue through 'signalling'. While creating the MediaStream, I share the id through socket, and at the receiving end, I figure out by comparing the ids from RTCPeerConnection.getRemoteStreams()
. But the problem is, if someone joins in late, she misses the information.
Please let me know if you have any suggestion on this.