Group Call Events

The SDK emits group call events for signaling, participant changes, and call lifecycle:

client.onGroupCallEvent((event) => {
  switch (event.type) {
    case 'OFFER':
      // Handle incoming SDP offer from a participant
      break;
    case 'ANSWER':
      // Handle SDP answer
      break;
    case 'ICE':
      // Handle ICE candidate
      break;
    case 'JOIN':
      // A participant joined the call
      break;
    case 'LEAVE':
      // A participant left the call
      break;
    case 'END':
      // The call has ended
      break;
  }
});

Event fields

  • type, event type: OFFER, ANSWER, ICE, JOIN, LEAVE, END
  • groupId, the group the call belongs to
  • callId, unique call session identifier
  • fromUserId, the participant who triggered the event
  • sdp, SDP payload (for OFFER/ANSWER events)
  • ice, ICE candidate (for ICE events)