tencent cloud

Tencent Real-Time Communication

TUICallKit

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-10-10 17:06:45

TUICallKit APIs

TUICallKit is an audio/video call component that includes UI elements. You can use its APIs to quickly implement an audio/video call application similar to WeChat. For directions on integration, see Integrating TUICallKit.

API overview

API
Description
login
Log in.
logout
Sign out.
Set the user nickname and profile photo.
calls
Start a call.
join
Join the call.
Set whether to turn on the mute mode.
Set whether to enable floating windows.
Enable/Disable Call Banner.

Details

login

Future<TUIResult> login(int sdkAppId, String userId, String userSig)
Parameter
Type
Description
sdkAppId
int
User SDKAppID
userId
String
User ID, a string type, can only include English letters (a-z and A-Z), numbers (0-9), hyphens (-), and underscores (_).
userSig
String
User Signature. UserSig is obtained by encrypting information such as sdkAppId and userId using the SDKSecretKey(Signature calculation method). It serves as a ticket for authentication, enabling Tencent Cloud to determine if the current user is authorized to use TRTC services.
return value
Contains errorCode and errorMessage information:
When the errorCode is "0", it means the call is successful;
When errorCode is not "0", it means the call failed; see errorMessage for the reason of failure.

logout

Future<void> logout()

setSelfInfo

This API is used to set the alias and profile photo. The alias cannot exceed 500 bytes, and the profile photo is specified by a URL.
Future<TUIResult> setSelfInfo(String nickname, String avatar)
Parameter
Type
Description
nickName
String
The nick name.
avatar
String
The profile photo.
return value
Contains errorCode and errorMessage information:
When the errorCode is "0", it means the call is successful;
When errorCode is not "0", it means the call failed; see errorMessage for the reason of failure.

calls

Initiate a call.
Future<TUIResult> calls(List<String> userIdList, CallMediaType mediaType, CallParams params)
Parameter
Type
Description
userIdList
List<String>
The target user IDs.
callMediaType
The call type, which can be video or audio.
params
Optional Extended call parameters, such as room number, call invitation timeout, offline push of custom content, etc.
return value
Contains errorCode and errorMessage information:
When the errorCode is "0", it means the call is successful;
When errorCode is not "0", it means the call failed; see errorMessage for the reason of failure.

join

Actively join the call.
Future<void> join(String callId)
Parameter
Type
Description
callId
String
Unique ID for this call.

enableMuteMode

This API is used to set whether to turn on the mute mode.
Future<void> enableMuteMode(bool enable)
Parameter
Type
Description
enable
bool
true means enable mute mode, false means disable mute mode.

enableFloatWindow

This API is used to set whether to enable floating windows. The default value is false, and the floating window button in the top left corner of the call view is hidden. If it is set to true, the button will become visible.
Future<void> enableFloatWindow(bool enable)
Parameter
Type
Description
enable
bool
true means enable the floating window feature, false means disable the floating window feature.

enableIncomingBanner

Enable/disable the call banner feature. When this feature is enabled, a banner display will appear at the top of the screen after receiving a call.
Future<void> enableIncomingBanner(bool enable)
Parameter
Type
Description
enable
bool
true means enable the call banner feature, false means disable the call banner feature.

ヘルプとサポート

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

フィードバック