@tencentcloud/sdk-mcp 1.7.4 → 1.7.6
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 +20 -0
- package/README.md +57 -55
- package/knowledge/chunker.js +1 -0
- package/knowledge/path-meta.js +12 -1
- package/knowledge/search/search-core.js +22 -4
- package/knowledge/search/search-knowledge.js +1 -1
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/integration/callkit/preset/android/integration.md +0 -4
- package/resource/integration/callkit/preset/flutter/integration.md +4 -8
- package/resource/integration/callkit/preset/ios/integration.md +2 -6
- package/resource/integration/callkit/preset/react/integration.md +2 -2
- package/resource/integration/callkit/preset/vue/integration.md +9 -9
- package/resource/integration/chat/preset/android/integration.md +2 -2
- package/resource/integration/chat/preset/flutter/integration.md +2 -2
- package/resource/integration/chat/preset/ios/integration.md +10 -10
- package/resource/integration/chat/preset/react/integration.md +0 -5
- package/resource/integration/chat/preset/uni-app/integration.md +0 -4
- package/resource/integration/chat/preset/vue/integration.md +0 -5
- package/resource/integration/livekit/preset/live/android/live-host-integration.md +0 -4
- package/resource/integration/livekit/preset/live/ios/live-host-integration.md +0 -4
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +3 -3
- package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +0 -4
- package/resource/integration/roomkit/preset/vue/integration.md +152 -439
- package/resource/knowledge/callkit/best-practice/android/video-chat-dating.md +8 -8
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +2 -2
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +5 -5
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +7 -7
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +10 -10
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +9 -9
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +7 -8
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +2 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +2 -2
- package/resource/knowledge/callkit/faq/android.md +4 -4
- package/resource/knowledge/callkit/faq/common.md +4 -4
- package/resource/knowledge/callkit/preset/harmonyos/integration.md +0 -4
- package/resource/knowledge/callkit/preset/uni-app/integration.md +10 -10
- package/resource/knowledge/chat/preset/android-view/integration.md +2 -6
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +43 -40
- package/resource/knowledge/chat/preset/react/h5/integration.md +0 -5
- package/resource/knowledge/chat/preset/vue/features/message-input.md +4 -4
- package/resource/knowledge/chat/preset/vue/h5/integration.md +0 -5
- package/resource/knowledge/livekit/core-sdk/features/android/audience-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/android/live-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/flutter/audience-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/flutter/live-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/ios/audience-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/ios/live-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/uni-app/audience-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/features/uni-app/live-list.md +3 -3
- package/resource/knowledge/livekit/core-sdk/live/android/host-interaction.md +2 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/host-interaction.md +2 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/integration.md +2 -2
- package/resource/knowledge/livekit/core-sdk/live/ios/host-interaction.md +2 -2
- package/resource/knowledge/livekit/core-sdk/live/uni-app/co-guest-interaction.md +12 -12
- package/resource/knowledge/livekit/core-sdk/live/uni-app/host-interaction.md +4 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/integration.md +9 -9
- package/resource/knowledge/livekit/core-sdk/voice/android/host-interaction.md +2 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/host-interaction.md +2 -2
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/integration.md +5 -5
- package/resource/knowledge/push/config/donut.md +3 -3
- package/resource/knowledge/push/config/harmonyos.md +12 -12
- package/resource/knowledge/push/config/ios.md +2 -2
- package/resource/knowledge/push/integration/android.md +91 -1112
- package/resource/knowledge/push/integration/donut.md +8 -8
- package/resource/knowledge/push/integration/ios.md +9 -35
- package/resource/knowledge/push/integration/unity.md +3 -3
- package/resource/knowledge/push/integration/unreal-engine.md +7 -7
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +3 -3
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +9 -9
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +3 -3
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +3 -3
- package/resource/knowledge/roomkit/core-sdk/vue/recording.md +3 -3
- package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +3 -3
- package/resource/knowledge/roomkit/preset/ios/integration.md +3 -3
- package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +52 -10
- package/server.js +42 -34
- package/tools/common/get_usersig.js +1 -1
- package/tools/common/present_framework_choice.js +5 -5
- package/tools/definitions/finalize_answer_def.js +17 -16
- package/tools/definitions/get_native_call_uikit_integration_def.js +25 -16
- package/tools/definitions/get_native_callkit_core_integration_def.js +37 -26
- package/tools/definitions/get_native_chat_uikit_integration_def.js +22 -13
- package/tools/definitions/get_native_live_uikit_integration_def.js +30 -21
- package/tools/definitions/get_native_livekit_core_integration_def.js +25 -16
- package/tools/definitions/get_usersig_def.js +20 -13
- package/tools/definitions/get_web_call_uikit_integration_def.js +21 -12
- package/tools/definitions/get_web_chat_uikit_integration_def.js +22 -13
- package/tools/definitions/get_web_live_uikit_integration_def.js +21 -12
- package/tools/definitions/get_web_room_core_integration_def.js +29 -20
- package/tools/definitions/get_web_room_uikit_integration_def.js +21 -12
- package/tools/definitions/integration-boundary.js +9 -5
- package/tools/definitions/present_framework_choice_def.js +21 -21
- package/tools/definitions/search_trtc_knowledge_def.js +48 -26
- package/tools/definitions/submit_feedback_def.js +18 -14
- package/utils/preflight-route.js +203 -185
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
### 步骤 4: 视频与聊天互动
|
|
34
34
|
1. **与推荐用户互动:**您可以使用另一台设备 B 登录 “推荐用户” 的账号(以 UserID: VideoChatlinxiaoyu 为例),完成 1v1 聊天与视频互动。
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
- **设备 A :** 登录账号并关注推荐用户 “陈可欣”,并进行聊天和视频互动:
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
- **设备 B** : 登录账号,进行聊天与视频互动。
|
|
39
39
|
|
|
40
40
|
## 快速接入
|
|
41
41
|
|
|
@@ -143,7 +143,7 @@ LoginStore.shared.login(
|
|
|
143
143
|
}
|
|
144
144
|
})
|
|
145
145
|
```
|
|
146
|
-
|
|
146
|
+
- **setPageUsers 详细说明:**
|
|
147
147
|
|
|
148
148
|
``` java
|
|
149
149
|
fun setPageUsers(users: List<V2TIMUserFullInfo>, hasMore: Boolean)
|
|
@@ -174,7 +174,7 @@ LoginStore.shared.login(
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
```
|
|
177
|
-
|
|
177
|
+
- **setLayoutTemplate** **详细说明:**
|
|
178
178
|
|
|
179
179
|
``` java
|
|
180
180
|
fun setLayoutTemplate(template: MeetPage.Template)
|
|
@@ -478,13 +478,13 @@ Demo 默认集成了美颜功能,但需要 License 鉴权。请您检查 `vide
|
|
|
478
478
|
### 提高通话触达率?
|
|
479
479
|
1. **接入离线推送提高通话触达率:**
|
|
480
480
|
|
|
481
|
-
|
|
481
|
+
- 中国大陆:接入 Notification
|
|
482
482
|
|
|
483
|
-
|
|
483
|
+
- 海外:接入 FCM
|
|
484
484
|
|
|
485
485
|
2. **提供推送控制:**根据我们的经验,超过 90% 的用户接不到通话通知的原因是手动关闭了应用的通知权限。为确保通话可达率,我们强烈建议:
|
|
486
486
|
|
|
487
|
-
|
|
487
|
+
- **审慎发送通知:**避免向用户推送低质量或无关联的通知,减少用户因骚扰而关闭通知权限的可能性。
|
|
488
488
|
|
|
489
|
-
|
|
489
|
+
- **提供精细控制:**借鉴微信等优秀应用的做法,在应用设置内为用户提供独立的开关,分别控制“Notification”和“FCM Data Message”,而非引导用户去系统设置中一刀切地关闭所有通知。
|
|
490
490
|
|
|
@@ -135,7 +135,7 @@ class CallActivity : AppCompatActivity() {
|
|
|
135
135
|
|
|
136
136
|
- **以下是添加"接听"和"拒接"按钮的实现方式:**
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
1. **添加接听和拒接按钮:**创建底部按钮栏容器,并在其中添加"接听"与"拒接"按钮,将其点击事件分别绑定至 [accept](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/accept.html) 和 [reject](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/reject.html) 方法。
|
|
139
139
|
|
|
140
140
|
``` java
|
|
141
141
|
import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
|
|
@@ -208,7 +208,7 @@ class CallActivity : AppCompatActivity() {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
```
|
|
211
|
-
|
|
211
|
+
2. **拨打方取消通话或您拒接时销毁界面:**无论拨打方取消呼叫,还是接收方拒接,均会触发 [onCallEnded](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-listener/on-call-ended.html)(通话结束)事件。建议监听此事件,以便在通话终止时及时关闭(销毁)通话界面。
|
|
212
212
|
|
|
213
213
|
``` java
|
|
214
214
|
import io.trtc.tuikit.atomicxcore.api.call.CallEndReason
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
|
|
140
140
|
- **以添加挂断、麦克风、摄像头按钮为例,实现方式如下:**
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
1. **创建底部栏容器**:在通话页面底部创建一个容器,用于添加挂断、麦克风、摄像头按钮。
|
|
143
143
|
|
|
144
144
|
``` java
|
|
145
145
|
import io.trtc.tuikit.atomicxcore.api.call.CallStore
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
|
-
|
|
175
|
+
2. **添加挂断按钮:**在底部工具栏容器中添加挂断按钮,在点击事件中调用 [hangup](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/hangup.html) 接口并销毁页面。
|
|
176
176
|
|
|
177
177
|
``` java
|
|
178
178
|
import io.trtc.tuikit.atomicxcore.api.call.CallStore
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
```
|
|
211
|
-
|
|
211
|
+
3. **添加麦克风开关按钮:**在底部工具栏容器中添加麦克风开关按钮,并在点击事件中调用 [openLocalMicrophone](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/open-local-microphone.html) 或 [closeLocalMicrophone](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/close-local-microphone.html) 接口。
|
|
212
212
|
|
|
213
213
|
``` java
|
|
214
214
|
import io.trtc.tuikit.atomicxcore.api.call.CallStore
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
```
|
|
251
|
-
|
|
251
|
+
4. **添加摄像头开关按钮:**在底部工具栏容器中添加摄像头开关按钮,并在点击事件中调用 [openLocalCamera](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/open-local-camera.html) 或 [closeLocalCamera](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/close-local-camera.html) 接口。
|
|
252
252
|
|
|
253
253
|
【Android】
|
|
254
254
|
``` java
|
|
@@ -291,7 +291,7 @@ class CallActivity : AppCompatActivity() {
|
|
|
291
291
|
}
|
|
292
292
|
```
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
5. **实时更新媒体设备按钮文本:**监听麦克风和摄像头的状态,实时更新按钮文本。
|
|
295
295
|
|
|
296
296
|
``` java
|
|
297
297
|
import io.trtc.tuikit.atomicxcore.api.call.*
|
|
@@ -25,7 +25,7 @@ flutter pub add atomic_x_core
|
|
|
25
25
|
#### Android 配置
|
|
26
26
|
1. 由于 SDK 内部使用了 Java 反射机制(或特性),需要将部分 SDK 类加入不混淆处理的名单。
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
- 请在工程的 `android/app/` 目录下找到 `build.gradle.kts`(或 `build.gradle` )文件并配置并开启混淆规则:
|
|
29
29
|
|
|
30
30
|
【build.gradle.kts】
|
|
31
31
|
``` java
|
|
@@ -55,7 +55,7 @@ android {
|
|
|
55
55
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
- 在工程的 `android/app` 目录下创建 `proguard-rules.pro` 文件,并在其中添加如下代码:
|
|
59
59
|
|
|
60
60
|
``` java
|
|
61
61
|
-keep class com.tencent.** { *; }
|
|
@@ -177,7 +177,7 @@ Future<void> _login() async {
|
|
|
177
177
|
|
|
178
178
|
- **以下是添加"接听"和"拒接"按钮的实现方式:**
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
1. **添加接听和拒接按钮:**创建底部按钮栏容器,并在其中添加"接听"与"拒接"按钮,将其点击事件分别绑定至 [accept](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_call_call_store/CallStore/accept.html) 和 [reject](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_call_call_store/CallStore/reject.html) 方法。
|
|
181
181
|
|
|
182
182
|
``` java
|
|
183
183
|
import 'package:flutter/material.dart';
|
|
@@ -246,7 +246,7 @@ Future<void> _login() async {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
```
|
|
249
|
-
|
|
249
|
+
2. **拨打方取消通话或您拒接时销毁界面:**无论拨打方取消呼叫,还是接收方拒接,均会触发 [onCallEnded](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_call_call_store/CallEventListener/onCallEnded.html)(通话结束)事件。建议监听此事件,以便在通话终止时及时关闭(销毁)通话界面。
|
|
250
250
|
|
|
251
251
|
``` java
|
|
252
252
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
@@ -1058,11 +1058,11 @@ iOS 端支持通过底层 TRTC 引擎实现应用外画中画功能。当应用
|
|
|
1058
1058
|
|
|
1059
1059
|
4. 勾选以下三个选项:
|
|
1060
1060
|
|
|
1061
|
-
|
|
1061
|
+
- `Audio, AirPlay, and Picture in Picture`(保持音频采集和画中画功能)。
|
|
1062
1062
|
|
|
1063
|
-
|
|
1063
|
+
- `Voice over IP`(支持 VoIP 通话)。
|
|
1064
1064
|
|
|
1065
|
-
|
|
1065
|
+
- `Remote notifications`(可选,用于接收离线推送)。
|
|
1066
1066
|
|
|
1067
1067
|
配置完成后,您的 `Info.plist` 文件会自动添加以下内容:
|
|
1068
1068
|
|
|
@@ -26,7 +26,7 @@ flutter pub add atomic_x_core
|
|
|
26
26
|
#### Android 配置
|
|
27
27
|
1. 由于 SDK 内部使用了 Java 反射机制(或特性),需要将部分 SDK 类加入不进行混淆处理的名单。
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
- 请在工程的 `android/app/`目录下找到 `build.gradle.kts`(或 `build.gradle` )文件中配置并开启混淆规则:
|
|
30
30
|
|
|
31
31
|
【build.gradle.kts】
|
|
32
32
|
``` java
|
|
@@ -56,7 +56,7 @@ android {
|
|
|
56
56
|
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
- 在工程的 `android/app` 目录下创建 `proguard-rules.pro` 文件,并在其中添加如下代码:
|
|
60
60
|
|
|
61
61
|
``` java
|
|
62
62
|
-keep class com.tencent.** { *; }
|
|
@@ -186,7 +186,7 @@ android {
|
|
|
186
186
|
|
|
187
187
|
- **以添加挂断、麦克风、摄像头按钮为例,实现方式如下:**
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
1. **创建底部栏容器**:在通话页面底部创建一个容器,用于添加挂断、麦克风、摄像头按钮。
|
|
190
190
|
|
|
191
191
|
``` java
|
|
192
192
|
import 'package:flutter/material.dart';
|
|
@@ -208,7 +208,7 @@ android {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
```
|
|
211
|
-
|
|
211
|
+
2. **添加挂断按钮:**在底部工具栏容器中添加挂断按钮,在点击事件中调用 [hangup](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_call_call_store/CallStore/hangup.html) 接口并销毁页面。
|
|
212
212
|
|
|
213
213
|
``` java
|
|
214
214
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
@@ -237,7 +237,7 @@ android {
|
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
```
|
|
240
|
-
|
|
240
|
+
3. **添加麦克风开关按钮:**在底部工具栏容器中添加麦克风开关按钮,并在点击事件中调用 [openLocalMicrophone](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_device_device_store/DeviceStore/openLocalMicrophone.html) 或 [closeLocalMicrophone](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_device_device_store/DeviceStore/closeLocalMicrophone.html) 接口。
|
|
241
241
|
|
|
242
242
|
``` java
|
|
243
243
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
@@ -278,7 +278,7 @@ android {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
```
|
|
281
|
-
|
|
281
|
+
4. **添加摄像头开关按钮:**在底部工具栏容器中添加摄像头开关按钮,并在点击事件中调用 [openLocalCamera](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_device_device_store/DeviceStore/openLocalCamera.html) 或 [closeLocalCamera](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/flutter/v1.0/zh/api_device_device_store/DeviceStore/closeLocalCamera.html) 接口。
|
|
282
282
|
|
|
283
283
|
``` java
|
|
284
284
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
@@ -320,7 +320,7 @@ android {
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
```
|
|
323
|
-
|
|
323
|
+
5. **实时更新媒体设备按钮状态:**在 Flutter 中,使用 `ValueListenableBuilder` 监听麦克风和摄像头的状态变化,UI 会自动更新。
|
|
324
324
|
|
|
325
325
|
``` java
|
|
326
326
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
@@ -1124,11 +1124,11 @@ CallStore.shared.state.selfInfo.addListener(() {
|
|
|
1124
1124
|
|
|
1125
1125
|
4. 勾选以下三个选项:
|
|
1126
1126
|
|
|
1127
|
-
|
|
1127
|
+
- `Audio, AirPlay, and Picture in Picture`(保持音频采集和画中画功能)。
|
|
1128
1128
|
|
|
1129
|
-
|
|
1129
|
+
- `Voice over IP`(支持 VoIP 通话)。
|
|
1130
1130
|
|
|
1131
|
-
|
|
1131
|
+
- `Remote notifications`(可选,用于接收离线推送)。
|
|
1132
1132
|
|
|
1133
1133
|
配置完成后,您的 `Info.plist` 文件会自动添加以下内容:
|
|
1134
1134
|
|
|
@@ -165,7 +165,7 @@ class ViewController: UIViewController {
|
|
|
165
165
|
|
|
166
166
|
- **以下是添加"接听"和"拒接"按钮的实现方式:**
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
1. **添加接听和拒接按钮:**添加"接听"与"拒接"按钮,将其点击事件分别绑定至 [accept](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/callstore/accept(completion:)) 和 [reject](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/callstore/reject(completion:)) 方法。
|
|
169
169
|
|
|
170
170
|
【iOS(Swift)】
|
|
171
171
|
``` swift
|
|
@@ -238,7 +238,7 @@ class CallViewController: UIViewController {
|
|
|
238
238
|
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
2. **拨打方取消通话或您拒接时销毁界面:**无论拨打方取消呼叫,还是接收方拒接,均会触发 onCallEnded(通话结束)事件。建议监听此事件,以便在通话终止时及时关闭(销毁)通话界面。
|
|
242
242
|
|
|
243
243
|
``` swift
|
|
244
244
|
import UIKit
|
|
@@ -1076,19 +1076,19 @@ class CallViewController: UIViewController {
|
|
|
1076
1076
|
为了确保应用在进入后台时仍能正常采集音频和视频(例如用户锁屏或切换到其他应用),**您需要完成:iOS 后台模式权限配置**、**设置音频会话,实现方式如下:**
|
|
1077
1077
|
1. **iOS 后台模式权限配置:**在 Xcode 中打开您的项目
|
|
1078
1078
|
|
|
1079
|
-
|
|
1079
|
+
- 选择项目的 `Target` → `Signing & Capabilities`。
|
|
1080
1080
|
|
|
1081
|
-
|
|
1081
|
+
- 点击 `+ Capability` 。
|
|
1082
1082
|
|
|
1083
|
-
|
|
1083
|
+
- 搜索并添加 `Background Modes`。
|
|
1084
1084
|
|
|
1085
|
-
|
|
1085
|
+
- 勾选以下三个选项:
|
|
1086
1086
|
|
|
1087
|
-
|
|
1087
|
+
1. `Audio, AirPlay, and Picture in Picture`(保持音频采集和画中画功能)。
|
|
1088
1088
|
|
|
1089
|
-
|
|
1089
|
+
2. `Voice over IP`(支持 VoIP 通话)。
|
|
1090
1090
|
|
|
1091
|
-
|
|
1091
|
+
3. `Remote notifications`(可选,用于接收离线推送)。
|
|
1092
1092
|
|
|
1093
1093
|
配置完成后,您的 Info.plist 文件会自动添加以下内容:
|
|
1094
1094
|
|
|
@@ -141,7 +141,6 @@ class CallViewController: UIViewController {
|
|
|
141
141
|
callCoreView = coreView
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
|
|
145
144
|
```
|
|
146
145
|
|
|
147
146
|
**CallCoreView 视图组件功能说明:**
|
|
@@ -168,7 +167,7 @@ class CallViewController: UIViewController {
|
|
|
168
167
|
|
|
169
168
|
- **以添加挂断、麦克风、摄像头按钮为例,实现方式如下:**
|
|
170
169
|
|
|
171
|
-
|
|
170
|
+
1. **添加挂断按钮**:创建并添加挂断按钮,在点击事件中调用 hangup 并销毁界面。
|
|
172
171
|
|
|
173
172
|
``` swift
|
|
174
173
|
import UIKit
|
|
@@ -219,7 +218,7 @@ class CallViewController: UIViewController {
|
|
|
219
218
|
}
|
|
220
219
|
}
|
|
221
220
|
```
|
|
222
|
-
|
|
221
|
+
2. **添加麦克风开关按钮:**创建并添加麦克风开关按钮,并在点击事件中调用 [openLocalMicrophone](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore/openlocalmicrophone(completion:)) 或 [closeLocalMicrophone](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore/closelocalmicrophone()) 接口。
|
|
223
222
|
|
|
224
223
|
``` swift
|
|
225
224
|
import UIKit
|
|
@@ -274,7 +273,7 @@ class CallViewController: UIViewController {
|
|
|
274
273
|
}
|
|
275
274
|
}
|
|
276
275
|
```
|
|
277
|
-
|
|
276
|
+
3. **添加摄像头开关按钮:**在底部工具栏容器中添加摄像头开关按钮,并在点击事件中调用 [openLocalCamera](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore/openlocalcamera(isfront:completion:)) 或 [closeLocalCamera](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore/closelocalcamera()) 接口。
|
|
278
277
|
|
|
279
278
|
``` swift
|
|
280
279
|
import UIKit
|
|
@@ -330,7 +329,7 @@ class CallViewController: UIViewController {
|
|
|
330
329
|
}
|
|
331
330
|
}
|
|
332
331
|
```
|
|
333
|
-
|
|
332
|
+
4. **实时更新媒体设备按钮文本:**监听麦克风和摄像头的状态,实时更新按钮文本。
|
|
334
333
|
|
|
335
334
|
``` swift
|
|
336
335
|
import UIKit
|
|
@@ -1180,11 +1179,11 @@ private func observeSelfCallStatus() {
|
|
|
1180
1179
|
|
|
1181
1180
|
4. 勾选以下三个选项:
|
|
1182
1181
|
|
|
1183
|
-
|
|
1182
|
+
- `Audio, AirPlay, and Picture in Picture`(保持音频采集和画中画功能)。
|
|
1184
1183
|
|
|
1185
|
-
|
|
1184
|
+
- `Voice over IP`(支持 VoIP 通话)。
|
|
1186
1185
|
|
|
1187
|
-
|
|
1186
|
+
- `Remote notifications`(可选,用于接收离线推送)。
|
|
1188
1187
|
|
|
1189
1188
|
配置完成后,您的 `Info.plist` 文件会自动添加以下内容:
|
|
1190
1189
|
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
2. **配置工程权限:** 请在应用的 manifest.json 文件的 app-plus > distribute 节点下,确保添加了以下必要的权限:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- Android 平台(`Android` 节点):在 `permissions` 数组中,请确保包含以下权限:
|
|
15
15
|
|
|
16
16
|
``` json
|
|
17
17
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\" />",
|
|
18
18
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>"
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
- iOS 平台(`iOS` 节点):在 `privacyDescription` 对象中,请确保包含以下描述:
|
|
21
21
|
|
|
22
22
|
``` json
|
|
23
23
|
"NSCameraUsageDescription" : "应用需要访问您的相机以进行通话",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
2. **配置工程权限:** 请在应用的 manifest.json 文件的 app-plus > distribute 节点下,确保添加了以下必要的权限:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- Android 平台(`Android` 节点):在 `permissions` 数组中,请确保包含以下权限:
|
|
15
15
|
|
|
16
16
|
``` json
|
|
17
17
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\" />",
|
|
18
18
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>"
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
- iOS 平台(`iOS` 节点):在 `privacyDescription` 对象中,请确保包含以下描述:
|
|
21
21
|
|
|
22
22
|
``` json
|
|
23
23
|
"NSCameraUsageDescription" : "应用需要访问您的相机以进行通话",
|
|
@@ -143,12 +143,12 @@ fun requestPermission(context: Context?) {
|
|
|
143
143
|
|
|
144
144
|
1. 打开 Android Studio 设置。
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
- Windows:**File** > **Settings**
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
- Mac:**Android Studio** > **Preferences**
|
|
149
149
|
|
|
150
150
|
2. 修改 Java 编译器设置。
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
- 路径:**Build, Execution, Deployment** > **Build Tools** > **Gradle**
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
- 将 Gradle JVM 改为 17(如果已安装)或 Use project JDK
|
|
@@ -152,13 +152,13 @@ TUICallKit 底层通过 IM 管理用户,可以通过 IM 查询用户的在线
|
|
|
152
152
|
|
|
153
153
|
getUserStatus 接口的返回结果有以下几种:
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
- 未知(UNKNOWN)
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
- 在线(ONLINE):当前用户已登录上线,通常情况下,该用户可以正常收到通话请求。
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
- 离线(OFFLINE):用户未主动调用`logout`退出登录,但长连接中断的状态。通常情况下,若接入了离线推送,该用户可以收到离线推送的消息。
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
- 未登录(UNLOGINED):用户注册账号后从未登录过,或者用户主动调用`logout`退出登录,该用户收不到通话请求。
|
|
162
162
|
|
|
163
163
|
- **方式二:**通过 REST API 进行查询
|
|
164
164
|
|
|
@@ -225,10 +225,6 @@ try {
|
|
|
225
225
|
|
|
226
226
|
接听端完成登录后,拨打端发起通话,接收端就可以收到通话邀请,同时伴随铃声和振动。
|
|
227
227
|
|
|
228
|
-
## AI 助手:知识咨询与代码集成
|
|
229
|
-
|
|
230
|
-
您在接入视频通话 SDK 过程中,可以通过 MCP 使用 AI 助手,快速完成知识咨询、报错排查和集成代码生成。支持 Web/Android/iOS/Flutter/uni-app/HarmonyOS 等平台,答案基于官方文档。适用于查询 CallKit 组件和无 UI SDK 用法以及集成文档等场景,[立即体验,提出您的第一个问题](https://cloud.tencent.com/document/product/647/129285)。
|
|
231
|
-
|
|
232
228
|
## 更多功能
|
|
233
229
|
|
|
234
230
|
### 开启来电横幅
|
|
@@ -37,13 +37,13 @@ git clone https://github.com/Tencent-RTC/TUIKit_uni-app.git
|
|
|
37
37
|
```
|
|
38
38
|
2. **导入 atomic-x 组件。**
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
- 将源码中 `TUIKit_uni-app/App/uni_modules` 目录下的 `tuikit-atomic-x` 文件夹,完整拷贝到您项目根目录下的 `uni_modules` 文件夹中。
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
- 将源码中 `TUIKit_uni-app/App/components` 下的文件,完整地拷贝到您项目的 `components` 文件夹中。
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
- 将源码中 `TUIKit_uni-app/App/static` 目录下的文件,完整拷贝到您项目根目录下的同名文件夹下。
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
- 将源码中 `TUIKit_uni-app/App/debug` 文件夹拷贝到您项目的根目录下,这个目录提供可以方便您在客户端快速生成的 **UserSig** 的快捷函数。
|
|
47
47
|
|
|
48
48
|
3. **合并 App.vue 配置。**
|
|
49
49
|
|
|
@@ -61,7 +61,7 @@ git clone https://github.com/Tencent-RTC/TUIKit_uni-app.git
|
|
|
61
61
|
|
|
62
62
|
2. **导入 atomic-x 组件。**
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
1. **转化兼容模式**:仅 Vue2 项目,Vue3 项目可忽略。
|
|
65
65
|
|
|
66
66
|
> **说明:**
|
|
67
67
|
>
|
|
@@ -71,7 +71,7 @@ git clone https://github.com/Tencent-RTC/TUIKit_uni-app.git
|
|
|
71
71
|
``` bash
|
|
72
72
|
node ./uni_modules/tuikit-atomic-x/scripts/switch-to-compatible-mode.js
|
|
73
73
|
```
|
|
74
|
-
|
|
74
|
+
2. **拷贝静态资源**:将 `uni_modules/tuikit-atomic-x/quickstart/` 下的 `static/*` 拷贝到项目 `static` 目录下。
|
|
75
75
|
|
|
76
76
|
【Mac 端】
|
|
77
77
|
``` java
|
|
@@ -106,7 +106,7 @@ import { initCallService } from '@/uni_modules/tuikit-atomic-x/server/callServic
|
|
|
106
106
|
|
|
107
107
|
打开您项目的 **manifest.json** 文件,在 **app-plus** > **distribute** 节点下,确保添加了以下必要的权限:
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
- Android 平台(`Android` 节点):在 `permissions` 数组中,请确保包含以下权限:
|
|
110
110
|
|
|
111
111
|
``` json
|
|
112
112
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
@@ -117,7 +117,7 @@ import { initCallService } from '@/uni_modules/tuikit-atomic-x/server/callServic
|
|
|
117
117
|
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
|
|
118
118
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>"
|
|
119
119
|
```
|
|
120
|
-
|
|
120
|
+
- iOS 平台(`iOS` 节点):在 `privacyDescription` 对象中,请确保包含以下描述:
|
|
121
121
|
|
|
122
122
|
``` json
|
|
123
123
|
"NSCameraUsageDescription" : "应用需要访问您的相机以进行通话",
|
|
@@ -136,9 +136,9 @@ import { initCallService } from '@/uni_modules/tuikit-atomic-x/server/callServic
|
|
|
136
136
|
> 由于 TUICallKit 包含原生代码(UTS 插件),您**必须**制作自定义调试基座才能在真机上运行。
|
|
137
137
|
>
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
1. 在 HBuilderX 顶部菜单选择**运行** > **运行到手机或模拟器** > **制作自定义调试基座**。
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
2. 制作成功后,再次选择**运行** > **运行到手机或模拟器**,在弹窗中勾选**使用自定义调试基座**后运行到您的手机。
|
|
142
142
|
|
|
143
143
|
具体操作指引参见 跑通 Demo 的步骤3。
|
|
144
144
|
|
|
@@ -15,9 +15,9 @@ TUIKit 采用数据驱动的响应式架构与原生 Android View 体系(非 C
|
|
|
15
15
|
|
|
16
16
|
- 一个有效的腾讯云账号及 Chat 应用。可参考 开通服务 从控制台获取以下信息:
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- SDKAppID:App 在控制台获取的 Chat 应用的 ID,为应用的唯一标识。
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
- SDKSecretKey:应用的密钥。
|
|
21
21
|
|
|
22
22
|
> **版本兼容性说明:**
|
|
23
23
|
>
|
|
@@ -252,10 +252,6 @@ TencentAiDeskCustomer.getInstance().initWithProfile(context, SDKAppID, userID, u
|
|
|
252
252
|
});
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
## AI 助手:知识咨询与代码集成
|
|
256
|
-
|
|
257
|
-
在接入 IM SDK 过程中,您可以通过 MCP 使用 AI 助手,快速完成知识咨询、报错排查和 UIKit 集成代码生成。支持 Web/Android/iOS/Flutter/uni-app 等平台,答案基于官方文档。适用于查询 SDK API、UI 组件用法、服务端 API 与 IM 产品配置等场景,[立即体验,提出您的第一个问题](https://cloud.tencent.com/document/product/269/126983)。
|
|
258
|
-
|
|
259
255
|
## 常见问题
|
|
260
256
|
|
|
261
257
|
### 音视频常见问题
|