> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# VIConferenceDelegate

Delegate that may be used to handle conference events.

@objc protocol VIConferenceDelegate

## Methods

### conference(\_:didAddEndpoint:)

@objc func conference(\_ conference: [VIConference](/api-reference/iossdk/calls/viconference), didAddEndpoint endpoint: [VIEndpoint](/api-reference/iossdk/calls/viendpoint))

Triggered after an endpoint is added to a conference.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**endpoint** [VIEndpoint](/api-reference/iossdk/calls/viendpoint)

Endpoint that has been added to the conference

### conference(\_:didConnectWithHeaders:)

@objc func conference(\_ conference: [VIConference](/api-reference/iossdk/calls/viconference), didConnectWithHeaders headers: \[String : String]?)

Triggered after a conference has been successfully connected.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**headers** \[String : String]?

Optional headers passed with the event

### conference(\_:didDetectLocalVoiceActivityChange:)

@objc optional func conference(\
    \_ conference: [VIConference](/api-reference/iossdk/calls/viconference),\
    didDetectLocalVoiceActivityChange voiceActivity: Bool\
)

Triggered when a voice activity is detected from the current participant.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**voiceActivity** Bool

Whether the voice is detected

### conference(\_:didDisconnectWithReason:headers:)

@objc func conference(\
    \_ conference: [VIConference](/api-reference/iossdk/calls/viconference),\
    didDisconnectWithReason reason: [VIConferenceDisconnectReason](/api-reference/iossdk/calls/viconferencedisconnectreason),\
    headers: \[String : String]?\
)

Triggered after a conference has been disconnected.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**reason** [VIConferenceDisconnectReason](/api-reference/iossdk/calls/viconferencedisconnectreason)

Reason that the conference ended with

**headers** \[String : String]?

Optional headers passed with the event

### conference(\_:didFailWithError:headers:)

@objc func conference(\
    \_ conference: [VIConference](/api-reference/iossdk/calls/viconference),\
    didFailWithError error: [VICallConnectionError](/api-reference/iossdk/calls/vicallconnectionerror),\
    headers: \[String : String]?\
)

Triggered if a conference failed.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**error** [VICallConnectionError](/api-reference/iossdk/calls/vicallconnectionerror)

Error object with code and description

**headers** \[String : String]?

Optional headers passed with the event

### conference(\_:didReceiveInfo:type:headers:)

@objc optional func conference(\
    \_ conference: [VIConference](/api-reference/iossdk/calls/viconference),\
    didReceiveInfo body: String,\
    type: String,\
    headers: \[String : String]?\
)

Triggered when an INFO message is received within the call.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**body** String

Body of INFO message

**type** String

MIME type of INFO message

**headers** \[String : String]?

Optional headers passed with the event

### conference(\_:didReceiveMessage:headers:)

@objc optional func conference(\
    \_ conference: [VIConference](/api-reference/iossdk/calls/viconference),\
    didReceiveMessage message: String,\
    headers: \[String : String]?\
)

Triggered when a message is received within a conference.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**message** String

Content of the message

**headers** \[String : String]?

Optional headers passed with the event

Implemented atop of SIP INFO for communication between the call endpoint and the Voximplant Cloud.

### conference(\_:didReceiveStatistics:)

@objc optional func conference(\
    \_ conference: [VIConference](/api-reference/iossdk/calls/viconference),\
    didReceiveStatistics stats: [VIConferenceStats](/api-reference/iossdk/calls/viconferencestats)\
)

Triggered when conference statistics are available for a conference.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**stats** [VIConferenceStats](/api-reference/iossdk/calls/viconferencestats)

Conference statistics

### conference(\_:didRemoveEndpoint:)

@objc func conference(\_ conference: [VIConference](/api-reference/iossdk/calls/viconference), didRemoveEndpoint endpoint: [VIEndpoint](/api-reference/iossdk/calls/viendpoint))

Triggered after the endpoint is removed from a conference.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

**endpoint** [VIEndpoint](/api-reference/iossdk/calls/viendpoint)

Endpoint that has been removed from the a conference

### conferenceDidReconnect(\_:)

@objc optional func conferenceDidReconnect(\_ conference: [VIConference](/api-reference/iossdk/calls/viconference))

Triggered if the connection to the Voximplant Cloud is restored and media stream are active in a conference.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

### conferenceDidStartReconnecting(\_:)

@objc optional func conferenceDidStartReconnecting(\_ conference: [VIConference](/api-reference/iossdk/calls/viconference))

Triggered if the connection to the Voximplant Cloud is lost due to a network issue and media streams may be interrupted in a conference.

**Parameters**

**conference** [VIConference](/api-reference/iossdk/calls/viconference)

Conference instance

Once the connection to the Voximplant Cloud is restored and the media streams are active, the [conferenceDidReconnect(\_:)](/api-reference/iossdk/calls/viconferencedelegate#symbol-a2f0622a2d93bc3f) event is invoked.

Until the [conferenceDidReconnect(\_:)](/api-reference/iossdk/calls/viconferencedelegate#symbol-a2f0622a2d93bc3f) event is invoked, the following API calls fail with [VICallErrorType.invalidCallState](/api-reference/iossdk/calls/vicallerrortype#symbol-e4b9b62ac9f5fd43) error:

* [startSendingVideo(with:completion:)](/api-reference/iossdk/calls/viconference#symbol-421f34c0c134b729)
* [startInAppScreensharing(with:completion:)](/api-reference/iossdk/calls/viconference#symbol-ed7dcb728f628156)
* [stopSendingVideo(completion:)](/api-reference/iossdk/calls/viconference#symbol-ab7e6ae657dea783)
* [stopInAppScreensharing(completion:)](/api-reference/iossdk/calls/viconference#symbol-60520544752b4af7)