Skip to main content

Participant Class

Using Participant Class

The Participant Class includes methods and events for participants and their associated video & audio streams, data channels and UI customization.

Properties

  • __properties

      Properties
    • idString

      id of participant
    • displayNameString

      display name of participant

Methods

  • __methods

      Methods
    • on(Events event, Function handler)Function

      participant event handler
    • streamsMap<String, Stream>

      Streams of participant i.e. audio stream, video stream and share stream
    • enableWebcam()Function

      Request participant to enable webcam the participant
    • disableWebcam()Function

      Disable webcam of the participant
    • enableMic()Function

      Request participant to enable mic the participant
    • disableMic()Function

      Disable mic of the participant
    • setQuality(<quality>)'low' | 'med' | 'high'Function

      Set video quality of the participant
    • remove()Function

      Remove the participant from meeting session

Events

  • __events

      Events
    • streamEnabledStream

      This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is enabled.
    • streamDisabledStream

      This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is disabled.
    • streamPausedStream

      This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is paused.
    • streamResumedStream

      This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is resumed.

Example

Play with Participant instance
// get displayName
participant.displayName;

// Set video quality of that participant to low
participant.setQuality("low");

// Adding event listeners in participant
participant.on(Events.streamEnabled, (Stream stream) {
// this stream is enabled
});

participant.on(Events.streamDisabled, (Stream stream) {
// this stream is disabled
});

Got a Question? Ask us on discord