ParticipantListeners

Public method Summary

Methods

Description

Parameters

onParticipantJoin(fn)

const fn = (partricipant) => { //do smth }

The Event handler will be invoked when new participant joined to the Session but haven't started streaming yet

onParticipantLeft(fn)

const fn = ({participantId}) => { //do smth }

The Event handler will be invoked when the participant leaves the Session

  • participantId - unique identification of the user

onParticipantSpeaking(fn)

const fn = ({participantId}) => { //do smth }

The Event handler will be invoked when the participant starts speaking

onParticipantStopSpeaking(fn)

const fn = ({participantId}) => { //do smth }

The Event handler will be invoked when the participant stops speaking

onOrganizerReceived(fn)

The Event handler will be invoked when the user receives the organizer previlegious.

  • Fn - custom callback function without any parameters

onParticipantMediaStreamChanged(fn) const fn = ({participantId, mediaState, mediaType}) => { //do smth }

The Event handler will be invoked when a participant mute/unmute himself(audio or video). Params object with keys:

  • participantId -participant id which was muted

  • mediaType - allowed values Audio/Video

  • mediaState - allowed values Enabled/Disabled

onParticipantRejected(fn) const fn = (participant, message) => { //do smth }

The Event handler will be invoked when the participant was kicked from the session

  • participant - Participant object (who initiated a kick action)

  • message - optional parameter to provide a reason of kick action

Last updated