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, ENDgroupId, the group the call belongs tocallId, unique call session identifierfromUserId, the participant who triggered the eventsdp, SDP payload (for OFFER/ANSWER events)ice, ICE candidate (for ICE events)