Skip to main content
Version: 2.0.x

Stream Class Events - iOS


state

  • This callback is triggered when the state of a video or screen-share video stream changes.
  • It helps track whether the stream is active, stuck, frozen, resolved, or ended.
note

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

Parameters

  • state: Specifies the current state of the stream.

    • Type: MediaStreamEventType
    • Possible values:
      • MediaStreamEventType.ACTIVE: Stream is working normally.
      • MediaStreamEventType.STUCK: Stream is not progressing as expected.
      • MediaStreamEventType.FREEZE_DETECTED: Video freeze has been detected.
      • MediaStreamEventType.FREEZE_RESOLVED: Video freeze has been resolved.
      • MediaStreamEventType.ENDED: Stream has ended.

Example

stream.on(.state) { state in

}

Got a Question? Ask us on discord


Was this helpful?