tencent cloud

Tencent Real-Time Communication

소식 및 공지 사항
제품 업데이트
Tencent Cloud 오디오/비디오 단말 SDK 재생 업그레이드 및 권한 부여 인증 추가
TRTC 월간 구독 패키지 출시 관련 안내
제품 소개
제품 개요
기본 개념
제품 기능
제품 장점
응용 시나리오
성능 데이터
구매 가이드
Billing Overview
무료 시간 안내
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
과금 FAQ
Refund Instructions
신규 사용자 가이드
Demo 체험
Call
개요(TUICallKit)
Activate the Service
Run Demo
빠른 통합(TUICallKit)
오프라인 푸시
Conversational Chat
온클라우드 녹화(TUICallKit)
AI Noise Reduction
UI 사용자 정의
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
릴리스 노트
FAQs
라이브 스트리밍
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Demo 실행
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDK 다운로드
API 코드 예시
Usage Guidelines
API 클라이언트 API
고급 기능
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
콘솔 가이드
애플리케이션 관리
사용량 통계
모니터링 대시보드
개발 보조
Solution
Real-Time Chorus
FAQs
과금 개요
기능 관련
UserSig 관련
방화벽 제한 처리
설치 패키지 용량 축소 관련 질문
Andriod 및 iOS 관련
Web 관련
Flutter 관련
Electron 관련
TRTCCalling Web 관련
멀티미디어 품질 관련
기타 질문
Protocols and Policies
컴플라이언스 인증
보안 백서
정보 보안에 관한 참고 사항
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
용어집

TUICallEvent

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-02-21 15:40:11

TUICallEvent APIs

TUICallEvent API is the Event Interface of the Audio and Video Call Components.
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.

TUICallEvent details

onError

Error callback.
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

onCallReceived

Received a callback for a new incoming call request.
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.

onCallCancelled

Indicates the call was canceled by the caller, missed by the callee, rejected, etc., covering multiple scenarios.
Caller Cancellation: The caller receives this callback (callerId is oneself); the callee receives this callback (callerId is the caller's ID)
Callee Timeout: The caller receives both onUserNoResponse and onCallCancelled callbacks (callerId is their own ID); the callee receives the onCallCancelled callback (callerId is their own ID)
Call rejected: The caller will receive both onUserReject and onCallCancelled callbacks (callerId is your own ID); the callee receives the onCallCancelled callback (callerId is your own ID)
Call busy: The caller will receive both onUserLineBusy and onCallCancelled callbacks (callerId is your own ID)
Unexpected interruption: The callee fails to receive the call and gets this callback (callerId is your own ID)
TUICallKit.on(TUICallEvent.onCallCancelled, (res: any) => {
console.log('onCallCancelled userId=' + res.callerId);
});
Parameter
Type
Description
callerId
String
Caller ID (inviter)

onCallBegin

Indicates call connection. Both caller and called can receive it. You can start cloud recording, content review, etc., by listening to this event.
TUICallKit.on(TUICallEvent.onCallBegin, (res: any) => {
console.log('onCallBegin strRoomId=' + res.roomId.strRoomId + ', callMediaType=' + res.callMediaType + ',callRole=' + res.callRole);
});
Parameter
Type
Description
roomId
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).

onCallEnd

Indicates call disconnection. Both the caller and the called can receive it. You can listen to this event to display call duration, call type, etc., or to stop the cloud recording process.
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
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

onUserReject

Callback for call rejection, in 1v1 calls, only the caller will receive the rejection callback; in group calls, all invitees can receive this callback.
TUICallKit.on(TUICallEvent.onUserReject, (res: any) => {
console.log('onUserReject userId=' + res.userId);
});
Parameter
Type
Description
userId
String
ID of rejecting user

onUserNoResponse

Callback for no response from the other party.
TUICallKit.on(TUICallEvent.onUserNoResponse, (res: any) => {
console.log('onUserNoResponse userId=' + res.userId);
});
Parameter
Type
Description
userId
String
User ID with no response

onUserLineBusy

Callback for call busy.
TUICallKit.on(TUICallEvent.onUserLineBusy, (res: any) => {
console.log('onUserLineBusy userId=' + res.userId);
});
Parameter
Type
Description
userId
String
ID of rejecting user

onUserJoin

Callback for a user joining this call.
TUICallKit.on(TUICallEvent.onUserJoin, (res: any) => {
console.log('onUserJoin userId=' + res.userId);
});
Parameter
Type
Description
userId
String
User ID joining the current call

onUserLeave

A user left the call.
TUICallKit.on(TUICallEvent.onUserLeave, (res: any) => {
console.log('onUserLeave userId=' + res.userId);
});
Parameter
Type
Description
userId
String
The target userId

onCallMediaTypeChanged

Indicates a change in the call's media type.
TUICallKit.on(TUICallEvent.onCallMediaTypeChanged, (res: any) => {
console.log('onCallMediaTypeChanged oldCallMediaType=' + res.oldCallMediaType + ',newCallMediaType=' + res.newCallMediaType);
});
Parameter
Type
Description
oldCallMediaType
MediaType
Previous call type
newCallMediaType
MediaType
New call type

onKickedOffline

Current user kicked offline: You can notify the user on the UI and reinitialize.
TUICallKit.on(TUICallEvent.onKickedOffline, (res: any) => {
console.log('onKickedOffline');
});

onUserSigExpired

Ticket expires when online: You need to generate a new userSig and reinitialize.
TUICallKit.on(TUICallEvent.onUserSigExpired, (res: any) => {
console.log('onUserSigExpired');
});

onUserVideoAvailable

Whether a user is sending video.
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.

onUserAudioAvailable

Whether a user is sending audio.
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.

onUserVoiceVolumeChanged

The volume levels of all users.
TUICallKit.on(TUICallEvent.onUserVoiceVolumeChanged, (res: any) => {
console.log('onUserVoiceVolumeChanged', res)
});
Parameter
Type
Description
volumeMap
any
The volume table, which includes the volume of each user (userId). Value range: 0-100.

onUserNetworkQualityChanged

The network quality of all users.
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

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백