VoxeetSDK
VoxeetSDK is the main object that allows the application to interact with Voxeet services. It is the entry point to call the embedded services and the static elements provided to the developers. The SDK is asynchronous and uses promise at its core.
extends
{EventEmitter}
Properties
Static
version
▪ version: string = VERSION
The current SDK version.
Accessors
Static
command
• get command(): CommandService‹›
Retrieves the unique CommandService instance, which enables the participant to send messages in a string shape into specified conferences.
Returns: CommandService‹›
Static
conference
• get conference(): ConferenceService‹›
Retrieves the unique ConferenceService instance, which enables the participant to interact with conferences.
Returns: ConferenceService‹›
Static
filePresentation
• get filePresentation(): FilePresentationService‹›
Retrieves the unique FilePresentationService instance, which enables the participant to use file presentations.
Returns: FilePresentationService‹›
Static
mediaDevice
• get mediaDevice(): MediaDeviceService‹›
Retrieves the unique MediaDeviceService instance, which enables the participant to interact with devices through the system.
Returns: MediaDeviceService‹›
Static
recording
• get recording(): RecordingService‹›
Retrieves the unique RecordingService instance, which enables the participant to use the recording option.
Returns: RecordingService‹›
Static
session
• get session(): SessionService‹›
The Session Service.
Returns: SessionService‹›
Static
videoPresentation
• get videoPresentation(): VideoPresentationService‹›
Retrieves the unique VideoPresentationService instance, which enables the participant to use video presentations.
Returns: VideoPresentationService‹›
Methods
Static
initialize
▸ initialize(customerKey
: string, customerSecret
: string): void
Initializes the SDK using the customer key and secret.
Parameters:
Name | Type | Description |
---|---|---|
customerKey | string | - |
customerSecret | string |
Returns: void
Static
initializeToken
▸ initializeToken(accessToken
: string, callback
: Function): void
Intialize the SDK with an access token that is provided by the customer backend communicating with Voxeet servers. It Allows securing the customer key and secret.
The authentication flow is as follow:
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. This one must return a Promise
Client Customer Server Voxeet Server
| callback | /oauth2/token (2) |
|------------------->|------------------->|
| Access Token | Access Token |
|<-------------------|<-------------------|
(1) and (2) are two REST API endpoints available on Voxeet servers and documented on the developer portal.
Parameters:
Name | Type | Description |
---|---|---|
accessToken | string | An access token provided by the customer backend |
callback | Function | A callback returning a promise called when the access token needs to refreshed |
Returns: void