NotificationService

The NotificationService allows inviting participants to a conference and subscribing to and unsubscribing from notifications.

Methods

subscribe

subscribe(events): Promise<void>

Subscribes to the specified notifications. This method is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
eventsSubscription[]An array of the subscribed subscription types.

Returns

Promise<void>


unsubscribe

unsubscribe(events): Promise<void>

Unsubscribes from the specified notifications. This method is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
eventsSubscription[]An array of the subscribed subscription types.

Returns

Promise<void>


decline

decline(conference): Promise<void>

Declines the conference invitation.

Parameters

NameTypeDescription
conferenceConferenceThe conference object.

Returns

Promise<void>


invite

invite(conference, participants): Promise<void>

Notifies conference participants about a conference invitation.

Parameters

NameTypeDescription
conferenceConferenceThe conference object.
participantsParticipantInvited[]Information about the invited application users.

Returns

Promise<void>


Event handlers

onInvitationReceived

onInvitationReceived(handler): UnsubscribeFunction

Adds a listener to the invitation received event.

Parameters

NameTypeDescription
handler(data: InvitationReceivedEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onConferenceStatus

onConferenceStatus(handler): UnsubscribeFunction

Adds a listener to the conference status event. This API is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
handler(data: ConferenceStatusEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onConferenceCreated

onConferenceCreated(handler): UnsubscribeFunction

Adds a listener to the conference created event. This API is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
handler(data: ConferenceCreatedEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onConferenceEnded

onConferenceEnded(handler): UnsubscribeFunction

Adds a listener to the conference ended event. This API is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
handler(data: ConferenceEndedEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onParticipantJoined

onParticipantJoined(handler): UnsubscribeFunction

Adds a listener to the participant joined event. This API is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
handler(data: ParticipantJoinedEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onParticipantLeft

onParticipantLeft(handler): UnsubscribeFunction

Adds a listener to the participant left event. This API is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
handler(data: ParticipantLeftEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onActiveParticipants

onActiveParticipants(handler): UnsubscribeFunction

Adds a listener to the participant active event. This API is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
handler(data: ActiveParticipantsEventType) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.