EVENT | Description |
An error occurred during the call. | |
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 | |
A user joined the call. | |
A user left the call. | |
A user declined the call. | |
A user didn't respond. | |
A user was busy. | |
Whether a user has a video stream. | |
Whether a user has an audio stream. | |
The volume levels of all users. | |
Group Chat Update, Invitation List this callback will be received | |
Call connected event, v1.4.6+ supported | |
A call was received. It will be discarded later and it is recommended to use TUICallEvent.ON_CALL_RECEIVED | |
Call request event, v1.4.6+ supported | |
Call cancellation event, It will be abandoned later and it is recommended to use TUICallEvent.ON_CALL_CANCELED | |
Call cancellation event, v1.4.6+ supported | |
Call connected event, v1.4.6+ supported | |
The call ended. | |
Device list update, this event will be received | |
Call type switching, this event will be received | |
All user network quality events, v3.0.7+ supported |
let onError = function(error) {console.log(error.code, error.msg);};tuiCallEngine.on(TUICallEvent.ERROR, onError);
Parameter | Type | Meaning |
code | Number | |
msg | String | Error message |
let onSDKReady = function(event) {console.log(event);};tuiCallEngine.on(TUICallEvent.SDK_READY, onSDKReady);
login
again.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 | Rejecting 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 | User ID to turn microphone on/off |
isAudioAvailable | Boolean | true the user turns on the microphone; false the user turns off the microphone |
let handleUserVoiceVolumeChange = function(event) {console.log(event.volumeMap);};tuiCallEngine.on(TUICallEvent.USER_VOICE_VOLUME, handleUserVoiceVolumeChange);
Parameter | Type | Meaning |
volumeMap | Array<Object> | Volume meter, the corresponding volume can be obtained according to each userid, volume range: [0, 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 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 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. v1.4.6+ Supported |
callEnd | Number | The duration of this call (will be deprecated, Please use totalTime) 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 |
let handleOnUserNetworkQualityChange = function(event) {console.log(event.networkQualityList);};tuiCallEngine.on(TUICallEvent.ON_USER_NETWORK_QUALITY_CHANGED, handleOnUserNetworkQualityChange);
Parameter | Type | Meaning |
networkQualityList | Array<Object> | Network status, according to userID, you can get the current network quality of the corresponding user. |
Was this page helpful?