Skip to main content

Participant Class

Participant class includes all the properties, methods and events related to all the participants joined in a particular meeting.

Participant Class

Get local and remote participants

You can get the local streams and participant meta from meeting.localParticipant. And a Map of joined participants is always available via meeting.participants.

Javascript
const localParticipant = meeting.localParticipant;
const participants = meeting.participants;

Properties

  • __properties

      Properties
    • idstring

    • displayNamestring

    • streamsMap<string, Stream>

Events

  • __events

      Events
    • stream-enabledevent

    • stream-disabledevent

Methods

  • __methods

      Methods
    • setQuality(quality: low | med | high)undefined

    • enableMic()undefined

    • disableMic()undefined

    • enableWebcam()undefined

    • disableWebcam()undefined

    • pin(SHARE_AND_CAM | CAM | SHARE | null)undefined

    • unpin(SHARE_AND_CAM | CAM | SHARE | null)undefined

    • on(eventType: string)undefined

    • off(eventType: string)undefined

Example

Javascript
meeting.on("participant-joined", (participant) => {
setParticipants(new Map(meeting.participants));
});
meeting.on("participant-left", (participant) => {
setParticipants(new Map(meeting.participants));
});

Got a Question? Ask us on discord