Event | Description |
Error Callback during Call | |
Callback for a Call Request | |
Callback for Call Cancellation | |
Callback for Call Connection | |
Callback for Call Termination | |
xxxx User declines the call Callback | |
xxxx User Non-response Callback | |
xxxx User Busy Line Callback | |
xxxx User Joins Call Callback | |
A user left the call. | |
Callback for a change in the Call's Media Type | |
Current user kicked offline | |
Ticket expired while online | |
Whether a user has a video stream. | |
Whether a user has an audio stream. | |
The volume levels of all users. | |
The network quality of all users. |
TUICallKit.on(TUICallEvent.onError, (res: any) => {console.log('onError code=' + res.code + ',message=' + res.message);});
Parameter | Type | Description |
code | Number | Error Code |
message | String | Error message |
TUICallKit.on(TUICallEvent.onCallReceived, (res: any) => {console.log('onCallReceived callerId=' + res.callerId);});
Parameter | Type | Description |
callerId | String | Caller ID (inviter) |
calleeIdList | Array<String> | List of called IDs (invitees) |
groupId | String | Group Call ID |
callMediaType | Number | The media type of the call, such as video call, voice call. params.callMediaType = 0 : Voice Call. params.callMediaType = 1 : Video Call. |
userData | String | User-added extension fields. |
TUICallKit.on(TUICallEvent.onCallCancelled, (res: any) => {console.log('onCallCancelled userId=' + res.callerId);});
Parameter | Type | Description |
callerId | String | Caller ID (inviter) |
TUICallKit.on(TUICallEvent.onCallBegin, (res: any) => {console.log('onCallBegin strRoomId=' + res.roomId.strRoomId + ', callMediaType=' + res.callMediaType + ',callRole=' + res.callRole);});
Parameter | Type | Description |
roomId | roomId.intRoomId: The audio and video room ID for this call (int type) roomId.strRoomId: The audio and video room ID for this call (String type) | |
callMediaType | Number | Media Type of the call, Video Call, Voice Call params.callMediaType = 0:Voice Call params.callMediaType = 1:Video Call |
callRole | Number | Role, Enum Type: Caller, Called. params.callRole = 0: Unknown Type. params.callRole = 1: Caller (inviter). params.callRole = 2: Called (invitee). |
TUICallKit.on(TUICallEvent.onCallEnd, (res: any) => {console.log('onCallEnd strRoomId=' + res.roomId.strRoomId+ ',callMediaType=' + res.callMediaType+ ',callRole=' + res.callRole+ ',totalTime=' + res.totalTime);});
Parameter | Type | Description |
roomId | roomId.intRoomId: The audio and video room ID for this call (int type) roomId.strRoomId: The audio and video room ID for this call (String type) | |
callMediaType | Number | Media Type of the call, Video Call, Voice Call params.callMediaType = 0: Voice Call params.callMediaType = 1: Video Call |
callRole | Number | role, Enumeration Type: Caller, Called params.callRole = 0: Unknown Type. params.callRole = 1: Caller (inviter). params.callRole = 2: Called (invitee). |
totalTime | Number | The duration of this call, Unit: second |
TUICallKit.on(TUICallEvent.onUserReject, (res: any) => {console.log('onUserReject userId=' + res.userId);});
Parameter | Type | Description |
userId | String | ID of rejecting user |
TUICallKit.on(TUICallEvent.onUserNoResponse, (res: any) => {console.log('onUserNoResponse userId=' + res.userId);});
Parameter | Type | Description |
userId | String | User ID with no response |
TUICallKit.on(TUICallEvent.onUserLineBusy, (res: any) => {console.log('onUserLineBusy userId=' + res.userId);});
Parameter | Type | Description |
userId | String | ID of rejecting user |
TUICallKit.on(TUICallEvent.onUserJoin, (res: any) => {console.log('onUserJoin userId=' + res.userId);});
Parameter | Type | Description |
userId | String | User ID joining the current call |
TUICallKit.on(TUICallEvent.onUserLeave, (res: any) => {console.log('onUserLeave userId=' + res.userId);});
Parameter | Type | Description |
userId | String | The target userId |
TUICallKit.on(TUICallEvent.onCallMediaTypeChanged, (res: any) => {console.log('onCallMediaTypeChanged oldCallMediaType=' + res.oldCallMediaType + ',newCallMediaType=' + res.newCallMediaType);});
TUICallKit.on(TUICallEvent.onKickedOffline, (res: any) => {console.log('onKickedOffline');});
TUICallKit.on(TUICallEvent.onUserSigExpired, (res: any) => {console.log('onUserSigExpired');});
TUICallKit.on(TUICallEvent.onUserVideoAvailable, (res: any) => {console.log('onUserVideoAvailable userId=' + res.userId + 'isVideoAvailable=' + res.isVideoAvailable);});
Parameter | Type | Description |
userId | String | The user ID. |
isVideoAvailable | boolean | Whether the user has video. |
TUICallKit.on(TUICallEvent.onUserAudioAvailable, (res: any) => {console.log('onUserAudioAvailable userId=' + res.userId + 'isAudioAvailable=' + res.isAudioAvailable);});
Parameter | Type | Description |
userId | String | The user ID. |
isAudioAvailable | boolean | Whether the user has audio. |
TUICallKit.on(TUICallEvent.onUserVoiceVolumeChanged, (volumeMap: any) => {for (const [key, value] of volumeMap) {console.log(`onUserVoiceVolumeChanged userId: ${key}, volume: ${value}`);}});
Parameter | Type | Description |
volumeMap | any | The volume table, which includes the volume of each user (userId). Value range: 0-100. |
TUICallKit.on(TUICallEvent.onUserNetworkQualityChanged, (networkQuality: any) => {for (const [key, value] of networkQuality) {console.log(`onUserNetworkQualityChanged userId: ${key}, network quality: ${value}`);}});
Parameter | Type | Description |
networkQuality | any | The key represents the userId, and the value represents the network quality of the user. value = Unknown value = Excellent value = Good value = Poor value = Bad value = Vbad value = Down |
Was this page helpful?