WebRTC Chat

Demo

A password is required to use this demo

Technologies Used and Rationale

  • Web APIs
    • WebSockets
      • Used to connect to signaling endpoint
    • WebRTC
      • Peer-to-peer communication API used to send message data between chat participants
  • AWS API Gateway and AWS Lambda
    • Serverless signaling solution
    • Relays connection data between peers

Implementation Notes

  • Signaling walkthrough with Alice and Bob
    1. Alice connects to the signaler, then she gets back an ID
    2. Alice sends her ID to Bob via text message or messenger pigeon
    3. Bob connects to the signaler, and sends a connection offer routed through Alice's ID
    4. Alice receives the offer, alongside Bob's ID, from the signaler
    5. Alice creates an answer, and she sends it to Bob through the signaler using Bob's ID
    6. Bob receives the answer, and if all goes well, connection is established
    7. Both Alice and Bob disconnect from the signaler