Participant Class Properties - iOS
All properties are read-only. The SDK updates them, for example pinState after a pin and mode after a mode change.
id
-
type:
String -
Unique id of the participant who has joined the room.
-
For the local participant, it is empty until
onRoomJoined()when you passed noparticipantIdtocreateRoom().
displayName
-
type:
String -
It will be the
displayNameof the participant. -
For the local participant, it is empty until
onRoomJoined()when you passed noparticipantNametocreateRoom().
videoQuality
-
type: enum
VideoQuality -
It will be the video quality you asked to receive from this participant with
setQuality():.low,.mediumor.high. It starts as.high.
isLocal
-
type:
Bool -
It tells whether the participant is the
localParticipant(you). It istruefor the local participant andfalsefor a remote participant.
streams
-
type:
[String: RTCStream] -
It will represent the streams of the participant, keyed by stream ID. Streams could be
audio,videoorshare. -
For a remote participant, it holds only the streams that this device receives.
pinState
-
type:
ParticipantPinState -
It will represent the pin state of the participant.
camandshareareBool, and aretruewhen the participant's camera or screen share is pinned. -
It changes when you call
pin()orunpin(), and when any participant pins or unpins this participant.
mode
-
type:
Mode -
It will represent the mode of the participant. Modes could be
SEND_AND_RECV(sends and receives media),RECV_ONLY(only receives media) orSIGNALLING_ONLY(no media). -
It changes when
onParticipantModeChanged()is triggered.
metaData
-
type:
[String: Any]? -
It will be the extra data passed as
metaDatatocreateRoom()by this participant. It isnilwhen none was passed.
isAgent
-
type: method,
isAgent() -> Bool -
It returns
truewhen the participant is an AI agent. -
An agent participant is an
AgentParticipant, a subclass ofParticipant. Cast it to callgetAgentId()(String?) andgetAgentState()(AgentState).
Example
if participant.isAgent(), let agent = participant as? AgentParticipant {
print("Agent \(agent.getAgentId() ?? "") is \(agent.getAgentState().rawValue)")
}
Got a Question? Ask us on discord

