Skip to main content
Version: 0.x.x

Stream Events - Javascript

state

  • This event is triggered when the state of a stream changes.
  • The event callback will include the current state of the stream, which can be one of the following: active, stuck, freeze-detected, freeze-resolved, stuck.
  • It can be subscribed to using the stream object.
note

This event is emitted exclusively for remote participants, specifically for their video and screen share video streams.

Example

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

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


Was this helpful?