Revising the Signaling Logic on the Client
We’re going to follow almost the same process for working up the multipeer app as we did for the original one-to-one, peer-to-peer app in Chapter 3, Establishing a Peer-to-Peer Connection. You can work from the starter peer-to-peer app for you to work from in www/multipeer/, which will help you see more clearly how a peer-to-peer app becomes a multipeer one.
Stripping Back Self and Peer
To ease into things, let’s revisit the $self and $peer objects and prepare them for a multipeer app. By doing this work first, you’ll be able to improve the signaling-channel logic without filling your JavaScript console with a bunch of wacky errors coming off of RTCPeerConnection.
In all of your work with WebRTC so ...
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.