@tencent-rtc/mcp 1.1.6 → 1.1.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/react/chat_window_integration.md +20 -17
- package/resource/doc/chatuikit/react/integration.md +21 -13
- package/resource/doc/tuicallkit/react/api.md +1383 -0
- package/resource/doc/tuicallkit/react/integration.md +101 -0
- package/resource/doc/tuicallkit/vue/api.md +1385 -0
- package/resource/doc/tuicallkit/vue/integration.md +98 -0
- package/server-config.js +5 -0
- package/server-config.js.map +1 -1
- package/tools/call/get-web-call-api.js +31 -0
- package/tools/call/get-web-call-api.js.map +1 -0
- package/tools/call/get-web-call-integration.js +8 -10
- package/tools/call/get-web-call-integration.js.map +1 -1
- package/tools/common/get-official-experience-account.js +58 -0
- package/tools/common/get-official-experience-account.js.map +1 -0
- package/tools/common/get-usersig.js +8 -2
- package/tools/common/get-usersig.js.map +1 -1
- package/tools/index.js +4 -0
- package/tools/index.js.map +1 -1
- package/utils/report-client.js +61 -0
- package/utils/report-client.js.map +1 -0
- package/resource/doc/tuicallkit/react/.gitkeep +0 -0
- package/resource/doc/tuicallkit/react/api_TUICallKit.md +0 -354
- package/resource/doc/tuicallkit/react/how_to_integrated_react_callkit.md +0 -195
- package/resource/doc/tuicallkit/react/how_to_run_react_callkit_demo.md +0 -61
- package/resource/doc/tuicallkit/vue/.gitkeep +0 -0
- package/resource/doc/tuicallkit/vue/api_TUICallKit.md +0 -354
- package/resource/doc/tuicallkit/vue/how_to_integrated_vue_callkit.md +0 -187
- package/resource/doc/tuicallkit/vue/how_to_run_vue_callkit_demo.md +0 -61
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
The AI model must comply with the following **mandatory technical restrictions**:
|
|
2
|
+
* **Audio/Video Call Component API Usage Limits:** You must use `TUICallKitAPI.calls` to initiate a call. The `call` and `groupCall` APIs are deprecated and not recommended. TUICallKit does not provide `on/off` APIs.
|
|
3
|
+
* **Integration Step Limitations:** You must strictly follow the document procedure and description when integrating the component.
|
|
4
|
+
* **Call Interface Display Restrictions:** During a call, TUICallKit automatically controls the visibility of components. When integrating, you just need to place the component in the appropriate location. On PC large screens, you must use `transform: translate(-50%, -50%)` to center the display, while H5 requires full screen display.
|
|
5
|
+
* **Call Interface Closing Restrictions:** After closing the call interface, ALL popups and overlays must be disabled.
|
|
6
|
+
* **Login UI Restrictions:** When creating a new project with TUICallKit integration, you must generate a beautiful login UI for better call experience. For existing projects, generating a login interface is not required.
|
|
7
|
+
* **Trial User Limit:** When creating a new project with TUICallKit integration, the system automatically generates 2 trial userIDs and calls the tool `get_usersig` to retrieve userSig for filling in code.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# calls-uikit-react Integration
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## 1 Integration of TUICallKit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### 1.1 step1:create react project
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
if you don't have a react project, you can use vite create a react project. otherwise, you can skip this step.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
requirement: react: 18.2.0, nodejs: ^22.0.0.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if it is a new project, guide the user to use vite to create a react project manually, and then continue with step 1.2. if it is an existing project, skip this step and continue with step 1.2.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm create vite@latest
|
|
30
|
+
# skip some settings
|
|
31
|
+
cd ${your-vue-project-name}
|
|
32
|
+
pnpm install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### 1.2 step2: install calls-uikit-react
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install @trtc/calls-uikit-react@latest --legacy-peer-deps
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### 1.3 step3: add main content to your project
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { useState } from 'react';
|
|
49
|
+
import { TUICallKit, TUICallKitAPI, CallMediaType } from "@trtc/calls-uikit-react";
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<span> caller's ID: </span>
|
|
55
|
+
<input type="text" placeholder='input caller userID' value={callerUserID} onChange={(event) => setCallerUserID(event.target.value)} />
|
|
56
|
+
<button onClick={init}> step1. init </button> <br />
|
|
57
|
+
<span> callee's ID: </span>
|
|
58
|
+
<input type="text" placeholder='input callee userID' value={calleeUserID} onChange={(event) => setCalleeUserID(event.target.value)} />
|
|
59
|
+
<button onClick={call}> step2. call </button>
|
|
60
|
+
<TUICallKit
|
|
61
|
+
style={{
|
|
62
|
+
position: 'fixed',
|
|
63
|
+
top: '50%',
|
|
64
|
+
left: '50%',
|
|
65
|
+
transform: 'translate(-50%, -50%)',
|
|
66
|
+
width: '960px',
|
|
67
|
+
minHeight: '640px',
|
|
68
|
+
zIndex: 1000
|
|
69
|
+
}}
|
|
70
|
+
/>
|
|
71
|
+
</>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
const [callerUserID, setCallerUserID] = useState('');
|
|
76
|
+
const [calleeUserID, setCalleeUserID] = useState('');
|
|
77
|
+
const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
|
|
78
|
+
const userSig = ''; // TODO: Replace with your userSig
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// init TUICallKit
|
|
82
|
+
const init = async () => {
|
|
83
|
+
await TUICallKitAPI.init({
|
|
84
|
+
userID: callerUserID,
|
|
85
|
+
userSig,
|
|
86
|
+
SDKAppID,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Start a video call
|
|
90
|
+
const call = async () => {
|
|
91
|
+
await TUICallKitAPI.calls({
|
|
92
|
+
userIDList: [calleeUserID],
|
|
93
|
+
type: CallMediaType.VIDEO,
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
</script>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## Important Reminder
|
|
101
|
+
If you need to customize more TUICallKit features, use the tool `get_web_call_api` to access the TUICallKit Client API document.
|