Global

Methods


setLogLevel(level)

Sets log level for the Api using ApizeeApi.LOG_LEVEL_ constants

Parameters:
Name Type Description
level Integer

log level to set

Returns:
Type
Void

Type Definitions


Agent

Type:
  • Object
Properties:
Name Type Description
contact Contact
title string
nickname string
isPrefered boolean

AnswerOptions

Type:
  • Object
Properties:
Name Type Description
mediaTypeForIncomingCall String

This enables to choose the media type to establish a call.
Value can be : VIDEO (audio and video will be used to establish call), AUDIO (audio only), VIDEOONLY, NONE (establishing call without sharing any media)

mediaRoutingMode String

This enables to choose the media routing mode.
Value can be : hostOnly, stun, stunOnly, turn, turnOnly

turnServerAddress String

This enables to change the turn server used for the call

muted String

This parameter enables to start a muted call.
Value can be : VIDEO (audio and video will be muted), AUDIOONLY (only audio will be muted), VIDEOONLY (only video will be muted)


CallOptions

Type:
  • Object
Properties:
Name Type Description
audioOnly Boolean

sets the call to audio only, defaults to false

mediaTypeForOutgoingCall String

This enables to choose the media type to establish a call.
Value can be : VIDEO (audio and video will be used to establish call), AUDIO (audio only), VIDEOONLY, NONE (establishing call without sharing any media)

mediaRoutingMode String

This enables to choose the media routing mode.
Value can be : hostOnly, stun, stunOnly, turn, turnOnly

turnServerAddress String

This enables to change the turn server used for the call

record Boolean

True to activate the call recording on server side

muted String

This parameter enables to start a muted call.
Value can be : VIDEO (audio and video will be muted), AUDIOONLY (only audio will be muted), VIDEOONLY (only video will be muted)


CallStats

Type:
  • Object
Properties:
Name Type Description
audioSent Object

Statistics about audio sent.

videoSent Object

Statistics about video sent.

audioReceived Object

Statistics about audio received.

videoReceived Object

Statistics about video received.

quality Object

Overall quality score.


CloudMediaInfo

Type:
  • Object
Properties:
Name Type Description
url string
id string

ConferenceAccessStatus

Type:
  • Object
Properties:
Name Type Description
access String

Either GRANTED or NEED_MODERATOR_ACCEPTATION.

role String

Either moderator, contributor or guest.

moderator String

User id of conference moderator.

friendlyName String

Display name of the conference.


ConversationMessage

Type:
  • Object
Properties:
Name Type Description
content string
timestamp number
uuid string
fromContact Boolean

ConversationMessage

Type:
  • Object
Properties:
Name Type Description
content string

content of the message

sender Contact
sender_id string
timestamp Date

message send time

date Date

message send time


CreateStreamOptions

Type:
  • Object
Properties:
Name Type Description
audioInputId string

audio input device id (obtained from UserAgent.fetchUserMediaDevices); set to false if audio track is not requested

videoInputId string

video input device id (obtained from UserAgent.fetchUserMediaDevices); set to false if video track is not requested

constraints object

other MediaTrackConstraints

enhancedAudioActivated boolean

add possibility to create an enhanced audio flow (echoCancellation deactivated, noiseReduction deactivated ...) - Only supported on Chrome


DefaultDevices

Type:
  • Object
Properties:
Name Type Description
audioInput MediaDevice
audioOutput MediaDevice
videoInput MediaDevice

DisconnectOptions

Type:
  • Object
Properties:
Name Type Description
invalidateUserToken boolean

should the user token be invalidated upon disconnection?


EnterpriseInformation

Type:
  • Object
Properties:
Name Type Description
id string
name string
logo string
city string
address string
timeRanges any
preferedCCS string
apiKey string

fetchEnterpriseInformationOptions

Type:
  • Object
Properties:
Name Type Description
id string

optional

apiKey string

optional

siteKey string

optional

cloudUrl string

optional


fetchSiteAgentsOptions

Type:
  • Object
Properties:
Name Type Description
usePresence boolean

optional

useAcd boolean

optional

cloudUrl string

optional

convId string

optional


FileInfo

Type:
  • Object
Properties:
Name Type Description
name String
type String

GeolocationCoordonates

Type:
  • Object
Properties:
Name Type Description
latitude number

Representing the position's latitude in decimal degrees

longitude number

Representing the position's longitude in decimal degrees

altitude number

Representing the psoition's altitude in meters, relative to sea level.

accuracy number

Representing the accuracy of the latitude and longitude properties, expressed in meters

altitudeAccuracy number

Representing the accuracy of the altitude expressed in meters. This value can be null

heading number

Representing the direction in which the device is traveling. This value specified in degrees. 0 = True North, 90 = East, 270 = West

speed number

Representing the velocity of the device in meters per seconds. This value can be null


GeolocationPosition

Type:
  • Object
Properties:
Name Type Description
coords GeolocationCoordonates

Coordinates object defining the current position

timestamp number

A DOMTimestamp representing the time at which the location was retrieved


GeolocationPositionError

Type:
  • Object
Properties:
Name Type Description
code number

Representing the error code: PERMISSION_DENIED, POSITION_UNAVAILABLE or TIMEOUT

message string

Human-readable DOMString describing the details of the error


GeolocationPositionOptions

Type:
  • Object
Properties:
Name Type Description
enableHighAccuracy boolean

If false, the device can take the liberty to save resources by responding more quickly and/or using less power.

timeout number

Meaning that getCurrentPosition() won't return until the position is available

maximumAge number

If set to Infinity the device must return a cached position regardless of its age


JoinOptions

Type:
  • Object
Properties:
Name Type Description
session Session

Needed if user is moderator and to save group messages to cloud

password string

Used for password-protected conferences


MediaDeviceList

Type:
  • Object
Properties:
Name Type Description
audioinput Object.<string, MediaDevice>
audiooutput Object.<string, MediaDevice>
videoinput Object.<string, MediaDevice>

MediaRecorderOptions

Type:
  • Object
Properties:
Name Type Description
mimeType DOMString

The container and codec format(s) [RFC2046] for the recording, which may include any parameters that are defined for the format

audioBitsPerSecond unsigned_Long

Aggregate target bits per second for encoding of the Audio track(s), if any.
This is a hint for the encoder and the value might be surpassed, not achieved, or only be achieved over a long period of time.

videoBitsPerSecond unsigned_Long

Aggregate target bits per second for encoding of the Video track(s), if any.
This is a hint for the encoder and the value might be surpassed, not achieved, or only be achieved over a long period of time.

bitsPerSecond unsigned_Long

Aggregate target bits per second for encoding of all Video and Audio Track(s) present.
This parameter overrides either audioBitsPerSecond or videoBitsPerSecond if present, and might be distributed among the present track encoders as the UA sees fit.
This parameter is a hint for the encoder(s) and the total value might be surpassed, not achieved, or only be achieved over a long period of time.


NetworkInformation

Type:
  • Object
Properties:
Name Type Description
testServer string

Server used for network tests

httpPing number

Http ping RTT value with cloud server (value might be higher than a standard ping)

upload Object

Upload test information

download Object

Download test information


PrivateConferenceCreationOptions

Type:
  • Object
Properties:
Name Type Description
password string

optional: if this conference is to be protected via a password, if this option is not set, users will need moderator approval to enter the conference

friendlyName string

optional: friendly name for this conference to display in Apizee cloud


PublishOptions

Type:
  • Object
Properties:
Name Type Description
turnServerAddress String

This enables to change the turn server used for the call


PushDataBufferDescriptor

Type:
  • Object
Properties:
Name Type Description
buffer ArrayBuffer

the buffer to transfer.

filename String

the name of the data.

filetype String

the MIME type of the data.

metadata Object

Optional user data.


PushDataFileDescriptor

Type:
  • Object
Properties:
Name Type Description
file File

the file to transfer.

filename String

Optional override of the file name.

filetype String

Optional override of the MIME type.

metadata Object

Optional user data.


PushDataOptions

Type:
  • Object
Properties:
Name Type Description
token String

token

session Session

apiRTC session

turnServerAddress String

This enables to change the turn server used for the call


RecordInformation

Type:
  • Object
Properties:
Name Type Description
filename string
url string

RecordingInfo

Type:
  • Object
Properties:
Name Type Description
roomName String

Room name.

callId String

Call identifier.

recordType String

Type of record. Either 'userStream' or 'composite'.

convId String

Conversation identifier.

mediaId String

Media identifier.

mediaURL String

Media URL.

recordedFileName String

File name.


RegisterInformation

Type:
  • Object
Properties:
Name Type Description
cloudUrl string

Registration apizee cloud url

cloudFetchRetries number

Number of fetch retry when sending request to apizee cloud (default value is 100)

cloudFetchRetryDelay number

Delay in ms between fetch retry when sending request to apizee cloud. This delay is increased on each retry : retryDelay = retryDelay x retryNumber. (default value is 200 ms)

id string

Set a predefined id for the session instead of the cloud id or a random id

uri string

Set this user agent uri for registration

mcu string

Preferred MCU server

ccs string

Preferred CCS server

password string

UserAgent password for 'apizee:' user agents

groups Array.<string>

Presence groups the user agent will join on registration

subscribeTo Array.<string>

Presence groups the user agent will subscribe to on registration

userData Object

Set initial userData like photo, nickname...

extJsLoadingRetryNb number

Number of retry on external Js loading (default value is 100)

extJsLoadingRetryDelay number

Delay in ms between two retries on external Js loading. This delay is increased on each retry : retryDelay = retryDelay x retryNumber. (default value is 200 ms)

ccsConnectionRetryNb number

Number of retry on CCS connection (default value is Infinity)

ccsConnectionRetryDelay number

Delay in ms to initially wait before attempting a new reconnection to CCS. Then it is affected with a random factor of 0.5 (default value is 1000)

contactDisconnectionDelay number

Delay in ms before a contact is actually seen as offline after it disconnected (eg. short reconnection after page switching) (default value is 10000)

turnServerAddress string

Turn server address to be used for all calls (Default value is : mp1.apizee.com)

userAcceptOnIncomingDataCall boolean

This option will enables you to request user to accept or refuse the call


sendMessageOptions

Type:
  • Object
Properties:
Name Type Description
session Session

Set this option to save messages in cloud


SessionHistoryOptions

Type:
  • Object
Properties:
Name Type Description
count number

optional : How many messages shold be fetched

lastMessTimestamp number

optional : Date to fetch messages from

lastUUID number

optional : first message uuid to fetch from

onlyDestMessage Boolean

optional : only fetch messages sent by contact


ShareScreenOptions

Type:
  • Object
Properties:
Name Type Description
captureSourceType JSON

This enables to choose what the user will be propose to share between screen, applications, browser tab and audio.
Usage is different depending the browser :

  • on Chrome, captureSourceTypevalue value is an array that can be ["screen", "window", "tab", "audio"]. This array is used to restrict what will be proposed to the user
  • on Firefox, captureSourceTypevalue value is a string that can be "screen", "window" or "application". This string is used to choose what will be proposed to the user

SnapshotOptions

Type:
  • Object
Properties:
Name Type Description
filters Object

StatusChangeInfo

Type:
  • Object
Properties:
Name Type Description
status Symbol
id string

id of the invitation


StreamInfo

Type:
  • Object
Properties:
Name Type Description
streamId string
contact Contact

owner of the stream

hasAudio boolean

does the stream contain audio tracks?

hasVideo boolean

does the stream contain video tracks?

isScreensharing boolean

is it a screensharing?

isRemote boolean

is it a remote stream ?

time Date

receive time

callId string

call identifier


StreamOptions

Type:
  • Object
Properties:
Name Type Argument Description
type string

type of stream value can be 'audio' or 'video'

screensharing boolean <optional>

indicate whether stream in a screensharing or not. Value : true or false

contact Contact <optional>

associated contact of the stream

streamId streamId <optional>

Identifier of the stream

audioInput MediaDevice <optional>

audioInput device id, can be null

videoInput MediaDevice <optional>

videoInput device id, can be null


SubscribeOptions

Type:
  • Object
Properties:
Name Type Description
audioOnly Boolean
turnServerAddress String

This enables to change the turn server used for the call


TransferInformation

Type:
  • Object
Properties:
Name Type Description
uuid string

file identifier

fileSize number

total size of the file being transfered

remainingSize number

remaining data size to be transfered

percentage number

progress percentage of the transfer

sendChunkNb number

transfer chunk number

transferDuration number

current duration of the transfer

lastPacket boolean

is this the last packet?


UploadOptions

Type:
  • Object
Properties:
Name Type Description
title string
description string
type string

UserAgentOptions

Type:
  • Object
Properties:
Name Type Description
uri string

Registration URI, must be have the form 'apizee:<cloud_login>' for cloud users or 'apzkey:<api_key>' for anonymous users

apiRTCMediaDeviceDetectionEnabled boolean

Used to enable media device detection on apiRTC when event is not managed by browser (Ex : mediaDeviceChanged not supported on Chrome/Android)

apiRTCMediaDeviceDetectionDelay string

Used to define the delay of Media Device detection. Check apiRTCMediaDeviceDetectionEnabled. Default value is 10000


WebSessionInfo

Type:
  • Object
Properties:
Name Type Description
webSessionId string
conversationId string
siteKey string