Skip to main content
Version: 5.x.x

Participant Class Properties - Flutter

id​

  • type: String

  • Unique id of the participant, who has joined the room.


displayName​

  • type: String

  • It will be the displayName of the participant, who has joined the room.


isLocal​


streams​

  • type: Map<String, RTCStream>

  • It will represents the streams for that particular participant who has joined the room. A RTCStream could be MediaType.AUDIO, MediaType.VIDEO, MediaType.SHARE or MediaType.SHARE_AUDIO.

  • The map is keyed by stream id, not by kind. The SDK keeps it up to date as streams are enabled and disabled, so a widget can read the streams that already exist when it is built.

Example​

final RTCStream? videoStream = participant.streams.values
.where((stream) => stream.kind == MediaType.VIDEO)
.firstOrNull;

pinState​

  • type: ParticipantPinState

  • It will represents the current pin state of the participant. It has properties cam and share of type boolean.

  • To follow pin changes made by any participant, listen for pinStateChanged on the room.


mode​

  • type: Mode

  • The participant's current mode, for the local participant too. It changes once the server applies a new mode, just before participantModeChanged fires on the room. room.changeMode() does not change it by itself.

  • To react to mode changes, listen for participantModeChanged and read participant.mode. The event's mode is a Mode, such as Mode.SEND_AND_RECV.

Example​

room.on(Events.participantModeChanged, (Map<String, dynamic> data) {
final String participantId = data['participantId'];
final Mode mode = data['mode'];
if (mode == Mode.RECV_ONLY) {
// the participant now only receives media
}
});

metaData​

  • type: Map<String, dynamic>?

  • It holds the additional information passed in createRoom(). For the local participant, it falls back to the metaData you passed to createRoom() when the server sends none.


videoQuality​

  • type: VideoQuality?

  • The video quality you last requested for this participant with setQuality(), or null if you have not requested one.

Got a Question? Ask us on discord