Setting Up the Peer Connection
All right. Your video-call app is coming together. You’ve prepared the UI and set up the signaling channel for users to join whenever they are ready, and now you’ve got streaming video set up on the self side of the connection. It’s time to put all of those pieces together and get a peer connection set up and established using WebRTC.
Let’s kick things off by returning to the top of main.js. Once there, you can modify the $self object to include an rtcConfig property set to null. Eventually, $self.rtcConfig will include some important WebRTC configuration values (see Configuring a WebRTC App for Public Deployment). But for testing WebRTC on a local network, initially setting the configuration to null will suffice. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access