tencent cloud

Tencent Real-Time Communication

소식 및 공지 사항
제품 업데이트
Tencent Cloud 오디오/비디오 단말 SDK 재생 업그레이드 및 권한 부여 인증 추가
TRTC 월간 구독 패키지 출시 관련 안내
제품 소개
제품 개요
기본 개념
제품 기능
제품 장점
응용 시나리오
성능 데이터
구매 가이드
Billing Overview
무료 시간 안내
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
과금 FAQ
Refund Instructions
신규 사용자 가이드
Demo 체험
Call
개요(TUICallKit)
Activate the Service
Run Demo
빠른 통합(TUICallKit)
오프라인 푸시
Conversational Chat
온클라우드 녹화(TUICallKit)
AI Noise Reduction
UI 사용자 정의
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
릴리스 노트
FAQs
라이브 스트리밍
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 클라이언트 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
FAQs
과금 개요
기능 관련
UserSig 관련
방화벽 제한 처리
설치 패키지 용량 축소 관련 질문
Andriod 및 iOS 관련
Web 관련
Flutter 관련
Electron 관련
TRTCCalling Web 관련
멀티미디어 품질 관련
기타 질문
Protocols and Policies
컴플라이언스 인증
보안 백서
정보 보안에 관한 참고 사항
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
용어집
문서Tencent Real-Time Communication

Web

포커스 모드
폰트 크기
마지막 업데이트 시간: 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:

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백