Stop HLS - iOS
This could refer to stopping the transmission of an ongoing HLS stream, which would mean the stream is no longer available to viewers.
Stopping HLS
stopHls()is used to stop interactive livestream of the meeting which can be accessed from theMeetingclass.
Example
- Swift
func stopHLS() {
DispatchQueue.main.async {
self.meeting?.stopHLS()
}
}
Event associated with HLS
-
onHlsStateChanged - Whenever meeting HLS state changes, then
onHlsStateChangedevent will trigger. -
You will get
HLS_STOPPINGandHLS_STOPPEDstatus on callingstopHls().
note
downstreamUrl is now depecated. Use playbackHlsUrl or livestreamUrl in place of downstreamUrl
- Swift
class MeetingViewController: ObservableObject {
//...
// Add event listeners and join the meeting
meeting?.addEventListener(self)
//...
}
extension MeetingViewController: MeetingEventListener {
//...
func onHlsStateChanged(state: HLSState, hlsUrl: HLSUrl?) {
hlsState = state
switch (state) {
case .HLS_STARTING:
print("HLS is Starting")
case .HLS_STARTED:
print("HLS is Started")
case .HLS_PLAYABLE:
print("HLS is Playable Now!")
// on hls started you will receive playbackHlsUrl and livestreamUrl
let playableURL = hlsUrl?.playbackHlsUrl ?? ""
let liveStreamURL = hlsUrl?.livestreamUrl ?? ""
case .HLS_STOPPING:
print("HLS is Stopping")
case .HLS_STOPPED:
print("HLS is Stopped")
@unknown default:
fatalError("Unknown HLS State")
}
}
}
//...
API Reference
The API references for all the methods utilized in this guide are provided below.
Got a Question? Ask us on discord

