Skip to main content

Room Connection Events

The meeting object emits various events to indicate changes in the connection status of the room. When a connection is lost, the Dyte SDK detects it and attempts to reconnect the user to the meeting room automatically.

You can subscribe to these events by implementing the DyteMeetingRoomEventsListener callbacks and passing the object to the meeting.addMeetingRoomEventsListener(dyteMeetingRoomEventsListener).

The following are the room connection events:

Connecting to room

When the local user starts connecting to the meeting room during initialization, this event is triggered.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onConnectingToMeetingRoom() {

}
}

Connected to room

When the local user connects to the meeting room after initialization, this event is triggered.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onConnectedToMeetingRoom() {

}
}

Disconnected from room

When the local user disconnects while leaving the meeting room, this event is triggered.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onDisconnectedFromMeetingRoom() {

}
}

Reconnecting to room

When the Dyte SDK detects a connection drop and attempts to reconnect to the meeting room, this event is triggered.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onReconnectingToMeetingRoom() {

}
}

Reconnected to room

When the local user successfully reconnects to the meeting room, this event is triggered.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onReconnectedToMeetingRoom() {

}
}

Room connection failed

When the local user fails to connect to the meeting room during initialization, this event is triggered. This might occur because of internet connection issues.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onMeetingRoomConnectionFailed() {

}
}

Room reconnection failed

When the local user fails to reconnect to the meeting room, this event is triggered. This occurs when the local user's internet connection goes down for an extended period of time and the Dyte SDK is unable to reconnect despite multiple attempts.

extension  DyteEventSelfListner: DyteMeetingRoomEventsListener {
func onMeetingRoomReconnectionFailed() {

}
}