Classes

Classes

ApplyAudioProcessorError
ApplyVideoProcessorError
Call
Conference
Contact
Conversation
ConversationCall
DataChannel
Enterprise
EventCenter
EventEmitter
MediaDevice
Observable
PointerSharingRoom
ReceivedCallInvitation
ReceivedConversationInvitation
ReceivedConversationJoinRequest
ReceivedDataChannelInvitation
ReceivedFileTransferInvitation
ReceivedInvitation
ReceivedPointerSharingInvitation
ReceivedRemoteAccessInvitation
ReceivedWhiteboardInvitation
SentInvitation
SentRemoteAccessInvitation
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, DataChannel_Not_Supported


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. Check possible values below.

errorInfo String

Code information about the error. Check possible values below.

Possible errors values are the following: (errorInfo, errorCode)

Connection errors:
  • ice disconnection detected: ICE_CONNECTION_STATE_DISCONNECTED
  • ice connection failed detected: ICE_CONNECTION_STATE_FAILED
  • distant ice disconnection detected: DISTANT_ICE_CONNECTION_STATE_DISCONNECTED
  • distant ice connection failed detected: DISTANT_ICE_CONNECTION_STATE_FAILED
Errors on signaling processing:
  • 200OK received but callId is not matching, no process : NOT_MATCHING_CALLID_ON_200OK
  • Cannot find call to process Update : CALL_NOT_FOUND_ON_UPDATE
  • Cannot find call to process 200 Update : CALL_NOT_FOUND_ON_200UPDATE
  • Call aborted after calls retries (maxCallsRetriesDuration reached) : CALL_ABORTED
Errors on Media establishment processing:
  • Set local Description Failure : SET_LOCAL_DESCRIPTION_FAILURE
  • Set remote Description Failure : SET_REMOTE_DESCRIPTION_FAILURE
Errors on calling API:
  • parameter error when calling function: setUnidirectionalCall(): PARAMETER_ERROR_SETUNIDIRCALL
  • parameter error when calling function: setNtoNConf(): PARAMETER_ERROR_SETNTONCONF
  • parameter error when calling function: setRTPMedia(): PARAMETER_ERROR_SETRTPMEDIA
  • parameter error when calling function: setMediaRoutingMode(): PARAMETER_ERROR_SETMEDIAROUTINGMODE
  • parameter error when calling function: setUserAcceptOnIncomingCall(): PARAMETER_ERROR_SETUSERACCEPTONINCOCALL
  • Trying to add a listener on an unknown event: UNKNOWN_EVENT_ON_ADDLISTENER
  • parameter error when calling function: setAllowMultipleCalls(): PARAMETER_ERROR_SETALLOWMULTIPLECALLS
Errors about recording :
  • Room not found when starting recording: START_RECORD_ROOM_NOT_FOUND
  • Caller not found when starting recording: START_RECORD_CALLER_NOT_FOUND
  • Media not found when starting recording: START_RECORD_MEDIA_FOUND
  • Recording is already ongoing: START_RECORD_ALREADY_ON
  • Room not found when stopping recording: STOP_RECORD_ROOM_NOT_FOUND
  • Caller not found when stopping recording: STOP_RECORD_CALLER_NOT_FOUND
  • Media not found when stopping recording: STOP_RECORD_MEDIA_FOUND
  • Recorder not found when stopping recording: STOP_RECORD_ENDPOINT_NOT_FOUND
  • Recording is not started stopping recording: STOP_RECORD_NOT_STARTED
  • Recorder is not ready yet, record is not started: STOP_RECORD_RECORDER_NOT_READY
Errors about media play:
  • Autoplay was prevented: IOS_AUTOPLAY_PREVENTED
Errors about media streams:
  • Error during media update on call: MEDIA_UPDATE_ERROR
Errors about user media:
  • Error during media media access: USER_MEDIA_ERROR
Errors about remote stream:
  • Error during subscription: STREAM_NOT_AVAILABLE
descriptor CallIceErrorDescriptor | 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, DataChannel_Not_Supported


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


recordingAvailable

Fired when a recording is available for play or download.

Type: RecordingInfo

recordingStarted

Fired when a recording started.

Type: RecordingInfo

recordingStopped

Fired when a recording stopped.

Type: RecordingInfo

remoteStreamIdUpdated

Fired when remote streamId is changed after a call to replacePublishedStream().

Type: object
Properties:
Name Type Description
callId string

callId

newStreamId string

the new streamId

oldStreamId string

former streamId


remoteStreamIdUpdated

Fired when remote streamId is changed after a call to replacePublishedStream().

Type: object
Properties:
Name Type Description
callId string

callId

newStreamId string

the new streamId

oldStreamId string

former streamId


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


audioAmplitude

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

Type: object
Properties:
Name Type Description
streamId number | string

Stream ID.

callId string

Call ID.

amplitude number
isSpeaking boolean
descriptor object

Deprecated.

Inherited From:
Overrides:

availableStreamsUpdated

Fired when available streams in conversation have been updated

Type: Array.<StreamInfo>
Inherited From:
Overrides:

callStatsUpdate

Type: object
Properties:
Name Type Description
streamId number | string

Stream ID.

callId string

Call ID.

mesh boolean

Whether the stats belongs to one of the sub-calls of a published stream in mesh mode.

contact Contact

If mesh is true, the contact to whom the stream is sent to.

stats CallStats
Inherited From:
Overrides:

closed

Fired when conversation has been closed

Type: void
Inherited From:
Overrides:

contactJoined

Fired when a contact joined the conversation

Type: Contact
Inherited From:
Overrides:

contactJoinedWaitingRoom

Contact joined the waiting room event (moderator only)

Type: Contact
Inherited From:
Overrides:

contactLeft

Fired when a contact left the conversation

Type: Contact
Inherited From:
Overrides:

contactLeftWaitingRoom

Contact left the waiting room event (moderator only)

Type: Contact
Inherited From:
Overrides:

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:
Overrides:

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:
Overrides:

disconnectionWarning

Fired when a disconnection happened on conversation stream

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

Stream information

Inherited From:
Overrides:

entryAllowed

Fired when moderator allows user to enter

Type: void
Inherited From:
Overrides:

entryDenied

Fired when moderator denies user to enter

Type: void
Inherited From:
Overrides:

error

Fired when an error happened on conversation stream

Type: object
Properties:
Name Type Description
streamId number | string

Stream ID.

streamInfo Array.<StreamInfo>

Stream information

errorCode string

Code description of the error. Check possible values below.

errorInfo string

Code information about the error. Check possible values below.

Possible errors values are the following: (errorInfo, errorCode)

Connection errors:
  • ice disconnection detected: ICE_CONNECTION_STATE_DISCONNECTED
  • ice connection failed detected: ICE_CONNECTION_STATE_FAILED
  • distant ice disconnection detected: DISTANT_ICE_CONNECTION_STATE_DISCONNECTED
  • distant ice connection failed detected: DISTANT_ICE_CONNECTION_STATE_FAILED
Errors on signaling processing:
  • 200OK received but callId is not matching, no process : NOT_MATCHING_CALLID_ON_200OK
  • Cannot find call to process Update : CALL_NOT_FOUND_ON_UPDATE
  • Cannot find call to process 200 Update : CALL_NOT_FOUND_ON_200UPDATE
  • Call aborted after calls retries (maxCallsRetriesDuration reached) : CALL_ABORTED
Errors on Media establishment processing:
  • Set local Description Failure : SET_LOCAL_DESCRIPTION_FAILURE
  • Set remote Description Failure : SET_REMOTE_DESCRIPTION_FAILURE
Errors on calling API:
  • parameter error when calling function: setUnidirectionalCall(): PARAMETER_ERROR_SETUNIDIRCALL
  • parameter error when calling function: setNtoNConf(): PARAMETER_ERROR_SETNTONCONF
  • parameter error when calling function: setRTPMedia(): PARAMETER_ERROR_SETRTPMEDIA
  • parameter error when calling function: setMediaRoutingMode(): PARAMETER_ERROR_SETMEDIAROUTINGMODE
  • parameter error when calling function: setUserAcceptOnIncomingCall(): PARAMETER_ERROR_SETUSERACCEPTONINCOCALL
  • Trying to add a listener on an unknown event: UNKNOWN_EVENT_ON_ADDLISTENER
  • parameter error when calling function: setAllowMultipleCalls(): PARAMETER_ERROR_SETALLOWMULTIPLECALLS
Errors about recording :
  • Room not found when starting recording: START_RECORD_ROOM_NOT_FOUND
  • Caller not found when starting recording: START_RECORD_CALLER_NOT_FOUND
  • Media not found when starting recording: START_RECORD_MEDIA_FOUND
  • Recording is already ongoing: START_RECORD_ALREADY_ON
  • Room not found when stopping recording: STOP_RECORD_ROOM_NOT_FOUND
  • Caller not found when stopping recording: STOP_RECORD_CALLER_NOT_FOUND
  • Media not found when stopping recording: STOP_RECORD_MEDIA_FOUND
  • Recorder not found when stopping recording: STOP_RECORD_ENDPOINT_NOT_FOUND
  • Recording is not started stopping recording: STOP_RECORD_NOT_STARTED
  • Recorder is not ready yet, record is not started: STOP_RECORD_RECORDER_NOT_READY
Errors about media play:
  • Autoplay was prevented: IOS_AUTOPLAY_PREVENTED
Errors about media streams:
  • Error during media update on call: MEDIA_UPDATE_ERROR
Errors about user media:
  • Error during media media access: USER_MEDIA_ERROR
Errors about remote stream:
  • Error during subscription: STREAM_NOT_AVAILABLE
descriptor ConversationIceErrorDescriptor | object

Detailed descriptor of the error

Inherited From:
Overrides:

hangup

Fired when a publish or subscribe is terminated.

Type: object
Properties:
Name Type Description
from string

'local' or 'remote'.

reason string

Hangup reason.

streamId number | string

Stream ID.

Inherited From:
Overrides:

joined

Fired when conversation has been joined by the user.

Type: void
Inherited From:
Overrides:

left

Fired when conversation has been left by the user.

Type: void
Inherited From:
Overrides:

localStreamUpdated

Fired when local stream properties changed.

Type: object
Properties:
Name Type Description
callId string

Call ID.

streamId string

Stream ID.

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.

cause string

Either 'adaptation' or 'userAction'.

Inherited From:
Overrides:

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:
Overrides:

messageNotDelivered

Type: Object
Properties:
Name Type Description
error ApiRTCError

Hint.

contact Contact

Message recipient.

event String

Event (optional).

command String

Command (optional).

Inherited From:
Overrides:

moderatorConnected

Fired when moderator joined the conversation

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

newMediaAvailable

Fired when a new media is available in the conversation.

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

newWhiteboardSession

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

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

participantEjected

Fired when a participant has been ejected from the conference.

Type: object
Properties:
Name Type Description
self boolean
contact Contact
Inherited From:
Overrides:

persistentDataUpdated

Fired when conversation persistent data has been updated.

Type: object
Inherited From:
Overrides:

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:
Overrides:

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:
Overrides:

recordingAvailable

Fired when a recording is available for play or download.

Type: RecordingInfo
Inherited From:
Overrides:

recordingStarted

Fired when a recording started.

Type: RecordingInfo
Inherited From:
Overrides:

recordingStopped

Fired when a recording stopped.

Type: RecordingInfo
Inherited From:
Overrides:

remoteStreamUpdated

Fired when remote stream properties changed.

Type: object
Properties:
Name Type Description
callId string

Call ID.

streamId number

Stream ID.

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.

cause string

Either 'adaptation' or 'userAction'.

Inherited From:
Overrides:

roomModeChanged

Fired when the mode of conference room is changing or changed.

Type: object
Properties:
Name Type Description
oldMode string

Represents the previous mode, being replaced (or replaced) by the new mode. Either 'mesh' or 'sfu'.

newMode string

Represents the new mode, replacing the previous mode. Either 'mesh' or 'sfu'.

state string

Represents the state of the room mode change. Either 'ongoing' or 'complete'.

Inherited From:
Overrides:

simulcastFeedChanged

Fired when the simulcast selection feed changed.

Type: object
Properties:
Name Type Description
streamId number

Stream ID.

callId string

Call ID.

simulcast object
Properties
Name Type Description
streamQuality string

Substream selection. Either 'high', 'medium' or 'low'.

streamFrameRate string

Temporal layer selection. Either 'high', 'medium' or 'low'.

Inherited From:
Overrides:

Fired when a slow link is detected.
An optional advice can be set. When advice is 'subscribeToAudioComposite', the
application should start the audio composite (#startComposite) and then subscribe
to the audio composite stream instead of subscribing to every stream individually.

Type: object
Properties:
Name Type Description
callId string

Call ID.

streamId number | string

Stream ID.

advice string

Optional advice.

Inherited From:
Overrides:

streamAdded

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

Type: Stream
Inherited From:
Overrides:

streamListChanged

Fired when a change occurs in the available stream list. An entry in the
available stream list represents a stream that has been successfully
published by one of the participants and that one can subscribe to.

Type: StreamInfo
Inherited From:
Overrides:
Example

use streamListChanged events

conversation.on('streamListChanged', function (streamInfo) {
    if (streamInfo.listEventType === 'added') {
        // A new stream has been published.
        // Add it to me own list copy?
        if (streamInfo.isRemote) {
            // The stream has been published by an other participant.
            // Subscribe to it?
        } else {
            // The stream has been published by me.
            // Subscribe to it?
        }
    } else if (streamInfo.listEventType === 'removed') {
        // A stream has been unpublished.
        // Remove it from with own list copy.
    } else if (streamInfo.listEventType === 'updated') {
        // Properties of the published stream has changed.
    }
});

streamRemoved

Fired when stream is removed from this conversation after an unsubscription

Type: Stream
Inherited From:
Overrides:

transferBegun

Fired when a transfer begun (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

Inherited From:
Overrides:

transferEnded

Fired when a transfer ended (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

Inherited From:
Overrides:

transferPending

Fired when a transfer is pending (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

rank number
Inherited From:
Overrides:

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:
Overrides:

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:
Overrides:

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: ReceivedCallInvitation

incomingScreenSharingCall

Fired when user receives an incoming screenSharing call

Type: Call

incomingScreenSharingCallInvitation

Fired when user receives an incoming screenSharing call Invitation

Type: ReceivedCallInvitation

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

audioAmplitude

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

Type: object
Properties:
Name Type Description
streamId number | string

Stream ID.

callId string

Call ID.

amplitude number
isSpeaking boolean
descriptor object

Deprecated.


availableStreamsUpdated

Fired when available streams in conversation have been updated

Type: Array.<StreamInfo>

callStatsUpdate

Type: object
Properties:
Name Type Description
streamId number | string

Stream ID.

callId string

Call ID.

mesh boolean

Whether the stats belongs to one of the sub-calls of a published stream in mesh mode.

contact Contact

If mesh is true, the contact to whom the stream is sent to.

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


entryAllowed

Fired when moderator allows user to enter

Type: void

entryDenied

Fired when moderator denies user to enter

Type: void

error

Fired when an error happened on conversation stream

Type: object
Properties:
Name Type Description
streamId number | string

Stream ID.

streamInfo Array.<StreamInfo>

Stream information

errorCode string

Code description of the error. Check possible values below.

errorInfo string

Code information about the error. Check possible values below.

Possible errors values are the following: (errorInfo, errorCode)

Connection errors:
  • ice disconnection detected: ICE_CONNECTION_STATE_DISCONNECTED
  • ice connection failed detected: ICE_CONNECTION_STATE_FAILED
  • distant ice disconnection detected: DISTANT_ICE_CONNECTION_STATE_DISCONNECTED
  • distant ice connection failed detected: DISTANT_ICE_CONNECTION_STATE_FAILED
Errors on signaling processing:
  • 200OK received but callId is not matching, no process : NOT_MATCHING_CALLID_ON_200OK
  • Cannot find call to process Update : CALL_NOT_FOUND_ON_UPDATE
  • Cannot find call to process 200 Update : CALL_NOT_FOUND_ON_200UPDATE
  • Call aborted after calls retries (maxCallsRetriesDuration reached) : CALL_ABORTED
Errors on Media establishment processing:
  • Set local Description Failure : SET_LOCAL_DESCRIPTION_FAILURE
  • Set remote Description Failure : SET_REMOTE_DESCRIPTION_FAILURE
Errors on calling API:
  • parameter error when calling function: setUnidirectionalCall(): PARAMETER_ERROR_SETUNIDIRCALL
  • parameter error when calling function: setNtoNConf(): PARAMETER_ERROR_SETNTONCONF
  • parameter error when calling function: setRTPMedia(): PARAMETER_ERROR_SETRTPMEDIA
  • parameter error when calling function: setMediaRoutingMode(): PARAMETER_ERROR_SETMEDIAROUTINGMODE
  • parameter error when calling function: setUserAcceptOnIncomingCall(): PARAMETER_ERROR_SETUSERACCEPTONINCOCALL
  • Trying to add a listener on an unknown event: UNKNOWN_EVENT_ON_ADDLISTENER
  • parameter error when calling function: setAllowMultipleCalls(): PARAMETER_ERROR_SETALLOWMULTIPLECALLS
Errors about recording :
  • Room not found when starting recording: START_RECORD_ROOM_NOT_FOUND
  • Caller not found when starting recording: START_RECORD_CALLER_NOT_FOUND
  • Media not found when starting recording: START_RECORD_MEDIA_FOUND
  • Recording is already ongoing: START_RECORD_ALREADY_ON
  • Room not found when stopping recording: STOP_RECORD_ROOM_NOT_FOUND
  • Caller not found when stopping recording: STOP_RECORD_CALLER_NOT_FOUND
  • Media not found when stopping recording: STOP_RECORD_MEDIA_FOUND
  • Recorder not found when stopping recording: STOP_RECORD_ENDPOINT_NOT_FOUND
  • Recording is not started stopping recording: STOP_RECORD_NOT_STARTED
  • Recorder is not ready yet, record is not started: STOP_RECORD_RECORDER_NOT_READY
Errors about media play:
  • Autoplay was prevented: IOS_AUTOPLAY_PREVENTED
Errors about media streams:
  • Error during media update on call: MEDIA_UPDATE_ERROR
Errors about user media:
  • Error during media media access: USER_MEDIA_ERROR
Errors about remote stream:
  • Error during subscription: STREAM_NOT_AVAILABLE
descriptor ConversationIceErrorDescriptor | 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.

streamId number | string

Stream ID.


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

Call ID.

streamId string

Stream ID.

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.

cause string

Either 'adaptation' or 'userAction'.


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


messageNotDelivered

Type: Object
Properties:
Name Type Description
error ApiRTCError

Hint.

contact Contact

Message recipient.

event String

Event (optional).

command String

Command (optional).


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

participantEjected

Fired when a participant has been ejected from the conference.

Type: object
Properties:
Name Type Description
self boolean
contact 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

recordingStopped

Fired when a recording stopped.

Type: RecordingInfo

remoteStreamUpdated

Fired when remote stream properties changed.

Type: object
Properties:
Name Type Description
callId string

Call ID.

streamId number

Stream ID.

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.

cause string

Either 'adaptation' or 'userAction'.


roomModeChanged

Fired when the mode of conference room is changing or changed.

Type: object
Properties:
Name Type Description
oldMode string

Represents the previous mode, being replaced (or replaced) by the new mode. Either 'mesh' or 'sfu'.

newMode string

Represents the new mode, replacing the previous mode. Either 'mesh' or 'sfu'.

state string

Represents the state of the room mode change. Either 'ongoing' or 'complete'.


simulcastFeedChanged

Fired when the simulcast selection feed changed.

Type: object
Properties:
Name Type Description
streamId number

Stream ID.

callId string

Call ID.

simulcast object
Properties
Name Type Description
streamQuality string

Substream selection. Either 'high', 'medium' or 'low'.

streamFrameRate string

Temporal layer selection. Either 'high', 'medium' or 'low'.


Fired when a slow link is detected.
An optional advice can be set. When advice is 'subscribeToAudioComposite', the
application should start the audio composite (#startComposite) and then subscribe
to the audio composite stream instead of subscribing to every stream individually.

Type: object
Properties:
Name Type Description
callId string

Call ID.

streamId number | string

Stream ID.

advice string

Optional advice.


streamAdded

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

Type: Stream

streamListChanged

Fired when a change occurs in the available stream list. An entry in the
available stream list represents a stream that has been successfully
published by one of the participants and that one can subscribe to.

Type: StreamInfo
Example

use streamListChanged events

conversation.on('streamListChanged', function (streamInfo) {
    if (streamInfo.listEventType === 'added') {
        // A new stream has been published.
        // Add it to me own list copy?
        if (streamInfo.isRemote) {
            // The stream has been published by an other participant.
            // Subscribe to it?
        } else {
            // The stream has been published by me.
            // Subscribe to it?
        }
    } else if (streamInfo.listEventType === 'removed') {
        // A stream has been unpublished.
        // Remove it from with own list copy.
    } else if (streamInfo.listEventType === 'updated') {
        // Properties of the published stream has changed.
    }
});

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.


transferPending

Fired when a transfer is pending (push data).

Type: object
Properties:
Name Type Description
id string

transfer id.

name string

filename.

rank number

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:
Overrides:

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:
Overrides:

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:
Overrides:

expired

When the call invitation has expired (eg. caller cancelled call)
Please note that this event is now deprecated as we have added a statusChange event

Type: Void

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:
Overrides:

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:
Overrides:

statusChange

Emitted invitation status change

Type: StatusChangeInfo

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:
Overrides:

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:
Overrides:

statusChange

Emitted invitation status change

Type: StatusChangeInfo
Inherited From:
Overrides:

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

receive

When the invitation has been received by the contact

Type: Void
Inherited From:
Overrides:

response

When the invitation status changed

Type: symbol
Inherited From:
Overrides:
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:
Overrides:

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 invitation 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

incomingScreenSharingCallInvitation

Fired when user receives an incoming screenSharing call Invitation

Type: ReceivedCallInvitation

newMediaAvailableFromContact

Fired when a new media is available from a contact

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

pointerLocationChanged

Fired when the pointer location changed for a contact.

Type: object
Properties:
Name Type Description
sender Contact
source object
x number
y number
data object

pointerSharingInvitation

Fired when a pointer sharing invitation is received

Type: ReceivedPointerSharingInvitation

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


AIELog

Emitted when a log is generated after a new AI annotation

Type: object
Properties:
Name Type Description
log string

log informations


AIESnapshot

Emitted when a snapshot is taken of stream with AI annotation

Type: object
Properties:
Name Type Description
image Image

The snapshot


audioAmplitude

Stream current audio amplitude obtained from audio analysis

Type: number

audioAmplitudeInfo

Stream current audio amplitude & speaking status info obtained from audio analysis

Type: object
Properties:
Name Type Description
amplitude number

amplitude.

isSpeaking boolean

is sound/speaking detected considering threshold


audioFlowStatusChanged

Emitted when either enabled or muted value changed for the audio track of the stream

Type: MediaStreamTrackFlowStatus

backgroundSubstractionStopComputeTime

Emitted when the background substraction process is stopped due to bad filter frame rate

Type: object
Properties:
Name Type Description
streamId number

stream identifier.

userMediaStreamId string

user media stream identifier


backgroundSubstractionStopVisibilityChange

Emitted when a filter is applied on stream and the user hides current navigator tab

Type: object
Properties:
Name Type Description
streamId number

stream identifier.

userMediaStreamId string

user media stream identifier


constraintsChanged

Emitted, on a stream if constraints changed

Type: object

flowStatusChanged

Emitted when either enabled or muted value changed for a track of the stream

Type: MediaStreamTrackFlowStatusWithType

muteStateChange

Deprecated - 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


release

Emitted, on a stream release

Type: object

remoteAudioFlowStatusChanged

Emitted, on a stream you subscribed, when either enabled or muted value changed for the audio track by the publisher

Type: MediaStreamTrackFlowStatus

remoteVideoFlowStatusChanged

Emitted, on a stream you subscribed, when either enabled or muted value changed for the video track by the publisher

Type: MediaStreamTrackFlowStatus

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


videoFlowStatusChanged

Emitted when either enabled or muted value changed for the video track of the stream

Type: MediaStreamTrackFlowStatus

ccsConnectionStatus

Fired when ccs Connection 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
Properties:
Name Type Description
added array

array of added input/ouput

removed array

array of removed input/ouput

updated array

array of updated input/ouput

updateReason String

give an updated reason. Value can be 'updatedOnDeviceChange' or 'updatedAfterGetUserMediaSuccess'

firstMediaDeviceListInitialization Boolean

indicate of this is the first event occurrence with a real list from device