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

Web

PDF
Focus Mode
Font Size
Last updated: 2024-10-15 17:23:26
This article will provide a detailed introduction on how to customize the user interface of TUIRoomkit. TUIRoomkit offers two customization methods: one is through a simple custom UI API, and the other is by replacing existing UI components. We will introduce each method in detail below.

Method 1: Fine-tuning the interface

TUIRoomkit provides a series of APIs that make it easy to customize the UI. The table below lists some of the main APIs and their functions:
API
Description
Set the interface language.
setTheme
Set the interface theme.
Enable the text watermark feature in the application.For details, see: Text Watermark.
Enable the virtual background feature in the application. After calling this function, a virtual background feature button will be displayed on the UI. For details, see: Virtual Background.
Disable the text messaging feature in the application. After invoking this function, users will not be able to send or receive text messages.
Disable the screen sharing feature in the application. After calling this function, users will not be able to share their screen with others.
Hide specific feature buttons in the application. After calling this function and passing in the appropriate FeatureButton enumeration value, the corresponding button will be hidden from the user interface.

Method 2: Modify the UIKit source code

You can directly modify the provided UI source code to adjust the user interface of TUIRoomKit according to your requirements.

Step 1: Exporting UIKit Source Code

Vue3
Vue2
1. Execute the source code export script, the default copy path is ./src/components/TUIRoom
node ./node_modules/@tencentcloud/roomkit-web-vue3/scripts/eject.js
2. Follow the script prompts to confirm that you want to copy the TUIRoomKit source code to the ./src/components/TUIRoom directory. Enter 'y' if you want to customize the copy directory, otherwise enter 'n'.



3. After exporting the source code, the TUIRoomKit source code will be added to the project path you specified. At this point, you need to manually change the reference to the ConferenceMainView component, conference object from the npm package address to the relative path address of the TUIRoom source code.
- import { ConferenceMainView, conference } from '@tencentcloud/roomkit-web-vue3';
// Replace the reference path with the real path of the TUIRoomKit source code.
+ import { ConferenceMainView, conference } from './src/components/TUIRoom/index.ts';
1. Execute the source code export script, the default copy path is ./src/components/TUIRoom
node ./node_modules/@tencentcloud/roomkit-web-vue2.7/scripts/eject.js
2. Follow the script prompts to confirm that you want to copy the TUIRoomKit source code to the ./src/components/TUIRoom directory. Enter 'y' if you want to customize the copy directory, otherwise enter 'n'.



3. After exporting the source code, the TUIRoomKit source code will be added to the project path you specified. At this point, you need to manually change the reference to the ConferenceMainView component, conference object from the npm package address to the relative path address of the TUIRoom source code.
- import { ConferenceMainView, conference } from '@tencentcloud/roomkit-web-vue2.7';
// Replace the reference path with the real path of the TUIRoomKit source code.
+ import { ConferenceMainView, conference } from './src/components/TUIRoom/index.ts';

Step 2:Configuring the UIKIT source code development environment

Config for Vue3 + Vite + TS
Config for Vue3 + Webpack + TS
Config for Vue2 + Webpack + TS
1. Install development environment dependencies
npm install typescript -S -D
2. Register for Pinia
TUIRoom uses Pinia for room data management, you need to register Pinia in the project entry file, which is the src/main.ts file.
// src/main.ts
import { createPinia } from 'pinia';

const app = createApp(App);
// register for Pinia
app.use(createPinia());
app.mount('#app');
3. Configuring esLint Checksums
If you don't want the TUIRoomKit component's esLint rules to conflict with your local rules and cause runtime errors, you can add the Ignore TUIRoom folder to .eslintignore.
// Please add the real path to the TUIRoom source code
src/components/TUIRoom
Should you encounter TypeScript errors during the project build process, it is advisable to inspect the project's package.json file. Remove the vue-tsc segment within the corresponding build command as illustrated below:
// package.json
{
"scripts": {
// "build": "vue-tsc --noEmit --skipLibCheck && vite build",
"build": "vite build"
}
}
4. At this point you can run the project to see the effect of source code importation.
npm run dev
1. Install development environment dependencies
npm install typescript -S -D
2. Register for Pinia TUIRoom uses Pinia for room data management, you need to register Pinia in the project entry file, which is the src/main.ts file.
// src/main.ts
import { createPinia } from 'pinia';

const app = createApp(App);
// register for Pinia
app.use(createPinia());
app.mount('#app');
3. Configuring esLint Checksums
If you don't want the TUIRoomKit component's esLint rules to conflict with your local rules and cause runtime errors, you can add the Ignore TUIRoom folder to .eslintignore.
// Please add the real path to the TUIRoom source code
src/components/TUIRoom
4. At this point you can run the project to see the effect of source code importation.
npm run serve
Note:
TUIRoomKit component requires vue2 project to have vue2.7 installed and supports typescript environment. If your current project is in vue2.6 + js environment, follow the steps below to upgrade to vue2.7 + ts environment.
Upgrading from vue2.6 to vue2.7 is a smooth upgrade and has no effect on existing code. After configuring the ts environment, there is no impact on the existing js code. Please feel free to upgrade.
1. Upgrade vue2 to v2.7+, if your project's vue version is already v2.7+, ignore this step.
npm install vue@2 -S
2. Configure typescript to support TUIRoom component loading.
vue add typescript
The options for configuring the TS development environment can be found in the image:



3. Register for Pinia
TUIRoom uses Pinia for room data management, you need to register Pinia in the project entry file, which is the src/main.ts file.
import { createPinia, PiniaVuePlugin } from 'pinia';

Vue.use(PiniaVuePlugin);
const pinia = createPinia();

new Vue({
pinia,
render: h => h(App),
}).$mount('#app');
4. Configuring esLint Checksums
If you don't want the TUIRoomKit component's esLint rules to conflict with your local rules and cause runtime errors, you can add the Ignore TUIRoom folder to .eslintignore.
// Please add the real path to the TUIRoom source code
src/components/TUIRoom
5. At this point you can run the project to see the effect of source code importation.
npm run serve

Step 3:Modify the source code according to the requirements

1. Replace icons

You can directly modify the icon components in the /TUIRoom/components/common/icons folder to ensure that the icon color and style are consistent throughout the app. Please keep the icon file names unchanged when replacing.

2. Adjust UI layout

You can adjust the multi-person video conference interface UI layout by modifying different components in the /TUIRoom/components/ folder:
- components/
- Chat Chat
- common Common icon components
- ManageMember Member management
- RoomContent Room video
- RoomFooter Room page Footer section
- RoomHeader Room page Header section
- RoomHome Home page
- RoomInvite Invite members
- RoomLogin Login page
- RoomMore More
- RoomSetting Settings
- RoomSidebar Drawer component

Method 3: Implement your own UI

The overall functionality of TUIRoomKit is based on the TUIRoomEngine, a UI-less SDK. You can fully implement your own UI interface based on TUIRoomEngine. For more information, please see:

Help and Support

Was this page helpful?

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

Feedback