webwebrtcdata-exchange

Exchange data between 2 user at the same url


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.


Solution

  • 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:

    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.