Monitoring Remote Participants' Stream - JavaScript
Monitoring the state of a remote participant’s stream helps ensure a consistent and high-quality meeting experience. The state event on the stream object provides real-time updates whenever the condition of a remote video or screenshare video stream changes — allowing your app to detect issues and respond accordingly.
By subscribing to this event, you can track when a stream becomes active, stuck, or experiences a freeze, and take corrective actions or inform users as needed.
This event is emitted exclusively for remote participants, specifically for their video and screen share video streams.
Why It Matters
Stream state monitoring is crucial for maintaining call reliability and diagnosing issues that affect the remote participant’s media. Using this event, you can:
- Detect when a remote participant’s video freezes or becomes stuck.
- Notify local participants about possible issues.
- Log state transitions for diagnostics or quality metrics.
Example Usage
let meeting;
// Initialize Meeting
meeting = VideoSDK.initMeeting({
// Configuration options
});
meeting.on("participant-joined", (participant) => {
participant.on("stream-enabled", (stream) => {
stream.on("state", ({ state, timestamp }) => {});
});
});
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

