Classes

Classes

Call
CloudApi
Conference
Contact
Conversation
ConversationCall
DataChannel
Enterprise
EventEmitter
MediaDevice
Observable
ReceivedCallInvitation
ReceivedConversationInvitation
ReceivedConversationJoinRequest
ReceivedDataChannelInvitation
ReceivedFileTransferInvitation
ReceivedInvitation
ReceivedWhiteboardInvitation
SentInvitation
Session
Stream
UserAgent
UserData

Namespaces

Constants

Events


accepted

Fired when contact accepts call

Type: Void

declined

Fired when contact decline call

Type: object
Properties:
Name Type Description
reason string

can be User_Busy, User_Refused_Call, User_Media_Error, Hangup_From_Callee, Hangup_From_Caller, stop_ScreenSharing, Ice_disconnected, Ice_failed, WebRTC_Plugin_Installation_needed, User_Not_Found, disconnected, call take on other device, bye on other device


desktopCapture

Fired on user media access error :
This event is fired when user has not granted the access to his micro and webcam or brower was not able to access medias

Type: object
Properties:
Name Type Description
event String

event that has happened. Values can be : UserMediaError_HTTPS_needed, UserMediaError, Extension_installation_Error, Extension_not_installed, Browser_Not_Compatible


disconnectionWarning

Fired when an disconnection is detected
This event is fired as a warning once a disconnection error was detected on the call.

Type: object
Properties:
Name Type Description
tries string

number of warning send


error

Fired when an error is detected
This event is fired once an error was detected on the call.

Type: object
Properties:
Name Type Description
errorCode string

Code description of the error

errorInfo string

Code information about the error

descriptor object

Detailed descriptor of the error


hangup

Fired when contact hangs up from 1-1 call
'from' property indicates which side initiated the hangup, either 'remote' or 'local'

Type: object
Properties:
Name Type Description
from string
reason string

can be User_Busy, User_Refused_Call, User_Media_Error, Hangup_From_Callee, Hangup_From_Caller, stop_ScreenSharing, Ice_disconnected, Ice_failed, WebRTC_Plugin_Installation_needed, User_Not_Found, disconnected, call take on other device, bye on other device


localStreamAvailable

Fired when local stream is available after calling the contact

Type: Stream

recordAvailable

Fired when call record is available.
This event is fired once the call is ended for both peers if the call was recorded.

Type: object
Properties:
Name Type Description
mediaURL string

video file URL


remoteStreamUpdated

Fired when remote stream properties changed.

Type: object
Properties:
Name Type Description
callId string

callId

audio boolean

whether an audio line has been negotiated and active.

audioMuted boolean

whether the audio line is muted.

video boolean

whether a video line has been negotiated and active.

videoMuted boolean

whether the video line is muted.


response

Fired when contact accepted or declined call

Type: Void

statsUpdate

Fired when call record is available.
This event is fired once the call is ended for both peers if the call was recorded.

Type: CallStats

streamAdded

Fired when contact's stream is received from 1-1 call

Type: Stream

streamRemoved

Fired when contact's stream is removed from 1-1 call, stream may be null

Type: Stream

userMediaError

Fired on user media access error :
This event is fired when user has not granted the access to his micro and webcam or brower was not able to access medias

Type: object
Properties:
Name Type Description
onCallEstablishment String

true or false, indicate whether access to media has been requested on call establishment or not (can be requested on autoAnswer feature activation)

callType String

value can be 'media' or screenSharing

error Object

error given by WebRTC API

userMediaStreamId String

stream id

tryAudioCallActivated Boolean

whether apiRTC will try to establish the call in audio only after this error detection


audioAmplitudeUpdate

Fired when the audio amplitude change happened on conversation stream (indicating user speaking or not)

Type: object
Properties:
Name Type Description
callId string
descriptor descriptor
Inherited From:

availableStreamsUpdated

Fired when available streams in conversation have been updated

Type: Array.<StreamInfo>
Inherited From:

callStatsUpdate

Type: object
Properties:
Name Type Description
callId string
stats CallStats
Inherited From:

closed

Fired when conversation has been closed

Type: void
Inherited From:

contactJoined

Fired when a contact joined the conversation

Type: Contact
Inherited From:

contactJoinedWaitingRoom

Contact joined the waiting room event (moderator only)

Type: Contact
Inherited From:

contactLeft

Fired when a contact left the conversation

Type: Contact
Inherited From:

contactLeftWaitingRoom

Contact left the waiting room event (moderator only)

Type: Contact
Inherited From:

customEvent

Fired when a custom data event has been received from a contact within the conversation.

Type: object
Properties:
Name Type Description
event string

event identifier

sender Contact
content object
Inherited From:

data

Fired when data is received from a contact within the conversation

Type: object
Properties:
Name Type Description
content object

data

sender Contact
Inherited From:

disconnectionWarning

Fired when a disconnection happened on conversation stream

Type: object
Properties:
Name Type Description
streamInfo Array.<StreamInfo>

Stream information

Inherited From:

error

Fired when an error happened on conversation stream

Type: object
Properties:
Name Type Description
streamInfo Array.<StreamInfo>

Stream information

errorCode string

Code description of the error

errorInfo string

Code information about the error

descriptor object

Detailed descriptor of the error

Inherited From:

hangup

Fired when a publish or subscribe is terminated.

Type: object
Properties:
Name Type Description
from string

'local' or 'remote'.

reason string

Hangup reason.

Inherited From:

joined

Fired when conversation has been joined by the user.

Type: void
Inherited From:

left

Fired when conversation has been left by the user.

Type: void
Inherited From:

localStreamUpdated

Fired when local stream properties changed.

Type: object
Properties:
Name Type Description
callId string

callId.

streamId string

streamId.

audio boolean

whether an audio line has been negotiated and active.

audioMuted boolean

whether the audio line is muted.

video boolean

whether a video line has been negotiated and active.

videoMuted boolean

whether the video line is muted.

Inherited From:

message

Fired when a message is received from contact in the conversation

Type: object
Properties:
Name Type Description
content string

content of the message

sender Contact
time Date

receive time

Inherited From:

moderatorConnected

Fired when moderator joined the conversation

Type: object
Properties:
Name Type Description
moderator Contact
Inherited From:

newMediaAvailable

Fired when a new media is available in the conversation.

Type: object
Properties:
Name Type Description
sender Contact
media CloudMediaInfo
Inherited From:

newWhiteboardSession

Fired when a contact in the conversation starts a new whiteboard session

Type: object
Properties:
Name Type Description
sender Contact
Inherited From:

persistentDataUpdated

Fired when conversation persistent data has been updated.

Type: object
Inherited From:

pointerLocationChanged

Fired when a pointer location changed.

Type: object
Properties:
Name Type Description
sender Contact

sender.

source object

source identifier.

x number

The X coordinate of the mouse pointer in source coordinates.

y number

The Y coordinate of the mouse pointer in source coordinates.

data object

Optional data.

Inherited From:

pointerSharingEnabled

Fired when pointer sharing is enabled or disabled.

Type: object
Properties:
Name Type Description
enabled boolean

True when enabled, false when disabled.

Inherited From:

recordingAvailable

Fired when a recording is available for play or download.

Type: RecordingInfo
Inherited From:

recordingStarted

Fired when a recording started.

Type: RecordingInfo
Inherited From:

remoteStreamUpdated

Fired when remote stream properties changed.

Type: object
Properties:
Name Type Description
callId string

callId

audio boolean

whether an audio line has been negotiated and active.

audioMuted boolean

whether the audio line is muted.

video boolean

whether a video line has been negotiated and active.

videoMuted boolean

whether the video line is muted.

Inherited From:

Fired when a slow link is detected.

Type: object
Properties:
Name Type Description
callId string

callId

Inherited From:

streamAdded

Fired when a stream is received from this conversation after a subscription

Type: Stream
Inherited From:

streamListChanged

Fired when available stream list changed

Type: StreamInfo
Inherited From:

streamRemoved

Fired when stream is removed from this conversation after an unsubscription

Type: Stream
Inherited From:

transferBegun

Fired when a transfer begun (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

Inherited From:

transferEnded

Fired when a transfer ended (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

Inherited From:

transferProgress

Fired with progress status during a transfer (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

size number

total transfered byte count.

remBytes number

remaining byte count.

percentage number

progress ratio.

Inherited From:

waitingForModeratorAcceptance

Fired when entering the waiting room of a conversation, requiring the moderator to accept before joining the room

Type: object
Properties:
Name Type Description
moderator Contact
Inherited From:

conversationInvitation

Contact conversation invitation event

Type: ReceivedConversationInvitation

customEvent

Fired when a custom data event has been received from the contact

Type: object
Properties:
Name Type Description
event string

event identifier

content object
conversation Conversation

Associated conversation, field may not be present


data

Receive data from contact event

Type: object

dataChannelInvitation

Contact file transfer invitation event

Type: ReceivedDataChannelInvitation

fileSentSuccessfully

Fired when file was successfully sent to contact

Type: object
Properties:
Name Type Description
fileInfo FileInfo
transferInformation TransferInformation

fileTransferError

Fired during file transfer if an error occured

Type: object
Properties:
Name Type Description
error object
invitationId string

fileTransferInvitation

Contact file transfer invitation event

Type: ReceivedFileTransferInvitation

fileTransferProgress

Fired during file transfer

Type: object
Properties:
Name Type Description
fileInfo FileInfo
transferInformation TransferInformation

incomingCall

Fired when user receives an incoming call

Type: Call

incomingScreenSharingCall

Fired when user receives an incoming screenSharing call

Type: Call

joinGroup

When contact joins a group

Type: string

leaveGroup

When contact leaves a group

Type: string

message

Receive message from contact event

Type: object
Properties:
Name Type Description
content string

content of the message

uuid integer

message unique id

time date

date of when the message was received


newMediaAvailable

When a new media has been pushed by the contact to the cloud and is available

Type: CloudMediaInfo

whiteboardInvitation

Contact whiteboard invitation event

Type: ReceivedWhiteboardInvitation

audioAmplitudeUpdate

Fired when the audio amplitude change happened on conversation stream (indicating user speaking or not)

Type: object
Properties:
Name Type Description
callId string
descriptor descriptor

availableStreamsUpdated

Fired when available streams in conversation have been updated

Type: Array.<StreamInfo>

callStatsUpdate

Type: object
Properties:
Name Type Description
callId string
stats CallStats

closed

Fired when conversation has been closed

Type: void

contactJoined

Fired when a contact joined the conversation

Type: Contact

contactJoinedWaitingRoom

Contact joined the waiting room event (moderator only)

Type: Contact

contactLeft

Fired when a contact left the conversation

Type: Contact

contactLeftWaitingRoom

Contact left the waiting room event (moderator only)

Type: Contact

customEvent

Fired when a custom data event has been received from a contact within the conversation.

Type: object
Properties:
Name Type Description
event string

event identifier

sender Contact
content object

data

Fired when data is received from a contact within the conversation

Type: object
Properties:
Name Type Description
content object

data

sender Contact

disconnectionWarning

Fired when a disconnection happened on conversation stream

Type: object
Properties:
Name Type Description
streamInfo Array.<StreamInfo>

Stream information


error

Fired when an error happened on conversation stream

Type: object
Properties:
Name Type Description
streamInfo Array.<StreamInfo>

Stream information

errorCode string

Code description of the error

errorInfo string

Code information about the error

descriptor object

Detailed descriptor of the error


hangup

Fired when a publish or subscribe is terminated.

Type: object
Properties:
Name Type Description
from string

'local' or 'remote'.

reason string

Hangup reason.


joined

Fired when conversation has been joined by the user.

Type: void

left

Fired when conversation has been left by the user.

Type: void

localStreamUpdated

Fired when local stream properties changed.

Type: object
Properties:
Name Type Description
callId string

callId.

streamId string

streamId.

audio boolean

whether an audio line has been negotiated and active.

audioMuted boolean

whether the audio line is muted.

video boolean

whether a video line has been negotiated and active.

videoMuted boolean

whether the video line is muted.


message

Fired when a message is received from contact in the conversation

Type: object
Properties:
Name Type Description
content string

content of the message

sender Contact
time Date

receive time


moderatorConnected

Fired when moderator joined the conversation

Type: object
Properties:
Name Type Description
moderator Contact

newMediaAvailable

Fired when a new media is available in the conversation.

Type: object
Properties:
Name Type Description
sender Contact
media CloudMediaInfo

newWhiteboardSession

Fired when a contact in the conversation starts a new whiteboard session

Type: object
Properties:
Name Type Description
sender Contact

persistentDataUpdated

Fired when conversation persistent data has been updated.

Type: object

pointerLocationChanged

Fired when a pointer location changed.

Type: object
Properties:
Name Type Description
sender Contact

sender.

source object

source identifier.

x number

The X coordinate of the mouse pointer in source coordinates.

y number

The Y coordinate of the mouse pointer in source coordinates.

data object

Optional data.


pointerSharingEnabled

Fired when pointer sharing is enabled or disabled.

Type: object
Properties:
Name Type Description
enabled boolean

True when enabled, false when disabled.


recordingAvailable

Fired when a recording is available for play or download.

Type: RecordingInfo

recordingStarted

Fired when a recording started.

Type: RecordingInfo

remoteStreamUpdated

Fired when remote stream properties changed.

Type: object
Properties:
Name Type Description
callId string

callId

audio boolean

whether an audio line has been negotiated and active.

audioMuted boolean

whether the audio line is muted.

video boolean

whether a video line has been negotiated and active.

videoMuted boolean

whether the video line is muted.


Fired when a slow link is detected.

Type: object
Properties:
Name Type Description
callId string

callId


streamAdded

Fired when a stream is received from this conversation after a subscription

Type: Stream

streamListChanged

Fired when available stream list changed

Type: StreamInfo

streamRemoved

Fired when stream is removed from this conversation after an unsubscription

Type: Stream

transferBegun

Fired when a transfer begun (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.


transferEnded

Fired when a transfer ended (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.


transferProgress

Fired with progress status during a transfer (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

size number

total transfered byte count.

remBytes number

remaining byte count.

percentage number

progress ratio.


waitingForModeratorAcceptance

Fired when entering the waiting room of a conversation, requiring the moderator to accept before joining the room

Type: object
Properties:
Name Type Description
moderator Contact

accepted

When contact accepts datachannel

Type: Void

closed

When the data channel effectively closed

Type: Void

dataReceived

Fired at the end of a data transfer when data has been received

Type: object
Properties:
Name Type Description
uuid string
data string

declined

When contact decline datachannel

Type: Void

ended

When contact hangs up from 1-1 datachannel, 'from' property indicates which side initiated the ended, either 'remote' or 'local'

Type: object
Properties:
Name Type Description
from string

error

When the data channel returns an error

Type: Void

opened

When the data channel effectively opened

Type: Void

response

When contact accepted or declined datachannel

Type: Void

transferComplete

Fired at the end of a data transfer

Type: TransferInformation

transferProgress

Fired periodically during a data transfer

Type: TransferInformation

expired

Fired when the call invitation has expired (eg. caller cancelled call)

Type: Void
Deprecated:
  • Please note that this event is now deprecated as we have added a statusChange event

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:

expired

When the call invitation has expired (eg. caller cancelled call)

Type: Void
Deprecated:
  • Please note that this event is now deprecated as we have added a statusChange event

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:

error

When an error occured during file transfer

Type: Error

progress

Emitted periodically during file transfer and contains file transfer progression information

Type: TransferInformation

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:

statusChange

Emitted invitation status change

Type: StatusChangeInfo

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:

receive

When the invitation has been received by the contact

Type: Void

response

When the invitation status changed

Type: symbol
Deprecated:
  • Please note that this event is now deprecated as we have added a statusChange event

statusChange

Emitted invitation status change

Type: StatusChangeInfo

contactData

Fired when data is received from a contact

Type: object
Properties:
Name Type Description
sender Contact
content object

contactListUpdate

Fired when the contact list has been updated
The contact list is updated when a contact leaves a group, joins a group or if its user data changed

Type: object
Properties:
Name Type Description
leftGroup Object.<string, Array.<Contact>>

Contacts who left a group mapped by group

joinedGroup Object.<string, Array.<Contact>>

Contacts who joined a group mapped by group

userDataChanged Array.<Contact>

Contacts whose userdata changed


contactMessage

Fired when a message is received from a contact

Type: object
Properties:
Name Type Description
sender Contact
content string

content of the message

uuid integer

message unique id

time date

date of when the message was received


conversationData

Fired when conversation data is received

Type: object
Properties:
Name Type Description
sender Contact
conversation Conversation
content object

conversationInvitation

Fired when a conversation invitation is received

Type: ReceivedConversationInvitation

conversationJoinRequest

Fired when a conversation join request is received
This event is fired only if the user is the moderator from the conversation

Type: ReceivedConversationJoinRequest

conversationMessage

Fired when a conversation message is received

Type: object
Properties:
Name Type Description
sender Contact
content string

content of the message

conversation Conversation

customEvent

Fired when a custom data event has been received

Type: object
Properties:
Name Type Description
event string

event identifier

content object
sender Contact
conversation Conversation

Associated conversation, field may not be present


dataChannelInvitation

Fired when a data channel invitation is received

Type: ReceivedDataChannelInvitation

disconnect

Fired on disconnection with CCS server

Type: Void

error

Fired when an error is detected on connection with CCS server

Type: Void

fileTransferInvitation

Fired when a file transfer invitatio is received

Type: ReceivedFileTransferInvitation

incomingCall

Fired when user receives an incoming call

Type: ReceivedCallInvitation

incomingScreenSharingCall

Fired when user receives an incoming screenSharing call

Type: Call

newMediaAvailableFromContact

Fired when a new media is available from a contact

Type: object
Properties:
Name Type Description
sender Contact
media CloudMediaInfo

rawData

Fired when raw data is received from a contact (for older apiRTC app compatibility)

Type: object
Properties:
Name Type Description
sender Contact
content object

reconnecting

Fired when a new connection to server is tried

Type: Void

reconnection

Fired when connectivity to the network has been recovered

Type: Void

whiteboardInvitation

Fired when a whiteboard session invitation is received

Type: ReceivedWhiteboardInvitation

whiteboardRoomMemberUpdate

Fired when a member connect or disconnect from whiteboard room

Type: object
Properties:
Name Type Description
roomId string

event identifier

status string

online / offline

contacts Array.<Contact>

contacts updated


whiteboardRoomMemberUpdate

Fired when a member connect or disconnect from whiteboard room.

Type: object
Properties:
Name Type Description
roomId string

event identifier

status string

online / offline

contacts Array.<Contact>

contacts updated


activeStateChange

Emitted when stream video or audio active state changed

Type: object
Properties:
Name Type Description
streamId number

stream identifier.

callId callId

identifier of related call.

type string

'video' or 'audio'

active boolean

new state


audioAmplitude

Stream current audio amplitude obtained from audio analysis

Type: number

muteStateChange

Emitted when stream video or audio mute state changed

Type: object
Properties:
Name Type Description
streamId number

stream identifier.

userMediaStreamId string

user media stream identifier (optional).

callId string

related call identifier (optional).

type string

'video' or 'audio'

muted boolean

new state


stopped

Emitted when user media is released or when related call is terminated.

Type: object
Properties:
Name Type Description
streamId number

stream identifier.

userMediaStreamId string

user media stream identifier (optional).

callId string

related call identifier (optional).


trackStopped

Signals a stream track was stopped (known issue: does not work on Firefox)

Type: object
Properties:
Name Type Description
type string

'video' or 'audio'

id string

track id


ccsConnectionStatus

Fired when externalJs loading status change. This can be an insteresting information to detect network failure.

Type: object
Properties:
Name Type Description
status string

status of the CCS connection : connected, disconnected, error, retry


externalJsLoadingStatus

Fired when externalJs loading status change. This can be an insteresting information to detect network failure.

Type: object
Properties:
Name Type Description
extjs string

external js concerned by the event

status string

status of the loading : loaded, error, retry


mediaDeviceChanged

Fired when user media list have changed. call getUserMediaDevices() to get an updated MediaDeviceList

Type: object