Skip to main content
Version: 2.0.x

HLS Events - iOS

VideoSDK provides onHlsStateChanged event which will notify you of the current state of HLS for the meeting.

onHlsStateChanged​

  • This event will be triggered when the meeting's HLS status changed.
  • You can implement this method of the abstract Class MeetingEventListener and add the listener to Meeting class using the addEventListener() method of Meeting Class.

Example​

Here is the usage of the event mentioned in this page.

extension MeetingViewController: MeetingEventListener {
func onHlsStateChanged(state: HLSState, hlsUrl: HLSUrl?) {
switch(state) {
case .HLS_STARTING:
print("HLS Starting")

case .HLS_STARTED:
self.hlsStreamStarted = true
print("HLS Started")

case .HLS_PLAYABLE:
print("HLS Playable")

case .HLS_STOPPING:
print("HLS Stopping")

case .HLS_STOPPED:
self.hlsStreamStarted = false
print("HLS Stopped")
}
}
}

API Reference​

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord