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

Initialize the SDK with an access token that is provided by the customer backend communicating with Voxeet servers. The token allows securing the App key and App secret.

The following diagram presents the authentication flow:

Client          Customer Server       Voxeet Server
  |                    |                    |
  |  Get Access Token  |  /oauth2/token (1) |
  |------------------->|------------------->|
  |    Access Token    |    Access Token    |
  |<-------------------|<-------------------|
  |  initializeToken(accessToken, callback) |
  |---------------------------------------->|

The access token has a limited period of validity and needs to be refreshed for security reasons. In such case,
The Voxeet SDK will call the callback provided to initializeToken. The callback must return a Promise
containing the refreshed access token by calling the customer backend, as presented in the following diagram:

Client          Customer Server       Voxeet Server
  |      callback      |  /oauth2/token (2) |
  |------------------->|------------------->|
  |    Access Token    |    Access Token    |
  |<-------------------|<-------------------|

Where (1) and (2) are two REST API endpoints available on Voxeet servers and documented on the developer portal.

Parameters:

NameTypeDescription
accessTokenstringThe access token provided by the customer's backend.
callbackFunctionA 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: void


Did this page help you?