Participant Event Listener
Receives events for one participant. Register with Participant.addEventListener.
Every method has an empty body, so an implementation overrides only the events it needs. Callbacks arrive on the main thread, except for the onStreamEnabled replay that Participant.addEventListener performs on the registering thread.
An override that throws is swallowed; the remaining listeners still run.
Functions
Called after each conversational turn with the agent's own timings, model choices and the text of the turn. Register it on an AgentParticipant, like onAgentTranscriptionReceived.
Called when an AI agent moves between listening, thinking and speaking — drive the agent's on-screen indicator from this.
Called with each transcript segment produced while an AI agent is in the room, covering what the agent heard as well as what it said.
Called when end-to-end encryption starts working or fails on one of this participant's streams.
Called when this participant turns their microphone, camera or screen share on or off, whether or not this device receives it. Fired on the main thread.
Called when this participant stops publishing a track — they muted, turned the camera off, or stopped sharing. Drop any view bound to it.
Called when this participant starts publishing a track — their camera, microphone or screen share. This is where a tile gets something to render.
Called when delivery of one of this participant's streams is suspended — by RTCStream.pause here, or by the server shedding it.
Called when a paused stream from this participant is flowing again.