tencent cloud

Tencent Real-Time Communication

Release Notes and Announcements
Release Notes
Recent Product Announcement
TRTC Live (TUILiveKit) Product Launch Announcement
TRTC Conference Official Editions Launched
The commercial version of Conference is coming soon
Terms and Conditions Applicable to $9.9 Starter Package
Rules for the "First Subscription $100 Discount" Promotion
Announcement on the Start of Beta Testing for Multi-person Audio and Video Conference
TRTC Call Official Editions Launched
License Required for Video Playback in New Version of LiteAV SDK
TRTC to Offer Monthly Packages
Product Introduction
Overview
Concepts
Features
Strengths
Use Cases
Performance Statistics
Tencent RTC Quickplay: Experience Ultimate Real-Time Audio and Video Interaction!
Purchase Guide
Billing Overview
Free Minutes
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
FAQs
Refund Instructions
User Tutorial
Free Demo
Call
Overview
Activate the Service
Run Demo
Integration
Offline Call Push
Conversational Chat
On-Cloud Recording
AI Noise Reduction
UI Customization
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
Release Notes
FAQs
Conference
Overview(TUIRoomKit)
Activate the Service (TUIRoomKit)
Run Demo(TUIRoomKit)
Integration(TUIRoomKit)
Screen Sharing (TUIRoomKit)
Schedule a meeting (TUIRoomKit)
In-meeting Call (TUIRoomKit)
UI Customization(TUIRoomKit)
Virtual Background (TUIRoomKit)
Conference Control (TUIRoomKit)
Cloud Recording (TUIRoomKit)
AI Noise Reduction (TUIRoomKit)
In-Conference Chat (TUIRoomKit)
Robot Streaming (TUIRoomKit)
Enhanced Features (TUIRoomKit)
Client APIs (TUIRoomKit)
Server APIs (TUIRoomKit)
FAQs (TUIRoomKit)
Error Code (TUIRoomKit)
SDK Update Log (TUIRoomKit)
Live
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Run 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 Download
API Examples
Usage Guidelines
API Reference Manual
Advanced Features
AI Integration
Overview
Configure MCP Server
Install Skills
Integration Guide
FAQ
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
Console Guide
Application Management
Package Management
Usage Statistics
Monitoring Dashboard
Development Assistance
Solution
Real-Time Chorus
FAQs
Migration Guide
Billing
Features
UserSig
Firewall Restrictions
How to Downsize Installation Package
Android and iOS
Web
Flutter
Electron
TRTCCalling for Web
Audio and Video Quality
Others
Legacy Documentation
RTC RoomEngine SDK(Old)
Integrating TUIRoom (Web)
Integrating TUIRoom (Android)
Integrating TUIRoom (iOS)
Integrating TUIRoom (Flutter)
Integrating TUIRoom (Electron)
TUIRoom APIs
On-Cloud Recording and Playback (Old)
RTC Analytics Monthly Packages (Previous Version)
Protocols and Policies
Compliance
Security White Paper
Notes on Information Security
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC Policy
Privacy Policy
Data Processing And Security Agreement
Glossary

TUILiveBattleManager

PDF
Focus Mode
Font Size
Last updated: 2025-07-17 17:58:06
Copyright (c) 2024 Tencent. All rights reserved.
Module: TUILiveBattleManager @ TUIKitEngine
Function: Live-Battle APIs

TUILiveBattleManager

TUILiveBattleManager

FuncList
DESC
Callback for received the battle start.
Callback for received tht battle end.
Callback for received user notification of joined the battle.
Callback for received user notification of exited the battle.
Callback for received score update notification of battle user.
Callback for received the battle invitation
Callback for canceled the connection invitation
Callback for timeout the battle invitation
Callback for accpeted the battle invitation
Callback for rejected the battle invitation
Add event callback
Remove event callback
Request battle invitation.
Cancel request about battle invitation.
Accept the battle invitaion.
Reject the battle invitaion.
Exit the battle

StructType

FuncList
DESC
Battle User Info
Battle Config
Battle Info

EnumType

EnumType
DESC
Battle Request Status
Battle Stopped Reason

onBattleStarted

onBattleStarted
void onBattleStarted
(BattleInfo battleInfo)

Callback for received the battle start.

Param
DESC
battleInfo
Battle information.

onBattleEnded

onBattleEnded
void onBattleEnded
(BattleInfo battleInfo

BattleStoppedReason reason)

Callback for received tht battle end.

Param
DESC
battleInfo
Battle information.
reason
The reason why the PK ended.

onUserJoinBattle

onUserJoinBattle
void onUserJoinBattle
(String battleId

BattleUser battleUser)

Callback for received user notification of joined the battle.

Param
DESC
battleId
Battle ID.
battleUser
The infomration about BattleUser.

onUserExitBattle

onUserExitBattle
void onUserExitBattle
(String battleId

BattleUser battleUser)

Callback for received user notification of exited the battle.

Param
DESC
battleId
Battle ID.
battleUser
The infomration about BattleUser.

onBattleScoreChanged

onBattleScoreChanged
void onBattleScoreChanged
(String battleId

List<BattleUser> battleUserList)

Callback for received score update notification of battle user.

Param
DESC
battleId
Battle ID.
battleUserList
The infomration about BattleUser.

onBattleRequestReceived

onBattleRequestReceived
void onBattleRequestReceived
(BattleInfo battleInfo

BattleUser inviter

BattleUser invitee)

Callback for received the battle invitation

Param
DESC
battleInfo
Battle information.
invitee
The BattleUser about the invitee.
inviter
The BattleUser about the inviter.

onBattleRequestCancelled

onBattleRequestCancelled
void onBattleRequestCancelled
(BattleInfo battleInfo

BattleUser inviter

BattleUser invitee)

Callback for canceled the connection invitation

Param
DESC
battleInfo
Battle information.
invitee
The BattleUser about the invitee.
inviter
The BattleUser about the inviter.

onBattleRequestTimeout

onBattleRequestTimeout
void onBattleRequestTimeout
(BattleInfo battleInfo

BattleUser inviter

BattleUser invitee)

Callback for timeout the battle invitation

Param
DESC
battleInfo
Battle information.
invitee
The BattleUser about the invitee.
inviter
The BattleUser about the inviter.

onBattleRequestAccept

onBattleRequestAccept
void onBattleRequestAccept
(BattleInfo battleInfo

BattleUser inviter

BattleUser invitee)

Callback for accpeted the battle invitation

Param
DESC
battleInfo
Battle information.
invitee
The BattleUser about the invitee.
inviter
The BattleUser about the inviter.

onBattleRequestReject

onBattleRequestReject
void onBattleRequestReject
(BattleInfo battleInfo

BattleUser inviter

BattleUser invitee)

Callback for rejected the battle invitation

Param
DESC
battleInfo
Battle information.
invitee
The BattleUser about the invitee.
inviter
The BattleUser about the inviter.

addObserver

addObserver
void addObserver
(Observer observer)

Add event callback

Param
DESC
observer
The instance being listened to.

removeObserver

removeObserver
void removeObserver
(Observer observer)

Remove event callback

Param
DESC
observer
The instance being listened to.

requestBattle

requestBattle
void requestBattle
(BattleConfig config

List<String> roomIdList

int timeout

BattleRequestCallback callback)

Request battle invitation.

Param
DESC
config
Battle configuration.
roomIdList
The list of room IDs will be invited.
timeout
Timeout time.

cancelBattleRequest

cancelBattleRequest
void cancelBattleRequest
(String battleId

List<String> userIdList

TUIRoomDefine.ActionCallback callback)

Cancel request about battle invitation.

Param
DESC
battleId
Battle ID.
roomIdList
The list of room IDs whose battle requests will be canceled.

acceptBattle

acceptBattle
void acceptBattle
(String battleId

TUIRoomDefine.ActionCallback callback)

Accept the battle invitaion.

Param
DESC
battleId
Battle ID.

rejectBattle

rejectBattle
void rejectBattle
(String battleId

TUIRoomDefine.ActionCallback callback)

Reject the battle invitaion.

Param
DESC
battleId
Battle ID.

exitBattle

exitBattle
void exitBattle
(String battleId

TUIRoomDefine.ActionCallback callback)

Exit the battle

Param
DESC
battleId
Battle ID.

TUIBattleCode

TUIBattleCode

Battle Request Status

Enum
Value
DESC
UNKNOWN
-1
default.
SUCCESS
0
Request success.
ROOM_NOT_EXISTS
1
Request Room not exist.
BATTLING
2
The room you are invited to join the battle is already joined battle.
BATTLING_OTHER_ROOM
3
The room you are invited to battle to is battling with other rooms.
ROOM_EXIT
4
The room is exited.
RETRY
5
An internal error occurs. You are advised to try again.

TUIBattleStoppedReason

TUIBattleStoppedReason

Battle Stopped Reason

Enum
Value
DESC
TIME_OVER
0
The Battle reaches the maximum duration and the timeout ends.
OTHER_EXIT
1
The rest of the users has exited.

TUIBattleUser

TUIBattleUser

Battle User Info

EnumType
DESC
avatarUrl
The user avatar url of the battle user.
roomId
The room id of the battle user.
score
The score of the battle user.
userId
The user id of the battle user.
userName
The user name of the battle user.

TUIBattleConfig

TUIBattleConfig

Battle Config

EnumType
DESC
duration
The maximum duration of the battle (Unit: seconds).
extensionInfo
The extension information of battle.
needResponse
Whether the invited user needs to reply accept/reject.

TUIBattleInfo

TUIBattleInfo

Battle Info

EnumType
DESC
battleId
Battle ID.
config
The configuration of battle.
endTime
The timestamp marking the end of the battle (Unit: seconds).
inviteeList
The people who are invited to join the battle.
inviter
The person who requests the battle.
startTime
The timestamp marking the start of the battle (Unit: seconds).

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback