Participant Class Properties - Flutter
id
-
type:
String -
Unique id of the participant, who has joined the room.
displayName
-
type:
String -
It will be the
displayNameof the participant, who has joined the room.
isLocal
-
type:
bool -
It will represents whether the participant is
LocalParticipant(You) or not. If it is true, then participant isLocalParticipantotherwise RemoteParticipant.
streams
-
type:
Map<String, RTCStream> -
It will represents the streams for that particular participant who has joined the room. A
RTCStreamcould beMediaType.AUDIO,MediaType.VIDEO,MediaType.SHAREorMediaType.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
camandshareof type boolean. -
To follow pin changes made by any participant, listen for
pinStateChangedon 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
participantModeChangedfires on the room.room.changeMode()does not change it by itself. -
To react to mode changes, listen for
participantModeChangedand readparticipant.mode. The event'smodeis aMode, such asMode.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 themetaDatayou passed tocreateRoom()when the server sends none.
videoQuality
-
type:
VideoQuality? -
The video quality you last requested for this participant with
setQuality(), ornullif you have not requested one.
Got a Question? Ask us on discord

