Room Event Listener
Receives room-level events. Register with Room.addEventListener.
Every method has an empty body, so an implementation overrides only the events it needs. Callbacks arrive on the main thread, onError excepted — see its own note.
An override that throws is caught and logged; the remaining listeners still run.
Functions
Called when the video you are sending was downgraded to VP8 because the server or a remote participant could not handle the codec you were using.
Called once per frame sent by a remote participant with Room.send.
Called when someone is waiting to be admitted to a room that requires entry permission. Nothing happens until you answer; ignoring the request leaves them waiting until the server times it out.
Confirms that the server processed an entry decision.
Called when the SDK detects an error locally or the server reports one for this room.
Called when a cellular call goes off-hook: an incoming call was answered, or the user dialled out.
Called when an answered or dialled call ends.
Called when a ringing call ends without being answered. Android cannot tell a declined call from a missed one, so both arrive here.
Called when an incoming cellular call starts ringing on the device.
Called at every step of the HLS lifecycle, once per state. Room.hlsState holds the latest state.
Called when the server confirms the livestream is running.
Called at every step of the livestream lifecycle, the intermediate ones included.
Called when the server confirms the livestream has stopped.
Called in the room that requested the relay when it fails, for example when the destination has no live session. Clear relay UI from here as well as from onMediaRelayStopped — a failure does not guarantee a stop event follows.
Called when a relay request sent from this room has been answered.
Called in the room that requested the relay, once its media is flowing into roomId.
Called in the room that requested the relay when the relay ends. In the destination room the relayed participants leave instead, through onParticipantLeft with LeaveReason.REMOVE_PEER_MEDIA_RELAY_STOP.
Called when another participant asks the local participant to turn their microphone on. Nothing changes until you answer.
Called when a remote participant becomes visible to this device — either the server announced them or one of their streams arrived first and the SDK created them from it.
Called when the server reports that a remote participant left. AI agents leave through here too.
Called when any participant's room mode changes, including a change the server forced.
Called when incoming remote streams of one kind stopped being delivered, after Room.pauseAllStreams.
Called when any participant is pinned or unpinned, by anyone. The participant's Participant.pinState already holds state.
Called when someone starts or stops sharing their screen. Room.getActivePresenterId reads the same value later.
Called when what this device is sending had to be degraded to fit the CPU or the uplink, and again when the limit clears.
Called when the server confirms cloud recording is running.
Called at every step of the cloud-recording lifecycle, the intermediate ones included.
Called when the server confirms cloud recording has stopped.
Called when incoming remote streams of one kind are flowing again, after Room.resumeAllStreams. Fires once per kind, as onPausedAllStreams does.
Called when the local participant has successfully joined the room.
Called once the session is over, on every exit path: Room.leave, Room.end, being removed by a host, the same participant ID joining from another device, or reconnection giving up.
Called on every connection-state transition. Fired on the main thread. Room.roomState holds the latest one.
Called when the room's active speaker changes. One speaker at a time — this is not a per-participant volume feed. Room.getActiveSpeakerId reads the same value later.
Called at every step of the real-time transcription lifecycle. A status the SDK does not know is not delivered.
Called for each transcribed utterance in the room, whoever spoke it — read TranscriptionText.getParticipantId to find out who.
Called when any participant, the local one included, changes the language they want incoming speech translated into.
Called at every step of the real-time translation lifecycle. A status the SDK does not know is not delivered.
Called for each utterance translated into the language this participant asked for with Room.changeTranslationLanguage.
Called when another participant asks the local participant to turn their webcam on. Nothing changes until you answer.
Called when a whiteboard is opened for the room.
Called when the room's whiteboard is closed.