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 customisation.

Properties#

  • __properties

      Properties
    • idString

      id of participant
    • displayNameString

      display name of participant

Methods#

  • __methods

      Methods
    • on(<event-name>, <event-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
    • stream-enabledStream

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

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

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

      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 displayNameparticipant.displayName;
// Set video quality of that participant to lowparticipant.setQuality("low");
// Adding event listners in participantparticipant.on("stream-enabled", (Stream stream) {  // this stream is enabled});
participant.on("stream-disabled", (Stream stream) {  // this stream is disabled});