Events
The events that are triggered by Client instance. See the getInstance method.
Constants
ACDError
The event is triggered when the Web SDK detects incorrect use of the ACD module, e.g., using the same credentials in the different browsers or multiple browser's windows.
ACDStatusUpdated
The event is triggered when ACD status of current user changed from SDK or from inside the ACD service.
AuthResult
The event is triggered after the Client.login, Client.loginWithOneTimeKey and Client.loginWithToken methods call.
Parameters
code:
number
OptionalRefresh token error code, possible values are:
Code Description 401 invalid token 404 invalid username 500 internal error 701 refresh token expired displayName:
string
OptionalAuthorized user's display name
key:
string
OptionalThis parameter is used to calculate hash parameter for Client.loginWithOneTimeKey method. AuthResult with the key dispatched after Client.requestOneTimeLoginKey method was called
result:
boolean
True in case of successful refresh, false - otherwise
tokens:
OptionalNew tokens structure
ConnectionClosed
The event is triggered if a connection to VoxImplant Cloud was closed because of network problems or the Client.disconnect function call.
ConnectionEstablished
The event is triggered after connection to VoxImplant Cloud was established successfully.
ConnectionFailed
The event is triggered if a connection to the VoxImplant cloud couldn't be established.
Parameters
message:
string
Failure reason description
IncomingCall
The event is triggered when there is a new incoming call to current user
MicAccessResult
Parameters
result:
boolean
True is access was allowed, false - otherwise
stream:
MediaStream
MediaStream object
PlaybackError
Only accessible in the @next npm tag. You can switch active tag by the "npm i voximplant-websdk@next" command.
PlaybackFinished
The event is triggered after sound playback was stopped.
RefreshTokenResult
The event is triggered after the LoginTokens.refreshToken call
Parameters
code:
number
OptionalRefresh token error code, possible values are:
Code Description 401 invalid token 404 invalid username 500 internal error 701 refresh token expired result:
boolean
True in case of successful refresh, false - otherwise
tokens:
OptionalNew tokens structure
SDKReady
The event is triggered after SDK was successfully initialized after the Client.init function call
Parameters
version:
string
SDK version