Data channels are not used in this example but negotiating them in the SDP (using the checkbox in supported browsers) avoids video freezes (on the right video) if the alwaysNegotiateDataChannels configuration option is used.
View the console to see logging. The MediaStream object localStream, and the RTCPeerConnection
objects pc1 and pc2 are in global scope, so you can inspect them in the console as
well.
For more information about RTCPeerConnection, see Getting Started With WebRTC.
View source on GitHub