EVENT | Description |
An error occurred inside the SDK | |
This event is received when the SDK enters the ready state | |
Receiving this event after a duplicate sign-in indicates that the user has been removed from the room | |
If a user answers, 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 | |
User declines the call, this event will be received | |
Invite user, no response, this event will be received | |
Invitee Busy Line, this event will be received | |
Remote user has enabled/disabled the camera, this event will be received | |
Remote user has enabled/disabled the microphone, this event will be received | |
Remote user adjusts speaking volume, this event will be received | |
Group chat update invitation list, this event will be received | |
Being invited to a call, this event will be received | |
Event of Call Request | |
If the call is not established, all platforms involved in the call will throw this event | |
Event thrown when a call is connected | |
Receiving this event indicates that the call has ended | |
Device list update, this event will be received | |
Call type switching, this event will be 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 | Declining User ID |
let handleNoResponse = function(event) {console.log(event.sponsor, event.userIDList);};tuiCallEngine.on(TUICallEvent.NO_RESP, handleNoResponse);
Parameter | Type | Meaning |
sponsor | String | Caller's User ID |
userIDList | Array<String> | List of Users Who Triggered Timeout Due to No Response |
let handleLineBusy = function(event) {console.log(event)};tuiCallEngine.on(TUICallEvent.LINE_BUSY, handleLineBusy);
Parameter | Type | Meaning |
userID | String | Busy 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 Camera On; false: Remote User turns Camera Off |
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 meter, access the volume level for each userid, with the minimum volume at 0 and the maximum volume at 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> | Also Invited Persons |
isFromGroup | Boolean | Is it a Group Call |
inviteData | Object | Call Data |
inviteID | String | Invitation ID, identifying one invitation |
userData | String | Extended field: Utilized for amplifying details in the invitation signaling |
callId | String | The unique ID for this call.Supported in v1.4.6+ |
roomID | Number | The Audio/Video Room ID for this call.Supported in v1.4.6+ |
callMediaType | Number | Media Type of the call, Video Call, Voice Call.Supported from version v1.4.6+ |
callRole | String | role, Enumeration Type: Caller, Called.Supported from version 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> | Also Invited Persons |
isFromGroup | Boolean | Is it a Group Call |
inviteData | Object | Call Data |
inviteID | String | Invitation ID, identifying one invitation |
userData | String | Extended field: Utilized for amplifying details in the invitation signaling |
callId | String | Unique ID for this call |
roomID | Number | Audio-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 | Cancelled User ID |
callId | String | The unique ID for this call.Supported in v1.4.6+ |
roomID | Number | The Audio/Video Room ID for this call.Supported in v1.4.6+ |
callMediaType | Number | Media Type of the call, Video Call, Voice Call.Supported from version v1.4.6+ |
callRole | String | role, Enumeration Type: Caller, Called.Supported from version v1.4.6+ |
let handleOnCallCanceled = function(event) {console.log(event.userID);};tuiCallEngine.on(TUICallEvent.ON_CALL_CANCELED, handleOnCallCanceled);
Parameter | Type | Meaning |
userID | String | Cancelled User ID |
callId | String | Unique ID for this call |
roomID | Number | Audio-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 | Audio-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 | Audio-Video Room ID for this call, currently only supports numeric room number, future versions will support character 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 | userID of the call termination. |
callId | String | The unique ID for this call.Supported in v1.4.6+ |
callEnd | Number | The duration of this call (will be 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?