mode property

Mode mode
getter/setter pair

The participant's current mode.

The participant mode defines how media is produced and/or consumed by the participant (for example, sending and receiving media, receiving only, or signaling only). It updates when the mode changes, just before Events.participantModeChanged fires on the room.

Example

// Access the participant's current mode
Mode currentMode = participant.mode;

if (currentMode == Mode.RECV_ONLY) {
  print('Participant is in viewer mode');
}

// Change participant mode
await room.changeMode(Mode.SEND_AND_RECV);

Implementation

late Mode mode;