MatrixCall— 1:1 calls between two Matrix usersGroupCall— multi-party calls across a room
MatrixRTC (LiveKit-based) is the recommended path for new multi-party calling features.
GroupCall is the legacy implementation. See the MatrixRTC guide for the modern approach.1:1 calls with MatrixCall
Placing an outbound call
UsecreateNewMatrixCall() to create a call object, then invoke placeVoiceCall() or placeVideoCall() to initiate it.
Receiving an incoming call
Listen forCallEventHandlerEvent.Incoming on the client to receive inbound calls:
Hanging up
Call states and lifecycle
TheCallState enum describes every stage a call goes through:
Fledgling → WaitLocalMedia → CreateOffer → InviteSent → Connecting → Connected → Ended.
CallEvent reference
CallErrorCode values
CallErrorCode values
| Code | Meaning |
|---|---|
UserHangup | The local user ended the call |
LocalOfferFailed | Could not create a local WebRTC offer |
NoUserMedia | Microphone/camera access was denied or unavailable |
UnknownDevices | Unknown devices present — encryption barrier |
SendInvite | Failed to send the invite event |
IceFailed | No ICE connectivity could be established |
InviteTimeout | Remote party did not answer in time |
AnsweredElsewhere | A different device answered the call |
UserBusy | Remote party rejected as busy |
Media handling with MediaHandler
client.getMediaHandler() returns the MediaHandler instance that manages local camera and microphone streams. Configure it before or during a call.
MediaHandler emits MediaHandlerEvent.LocalStreamsChanged when its streams change:
Screensharing
Multi-party calling with GroupCall
GroupCall manages a mesh of 1:1 MatrixCall objects across all participants in a room.