webrtc Getting started with webrtc Setting up a WebRTC-based communication system


Example

To setup a WebRTC-based communication system, you need three main components:

  1. A WebRTC signaling server

    To establish a WebRTC connections, peers need to contact a signaling server, which then provides the address information the peers require to set up a peer-to-peer connection. Signaling servers are for example:

    • signalmaster: Lightweight, JavaScript-based signaling server
    • NextRTC: Java-based signaling server
    • Kurento: Comprehensive WebRTC framework
    • Janus: General purpose WebRTC Gateway
  2. A WebRTC client application

    The client accesses either a browser's WebRTC implementation through a JavaScript API or uses a WebRTC library (i.e. as part of a desktop or mobile app). To establish the connection to a peer, the client first needs to connect to the signaling server. Examples for WebRTC clients are:

  3. A STUN/TURN server

    Session Traversal Utilities for NAT (STUN) enables peers to exchange address information even if they are behind routers employing Network Adress Translation (NAT). If network restrictions prevent peers from communication directly at all, the traffic is routed via a Traversal Using Relays around NAT (TURN) server. You find a detailed and graphical explanation of STUN and TURN at http://www.avaya.com/blogs/archives/2014/08/understanding-webrtc-media-connections-ice-stun-and-turn.html. Examples for WebRTC STUN/TURN servers are:

    • coturn combines STUN and TURN and is typically part of a fully-fledged WebRTC infrastructure.
    • Janus WebRTC Gateway comes with an integrated STUN/TURN server.