@tencent-rtc/mcp 1.7.1 → 1.7.3
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/CHANGELOG.md +18 -0
- package/README.md +13 -5
- package/knowledge/bm25.js +20 -11
- package/knowledge/search/generic-rerank.js +123 -0
- package/knowledge/search/search-pass.js +8 -1
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/knowledge/chat/best-practice/common/web-sdk-log-level.md +76 -0
- package/resource/knowledge/chat/best-practice/miniprogram/desktop-wechat-miniprogram-error.md +79 -0
- package/resource/knowledge/roomkit/best-practice/vue/screen-share-auto-stop-on-leave.md +62 -0
- package/resource/knowledge/roomkit/core-sdk/react/network-proxy.md +83 -0
- package/resource/knowledge/roomkit/core-sdk/vue/network-proxy.md +83 -0
- package/resource/knowledge/roomkit/core-sdk/vue/recording.md +245 -0
- package/resource/knowledge/roomkit/core-sdk/vue/whiteboard-annotation.md +196 -0
- package/resource/knowledge/roomkit/faq/error-code.md +103 -0
- package/resource/knowledge/roomkit/preset/harmonyos/integration.md +461 -0
- package/resource/knowledge/roomkit/preset/react/features/network-proxy.md +79 -0
- package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +580 -0
- package/resource/knowledge/roomkit/preset/vue/features/ai-caption-translation.md +69 -0
- package/resource/knowledge/roomkit/preset/vue/features/ai-denoiser.md +67 -0
- package/resource/knowledge/roomkit/preset/vue/features/network-proxy.md +79 -0
- package/resource/knowledge/roomkit/preset/vue/features/recording.md +85 -0
- package/resource/knowledge/roomkit/preset/vue/features/whiteboard-annotation.md +86 -0
- package/server.js +1 -1
- package/tools/common/search_trtc_knowledge.js +2 -0
- package/utils/preflight-route.js +18 -6
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
TUIRoomKit is a one-stop multi-person video conferencing solution provided by Tencent Cloud, integrating complete UI components and core features. Through this document, developers can quickly learn how to integrate TUIRoomKit into a project to implement multi-person video conferencing functionality. This document also explains in detail how to quickly integrate the UI project, replace image resources, and customize styles, helping developers build audio/video applications that match their brand identity.
|
|
2
|
+
|
|
3
|
+
<style>
|
|
4
|
+
.vsdk-survey-card * {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.vsdk-survey-card {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
gap: 20px;
|
|
14
|
+
padding: 18px 22px;
|
|
15
|
+
margin: 16px 0;
|
|
16
|
+
border-radius: 14px;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
|
|
19
|
+
border: 1px solid #D7E8FF;
|
|
20
|
+
box-shadow: 0 4px 16px rgba(0,110,255,.05);
|
|
21
|
+
transition: all .25s ease;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.vsdk-survey-card::before{
|
|
25
|
+
content:"";
|
|
26
|
+
position:absolute;
|
|
27
|
+
right:-60px;
|
|
28
|
+
top:-60px;
|
|
29
|
+
width:180px;
|
|
30
|
+
height:180px;
|
|
31
|
+
background:radial-gradient(circle,
|
|
32
|
+
rgba(0,110,255,.16) 0%,
|
|
33
|
+
rgba(0,110,255,.08) 45%,
|
|
34
|
+
transparent 75%);
|
|
35
|
+
pointer-events:none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.vsdk-survey-card::after{
|
|
39
|
+
content:"";
|
|
40
|
+
position:absolute;
|
|
41
|
+
left:-40px;
|
|
42
|
+
bottom:-60px;
|
|
43
|
+
width:120px;
|
|
44
|
+
height:120px;
|
|
45
|
+
background:radial-gradient(circle,
|
|
46
|
+
rgba(76,169,255,.08),
|
|
47
|
+
transparent 70%);
|
|
48
|
+
pointer-events:none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.vsdk-survey-card:hover{
|
|
52
|
+
border-color:#006EFF;
|
|
53
|
+
box-shadow:
|
|
54
|
+
0 10px 28px rgba(0,110,255,.10),
|
|
55
|
+
0 0 36px rgba(0,110,255,.08);
|
|
56
|
+
transform:translateY(-2px);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.vsdk-card-left{
|
|
60
|
+
display:flex;
|
|
61
|
+
align-items:center;
|
|
62
|
+
gap:14px;
|
|
63
|
+
flex:1;
|
|
64
|
+
min-width:0;
|
|
65
|
+
position:relative;
|
|
66
|
+
z-index:1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.vsdk-ico{
|
|
70
|
+
width:46px;
|
|
71
|
+
height:46px;
|
|
72
|
+
flex:0 0 46px;
|
|
73
|
+
border-radius:12px;
|
|
74
|
+
background:linear-gradient(180deg,#EDF5FF,#DCEBFF);
|
|
75
|
+
display:flex;
|
|
76
|
+
align-items:center;
|
|
77
|
+
justify-content:center;
|
|
78
|
+
font-size:22px;
|
|
79
|
+
box-shadow:
|
|
80
|
+
inset 0 1px 0 rgba(255,255,255,.8),
|
|
81
|
+
0 6px 18px rgba(0,110,255,.12);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.vsdk-text{
|
|
85
|
+
min-width:0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.vsdk-title{
|
|
89
|
+
display:flex;
|
|
90
|
+
align-items:center;
|
|
91
|
+
gap:8px;
|
|
92
|
+
flex-wrap:wrap;
|
|
93
|
+
font-size:18px;
|
|
94
|
+
font-weight:600;
|
|
95
|
+
color:#1F2329;
|
|
96
|
+
line-height:1.4;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.vsdk-badge{
|
|
100
|
+
padding:2px 8px;
|
|
101
|
+
border-radius:999px;
|
|
102
|
+
background:#EAF3FF;
|
|
103
|
+
color:#006EFF;
|
|
104
|
+
font-size:11px;
|
|
105
|
+
font-weight:600;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vsdk-desc{
|
|
109
|
+
margin-top:6px;
|
|
110
|
+
font-size:13px;
|
|
111
|
+
line-height:1.7;
|
|
112
|
+
color:#4E5969;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.vsdk-card-right{
|
|
116
|
+
flex-shrink:0;
|
|
117
|
+
position:relative;
|
|
118
|
+
z-index:1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.vsdk-cta{
|
|
122
|
+
display:inline-flex;
|
|
123
|
+
align-items:center;
|
|
124
|
+
justify-content:center;
|
|
125
|
+
min-width:112px;
|
|
126
|
+
height:40px;
|
|
127
|
+
padding:0 22px;
|
|
128
|
+
border-radius:8px;
|
|
129
|
+
background:#006EFF;
|
|
130
|
+
color:#FFFFFF;
|
|
131
|
+
text-decoration:none;
|
|
132
|
+
font-size:14px;
|
|
133
|
+
font-weight:600;
|
|
134
|
+
box-shadow:0 8px 20px rgba(0,110,255,.25);
|
|
135
|
+
transition:all .2s ease;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.vsdk-cta:hover{
|
|
139
|
+
background:#0052D9;
|
|
140
|
+
box-shadow:0 10px 24px rgba(0,110,255,.35);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (max-width:768px){
|
|
144
|
+
|
|
145
|
+
.vsdk-survey-card{
|
|
146
|
+
flex-direction:column;
|
|
147
|
+
align-items:flex-start;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.vsdk-card-left{
|
|
151
|
+
width:100%;
|
|
152
|
+
align-items:flex-start;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.vsdk-title{
|
|
156
|
+
font-size:16px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.vsdk-desc{
|
|
160
|
+
font-size:12px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.vsdk-card-right{
|
|
164
|
+
width:100%;
|
|
165
|
+
margin-top:14px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.vsdk-cta{
|
|
169
|
+
width:100%;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
</style>
|
|
174
|
+
|
|
175
|
+
<div class="vsdk-survey-card">
|
|
176
|
+
|
|
177
|
+
<div class="vsdk-card-left">
|
|
178
|
+
|
|
179
|
+
<div class="vsdk-ico">💡</div>
|
|
180
|
+
|
|
181
|
+
<div class="vsdk-text">
|
|
182
|
+
|
|
183
|
+
<div class="vsdk-title">
|
|
184
|
+
Hit an integration blocker? 30-second feedback
|
|
185
|
+
<span class="vsdk-badge">All optional</span>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<div class="vsdk-desc">
|
|
189
|
+
Evaluating or getting to know the Conference SDK? If you run into any blockers with the UI, features, docs, or package activation, feel free to share your feedback.
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<div class="vsdk-card-right">
|
|
197
|
+
<a class="vsdk-cta" href="https://wj.qq.com/s2/27395009/ac34/" target="_blank">
|
|
198
|
+
Submit feedback
|
|
199
|
+
</a>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
## Prerequisites
|
|
205
|
+
|
|
206
|
+
### Enable the service
|
|
207
|
+
|
|
208
|
+
Refer to Enable Service to obtain the TUIRoomKit trial version, and get the following information on the [Application Management](https://console.cloud.tencent.com/trtc) page:
|
|
209
|
+
- **SDKAppID**: The application identifier (required). Tencent Cloud performs billing statistics based on the SDKAppID.
|
|
210
|
+
|
|
211
|
+
- **SDKSecretKey**: The application secret key, used for the key information in the initialization configuration file.
|
|
212
|
+
|
|
213
|
+
### Environment preparation
|
|
214
|
+
|
|
215
|
+
> **Note:**
|
|
216
|
+
> HBuilderX versions 4.64 and 4.65 have known compatibility issues with UTS plugin packaging. It is recommended to use version 4.66 or later.
|
|
217
|
+
>
|
|
218
|
+
|
|
219
|
+
- [HBuilderX](https://www.dcloud.io/hbuilderx.html): HBuilderX is the **official uni-app** integrated development environment (IDE). We need it to import, configure, and run our Demo.
|
|
220
|
+
|
|
221
|
+
- 2 mobile devices: An Android 5.0 or later device / an iOS 13.0 or later device.
|
|
222
|
+
|
|
223
|
+
## Quick integration
|
|
224
|
+
|
|
225
|
+
### **Step 1: Download the TUIRoomKit component**
|
|
226
|
+
|
|
227
|
+
#### 1. Clone the project source code
|
|
228
|
+
``` bash
|
|
229
|
+
git clone
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### 2. Import the atomic-x component
|
|
233
|
+
- Copy the entire `tuikit-atomic-x` folder under the `TUIKit_uni-app/App/uni_modules` directory in the source code into the `uni_modules` folder in the root directory of your project.
|
|
234
|
+
|
|
235
|
+
- Copy the files under `TUIKit_uni-app/App/components` in the source code into the `components` folder of your project.
|
|
236
|
+
|
|
237
|
+
- Copy the files under the `TUIKit_uni-app/App/static` directory in the source code into the folder of the same name in the root directory of your project.
|
|
238
|
+
|
|
239
|
+
#### 3. Copy the create-room, join-room, room main page, and other pages
|
|
240
|
+
- Copy the files under the `TUIKit_uni-app/App/pages` directory in the source code into the folder of the same name in the root directory of your project.
|
|
241
|
+
|
|
242
|
+
- Copy the `TUIKit_uni-app/App/debug` folder in the source code into the root directory of your project. This directory provides convenient functions that let you quickly generate a **UserSig** on the client.
|
|
243
|
+
|
|
244
|
+
#### 4. Merge the App.vue configuration
|
|
245
|
+
|
|
246
|
+
The **TUIKit_uni-app/App/App.vue** file contains the initialization logic for multi-person video conferencing capabilities, so you need to merge the **TUIKit_uni-app/App/App.vue** file with the **App.vue** file in your project.
|
|
247
|
+
|
|
248
|
+
> **Note:**
|
|
249
|
+
>
|
|
250
|
+
> Do not directly overwrite the **App.vue** file! Open the **TUIKit_uni-app/App/App.vue** in the source code, and append the ts content in its `<script>` section into the `<script>` tag of your own project's **App.vue**.
|
|
251
|
+
>
|
|
252
|
+
|
|
253
|
+
### Step 2: Project configuration
|
|
254
|
+
1. Configure `manifest.json`
|
|
255
|
+
|
|
256
|
+
Open the **manifest.json** file of your project, and under the **app-plus** > **distribute** node, make sure the following required permissions are added:
|
|
257
|
+
|
|
258
|
+
- Android platform (`android` node): In the `permissions` array, make sure the following permissions are included:
|
|
259
|
+
|
|
260
|
+
``` json
|
|
261
|
+
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
262
|
+
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\" />",
|
|
263
|
+
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
|
264
|
+
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
265
|
+
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>"
|
|
266
|
+
```
|
|
267
|
+
- iOS platform (ios node): In the `privacyDescription` object, make sure the following descriptions are included:
|
|
268
|
+
|
|
269
|
+
``` json
|
|
270
|
+
"NSCameraUsageDescription" : "The app needs to access your camera for multi-person audio/video interaction",
|
|
271
|
+
"NSMicrophoneUsageDescription" : "The app needs to access your microphone for multi-person audio/video interaction"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
In the `UIBackgroundModes` array, add `audio` to support background audio playback.
|
|
275
|
+
|
|
276
|
+
``` json
|
|
277
|
+
"UIBackgroundModes" : [ "audio" ]
|
|
278
|
+
```
|
|
279
|
+
2. Create a custom base.
|
|
280
|
+
|
|
281
|
+
> **Note:**
|
|
282
|
+
>
|
|
283
|
+
> Since TUIRoomKit contains native code (UTS plugins), you **must** create a custom debugging base to run on a real device.
|
|
284
|
+
>
|
|
285
|
+
|
|
286
|
+
1. In the HBuilderX top menu, select **Run** > **Run to phone or emulator** > **Create custom debugging base**.
|
|
287
|
+
|
|
288
|
+
2. After it is created successfully, select **Run** > **Run to phone or emulator** again, check **Use custom debugging base** in the dialog, and run it to your phone.
|
|
289
|
+
|
|
290
|
+
For detailed instructions, see Compile and run the Demo.
|
|
291
|
+
|
|
292
|
+
### Step 3: Login
|
|
293
|
+
|
|
294
|
+
After integration is complete, you need to complete the login. Log in where your project needs to use multi-person video conferencing capabilities. This is **a key step in using TUIRoomKit**, because only after a successful login can you use the various features of TUIRoomKit normally, so please patiently check whether the relevant parameters are configured correctly:
|
|
295
|
+
``` typescript
|
|
296
|
+
import { useLoginState } from "@/uni_modules/tuikit-atomic-x/state/LoginState";
|
|
297
|
+
|
|
298
|
+
const { login } = useLoginState();
|
|
299
|
+
|
|
300
|
+
onMounted(() => {
|
|
301
|
+
login({
|
|
302
|
+
sdkAppID: 1400000001, // Please replace with the SDKAppID from the Enable Service console
|
|
303
|
+
userID: "your userID", // Please replace with your UserID
|
|
304
|
+
userSig: "xxxxxxxxxxx", // You can compute a UserSig in the console and fill it in here
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Login interface parameter description**
|
|
311
|
+
| Parameter | Type | Description |
|
|
312
|
+
| --- | --- | --- |
|
|
313
|
+
| SDKAppID | Number | Obtained from <a href="https://console.cloud.tencent.com/trtc">TRTC Console > Application Management</a>. |
|
|
314
|
+
| userID | String | The unique ID of the current user, containing only English letters, digits, hyphens, and underscores. |
|
|
315
|
+
| userSig | String | The ticket used for Tencent Cloud authentication. Please note:<br>- Development environment: You can use the local <code>GenerateTestUserSig.genTestSig</code> function to generate UserSig, or generate a temporary UserSig through the <a href="https://console.cloud.tencent.com/im/tool-usersig">UserSig helper tool</a>.<br>- Production environment: To prevent key leakage, be sure to generate UserSig on the server side. For details, see <a href="https://cloud.tencent.com/document/product/647/17275#formal">Generating UserSig on the server</a>.<br>For more information, see <a href="https://cloud.tencent.com/document/product/647/17275">How to compute and use UserSig</a>. |
|
|
316
|
+
|
|
317
|
+
### Step 4: Register the multi-person video conferencing main page
|
|
318
|
+
|
|
319
|
+
Now, you need to tell your application in the `pages.json` file that this new page exists.
|
|
320
|
+
|
|
321
|
+
Open the `pages.json` file in the root directory of your project, and in the `"pages"` array, add the following object to register the multi-person video conferencing main page.
|
|
322
|
+
``` json
|
|
323
|
+
{
|
|
324
|
+
"pages": [
|
|
325
|
+
// ... other page configurations already in your project
|
|
326
|
+
{
|
|
327
|
+
"path": "pages/scenes/room/main/index",
|
|
328
|
+
"style": {
|
|
329
|
+
"navigationBarTitleText": "",
|
|
330
|
+
"disableSwipeBack": true, // Disable swipe-right back to prevent accidental exit during a meeting
|
|
331
|
+
"app-plus": {
|
|
332
|
+
"titleNView": false // Hide the native navigation bar and use the custom navigation inside the page
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
// ... other configurations
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Step 5: Navigate to the multi-person video conferencing main page
|
|
342
|
+
|
|
343
|
+
#### Create a room
|
|
344
|
+
|
|
345
|
+
Where you need to create a multi-person video conference (determined by your business, executed in its click event), call the `uni.navigateTo` or `uni.redirectTo` method to enter the multi-person video conferencing main page.
|
|
346
|
+
``` typescript
|
|
347
|
+
// Example: in a button's click event
|
|
348
|
+
function startBroadcast() {
|
|
349
|
+
const roomID = '123456'; // room id
|
|
350
|
+
const roomName = '123456'; // room name
|
|
351
|
+
const query = [
|
|
352
|
+
'mode=create',
|
|
353
|
+
`roomID=${encodeURIComponent(roomID)}`,
|
|
354
|
+
`roomName=${encodeURIComponent(roomName)}`,
|
|
355
|
+
'autoEnableCamera=1', // Whether to turn on the camera when entering the room (1 on, 0 off)
|
|
356
|
+
'autoEnableMicrophone=1', // Whether to turn on the microphone when entering the room (1 on, 0 off)
|
|
357
|
+
'autoEnableSpeaker=1', // Whether to turn on the speaker when entering the room (1 on, 0 off)
|
|
358
|
+
].join('&');
|
|
359
|
+
uni.navigateTo({ url: `/pages/scenes/room/main/index?${query}` }); // The URL corresponds to the path configured in pages.json
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
> **Note:**
|
|
364
|
+
> **navigateTo** vs. **redirectTo**
|
|
365
|
+
>
|
|
366
|
+
> - `uni.navigateTo`: Keeps the current page and navigates to the new page. The user can return from the multi-person video conferencing main page to the previous page. Suitable for scenarios where creating a room can be canceled beforehand.
|
|
367
|
+
> - `uni.redirectTo`: Closes the current page and navigates to the new page; the user cannot go back. Suitable for scenarios where the user enters the main flow directly, without needing to keep the previous UI. You can choose which to use according to your own business needs.
|
|
368
|
+
|
|
369
|
+
#### Join a room
|
|
370
|
+
|
|
371
|
+
Where you need to join a multi-person video conference (determined by your business, executed in its click event), call the `uni.navigateTo` or `uni.redirectTo` method to enter the multi-person video conferencing main page.
|
|
372
|
+
``` typescript
|
|
373
|
+
// Example: in a button's click event
|
|
374
|
+
function startBroadcast() {
|
|
375
|
+
const roomID = '123456'; // room id
|
|
376
|
+
const query = [
|
|
377
|
+
'mode=join',
|
|
378
|
+
`roomID=${encodeURIComponent(roomID)}`,
|
|
379
|
+
'autoEnableCamera=1', // Whether to turn on the camera when entering the room (1 on, 0 off)
|
|
380
|
+
'autoEnableMicrophone=1', // Whether to turn on the microphone when entering the room (1 on, 0 off)
|
|
381
|
+
'autoEnableSpeaker=1', // Whether to turn on the speaker when entering the room (1 on, 0 off)
|
|
382
|
+
].join('&');
|
|
383
|
+
uni.navigateTo({ url: `/pages/scenes/room/main/index?${query}` }); // The URL corresponds to the path configured in pages.json
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
## Customizing your UI
|
|
388
|
+
|
|
389
|
+
### Replacing the icons of the main page bottom bar, top bar, and video stream user info UI
|
|
390
|
+
|
|
391
|
+
All icons used by TUIRoomKit are stored under the `static/images` directory. Some examples are shown below. You can replace the icons in this directory according to your needs.
|
|
392
|
+
|
|
393
|
+
Top bar:
|
|
394
|
+
|
|
395
|
+
|Icon path|Detailed description|
|
|
396
|
+
|---------|---------|
|
|
397
|
+
|/static/images/room/room_switch_camera.png|Top bar switch camera icon.|
|
|
398
|
+
|/static/images/room/room_speakerphone.png|Top bar speaker icon.|
|
|
399
|
+
|/static/images/room/room_earpiece.png|Top bar earpiece icon.|
|
|
400
|
+
|
|
401
|
+
Bottom bar:
|
|
402
|
+
|
|
403
|
+
|Icon path|Detailed description|
|
|
404
|
+
|---------|---------|
|
|
405
|
+
|/static/images/room/room_member.png|Bottom bar member icon.|
|
|
406
|
+
|/static/images/room/room_mic_on.png|Bottom bar microphone on icon.|
|
|
407
|
+
|/static/images/room/room_mic_off.png|Bottom bar microphone off icon.|
|
|
408
|
+
|/static/images/room/room_camera_on.png|Bottom bar camera on icon.|
|
|
409
|
+
|/static/images/room/room_camera_off.png|Bottom bar camera off icon.|
|
|
410
|
+
|
|
411
|
+
User status info in the video stream area:
|
|
412
|
+
|
|
413
|
+
|Icon path|Detailed description|
|
|
414
|
+
|---------|---------|
|
|
415
|
+
|/static/images/room/room_video_view_mic_on.png|Video stream user microphone on icon.|
|
|
416
|
+
|/static/images/room/room_video_view_mic_off.png|Video stream user microphone off icon.|
|
|
417
|
+
|/static/images/room/room_video_view_owner.png|Video stream user host role icon.|
|
|
418
|
+
|/static/images/room/room_video_view_admin.png|Bottom bar administrator role icon.|
|
|
419
|
+
|
|
420
|
+
### Setting the font size / color
|
|
421
|
+
|
|
422
|
+
The uni-app official docs restrict setting the font size and color of an **nvue** page to the `text` tag only. For the text you want to modify, just modify its `css` style directly. Example below.
|
|
423
|
+
|
|
424
|
+
Take the text "Unmute" as an example:
|
|
425
|
+
``` typescript
|
|
426
|
+
<template>
|
|
427
|
+
<text class="bottom-text">Unmute</text>
|
|
428
|
+
</template>
|
|
429
|
+
|
|
430
|
+
<style>
|
|
431
|
+
.bottom-text {
|
|
432
|
+
color: #FFFFFF;
|
|
433
|
+
font-size: 20rpx;
|
|
434
|
+
margin-top: 6rpx;
|
|
435
|
+
text-overflow: ellipsis;
|
|
436
|
+
}
|
|
437
|
+
</style>
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
Modify its css style:
|
|
441
|
+
``` typescript
|
|
442
|
+
<template>
|
|
443
|
+
<text class="bottom-text">Enable audio</text>
|
|
444
|
+
</template>
|
|
445
|
+
|
|
446
|
+
<style>
|
|
447
|
+
.bottom-text {
|
|
448
|
+
color: red;
|
|
449
|
+
font-size: 24rpx;
|
|
450
|
+
margin-top: 6rpx;
|
|
451
|
+
text-overflow: ellipsis;
|
|
452
|
+
}
|
|
453
|
+
</style>
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Final effect:
|
|
458
|
+
|
|
459
|
+
### Setting the button size
|
|
460
|
+
|
|
461
|
+
You can also set the button size directly by modifying the `css` properties. Example below:
|
|
462
|
+
|
|
463
|
+
Take the microphone button in the bottom bar as an example:
|
|
464
|
+
``` typescript
|
|
465
|
+
<template>
|
|
466
|
+
<image class="bottom-icon" src="/static/images/room/room_mic_on.png" mode="aspectFit"/>
|
|
467
|
+
<text class="bottom-text">Unmute</text>
|
|
468
|
+
</template>
|
|
469
|
+
|
|
470
|
+
<style>
|
|
471
|
+
.bottom-icon {
|
|
472
|
+
width: 48rpx;
|
|
473
|
+
height: 48rpx;
|
|
474
|
+
}
|
|
475
|
+
</style>
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Set the corresponding `css` properties:
|
|
479
|
+
``` typescript
|
|
480
|
+
<template>
|
|
481
|
+
<image class="bottom-icon" src="/static/images/room/room_mic_off.png" mode="aspectFit"/>
|
|
482
|
+
<text class="bottom-text">Unmute</text>
|
|
483
|
+
</template>
|
|
484
|
+
|
|
485
|
+
<style>
|
|
486
|
+
.bottom-icon {
|
|
487
|
+
width: 70rpx;
|
|
488
|
+
height: 70rpx;
|
|
489
|
+
}
|
|
490
|
+
</style>
|
|
491
|
+
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
Final effect:
|
|
495
|
+
|
|
496
|
+
### Hiding a button
|
|
497
|
+
|
|
498
|
+
You can hide a button directly by commenting out the code. Example below.
|
|
499
|
+
|
|
500
|
+
Take the microphone button in the bottom bar as an example:
|
|
501
|
+
``` typescript
|
|
502
|
+
<!-- Bottom bar -->
|
|
503
|
+
<view class="bottom-bar">
|
|
504
|
+
<MembersButton />
|
|
505
|
+
<!-- <MicButton /> --> <!-- Hide the microphone icon -->
|
|
506
|
+
<CameraButton />
|
|
507
|
+
</view>
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Comment it out to hide the button.
|
|
511
|
+
|
|
512
|
+
### Adding a button
|
|
513
|
+
|
|
514
|
+
Insert the corresponding button implementation where you need to add it.
|
|
515
|
+
|
|
516
|
+
Take adding a "More" button to the bottom bar as an example:
|
|
517
|
+
``` typescript
|
|
518
|
+
<template>
|
|
519
|
+
......
|
|
520
|
+
<!-- Bottom bar -->
|
|
521
|
+
<view class="bottom-bar">
|
|
522
|
+
......
|
|
523
|
+
<view class="action-button-item">
|
|
524
|
+
<image class="bottom-icon" src="/static/images/more.png" mode="aspectFit" />
|
|
525
|
+
<text class="bottom-text">More</text>
|
|
526
|
+
</view>
|
|
527
|
+
</view>
|
|
528
|
+
</template>
|
|
529
|
+
|
|
530
|
+
<style>
|
|
531
|
+
.bottom-icon {
|
|
532
|
+
width: 48rpx;
|
|
533
|
+
height: 48rpx;
|
|
534
|
+
}
|
|
535
|
+
.bottom-text {
|
|
536
|
+
color: #FFFFFF;
|
|
537
|
+
font-size: 20rpx;
|
|
538
|
+
margin-top: 6rpx;
|
|
539
|
+
text-overflow: ellipsis;
|
|
540
|
+
text-align: center;
|
|
541
|
+
}
|
|
542
|
+
</style>
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
## FAQs
|
|
546
|
+
|
|
547
|
+
#### **Q: Does this TUIKit plugin support compiling to H5 or WeChat Mini Program?**
|
|
548
|
+
|
|
549
|
+
A: **No.** Because the new TUIKit is developed based on the **UTS (Uni-app Type Script)** plugin architecture and deeply relies on the native capabilities of Android and iOS (such as the native rendering engine, local database, and audio/video codecs), it can only be packaged as an **App (Android/iOS)**.
|
|
550
|
+
|
|
551
|
+
#### **Q: My existing project is all** `.vue` **pages (Webview rendering). Can I integrate it directly?**
|
|
552
|
+
|
|
553
|
+
A: **You can mix them, but you need to pay attention to the page mode.**
|
|
554
|
+
|
|
555
|
+
nvue pages and vue pages can navigate to each other, but it is not recommended that a vue page's sub-component be an nvue component. TUIKit's UI components are nvue components, so the **page (pages)** where TUIKit is used must also be an nvue file.
|
|
556
|
+
|
|
557
|
+
#### **Q: Page styles are messed up and the layout collapses?**
|
|
558
|
+
|
|
559
|
+
A: **You did not strictly follow the nvue Flex layout specification.**
|
|
560
|
+
|
|
561
|
+
In nvue pages:
|
|
562
|
+
- The default `flex-direction` is `column` (vertical), not `row` as on the Web.
|
|
563
|
+
|
|
564
|
+
- Text must be wrapped in a `<text>` component and cannot be written directly in a `<div>` or `<view>`.
|
|
565
|
+
|
|
566
|
+
- Shorthand properties (e.g. `margin: 10px 20px`) are not supported; they must be written out fully (`margin-top`, `margin-left`, etc.).
|
|
567
|
+
|
|
568
|
+
#### **Q:** Running reports the error "uni is not defined" or a component cannot be loaded?
|
|
569
|
+
|
|
570
|
+
A: Please check whether you have created and used a **custom debugging base**.
|
|
571
|
+
|
|
572
|
+
Because the plugin contains native code (Java/Objective-C), the standard base does not include these native libraries.
|
|
573
|
+
- **Solution:** Please strictly follow the "Run and test - Step 2" in the documentation. In HBuilderX, click **Run** > **Run to phone or emulator** > **Create custom debugging base**. After it is created, when running, be sure to select **Run to Android/iOS base** and check "Use custom base".
|
|
574
|
+
|
|
575
|
+
#### **Q: What should I do if creating the custom base keeps failing or hanging?**
|
|
576
|
+
|
|
577
|
+
A: This is usually caused by a configuration issue in the local native compilation environment (Gradle or CocoaPods).
|
|
578
|
+
- **Android:** Please check whether the local JDK version is compatible, and whether the network can access the Maven/Google repositories normally.
|
|
579
|
+
|
|
580
|
+
- **iOS:** Please make sure CocoaPods is installed and up to date, and check whether the network environment can access GitHub or CDN libraries.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
TUIRoomKit has a built-in AI meeting assistant that provides intelligent AI assistance for online meetings. The meeting UI provides an AI meeting assistant entry button by default, through which users can use the following core features:
|
|
2
|
+
- **AI real-time captions:** During a meeting, the spoken discussion is converted into text captions in real time and displayed on the screen, assisting communication and understanding.
|
|
3
|
+
|
|
4
|
+
- **AI real-time translation:** After AI real-time captions are enabled, real-time translation is enabled synchronously by default. The room owner can set the translation language and the specific supported languages.
|
|
5
|
+
|
|
6
|
+
- **AI real-time meeting minutes:** During a meeting, the spoken discussion is continuously transcribed into text minutes, making it easy to organize and review after the meeting.
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
### 1. Enable the intelligent speech service
|
|
11
|
+
|
|
12
|
+
Using AI features incurs costs. For billing rules.
|
|
13
|
+
|
|
14
|
+
### 2. Basic environment integration
|
|
15
|
+
|
|
16
|
+
Refer to [Quick Integration](https://cloud.tencent.com/document/product/647/81962) to integrate `@tencentcloud/roomkit-web-vue3` into your project, and make sure the version is `≥ 5.1.2`.
|
|
17
|
+
|
|
18
|
+
## Showing or hiding the AI meeting assistant
|
|
19
|
+
|
|
20
|
+
The AI meeting assistant entry button is displayed on the meeting UI by default and can be used without any extra configuration. To hide or re-display the button, you can call the `conference.setWidgetVisible` interface to control the visibility of the `AIToolsWidget` component.
|
|
21
|
+
|
|
22
|
+
> **Note:**
|
|
23
|
+
> Showing the entry button does not automatically start a transcription task. The AI transcription task is started internally only after the room owner actively clicks "AI real-time captions" or "AI real-time meeting minutes".
|
|
24
|
+
>
|
|
25
|
+
|
|
26
|
+
``` typescript
|
|
27
|
+
<template>
|
|
28
|
+
<ConferenceMainView />
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import { conference, BuiltinWidget } from '@tencentcloud/roomkit-web-vue3';
|
|
33
|
+
|
|
34
|
+
// The AI meeting assistant entry button is displayed by default; to hide it, set its visibility to false
|
|
35
|
+
conference.setWidgetVisible({ [BuiltinWidget.AIToolsWidget]: false });
|
|
36
|
+
</script>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Disabling the AI meeting assistant
|
|
40
|
+
|
|
41
|
+
When using the **AI meeting assistant** component, developers do not need to manually stop the AI transcription task. The component has an automatic cleanup mechanism built in:
|
|
42
|
+
- **When exiting the room**: The AI transcription task is stopped automatically.
|
|
43
|
+
|
|
44
|
+
- **Resource release**: Related memory resources are cleaned up automatically.
|
|
45
|
+
|
|
46
|
+
## Development notes
|
|
47
|
+
- **Version dependency**: The AI meeting assistant feature requires `@tencentcloud/roomkit-web-vue3` version ≥ 5.1.2. Make sure you have installed a version that meets the requirement.
|
|
48
|
+
|
|
49
|
+
- **Call timing:** The entry button is displayed by default and requires no extra configuration. If you need to adjust the button's display state through `conference.setWidgetVisible`, make sure the code runs before `ConferenceMainView` is loaded.
|
|
50
|
+
|
|
51
|
+
- **Billing logic:** The AI transcription task is actively started by the room owner. It is billed only once per room, and ordinary members using it will not be billed repeatedly.
|
|
52
|
+
|
|
53
|
+
- **Network requirements:** AI recognition relies on a stable uplink network. Network jitter may cause captions to be delayed or lost.
|
|
54
|
+
|
|
55
|
+
## FAQs
|
|
56
|
+
|
|
57
|
+
### The "AI meeting assistant" button does not appear on the meeting UI?
|
|
58
|
+
|
|
59
|
+
**Problem description:** TUIRoomKit is integrated, but the "AI meeting assistant" button does not appear on the meeting UI.
|
|
60
|
+
|
|
61
|
+
**Solution:** The AI meeting assistant entry button is displayed by default. If it does not appear, check the following in order: 1. Whether `conference.setWidgetVisible` was called to set `AIToolsWidget` to `false`; 2. Whether the current room is a live (Webinar) room, in which case the button is not shown; 3. Whether the `@tencentcloud/roomkit-web-vue3` version meets the requirement.
|
|
62
|
+
|
|
63
|
+
### Can all members in the room use AI features?
|
|
64
|
+
|
|
65
|
+
**Feature description**: Only the room owner can start a transcription task. After the room owner clicks to start an AI transcription task, all members in the room can use AI real-time captions and meeting minutes.
|
|
66
|
+
|
|
67
|
+
### Will AI features incur duplicate billing?
|
|
68
|
+
|
|
69
|
+
**Billing description**: No duplicate billing occurs. A transcription task is started only once by the room owner, so each meeting room is billed only once. If the room owner does not start a transcription task, no transcription is started and no related cost is incurred.
|