@tencentcloud/sdk-mcp 1.7.7 → 1.7.9-beta.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 +13 -0
- package/README.md +7 -9
- package/index.js +8 -8
- package/knowledge/chunker.js +1 -0
- package/knowledge/doc-url-resolver.js +16 -9
- package/knowledge/embedding/build-vectors.js +92 -0
- package/knowledge/embedding/embed-model.js +41 -0
- package/knowledge/embedding/vector-augment.js +126 -0
- package/knowledge/embedding/vector-index.js +70 -0
- package/knowledge/frontmatter-meta.js +23 -0
- package/knowledge/path-meta.js +56 -0
- package/knowledge/search/exact-lookup.js +145 -16
- package/knowledge/search/filter-pool.js +77 -33
- package/knowledge/search/rank-profile.js +25 -0
- package/knowledge/search/requires-framework.js +4 -1
- package/knowledge/search/search-core.js +74 -13
- package/knowledge/search/search-knowledge.js +24 -34
- package/knowledge/search/search-pass.js +495 -169
- package/knowledge/search/url-row-scorer.js +24 -6
- package/package.json +3 -1
- package/resource/index/manifest.json +1 -1
- package/resource/index/vectors/index.json +4 -0
- package/resource/integration/callkit/preset/android/integration.md +0 -2
- package/resource/integration/callkit/preset/ios/integration.md +0 -2
- package/resource/integration/chat/preset/react/integration.md +9 -5
- package/resource/integration/chat/preset/uni-app/integration.md +4 -0
- package/resource/integration/chat/preset/vue/integration.md +10 -6
- package/resource/integration/livekit/preset/live/android/prepare-integration.md +0 -4
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +0 -4
- package/resource/integration/roomkit/preset/vue/integration.md +154 -208
- package/resource/knowledge/callkit/best-practice/android/video-chat-dating.md +0 -2
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +0 -4
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +0 -2
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +0 -4
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +0 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +0 -2
- package/resource/knowledge/callkit/faq/ios.md +0 -2
- package/resource/knowledge/callkit/faq/uniapp-app.md +0 -2
- package/resource/knowledge/callkit/preset/miniprogram/integration.md +2 -3
- package/resource/knowledge/callkit/preset/miniprogram/uniapp-integration.md +0 -2
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +0 -16
- package/resource/knowledge/chat/preset/react/h5/integration.md +16 -5
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +6 -3
- package/resource/knowledge/chat/preset/vue/h5/integration.md +7 -4
- package/resource/knowledge/iot/app/activate-service.md +95 -0
- package/resource/knowledge/iot/app/demo/android.md +93 -0
- package/resource/knowledge/iot/app/demo/ios.md +87 -0
- package/resource/knowledge/iot/app/demo/miniprogram.md +79 -0
- package/resource/knowledge/iot/app/device-binding.md +378 -0
- package/resource/knowledge/iot/app/device-sharing.md +414 -0
- package/resource/knowledge/iot/app/family-management.md +762 -0
- package/resource/knowledge/iot/app/integration/android.md +328 -0
- package/resource/knowledge/iot/app/integration/harmonyos.md +326 -0
- package/resource/knowledge/iot/app/integration/ios.md +351 -0
- package/resource/knowledge/iot/app/integration/miniprogram.md +268 -0
- package/resource/knowledge/iot/app/monitor-playback.md +557 -0
- package/resource/knowledge/iot/app/remote-control.md +139 -0
- package/resource/knowledge/iot/app/video-call.md +559 -0
- package/resource/knowledge/iot/app/wechat-call/device-call-miniprogram.md +204 -0
- package/resource/knowledge/iot/app/wechat-call/miniprogram-call-device.md +193 -0
- package/resource/knowledge/iot/client-api/app/android/txiotcallsession.md +189 -0
- package/resource/knowledge/iot/client-api/app/android/txiotcloudstorage.md +77 -0
- package/resource/knowledge/iot/client-api/app/android/txiotdevicemanager.md +175 -0
- package/resource/knowledge/iot/client-api/app/android/txiotengine.md +172 -0
- package/resource/knowledge/iot/client-api/app/android/txiotenginedef.md +163 -0
- package/resource/knowledge/iot/client-api/app/android/txiotfamilymanager.md +146 -0
- package/resource/knowledge/iot/client-api/app/android/txiotmonitorsession.md +246 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotcallsession.md +191 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotcloudstorage.md +77 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotdevicemanager.md +183 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotengine.md +186 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotenginedef.md +164 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotfamilymanager.md +150 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotmonitorsession.md +252 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotcallsession.md +199 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotcloudstorage.md +76 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotdevicemanager.md +173 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotengine.md +173 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotenginedef.md +171 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotfamilymanager.md +146 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotmonitorsession.md +250 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotcallsession.md +180 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotcloudstorage.md +76 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotdevicemanager.md +281 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotengine.md +183 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotenginedef.md +152 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotfamilymanager.md +179 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotmonitorsession.md +226 -0
- package/resource/knowledge/iot/client-api/device/android-smart-device.md +813 -0
- package/resource/knowledge/iot/client-api/device/linux-rtos-device.md +2027 -0
- package/resource/knowledge/iot/device/activate-service.md +167 -0
- package/resource/knowledge/iot/device/ai-voice-chat/advanced-features/custom-agent.md +171 -0
- package/resource/knowledge/iot/device/ai-voice-chat/advanced-features/smart-device-control.md +721 -0
- package/resource/knowledge/iot/device/ai-voice-chat/integration-guide/android-smart-device.md +247 -0
- package/resource/knowledge/iot/device/ai-voice-chat/integration-guide/linux-rtos-device.md +368 -0
- package/resource/knowledge/iot/device/ai-voice-chat/overview.md +84 -0
- package/resource/knowledge/iot/device/cloud-storage.md +696 -0
- package/resource/knowledge/iot/device/data-model.md +972 -0
- package/resource/knowledge/iot/device/demo/android-smart-device.md +97 -0
- package/resource/knowledge/iot/device/demo/linux-rtos-device.md +106 -0
- package/resource/knowledge/iot/device/device-ota-upgrade.md +237 -0
- package/resource/knowledge/iot/device/dynamic-registration/android-smart-device.md +275 -0
- package/resource/knowledge/iot/device/dynamic-registration/linux-rtos-device.md +297 -0
- package/resource/knowledge/iot/device/login-and-register/android-smart-device.md +131 -0
- package/resource/knowledge/iot/device/login-and-register/linux-rtos-device.md +291 -0
- package/resource/knowledge/iot/device/monitor-pushing/android-smart-device.md +237 -0
- package/resource/knowledge/iot/device/monitor-pushing/linux-rtos-device.md +493 -0
- package/resource/knowledge/iot/device/video-call/android-smart-device.md +299 -0
- package/resource/knowledge/iot/device/video-call/linux-rtos-device.md +465 -0
- package/resource/knowledge/iot/device/wechat-call/android-smart-device.md +534 -0
- package/resource/knowledge/iot/device/wechat-call/linux-rtos-device.md +681 -0
- package/resource/knowledge/iot/kids-watch/overview.md +28 -0
- package/resource/knowledge/iot/security-camera/activate-service.md +74 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/app-integration.md +302 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/device-integration/android.md +237 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/device-integration/linux-rtos.md +493 -0
- package/resource/knowledge/iot/security-camera/overview.md +31 -0
- package/resource/knowledge/iot/security-camera/ptz-control.md +153 -0
- package/resource/knowledge/iot/security-camera/recording-and-snapshot.md +182 -0
- package/resource/knowledge/iot/security-camera/voice-intercom.md +174 -0
- package/resource/knowledge/iot/smart-vision/serviceoverview.md +114 -0
- package/resource/knowledge/iot/voice-recorder/app-demo.md +99 -0
- package/resource/knowledge/iot/voice-recorder/device-demo.md +189 -0
- package/resource/knowledge/iot/voice-recorder/overview.md +64 -0
- package/resource/knowledge/livekit/core-sdk/features/android/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/android/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/android/live-list.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/audio-effect.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/live-list.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/uni-app/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/uni-app/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/android/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/flutter/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/ios/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/ios/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/uni-app/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/android/integration.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/flutter/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/ios/integration.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/integration.md +0 -2
- package/resource/knowledge/livekit/faq/error-code.md +0 -2
- package/resource/knowledge/push/config/android/honor.md +16 -1
- package/resource/knowledge/push/config/android/huawei.md +20 -4
- package/resource/knowledge/push/config/android/meizu.md +19 -5
- package/resource/knowledge/push/config/android/vivo.md +20 -1
- package/resource/knowledge/push/config/donut.md +0 -2
- package/resource/knowledge/push/config/harmonyos.md +21 -5
- package/resource/knowledge/push/integration/android.md +0 -5
- package/resource/knowledge/push/integration/donut.md +0 -3
- package/resource/knowledge/push/integration/flutter.md +1 -4
- package/resource/knowledge/push/integration/harmonyos.md +0 -3
- package/resource/knowledge/push/integration/ios.md +0 -3
- package/resource/knowledge/push/integration/react-native.md +0 -5
- package/resource/knowledge/push/integration/uni-app.md +0 -3
- package/resource/knowledge/push/integration/unity.md +0 -3
- package/resource/knowledge/push/integration/unreal-engine.md +0 -3
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/vue/room-view.md +0 -3
- package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +18 -14
- package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +0 -2
- package/resource/knowledge/rtcengine/web/plugin/23-advanced-support-detection.md +30 -0
- package/resource/knowledge/rtcengine/web/plugin/24-advanced-network-quality.md +0 -2
- package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/36-advanced-virtual-background.md +4 -0
- package/resource/knowledge/trtc/android/TRTCCloud.md +94 -85
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +48 -46
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +48 -48
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +18 -18
- package/resource/knowledge/trtc/android/TXDeviceManager.md +4 -4
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +90 -90
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +18 -18
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +9 -9
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +47 -47
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +47 -45
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/ios/TRTCCloud.md +93 -93
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +50 -50
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +8 -8
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +9 -9
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/ios/TXLiveSDKTypeDef.md +48 -46
- package/server-config.js +8 -9
- package/server.js +1 -1
- package/tools/common/finalize_answer.js +1 -1
- package/tools/common/present_framework_choice.js +1 -1
- package/tools/common/search_trtc_knowledge.js +22 -3
- package/tools/definitions/search_trtc_knowledge_def.js +3 -2
- package/utils/preflight-route.js +19 -2
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -39,7 +39,7 @@ npm run dev
|
|
|
39
39
|
> **说明:**
|
|
40
40
|
> 示例项目地址:[点击查看 Gitee 示例项目](https://gitee.com/tencent-cloud-uikit/rtc-chat-web)。
|
|
41
41
|
>
|
|
42
|
-
>
|
|
42
|
+
> 示例项目用于帮助您快速体验完整接入效果,并对照接入流程。若您需要在已有项目中集成,建议继续阅读下方步骤,按文档逐步完成接入。
|
|
43
43
|
>
|
|
44
44
|
|
|
45
45
|
## 创建项目
|
|
@@ -78,7 +78,7 @@ npm create vite@latest
|
|
|
78
78
|
|
|
79
79
|
【shell】
|
|
80
80
|
``` bash
|
|
81
|
-
npm i @tencentcloud/chat-uikit-react
|
|
81
|
+
npm i @tencentcloud/chat-uikit-react @trtc/calls-uikit-react
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
### 步骤 2. 引入组件
|
|
@@ -111,6 +111,7 @@ import {
|
|
|
111
111
|
useUIKit,
|
|
112
112
|
useChatContext,
|
|
113
113
|
} from "@tencentcloud/chat-uikit-react";
|
|
114
|
+
import { TUICallKit } from '@trtc/calls-uikit-react';
|
|
114
115
|
import { IconChat, IconUsergroup, IconBulletpoint, IconSearch } from "@tencentcloud/uikit-base-component-react";
|
|
115
116
|
|
|
116
117
|
function App() {
|
|
@@ -118,6 +119,7 @@ function App() {
|
|
|
118
119
|
// 主题支持 light(default) / dark
|
|
119
120
|
return (
|
|
120
121
|
<UIKitProvider theme={'light'} language={'zh-CN'}>
|
|
122
|
+
<TUICallKit className="call-kit" />
|
|
121
123
|
<ChatApp />
|
|
122
124
|
</UIKitProvider>
|
|
123
125
|
);
|
|
@@ -397,12 +399,12 @@ npm run dev
|
|
|
397
399
|
### 音视频通话
|
|
398
400
|
|
|
399
401
|
> **说明:**
|
|
400
|
-
> TUICallKit 是腾讯云推出一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
401
|
-
>
|
|
402
|
+
> - TUICallKit 是腾讯云推出一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
402
403
|
> 更多详细信息可参考:音视频通话-开通服务。
|
|
403
404
|
>
|
|
405
|
+
> - 在上面的过程中已经集成了 TUICallKit,若不需要音视频通话功能,可参考以下过程移除集成代码。
|
|
404
406
|
|
|
405
|
-
1. 安装 `@trtc/calls-uikit-react`
|
|
407
|
+
1. 安装 `@trtc/calls-uikit-react` 依赖。
|
|
406
408
|
|
|
407
409
|
``` bash
|
|
408
410
|
npm install @trtc/calls-uikit-react
|
|
@@ -432,6 +434,8 @@ npm run dev
|
|
|
432
434
|
```
|
|
433
435
|
4. 拨打语音通话
|
|
434
436
|
|
|
437
|
+
5. 如果不需要集成音视频通话,可以通过移除 `<TUICallKit />`、修改 ChatHeader 组件的 enableCall 属性,来移除音视频通话的能力。
|
|
438
|
+
|
|
435
439
|
### 云端搜索
|
|
436
440
|
|
|
437
441
|
> **说明:**
|
|
@@ -472,6 +472,10 @@ import { initCallService } from '@/uni_modules/tuikit-atomic-x/server/callServic
|
|
|
472
472
|
initCallService();
|
|
473
473
|
```
|
|
474
474
|
|
|
475
|
+
## 集成音视频会议
|
|
476
|
+
|
|
477
|
+
集成 [TUIRoomKit](https://cloud.tencent.com/document/product/647/133183),快速获得开箱即用的多人音视频会议能力。
|
|
478
|
+
|
|
475
479
|
## 常见问题
|
|
476
480
|
|
|
477
481
|
### 技术兼容性类
|
|
@@ -32,9 +32,9 @@ chat-uikit-vue3 主要分为 ConversationList、Chat、MessageList、ChatHeader
|
|
|
32
32
|
|
|
33
33
|
- Node.js(Node.js ≥ 20.0.0,建议使用目前的 LTS v22 版本)
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## 快速体验完整接入项目
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
**您可以直接克隆我们已经完成接入的示例项目,**以快速查看跑通完整效果,或在接入过程中对照最终代码结构。示例项目已完成 Chat UIKit 相关依赖安装、组件引入、初始化配置和基础页面接入,适合作为接入参考。
|
|
38
38
|
``` bash
|
|
39
39
|
git clone https://gitee.com/tencent-cloud-uikit/rtc-chat-web.git
|
|
40
40
|
cd chat-desktop-vue3
|
|
@@ -45,7 +45,7 @@ npm run dev
|
|
|
45
45
|
> **说明:**
|
|
46
46
|
> 示例项目地址:[点击查看 Gitee 示例项目](https://gitee.com/tencent-cloud-uikit/rtc-chat-web)。
|
|
47
47
|
>
|
|
48
|
-
>
|
|
48
|
+
> 示例项目用于帮助您快速体验完整接入效果。若您需要在已有项目中集成,建议继续阅读下方步骤,按文档逐步完成接入。
|
|
49
49
|
>
|
|
50
50
|
|
|
51
51
|
## 创建项目
|
|
@@ -94,7 +94,7 @@ cd chat-integration-vue3
|
|
|
94
94
|
|
|
95
95
|
【shell】
|
|
96
96
|
``` bash
|
|
97
|
-
npm i @tencentcloud/chat-uikit-vue3@6 tuikit-atomicx-vue3@6
|
|
97
|
+
npm i @tencentcloud/chat-uikit-vue3@6 tuikit-atomicx-vue3@6 @trtc/calls-uikit-vue
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
### 步骤2:引入组件
|
|
@@ -109,6 +109,7 @@ npm i @tencentcloud/chat-uikit-vue3@6 tuikit-atomicx-vue3@6
|
|
|
109
109
|
``` typescript
|
|
110
110
|
<template>
|
|
111
111
|
<UIKitProvider language="zh-CN" theme="light">
|
|
112
|
+
<TUICallKit class="call-kit" />
|
|
112
113
|
<ChatLayout v-if="isLoggedIn" />
|
|
113
114
|
</UIKitProvider>
|
|
114
115
|
</template>
|
|
@@ -116,6 +117,7 @@ npm i @tencentcloud/chat-uikit-vue3@6 tuikit-atomicx-vue3@6
|
|
|
116
117
|
<script setup lang="ts">
|
|
117
118
|
import { ref } from 'vue';
|
|
118
119
|
import { UIKitProvider, useLoginState } from '@tencentcloud/chat-uikit-vue3';
|
|
120
|
+
import { TUICallKit } from '@trtc/calls-uikit-vue';
|
|
119
121
|
import ChatLayout from './components/ChatLayout.vue';
|
|
120
122
|
|
|
121
123
|
const { login } = useLoginState();
|
|
@@ -364,10 +366,10 @@ npm run dev
|
|
|
364
366
|
### 音视频通话
|
|
365
367
|
|
|
366
368
|
> **说明:**
|
|
367
|
-
> TUICallKit 是腾讯云推出一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
368
|
-
>
|
|
369
|
+
> - TUICallKit 是腾讯云推出一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
369
370
|
> 更多详细信息可参考:音视频通话-开通服务。
|
|
370
371
|
>
|
|
372
|
+
> - 在上面的过程中已经集成了 TUICallKit,若不需要音视频通话功能,可参考以下过程移除集成代码。
|
|
371
373
|
|
|
372
374
|
1. 安装 `@trtc/calls-uikit-vue` 依赖。
|
|
373
375
|
|
|
@@ -416,6 +418,8 @@ npm run dev
|
|
|
416
418
|
```
|
|
417
419
|
4. 拨打语音通话。
|
|
418
420
|
|
|
421
|
+
5. 如果不需要集成音视频通话,可以通过移除 `<TUICallKit />`、移除 MessageInput 组件的 #headerToolbar 插槽中的 VideoCallPicker 和 AudioCallPicker 组件,来移除音视频通话的能力。
|
|
422
|
+
|
|
419
423
|
### 视频会议
|
|
420
424
|
|
|
421
425
|
TUIRoomKit 是一款定位企业会议、网络研讨会、在线教育等多人音视频会话场景的含 UI 低代码组件,提供房间管理、成员管理、屏幕分享等会控功能,支持标清、高清、超高清等多种画质。
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
- **SDKSecretKey:**应用密钥,仅用于本地调试时生成 UserSig,不可写入生产代码。
|
|
11
11
|
|
|
12
|
-
- **UserSig:**登录凭证。须由业务服务端签发并下发,切勿在客户端硬编码 SDKSecretKey。本地调试可用 `genTestUserSig` 生成临时签名,不可用于生产,详见 [正式运行阶段如何计算 UserSig](https://cloud.tencent.com/document/product/647/17275#formal)。
|
|
13
|
-
|
|
14
12
|
### 环境准备
|
|
15
13
|
- **Node.js:**≥ 18.19.1 (推荐使用官方 LTS 版本)。
|
|
16
14
|
|
|
@@ -18,7 +16,8 @@
|
|
|
18
16
|
|
|
19
17
|
- **媒体设备:**建议配备摄像头、麦克风和扬声器。缺少相应设备时仍可入会,但对应音视频能力不可用。
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
## 安装与初始化
|
|
20
|
+
1. **安装 SDK**
|
|
22
21
|
|
|
23
22
|
【npm】
|
|
24
23
|
``` bash
|
|
@@ -38,243 +37,190 @@ pnpm install @tencentcloud/roomkit-web-vue3 tuikit-atomicx-vue3 @tencentcloud/ui
|
|
|
38
37
|
yarn add @tencentcloud/roomkit-web-vue3 tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
2. **初始化实例**
|
|
41
|
+
|
|
42
|
+
在业务页面的 `<script setup>` 中初始化会议实例:
|
|
43
|
+
|
|
44
|
+
``` typescript
|
|
45
|
+
<script setup>
|
|
46
|
+
import { RoomKit, genTestUserSig } from '@tencentcloud/roomkit-web-vue3';
|
|
47
|
+
const SDKAppID = 0; // 替换为您在开通服务阶段获取的 SDKAppID
|
|
48
|
+
const SDKSecretKey = ''; // 替换为您在开通服务阶段获取的 SDKSecretKey
|
|
49
|
+
const userId = 'your_user_id'; // 业务侧用户唯一标识
|
|
50
|
+
|
|
51
|
+
const { userSig } = genTestUserSig({ sdkAppId: SDKAppID, secretKey: SDKSecretKey, userId });
|
|
52
|
+
const room = RoomKit.getInstance({ sdkAppId: SDKAppID, userId, userSig });
|
|
53
|
+
</script>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> **说明:**
|
|
57
|
+
>
|
|
58
|
+
> 示例采用客户端生成 UserSig 的方式,仅可用于本地开发调试。正式环境请改为由业务服务端生成 UserSig,详见 正式运行阶段如何计算 UserSig。
|
|
59
|
+
>
|
|
60
|
+
|
|
61
|
+
## 发起会议
|
|
62
|
+
|
|
63
|
+
用户点击“发起会议”时,调用 `createAndJoin` 创建并进入会议,传入以下参数:
|
|
64
|
+
- `roomId`: 业务生成的房间号,同一应用内不能重复,长度为 1~48 字节,仅支持英文字母(区分大小写)、数字、下划线 _ 和连字符 -。
|
|
65
|
+
|
|
66
|
+
- `password`: 参会密码,可不传;设置后,其他用户调用 join 时,RoomKit 会自动弹出密码输入框,验证通过后即可入会。
|
|
67
|
+
|
|
68
|
+
``` typescript
|
|
69
|
+
<script setup>
|
|
70
|
+
const hostMeeting = async () => {
|
|
71
|
+
// room 为“安装与初始化”中创建的实例
|
|
72
|
+
await room.createAndJoin({
|
|
73
|
+
roomId: 'meeting_001', // 替换为业务生成的唯一房间号
|
|
74
|
+
password: '123456', // 参会密码
|
|
75
|
+
// 方式一:页面指定区域显示
|
|
76
|
+
container: { appendTo: '#meeting' },
|
|
77
|
+
// 方式二:固定尺寸弹窗显示
|
|
78
|
+
// container: { appendTo: 'body', width: '960px', height: '640px' },
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
82
|
+
<template>
|
|
83
|
+
<button @click="hostMeeting">发起会议</button>
|
|
84
|
+
<!-- 仅方式一需要,用于显示会议界面 -->
|
|
85
|
+
<div id="meeting" style="width: 1080px; height: 720px"></div>
|
|
86
|
+
</template>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 加入会议
|
|
90
|
+
|
|
91
|
+
调用 `join` 并传入已预定或创建的房间号 `roomId`,即可加入会议。
|
|
48
92
|
``` typescript
|
|
49
93
|
<script setup>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
94
|
+
const joinMeeting = async () => {
|
|
95
|
+
// room 为“安装与初始化”中创建的实例
|
|
96
|
+
await room.join({
|
|
97
|
+
roomId: 'meeting_001',
|
|
98
|
+
// 方式一:页面指定区域显示
|
|
99
|
+
container: { appendTo: '#meeting' },
|
|
100
|
+
// 方式二:固定尺寸弹窗显示
|
|
101
|
+
// container: { appendTo: 'body', width: '960px', height: '640px' },
|
|
58
102
|
});
|
|
59
|
-
|
|
60
|
-
const myRoomId = `room_${Date.now()}`; // 由业务生成,需保证全局唯一
|
|
61
|
-
await room.createAndJoin({ container: '#meeting', roomId: myRoomId });
|
|
62
|
-
};
|
|
103
|
+
}
|
|
63
104
|
</script>
|
|
64
|
-
|
|
65
105
|
<template>
|
|
66
|
-
<button @click="
|
|
67
|
-
<!--
|
|
68
|
-
<div id="meeting" style="width: 1080px; height:
|
|
106
|
+
<button @click="joinMeeting">加入会议</button>
|
|
107
|
+
<!-- 仅方式一需要,用于显示会议界面 -->
|
|
108
|
+
<div id="meeting" style="width: 1080px; height: 720px"></div>
|
|
69
109
|
</template>
|
|
70
110
|
```
|
|
71
111
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
#### **场景一:客户端预订**
|
|
112
|
+
## 预定会议
|
|
75
113
|
|
|
76
|
-
|
|
114
|
+
#### **客户端预定**
|
|
77
115
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
#### **场景二:服务端预订**
|
|
81
|
-
|
|
82
|
-
**适用场景:**会议排期完全由业务系统统一管理,不由客户端发起(如政务、医疗、大型企业 OA 等强管控场景)。
|
|
83
|
-
|
|
84
|
-
**实现方式:**由业务服务端调用 [服务端 REST API 创建房间](https://cloud.tencent.com/document/product/647/104446),在 invitees 中指定受邀成员后,这些成员在客户端同样能拉取到该会议。
|
|
85
|
-
|
|
86
|
-
### 加入会议
|
|
87
|
-
|
|
88
|
-
房间已经存在时调用 `join` 接口,参数中传入 `roomId`。
|
|
116
|
+
调用 `scheduleRoom` 预定会议,通过 `scheduleStartTime` 指定开始时间、`scheduleAttendees` 指定参会人、`password` 设置参会密码。
|
|
89
117
|
``` typescript
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
await
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
118
|
+
import { useLoginState, useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
119
|
+
const { login } = useLoginState();
|
|
120
|
+
const { scheduleRoom } = useRoomState();
|
|
121
|
+
const schedule = async () => {
|
|
122
|
+
await login({
|
|
123
|
+
sdkAppId: 0, // 控制台获取的 SDKAppID
|
|
124
|
+
userId: 'your_user_id', // 业务侧用户唯一标识
|
|
125
|
+
userSig: 'your_user_sig', // 由业务服务端签发并下发
|
|
126
|
+
});
|
|
127
|
+
const start = Math.floor(Date.now() / 1000) + 3600;
|
|
128
|
+
await scheduleRoom({
|
|
129
|
+
roomId: 'meeting_002', // 业务生成的唯一房间号,规则同“发起会议”
|
|
130
|
+
options: {
|
|
131
|
+
roomName: '产品需求评审', // 会议名称
|
|
132
|
+
scheduleStartTime: start, // 秒级时间戳,示例为 1 小时后开始
|
|
133
|
+
scheduleEndTime: start + 1800, // 秒级时间戳,示例为开会 30 分钟后结束
|
|
134
|
+
scheduleAttendees: ['userA', 'userB'], // 参会人的 userId 列表
|
|
135
|
+
password: '739251', // 参会密码;不设置密码时省略
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
}
|
|
108
139
|
```
|
|
109
140
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
TUIRoomKit 已在界面上内置离开与解散房间功能,用户可直接点击 **离开房间** 或 **解散房间** 完成操作。
|
|
113
|
-
|
|
114
|
-
如需在业务代码中主动触发离开或解散,可调用以下接口,接口执行完成即代表退出成功,**不会触发** `exited` **事件**。
|
|
141
|
+
#### **服务端预定**
|
|
115
142
|
|
|
116
|
-
|
|
143
|
+
如果您希望由后台业务系统而不是客户端来预定会议,可以使用我们提供的 [REST API](https://cloud.tencent.com/document/product/647/104446)。
|
|
117
144
|
|
|
118
|
-
|
|
119
|
-
``` typescript
|
|
120
|
-
const room = RoomKit.getShareInstance({
|
|
121
|
-
sdkAppId: 0, // 控制台获取的 SDKAppID
|
|
122
|
-
userId: 'your_user_id', // 业务侧用户唯一标识
|
|
123
|
-
userSig: 'your_user_sig', // 由业务服务端签发并下发,切勿在客户端硬编码 SDKSecretKey
|
|
124
|
-
});
|
|
145
|
+
## 界面定制
|
|
125
146
|
|
|
126
|
-
|
|
127
|
-
```
|
|
147
|
+
TUIRoomKit 支持定制视频画面信息、主题、字体、语言和联系人列表,均通过 `setUIConfig` 配置。该方法在入会前和会议过程中均可调用,每次只更新传入的配置项,未传入的保持不变。
|
|
128
148
|
|
|
129
|
-
|
|
130
|
-
> 房主离开房间或关闭网页,不会自动解散房间,其他参会成员可继续正常使用 TUIRoomKit 能力,系统会在会议结束时间后 6 小时、且房间内人数为 0 时自动回收房间资源
|
|
131
|
-
>
|
|
149
|
+
### 视频画面信息
|
|
132
150
|
|
|
133
|
-
|
|
151
|
+
TUIRoomKit 会在每路视频画面上叠加一层信息,默认展示参会者的头像、显示名、麦克风状态和主持人标识,屏幕共享画面则显示共享提示。如果默认的内容或样式不满足需求,可通过 `participantViewUI` 自行定义这层信息。
|
|
134
152
|
|
|
135
|
-
|
|
153
|
+
**步骤1:**编写视频画面信息组件。
|
|
136
154
|
``` typescript
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
// ParticipantOverlay.vue
|
|
156
|
+
<template>
|
|
157
|
+
<div class="overlay">
|
|
158
|
+
<div v-if="streamType === VideoStreamType.Screen" class="sharing">正在共享屏幕</div>
|
|
159
|
+
<div v-else class="info">
|
|
160
|
+
<span class="name">{{ participant.nameCard || participant.userName || participant.userId }}</span>
|
|
161
|
+
<span v-if="participant.microphoneStatus === DeviceStatus.Off" class="muted">已静音</span>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</template>
|
|
165
|
+
<script setup lang="ts">
|
|
166
|
+
import { DeviceStatus, VideoStreamType } from 'tuikit-atomicx-vue3/room';
|
|
167
|
+
import type { RoomParticipant } from 'tuikit-atomicx-vue3/room';
|
|
168
|
+
defineProps<{
|
|
169
|
+
participant: RoomParticipant;
|
|
170
|
+
streamType: VideoStreamType;
|
|
171
|
+
}>();
|
|
172
|
+
</script>
|
|
145
173
|
```
|
|
146
174
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
房间可能因用户离开、被解散、被踢或登录态失效而结束。TUIRoomKit 会处理底层音视频资源与界面提示,**页面怎么走由业务接管**。通过 `on('exited')` 监听退出,在回调中恢复业务页面,该方法返回一个取消监听的函数。
|
|
175
|
+
**步骤2:**通过 `setUIConfig` 方法传入该组件。
|
|
150
176
|
``` typescript
|
|
151
|
-
import
|
|
152
|
-
import { RoomKit, ExitReason } from '@tencentcloud/roomkit-web-vue3';
|
|
153
|
-
|
|
154
|
-
const room = RoomKit.getShareInstance({
|
|
155
|
-
sdkAppId: 0, // 控制台获取的 SDKAppID
|
|
156
|
-
userId: 'your_user_id',
|
|
157
|
-
userSig: 'your_user_sig', // 由业务服务端签发
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
const offExited = room.on('exited', ({ roomId, reason }) => {
|
|
161
|
-
switch(reason) {
|
|
162
|
-
case ExitReason.KickedOffline:
|
|
163
|
-
case ExitReason.UserSigExpired:
|
|
164
|
-
backToLogin(); // 业务侧的登录逻辑
|
|
165
|
-
break;
|
|
166
|
-
default:
|
|
167
|
-
// 隐藏会议容器或返回上一页
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
});
|
|
177
|
+
import ParticipantOverlay from './ParticipantOverlay.vue';
|
|
171
178
|
|
|
172
|
-
|
|
179
|
+
// room 为 RoomKit.getInstance() 返回的会议实例
|
|
180
|
+
room.setUIConfig({ participantViewUI: ParticipantOverlay });
|
|
173
181
|
```
|
|
174
182
|
|
|
175
|
-
`reason` 的取值及触发时机如下。
|
|
176
|
-
|
|
177
|
-
|`reason`|触发时机|
|
|
178
|
-
|---------|---------|
|
|
179
|
-
|`ExitReason.RoomLeave`|用户点击界面上的「离开会议」按钮,或在密码输入框中点击取消|
|
|
180
|
-
|`ExitReason.RoomDismiss`|会议被解散,对所有成员触发|
|
|
181
|
-
|`ExitReason.KickedOut`|被房主踢出会议|
|
|
182
|
-
|`ExitReason.RoomError`|会议界面已挂载后进房失败(如输入密码后进房失败),TUIRoomKit 会先给出错误提示。界面挂载前的失败不触发本事件:`join` 由 TUIRoomKit 弹出错误提示且 Promise resolve,`createAndJoin` 当场失败则抛出异常|
|
|
183
|
-
|`ExitReason.KickedOffline`|同一账号在其他设备登录,当前设备被强制下线|
|
|
184
|
-
|`ExitReason.UserSigExpired`|UserSig 已过期|
|
|
185
|
-
|
|
186
183
|
> **说明:**
|
|
187
|
-
>
|
|
188
|
-
>
|
|
189
|
-
|
|
190
|
-
## 界面定制
|
|
184
|
+
> 1. `participantViewUI` 传入的组件会同时用于摄像头画面和屏幕共享画面,如需对两者做不同展示,可在组件内通过 `streamType` 区分。
|
|
185
|
+
> 2. 视频流的采集、订阅、渲染,以及宫格、演讲者等画面布局仍由 TUIRoomKit 负责,不受 `participantViewUI` 影响。
|
|
191
186
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
### 配置主题及语言
|
|
195
|
-
|
|
196
|
-
会议界面默认使用浅色主题,界面语言跟随浏览器语言。用户可在会中通过内置的主题、语言按钮自行切换;如需隐藏这两个按钮。更多自定义主题及语言。
|
|
197
|
-
|
|
198
|
-
### 调整工具栏按钮
|
|
199
|
-
|
|
200
|
-
会议界面的工具栏按钮默认全部展示。如需隐藏某些能力(如后台系统不需要主题切换、教育场景不开放屏幕共享),可调用 `setWidgetVisible`:
|
|
201
|
-
``` typescript
|
|
202
|
-
import { RoomKit, BuiltinWidget } from '@tencentcloud/roomkit-web-vue3';
|
|
203
|
-
|
|
204
|
-
const room = RoomKit.getShareInstance({
|
|
205
|
-
sdkAppId: 0, // 控制台获取的 SDKAppID
|
|
206
|
-
userId: 'your_user_id',
|
|
207
|
-
userSig: 'your_user_sig', // 由业务服务端签发
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
room.setWidgetVisible({
|
|
211
|
-
[BuiltinWidget.ScreenShareWidget]: false, // 隐藏屏幕共享
|
|
212
|
-
[BuiltinWidget.ThemeWidget]: false, // 隐藏主题切换
|
|
213
|
-
});
|
|
214
|
-
```
|
|
187
|
+
### 主题与语言
|
|
215
188
|
|
|
216
|
-
|
|
189
|
+
TUIRoomKit 支持通过 `setUIConfig` 调整界面的主题、字体和语言。
|
|
217
190
|
``` typescript
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
191
|
+
// room 为 RoomKit.getInstance() 返回的会议实例
|
|
192
|
+
room.setUIConfig({
|
|
193
|
+
theme: {
|
|
194
|
+
themeStyle: 'light',
|
|
195
|
+
primaryColor: '#07C160',
|
|
196
|
+
backgroundColor: '#F2FAF5',
|
|
197
|
+
textColor: '#122B1C',
|
|
198
|
+
},
|
|
199
|
+
fontFamily: "'Avenir Next', Avenir, 'Helvetica Neue', 'PingFang SC', sans-serif",
|
|
200
|
+
language: 'en-US',
|
|
223
201
|
});
|
|
224
202
|
```
|
|
225
203
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
1. 使用 [账号管理 > 导入多个账号](https://cloud.tencent.com/document/product/269/4919) REST API 接口批量导入用户账号。
|
|
232
|
-
|
|
233
|
-
2. 使用 [好友管理 > 导入好友](https://cloud.tencent.com/document/product/269/8301) REST API 接口批量导入用户关系链。
|
|
204
|
+
|配置项|默认值|说明|
|
|
205
|
+
|---------|---------|---------|
|
|
206
|
+
|`theme`|浅色主题、蓝色主色|`themeStyle` 可切换 `'light'`、`'dark'` 两套风格。也可通过 `primaryColor`、`backgroundColor`、`textColor` 自定义主色、背景色和文字色。|
|
|
207
|
+
|`fontFamily`|`'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif`|会议界面的全局字体。|
|
|
208
|
+
|`language`|跟随浏览器语言|可指定为 `'zh-CN'` 或 `'en-US'`。|
|
|
234
209
|
|
|
235
|
-
###
|
|
210
|
+
### 导入联系人
|
|
236
211
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
如您需要修改链接地址,可调用 `setFeatureConfig` 更新分享链接。
|
|
212
|
+
会中邀请他人加入会议时,默认显示当前用户的腾讯云 IM 好友。如需使用您的业务联系人,可参考以下代码配置 `contactList`。
|
|
240
213
|
``` typescript
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
// 在 createAndJoin / join 成功之后立即调用,确保 roomId 已知
|
|
250
|
-
const roomId = '123456';
|
|
251
|
-
room.setFeatureConfig({
|
|
252
|
-
shareLink: `https://your-domain.com/room?roomId=${roomId}`,
|
|
214
|
+
// room 为 RoomKit.getInstance() 返回的会议实例
|
|
215
|
+
room.setUIConfig({
|
|
216
|
+
contactList: () => [
|
|
217
|
+
{ userId: 'denny', userName: 'Denny' },
|
|
218
|
+
{ userId: 'tommy', userName: 'Tommy' },
|
|
219
|
+
{ userId: 'lucy', userName: 'Lucy' },
|
|
220
|
+
],
|
|
253
221
|
});
|
|
254
222
|
```
|
|
255
223
|
|
|
256
|
-
### 设置视频布局及挂件
|
|
257
|
-
|
|
258
|
-
TUIRoomKit 目前支持九宫格、侧边栏及顶部栏三种流布局,默认为九宫格布局,开发者可调用 `setFeatureConfig` 修改默认视频布局。
|
|
259
|
-
``` typescript
|
|
260
|
-
import { RoomKit } from '@tencentcloud/roomkit-web-vue3';
|
|
261
|
-
import { RoomLayoutTemplate } from 'tuikit-atomicx-vue3/room';
|
|
262
|
-
|
|
263
|
-
const room = RoomKit.getShareInstance({
|
|
264
|
-
sdkAppId: 0, // 控制台获取的 SDKAppID
|
|
265
|
-
userId: 'your_user_id',
|
|
266
|
-
userSig: 'your_user_sig', // 由业务服务端签发
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
// 方案一:修改默认视频流布局为侧边栏布局
|
|
270
|
-
room.setFeatureConfig({ layoutTemplate: RoomLayoutTemplate.SidebarLayout });
|
|
271
|
-
|
|
272
|
-
// 方案二:修改默认视频流布局为顶部栏布局
|
|
273
|
-
room.setFeatureConfig({ layoutTemplate: RoomLayoutTemplate.CinemaLayout });
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
TUIRoomKit 默认内置以下视频流挂件,如您需要自定义视频流挂件。
|
|
277
|
-
|
|
278
224
|
## 常见问题
|
|
279
225
|
|
|
280
226
|
### 创建房间的用户(房主)关闭网页或异常退出后,会议会立即结束吗?
|
|
@@ -307,12 +253,12 @@ TUIRoomKit 默认内置以下视频流挂件,如您需要自定义视频流挂
|
|
|
307
253
|
### 是否支持使用 iframe 集成?
|
|
308
254
|
|
|
309
255
|
支持。使用 iframe 集成 TUIRoomKit 时, 需要在 iframe 标签中配置 allow 属性以授予必要的浏览器权限(麦克风、摄像头、屏幕共享、全屏等),示例如下:
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
<iframe src="https://your-domain.com/index.html" allow="microphone; camera; display-capture; display; fullscreen;">
|
|
256
|
+
``` html
|
|
257
|
+
<!-- 开启麦克风、摄像头、屏幕分享、全屏权限 -->
|
|
258
|
+
<iframe src="https://your-domain.com/index.html" allow="microphone; camera; display-capture; display; fullscreen;"></iframe>
|
|
313
259
|
```
|
|
314
260
|
|
|
315
|
-
更多信息可参考 内嵌页面 (iframe
|
|
261
|
+
更多信息可参考 内嵌页面 (iframe)。
|
|
316
262
|
|
|
317
263
|
### 是否支持设置内网代理?
|
|
318
264
|
|
|
@@ -327,8 +273,8 @@ TUIRoomKit 已提供丰富的 UI 自定义能力,包括 主题及语言、界
|
|
|
327
273
|
|
|
328
274
|
若您已充分评估维护风险,且业务存在必须修改底层结构的深度定制需求,可按以下步骤导出源码:
|
|
329
275
|
|
|
330
|
-
|
|
331
|
-
1. 执行源码导出脚本,默认拷贝路径为 `./src/components/RoomKit
|
|
276
|
+
【源码导出步骤】
|
|
277
|
+
1. 执行源码导出脚本,默认拷贝路径为 `./src/components/RoomKit`。
|
|
332
278
|
|
|
333
279
|
``` bash
|
|
334
280
|
node ./node_modules/@tencentcloud/roomkit-web-vue3/scripts/eject.js
|
|
@@ -342,7 +288,7 @@ TUIRoomKit 已提供丰富的 UI 自定义能力,包括 主题及语言、界
|
|
|
342
288
|
// 替换引用路径为 TUIRoomKit 源码的真实路径
|
|
343
289
|
+ import { RoomKit } from './components/RoomKit/index.ts';
|
|
344
290
|
```
|
|
345
|
-
4. 配置 ESLint
|
|
291
|
+
4. 配置 ESLint 校验。
|
|
346
292
|
|
|
347
293
|
如果您导出 TUIRoomKit 源码后运行项目出现 ESLint 报错,您可以在 `.eslintignore` 文件中添加 RoomKit 文件夹忽略 ESLint 检测。
|
|
348
294
|
``` javascript
|