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
• Static
get 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
• Static
get command(): CommandService
Retrieves the CommandService instance that allows the participant to send messages to the specified conferences.
Returns: CommandService
conference
• Static
get conference(): ConferenceService
Retrieves the ConferenceService instance that allows the participant to interact with conferences.
Returns: ConferenceService
filePresentation
• Static
get filePresentation(): FilePresentationService
Retrieves the FilePresentationService instance that allows the participant to use file presentations.
Returns: FilePresentationService
mediaDevice
• Static
get mediaDevice(): MediaDeviceService
Retrieves the MediaDeviceService instance that allows the participant to interact with devices through the system.
Returns: MediaDeviceService
notification
• Static
get 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:
Name | Type | Description |
---|---|---|
prefix | string | The prefix. |
recording
• Static
get recording(): RecordingService
Retrieves the RecordingService instance that allows the participant to record conferences.
Returns: RecordingService
session
• Static
get session(): SessionService
Retrieves the SessionService instance that allows the participant to use sessions.
Returns: SessionService
video
• Static
get 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
• Static
get videoFilters(): VideoFiltersService
Retrieves the VideoFiltersService instance that allows applying video filters on the local participant's video stream.
Returns: VideoFiltersService
videoPresentation
• Static
get videoPresentation(): VideoPresentationService
Retrieves the VideoPresentationService instance that allows the participant to use video presentations.
Returns: VideoPresentationService
Methods
initialize
▸ Static
initialize(customerKey
: string, customerSecret
: string): void
Initializes the SDK using the customer key and secret.
Parameters:
Name | Type | Description |
---|---|---|
customerKey | string | The customer key. |
customerSecret | string | The customer secret. |
Returns: void
initializeToken
▸ Static
initializeToken(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 oauth2/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 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:
Name | Type | Description |
---|---|---|
accessToken | string | The client access token received from the Dolby.io platform. |
callback | Function | A 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
Updated 5 months ago