@tencent-rtc/mcp 1.7.2 → 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 +13 -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/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,196 @@
|
|
|
1
|
+
This document introduces how to use the Atomicx API to integrate whiteboard or screen sharing annotation into your own meeting UI.
|
|
2
|
+
|
|
3
|
+
First, choose the feature you want to implement:
|
|
4
|
+
|
|
5
|
+
|Goal|Do you need to start screen sharing first|Integration order|
|
|
6
|
+
|---------|---------|---------|
|
|
7
|
+
|Whiteboard: Write on a blank canvas|No|Once the display area is ready, call `startWhiteboard`|
|
|
8
|
+
|Screen sharing annotation: Annotate on the screen sharing view|Yes|Call `startScreenShare` first, then call `startWhiteboard`|
|
|
9
|
+
|
|
10
|
+
> **Note:**
|
|
11
|
+
> **To integrate screen sharing annotation, you do not need to integrate the standalone whiteboard first.** Both features use `startWhiteboard` to create the drawing layer, but their integration flows are independent of each other. Choose one according to your business goal.
|
|
12
|
+
>
|
|
13
|
+
|
|
14
|
+
## Preparation
|
|
15
|
+
|
|
16
|
+
Before you start, please confirm:
|
|
17
|
+
- User state: The user has completed login authentication through `useLoginState` (see Integration overview) and is already in a room as the owner or a member of that room (see Room management).
|
|
18
|
+
|
|
19
|
+
- Environment dependency: The project has correctly installed and imported `tuikit-atomicx-vue3` (Vue 3), version `6.1.0` or later.
|
|
20
|
+
|
|
21
|
+
- Use the latest stable versions of Chrome and Edge on Windows or macOS desktops.
|
|
22
|
+
|
|
23
|
+
The "display area" in the code in this document is a `<div>` on the page used to display the whiteboard or shared view. After setting its `id`, pass that `id` to the API. It determines both where the content is displayed and the display size, and you do not need to understand the internal implementation of the whiteboard.
|
|
24
|
+
|
|
25
|
+
## Integrating the whiteboard
|
|
26
|
+
|
|
27
|
+
The whiteboard does not depend on screen sharing. Prepare a display area, and when the user clicks "Open whiteboard", pass its `id` to `startWhiteboard`:
|
|
28
|
+
``` typescript
|
|
29
|
+
<template>
|
|
30
|
+
<button @click="openWhiteboard">Open whiteboard</button>
|
|
31
|
+
<div id="whiteboard-view" class="content-view" />
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { useWhiteboardState } from 'tuikit-atomicx-vue3/room';
|
|
36
|
+
|
|
37
|
+
const { startWhiteboard } = useWhiteboardState();
|
|
38
|
+
|
|
39
|
+
async function openWhiteboard() {
|
|
40
|
+
await startWhiteboard({
|
|
41
|
+
view: 'whiteboard-view',
|
|
42
|
+
canvasColor: '#FFFFFF',
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style scoped>
|
|
48
|
+
.content-view {
|
|
49
|
+
position: relative;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 600px;
|
|
52
|
+
background: #fff;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
After the call succeeds, the current user can draw in that area, and other members in the room will see the whiteboard view in real time.
|
|
58
|
+
|
|
59
|
+
## Integrating screen sharing annotation
|
|
60
|
+
|
|
61
|
+
Screen sharing annotation adds a transparent drawing layer on top of the shared view. The whole flow has only two steps:
|
|
62
|
+
1. Display the screen sharing view in a `<div>` on the page.
|
|
63
|
+
|
|
64
|
+
2. Pass the `id` of the same `<div>` to `startWhiteboard` so that the strokes overlay the shared view.
|
|
65
|
+
|
|
66
|
+
The following example provides two buttons, "Start sharing" and "Start annotation":
|
|
67
|
+
|
|
68
|
+
``` typescript
|
|
69
|
+
<template>
|
|
70
|
+
<button @click="shareScreen">Start sharing</button>
|
|
71
|
+
<button @click="openAnnotation">Start annotation</button>
|
|
72
|
+
<div id="screen-share-view" class="content-view" />
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script setup lang="ts">
|
|
76
|
+
import {
|
|
77
|
+
DeviceStatus,
|
|
78
|
+
useDeviceState,
|
|
79
|
+
useWhiteboardState,
|
|
80
|
+
} from 'tuikit-atomicx-vue3/room';
|
|
81
|
+
|
|
82
|
+
const { screenStatus, startScreenShare } = useDeviceState();
|
|
83
|
+
const { startWhiteboard } = useWhiteboardState();
|
|
84
|
+
|
|
85
|
+
async function shareScreen() {
|
|
86
|
+
await startScreenShare({
|
|
87
|
+
screenAudio: true,
|
|
88
|
+
view: 'screen-share-view',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async function openAnnotation() {
|
|
93
|
+
if (screenStatus.value !== DeviceStatus.On) {
|
|
94
|
+
throw new Error('Please start screen sharing first');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
await startWhiteboard({
|
|
98
|
+
view: 'screen-share-view',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style scoped>
|
|
104
|
+
.content-view {
|
|
105
|
+
position: relative;
|
|
106
|
+
width: 100%;
|
|
107
|
+
height: 600px;
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Adding drawing tools
|
|
113
|
+
|
|
114
|
+
The whiteboard and screen sharing annotation use the same set of tool APIs. Just connect the methods below to your toolbar buttons:
|
|
115
|
+
``` typescript
|
|
116
|
+
import {
|
|
117
|
+
useWhiteboardState,
|
|
118
|
+
WhiteboardTool,
|
|
119
|
+
} from 'tuikit-atomicx-vue3/room';
|
|
120
|
+
|
|
121
|
+
const {
|
|
122
|
+
setToolConfig,
|
|
123
|
+
undo,
|
|
124
|
+
redo,
|
|
125
|
+
clear,
|
|
126
|
+
snapshot,
|
|
127
|
+
} = useWhiteboardState();
|
|
128
|
+
|
|
129
|
+
// Pen
|
|
130
|
+
setToolConfig({
|
|
131
|
+
tool: WhiteboardTool.Pen,
|
|
132
|
+
color: '#006EFF',
|
|
133
|
+
lineWidth: 4,
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Rectangle
|
|
137
|
+
setToolConfig({
|
|
138
|
+
tool: WhiteboardTool.Shape,
|
|
139
|
+
shapeType: 'rect',
|
|
140
|
+
color: '#006EFF',
|
|
141
|
+
lineWidth: 4,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
await undo(); // Undo
|
|
145
|
+
await redo(); // Redo
|
|
146
|
+
await clear(); // Clear
|
|
147
|
+
const image = await snapshot();
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The available tools include:
|
|
151
|
+
|
|
152
|
+
|Tool|Enum value|Purpose|
|
|
153
|
+
|---------|---------|---------|
|
|
154
|
+
|Select|`WhiteboardTool.None`|Stop drawing.|
|
|
155
|
+
|Pen|`WhiteboardTool.Pen`|Free-form writing.|
|
|
156
|
+
|Laser pointer|`WhiteboardTool.Laser`|Disappears automatically after a short stay.|
|
|
157
|
+
|Shape|`WhiteboardTool.Shape`|Draw a rectangle or ellipse through `shapeType`.|
|
|
158
|
+
|Arrow|`WhiteboardTool.Arrow`|Mark a direction or key point.|
|
|
159
|
+
|Eraser|`WhiteboardTool.EraserObject`|Erase graphic objects.|
|
|
160
|
+
|
|
161
|
+
When drawing a shape, set `shapeType` in the same configuration object: `rect` for a rectangle and `ellipse` for an ellipse.
|
|
162
|
+
|
|
163
|
+
## Hiding the whiteboard and annotation entries
|
|
164
|
+
|
|
165
|
+
When closing the whiteboard or annotation, call `stopWhiteboard`:
|
|
166
|
+
``` typescript
|
|
167
|
+
const { stopWhiteboard } = useWhiteboardState();
|
|
168
|
+
|
|
169
|
+
stopWhiteboard();
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Updating the whiteboard display area
|
|
173
|
+
|
|
174
|
+
When you need to switch the whiteboard to another display area, you can call `updateWhiteboard` and pass in the new element id.
|
|
175
|
+
``` typescript
|
|
176
|
+
const { updateWhiteboard } = useWhiteboardState();
|
|
177
|
+
|
|
178
|
+
updateWhiteboard({ view: 'whiteboard-new-view' });
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Scope of use
|
|
182
|
+
- Does not yet support mobile browsers and webinar (Webinar) rooms.
|
|
183
|
+
|
|
184
|
+
- Currently, the initiator draws while other members watch in real time; simultaneous drawing by multiple people is not yet supported.
|
|
185
|
+
|
|
186
|
+
- The whiteboard and regular screen sharing use the same sharing channel and cannot be enabled at the same time.
|
|
187
|
+
|
|
188
|
+
## FAQs
|
|
189
|
+
|
|
190
|
+
### Why is no content displayed on the page after calling `startWhiteboard`?
|
|
191
|
+
|
|
192
|
+
Please confirm that when calling it you passed the `id` of the display area through `view`, and that the corresponding `<div>` exists on the page. If the element is mounted later, call `updateWhiteboard({ view })` after the whiteboard is started.
|
|
193
|
+
|
|
194
|
+
### Can the whiteboard and regular screen sharing be enabled at the same time?
|
|
195
|
+
|
|
196
|
+
No. The whiteboard and regular screen sharing use the same sharing channel; screen sharing annotation, on the other hand, overlays a drawing layer on top of the screen sharing view, which is a supported combination.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
## Client error codes
|
|
2
|
+
|
|
3
|
+
### Common error codes
|
|
4
|
+
| Error code | Description |
|
|
5
|
+
| --- | --- |
|
|
6
|
+
| 0 | Operation succeeded |
|
|
7
|
+
| -1 | Uncategorized common error |
|
|
8
|
+
| -2 | The request was rate-limited, please retry later |
|
|
9
|
+
| -1000 | SDKAppID not found, please confirm the application information in the <a href="https://console.cloud.tencent.com/vcube/project/manage">Tencent Cloud VCube SDK console</a> |
|
|
10
|
+
| -1001 | An invalid parameter was passed when calling the API, check whether the input parameters are valid |
|
|
11
|
+
| -1002 | Not logged in, please call the Login interface |
|
|
12
|
+
| -1003 | Failed to obtain permission, the audio/video permission is currently not authorized, check whether the device permission is enabled |
|
|
13
|
+
| -1004 | This feature requires an additional package, please enable the corresponding package as needed in the <a href="https://console.cloud.tencent.com/vcube/project/manage">Tencent Cloud VCube SDK console</a> |
|
|
14
|
+
|
|
15
|
+
### Error definitions for local user rendering, video management, and audio management API callbacks
|
|
16
|
+
| Error code | Description |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| -1100 | System problem, failed to open the camera. Check whether the camera device is working properly |
|
|
19
|
+
| -1101 | The camera is not authorized by the system, check the system authorization |
|
|
20
|
+
| -1102 | The camera is occupied, check whether another process is using the camera |
|
|
21
|
+
| -1103 | There is currently no camera device, please plug in a camera device to resolve this problem |
|
|
22
|
+
| -1104 | System problem, failed to open the microphone. Check whether the microphone device is working properly |
|
|
23
|
+
| -1105 | The microphone is not authorized by the system, check the system authorization |
|
|
24
|
+
| -1106 | The microphone is occupied |
|
|
25
|
+
| -1107 | There is currently no microphone device |
|
|
26
|
+
| -1108 | Failed to obtain the screen sharing object, check the screen recording permission |
|
|
27
|
+
| -1109 | Failed to start screen sharing, check whether someone in the room is already sharing their screen |
|
|
28
|
+
|
|
29
|
+
### Error definitions for room management related API callbacks
|
|
30
|
+
| Error code | Description |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| -2100 | The room does not exist when entering, or it may have been dismissed |
|
|
33
|
+
| -2101 | You must enter the room before using this feature |
|
|
34
|
+
| -2102 | The room owner does not support the exit-room operation. Conference room type: you can transfer ownership first, then exit. LivingRoom (live) room type: the room owner can only dismiss the room |
|
|
35
|
+
| -2103 | This operation is not supported for the current room type |
|
|
36
|
+
| -2104 | This operation is not supported in the current speaking mode |
|
|
37
|
+
| -2105 | Illegal room ID for creating a room, a custom ID must be printable ASCII characters (0x20-0x7e), up to 48 bytes |
|
|
38
|
+
| -2106 | The room ID is already in use, please choose another room ID |
|
|
39
|
+
| -2107 | Illegal room name, the name is up to 30 bytes, the character encoding must be UTF-8, if it contains Chinese |
|
|
40
|
+
| -2108 | The current user is already in another room. A single roomEngine instance only supports the user entering one room. To enter a different room, exit first or use a new roomEngine instance |
|
|
41
|
+
|
|
42
|
+
### Error definitions for in-room user information API callbacks
|
|
43
|
+
| Error code | Description |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| -2200 | The user was not found |
|
|
46
|
+
| -2201 | The user was not found in the room |
|
|
47
|
+
|
|
48
|
+
### Error definitions for in-room user speaking management API callbacks & in-room seat management API callbacks
|
|
49
|
+
| Error code | Description |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| -2300 | Room owner permission is required to operate |
|
|
52
|
+
| -2301 | Room owner or administrator permission is required to operate |
|
|
53
|
+
| -2310 | No permission for the signaling request, e.g. canceling an invitation not initiated by yourself. |
|
|
54
|
+
| -2311 | The signaling request ID is invalid or has already been processed. |
|
|
55
|
+
| -2340 | The maximum number of seats exceeds the package limit |
|
|
56
|
+
| -2341 | The current user is already on a seat |
|
|
57
|
+
| -2342 | The current seat is already occupied |
|
|
58
|
+
| -2343 | The current seat is locked |
|
|
59
|
+
| -2344 | The seat number does not exist |
|
|
60
|
+
| -2345 | The current user is not on a seat |
|
|
61
|
+
| -2346 | The number of people on seats is full |
|
|
62
|
+
| -2360 | The audio of the current seat is locked |
|
|
63
|
+
| -2361 | You need to apply to the room owner or administrator to turn on the microphone |
|
|
64
|
+
| -2370 | The video of the current seat is locked, the camera can be turned on only after the room owner unlocks the seat |
|
|
65
|
+
| -2371 | You need to apply to the room owner or administrator to turn on the camera |
|
|
66
|
+
| -2380 | The current room has enabled mute all |
|
|
67
|
+
| -2381 | You have been muted in the current room |
|
|
68
|
+
|
|
69
|
+
## Server error codes
|
|
70
|
+
| Error code | Description |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| 83007 | The request was rate-limited |
|
|
73
|
+
| 84002 | The room does not exist |
|
|
74
|
+
| 84003 | The number of people in the room has exceeded the maximum package limit |
|
|
75
|
+
| 84004 | The user does not exist in the room |
|
|
76
|
+
| 84005 | The room already exists |
|
|
77
|
+
| 84006 | The room owner cannot exit the room |
|
|
78
|
+
| 85001 | The seats are full |
|
|
79
|
+
| 85002 | The seat is locked |
|
|
80
|
+
| 85003 | The user is already on a seat |
|
|
81
|
+
| 85004 | The seat is in use |
|
|
82
|
+
| 85005 | The seat number does not exist |
|
|
83
|
+
| 85006 | The seat audio is locked |
|
|
84
|
+
| 85007 | The seat video is locked |
|
|
85
|
+
| 85008 | Seats cannot be used in non-live scenarios |
|
|
86
|
+
| 87001 | Modifying member identity or room information is not allowed |
|
|
87
|
+
| 87002 | Insufficient permission, room owner or administrator identity is required |
|
|
88
|
+
| 87003 | IM group attribute update error |
|
|
89
|
+
| 87005 | IM group attribute retrieval exception |
|
|
90
|
+
| 87006 | Insufficient permission, only the room owner can operate |
|
|
91
|
+
| 87007 | Insufficient permission, only an administrator can operate |
|
|
92
|
+
| 87008 | Destroying the IM room is not allowed |
|
|
93
|
+
| 41001 | Error creating the IM group |
|
|
94
|
+
| 41002 | Error destroying the IM group |
|
|
95
|
+
| 41003 | Error adding an IM member |
|
|
96
|
+
| 41004 | Error deleting an IM member |
|
|
97
|
+
| 41005 | IM role change error |
|
|
98
|
+
| 42001 | Error scheduling the meeting |
|
|
99
|
+
| 42002 | Invalid scheduled meeting |
|
|
100
|
+
| 42003 | A scheduled meeting must be a conference scenario |
|
|
101
|
+
| 42004 | The scheduled meeting has not started |
|
|
102
|
+
| 42005 | The scheduled meeting has already started |
|
|
103
|
+
| 42006 | Too many invited members for the scheduled meeting, exceeding the count limit |
|