NEWDolby Interactivity APIs are now the Dolby.io Communications APIs Learn More >
X

NotificationService

The NotificationService allows the application to invite participants to the conference, decline conference invitations, and subscribe to and unsubscribe from notifications related to:

Events

invitationReceived

invitationReceived(notification: VTInvitationReceivedNotification)

Emitted when the application user received an invitation.

Parameters:

NameTypeDescription
notificationVTInvitationReceivedNotificationThe object containing properties specific to the event.

conferenceStatus

conferenceStatus(notification: VTConferenceStatusNotification)

Emitted when the application user subscribed to any notification. The application emits the conferenceStatus event to inform the user about the status of the subscribed conference. This notification cannot be subscribed to.

Parameters:

NameTypeDescription
notificationVTConferenceStatusNotificationThe object containing properties specific to the event.

activeParticipants

activeParticipants(notification: VTActiveParticipantsNotification)

Emitted when a list of active participants changes. The event informs how many participants are present at a conference.

Parameters:

NameTypeDescription
notificationVTActiveParticipantsNotificationThe object containing properties specific to the event.

conferenceCreated

conferenceCreated(notification: VTConferenceCreatedNotification)

Emitted to notify the application user, who subscribed to VTSubscribeConferenceCreated, that a new conference was created.

Parameters:

NameTypeDescription
notificationVTConferenceCreatedNotificationThe object containing properties specific to the event.

conferenceEnded

conferenceEnded(notification: VTConferenceEndedNotification)

Emitted to notify an application user, who subscribed to VTSubscribeConferenceEnded, that a conference was ended.

Parameters:

NameTypeDescription
notificationVTConferenceEndedNotificationThe object containing properties specific to the event.

participantJoined

participantJoined(notification: VTParticipantJoinedNotification)

Emitted to notify the application user, who subscribed to VTSubscribeParticipantJoined, that a new participant joined a conference.

Parameters:

NameTypeDescription
notificationVTParticipantJoinedNotificationThe object containing properties specific to the event.

participantLeft

participantLeft(notification: VTParticipantLeftNotification)

Emitted to notify the application user, who subscribed to VTSubscribeParticipantLeft, that a participant left a conference.

Parameters:

NameTypeDescription
notificationVTParticipantLeftNotificationThe object containing properties specific to the event.

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)? = nil)

Notifies conference participants about a conference invitation.

The Dolby.io Communications APIs offer two invite methods. You can use invite with the VTParticipantInfo or VTParticipantInvited parameter:

  • VTParticipantInfo does not include participants' permissions.
  • VTParticipantInvited includes participants' permissions, which allow conference participants to perform a specific set of actions within a protected conference. For more information about inviting participants with the specified permissions, see the next invite method that is described below.

Both invite methods include the VTConference object:

  • In the case of inviting participants to a conference that is not protected, inviters can invite participants to any conference.
  • In the case of inviting participants to a protected conference, inviters can invite participants only to the current conference. Therefore, if you wish to invite participants to a protected conference, include in the invitation the VTConference object related to the current conference.

For more information about invitations, see the Inviting Participants article.

Parameters:

NameTypeDefaultDescription
conferenceVTConference-The conference object.
VTParticipantInfos[VTParticipantInfo]-Information about the invited application users.
completion((_ error: NSError?) -> Void)?nilThe block to execute when the query completes.

invite(conference: VTConference, participantsInvited: VTParticipantInvited, completion: ((_ error: NSError?) -> Void)? = nil)

Notifies conference participants about a conference invitation. This method includes participants' permissions.

Participants who have permission to invite additional participants to a conference can also use this method. In the invitation, inviters can only grant permissions that the inviters have. For example, a participant who does not have permission to record a conference can only invite new participants who also cannot record this conference.

Protected conferences require assigning proper conference permissions to all invited participants. However, the inviter can invite participants to the protected conference without specifying the participants' permissions. If permissions are not specified, the platform assigns the default permissions, which include join, sendAudio, sendVideo, shareScreen, shareVideo, shareFile, sendMessage, record, and stream.

If you wish to invite participants to a protected conference, use the invite method after joining the conference.

The invite method includes the VTConference object. In the case of inviting participants to a protected conference, inviters can invite participants only to the current conference. Therefore, the invitation has to include the VTConference object related to the current conference.

Parameters:

NameTypeDefaultDescription
conferenceVTConference-The conference object.
participantsInvited[VTParticipantInvited]-Information about the invited application users.
completion((_ error: NSError?) -> Void)?nilThe block to execute when the query completes.

decline

decline(conference: VTConference, completion: ((_ error: NSError?) -> Void)? = nil)

Declines the conference invitation.

Parameters:

NameTypeDefaultDescription
conferenceVTConference-The conference object.
completion((_ error: NSError?) -> Void)?nilThe block to execute when the query completes.

subscribe

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

Subscribes to the specified notifications.

Parameters:

NameTypeDefaultDescription
subscriptions[VTSubscribeBase]-The subscribed types of subscription.
completion((_ error: NSError?) -> Void)?nilThe block to execute when the query completes.

unsubscribe

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

Unsubscribes from the specified notifications.

Parameters:

NameTypeDefaultDescription
subscriptions[VTSubscribeBase]-The subscribed types of subscription.
completion((_ error: NSError?) -> Void)?nilThe block to execute when the query completes.

Did this page help you?