VoxeetSDK

VoxeetSDK is the main object that allows the application to interact with Voxeet services. The SDK is asynchronous and uses promise at its core.

Accessors

audio

Staticget audio(): AudioService

Retrieves the AudioService instance that allows enabling and disabling audio.

This API is available in SDK 3.7 and later.

Returns: AudioService

command

Staticget command(): CommandService

Retrieves the CommandService instance that allows the participant to send messages to the specified conferences.

Returns: CommandService

conference

Staticget conference(): ConferenceService

Retrieves the ConferenceService instance that allows the participant to interact with conferences.

Returns: ConferenceService


filePresentation

Staticget filePresentation(): FilePresentationService

Retrieves the FilePresentationService instance that allows the participant to use file presentations.

Returns: FilePresentationService


mediaDevice

Staticget mediaDevice(): MediaDeviceService

Retrieves the MediaDeviceService instance that allows the participant to interact with devices through the system.

Returns: MediaDeviceService


notification

Staticget notification(): NotificationService

Retrieves the unique NotificationService instance,
which enables forwarding notifications from a developer to a properly registered manager.

Returns: NotificationService


packageUrlPrefix

▸ get packageUrlPrefix(): string

Retrieves the URL prefix that is responsible for fetching SDK package files.

Returns: string


packageUrlPrefix

▸ set packageUrlPrefix(prefix: string)

Sets the URL prefix that is responsible for fetching SDK package files. By default, the prefix is generated automatically based on the main JavaScript file path. For example, when the prefix is set to "https://example.com/lib/dist/", the binary file will be fetched using the "https://example.com/lib/dist/dvwc_impl.wasm" URL.

If you want to set a new value of the prefix, the value needs to be a string. If you want to reset the prefix to the default value, set the prefix to null, false, or undefined. Any other values trigger the ParameterError.

The prefix must contain the '/' character at the end. If the prefix ends with any other character, the SDK automatically adds '/' at its end.

Parameters:

NameTypeDescription
prefixstringThe prefix.

recording

Staticget recording(): RecordingService

Retrieves the RecordingService instance that allows the participant to record conferences.

Returns: RecordingService


session

Staticget session(): SessionService

Retrieves the SessionService instance that allows the participant to use sessions.

Returns: SessionService


video

Staticget video(): VideoService

Retrieves the VideoService instance that allows conference participants to enable and disable video.

This API is available in SDK 3.7 and later.

Returns: VideoService


videoFilters

Staticget videoFilters(): VideoFiltersService

Retrieves the VideoFiltersService instance that allows applying video filters on the local participant's video stream.

Returns: VideoFiltersService


videoPresentation

Staticget videoPresentation(): VideoPresentationService

Retrieves the VideoPresentationService instance that allows the participant to use video presentations.

Returns: VideoPresentationService

Methods

initialize

Staticinitialize(customerKey: string, customerSecret: string): void

Initializes the SDK using the customer key and secret.

Parameters:

NameTypeDescription
customerKeystringThe customer key.
customerSecretstringThe customer secret.

Returns: void


initializeToken

StaticinitializeToken(accessToken: string, callback: Function): void

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 SDK requests a new token from the platform after half of the token expiration time, three fourth of the token expiration time, and when the token expires.

The initializeToken method saves the received token and starts the token expiration timers. The method requires providing two parameters - the client access token received from the Dolby.io platform and the refresh 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.

VoxeetSDK.initializeToken(accessToken, (isExpired) => {
  if (isExpired) {
    // The token expired
    throw "The access token has expired.";
  }

  return requestNewToken();
});

The Dolby.io platform verifies each API call and processes the call only if the provided token is correct.

Parameters:

NameTypeDescription
accessTokenstringThe client access token received from the Dolby.io platform.
callbackFunctionA function that requests and returns a new client access token from the Dolby.io platform when the previous token is incorrect or should be refreshed. The callback must use the isExpired boolean parameter to inform whether the currently used client access token is expired.

Returns: void