CommsAPI is a main object that allows an application to interact with Dolby.io services.

Properties

audio

audio: AudioService

Retrieves the AudioService instance that allows changing audio settings for the local and remote participants.

This API is available in SDK 3.7 and later.


command

command: CommandService

Retrieves the CommandService instance that allows sending messages to conferences.


conference

conference: ConferenceService

Retrieves the ConferenceService instance that allows interacting with conferences.


filePresentation

filePresentation: FilePresentationService

Retrieves the FilePresentationService instance that allows presenting files during conferences.


mediaDevice

mediaDevice: MediaDeviceService

Retrieves the MediaDeviceService instance that allows interacting with devices through the system.


notification

notification: NotificationService

Retrieves the NotificationService instance that allows inviting participants to a conference.


recording

recording: RecordingService

Retrieves the RecordingService instance that allows recording conferences.


session

session: SessionService

Retrieves the SessionService instance that allows using sessions.


videoPresentation

videoPresentation: VideoPresentationService

Retrieves the VideoPresentationService instance that allows presenting videos during conferences.


video

video: VideoService

Retrieves the VideoService instance that allows enabling and disabling video for the local and remote participants.

This API is available in SDK 3.7 and later.

Methods

initialize

initialize(consumerKey, consumerSecret): Promise<null>

Initializes the SDK using the customer key and secret.

Parameters

NameTypeDescription
consumerKeystringThe customer key.
consumerSecretstringThe customer secret.

Returns

Promise<null>


initializeToken

initializeToken(accessToken, refreshAccessToken): Promise<null>

Initializes the SDK with the client access token provided by the Dolby.io platform. The client access token protects customer's conferences from unauthorized access and can be generated only by the Dolby.io platform via an application's authentication server and the client access token request.

The method requires providing two parameters - the client access token received from the Dolby.io platform and the refresh access token callback. The callback must be a function that requests a new token and returns a promise containing the refreshed client access token when the token is incorrect or needs to be refreshed. The refresh token callback uses an isExpired boolean parameter to inform whether the currently used client access token is expired.

For more information, see the Accessing Dolby.io Platform guide.

Parameters

NameTypeDescription
accessTokennull | stringThe access token provided by the customer's backend.
refreshAccessTokenRefreshAccessTokenTypeA callback that returns a promise when the access token needs to be refreshed. The callback parameter takes the isExpired boolean parameter to check if the previous token has expired.

Returns

Promise<null>