Events for Cordova

TrueConfAbout 3 min

Events for Cordova

onServerStatus

Event triggered when a server connects/disconnects or an error occurs during a connection attempt.

Parameters:

  • connected – indicates whether there is a connection with the server (Boolean);

  • serverName – the name of the current server (String);

  • serverPort – the port number used for server connection (Number).

onStateChanged

This event is triggered when the user's status changes. You can obtain the current status through the functions that request the current state.

onLogin

Event triggered during server authorization or authorization error.

Parameters:

  • loggedIn - indicates whether the user is authorized on the server (Boolean);

  • userID – user TrueConf ID (String).

onLogout

Event triggered upon deauthorization on the server.

onConferenceStart

Event triggered at the start of a conference.

onConferenceEnd

The event triggered when a conference ends.

onInvite

Event triggered upon receiving an incoming call.

Parameters:

  • userIDTrueConf ID of the calling user (String);

  • userName – name of the calling user (String).

onAccept

An event triggered when the callee receives a call.

Parameters:

  • userIDTrueConf ID of the called user (String);

  • userName – the name of the called user (String).

onReject

Event triggered when the called party declines the call.

Parameters:

  • userIDTrueConf ID of the called user (String);

  • userName – the name of the called user (String).

onRejectTimeout

The event triggered when there is no response from the called party within a specified time frame.

Parameters:

  • userIDTrueConf ID of the called user (String);

  • userName – the name of the called user (String).

onRecordRequest

Event triggered upon receiving a video recording request.

Parameters:

  • userID – the TrueConf ID of the user requesting the video recording (String);

  • userName – the name of the user requesting the video recording (String).

onChatMessageReceived

Event triggered upon receiving a text message.

Parameters:

  • fromUserID – the user ID of the person who sent the message (String);

  • fromUserName – the name of the user who sent the message (String);

  • message – message text (String);

  • toUserID – the identifier of the user to whom the message was sent (String).

onUserStatusUpdate

An event triggered when another user's status changes.

Parameters:

  • userID – the identifier of the user with a changed status (String);

  • status - new user status (Number).

onExtraButtonPressed

The event triggered by clicking an additional custom button created in the addExtraButton function.