EVENT | Description |
An error occurred within the SDK | |
This event is received when the SDK enters the Ready State | |
Duplicate login, receiving this event indicates being removed from the room | |
If a user answers the call, this event will be received | |
If a user agrees to join the call, this event will be received | |
If a user agrees to leave the call, this event will be received | |
If a user declines the call, this event will be received | |
If the invited user does not respond, this event will be received | |
Invitee Busy Line, this event will be received | |
If a remote user turned the camera On/Off, this event will be received | |
If a remote user turned the microphone On/Off, this event will be received | |
If a remote user adjusts speaking volume, this event will be received | |
Group chat updates, Invitation List event received | |
Receiving an invitation to a call, this event will be received | |
Call Request Event | |
When a call is not established, all call parties throw this event | |
Event thrown upon call connection | |
Receiving this event indicates the call has ended | |
Device list update event received | |
Call Type Switching event received |
let onError = function(error) {console.log(error.code, error.msg);};tuiCallEngine.on(TUICallEvent.ERROR, onError);
Parameter | Type | Meaning |
code | int | |
msg | String | Error message |
let onSDKReady = function(event) {console.log(event);};tuiCallEngine.on(TUICallEvent.SDK_READY, onSDKReady);
let handleOnKickedOut = function(event) {console.log(event);};tuiCallEngine.on(TUICallEvent.KICKED_OUT, handleOnKickedOut);
let handleUserAccept = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.USER_ACCEPT, handleUserAccept);
Parameter | Type | Meaning |
userID | String | Answering User ID |
let handleUserEnter = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.USER_ENTER, handleUserEnter);
Parameter | Type | Meaning |
userID | String | Entering User ID |
let handleUserLeave = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.USER_LEAVE, handleUserLeave);
Parameter | Type | Meaning |
userID | String | Exiting User ID |
let handleInviteeReject = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.REJECT, handleInviteeReject);
Parameter | Type | Meaning |
userID | String | User ID of the declining call |
let handleNoResponse = function(event) {console.log(event.sponsor, event.userIDList);};tuiCallEngine.on(TUICallEvent.NO_RESP, handleNoResponse);
Parameter | Type | Meaning |
sponsor | String | Initiator's User ID |
userIDList | Array<String> | List of users with no response due to trigger timeout |
let handleLineBusy = function(event) {console.log(event)};tuiCallEngine.on(TUICallEvent.LINE_BUSY, handleLineBusy);
Parameter | Type | Meaning |
userID | String | Busy Line User ID |
let handleUserVideoChange = function(event) {console.log(event.userID, event.isVideoAvailable);};tuiCallEngine.on(TUICallEvent.USER_VIDEO_AVAILABLE, handleUserVideoChange);
Parameter | Type | Meaning |
userID | String | Remote User ID |
isVideoAvailable | Boolean | true: Remote User Turns On Camera; false: Remote User Turns Off Camera |
let handleUserAudioChange = function(event) {console.log(event.userID, event.isAudioAvailable);};tuiCallEngine.on(TUICallEvent.USER_AUDIO_AVAILABLE, handleUserAudioChange);
Parameter | Type | Meaning |
userID | String | Remote User ID |
isAudioAvailable | Boolean | true: Remote User Turns On Microphone; false: Remote User Turns Off Microphone |
let handleUserVoiceVolumeChange = function(event) {console.log(event.volumeMap);};tuiCallEngine.on(TUICallEvent.USER_VOICE_VOLUME, handleUserVoiceVolumeChange);
Parameter | Type | Meaning |
volumeMap | Array<Object> | Volume Map: Each userid can access the corresponding volume level, with a minimum volume of 0 and a maximum volume of 100 |
let handleGroupInviteeListUpdate = function(event) {console.log(event.userIDList);};tuiCallEngine.on(TUICallEvent.GROUP_CALL_INVITEE_LIST_UPDATE, handleGroupInviteeListUpdate);
Parameter | Type | Meaning |
userIDList | Array<String> | Group update invitation list |
let handleNewInvitationReceived = function(event) {console.log(event.sponsor, event.userIDList, event.isFromGroup, event.inviteData, event.inviteDate, event.inviteID);};tuiCallEngine.on(TUICallEvent.INVITED, handleNewInvitationReceived);
Parameter | Type | Meaning |
sponsor | String | Inviter |
userIDList | Array<String> | People who are also invited |
isFromGroup | Boolean | Whether it is a group call |
inviteData | Object | Call Data |
inviteID | String | Invitation ID, identifies an invitation |
userData | String | Extended fields: Used to add additional information in the invitation signaling |
callId | String | Unique ID for this call.Supported in v1.4.6+ |
roomID | Number | Audio/Video Room ID for this call.Supported in v1.4.6+ |
callMediaType | Number | Media Type of the Call, Video Call, Voice call.Supported in v1.4.6+ |
callRole | String | role, Enumeration Type: Caller, Called.Supported in v1.4.6+ |
let handleOnCallReceived = function(event) {console.log(event)};tuiCallEngine.on(TUICallEvent.ON_CALL_RECEIVED, handleOnCallReceived);
Parameter | Type | Meaning |
sponsor | String | Inviter |
userIDList | Array<String> | People who are also invited |
isFromGroup | Boolean | Whether it is a group call |
inviteData | Object | Call Data |
inviteID | String | Invitation ID, identifies an invitation |
userData | String | Extended fields: Used to add additional information in the invitation signaling |
callId | String | Unique ID for this call |
roomID | Number | The audio and video room ID for this call |
callMediaType | Number | Media Type of the Call, Video Call, Voice Call |
callRole | String | Role, Enumeration Type: Caller, Called |
let handleCallingCancel = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.CALLING_CANCEL, handleCallingCancel);
Parameter | Type | Meaning |
userID | String | User ID of the call cancellation |
callId | String | Unique ID for this call.Supported in v1.4.6+ |
roomID | Number | Audio/Video Room ID for this call.Supported in v1.4.6+ |
callMediaType | Number | Media Type of the Call, Video Call, Voice call.Supported in v1.4.6+ |
callRole | String | role, Enumeration Type: Caller, Called.Supported in v1.4.6+ |
let handleOnCallCanceled = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.ON_CALL_CANCELED, handleOnCallCanceled);
Parameter | Type | Meaning |
userID | String | User ID of the call cancellation |
callId | String | Unique ID for this call |
roomID | Number | The audio and video room ID for this call |
callMediaType | Number | Media Type of the Call, Video Call, Voice Call |
callRole | String | Role, Enumeration Type: Caller, Called |
let handleOnCallBegin = function(event) {console.log(event)};tuiCallEngine.on(TUICallEvent.ON_CALL_BEGIN, handleOnCallBegin);
Parameter | Type | Meaning |
callId | String | Unique ID for this call |
roomID | Number | The audio and video room ID for this call |
callMediaType | Number | Media Type of the Call, Video Call, Voice Call |
callRole | String | role, Type: Caller, Called |
let handleCallingEnd = function(event) {console.log(event.userID, event.);};tuiCallEngine.on(TUICallEvent.CALLING_END, handleCallingEnd);
Parameter | Type | Meaning |
roomID | Number | The audio and video room ID for this call, currently only supports numeric room numbers, future versions will support string room numbers |
callMediaType | Number | Media Type of the Call, Video Call, Voice Call |
callRole | String | role, Enumeration Type: Caller ('inviter'), Called ('invitee'), Unknown ('') |
totalTime | Number | The duration of this call, in seconds |
userID | String | The userID of the call termination. |
callId | String | Unique ID for this call.Supported in v1.4.6+ |
callEnd | Number | The duration of this call ( Subsequently deprecated), in seconds |
let handleDeviceUpdated = function({ microphoneList, cameraList, currentMicrophoneID, currentCameraID }) {console.log(microphoneList, cameraList, currentMicrophoneID, currentCameraID)};tuiCallEngine.on(TUICallEvent.DEVICED_UPDATED, handleDeviceUpdated);
let handleCallTypeChanged = function({ oldCallType, newCallType }) {console.log(oldCallType, newCallType)};tuiCallEngine.on(TUICallEvent.CALL_TYPE_CHANGED, handleDeviceUpdated);
Parameter | Type | Meaning |
oldCallType | Number | Old Call Type |
newCallType | Number | New Call Type |
Was this page helpful?