Constructor
new BoostLingo(authToken, optionsopt)
Create the Boostlingo instance
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
authToken |
string | Boostlingo auth token retrieved from the server |
|||||||||||||
options |
Object |
<optional> |
Properties
|
Methods
(static) regions() → {Array.<string>}
Boostlingo region list
Returns:
- Type
- Array.<string>
(static) version() → {string}
Boostlingo library version
Returns:
- Type
- string
(protected) _makeCall(callReq, isVideo, remoteContainer, localContaineropt) → {Promise.<Call>}
Helper for the creation of a video or voice call
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callReq |
CallRequest | ||
isVideo |
boolean | ||
remoteContainer |
HTMLElement | ||
localContainer |
HTMLElement |
<optional> |
Returns:
- Type
- Promise.<Call>
getCallDetails(callId) → {Promise.<CallDetails>}
Used to get details on a call after the call has completed
Parameters:
Name | Type | Description |
---|---|---|
callId |
number |
Returns:
- Type
- Promise.<CallDetails>
getCallDictionaries() → {Promise.<CallDictionaries>}
Retrieves the call dictionaries from the boostlingo API. Should be used for setting up language and service type lists, but also called from validateCallRequest caches the results so API is not hit every time.
Returns:
- Type
- Promise.<CallDictionaries>
getCurrentCall() → {Call}
Can be used to get the current (latest) call made through boostlingo
Returns:
- Type
- Call
getVideoLanguages() → {Promise.<Array.<Language>>}
Retrieves an ordered list of languages enabled in the video (VRI) policy. Helper for filtering and sorting the full list of languages. Uses the cached call dictionary.
Returns:
- Type
- Promise.<Array.<Language>>
getVoiceLanguages() → {Promise.<Array.<Language>>}
Retrieves an ordered list of languages enabled in the voice (OPI) policy. Helper for filtering and sorting the full list of languages. Uses the cached call dictionary.
Returns:
- Type
- Promise.<Array.<Language>>
makeVideoCall(callReq, remoteContainer, localContaineropt) → {Promise.<VideoCall>}
Used to make/place a VideoCall in boostlingo
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callReq |
CallRequest | ||
remoteContainer |
HTMLElement | html element where remote video/audio html5 elements will be placed |
|
localContainer |
HTMLElement |
<optional> |
html element where local video/audio html5 elements will be placed |
Returns:
- Type
- Promise.<VideoCall>
makeVoiceCall(callReq) → {Promise.<VoiceCall>}
Used to make/place a VoiceCall in boostlingo
Parameters:
Name | Type | Description |
---|---|---|
callReq |
CallRequest |
Returns:
- Type
- Promise.<VoiceCall>
validateCallReq(callReq, isVideo) → {Promise}
Validates the call request is appropriate to start a call. Can be called directly, but it is always called when making video/voice calls.
Parameters:
Name | Type | Description |
---|---|---|
callReq |
CallRequest | |
isVideo |
boolean |
Returns:
- Type
- Promise