Event Properties
string
Event type. Always
"webrtc.signaling.answer" for this event.object
Event data object containing WebRTC answer information.
object
The SDP (Session Description Protocol) answer object. This is an RTCSessionDescription object that needs to be set as the remote description.Example:
Sending Answer
After receiving a WebRTC offer, you need to create an answer and send it back. Here’s how to send the answer:- The
sdpparameter indata.sdpshould be anRTCSessionDescriptionobject (or equivalent plain object) with:type:"answer"sdp: The SDP string containing the answer description
- Send the answer immediately after you receive an offer and create an answer using
peerConnection.createAnswer() - Use
peerConnection.localDescriptionas thesdpvalue when sending
Receiving Answer
When you receive an answer (if you sent an offer), handle it like this:- When to send: Send an answer immediately after receiving an offer and creating an answer with
peerConnection.createAnswer() - What to send: Send
peerConnection.localDescription(which is an RTCSessionDescription object) as thesdpvalue - WebRTC signaling is sent through the unified WebSocket connection