Skip to main content
Version: 0.0.x

Participant Events - Python

VideoSDK provides various events that can be utilized to gather information about the participants in the meeting.

Here are the events specifically related to the participant:

on_participant_joined()

  • This event is triggered when someone joins the meeting, returning the Participant object as parameter.
  • It can be implement to using the MeetingEventHandler class.

on_participant_left()

  • This event is triggered when someone leaves the meeting.
  • It can be implement to using the MeetingEventHandler class.

on_webcam_requested()

  • This event is triggered for participant B, when another participant, A requests to enable their webcam.
  • Upon accepting the request, participant B's webcam will be enabled.
  • It can be implement to using the MeetingEventHandler class.

on_mic_requested()

  • This event is triggered for participant B, when another participant, A requests to enable their mic.
  • Upon accepting the request, participant B's mic will be enabled.
  • It can be implement to using the MeetingEventHandler class.

Example

Here is an example demonstrating the usage of all the events mentioned on this page.

class MyMeetingEventHandler(MeetingEventHandler):
def __init__(self):
super().__init__()

def on_participant_joined(self, participant):
print("participant joined", participant)

def on_participant_left(self, participant):
print("participant left", participant)

def on_webcam_requested(self, data):
wanted_to_accept = True
if wanted_to_accept:
accept = data["accept"]
accept()
else:
reject = data["reject"]
reject()

def on_mic_requested(self, data):
wanted_to_accept = True
if wanted_to_accept:
accept = data["accept"]
accept()
else:
reject = data["reject"]
reject()

API Reference

The API references for all the methods and events utilized in this guide are provided below.

Got a Question? Ask us on discord