Skip to main content
Triggered when a WebRTC offer is received through the unified WebSocket connection. WebRTC signaling is sent through the same WebSocket connection as other events, eliminating the need for a separate WebRTC signaling connection.

Event Properties

string
Event type. Always "webrtc.signaling.offer" for this event.
object
Event data object containing WebRTC offer information.
object
The SDP (Session Description Protocol) offer object. This is an RTCSessionDescription object that needs to be set as the remote description.Example:

Receiving Offer

When you receive a WebRTC offer (typically sent by the server), handle it like this:
Key Points:
  • The sdp parameter in data.sdp is an RTCSessionDescription object with:
    • type: "offer"
    • sdp: The SDP string containing the offer description
  • After receiving an offer, you should:
    1. Create an RTCPeerConnection
    2. Set the offer as remote description
    3. Create and send an answer
    4. Set up ICE candidate handler to send candidates
  • When received: The server typically sends the offer when establishing a WebRTC connection
  • What to do: After receiving an offer, create an answer and send it back, then send ICE candidates as they’re generated
  • All WebRTC signaling (offer, answer, ICE candidates) is sent through the unified WebSocket connection using the encapsulated event types. There is no need for a separate WebRTC signaling WebSocket connection.