Rate this page:

Events

The events that are triggered by Client instance. See the getInstance method.

Constants

ACDError

Copy URL

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

Copy URL

The event is triggered when ACD status of current user changed from SDK or from inside the ACD service.

AuthResult

Copy URL

The event is triggered after the Client.login, Client.loginWithOneTimeKey and Client.loginWithToken methods call.

Parameters

  • code:

    number

    Optional

    Refresh token error code, possible values are:

    Code Description
    401 invalid token
    404 invalid username
    500 internal error
    701 refresh token expired
  • displayName:

    string

    Optional

    Authorized user's display name

  • key:

    string

    Optional

    This 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

  • Optional

    New tokens structure

ConnectionClosed

Copy URL

The event is triggered if a connection to VoxImplant Cloud was closed because of network problems or the Client.disconnect function call.

ConnectionEstablished

Copy URL

The event is triggered after connection to VoxImplant Cloud was established successfully.

ConnectionFailed

Copy URL

The event is triggered if a connection to the VoxImplant cloud couldn't be established.

Parameters

  • message:

    string

    Failure reason description

IncomingCall

Copy URL

The event is triggered when there is a new incoming call to current user

Parameters

  • call:

    Call

    Incoming call instance. See Call function for details

  • headers:

    Object

    Optional

    Optional SIP headers received with the message

  • video:

    boolean

    Optional

    True if the caller initiated video call

MicAccessResult

Copy URL

Parameters

  • result:

    boolean

    True is access was allowed, false - otherwise

  • stream:

    MediaStream

    MediaStream object

PlaybackError

Beta
Copy URL

Only accessible in the @next npm tag. You can switch active tag by the "npm i voximplant-websdk@next" command.

PlaybackFinished

Copy URL

The event is triggered after sound playback was stopped.

RefreshTokenResult

Copy URL

The event is triggered after the LoginTokens.refreshToken call

Parameters

  • code:

    number

    Optional

    Refresh 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

  • Optional

    New tokens structure

SDKReady

Copy URL

The event is triggered after SDK was successfully initialized after the Client.init function call

Parameters

  • version:

    string

    SDK version