Skip to main content
Version: 4.x.x

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 no participantId to createRoom().


displayName​

  • type: String

  • It will be the displayName of the participant.

  • For the local participant, it is empty until onRoomJoined() when you passed no participantName to createRoom().


videoQuality​

  • type: enum VideoQuality

  • It will be the video quality you asked to receive from this participant with setQuality(): .low, .medium or .high. It starts as .high.


isLocal​

  • type: Bool

  • It tells whether the participant is the localParticipant (you). It is true for the local participant and false for a remote participant.


streams​

  • type: [String: RTCStream]

  • It will represent the streams of the participant, keyed by stream ID. Streams could be audio, video or share.

  • 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. cam and share are Bool, and are true when the participant's camera or screen share is pinned.

  • It changes when you call pin() or unpin(), 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) or SIGNALLING_ONLY (no media).

  • It changes when onParticipantModeChanged() is triggered.


metaData​

  • type: [String: Any]?

  • It will be the extra data passed as metaData to createRoom() by this participant. It is nil when none was passed.


isAgent​

  • type: method, isAgent() -> Bool

  • It returns true when the participant is an AI agent.

  • An agent participant is an AgentParticipant, a subclass of Participant. Cast it to call getAgentId() (String?) and getAgentState() (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