If you have 2 users which is on the same webpage or url on different computers, how do you establish a data exchange connection between the two pc? Do you use WebRTC or use json file? Example is CubeSlam.
Cubeslam is a great example of webRTC. It actually has a small note about the technique and informs that they are using webRTC.
webRTC uses peer to peer technique so the stream from your camera never reaches a server. However, to set up the stream you need to do some signaling, and that signaling will be sent via a server.
Example of signaling:
Sending SDP messages (Session Description Protocol) with information of i.e. what will be sent in the stream.
ICE – Candidates is sent in order to find a good path between the two peers. Making sure there’s no firewalls in the way.
Discovery. The unique textstring you see in the URL probably identifies the session and makes it possible for the server to relay the signaling messages to the right peer.
JSONs part in all this is that you can implement the signaling using JSON. But you do not have to.
I think that a good start to know more about webRTC is the slides from the latest Google I/O. It also contains a link to a video of the presntation.