tencent cloud

Tencent Real-Time Communication

お知らせ・リリースノート
製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について
製品の説明
製品概要
基礎概念
製品の機能
製品の強み
ユースケース
性能データ
購入ガイド
Billing Overview
無料時間の説明
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
課金に関するよくあるご質問
Refund Instructions
初心者ガイド
Demo体験
Call
コンポーネントの説明(TUICallKit)
Activate the Service
Run Demo
クイック導入
オフライン通知
Conversational Chat
クラウドレコーディング(TUICallKit)
AI Noise Reduction
インターフェースのカスタマイズ
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
公開ログ
よくある質問
ライブ配信
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
高度な機能
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
よくあるご質問
課金関連問題
機能関連
UserSig関連
ファイアウォールの制限の対応関連
インストールパッケージの圧縮に関するご質問
AndriodおよびiOS関連
Web端末関連
Flutter関連
Electron関連
TRTCCalling Web関連
オーディオビデオ品質関連
その他のご質問
旧バージョンのドキュメント
TUIRoom(Web)の統合
TUIRoom (Android)の統合
TUIRoom (iOS)の統合
TUIRoom (Flutter)の統合
TUIRoom (Electron)の統合
TUIRoom APIのクエリー
クラウドレコーディングと再生の実現(旧)
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

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック