Participant
Someone in the room — you, or a remote participant.
Instances come from Room.localParticipant, Room.participants and the RoomEventListener callbacks; application code never constructs one. The same participant keeps the same object for as long as they are in the room, so it is safe to hold one in a tile and compare by id.
Attach a ParticipantEventListener with addEventListener to learn when their streams come and go — that, not polling streams, is how a tile gets its video.
The host controls — enableMic, disableMic, enableCam, disableCam, remove and setViewPort — act on a remote participant and throw when called on the local one. setQuality and setScreenShareQuality do nothing on the local one.
Every suspend action here needs a joined room. The people already in the room are announced while Room.join is still running; an action called in that window waits for the join to finish. Otherwise, before joining, after leaving or while reconnecting, code 3035 (ERROR_ACTION_PERFORMED_BEFORE_ROOM_JOINED) or 3065 (ERROR_ROOM_RECONNECTING) goes to onError and the call returns without throwing.
Inheritors
Properties
The display name for this participant.
Server-assigned participant ID, and the key this participant has in Room.participants.
Whatever metadata was attached when this participant joined, or null if they attached none. Fixed for the session; it never changes mid-session.
How this participant takes part. Updated just before onParticipantModeChanged fires for them.
Which of this participant's streams are pinned, room-wide. Updated just before onPinStateChanged fires for them; not pinned until then.
The quality this device last asked for with setQuality, starting at VideoQuality.HIGH.
Functions
Starts delivering this participant's stream and state events to listener.
Takes a still from your own camera and returns it base64-encoded, ready for an ImageView or an upload.
Subscribes this device to the participant's microphone: the way to receive it in a room joined with createRoom(autoConsume = false), and to receive it again after stopConsumingMicStreams.
Subscribes this device to the participant's camera: with createRoom(autoConsume = false), and again after stopConsumingWebcamStreams. Receive-side only, and waits for a join still running, as consumeMicStreams does.
Turns this participant's camera off. Not a request — see disableMic.
Mutes this participant's microphone. Unlike enableMic they are not asked — the server mutes them, and their "audio" stream disappears for everyone.
Asks this participant to turn their camera on. They decide — see enableMic; the request arrives as onWebcamRequested.
Microphone statistics, as a single object — not an array, unlike getVideoStats, because there is only ever one mic track.
Statistics for the audio captured with the screen share. The microphone is not included — that is getAudioStats.
Screen-share statistics, as a single object — the same fields as one getVideoStats entry, for the share stream rather than the camera.
Totals for the connection underneath this participant's media, as the server measures it: send.outgoingBitrate and receive.incomingBitrate in kbps, send.totalSentBytes and receive.totalReceivedBytes. A value the server did not report is null.
Camera statistics — one JSON object per RTP stream, so your own camera publishing a simulcast ladder gives one entry per layer and a remote camera gives one.
true when this participant is an AI agent rather than a person — cast to AgentParticipant to read its state.
Removes every registered ParticipantEventListener.
Removes a previously registered ParticipantEventListener.
Asks the server for a different simulcast layer of this participant's camera — drop a thumbnail tile to VideoQuality.LOW to save bandwidth, raise the speaker to VideoQuality.HIGH.
The same request as setQuality, for this participant's screen share instead of their camera.
Tells the server how large this participant's tile actually is, so it can pick the simulcast layer that fits instead of sending pixels you scale away.
Stops receiving this participant's microphone, freeing that downstream bandwidth — they are not muted and everyone else still hears them.
Stops receiving this participant's camera, freeing that downstream bandwidth — use it for tiles scrolled off screen. Their camera stays on for everyone else, and consumeWebcamStreams resubscribes.
Releases a pin pin set, firing the same onPinStateChanged on all participants.