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
Name | Type | Description |
---|---|---|
events | Subscription[] | 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
Name | Type | Description |
---|---|---|
events | Subscription[] | An array of the subscribed subscription types. |
Returns
Promise
<void
>
decline
▸ decline(conference
): Promise
<void
>
Declines the conference invitation.
Parameters
Name | Type | Description |
---|---|---|
conference | Conference | The conference object. |
Returns
Promise
<void
>
invite
▸ invite(conference
, participants
): Promise
<void
>
Notifies conference participants about a conference invitation.
Parameters
Name | Type | Description |
---|---|---|
conference | Conference | The conference object. |
participants | ParticipantInvited[] | Information about the invited application users. |
Returns
Promise
<void
>
Event handlers
onInvitationReceived
▸ onInvitationReceived(handler
): UnsubscribeFunction
Adds a listener to the invitation received event.
Parameters
Name | Type | Description |
---|---|---|
handler | (data : InvitationReceivedEventType) => void | An event callback function. |
Returns
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
Name | Type | Description |
---|---|---|
handler | (data : ConferenceStatusEventType) => void | An event callback function. |
Returns
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
Name | Type | Description |
---|---|---|
handler | (data : ConferenceCreatedEventType) => void | An event callback function. |
Returns
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
Name | Type | Description |
---|---|---|
handler | (data : ConferenceEndedEventType) => void | An event callback function. |
Returns
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
Name | Type | Description |
---|---|---|
handler | (data : ParticipantJoinedEventType) => void | An event callback function. |
Returns
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
Name | Type | Description |
---|---|---|
handler | (data : ParticipantLeftEventType) => void | An event callback function. |
Returns
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
Name | Type | Description |
---|---|---|
handler | (data : ActiveParticipantsEventType) => void | An event callback function. |
Returns
A function that unsubscribes from event listeners.
Updated 6 months ago