RoomEventListener

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.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

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.

Link copied to clipboard
open fun onDataReceived(data: DataMessage)

Called once per frame sent by a remote participant with Room.send.

Link copied to clipboard
open fun onEntryRequested(participantId: String, name: String, allow: () -> Unit, deny: () -> Unit)

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.

Link copied to clipboard
open fun onEntryResponded(participantId: String, decision: EntryDecision?)

Confirms that the server processed an entry decision.

Link copied to clipboard
open fun onError(error: VideoSDKError)

Called when the SDK detects an error locally or the server reports one for this room.

Link copied to clipboard
open fun onExternalCallAnswered(callType: CallType)

Called when a cellular call goes off-hook: an incoming call was answered, or the user dialled out.

Link copied to clipboard
open fun onExternalCallHangup(callType: CallType)

Called when an answered or dialled call ends.

Link copied to clipboard
open fun onExternalCallRejected(callType: CallType)

Called when a ringing call ends without being answered. Android cannot tell a declined call from a missed one, so both arrive here.

Link copied to clipboard
open fun onExternalCallRinging(callType: CallType)

Called when an incoming cellular call starts ringing on the device.

Link copied to clipboard
open fun onHlsStateChanged(state: HLSState, hlsUrl: HLSUrl?)

Called at every step of the HLS lifecycle, once per state. Room.hlsState holds the latest state.

Link copied to clipboard

Called when the server confirms the livestream is running.

Link copied to clipboard

Called at every step of the livestream lifecycle, the intermediate ones included.

Link copied to clipboard

Called when the server confirms the livestream has stopped.

Link copied to clipboard
open fun onMediaRelayError(roomId: String, error: String)

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.

Link copied to clipboard
open fun onMediaRelayRequestReceived(participantId: String, roomId: String, displayName: String, accept: () -> Unit, reject: () -> Unit)

Called when another room asks to relay its media into this one. Nothing is relayed until you answer with accept or reject.

Link copied to clipboard
open fun onMediaRelayRequestResponse(decision: RelayDecision?, decidedBy: String, roomId: String)

Called when a relay request sent from this room has been answered.

Link copied to clipboard
open fun onMediaRelayStarted(roomId: String)

Called in the room that requested the relay, once its media is flowing into roomId.

Link copied to clipboard
open fun onMediaRelayStopped(roomId: String, reason: String?)

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.

Link copied to clipboard
open fun onMicRequested(participantId: String, listener: MicRequestListener)

Called when another participant asks the local participant to turn their microphone on. Nothing changes until you answer.

Link copied to clipboard
open fun onParticipantJoined(participant: Participant)

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.

Link copied to clipboard
open fun onParticipantLeft(participant: Participant, reason: LeaveReason)

Called when the server reports that a remote participant left. AI agents leave through here too.

Link copied to clipboard
open fun onParticipantModeChanged(participantId: String, mode: Mode)

Called when any participant's room mode changes, including a change the server forced.

Link copied to clipboard

Called when incoming remote streams of one kind stopped being delivered, after Room.pauseAllStreams.

Link copied to clipboard
open fun onPinStateChanged(participantId: String, state: ParticipantPinState, pinnedBy: String?)

Called when any participant is pinned or unpinned, by anyone. The participant's Participant.pinState already holds state.

Link copied to clipboard
open fun onPresenterChanged(presenterId: String?)

Called when someone starts or stops sharing their screen. Room.getActivePresenterId reads the same value later.

Link copied to clipboard

Called when what this device is sending had to be degraded to fit the CPU or the uplink, and again when the limit clears.

Link copied to clipboard

Called when the server confirms cloud recording is running.

Link copied to clipboard

Called at every step of the cloud-recording lifecycle, the intermediate ones included.

Link copied to clipboard

Called when the server confirms cloud recording has stopped.

Link copied to clipboard

Called when incoming remote streams of one kind are flowing again, after Room.resumeAllStreams. Fires once per kind, as onPausedAllStreams does.

Link copied to clipboard
open fun onRoomJoined(switchRoomId: String? = null)

Called when the local participant has successfully joined the room.

Link copied to clipboard
open fun onRoomLeft(reason: LeaveReason)

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.

Link copied to clipboard
open fun onRoomStateChanged(roomState: RoomState)

Called on every connection-state transition. Fired on the main thread. Room.roomState holds the latest one.

Link copied to clipboard
open fun onSpeakerChanged(activeSpeakerId: String?)

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.

Link copied to clipboard

Called at every step of the real-time transcription lifecycle. A status the SDK does not know is not delivered.

Link copied to clipboard

Called for each transcribed utterance in the room, whoever spoke it — read TranscriptionText.getParticipantId to find out who.

Link copied to clipboard
open fun onTranslationLanguageChanged(participantId: String, language: String)

Called when any participant, the local one included, changes the language they want incoming speech translated into.

Link copied to clipboard

Called at every step of the real-time translation lifecycle. A status the SDK does not know is not delivered.

Link copied to clipboard

Called for each utterance translated into the language this participant asked for with Room.changeTranslationLanguage.

Link copied to clipboard
open fun onWebcamRequested(participantId: String, listener: WebcamRequestListener)

Called when another participant asks the local participant to turn their webcam on. Nothing changes until you answer.

Link copied to clipboard

Called when a whiteboard is opened for the room.

Link copied to clipboard

Called when the room's whiteboard is closed.