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

NotificationService

The NotificationService enables inviting participants to a conference. The service also allows subscribing to and unsubscribing from notifications informing about:

Events

activeParticipants

activeParticipants(e: ActiveParticipants): void

Emitted to notify an application user, who subscribed to SubscribeActiveParticipants, that a list of active participants is updated. The event informs how many participants joined a conference.

example

VoxeetSDK.notification.on("activeParticipants", () => {});

Parameters:

NameTypeDescription
eActiveParticipantsThe object containing properties specific to the event.

Returns: void


conferenceCreated

conferenceCreated(e: ConferenceCreatedNotification): void

Emitted to notify an application user, who subscribed to SubscribeConferenceCreated, that a new conference was created.

example

VoxeetSDK.notification.on("conferenceCreated", () => {});

Parameters:

NameTypeDescription
eConferenceCreatedNotificationThe object containing properties specific to the event.

Returns: void


conferenceEnded

conferenceEnded(e: ConferenceEndedNotification): void

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

example

VoxeetSDK.notification.on("conferenceEnded", () => {});

Parameters:

NameTypeDescription
eConferenceEndedNotificationThe object containing properties specific to the event.

Returns: void


conferenceStatus

conferenceStatus(e: ConferenceStatusNotification): void

Emitted when an 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.

example

VoxeetSDK.notification.on("conferenceStatus", () => {});

Parameters:

NameTypeDescription
eConferenceStatusNotificationThe object containing properties specific to the event.

Returns: void


invitation

invitation(e: InvitationReceived): void

Emitted when an application user received an invitation. This notification is subscribed by default. For more information about invitations, see the Inviting Participants document.

example

VoxeetSDK.notification.on("invitation", (e) => {});

Parameters:

NameTypeDescription
eInvitationReceivedThe object containing properties specific to the event.

Returns: void


participantJoined

participantJoined(e: ParticipantJoinedNotification): void

Emitted to notify an application user, who subscribed to SubscribeParticipantJoined, that a new participant joined a conference.

example

VoxeetSDK.notification.on("participantJoined", () => {});

Parameters:

NameTypeDescription
eParticipantJoinedNotificationThe object containing properties specific to the event.

Returns: void


participantLeft

participantLeft(e: ParticipantLeftNotification): void

Emitted to notify an application user, who subscribed to SubscribeParticipantLeft, that a participant left a conference.

example

VoxeetSDK.notification.on("participantLeft", () => {});

Parameters:

NameTypeDescription
eParticipantLeftNotificationThe object containing properties specific to the event.

Returns: void

Methods

invite

invite(conference: Conference, participants: Array<ParticipantInfo>): Promise<any>

Notifies conference participants about a conference invitation. The ParticipantInfo model included in the invitation has to include externalId.

The Dolby.io Communications offer two invite methods. You can use invite with the ParticipantInfo or ParticipantInvited parameter:

  • ParticipantInfo does not include participants' permissions.

  • ParticipantInvited includes the 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 Conference 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 Conference object related to the current conference.
var participants = [
  { name: "Guest 01", externalId: "guest-01", avatarUrl: "" },
];
VoxeetSDK.notification.invite(conference, participants).then(() => {});

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

Parameters:

NameTypeDescription
conferenceConferenceThe conference object.
participantsArray<ParticipantInfo>Information about the invited application users.

Returns: Promise<any>

invite(conference: Conference, invitedParticipants: Array<ParticipantInvited>): Promise<any>

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 a 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 Conference 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 Conference object related to the current conference.

Parameters:

NameTypeDescription
conferenceConferenceThe conference object.
invitedParticipantsArray<ParticipantInvited>Information about the invited application users.

Returns: Promise<any>


subscribe

subscribe(subscriptions: Array<BaseSubscription>): any

Subscribes to the specified notifications.

Parameters:

NameTypeDescription
subscriptionsArray<BaseSubscription>An array of the subscribed subscription types.

Returns: any


unsubscribe

unsubscribe(subscriptions: Array<BaseSubscription>): any

Unsubscribes from the specified notifications.

Parameters:

NameTypeDescription
subscriptionsArray<BaseSubscription>An array of the subscribed subscription types.

Returns: any


Did this page help you?