Meeting Connection Events - iOS
VideoSDK provides onMeetingStateChanged event which will notify you of the current connection state of the meeting.
onMeetingStateChanged
- This event will be triggered when state of meeting changes.
- It will pass
stateas an event callback parameter which will indicate current state of the meeting.
All available states are :CONNECTING: The meeting is in the process of establishing a connection.CONNECTED: The meeting has successfully connected.RECONNECTING: The meeting is trying to reconnect after the connection was lost.DISCONNECTED: The meeting has been disconnected.
- You can implement this method of the abstract Class
MeetingEventListenerand add the listener toMeetingclass using theaddEventListener()method ofMeetingClass.
Example
Here is the usage of the event mentioned in this page.
- Swift
extension MeetingViewController: MeetingEventListener {
meeting.listeners.onMeetingStateChanged(meetingState: MeetingState) {
switch meetingState {
case .CONNECTING:
print("Meeting is connecting")
case .CONNECTED:
print("Meeting is connected")
case .CLOSING:
print("Meeting is closing")
case .CLOSED:
print("Meeting connection closed")
case .CANCELLED:
print("Meeting is cancelled")
}
}
}
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

