RTMP Events - iOS
VideoSDK provides onLivestreamStateChanged event which will notify you of the current state of livestream for the room.
onLivestreamStateChanged
- This event will be triggered when the room's livestream status changes.
- Implement this method of the
RoomEventListenerprotocol, and register the listener with theaddEventListener(_:)method of theRoomclass.
Example
Here is the usage of the event mentioned in this page.
- Swift
extension RoomViewController: RoomEventListener {
func onLivestreamStateChanged(state: LiveStreamState) {
switch(state) {
case .LIVESTREAM_STARTING:
print("livestream starting")
case .LIVESTREAM_STARTED:
print("livestream started")
case .LIVESTREAM_STOPPING:
print("livestream stopping")
case .LIVESTREAM_STOPPED:
print("livestream stopped")
@unknown default:
break
}
}
}
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

