2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

NotificationService

The NotificationService allows the application to invite other participants to the conference. It also allows an application to subscribe and unsubscribe from notifications that are related to:

Events

invitationReceived

invitationReceived(notification: VTInvitationReceivedNotification)

Emitted after receiving an invitation.

Parameters:

NameType
notificationVTInvitationReceivedNotification

conferenceStatus

conferenceStatus(notification: VTConferenceStatusNotification)

Emitted when a conference has been subscribed.

Parameters:

NameType
notificationVTConferenceStatusNotification

conferenceCreated

conferenceCreated(notification: VTConferenceCreatedNotification)

Emitted after receiving the subscribed notification related to a created conference.

Parameters:

NameType
notificationVTConferenceCreatedNotification

conferenceEnded

conferenceEnded(notification: VTConferenceEndedNotification)

Emitted after receiving the subscribed notification related to a finished conference.

Parameters:

NameType
notificationVTConferenceEndedNotification

participantJoined

participantJoined(notification: VTParticipantJoinedNotification)

Emitted after receiving the subscribed notification about a participant that has joined a conference.

Parameters:

NameType
notificationVTParticipantJoinedNotification

participantLeft

participantLeft(notification: VTParticipantLeftNotification)

Emitted after receiving the subscribed notification about a participant that has left a conference.

Parameters:

NameType
notificationVTParticipantLeftNotification

Accessors

delegate

delegate: VTNotificationDelegate

Delegate, a means of communication between objects in the notification service.

Returns: VTNotificationDelegate

Methods

invite

invite(conference: VTConference, participantInfos: [VTParticipantInfo], completion: ((_ error: NSError?) -> Void)?)

Invites other participants to the conference.

Note: Use the invite method only after joining a conference. For more information about using invitations, see the Using Invitations article.

Parameters:

NameTypeDefault
conferenceVTConference-
participantInfos[VTParticipantInfo]-
completion((_ error: NSError?) -> Void)?nil

subscribe

subscribe(subscriptions: [VTSubscribeBase], completion: ((_ error: NSError?) -> Void)?)

Turns on the subscription for the specified notification.

Parameters:

NameTypeDefault
subscriptions[VTSubscribeBase]-
completion((_ error: NSError?) -> Void)?nil

unsubscribe

unsubscribe(subscriptions: [VTSubscribeBase], completion: ((_ error: NSError?) -> Void)?)

Turns off the subscription for the specified notification.

Parameters:

NameTypeDefault
subscriptions[VTSubscribeBase]-
completion((_ error: NSError?) -> Void)?nil