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. ...
Get Programming WebRTC now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.