↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

How to write video-conferencing application using WebRTC?

The page explains a multi-user video-conferencing setup built on WebRTC. It says to use a peer-to-peer model with all peers interconnected, keep a default signaling channel active for room listings and participation requests, and create a separate socket for each participant using a unique id.

Reading notes
#

  • It recommends reusable functions for creating offers and answers, plus a signaling-channel function that opens a new socket on each invocation.
  • It suggests uniquely identifying the current user and preferring socket.io because it supports multiplexing.
  • On page load, the default-channel should stay active to show active rooms and receive participation requests.
  • A room creator should keep transmitting room details over the default-channel at intervals of 3 or 5 seconds.
  • A participant should send a participation request over the default-channel together with a unique id.
  • The room owner should open a new socket for that participant, create an offer quickly, and send the offer SDP over that socket.
  • The participant should set the remote description from the offer, create an answer, and send the answer SDP back through the same socket.
  • Both sides should exchange ICE candidates over the same socket until the handshake is complete.
  • After a successful handshake, the participant’s details should be transmitted to other connected sockets so they can make an automatic participation request to that new participant.