@tencent-rtc/mcp 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/resource/doc/chatuikit/android/integration.md +499 -203
- package/resource/doc/chatuikit/android/workflow.md +713 -0
- package/resource/doc/chatuikit/flutter/integration.md +1 -1
- package/resource/doc/livekit/voice/android/voice-audience-list.md +334 -0
- package/resource/doc/livekit/voice/android/voice-audio-effect.md +380 -0
- package/resource/doc/livekit/voice/android/voice-barrage.md +565 -0
- package/resource/doc/livekit/voice/android/voice-co-guest-interaction.md +745 -0
- package/resource/doc/livekit/voice/android/voice-gift.md +822 -0
- package/resource/doc/livekit/voice/android/voice-host-interaction.md +703 -0
- package/resource/doc/livekit/voice/android/voice-integration.md +940 -0
- package/resource/doc/livekit/voice/android/voice-room-list.md +575 -0
- package/resource/doc/livekit/voice/flutter/voice-co-guest-interaction.md +675 -0
- package/resource/doc/livekit/voice/flutter/voice-integration.md +936 -0
- package/resource/doc/livekit/voice/ios/voice-audience-list.md +339 -0
- package/resource/doc/livekit/voice/ios/voice-audio-effect.md +370 -0
- package/resource/doc/livekit/voice/ios/voice-barrage.md +517 -0
- package/resource/doc/livekit/voice/ios/voice-co-guest-interaction.md +708 -0
- package/resource/doc/livekit/voice/ios/voice-gift.md +783 -0
- package/resource/doc/livekit/voice/ios/voice-host-interaction.md +770 -0
- package/resource/doc/livekit/voice/ios/voice-integration.md +898 -0
- package/resource/doc/livekit/voice/ios/voice-room-list.md +485 -0
- package/resource/doc/roomkit/vue/integration.md +179 -288
- package/resource/doc/roomkit/vue/workflow.md +499 -253
- package/resource/doc/tuicallkit/android/integration.md +539 -83
- package/resource/doc/tuicallkit/android/workflow.md +441 -0
- package/tools/common/present-scenario-choice.js +16 -0
- package/tools/common/present-scenario-choice.js.map +1 -0
- package/tools/definitions/get_native_call_uikit_integration_def.js +25 -9
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_integration_def.js +36 -14
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +55 -29
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +43 -54
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +1 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +52 -55
- package/tools/definitions/get_web_room_feature_detail_def.js.map +1 -1
- package/tools/definitions/get_web_room_uikit_integration_def.js +41 -25
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/present_scenario_choice_def.js +53 -0
- package/tools/definitions/present_scenario_choice_def.js.map +1 -0
- package/tools/definitions/record_prompt_def.js +26 -21
- package/tools/definitions/record_prompt_def.js.map +1 -1
- package/tools/definitions/record_result_def.js +20 -4
- package/tools/definitions/record_result_def.js.map +1 -1
- package/tools/index.js +2 -0
- package/tools/index.js.map +1 -1
- package/tools/live/get-native-live-uikit-integration.js +110 -34
- package/tools/live/get-native-live-uikit-integration.js.map +1 -1
- package/tools/live/get_native_live_uikit_interaction.js +128 -35
- package/tools/live/get_native_live_uikit_interaction.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -2,48 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
## 📋 Instruction Purpose
|
|
4
4
|
|
|
5
|
-
Provide
|
|
5
|
+
Provide Agent with a **code generation blueprint for implementing Vue TUIRoomKit (Atomicx version) core functionality**, and guide Agent to **prioritize using real-time latest documentation content obtained from tools**, supporting PC and H5 mobile Vue3 audio/video conference application scenarios.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## 🛑 Agent Execution Hard Constraints (Guardrails)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Agent must strictly follow these instructions when generating code:
|
|
12
12
|
|
|
13
13
|
### 1. Documentation-Driven Integration
|
|
14
|
-
- Must strictly follow the steps in `llm_code_generation_instructions_md` from
|
|
15
|
-
- **Must strictly generate code according to example code in integration documentation**, do not modify code structure and implementation methods
|
|
16
|
-
- Code generation should
|
|
14
|
+
- Must strictly follow the steps in `llm_code_generation_instructions_md` from tool return results
|
|
15
|
+
- **Must strictly generate code according to example code in integration documentation**, do not modify code structure and implementation methods arbitrarily
|
|
16
|
+
- Code generation should completely follow best practices and examples provided in integration documentation to ensure code correctness and runnability
|
|
17
17
|
|
|
18
|
-
### 2.
|
|
19
|
-
- TUIRoomKit (Atomicx version) uses **
|
|
20
|
-
-
|
|
21
|
-
-
|
|
18
|
+
### 2. npm Package Integration Method (Recommended)
|
|
19
|
+
- TUIRoomKit (Atomicx version) uses **direct npm package installation method**, no need to clone GitHub repository
|
|
20
|
+
- Quick integration through npm/pnpm/yarn dependency installation
|
|
21
|
+
- Source code export functionality available for deep UI customization
|
|
22
22
|
|
|
23
23
|
### 3. Silent Integration Execution
|
|
24
|
-
-
|
|
25
|
-
-
|
|
24
|
+
- Automatically install dependencies and start project after all code writing is completed
|
|
25
|
+
- Prompt user to access local development server address in browser after successful startup
|
|
26
26
|
|
|
27
27
|
### 4. Zero External Configuration (Testing Phase)
|
|
28
|
-
- Prohibit
|
|
29
|
-
-
|
|
28
|
+
- Prohibit automatic creation of any `.env` files for production environment configuration
|
|
29
|
+
- Key credentials like SDKAppID and UserSig must be obtained from MCP tools or manually configured by users
|
|
30
30
|
|
|
31
31
|
### 5. Authentication Credential Configuration
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- **⚠️ Important Security Warning**: Must inform users that client-side UserSig generation is only suitable for local testing, production environment must generate UserSig on server side
|
|
32
|
+
- Use `get_usersig` MCP tool to obtain `SDKAppID`, `userId` and `userSig`
|
|
33
|
+
- **⚠️ Important Security Notice**: Must inform users that client-side UserSig generation is only suitable for local testing, production environment must generate UserSig on server side
|
|
35
34
|
|
|
36
35
|
### 6. Vue 3 Composition API
|
|
37
|
-
- Prioritize using `<script setup lang="ts">` syntax (note
|
|
36
|
+
- Prioritize using `<script setup lang="ts">` syntax (note TypeScript enabled)
|
|
38
37
|
- Use Vue 3 Composition API (ref, reactive, computed, onMounted, etc.)
|
|
39
|
-
- Correctly import and use TUIRoomKit
|
|
38
|
+
- Correctly import and use TUIRoomKit components
|
|
40
39
|
|
|
41
|
-
### 7.
|
|
42
|
-
-
|
|
43
|
-
-
|
|
40
|
+
### 7. Platform Adaptation
|
|
41
|
+
- Use `getPlatform()` to detect current platform, PC uses `ConferenceMainView`, H5 mobile uses `ConferenceMainViewH5`
|
|
42
|
+
- Both component sets are already UI-adapted for PC and H5 respectively, ready to use out of the box
|
|
44
43
|
|
|
45
|
-
### 8.
|
|
46
|
-
-
|
|
44
|
+
### 8. Conference Component Loading Prerequisites (⚠️ Critical Constraint)
|
|
45
|
+
- **Pages calling `conference.start()` or `conference.join()` must ensure conference main view components are already loaded in template**
|
|
46
|
+
- Before calling start/join conference APIs, page template must include the following component structure:
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<template>
|
|
50
|
+
<ConferenceMainView v-if="isPC"></ConferenceMainView>
|
|
51
|
+
<ConferenceMainViewH5 v-else></ConferenceMainViewH5>
|
|
52
|
+
</template>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- If conference main view components are missing, `conference.start()` and `conference.join()` will not be able to render conference interface properly
|
|
56
|
+
- When Agent generates conference room page code, must first import and render above components, then execute start/join conference logic
|
|
47
57
|
|
|
48
58
|
---
|
|
49
59
|
|
|
@@ -55,35 +65,34 @@ After Agent generates code, must automatically execute the following dependency
|
|
|
55
65
|
|
|
56
66
|
```json
|
|
57
67
|
{
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"@tencentcloud/
|
|
61
|
-
"
|
|
68
|
+
"@tencentcloud/roomkit-web-vue3": "latest", // TUIRoomKit main component package (includes ConferenceMainView, ConferenceMainViewH5, conference, etc.)
|
|
69
|
+
"tuikit-atomicx-vue3": "latest", // TUIRoomKit atomic component library (includes all Hooks and atomic UI components)
|
|
70
|
+
"@tencentcloud/uikit-base-component-vue3": "latest", // Base UI component library (UIKitProvider, etc.)
|
|
71
|
+
"@tencentcloud/universal-api": "latest" // Cross-platform API utility library (getPlatform, etc.)
|
|
62
72
|
}
|
|
63
73
|
```
|
|
64
74
|
|
|
65
75
|
**Dependency Description**:
|
|
66
76
|
|
|
67
|
-
| Dependency Package | Purpose |
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
| **@tencentcloud/
|
|
72
|
-
|
|
|
77
|
+
| Dependency Package | Purpose | Required | Description |
|
|
78
|
+
|-------|------|---------|------|
|
|
79
|
+
| **@tencentcloud/roomkit-web-vue3** | TUIRoomKit main component package | ✅ Required | Provides `ConferenceMainView` (PC), `ConferenceMainViewH5` (H5) and `conference` object (start/join meetings) |
|
|
80
|
+
| **tuikit-atomicx-vue3** | Atomic component library | ✅ Required | Provides `useLoginState`, `useRoomState` and other Hooks, as well as `RoomLayoutTemplate` and other enum types |
|
|
81
|
+
| **@tencentcloud/uikit-base-component-vue3** | Base UI component library | ✅ Required | Provides `UIKitProvider` component for configuring global theme and language |
|
|
82
|
+
| **@tencentcloud/universal-api** | Cross-platform API utility library | ✅ Required | Provides `getPlatform()` method for detecting current running platform (pc/mobile) |
|
|
73
83
|
|
|
74
|
-
**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
**Installation Commands**:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# npm
|
|
88
|
+
npm install @tencentcloud/roomkit-web-vue3@latest tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
89
|
+
|
|
90
|
+
# pnpm
|
|
91
|
+
pnpm install @tencentcloud/roomkit-web-vue3@latest tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
82
92
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- ❌ **Not Recommended**: Specifying different versions of `@tencentcloud/tuiroom-engine-js` in both `dependencies` and manual installation may cause version conflicts
|
|
93
|
+
# yarn
|
|
94
|
+
yarn add @tencentcloud/roomkit-web-vue3@latest tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
95
|
+
```
|
|
87
96
|
|
|
88
97
|
### 2. Development Environment Dependencies (TypeScript and SCSS)
|
|
89
98
|
|
|
@@ -91,212 +100,382 @@ If user project does not yet support TypeScript and SCSS, Agent must automatical
|
|
|
91
100
|
|
|
92
101
|
```json
|
|
93
102
|
{
|
|
94
|
-
"typescript": "latest", // TypeScript compiler
|
|
95
|
-
"sass": "latest" // SCSS preprocessor
|
|
103
|
+
"typescript": "latest", // TypeScript compiler
|
|
104
|
+
"sass": "latest" // SCSS preprocessor
|
|
96
105
|
}
|
|
97
106
|
```
|
|
98
107
|
|
|
99
|
-
**Dependency Description**:
|
|
100
|
-
- **typescript**: TUIRoomKit source code is written in TypeScript, requires TypeScript compiler support
|
|
101
|
-
- **sass**: TUIRoomKit style files are written in SCSS, requires sass preprocessor for compilation
|
|
102
|
-
|
|
103
108
|
### 3. Build Environment Patch (Vite/esbuild)
|
|
104
109
|
|
|
105
|
-
If Vite project is detected, Agent must automatically add patch configuration in `package.json`
|
|
110
|
+
If Vite project is detected, Agent must automatically add patch configuration in `package.json` to be compatible with esbuild-wasm:
|
|
106
111
|
|
|
107
112
|
```json
|
|
108
113
|
{
|
|
109
114
|
"overrides": {
|
|
110
|
-
"esbuild": "npm:esbuild-wasm@latest"
|
|
115
|
+
"esbuild": "npm:esbuild-wasm@latest"
|
|
111
116
|
},
|
|
112
117
|
"resolutions": {
|
|
113
|
-
"esbuild": "npm:esbuild-wasm@latest"
|
|
118
|
+
"esbuild": "npm:esbuild-wasm@latest"
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
121
|
```
|
|
117
122
|
|
|
118
|
-
|
|
119
|
-
- **Why needed**: In some environments, esbuild native binary may not run properly, using esbuild-wasm (WebAssembly version) can provide better cross-platform compatibility
|
|
120
|
-
- **Applicable scenarios**: Mainly for projects using Vite build tool
|
|
121
|
-
- **Purpose**: Force replace all esbuild versions in project dependencies with esbuild-wasm version
|
|
122
|
-
|
|
123
|
-
**Installation Command Examples**:
|
|
123
|
+
---
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
# npm
|
|
127
|
-
npm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/tuiroom-engine-js vue-router
|
|
128
|
-
npm install typescript sass -D
|
|
125
|
+
## 🎯 TUIRoomKit (Atomicx Version) Core Component Description
|
|
129
126
|
|
|
130
|
-
|
|
131
|
-
pnpm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/tuiroom-engine-js vue-router
|
|
132
|
-
pnpm install typescript sass -D
|
|
127
|
+
### Main Components
|
|
133
128
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
| Component Name | Description | Use Case |
|
|
130
|
+
|---------|------|---------|
|
|
131
|
+
| `ConferenceMainView` | PC conference main interface component | Desktop multi-person meetings |
|
|
132
|
+
| `ConferenceMainViewH5` | H5 mobile conference main interface component | Mobile multi-person meetings |
|
|
133
|
+
| `conference` | Conference control object | Start meeting (start) and join meeting (join) |
|
|
134
|
+
| `UIKitProvider` | Global UI configuration component | Configure theme and language |
|
|
138
135
|
|
|
139
|
-
|
|
136
|
+
### Core Hooks
|
|
140
137
|
|
|
141
|
-
|
|
138
|
+
| Hook Name | Source | Description |
|
|
139
|
+
|---------|------|------|
|
|
140
|
+
| `useLoginState` | `tuikit-atomicx-vue3/room` | Provides `login`, `setSelfInfo` and other login methods |
|
|
141
|
+
| `useRoomState` | `tuikit-atomicx-vue3/room` | Provides room state management |
|
|
142
|
+
| `useDeviceState` | `tuikit-atomicx-vue3/room` | Provides device state management |
|
|
143
|
+
| `useRoomEngine` | `tuikit-atomicx-vue3/room` | Get roomEngine instance |
|
|
142
144
|
|
|
143
|
-
|
|
145
|
+
### Platform Detection
|
|
144
146
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
| `src/assets/` | `src/assets/` | Contains background images, icons and other static resources |
|
|
148
|
-
| `src/components/` | `src/components/` | Contains all TUIRoomKit atomic UI components |
|
|
149
|
-
| `src/hooks/` | `src/hooks/` | Contains TUIRoomKit business logic processing |
|
|
150
|
-
| `src/i18n/` | `src/i18n/` | Contains multi-language configuration files |
|
|
151
|
-
| `src/utils/` | `src/utils/` | Contains common utility functions |
|
|
152
|
-
| `src/config/` | `src/config/` | Contains `basic-info-config.js` and other application configuration information (focus on this file for first-time integration) |
|
|
153
|
-
| `src/views/home.vue` | `src/views/home.vue` | This page contains device detection, room creation/join entry features |
|
|
154
|
-
| `src/views/room.vue` | `src/views/room.vue` | This page is the core meeting interface of TUIRoomKit, integrating complete header, video layout, control bar and sidebar panels |
|
|
147
|
+
```typescript
|
|
148
|
+
import { getPlatform } from '@tencentcloud/universal-api';
|
|
155
149
|
|
|
156
|
-
|
|
150
|
+
const isPC = getPlatform() === 'pc';
|
|
151
|
+
// isPC === true → Use ConferenceMainView
|
|
152
|
+
// isPC === false → Use ConferenceMainViewH5
|
|
153
|
+
```
|
|
157
154
|
|
|
158
155
|
---
|
|
159
156
|
|
|
160
|
-
##
|
|
157
|
+
## 👥 Default Test User Description
|
|
161
158
|
|
|
162
|
-
|
|
159
|
+
For convenient development and debugging, Agent generated code **provides 3 test users by default**:
|
|
163
160
|
|
|
164
|
-
|
|
161
|
+
| User ID | User Name | Description |
|
|
162
|
+
|---------|---------|------|
|
|
163
|
+
| `user001` | User 001 | Test user 1 (can be host) |
|
|
164
|
+
| `user002` | User 002 | Test user 2 (can be participant) |
|
|
165
|
+
| `user003` | User 003 | Test user 3 (can be participant) |
|
|
165
166
|
|
|
166
|
-
|
|
167
|
+
### Application Login Flow
|
|
167
168
|
|
|
168
|
-
|
|
169
|
+
Agent generated complete application includes the following pages and flow:
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
```mermaid
|
|
172
|
+
graph LR
|
|
173
|
+
A[Home - User Selection Login] --> B{Select User}
|
|
174
|
+
B --> C[user001 Login]
|
|
175
|
+
B --> D[user002 Login]
|
|
176
|
+
B --> E[user003 Login]
|
|
177
|
+
C --> F[Conference Entry Page]
|
|
178
|
+
D --> F
|
|
179
|
+
E --> F
|
|
180
|
+
F --> G[Create Meeting]
|
|
181
|
+
F --> H[Join Meeting]
|
|
182
|
+
G --> I[Enter Conference Room]
|
|
183
|
+
H --> I
|
|
184
|
+
```
|
|
174
185
|
|
|
175
|
-
###
|
|
186
|
+
### Home Page Feature Requirements
|
|
176
187
|
|
|
177
|
-
|
|
178
|
-
|---------|------|---------|
|
|
179
|
-
| `useLoginState` | Login state management | Provides login, setSelfInfo and other methods |
|
|
180
|
-
| `useRoomModal` | Room modal management | Provides handleErrorWithModal error handling method |
|
|
181
|
-
| `useRoomEngine` | Room engine management | Get roomEngine instance |
|
|
188
|
+
Agent generated home page (Home page) must include the following features:
|
|
182
189
|
|
|
183
|
-
|
|
190
|
+
1. **User Selection Interface**:
|
|
191
|
+
- Provide dropdown or button group for users to select test user to login (user001/user002/user003)
|
|
192
|
+
- Display currently selected user's ID and name
|
|
184
193
|
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
194
|
+
2. **Login Button**:
|
|
195
|
+
- After clicking login button, call `login()` and `setSelfInfo()` to complete user login
|
|
196
|
+
- Show loading state during login process
|
|
188
197
|
|
|
189
|
-
|
|
198
|
+
3. **Redirect After Successful Login**:
|
|
199
|
+
- Automatically redirect to conference entry page after successful login
|
|
200
|
+
- Conference entry page provides "Create Meeting" and "Join Meeting" two entrances
|
|
190
201
|
|
|
191
|
-
|
|
202
|
+
### Conference Entry Page Feature Requirements
|
|
192
203
|
|
|
193
|
-
|
|
204
|
+
Conference entry page after successful login must include:
|
|
194
205
|
|
|
195
|
-
|
|
206
|
+
1. **Display Current Login User Info**: Show logged-in user ID and name
|
|
207
|
+
2. **Create Meeting Feature**:
|
|
208
|
+
- Input meeting ID (optional, auto-generate if not provided)
|
|
209
|
+
- Input meeting name (optional)
|
|
210
|
+
- Click "Create Meeting" button to call `conference.start()`
|
|
211
|
+
3. **Join Meeting Feature**:
|
|
212
|
+
- Input meeting ID to join (required)
|
|
213
|
+
- Click "Join Meeting" button to call `conference.join()`
|
|
196
214
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
215
|
+
### Code Implementation Example
|
|
216
|
+
|
|
217
|
+
#### Test User Configuration
|
|
218
|
+
|
|
219
|
+
When Agent generates code, need to call `get_usersig` MCP tool for each test user to get corresponding userSig, and **pre-fill** into code:
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
// ⚠️ When Agent generates code, need to call get_usersig tool 3 times, to get userSig for user001, user002, user003 respectively
|
|
223
|
+
// Then fill the obtained SDKAppID and each user's userSig into the configuration below
|
|
200
224
|
|
|
201
|
-
|
|
202
|
-
cd TUIRoomKit/Web/example/atomicx-vite-vue3-ts
|
|
225
|
+
const SDKAppID = 0; // Agent fills in SDKAppID obtained from get_usersig
|
|
203
226
|
|
|
204
|
-
|
|
205
|
-
|
|
227
|
+
// Test user list (including pre-generated userSig)
|
|
228
|
+
const TEST_USERS = [
|
|
229
|
+
{ userId: 'user001', userName: 'User 001', userSig: '' }, // Agent fills in user001's userSig
|
|
230
|
+
{ userId: 'user002', userName: 'User 002', userSig: '' }, // Agent fills in user002's userSig
|
|
231
|
+
{ userId: 'user003', userName: 'User 003', userSig: '' }, // Agent fills in user003's userSig
|
|
232
|
+
];
|
|
206
233
|
```
|
|
207
234
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
235
|
+
#### Home Page User Selection Component Example
|
|
236
|
+
|
|
237
|
+
```vue
|
|
238
|
+
<template>
|
|
239
|
+
<div class="login-container">
|
|
240
|
+
<h1>TUIRoomKit Audio/Video Conference</h1>
|
|
241
|
+
<div class="user-select">
|
|
242
|
+
<label>Select Test User:</label>
|
|
243
|
+
<select v-model="selectedUserId">
|
|
244
|
+
<option v-for="user in TEST_USERS" :key="user.userId" :value="user.userId">
|
|
245
|
+
{{ user.userName }} ({{ user.userId }})
|
|
246
|
+
</option>
|
|
247
|
+
</select>
|
|
248
|
+
</div>
|
|
249
|
+
<button @click="handleLogin" :disabled="isLogging">
|
|
250
|
+
{{ isLogging ? 'Logging in...' : 'Login' }}
|
|
251
|
+
</button>
|
|
252
|
+
</div>
|
|
253
|
+
</template>
|
|
254
|
+
|
|
255
|
+
<script setup lang="ts">
|
|
256
|
+
import { ref } from 'vue';
|
|
257
|
+
import { useRouter } from 'vue-router';
|
|
258
|
+
import { useLoginState } from 'tuikit-atomicx-vue3/room';
|
|
259
|
+
|
|
260
|
+
// ⚠️ Following credentials are obtained and filled by Agent when generating code by calling get_usersig tool
|
|
261
|
+
const SDKAppID = 0; // Agent fills in actual SDKAppID
|
|
262
|
+
|
|
263
|
+
const TEST_USERS = [
|
|
264
|
+
{ userId: 'user001', userName: 'User 001', userSig: '' }, // Agent fills in user001's userSig
|
|
265
|
+
{ userId: 'user002', userName: 'User 002', userSig: '' }, // Agent fills in user002's userSig
|
|
266
|
+
{ userId: 'user003', userName: 'User 003', userSig: '' }, // Agent fills in user003's userSig
|
|
267
|
+
];
|
|
268
|
+
|
|
269
|
+
const router = useRouter();
|
|
270
|
+
const { login, setSelfInfo } = useLoginState();
|
|
271
|
+
|
|
272
|
+
const selectedUserId = ref('user001');
|
|
273
|
+
const isLogging = ref(false);
|
|
274
|
+
|
|
275
|
+
const handleLogin = async () => {
|
|
276
|
+
const user = TEST_USERS.find(u => u.userId === selectedUserId.value);
|
|
277
|
+
if (!user) return;
|
|
278
|
+
|
|
279
|
+
isLogging.value = true;
|
|
280
|
+
try {
|
|
281
|
+
await login({
|
|
282
|
+
userId: user.userId,
|
|
283
|
+
userSig: user.userSig, // Use pre-filled userSig
|
|
284
|
+
sdkAppId: SDKAppID,
|
|
285
|
+
});
|
|
286
|
+
await setSelfInfo({
|
|
287
|
+
userName: user.userName,
|
|
288
|
+
avatarUrl: '',
|
|
289
|
+
});
|
|
290
|
+
// Login successful, redirect to conference entry page
|
|
291
|
+
router.push('/conference-entry');
|
|
292
|
+
} catch (error) {
|
|
293
|
+
console.error('Login failed:', error);
|
|
294
|
+
} finally {
|
|
295
|
+
isLogging.value = false;
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
</script>
|
|
299
|
+
```
|
|
211
300
|
|
|
212
301
|
---
|
|
213
302
|
|
|
214
|
-
|
|
303
|
+
## 🛠️ Integration Steps Detailed
|
|
304
|
+
|
|
305
|
+
### Step 1: Install Project Dependencies
|
|
215
306
|
|
|
216
307
|
```bash
|
|
217
|
-
#
|
|
218
|
-
npm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/
|
|
308
|
+
# npm
|
|
309
|
+
npm install @tencentcloud/roomkit-web-vue3@latest tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
310
|
+
|
|
311
|
+
# pnpm
|
|
312
|
+
pnpm install @tencentcloud/roomkit-web-vue3@latest tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
219
313
|
|
|
220
|
-
#
|
|
221
|
-
|
|
314
|
+
# yarn
|
|
315
|
+
yarn add @tencentcloud/roomkit-web-vue3@latest tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
222
316
|
```
|
|
223
317
|
|
|
224
318
|
---
|
|
225
319
|
|
|
226
|
-
### Step
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
-
|
|
320
|
+
### Step 2: Create Conference Page Component (⚠️ Critical Step)
|
|
321
|
+
|
|
322
|
+
Create conference page component, **must load conference main view components in template first**, then call `conference.start()` or `conference.join()`:
|
|
323
|
+
|
|
324
|
+
```vue
|
|
325
|
+
<template>
|
|
326
|
+
<!-- ⚠️ Critical: Must load conference main view components in template first -->
|
|
327
|
+
<ConferenceMainView v-if="isPC"></ConferenceMainView>
|
|
328
|
+
<ConferenceMainViewH5 v-else></ConferenceMainViewH5>
|
|
329
|
+
</template>
|
|
330
|
+
|
|
331
|
+
<script setup lang="ts">
|
|
332
|
+
import { ref, onMounted } from 'vue';
|
|
333
|
+
import { useRoute } from 'vue-router';
|
|
334
|
+
import { ConferenceMainView, ConferenceMainViewH5, conference } from '@tencentcloud/roomkit-web-vue3';
|
|
335
|
+
import { getPlatform } from '@tencentcloud/universal-api';
|
|
336
|
+
|
|
337
|
+
const route = useRoute();
|
|
338
|
+
const isPC = ref(getPlatform() === 'pc');
|
|
339
|
+
|
|
340
|
+
// Get meeting info from route parameters
|
|
341
|
+
const roomId = route.query.roomId as string;
|
|
342
|
+
const roomName = route.query.roomName as string;
|
|
343
|
+
const action = route.query.action as 'start' | 'join'; // 'start' or 'join'
|
|
344
|
+
|
|
345
|
+
onMounted(async () => {
|
|
346
|
+
// ⚠️ Ensure component is mounted (template rendered) before calling conference API
|
|
347
|
+
if (action === 'start') {
|
|
348
|
+
// Start new meeting
|
|
349
|
+
await conference.start({
|
|
350
|
+
roomId: roomId,
|
|
351
|
+
options: {
|
|
352
|
+
roomName: roomName || 'My Meeting',
|
|
353
|
+
},
|
|
354
|
+
});
|
|
355
|
+
} else if (action === 'join') {
|
|
356
|
+
// Join existing meeting
|
|
357
|
+
await conference.join({
|
|
358
|
+
roomId: roomId,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
</script>
|
|
363
|
+
```
|
|
234
364
|
|
|
235
|
-
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
365
|
+
**⚠️ Mandatory Constraint Description**:
|
|
366
|
+
- `conference.start()` and `conference.join()` **must be called after conference main view components are loaded**
|
|
367
|
+
- Template must include `<ConferenceMainView>` and `<ConferenceMainViewH5>` components
|
|
368
|
+
- Recommend calling in `onMounted` lifecycle to ensure components are mounted
|
|
369
|
+
- If conference main view components are missing from template, calling API will not render conference interface properly
|
|
239
370
|
|
|
240
371
|
---
|
|
241
372
|
|
|
242
|
-
### Step
|
|
373
|
+
### Step 3: Configure App.vue File
|
|
243
374
|
|
|
244
|
-
Merge
|
|
375
|
+
Merge the following content into project's `App.vue` file:
|
|
245
376
|
|
|
246
377
|
**Key Configuration Points**:
|
|
247
378
|
- Configure global `UIKitProvider` component (set theme and language)
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
|
|
379
|
+
- Configure global styles to ensure conference interface displays fullscreen
|
|
380
|
+
- **Note**: User login logic is implemented in home page component (see "Default Test User Description" section)
|
|
381
|
+
|
|
382
|
+
```vue
|
|
383
|
+
<template>
|
|
384
|
+
<!-- Step 1: Configure global UIKitProvider -->
|
|
385
|
+
<UIKitProvider theme="light" language="en-US">
|
|
386
|
+
<!-- Your business components (Home → Conference Entry → Conference Room) -->
|
|
387
|
+
<router-view />
|
|
388
|
+
</UIKitProvider>
|
|
389
|
+
</template>
|
|
390
|
+
|
|
391
|
+
<script setup lang="ts">
|
|
392
|
+
import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3';
|
|
393
|
+
</script>
|
|
394
|
+
|
|
395
|
+
<!-- Step 2: Configure global styles -->
|
|
396
|
+
<style>
|
|
397
|
+
html, body {
|
|
398
|
+
padding: 0 !important;
|
|
399
|
+
margin: 0 !important;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
#app {
|
|
403
|
+
width: 100% !important;
|
|
404
|
+
height: 100% !important;
|
|
405
|
+
padding: 0 !important;
|
|
406
|
+
margin: 0 !important;
|
|
407
|
+
max-width: 100% !important;
|
|
408
|
+
max-height: 100% !important;
|
|
409
|
+
text-align: left !important;
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
}
|
|
412
|
+
</style>
|
|
413
|
+
```
|
|
251
414
|
|
|
252
415
|
**Agent Execution Requirements**:
|
|
253
|
-
- ⚠️
|
|
254
|
-
-
|
|
416
|
+
- ⚠️ User login logic is implemented in home page component, not in App.vue
|
|
417
|
+
- Must call `get_usersig` MCP tool to get SDKAppID, userId, userSig for each test user
|
|
255
418
|
|
|
256
419
|
---
|
|
257
420
|
|
|
258
|
-
### Step
|
|
421
|
+
### Step 4: Start New Meeting (Complete Example)
|
|
259
422
|
|
|
260
|
-
|
|
423
|
+
Navigate from conference entry page to conference room page and start meeting:
|
|
261
424
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
425
|
+
```typescript
|
|
426
|
+
// Start meeting logic in conference entry page
|
|
427
|
+
import { useRouter } from 'vue-router';
|
|
428
|
+
|
|
429
|
+
const router = useRouter();
|
|
430
|
+
|
|
431
|
+
const startConference = () => {
|
|
432
|
+
// Navigate to conference room page, pass meeting parameters
|
|
433
|
+
router.push({
|
|
434
|
+
path: '/room',
|
|
435
|
+
query: {
|
|
436
|
+
action: 'start',
|
|
437
|
+
roomId: '123456', // Meeting ID
|
|
438
|
+
roomName: 'My Temporary Meeting', // Meeting name
|
|
439
|
+
},
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
```
|
|
266
443
|
|
|
267
|
-
|
|
268
|
-
- ⚠️ Must strictly generate according to `main.ts` example code in integration documentation, do not modify without authorization
|
|
269
|
-
- If entry file in user project is `main.js`, need to change file extension to `main.ts`
|
|
270
|
-
- If user project already has route configuration, need intelligent merging rather than direct overwriting
|
|
444
|
+
**⚠️ Note**: Actual `conference.start()` call is executed in conference room page component (Step 2) `onMounted`, ensuring conference main view components are loaded.
|
|
271
445
|
|
|
272
446
|
---
|
|
273
447
|
|
|
274
|
-
### Step
|
|
448
|
+
### Step 5: Join Existing Meeting (Complete Example)
|
|
275
449
|
|
|
276
|
-
|
|
450
|
+
Navigate from conference entry page to conference room page and join meeting:
|
|
277
451
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
452
|
+
```typescript
|
|
453
|
+
// Join meeting logic in conference entry page
|
|
454
|
+
import { useRouter } from 'vue-router';
|
|
455
|
+
|
|
456
|
+
const router = useRouter();
|
|
457
|
+
|
|
458
|
+
const joinConference = () => {
|
|
459
|
+
// Navigate to conference room page, pass meeting parameters
|
|
460
|
+
router.push({
|
|
461
|
+
path: '/room',
|
|
462
|
+
query: {
|
|
463
|
+
action: 'join',
|
|
464
|
+
roomId: '123456', // Meeting ID to join
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
```
|
|
287
469
|
|
|
288
|
-
|
|
289
|
-
> "⚠️ The currently generated code is only suitable for local testing. In formal production environment, you must generate UserSig on server side, see Tencent Cloud documentation: https://cloud.tencent.com/document/product/647/17275#formal"
|
|
470
|
+
**⚠️ Note**: Actual `conference.join()` call is executed in conference room page component (Step 2) `onMounted`, ensuring conference main view components are loaded.
|
|
290
471
|
|
|
291
472
|
---
|
|
292
473
|
|
|
293
474
|
## 🎨 UI Customization Features
|
|
294
475
|
|
|
295
|
-
TUIRoomKit (Atomicx version) supports flexible UI customization, Agent can provide the following customization solutions according to user needs:
|
|
296
|
-
|
|
297
476
|
### 1. Theme and Language Configuration
|
|
298
477
|
|
|
299
|
-
Modify
|
|
478
|
+
Modify theme and language by configuring `UIKitProvider` parameters:
|
|
300
479
|
|
|
301
480
|
| UIKitProvider Parameter | Available Values | Default Value |
|
|
302
481
|
|-------------------|--------|--------|
|
|
@@ -311,17 +490,43 @@ Modify default values for theme and language by configuring `UIKitProvider` para
|
|
|
311
490
|
|
|
312
491
|
---
|
|
313
492
|
|
|
314
|
-
### 2.
|
|
493
|
+
### 2. Source Code Export (Deep Customization)
|
|
494
|
+
|
|
495
|
+
For deep customization of TUIRoomKit interface, use source code export feature:
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
# Execute source code export script, default copy path is ./src/components/RoomKit
|
|
499
|
+
node ./node_modules/@tencentcloud/roomkit-web-vue3/scripts/eject.js
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
After export, modify component import paths:
|
|
503
|
+
|
|
504
|
+
```typescript
|
|
505
|
+
// Before: Import from npm package
|
|
506
|
+
- import { ConferenceMainView, conference } from '@tencentcloud/roomkit-web-vue3';
|
|
507
|
+
|
|
508
|
+
// After: Import from local source code
|
|
509
|
+
+ import { ConferenceMainView, ConferenceMainViewH5, conference } from './components/RoomKit/index.ts';
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
---
|
|
513
|
+
|
|
514
|
+
### 3. Custom Room Stream Layout
|
|
515
|
+
|
|
516
|
+
TUIRoomKit supports three stream layouts:
|
|
315
517
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
518
|
+
| Layout Type | Enum Value | Description |
|
|
519
|
+
|---------|--------|------|
|
|
520
|
+
| Grid Layout | `RoomLayoutTemplate.GridLayout` | Default layout |
|
|
521
|
+
| Sidebar Layout | `RoomLayoutTemplate.SidebarLayout` | Sidebar layout |
|
|
522
|
+
| Top Bar Layout | `RoomLayoutTemplate.CinemaLayout` | Top bar layout |
|
|
320
523
|
|
|
321
|
-
|
|
524
|
+
After exporting source code, modify in `RoomKit/views/ConferenceMainView/index.vue`:
|
|
322
525
|
|
|
323
526
|
```typescript
|
|
324
|
-
|
|
527
|
+
import { RoomLayoutTemplate } from 'tuikit-atomicx-vue3/room';
|
|
528
|
+
|
|
529
|
+
// Change default layout to sidebar layout
|
|
325
530
|
const participantViewLayout = ref(RoomLayoutTemplate.SidebarLayout);
|
|
326
531
|
|
|
327
532
|
function handleLayoutUpdate(layout: RoomLayoutTemplate) {
|
|
@@ -331,23 +536,22 @@ function handleLayoutUpdate(layout: RoomLayoutTemplate) {
|
|
|
331
536
|
|
|
332
537
|
---
|
|
333
538
|
|
|
334
|
-
###
|
|
539
|
+
### 4. Custom Video Stream Widgets
|
|
335
540
|
|
|
336
|
-
|
|
541
|
+
After exporting source code, modify the following component to customize video stream widgets:
|
|
337
542
|
|
|
338
543
|
```
|
|
339
|
-
src/components/RoomLayoutView/ParticipantViewUI/ParticipantViewUI.vue
|
|
544
|
+
src/components/RoomKit/components/RoomLayoutView/ParticipantViewUI/ParticipantViewUI.vue
|
|
340
545
|
```
|
|
341
546
|
|
|
342
547
|
---
|
|
343
548
|
|
|
344
|
-
###
|
|
549
|
+
### 5. Configure User Contact List
|
|
345
550
|
|
|
346
|
-
TUIRoomKit scheduled
|
|
551
|
+
TUIRoomKit scheduled meetings and in-meeting calls user selection list displays user relationship chain by default. Batch import steps:
|
|
347
552
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
**Step 2**: Use [Friend Management > Import Friends](https://cloud.tencent.com/document/product/269/8301) REST API interface to batch import user relationship chain
|
|
553
|
+
1. Use [Account Management > Import Multiple Accounts](https://cloud.tencent.com/document/product/269/4919) REST API to batch import user accounts
|
|
554
|
+
2. Use [Friend Management > Import Friends](https://cloud.tencent.com/document/product/269/8301) REST API to batch import user relationship chain
|
|
351
555
|
|
|
352
556
|
---
|
|
353
557
|
|
|
@@ -355,120 +559,116 @@ TUIRoomKit scheduled meeting user selection list and in-meeting call user select
|
|
|
355
559
|
|
|
356
560
|
```mermaid
|
|
357
561
|
graph TD
|
|
358
|
-
A[Receive User Requirements] --> B[
|
|
359
|
-
B --> C
|
|
360
|
-
C
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
E
|
|
364
|
-
F -->
|
|
365
|
-
G --> H
|
|
366
|
-
H --> I[
|
|
367
|
-
I --> J[
|
|
368
|
-
J --> K[
|
|
369
|
-
K --> L
|
|
370
|
-
L
|
|
371
|
-
|
|
372
|
-
M
|
|
562
|
+
A[Receive User Requirements] --> B[Install npm Dependencies]
|
|
563
|
+
B --> C{Detect TypeScript and SCSS Support}
|
|
564
|
+
C -->|Not Installed| D[Install typescript and sass]
|
|
565
|
+
C -->|Already Installed| E[Skip]
|
|
566
|
+
D --> F[Create Home Page - User Selection Login Interface]
|
|
567
|
+
E --> F
|
|
568
|
+
F --> G[Configure 3 Test Users: user001/user002/user003]
|
|
569
|
+
G --> H[Call get_usersig to Get Credentials for Each User]
|
|
570
|
+
H --> I[Create Conference Entry Page - Create/Join Meeting]
|
|
571
|
+
I --> J[Create Conference Room Page Component]
|
|
572
|
+
J --> K[Configure App.vue: UIKitProvider + Global Styles]
|
|
573
|
+
K --> L{User Needs Deep UI Customization?}
|
|
574
|
+
L -->|Yes| M[Execute Source Code Export Script]
|
|
575
|
+
L -->|No| N[Use Default Configuration]
|
|
576
|
+
M --> O[Provide UI Customization Solutions: Theme/Layout/Widgets]
|
|
373
577
|
N --> P[record_result Record Integration Results]
|
|
374
578
|
O --> P
|
|
375
|
-
P --> Q[
|
|
376
|
-
Q --> R[Prompt User to Access
|
|
579
|
+
P --> Q[Auto Start Development Server: npm run dev]
|
|
580
|
+
Q --> R[Prompt User to Access in Browser and Select User Login]
|
|
377
581
|
```
|
|
378
582
|
|
|
379
583
|
---
|
|
380
584
|
|
|
381
585
|
## ✍️ Agent Code Generation Example Instructions (Prompts)
|
|
382
586
|
|
|
383
|
-
When Agent starts writing code, should follow these semantic logic:
|
|
384
|
-
|
|
385
587
|
**Basic Integration**:
|
|
386
|
-
> "
|
|
588
|
+
> "Following TUIRoomKit (Atomicx version) npm package integration method, generate a Vue 3 audio/video conference application for me. Home page provides 3 test user (user001/user002/user003) selection interface, after user selection click login, redirect to conference entry page after successful login, provide create meeting and join meeting functions. Use get_usersig tool to get authentication credentials for each test user. After startup, prompt me to access debug address in browser. **Please be sure to inform me: The currently generated code is only suitable for local testing, production environment must generate UserSig on server side.**"
|
|
387
589
|
|
|
388
|
-
**
|
|
389
|
-
> "
|
|
590
|
+
**H5 Mobile Conference**:
|
|
591
|
+
> "Following TUIRoomKit (Atomicx version) integration, generate a Vue 3 conference application that supports both PC and H5 mobile. Home page provides test user selection and login functionality, use getPlatform() to detect platform, PC uses ConferenceMainView, H5 uses ConferenceMainViewH5."
|
|
390
592
|
|
|
391
|
-
**
|
|
392
|
-
> "
|
|
593
|
+
**Deep UI Customization**:
|
|
594
|
+
> "Following TUIRoomKit (Atomicx version) integration, generate a Vue 3 conference application. Include user selection login process, need to execute source code export, customize video stream layout to sidebar layout, and customize video stream widget styles."
|
|
393
595
|
|
|
394
596
|
---
|
|
395
597
|
|
|
396
598
|
## 📝 Key Points Summary
|
|
397
599
|
|
|
398
|
-
| Category |
|
|
600
|
+
| Category | Requirements |
|
|
399
601
|
|------|------|
|
|
400
|
-
| **Framework Version** |
|
|
401
|
-
| **
|
|
402
|
-
| **
|
|
403
|
-
| **
|
|
404
|
-
| **
|
|
405
|
-
| **
|
|
406
|
-
| **
|
|
407
|
-
| **
|
|
408
|
-
| **
|
|
409
|
-
| **UI Customization** | Support theme, layout, video stream widget and other customizations |
|
|
602
|
+
| **Framework Version** | Vue 3.4.21 and above |
|
|
603
|
+
| **Platform Support** | PC + H5 mobile (responsive adaptation, ready to use) |
|
|
604
|
+
| **Integration Method** | Direct npm package installation (recommended); source code export available for deep customization |
|
|
605
|
+
| **Documentation First** | Strictly follow latest documentation instructions returned by tools |
|
|
606
|
+
| **Silent Integration** | Auto install dependencies and start development server after code writing completion |
|
|
607
|
+
| **Credential Acquisition** | Call `get_usersig` MCP tool to get SDKAppID, userId, userSig |
|
|
608
|
+
| **Security Notice** | ⚠️ Must inform users: Client-side UserSig generation only suitable for testing, production environment must generate on server side |
|
|
609
|
+
| **Multi-language** | Supports Chinese (zh-CN) and English (en-US) |
|
|
610
|
+
| **UI Customization** | Supports theme, layout, video stream widget customization (requires source code export) |
|
|
410
611
|
|
|
411
612
|
---
|
|
412
613
|
|
|
413
614
|
## 🎯 Agent Execution Checklist
|
|
414
615
|
|
|
415
|
-
After completing code generation, Agent must confirm all the following items:
|
|
416
|
-
|
|
417
616
|
### Project Initialization
|
|
418
|
-
- [ ]
|
|
419
|
-
- [ ] Copied core source code files to user project (assets, components, hooks, i18n, utils, config, views)
|
|
420
|
-
- [ ] Installed core dependencies: `tuikit-atomicx-vue3`, `@tencentcloud/uikit-base-component-vue3`, `@tencentcloud/tuiroom-engine-js`, `vue-router`
|
|
617
|
+
- [ ] Installed core dependencies: `@tencentcloud/roomkit-web-vue3`, `tuikit-atomicx-vue3`, `@tencentcloud/uikit-base-component-vue3`, `@tencentcloud/universal-api`
|
|
421
618
|
- [ ] Detected and installed TypeScript and SCSS development dependencies (if user project not installed)
|
|
422
619
|
|
|
423
620
|
### Code Generation
|
|
424
|
-
- [ ]
|
|
425
|
-
- [ ] Configured `App.vue`: UIKitProvider +
|
|
426
|
-
- [ ] Configured `main.ts`: routes + multi-language resources
|
|
621
|
+
- [ ] Created conference page component, using `getPlatform()` to detect platform
|
|
622
|
+
- [ ] Configured `App.vue`: UIKitProvider + global styles
|
|
427
623
|
- [ ] Components use `<script setup lang="ts">` syntax
|
|
428
624
|
|
|
429
|
-
###
|
|
430
|
-
- [ ] 🔴
|
|
431
|
-
- [ ]
|
|
432
|
-
- [ ] Implemented login
|
|
433
|
-
- [ ]
|
|
625
|
+
### Test Users and Login Flow
|
|
626
|
+
- [ ] 🔴 Configured 3 default test users: user001, user002, user003
|
|
627
|
+
- [ ] Created home page user selection interface (dropdown or button group to select test users)
|
|
628
|
+
- [ ] Implemented login button and login loading state
|
|
629
|
+
- [ ] Redirect to conference entry page after successful login
|
|
630
|
+
|
|
631
|
+
### Conference Entry Page
|
|
632
|
+
- [ ] Display current login user information
|
|
633
|
+
- [ ] Implemented "Create Meeting" functionality (call `conference.start()`)
|
|
634
|
+
- [ ] Implemented "Join Meeting" functionality (call `conference.join()`)
|
|
635
|
+
|
|
636
|
+
### Credentials and Login
|
|
637
|
+
- [ ] 🔴 Called `get_usersig` MCP tool to get SDKAppID, userId, userSig for each test user
|
|
638
|
+
- [ ] Implemented `login()` and `setSelfInfo()` login logic in home page
|
|
639
|
+
- [ ] ⚠️ **Informed user**: Currently generated code only suitable for local testing, production environment must generate UserSig on server side
|
|
434
640
|
|
|
435
641
|
### UI Configuration
|
|
436
642
|
- [ ] Configured theme (light/dark) and language (zh-CN/en-US) according to user requirements
|
|
437
|
-
- [ ]
|
|
438
|
-
- [ ] If user needs custom video stream widget, provided customization solution
|
|
643
|
+
- [ ] If user needs deep customization, executed source code export script
|
|
439
644
|
|
|
440
645
|
### Final Check
|
|
441
646
|
- [ ] Called `record_result` to record integration results
|
|
442
|
-
- [ ]
|
|
443
|
-
- [ ]
|
|
647
|
+
- [ ] Auto installed dependencies (npm install)
|
|
648
|
+
- [ ] Auto started development server (npm run dev)
|
|
444
649
|
- [ ] Prompted user to access local development server address in browser
|
|
445
|
-
- [ ] Project runs normally
|
|
650
|
+
- [ ] Project runs normally without errors
|
|
446
651
|
|
|
447
652
|
---
|
|
448
653
|
|
|
449
|
-
## 🔗 Related Tool
|
|
654
|
+
## 🔗 Related Tool References
|
|
450
655
|
|
|
451
|
-
### Must
|
|
656
|
+
### Must-Use Tools
|
|
452
657
|
|
|
453
|
-
####
|
|
454
|
-
**Purpose**:
|
|
658
|
+
#### `get_usersig` - Get Authentication Credentials
|
|
659
|
+
**Purpose**: Get Tencent Cloud application credentials from MCP environment variables
|
|
455
660
|
- `SDKAppID`: Application identifier
|
|
456
|
-
- `
|
|
457
|
-
|
|
458
|
-
**Usage**:
|
|
459
|
-
- Agent directly reads credentials from MCP environment variables
|
|
460
|
-
- Write credentials to `src/config/basic-info-config.js` file
|
|
461
|
-
- Prohibit letting users manually fill in or obtain from external tools
|
|
661
|
+
- `userId`: User ID
|
|
662
|
+
- `userSig`: User signature
|
|
462
663
|
|
|
463
664
|
**Usage Constraints**:
|
|
464
|
-
- ✅ Must
|
|
465
|
-
- ❌ Prohibit letting users manually input
|
|
665
|
+
- ✅ Must call this tool to get credentials
|
|
466
666
|
- ⚠️ Must inform users: Client-side UserSig generation only suitable for testing, production environment must generate on server side
|
|
467
667
|
|
|
468
668
|
#### `record_result` - Record Integration Results
|
|
469
669
|
**Purpose**: Record integration process and results for statistics and analysis
|
|
470
670
|
|
|
471
|
-
**
|
|
671
|
+
**Call Timing**: Call after completing all integration steps and successfully starting project
|
|
472
672
|
|
|
473
673
|
---
|
|
474
674
|
|
|
@@ -476,12 +676,58 @@ After completing code generation, Agent must confirm all the following items:
|
|
|
476
676
|
|
|
477
677
|
- **TUIRoomKit GitHub Repository**: https://github.com/Tencent-RTC/TUIRoomKit
|
|
478
678
|
- **Tencent Cloud TRTC Console**: https://console.cloud.tencent.com/trtc
|
|
479
|
-
- **How to Calculate UserSig in
|
|
679
|
+
- **How to Calculate UserSig in Production**: https://cloud.tencent.com/document/product/647/17275#formal
|
|
480
680
|
- **URL Domain and Protocol Restrictions**: https://cloud.tencent.com/document/product/647/17249
|
|
481
|
-
- **Dealing with Firewall Restrictions (
|
|
681
|
+
- **Dealing with Firewall Restrictions (Internal Proxy)**: https://web.sdk.qcloud.com/trtc/webrtc/doc/zh-cn/tutorial-34-advanced-proxy.html
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
## ❓ Frequently Asked Questions
|
|
686
|
+
|
|
687
|
+
### TUIRoomKit works normally in local development, but cannot capture camera/microphone after deploying online?
|
|
688
|
+
|
|
689
|
+
**Root Cause**: Browsers have strict restrictions on audio/video device capture for security and privacy protection. Capture is only allowed in secure environments (https://, localhost, file://).
|
|
690
|
+
|
|
691
|
+
**Solution**: Must deploy web pages using HTTPS protocol and ensure valid security certificates.
|
|
692
|
+
|
|
693
|
+
### Does TUIRoomKit support iframe integration?
|
|
694
|
+
|
|
695
|
+
Yes. When using iframe integration, need to configure allow attribute to grant necessary permissions:
|
|
696
|
+
|
|
697
|
+
```html
|
|
698
|
+
<iframe allow="microphone; camera; display-capture; display; fullscreen;">
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### Does TUIRoomKit support setting internal network proxy?
|
|
702
|
+
|
|
703
|
+
Yes. Please set internal network proxy parameters before entering room:
|
|
704
|
+
|
|
705
|
+
```typescript
|
|
706
|
+
import TUIRoomEngine from '@tencentcloud/tuiroom-engine-js';
|
|
707
|
+
import { useRoomEngine } from 'tuikit-atomicx-vue3/room';
|
|
708
|
+
|
|
709
|
+
const { roomEngine } = useRoomEngine();
|
|
710
|
+
|
|
711
|
+
TUIRoomEngine.once('ready', () => {
|
|
712
|
+
const trtcCloud = roomEngine.instance?.getTRTCCloud();
|
|
713
|
+
trtcCloud.callExperimentalAPI(JSON.stringify({
|
|
714
|
+
api: 'setNetworkProxy',
|
|
715
|
+
params: {
|
|
716
|
+
websocketProxy: "wss://proxy.example.com/ws/",
|
|
717
|
+
turnServer: [{
|
|
718
|
+
url: '14.3.3.3:3478',
|
|
719
|
+
username: 'turn',
|
|
720
|
+
credential: 'turn',
|
|
721
|
+
}],
|
|
722
|
+
iceTransportPolicy: 'relay',
|
|
723
|
+
},
|
|
724
|
+
}));
|
|
725
|
+
});
|
|
726
|
+
```
|
|
482
727
|
|
|
483
728
|
---
|
|
484
729
|
|
|
485
|
-
**
|
|
486
|
-
**
|
|
730
|
+
**Supported Framework**: Vue 3.4.21+
|
|
731
|
+
**Platform Support**: PC + H5 Mobile
|
|
732
|
+
**TUIRoomKit Version**: @tencentcloud/roomkit-web-vue3 (Atomicx Version)
|
|
487
733
|
**Build Tool**: Vite (Recommended)
|