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)


CallIceErrorDescriptor

Type:
  • object
Properties:
Name Type Description
iceState string

Either 'failed' or 'disconnected'.

previousIceState string

Either 'disconnected' or undefined.

clientId string

Local user ID from where this descriptor come from.

remoteId string

Distant user ID from where this descriptor come from.


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.


ConversationIceErrorDescriptor

Type:
  • object
Properties:
Name Type Description
iceState string

Either 'failed' or 'disconnected'.

previousIceState string

Either 'disconnected' or undefined.

mode string

Either 'mesh' or 'sfu'.

type string

Either 'publish' or 'subscribe'.

clientId string

Local user ID from where this descriptor come from.

remoteId string

Distant user ID from where this descriptor come from.

mesh object

Additional information when mode is 'mesh'.

Properties
Name Type Description
callerId string

User ID of caller (subscriber).

callerCallId string

Call ID for the caller (subscriber).

calleeId string

User ID of the feed.

calleeCallId string

Call ID of the feed.

stream object

Feed information when type is 'subscribe'.

Properties
Name Type Description
attributes object

Feed attributes when type is 'subscribe'.

Properties
Name Type Description
callerId object

User ID of the feed.

callId object

Call ID of the feed.


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


ConversationMessage

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

CreateStreamFromUserMediaOptions

Type:
  • Object
Properties:
Name Type Description
enhancedAudioActivated boolean

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

facingMode string

facingMode should be equal to 'user', 'environment', 'left', 'right' or 'deactivated'.


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

facingMode string

facingMode should be equal to 'user', 'environment', 'left', 'right' or 'deactivated'.


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

EnterpriseTag

Type:
  • object
Properties:
Name Type Description
id string
name string
selected boolean

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

Modify the turn server used for the call.

qos Object

QoS preferences.

Properties
Name Type Description
videoMinQuality String

Defines minimum video quality (one of excellent, good, medium or bad).

videoStartQuality String

Defines start video quality (one of upper, excellent, good, medium or bad).

videoForbidInactive Boolean

Forbids video disabling.

audioLabels Object

Array of string(s). Used for stream selection, for conversation recording.

videoLabels Object

Array of string(s). Used for stream selection, for conversation recording.

audioOnly Boolean

true if publish is to be done in audio only. Video is used by default.

videoOnly Boolean

true if publish is to be done in video only. Video is used by default, audioOnly parameter is used in priority.

context Object

User defined context.


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.

overwrite boolean

Whether the overwriting is enabled. By default, overwriting is not enabled.

ttl number

The time to live (in seconds) of the data after being successfully pushed. By default, the data is persistent.

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.

overwrite boolean

Whether the overwriting is enabled. By default, overwriting is not enabled.

ttl number

The time to live (in seconds) of the data after being successfully pushed. By default, the data is persistent.

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 data call. Default value is true.

userAcceptOnIncomingScreenSharingCall boolean

This option will enables you to request user to accept or refuse the screenSharing call. Default value is false.

idConversionActivated boolean

When this option is activated if id is a string, it will be converted to a numeric value. This is deactivated by default.

idPersistenceTimeout number

Time in ms to keep a given id after unregistration.

token string

token parameter to be used for user authentication


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
Properties
Name Type Description
blur Object

A CSS . Applies a Gaussian blur to the drawing.
It defines the value of the standard deviation to the Gaussian function, i.e., how many pixels on the screen blend into each other;
thus, a larger value will create more blur. A value of 0 leaves the input unchanged.

brightness Object

A CSS . Applies a linear multiplier to the drawing, making it appear brighter or darker.
A value under 100% darkens the image, while a value over 100% brightens it.
A value of 0% will create an image that is completely black, while a value of 100% leaves the input unchanged.

contrast Object

A CSS . Adjusts the contrast of the drawing. A value of 0% will create a drawing that is completely black.
A value of 100% leaves the drawing unchanged.

grayscale Object

A CSS . Converts the drawing to grayscale. A value of 100% is completely grayscale.
A value of 0% leaves the drawing unchanged.

hue-rotate Object

A CSS . Applies a hue rotation on the drawing. A value of 0deg leaves the input unchanged.

invert Object

A CSS . Inverts the drawing. A value of 100% means complete inversion.
A value of 0% leaves the drawing unchanged.

opacity Object

A CSS . Applies transparency to the drawing. A value of 0% means completely transparent.
A value of 100% leaves the drawing unchanged.

saturate Object

A CSS . Saturates the drawing. A value of 0% means completely un-saturated.
A value of 100% leaves the drawing unchanged.

sepia Object

A CSS . Converts the drawing to sepia. A value of 100% means completely sepia.
A value of 0% leaves the drawing unchanged.

output Object

Enable to select the output format . Default format is a Data URI with image/png type. Value can be set to blob
output === 'blob'

width Object

Enable to select the width of the snapshot. Default value is the video width

height Object

Enable to select the height of the snapshot. Default value is the video height

divId Object

div identifier. If defined, snapshot will be done from the defined video div


StatusChangeInfo

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

id of the invitation


StreamInfo

Type:
  • Object
Properties:
Name Type Description
streamId string

Stream identifier.

contact Contact

Owner of the stream, null if self.

hasAudio boolean

Whether the audio track is active.

hasVideo boolean

Whether the video track is active.

isAudioMuted boolean

Whether the audio track is muted.

isVideoMuted boolean

Whether the video track is muted.

isScreensharing boolean

Whether the stream is a screen share.

isSIP boolean

Whether the stream comes from a SIP gateway.

isRemote boolean

Whether the stream belongs to a contact (not self).

time Date

receive time

callId string

Call ID.


StreamingInfo

Type:
  • Object
Properties:
Name Type Description
roomName String
callId String
clientId String

StreamingOptions

Type:
  • Object
Properties:
Name Type Description
service string
server string
streamKey string

StreamLabels

Type:
  • Object
Properties:
Name Type Description
audioSourceLabel string

Label of the audio source. If the corresponding source has or had no label, the attribute MUST instead return the empty string.

videoSourceLabel string

Label of the video source. If the corresponding source has or had no label, the attribute MUST instead return the empty string.


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

: true if publish is to be done in audio only. Video is used by default

videoOnly Boolean

: true if publish is to be done in video only. Video is used by default, audioOnly parameter is used in priority.

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