@tencent-rtc/mcp 1.6.8 → 1.7.1
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 +36 -0
- package/README.md +58 -39
- package/knowledge/build-index.js +30 -6
- package/knowledge/chunker.js +82 -14
- package/knowledge/chunking-policy.js +100 -0
- package/knowledge/content-loader.js +3 -3
- package/knowledge/doc-url-resolver.js +43 -16
- package/knowledge/frontmatter-meta.js +167 -0
- package/knowledge/path-meta.js +28 -6
- package/knowledge/search/exact-lookup.js +120 -239
- package/knowledge/search/filter-pool.js +12 -29
- package/knowledge/search/framework-fallback.js +22 -0
- package/knowledge/search/intent-router.js +29 -0
- package/knowledge/search/l1-enrich.js +159 -0
- package/knowledge/search/query-normalizer.js +63 -3
- package/knowledge/search/search-core.js +410 -0
- package/knowledge/search/search-knowledge.js +421 -379
- package/knowledge/search/search-message.js +88 -0
- package/knowledge/search/search-pass.js +428 -0
- package/knowledge/search/search-types.js +1 -0
- package/knowledge/search/url-row-idf.js +120 -0
- package/knowledge/search/url-row-scorer.js +337 -0
- package/package.json +3 -1
- package/resource/_schema/feature-aliases.yaml +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/knowledge/callkit/best-practice/callkit-miniprogram/uniapp-shrink.md +60 -0
- package/resource/knowledge/callkit/best-practice/common/call-autoplay-blocked.md +77 -0
- package/resource/knowledge/callkit/best-practice/common/call-message-in-chat.md +78 -0
- package/resource/knowledge/callkit/best-practice/common/call-vs-calls.md +110 -0
- package/resource/knowledge/callkit/best-practice/common/callengine-call-flow.md +123 -0
- package/resource/knowledge/callkit/best-practice/common/callengine-log-level.md +67 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-get-engine-instance.md +81 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-get-roomid.md +78 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-limitations.md +37 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-user-register-and-kicked.md +98 -0
- package/resource/knowledge/chat/best-practice/common/avchatroom-message-loss-diagnosis.md +65 -0
- package/resource/knowledge/chat/best-practice/common/group-conversation-cleanup-on-system-notice.md +62 -0
- package/resource/knowledge/chat/best-practice/common/image-message-url-lifecycle.md +59 -0
- package/resource/knowledge/chat/best-practice/common/login-repeat-2025-diagnosis.md +61 -0
- package/resource/knowledge/chat/best-practice/common/message-read-report-and-receipt.md +64 -0
- package/resource/knowledge/chat/best-practice/common/message-receive-event.md +65 -0
- package/resource/knowledge/chat/best-practice/common/message-risk-error-and-render.md +65 -0
- package/resource/knowledge/chat/best-practice/common/message-unread-count.md +71 -0
- package/resource/knowledge/chat/best-practice/miniprogram/audio-message-send.md +113 -0
- package/resource/knowledge/chat/best-practice/miniprogram/login-timeout-2801-diagnosis.md +63 -0
- package/resource/knowledge/chat/best-practice/miniprogram/media-upload-fail-diagnosis.md +64 -0
- package/resource/knowledge/chat/best-practice/web/audio-message-send.md +118 -0
- package/resource/knowledge/chat/urls/product.md +17 -16
- package/resource/knowledge/chat/urls/restapi.md +3 -2
- package/resource/knowledge/chat/urls/sdk/android.md +6 -5
- package/resource/knowledge/chat/urls/sdk/flutter.md +6 -5
- package/resource/knowledge/chat/urls/sdk/ios.md +4 -3
- package/resource/knowledge/chat/urls/sdk/web.md +7 -6
- package/resource/knowledge/chat/urls/webhook.md +0 -5
- package/resource/knowledge/livekit/best-practice/android/voice-room-anchor-start.md +120 -0
- package/resource/knowledge/livekit/best-practice/common/admin-take-seat.md +73 -0
- package/resource/knowledge/livekit/best-practice/common/audience-leave-live.md +81 -0
- package/resource/knowledge/livekit/best-practice/common/voice-room-no-audio-troubleshoot.md +100 -0
- package/resource/knowledge/livekit/best-practice/common/voice-room-seat-list-change.md +65 -0
- package/resource/knowledge/livekit/best-practice/flutter/voice-room-anchor-start.md +122 -0
- package/resource/knowledge/livekit/best-practice/ios/voice-room-anchor-start.md +126 -0
- package/resource/knowledge/roomkit/best-practice/common/room-ghost-member.md +70 -0
- package/resource/knowledge/roomkit/best-practice/common/room-limit-and-multi.md +83 -0
- package/resource/knowledge/roomkit/best-practice/common/room-screen-share-preview.md +83 -0
- package/resource/knowledge/roomkit/best-practice/common/room-status-after-all-leave.md +69 -0
- package/resource/knowledge/roomkit/best-practice/vue/room-uikit-vs-atomicx.md +111 -0
- package/resource/knowledge/rtcengine/web/plugin/30-advanced-cross-room-link.md +2 -0
- package/resource/knowledge/rtcengine/web/plugin/39-advanced-video-decoder.md +2 -0
- package/server.js +28 -23
- package/streamable-http.js +19 -54
- package/tools/common/search_trtc_knowledge.js +24 -12
- package/tools/definitions/finalize_answer_def.js +2 -2
- package/tools/definitions/integration-boundary.js +2 -1
- package/tools/definitions/search_trtc_knowledge_def.js +5 -3
- package/utils/fetch-doc-content.js +198 -0
- package/utils/preflight-route.js +197 -0
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/cursor-setting.png +0 -0
- package/mcp-server-prompt.png +0 -0
- package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +0 -80
- package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +0 -24
- package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +0 -116
- package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +0 -444
- package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +0 -464
- package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +0 -16
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
product: 'Call'
|
|
3
|
-
tech_stack: 'callengine'
|
|
4
|
-
framework: 'web'
|
|
5
|
-
doc_kind: 'best_practice'
|
|
6
|
-
title: 'TUICallEngine call invitation handling and signaling (Web)'
|
|
7
|
-
keywords: ['ON_CALL_RECEIVED', 'call invitation', '@trtc/call-engine-lite-js', 'TUICallEngine.calls', 'userData', 'callMediaType', 'accept', 'reject', 'TIM.EVENT.MESSAGE_RECEIVED', 'custom signaling message']
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# TUICallEngine Web: call invitation reception and signaling notes
|
|
11
|
-
|
|
12
|
-
Applicable package: **`@trtc/call-engine-lite-js`** (TUICallEngine Web SDK).
|
|
13
|
-
|
|
14
|
-
## 1) How do I receive an incoming call invitation?
|
|
15
|
-
|
|
16
|
-
**At the application layer, listen to `TUICallEvent.ON_CALL_RECEIVED` instead of parsing TRTC signaling or IM custom messages yourself.**
|
|
17
|
-
|
|
18
|
-
```javascript
|
|
19
|
-
import { TUICallEngine, TUICallEvent } from '@trtc/call-engine-lite-js';
|
|
20
|
-
|
|
21
|
-
const tuiCallEngine = TUICallEngine.createInstance({ SDKAppID: xxx, tim: timInstance });
|
|
22
|
-
await tuiCallEngine.login({ userID, userSig });
|
|
23
|
-
|
|
24
|
-
tuiCallEngine.on(TUICallEvent.ON_CALL_RECEIVED, (event) => {
|
|
25
|
-
console.log('Incoming call', event);
|
|
26
|
-
// Show your incoming-call UI, then call accept() or reject()
|
|
27
|
-
});
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### `ON_CALL_RECEIVED` event fields
|
|
31
|
-
|
|
32
|
-
| Field | Type | Description |
|
|
33
|
-
|---------|---------|---------|
|
|
34
|
-
| callerId | String | The inviter (caller) user ID. |
|
|
35
|
-
| calleeIdList | Array<String> | Other invited users in the same invitation. |
|
|
36
|
-
| isFromGroup | Boolean | Whether this invitation is from a group call. |
|
|
37
|
-
| inviteData | Object | Invitation payload object. |
|
|
38
|
-
| inviteID | String | Invitation ID for this invitation session. |
|
|
39
|
-
| userData | String | Extension string passed through invitation signaling. |
|
|
40
|
-
| callId | String | Unique call ID of this session. |
|
|
41
|
-
| roomID | Number | Audio/video room ID used by this call. |
|
|
42
|
-
| callMediaType | Number | Call media type (audio or video). |
|
|
43
|
-
| callRole | String | Role enum (caller or callee). |
|
|
44
|
-
|
|
45
|
-
## 2) Which parameters are used when sending an invitation with `calls`?
|
|
46
|
-
|
|
47
|
-
The caller starts an invitation via **`TUICallEngine.calls()`**:
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
await tuiCallEngine.calls({
|
|
51
|
-
userIDList: ['user_bob'],
|
|
52
|
-
type: 2, // 1 = audio, 2 = video (CallMediaType)
|
|
53
|
-
userData: '{"ext":"info"}', // Optional string extension
|
|
54
|
-
timeout: 30, // Seconds, default is 30
|
|
55
|
-
roomID: 123456, // Numeric room ID, range [1, 2147483647]
|
|
56
|
-
strRoomID: '', // String room ID
|
|
57
|
-
chatGroupID: '', // Required for multi-user calls in a Chat group
|
|
58
|
-
offlinePushInfo: { /* ... */ },
|
|
59
|
-
});
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## 3) In Chat-integrated audio/video calls, how do I interpret custom message fields for call status rendering?
|
|
63
|
-
|
|
64
|
-
| **Question** | **Rule** |
|
|
65
|
-
|---------|---------|
|
|
66
|
-
| How to detect “call initiated” | `actionType = 1` and `cmd = 'videoCall'` or `'audioCall'` |
|
|
67
|
-
| How to detect “call answered” | `actionType = 3` |
|
|
68
|
-
| How to detect “call ended” and get call duration | `actionType = 1` and `cmd = 'hangup'`; read duration from `call_end` (seconds) |
|
|
69
|
-
| How to detect “call canceled” | `actionType = 2` |
|
|
70
|
-
| How to detect “call rejected” | `actionType = 4` |
|
|
71
|
-
| How to detect “rejected due to callee busy” | `actionType = 4` and `cmd = 'line_busy'` |
|
|
72
|
-
| How callee detects “timeout with no answer” | `actionType = 5` |
|
|
73
|
-
|
|
74
|
-
## 4) Best-practice summary
|
|
75
|
-
|
|
76
|
-
1. **Only** listen to `TUICallEvent.ON_CALL_RECEIVED`, then respond with `accept()` or `reject()`.
|
|
77
|
-
2. **Do not** parse call invitations from `TIM.EVENT.MESSAGE_RECEIVED` manually.
|
|
78
|
-
3. Use **`userData` (string)** for extension data: caller writes it, callee reads it from event payload.
|
|
79
|
-
4. **`businessID` and low-level payload format** are internal SDK details; do not invent undocumented structures.
|
|
80
|
-
5. In **`@trtc/call-engine-lite-js` 4.x+**, pass custom content via `userData`; there is **no `customData` field**.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
product: 'Call'
|
|
3
|
-
tech_stack: 'callengine'
|
|
4
|
-
framework: 'web'
|
|
5
|
-
doc_kind: 'best_practice'
|
|
6
|
-
title: 'TUICallEngine Web log level control with setLogLevel'
|
|
7
|
-
keywords: ['setLogLevel', 'console logs', 'disable logs', 'log level']
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## TUICallEngine log level control
|
|
11
|
-
|
|
12
|
-
Web TUICallEngine provides `setLogLevel` to control browser console output.
|
|
13
|
-
|
|
14
|
-
### Log levels
|
|
15
|
-
|
|
16
|
-
- `0`: verbose level (more logs, useful during integration)
|
|
17
|
-
- `1`: key level (default)
|
|
18
|
-
- `2`: warning level (warnings + errors)
|
|
19
|
-
- `3`: error level (errors only)
|
|
20
|
-
- `4`: silent level (no logs)
|
|
21
|
-
|
|
22
|
-
### Reference
|
|
23
|
-
|
|
24
|
-
- [TUICallEngine setLogLevel](https://web.sdk.qcloud.com/component/trtccalling/doc/TUICallEngine/web/en/TUICallEngine.html#setLogLevel)
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
product: 'Call'
|
|
3
|
-
tech_stack: 'callkit'
|
|
4
|
-
framework: 'web'
|
|
5
|
-
doc_kind: 'best_practice'
|
|
6
|
-
title: 'TUICallKit Web Initiating Audio/Video Calls: call vs calls, Parameter Format and Examples'
|
|
7
|
-
keywords: ['TUICallKit initiating audio/video calls', 'difference between call and calls methods', 'how to pass the userIDList parameter', 'what do type parameter values 1 and 2 represent', 'TUICallKit vue', 'TUICallKit React']
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Best Practices (Conclusion First)
|
|
11
|
-
1. Web TUICallKit **v4.x must use `calls`** to initiate one-to-one/multi-party calls. `call` and `groupCall` apply only to versions before v4.0.0 and are no longer supported starting from v4.0.0.
|
|
12
|
-
2. You must complete `init` before initiating a call; otherwise, the call may fail or the state may become abnormal.
|
|
13
|
-
3. It is recommended to use the `CallMediaType` enum constants for `type`. Using numeric literals (1/2) as the primary approach is not recommended.
|
|
14
|
-
4. `userIDList` must be an array (pass a single-element array even for one-to-one calls). Pass `chatGroupID` only when you need to integrate with a Chat group.
|
|
15
|
-
|
|
16
|
-
### Initialization Example (v4.x, React)
|
|
17
|
-
``` javascript
|
|
18
|
-
import { TUICallKitAPI } from "@trtc/calls-uikit-react";
|
|
19
|
-
|
|
20
|
-
TUICallKitAPI.init({ SDKAppID, userID, userSig });
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Legacy Initialization Example (before v4.0.0)
|
|
24
|
-
``` javascript
|
|
25
|
-
import { TUICallKitServer } from "@tencentcloud/call-uikit-react";
|
|
26
|
-
|
|
27
|
-
TUICallKitServer.init({ SDKAppID, userID, userSig });
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Common Misconceptions (Anti-patterns)
|
|
31
|
-
- Continuing to call `call` / `groupCall` in v4.x.
|
|
32
|
-
- Writing a one-to-one call using the `userID` field instead of `userIDList`.
|
|
33
|
-
- Mixing `roomID` and `strRoomID` (the two are mutually exclusive and not interoperable).
|
|
34
|
-
- Using numeric literals for `type` long-term instead of the `CallMediaType` enum constants.
|
|
35
|
-
|
|
36
|
-
## Usage Example of the v4.x calls API
|
|
37
|
-
Initiate a one-to-one or multi-party call.
|
|
38
|
-
``` javascript
|
|
39
|
-
try {
|
|
40
|
-
await TUICallKitAPI.calls({
|
|
41
|
-
userIDList: ['jack', 'tom'],
|
|
42
|
-
type: CallMediaType.VIDEO_CALL
|
|
43
|
-
});
|
|
44
|
-
} catch (error: any) {
|
|
45
|
-
console.error(`[TUICallKit] Failed to call the groupCall API. Reason:${error}`);
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The parameters are shown in the table below:
|
|
50
|
-
| Parameter | Type | Required | Description |
|
|
51
|
-
| --- | --- | --- | --- |
|
|
52
|
-
| userIDList | Array<String> | Yes | The list of users being called. |
|
|
53
|
-
| type | CallMediaType| Yes | The media type of the call.<br>Backward compatible with older versions: audio call (type = 1), video call (type = 2). |
|
|
54
|
-
| chatGroupID | String | Yes | The group ID of the Chat group when used together with Chat. |
|
|
55
|
-
| roomID | Number | No | Numeric room ID, in the range [1, 2147483647]. |
|
|
56
|
-
| strRoomID | String | No | String room ID. <strong>Supported in v3.3.1+</strong><br>1. roomID and strRoomID are mutually exclusive. If you choose strRoomID, roomID must be set to 0. If both are provided, the SDK gives priority to roomID.<br>2. Do not mix roomID and strRoomID, because they are not interoperable. For example, the number 123 and the string "123" are two completely different rooms. |
|
|
57
|
-
| timeout | Number | No | Call timeout duration. Default: 30s, unit: seconds. Range: 10s ~ 600s. If 0 is passed, it defaults to 30s. |
|
|
58
|
-
| userData | String | No | A custom extension field when initiating a call. The called user receives this parameter in the ON_CALL_RECEIVED event. |
|
|
59
|
-
| <a href="https://cloud.tencent.com/document/product/647/81015#offlinePushInfo">offlinePushInfo</a> | Object | No | Custom offline message push parameters. |
|
|
60
|
-
|
|
61
|
-
### CallMediaType Call Types
|
|
62
|
-
|CallMediaType Type|Description|
|
|
63
|
-
|---------|---------|
|
|
64
|
-
|CallMediaType.AUDIO|Audio call.|
|
|
65
|
-
|CallMediaType.VIDEO|Video call.|
|
|
66
|
-
|
|
67
|
-
## Usage Examples of the `call` and `groupCall` APIs in Lower Versions (v2.x/v3.x)
|
|
68
|
-
|
|
69
|
-
### call: Initiate a One-to-One Call
|
|
70
|
-
``` javascript
|
|
71
|
-
import { TUICallKitServer, TUICallType } from '@tencentcloud/call-uikit-react';
|
|
72
|
-
try {
|
|
73
|
-
await TUICallKitServer.call({
|
|
74
|
-
userID: 'mike', // username being called
|
|
75
|
-
type: TUICallType.VIDEO_CALL,
|
|
76
|
-
});
|
|
77
|
-
} catch (error: any) {
|
|
78
|
-
console.error(`[TUICallKit] Call failed. Reason: ${error}`);
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The parameters are shown in the table below:
|
|
83
|
-
| Parameter | Type | Required | Description |
|
|
84
|
-
| --- | --- | --- | --- |
|
|
85
|
-
| userID | String | Yes | The user ID being called. |
|
|
86
|
-
| type | TUICallType | Yes | The media type of the call.<br>Backward compatible with older versions: audio call (type = 1), video call (type = 2). |
|
|
87
|
-
| roomID | Number | No | Numeric room ID, in the range [1, 2147483647]. |
|
|
88
|
-
| strRoomID | String | No | String room ID. <strong>Supported in v3.3.1+</strong><br>1. roomID and strRoomID are mutually exclusive. If you choose strRoomID, roomID must be set to 0. If both are provided, the SDK gives priority to roomID.<br>2. Do not mix roomID and strRoomID, because they are not interoperable. For example, the number 123 and the string "123" are two completely different rooms. |
|
|
89
|
-
| timeout | Number | No | Call timeout duration. Default: 30s, unit: seconds. Range: 10s ~ 600s. If 0 is passed, it defaults to 30s. |
|
|
90
|
-
| userData | String | No | A custom extension field when initiating a call. The called user receives this parameter in the ON_CALL_RECEIVED event. |
|
|
91
|
-
| offlinePushInfo | Object | No | Custom offline message push parameters. |
|
|
92
|
-
|
|
93
|
-
### groupCall: Initiate a Multi-party Call
|
|
94
|
-
``` javascript
|
|
95
|
-
try {
|
|
96
|
-
await TUICallKitServer.groupCall({
|
|
97
|
-
userIDList: ['jack', 'tom'],
|
|
98
|
-
groupID: "xxx",
|
|
99
|
-
type: TUICallType.VIDEO_CALL
|
|
100
|
-
});
|
|
101
|
-
} catch (error: any) {
|
|
102
|
-
console.error(`[TUICallKit] Failed to call the groupCall API. Reason:${error}`);
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
The parameters are shown in the table below:
|
|
107
|
-
| Parameter | Type | Required | Description |
|
|
108
|
-
| --- | --- | --- | --- |
|
|
109
|
-
| userIDList| Array<String> | Yes | The user IDs being called. |
|
|
110
|
-
| type | TUICallType | Yes | The media type of the call.<br>Backward compatible with older versions: audio call (type = 1), video call (type = 2). |
|
|
111
|
-
| groupID | String | Yes | The call group ID. See the documentation for how to create a groupID. |
|
|
112
|
-
| roomID | Number | No | Numeric room ID, in the range [1, 2147483647]. |
|
|
113
|
-
| strRoomID | String | No | String room ID. <strong>Supported in v3.3.1+</strong><br>1. roomID and strRoomID are mutually exclusive. If you choose strRoomID, roomID must be set to 0. If both are provided, the SDK gives priority to roomID.<br>2. Do not mix roomID and strRoomID, because they are not interoperable. For example, the number 123 and the string "123" are two completely different rooms. |
|
|
114
|
-
| timeout | Number | No | Call timeout duration. Default: 30s, unit: seconds. Range: 10s ~ 600s. If 0 is passed, it defaults to 30s. |
|
|
115
|
-
| userData | String | No | A custom extension field when initiating a call. The called user receives this parameter in the ON_CALL_RECEIVED event. |
|
|
116
|
-
| offlinePushInfo | Object | No | Custom offline message push parameters. |
|
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
The TUICallKit API is the **audio and video call component that includes a UI interface**. With the TUICallKit API, you can swiftly develop audio and video call scenarios reminiscent of WeChat through simple interfaces. For further comprehensive steps to access this, please refer to: [Integrating TUICallKit](https://trtc.io/document/50993).
|
|
2
|
-
|
|
3
|
-
## API Overview
|
|
4
|
-
|
|
5
|
-
|API|Description|
|
|
6
|
-
|---------|---------|
|
|
7
|
-
|[<TUICallKit/>](https://www.tencentcloud.com/document/product/647/51015#TUICallKit)|The core UI call component.|
|
|
8
|
-
|[init](https://www.tencentcloud.com/document/product/647/51015#init)|Initialize TUICallKit.|
|
|
9
|
-
|[calls](https://www.tencentcloud.com/document/product/647/51015#calls)|Initiate a one-to-one or multi-person call.|
|
|
10
|
-
|[join](https://www.tencentcloud.com/document/product/647/51015#join)|Proactively join a call.|
|
|
11
|
-
|[setCallingBell](https://www.tencentcloud.com/document/product/647/51015#setCallingBell)|Customize user's ringtone.|
|
|
12
|
-
|[setSelfInfo](https://www.tencentcloud.com/document/product/647/51015#setSelfInfo)|Set your own nickname and avatar.|
|
|
13
|
-
|[enableMuteMode](https://www.tencentcloud.com/document/product/647/51015#enableMuteMode)|Turn on/off ringtone.|
|
|
14
|
-
|[enableFloatWindow](https://www.tencentcloud.com/document/product/647/51015#enableFloatWindow)|Turn on/off the floating window function.|
|
|
15
|
-
|[enableVirtualBackground](https://www.tencentcloud.com/document/product/647/51015#enableVirtualBackground)|Turn on/off the blurred background function button.|
|
|
16
|
-
|[setLanguage](https://www.tencentcloud.com/document/product/647/51015#setLanguage)|Set the call language for the TUICallKit component.|
|
|
17
|
-
|[hideFeatureButton](https://www.tencentcloud.com/document/product/647/51015#hideFeatureButton)|Hidden Button.|
|
|
18
|
-
|[setLocalViewBackgroundImage](https://www.tencentcloud.com/document/product/647/51015#setLocalViewBackgroundImage)|Set the background image for the local user's call interface.|
|
|
19
|
-
|[setRemoteViewBackgroundImage](https://www.tencentcloud.com/document/product/647/51015#setRemoteViewBackgroundImage)|Set the background image for the remote user's call interface.|
|
|
20
|
-
|[setLayoutMode](https://www.tencentcloud.com/document/product/647/51015#setLayoutMode)|Set the call interface layout mode.|
|
|
21
|
-
|[setCameraDefaultState](https://www.tencentcloud.com/document/product/647/51015#setCameraDefaultState)|et whether the camera is opened by default.|
|
|
22
|
-
|[destroyed](https://www.tencentcloud.com/document/product/647/51015#destroyed)|Destroy TUICallKit.|
|
|
23
|
-
|[getTUICallEngineInstance](https://www.tencentcloud.com/document/product/647/51015#getTUICallEngineInstance)|Get TUICallEngine instance.|
|
|
24
|
-
|
|
25
|
-
## `<TUICallKit/>` attributes
|
|
26
|
-
|
|
27
|
-
### Attribute Overview
|
|
28
|
-
|
|
29
|
-
|Attribute|Description|Type|Required|Default Value|Vue|React|
|
|
30
|
-
|---------|---------|---------|---------|---------|---------|---------|
|
|
31
|
-
|allowedMinimized|Is the floating window permitted?|boolean|No|false|<br>√|√|
|
|
32
|
-
|allowedFullScreen|Whether to permit full screen mode for the call interface|boolean|No|true|√|√|
|
|
33
|
-
|[videoDisplayMode](https://www.tencentcloud.com/document/product/647/51015#videoDisplayMode)|Display mode for the call interface|VideoDisplayMode|No|VideoDisplayMode.COVER|√|√|
|
|
34
|
-
|[videoResolution](https://www.tencentcloud.com/document/product/647/51015#videoResolution)|Call Resolution|VideoResolution|No|VideoResolution.RESOLUTION_480P|√|√|
|
|
35
|
-
|beforeCalling|This function will be executed prior to making a call and before receiving an invitation to talk|function(type, error)|No|-|√|√|
|
|
36
|
-
|afterCalling|This function will be executed after the termination of the call|function()|No|-|√|√|
|
|
37
|
-
|onMinimized|This function will be executed when the component switches to a minimized state. The explanation for the STATUS value is|function(oldStatus, newStatus)|No|-|√|√|
|
|
38
|
-
|kickedOut|The events thrown by the component occur when the current logged-in user is ejected. The call will also automatically terminate|function()|No|-|√|×|
|
|
39
|
-
|statusChanged|Event thrown by the component; this event is triggered when the call status changes. For detailed types of call status,
|
|
40
|
-
|
|
41
|
-
### Sample code
|
|
42
|
-
|
|
43
|
-
【React】
|
|
44
|
-
``` bash
|
|
45
|
-
import { TUICallKit, VideoDisplayMode, VideoResolution } from "@trtc/calls-uikit-react";
|
|
46
|
-
|
|
47
|
-
<TUICallKit
|
|
48
|
-
videoDisplayMode={VideoDisplayMode.CONTAIN}
|
|
49
|
-
videoResolution={VideoResolution.RESOLUTION_1080P}
|
|
50
|
-
beforeCalling={handleBeforeCalling}
|
|
51
|
-
afterCalling={handleAfterCalling}
|
|
52
|
-
/>
|
|
53
|
-
|
|
54
|
-
function handleBeforeCalling(type: string, error: any) {
|
|
55
|
-
console.log("[TUICallkit Demo] handleBeforeCalling:", type, error);
|
|
56
|
-
}
|
|
57
|
-
function handleAfterCalling() {
|
|
58
|
-
console.log("[TUICallkit Demo] handleAfterCalling");
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Detailed information on TUICallKitAPI API
|
|
63
|
-
|
|
64
|
-
【React】
|
|
65
|
-
``` javascript
|
|
66
|
-
import { TUICallKitAPI } from "@trtc/calls-uikit-react";
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### init
|
|
70
|
-
|
|
71
|
-
Initialize TUICallKit.
|
|
72
|
-
``` javascript
|
|
73
|
-
try {
|
|
74
|
-
await TUICallKitAPI.init({ SDKAppID, userID, userSig });
|
|
75
|
-
// If you already have a tim instance in your project, you need to pass it in here
|
|
76
|
-
// await TUICallKitAPI.init({ tim, SDKAppID, userID, userSig});
|
|
77
|
-
console.log("[TUICallKit] Initialization succeeds.");
|
|
78
|
-
} catch (error: any) {
|
|
79
|
-
console.error(`[TUICallKit] Initialization failed. Reason: ${error}`);
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The parameters are described below:
|
|
84
|
-
| Parameter | Type | Required | Meaning |
|
|
85
|
-
| --- | --- | --- | --- |
|
|
86
|
-
| SDKAppID | Number | Yes | The SDKAppID of your app, you can find your SDKAppID in the Live Audio and Video console.
|
|
87
|
-
| userID | String | Yes | The current user's ID is of string type, only allowing for the inclusion of English letters (a-z and A-Z), digits (0-9), hyphens (-) and underscores (_) |
|
|
88
|
-
| userSig | String | Yes | Use SDKSecretKey to encrypt SDKAppID, UserID and other information to obtain userSig.<br>It is an authentication ticket used by Tencent Cloud to identify whether the current user can use TRTC services. For how to obtain it, please
|
|
89
|
-
| tim | TencentCloudChat | No | tim is an instance of <a href="https://www.npmjs.com/package/@tencentcloud/chat">TencentCloudChat</a> SDK. |
|
|
90
|
-
|
|
91
|
-
### calls
|
|
92
|
-
|
|
93
|
-
Initiate a one-to-one or multi-person call.
|
|
94
|
-
``` javascript
|
|
95
|
-
try {
|
|
96
|
-
await TUICallKitAPI.calls({
|
|
97
|
-
userIDList: ['jack', 'tom'],
|
|
98
|
-
type: CallMediaType.VIDEO
|
|
99
|
-
});
|
|
100
|
-
} catch (error: any) {
|
|
101
|
-
console.error(`[TUICallKit] Failed to call the groupCall API. Reason:${error}`);
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
The parameters are described below:
|
|
106
|
-
| <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Meaning</strong> |
|
|
107
|
-
| --- | --- | --- | --- |
|
|
108
|
-
| userIDList | Array<String> | Yes | List of called users |
|
|
109
|
-
| type | <a href="https://www.tencentcloud.com/document/product/647/51015#Type">CallMediaType</a> | Yes | The type of media for the call, you can refer to CallMediaType for the explanation of parameter values |
|
|
110
|
-
| chatGroupID | String | Yes | chat group Id. |
|
|
111
|
-
| roomID | Number | No | Numerical Room ID, range [1, 2147483647] |
|
|
112
|
-
| strRoomID | String | No | String room ID. <strong>v3.3.1+ supported</strong><br><strong>range:</strong><br>Limited to 64 bytes in length. The supported character set range is as follows (a total of 89 characters):<br>- Lowercase and uppercase English letters.(a-zA-Z);<br>- Number(0-9);<br>- <code>Spaces</code>、<code>!</code>、<code>#</code>、<code>$</code>、<code>%</code>、<code>&</code>、<code>(</code>、<code>)</code>、<code>+</code>、<code>-</code>、<code>:</code>、<code>;</code>、<code><</code>、<code>=</code>、<code>.</code>、<code>></code>、<code>?</code>、<code>@</code>、<code>[</code>、<code>]</code>、<code>^</code>、<code>_</code>、<code>{</code>、<code>}</code>、<code>\\|</code>、<code>~</code>、<code>,</code>。<br>1. roomID and strRoomID are mutually exclusive, if you use strRoomID, then roomID should be 0. If you use both, the SDK will prioritize the roomID. 2.<br>2. don't mix roomID and strRoomID, because they are not interchangeable, for example, the number 123 and the string "123" are two completely different rooms. |
|
|
113
|
-
| timeout | Number | No | Call timeout, default: 30s, unit: seconds. timeout = 0, set to no timeout |
|
|
114
|
-
| userData | String | No | Customize the extended fields when initiating a call. The called user has this parameter in the ON_CALL_RECEIVED event. |
|
|
115
|
-
| <a href="https://www.tencentcloud.com/document/product/647/51015#offlinePushInfo">offlinePushInfo</a> | Object | No | Customize offline message push parameters |
|
|
116
|
-
|
|
117
|
-
### join
|
|
118
|
-
|
|
119
|
-
Proactively join a call.
|
|
120
|
-
``` javascript
|
|
121
|
-
try {
|
|
122
|
-
await TUICallKitAPI.join({
|
|
123
|
-
callId: 'xx'
|
|
124
|
-
});
|
|
125
|
-
} catch (error: any) {
|
|
126
|
-
console.error(`[TUICallKit] Failed to call the join API. Reason:${error}`);
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
The parameters are described below:
|
|
131
|
-
|
|
132
|
-
|**Parameter**|**Type**|**Required**|**Meaning**|
|
|
133
|
-
|---------|---------|---------|---------|
|
|
134
|
-
|callId|String|Yes|Unique ID for this call|
|
|
135
|
-
|
|
136
|
-
### setLanguage
|
|
137
|
-
|
|
138
|
-
Set language, currently supports: Chinese, English, Japanese.
|
|
139
|
-
``` javascript
|
|
140
|
-
TUICallKitAPI.setLanguage("zh-cn"); // "en" | "zh-cn" | "ja_JP"
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
The parameters are described below:
|
|
144
|
-
|
|
145
|
-
|Parameter|Type|Required|Meaning|
|
|
146
|
-
|---------|---------|---------|---------|
|
|
147
|
-
|lang|String|Yes|Language type `en`,`zh-cn` and `ja_JP`. |
|
|
148
|
-
|
|
149
|
-
### setSelfInfo
|
|
150
|
-
|
|
151
|
-
Set your own nickname and avatar.
|
|
152
|
-
|
|
153
|
-
> **Note:**
|
|
154
|
-
> **If you use this interface to modify user information during a call, the UI will not be updated immediately, and you will need to wait until the next call to see the changes.**
|
|
155
|
-
>
|
|
156
|
-
|
|
157
|
-
``` javascript
|
|
158
|
-
try {
|
|
159
|
-
await TUICallKitAPI.setSelfInfo({ nickName: "xxx", avatar: "http://xxx" });
|
|
160
|
-
} catch (error: any) {
|
|
161
|
-
console.error(`[TUICallKit] Failed to call the setSelfInfo API. Reason: ${error}`;
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
The parameters are described below:
|
|
166
|
-
|
|
167
|
-
|Parameter|Type|Required|Meaning|
|
|
168
|
-
|---------|---------|---------|---------|
|
|
169
|
-
|nickName|String|Yes|own nickname|
|
|
170
|
-
|avatar|String|Yes|own avatar address|
|
|
171
|
-
|
|
172
|
-
### setCallingBell
|
|
173
|
-
- Customize the user's incoming call ringtone.
|
|
174
|
-
|
|
175
|
-
- The input is restricted to the local MP3 format file address. It is imperative to ensure that the application has access to this file directory.
|
|
176
|
-
|
|
177
|
-
- Use the import method to import the ringtone file.
|
|
178
|
-
|
|
179
|
-
- If you need to restore the default ringtone, just pass empty filePath.
|
|
180
|
-
|
|
181
|
-
``` javascript
|
|
182
|
-
import filePath from '../assets/phone_ringing.mp3';
|
|
183
|
-
try {
|
|
184
|
-
await TUICallKitAPI.setCallingBell(filePath);
|
|
185
|
-
} catch (error: any) {
|
|
186
|
-
console.error(`[TUICallKit] Failed to call the setCallingBell API. Reason: ${error}`);
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
The parameters are described below:
|
|
191
|
-
|
|
192
|
-
|Parameter|Type|Required|Meaning|
|
|
193
|
-
|---------|---------|---------|---------|
|
|
194
|
-
|filePath|String|Yes|Ringtone file path|
|
|
195
|
-
|
|
196
|
-
### enableFloatWindow
|
|
197
|
-
|
|
198
|
-
Turn on/off the floating window function. The default is false. The floating window button in the upper left corner of the call interface is hidden. It will be displayed after setting it to true.
|
|
199
|
-
``` javascript
|
|
200
|
-
try {
|
|
201
|
-
const enable = true;
|
|
202
|
-
await TUICallKitAPI.enableFloatWindow(enable);
|
|
203
|
-
} catch (error: any) {
|
|
204
|
-
console.error(`[TUICallKit] Failed to call the enableFloatWindow API. Reason: ${error}`);
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
The parameters are described below:
|
|
209
|
-
|
|
210
|
-
|Parameter|Type|Required|Meaning|
|
|
211
|
-
|---------|---------|---------|---------|
|
|
212
|
-
|enable|Boolean|Yes|Turn on/off the floating window function. default false.|
|
|
213
|
-
|
|
214
|
-
### enableMuteMode
|
|
215
|
-
|
|
216
|
-
Turn on/off the ringtone for incoming calls. When turned on, the incoming call ringtone will not be played when a call request is received.
|
|
217
|
-
``` javascript
|
|
218
|
-
try {
|
|
219
|
-
const enable = true;
|
|
220
|
-
await TUICallKitAPI.enableMuteMode(enable);
|
|
221
|
-
} catch (error: any) {
|
|
222
|
-
console.error(`[TUICallKit] Failed to call the enableMuteMode API. Reason: ${error}`);
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### enableVirtualBackground
|
|
227
|
-
|
|
228
|
-
Turn on/off the blurred background function. If you want to set the picture background to be blurry see Web. By calling the interface, you can display the blurred background function button on the UI, and click the button to directly enable the blurred background function.
|
|
229
|
-
``` javascript
|
|
230
|
-
import { TUICallKitAPI } from "@trtc/calls-uikit-react";
|
|
231
|
-
const enable = true;
|
|
232
|
-
TUICallKitAPI.enableVirtualBackground(enable);
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
The parameters are described below:
|
|
236
|
-
| Parameter | Type | Required | Meaning |
|
|
237
|
-
| --- | --- | --- | --- |
|
|
238
|
-
| enable | boolean | Yes | - enable = true, show blur background button<br>- enable = false, don't show blur background button |
|
|
239
|
-
|
|
240
|
-
### destroyed
|
|
241
|
-
- Terminate the TUICallKit instance.
|
|
242
|
-
|
|
243
|
-
- This method won't automatically log out of `tim`, manual logging out is required: `tim.logout();`.
|
|
244
|
-
|
|
245
|
-
``` javascript
|
|
246
|
-
try {
|
|
247
|
-
await TUICallKitAPI.destroyed();
|
|
248
|
-
} catch (error: any) {
|
|
249
|
-
console.error(`[TUICallKit] Failed to call the destroyed API. Reason: ${error}`);
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### hideFeatureButton
|
|
254
|
-
|
|
255
|
-
Hidden feature buttons, currently only support Camera, Microphone, and Switch Camera Button.
|
|
256
|
-
``` typescript
|
|
257
|
-
TUICallKitAPI.hideFeatureButton(buttonName: FeatureButton);
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
The parameters are described below:
|
|
261
|
-
|
|
262
|
-
|**Parameter**|**Type**|**Required**|**Meaning**|
|
|
263
|
-
|---------|---------|---------|---------|
|
|
264
|
-
|buttonName|[FeatureButton](https://www.tencentcloud.com/document/product/647/51015#FeatureButton)|Yes|Button Name|
|
|
265
|
-
|
|
266
|
-
### setLocalViewBackgroundImage
|
|
267
|
-
|
|
268
|
-
Set the background image for the local user's call interface.
|
|
269
|
-
``` typescript
|
|
270
|
-
TUICallKitAPI.setLocalViewBackgroundImage(url: string);
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
The parameters are described below:
|
|
274
|
-
|
|
275
|
-
|**Parameter**|**Type**|**Required**|**Meaning**|
|
|
276
|
-
|---------|---------|---------|---------|
|
|
277
|
-
|url|string|Yes|Image Address (supports Local Path and Network Address)|
|
|
278
|
-
|
|
279
|
-
### setRemoteViewBackgroundImage
|
|
280
|
-
|
|
281
|
-
Set the background image for the remote user's call interface.
|
|
282
|
-
``` typescript
|
|
283
|
-
TUICallKitAPI.setRemoteViewBackgroundImage(userId: string, url: string);
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
The parameters are described below:
|
|
287
|
-
|
|
288
|
-
|**Parameter**|**Type**|**Required**|**Meaning**|
|
|
289
|
-
|---------|---------|---------|---------|
|
|
290
|
-
|userId|string|Yes|Remote User userId, setting to '*' means it applies to all Remote Users|
|
|
291
|
-
|url|string|Yes|Image Address (supports Local Path and Network Address)|
|
|
292
|
-
|
|
293
|
-
### setLayoutMode
|
|
294
|
-
|
|
295
|
-
Set the call interface layout mode.
|
|
296
|
-
|
|
297
|
-
【React】
|
|
298
|
-
``` javascript
|
|
299
|
-
import { TUICallKitAPI, LayoutMode } from "@trtc/calls-uikit-react";
|
|
300
|
-
TUICallKitAPI.setLayoutMode(LayoutMode.LocalInLargeView);
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
Parameter list:
|
|
304
|
-
|
|
305
|
-
|**Parameter**|**Type**|**Required**|**Meaning**|
|
|
306
|
-
|---------|---------|---------|---------|
|
|
307
|
-
|layoutMode|[LayoutMode](https://www.tencentcloud.com/document/product/647/51015#LayoutMode)|Yes|User flow layout mode|
|
|
308
|
-
|
|
309
|
-
### setCameraDefaultState
|
|
310
|
-
|
|
311
|
-
Set whether the camera is on by default.
|
|
312
|
-
``` javascript
|
|
313
|
-
TUICallKitAPI.setCameraDefaultState(true);
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
Parameter list:
|
|
317
|
-
|
|
318
|
-
|Parameter|Type|Required|Meaning|
|
|
319
|
-
|---------|---------|---------|---------|
|
|
320
|
-
|isOpen|boolean|Yes|Whether to enable the camera|
|
|
321
|
-
|
|
322
|
-
### getTUICallEngineInstance
|
|
323
|
-
|
|
324
|
-
Get TUICallEngine instance.
|
|
325
|
-
``` javascript
|
|
326
|
-
TUICallKitAPI.getTUICallEngineInstance();
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## TUICallKit Type Definition
|
|
330
|
-
|
|
331
|
-
### videoDisplayMode
|
|
332
|
-
|
|
333
|
-
There are three values for the `videoDisplayMode` display mode:
|
|
334
|
-
- `VideoDisplayMode.CONTAIN`
|
|
335
|
-
|
|
336
|
-
- `VideoDisplayMode.COVER`
|
|
337
|
-
|
|
338
|
-
- `VideoDisplayMode.FILL`, the default value is `VideoDisplayMode.COVER`.
|
|
339
|
-
|
|
340
|
-
| Attribute | Value | Description |
|
|
341
|
-
| --- | --- | --- |
|
|
342
|
-
| videoDisplayMode | VideoDisplayMode.CONTAIN | - Ensuring the full display of video content is our top priority.<br>- The dimensions of the video are scaled proportionally until one side aligns with the frame of the viewing window.<br>- In case of discrepancy in sizes between the video and the display window, the video is scaled - on the premise of maintaining the aspect ratio - to fill the window, resulting in a black border around the scaled video. |
|
|
343
|
-
| VideoDisplayMode.COVER | - Priority is given to ensure that the viewing window is filled.<br>- The video size is scaled proportionally until the entire window is filled.<br>- If the video's dimensions are different from those of the display window, the video stream will be cropped or stretched to match the window's ratio. | |
|
|
344
|
-
| VideoDisplayMode.FILL | - Ensuring that the entire video content is displayed while filling the window does not guarantee preservation of the original video's proportion.<br>- The dimensions of the video will be stretched to match those of the window. | |
|
|
345
|
-
|
|
346
|
-
### videoResolution
|
|
347
|
-
|
|
348
|
-
The resolution `videoResolution` has three possible values:
|
|
349
|
-
- `VideoResolution.RESOLUTION_480P`
|
|
350
|
-
|
|
351
|
-
- `VideoResolution.RESOLUTION_720P`
|
|
352
|
-
|
|
353
|
-
- `VideoResolution.RESOLUTION_1080P`, the default value is `VideoResolution.RESOLUTION_480P`.
|
|
354
|
-
|
|
355
|
-
**Resolution Explanation:**
|
|
356
|
-
|
|
357
|
-
|Video Profile|Resolution (W x H)|Frame Rate (fps)|Bitrate (Kbps)|
|
|
358
|
-
|---------|---------|---------|---------|
|
|
359
|
-
|480p|640 × 480|15|900|
|
|
360
|
-
|720p|1280 × 720|15|1500|
|
|
361
|
-
|1080p|1920 × 1080|15|2000|
|
|
362
|
-
|
|
363
|
-
**Frequently Asked Questions:**
|
|
364
|
-
|
|
365
|
-
- iOS 13&14 does not support encoding videos higher than 720P. It is suggested to limit the highest collection to 720P on these two system versions. Refer to [iOS Safari known issue case 12](https://web.sdk.qcloud.com/trtc/webrtc/doc/en/tutorial-02-info-webrtc-issues.html#h2-4).
|
|
366
|
-
|
|
367
|
-
- Firefox does not permit the customization of video frame rates (default is set to 30fps).
|
|
368
|
-
|
|
369
|
-
- Due to the influence of system performance usage, camera collection capabilities, browser restrictions, and other factors, the actual values of video resolution, frame rate, and bit rate may not necessarily match the set values exactly. In such scenarios, the browser will automatically adjust the Profile to get as close to the set values as feasible.
|
|
370
|
-
|
|
371
|
-
### STATUS
|
|
372
|
-
|
|
373
|
-
|STATUS attribute value|Description|
|
|
374
|
-
|---------|---------|
|
|
375
|
-
|STATUS.IDLE|Idle status|
|
|
376
|
-
|STATUS.BE_INVITED|Received an Audio/Video Call Invite|
|
|
377
|
-
|STATUS.DIALING_C2C|Initiating a one-to-one call|
|
|
378
|
-
|STATUS.DIALING_GROUP|Initiating a group call|
|
|
379
|
-
|STATUS.CALLING_C2C_AUDIO|Engaged in a 1v1 Audio Call|
|
|
380
|
-
|STATUS.CALLING_C2C_VIDEO|In the midst of a one-to-one video call|
|
|
381
|
-
|STATUS.CALLING_GROUP_AUDIO|Engaged in Group Audio Communication|
|
|
382
|
-
|STATUS.CALLING_GROUP_VIDEO|Engaged in group video call|
|
|
383
|
-
|
|
384
|
-
### **CallMediaType**
|
|
385
|
-
|
|
386
|
-
|CallMediaType Type|Description|
|
|
387
|
-
|---------|---------|
|
|
388
|
-
|CallMediaType.AUDIO_CALL |Audio Call|
|
|
389
|
-
|CallMediaType.VIDEO |Video Call|
|
|
390
|
-
|
|
391
|
-
### **offlinePushInfo**
|
|
392
|
-
|
|
393
|
-
|Parameter|Type|Required|Meaning|
|
|
394
|
-
|---------|---------|---------|---------|
|
|
395
|
-
|offlinePushInfo.title|String|No|Offline Push Title (Optional)|
|
|
396
|
-
|offlinePushInfo.description|String|No|Offline Push Content (Optional)|
|
|
397
|
-
|offlinePushInfo.androidOPPOChannelID|String|No|Setting the channel ID for OPPO phones with 8.0 system and above for offline pushes (Optional)|
|
|
398
|
-
|offlinePushInfo.extension|String|No|Offline push through content. Can be used to set Android [Notification mode]( mode) and [VoIP mode]( mode). **Default**: Notification mode, it will be a notification from the system; VoIP mode is required to pass the field.|
|
|
399
|
-
|offlinePushInfo.ignoreIOSBadge|Boolean|No|Ignore badge count for offline push (only for iOS), if set to true, the message will not increase the unread count of the app icon on the iOS receiver's side.|
|
|
400
|
-
|offlinePushInfo.iOSSound|String|No|Offline push sound setting (only for iOS).|
|
|
401
|
-
|offlinePushInfo.androidSound|String|No|Offline push sound setting.|
|
|
402
|
-
|offlinePushInfo.androidVIVOClassification|Number|No|Classification of VIVO push messages (deprecated interface, VIVO push service will optimize message classification rules on April 3, 2023. It is recommended to use setAndroidVIVOCategory to set the message category). 0: Operational messages, 1: System messages. The default value is 1. |
|
|
403
|
-
|offlinePushInfo.androidXiaoMiChannelID|String|No|Set the channel ID for Xiaomi phones with Android 8.0 and above systems. |
|
|
404
|
-
|offlinePushInfo.androidFCMChannelID|String|No|Set the channel ID for google phones with Android 8.0 and above systems.|
|
|
405
|
-
|offlinePushInfo.androidHuaWeiCategory|String|No|Classification of Huawei push messages. |
|
|
406
|
-
|offlinePushInfo.isDisablePush|Boolean|No|Whether to turn off push notifications (default is on). |
|
|
407
|
-
|offlinePushInfo.iOSPushType|Number|No|iOS offline push type,default is 0。0-APNs;1-VoIP. |
|
|
408
|
-
|
|
409
|
-
#### Android Notification Mode
|
|
410
|
-
``` javascript
|
|
411
|
-
const extension = {
|
|
412
|
-
timPushFeatures: {
|
|
413
|
-
fcmPushType: 0, // 0, VoIP; 1, notification
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
offlinePushInfo.extension = JSON.stringify(extension);
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
#### Android VoIP Mode
|
|
420
|
-
``` javascript
|
|
421
|
-
const extension = {
|
|
422
|
-
timPushFeatures: {
|
|
423
|
-
fcmPushType: 0, // 0, data; 1, notification
|
|
424
|
-
fcmNotificationType: 1, // 0, TIMPush implementation; 1, business implementation after transparent transmission
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
offlinePushInfo.extension = JSON.stringify(extension);
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
### FeatureButton
|
|
431
|
-
|
|
432
|
-
|FeatureButton Type|Description|
|
|
433
|
-
|---------|---------|
|
|
434
|
-
|FeatureButton.Camera|Camera Button|
|
|
435
|
-
|FeatureButton.Microphone|Microphone Button|
|
|
436
|
-
|FeatureButton.SwitchCamera|Switches between the front and rear cameras.|
|
|
437
|
-
|FeatureButton.InviteUser|Invite users button|
|
|
438
|
-
|
|
439
|
-
### LayoutMode
|
|
440
|
-
|
|
441
|
-
|LayoutMode type|Description|
|
|
442
|
-
|---------|---------|
|
|
443
|
-
|LayoutMode.LocalInLargeView|Local user in large window display|
|
|
444
|
-
|LayoutMode.RemoteInLargeView|Remote user in large window display|
|