Search code examples
javascripthtmlsocial-networkingwebrtcpeerjs

Using user ID with WEBRTC


I'm trying to develop a WEBRTC videochat on a website. I've already create my database with users and their unique ID but I'm a little confused to how I can use this ID to connect clients with PeerConnection. I've already read this http://www.html5rocks.com/en/tutorials/webrtc/basics/ and other documentation but I'm not understanding if i can use users' Id in some way in the remote/local description or I have to use other solutions like PeerJs?

Thanks.


Solution

  • In short, WebRTC does not specify the signalling channel (it is up to the developer), ie how users discover and know about each other.

    Some tutorials tend to skip the signalling entirely, which is a shame. It might be better to set up your signalling first, verify that it works using your ID method of discovery, and then add WebRTC on top of that.