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 na8me
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.
See: Client.connect
ConnectionFailed
The event is triggered if a connection to the VoxImplant cloud couldn't be established.
See: Client.connect
Parameters
message:
string
Failure reason description
IncomingCall
The event is triggered when there is a new incoming call to current user
MicAccessResult
Parameters
fallback:
boolean
Optionalresult:
boolean
True is access was allowed, false - otherwise
stream:
MediaStream
MediaStream object
PlaybackError
PlaybackFinished
The event is triggered after sound playback was stopped.
Reconnected
Event is triggered when reconnection to the server is successful.
Reconnecting
Event is triggered when the SDK client loses connection with the Voximplant cloud and tries to reconnect, for example, when a customer's internet connection fails.
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