Livestream Events
You can listen to livestream events by conforming to the RtkLivestreamEventListener
protocol and attaching the listener to the meeting instance:
class LivestreamViewController: UIViewController, RtkLivestreamEventListener {
override func viewDidLoad() {
super.viewDidLoad()
// Attach the livestream listener
meeting.addLivestreamEventListener(livestreamEventListener: self)
}
func onLivestreamStateChanged(oldState: LivestreamState, newState: LivestreamState) {
// This method is called when the state of the livestream transitions from `oldState` to `newState`.
// Valid states are: `idle`, `starting`, `streaming`, and `stopping`.
}
func onLivestreamError(message: String) {}
func onViewerCountUpdated(count: Int32) {}
func onLivestreamUpdate(data: RtkLivestreamData) {}
}