Media Events - Javascript
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:
stream-enabled
- This event is triggered whenever a participant's video, audio or screen share stream is enabled.
- This event can be subscribed from the
Participantobject.
stream-disabled
- This event is triggered whenever a participant's video, audio or screen share stream is disabled.
- This event can be subscribed from the
Participantobject.
media-status-changed
- This event will be triggered whenever a participant's video or audio is disabled or enabled.
- This event can be subscribed from the
Participantobject.
audio-input-silence
- This event is triggered whenever no system-level audio input is received from the local microphone (e.g., input level is zero, microphone not working, or device unavailable). This event is not triggered for normal user silence.
- This event can be subscribed from the
Meetingobject.
Example
Here is an example demonstrating the usage of all the events mentioned on this page.
const participants = meeting.participants;
const participant = participants.get("<participant-id>");
participant.on("stream-enabled", (stream) => {
//
});
participant.on("stream-disabled", (stream) => {
//
});
participant.on("media-status-changed", (data) => {
const { kind, newStatus } = data;
//
});
meeting.on("audio-input-silence", (data) => {
const { deviceLable, state, timestamp } = 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

