Call

Call

A Call is the base class for all derived types of calls

Constructor

new Call(api, callReq)

Create a Call

Parameters:
Name Type Description
api Api

api instance

callReq CallRequest

call request information

Fires:
  • Call#event:callConnected
  • Call#event:callCompleted
  • Call#event:error
  • Call#event:interlocutorInfo

Extends

  • EventEmitter

Members

type

Returns the type of this object

Methods

(protected) _callCompleted()

Officially completes the call. This should be called by all derived classes

(protected) _callConnected()

Officially starts the call when the interpreter has joined and begins process of obtaining interlocutor info. This should be called by all derived classes

disableAudio()

Disables audio. Essentially a mute.

getInterlocutorInfo() → {InterlocutorInfo}

Used for retrieving interlocutor info after event has already been fired. Will return null if information is not yet ready

Returns:

details on call participant

Type
InterlocutorInfo

hangup() → {Promise.<boolean>}

Hangup the call by calling the proper API method

Returns:
Type
Promise.<boolean>

isVideo() → {boolean}

Returns true if this is a video call, false otherwise

Returns:
Type
boolean

isVoice() → {boolean}

Returns true if this is a voice call, false otherwise

Returns:
Type
boolean

start() → {Promise}

Starts call by contacting the boostlingo server

Returns:
Type
Promise