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

Live Room Information Settings

PDF
Focus Mode
Font Size
Last updated: 2025-06-23 14:38:53
This document primarily introduces how to use the RTC Room Engine SDK to implement custom room information.

Prerequisites

Before using the RTC RoomEngine SDK, you need to first call the Log In SDK so that subsequent features can be used normally.
The set live room information is effective only when you are the host. You can refer to Audio Live Broadcast or Video Live Broadcast to complete the creation of the live room.

User Guide

Note:
When using the custom room information feature, please ensure that you are the room owner or administrator.

Setting Room Information

iOS
Android
You need to prepare the parameter set TUILiveInfo. Next, we will provide a detailed introduction:
Parameter: TUILiveInfo
TUILiveInfo is composed of many fields, but you only need to care about filling in the following fields:
Parameter Name
Type
Description
activityStatus
Int
Live streaming room active status: user-customized tag
backgroundUrl
String
Live room background, supports up to 200 bytes
categoryList
List<Int>
Live room category tags, a single room supports up to 3 tags
coverUrl
String
Live room cover, supports up to 200 bytes
isPublicVisible
Bool
Whether the live room is public, set to true and it can be displayed in the room list.
After preparing TUILiveInfo, you can call setLiveInfo API to set live room information.
You need to prepare the parameter set LiveInfo. Next, we will provide a detailed introduction:
Parameter: LiveInfo
LiveInfo is composed of many fields, but you only need to care about filling in the following fields:
Parameter Name
Type
Description
activityStatus
Int
Live streaming room active status: user-customized tag
backgroundUrl
String
Live room background, supports up to 200 bytes
categoryList
List<Int>
Live room category tags, a single room supports up to 3 tags
coverUrl
String
Live room cover, supports up to 200 bytes
isPublicVisible
Bool
Whether the live room is public, set to true and it can be displayed in the room list.
After preparing TUILiveInfo, you can call setLiveInfo API to set live room information.
Example:
iOS
Android
import RTCRoomEngine

let roomEngine = TUIRoomEngine.sharedInstance()
let liveListManager = roomEngine.getExtension(extensionType: .liveListManager) as? TUILiveListManager

let liveInfo = TUILiveInfo()
liveInfo.backgroundUrl = "backgroundUrl" // Replace with the live room background image you need
liveInfo.coverUrl = "coverUrl" // Replace with the live room cover image you need
liveInfo.isPublicVisible = true // Live streaming room is public
liveInfo.categoryList = [1, 2] // Can be replaced with the live room categories in your business

let modifyFlag: TUILiveModifyFlag = [.backgroundUrl,.coverUrl,.publish,.category] // Categories modified here

liveListManager?.setLiveInfo(liveInfo, modifyFlag: modifyFlag) {
// Successfully set live room information
} onError: { code, message in
// Fail to set live room information
}
TUIRoomEngine roomEngine = TUIRoomEngine.sharedInstance();
TUILiveListManager liveListManager = (TUILiveListManager) roomEngine.getExtension(TUICommonDefine.ExtensionType.LIVE_LIST_MANAGER);

TUILiveListManager.LiveInfo liveInfo = new TUILiveListManager.LiveInfo();
liveInfo.backgroundUrl = "backgroundUrl"; // Replace with the live room background image you need
liveInfo.coverUrl = "coverUrl"; // Replace with the live room cover image you need
liveInfo.isPublicVisible = true; // Live streaming room is public
liveInfo.categoryList = new ArrayList<>(Arrays.asList(1, 2)); // Can be replaced with the live room categories in your business


List<TUILiveListManager.LiveModifyFlag> modifyFlag = new ArrayList<>();
// Following are the categories modified by you
modifyFlag.add(TUILiveListManager.LiveModifyFlag.BACKGROUND_URL);
modifyFlag.add(TUILiveListManager.LiveModifyFlag.COVER_URL);
modifyFlag.add(TUILiveListManager.LiveModifyFlag.PUBLISH);
modifyFlag.add(TUILiveListManager.LiveModifyFlag.CATEGORY);
liveListManager.setLiveInfo(liveInfo, modifyFlag, new TUIRoomDefine.ActionCallback() {
@Override
public void onSuccess() {
// Successfully set live room information
}
@Override
public void onError(TUICommonDefine.Error error, String message) {
// Fail to set live room information
}
});

Modifying Room Name

Use the updateRoomNameByAdmin API to modify the room name. The SDK will notify users in the room through the onRoomNameChanged callback.
This function can only be called by the room owner or administrator.
Example:
iOS
Android
import RTCRoomEngine

let roomEngine = TUIRoomEngine.sharedInstance()
let name = "New Name" //Replace with your real username
roomEngine.updateRoomNameByAdmin(roomName: newName) {
//Room name modified successfully
} onError: { code, message in
//Failed to modify room name
}
TUIRoomEngine roomEngine = TUIRoomEngine.sharedInstance();
String newName = ""; //Replace with your required newName
roomEngine.updateRoomNameByAdmin(newName ,new TUIRoomDefine.ActionCallback() {
@Override
public void onSuccess() {
//Room name modified successfully
}

@Override
public void onError(TUICommonDefine.Error error, String message) {
//Room name modified successfully
}
});

Customizing Room Information

Use the setRoomMetadataByAdmin API to set custom room information. If the attribute exists, update its value; if not, add the attribute.
This function can only be called by the room owner or administrator, and this function only supports live room type Live.
Example:
iOS
Android
import RTCRoomEngine

let roomEngine = TUIRoomEngine.sharedInstance()
roomEngine.setRoomMetadataByAdmin([key:value], onSuccess: {
//Succeed in setting custom data.
}, onError: {code ,message in
//Fail to set custom data.
})
TUIRoomEngine roomEngine = TUIRoomEngine.sharedInstance();

// Prepare the metadata key-value pairs to be set or updated
HashMap<String, String> metadataToUpdate = new HashMap<>(); // Fill in the key-value pairs you want
metadataToUpdate.put("is_recording", "true"); // Set whether recording in progress, here just for example

roomEngine.setRoomMetadataByAdmin(metadataToUpdate, new TUIRoomDefine.ActionCallback() {
@Override
public void onSuccess() {
// Callback for successful setting
}

@Override
public void onError(int errorCode, String errorMessage) {
// Callback for setting failure
}
});

Retrieve Custom Room Information

After setting the custom information, you can call getRoomMetadata API to get all or specified information of the current live streaming room.
This function can only be called by the room owner or administrator, and this function only supports live room type Live.
Example:
iOS
Android
import RTCRoomEngine

let roomEngine = TUIRoomEngine.sharedInstance()
let keys: [String] = [""] // Parameter passing for room custom information key list. If keys is empty, obtain all custom information.

roomEngine.getRoomMetadata(array) { metadata in
//Succeed in obtaining custom information.
} onError: { code, message in
//Fail to obtain custom information.
}
TUIRoomEngine roomEngine = TUIRoomEngine.sharedInstance();

List<String> keysToQuery = new ArrayList<>(); //Replace with the list you want to query
roomEngine.getRoomMetadata(keysToQuery, new TUIRoomDefine.GetRoomMetadataCallback() {
@Override
public void onSuccess(Map<String, String> metadata) {
// Successful callback
}

@Override
public void onError(int errorCode, String errorMessage) {
// Callback failure
}
});

Help and Support

Was this page helpful?

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

Feedback