Skip to main content
Version: 0.0.x

Media Events - Python

VideoSDK offers various events that can be monitored to obtain information about the media status of participants in the meeting.

Here are the events specifically related to the stream:

on_stream_enabled()

  • This event is triggered whenever a participant's video, audio or screen share stream is enabled.
  • It can be implement to using the ParticipantEventHandler class.

on_stream_disabled()

  • This event is triggered whenever a participant's video, audio or screen share stream is disabled.
  • It can be implement to using the ParticipantEventHandler class.

on_media_status_changed()

  • This event is triggered whenever a participant's video or audio stream is disabled or enabled.
  • It can be implement to using the ParticipantEventHandler class.

on_video_quality_changed()

  • This event is triggered whenever a participant's video quality changed.
  • It can be implement to using the ParticipantEventHandler class.

Example

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


class MyParticipantEventHandler(ParticipantEventHandler):
def __init__(self):
super().__init__()

def on_stream_enabled(self, stream):
print("paricipant :: stream enabled", stream.kind)

def on_stream_disabled(self, stream):
print("paricipant :: stream disabled", stream.kind)

def on_media_status_changed(self, data):
print("paricipant :: media status changed", data)

def on_video_quality_changed(self, data):
print("paricipant :: video quality changed", data)

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