@tencent-rtc/trtc-agent-skills 0.1.0
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/LICENSE +21 -0
- package/README.md +172 -0
- package/README.zh.md +173 -0
- package/bin/cli.js +434 -0
- package/knowledge-base/index.yaml +454 -0
- package/knowledge-base/platform-slice-template.md +233 -0
- package/knowledge-base/scenario-spec.md +350 -0
- package/knowledge-base/scenarios/conference/base/general-conference.md +365 -0
- package/knowledge-base/scenarios/conference/base/webinar-conference.md +130 -0
- package/knowledge-base/scenarios/conference/medical/1v1-video-consultation.md +145 -0
- package/knowledge-base/scenarios/conference/medical/medical-multidoctor-consultation.md +113 -0
- package/knowledge-base/scenarios/live/entertainment-live-room.md +118 -0
- package/knowledge-base/slice-spec.md +546 -0
- package/knowledge-base/slices/conference/web/ai-tools.md +225 -0
- package/knowledge-base/slices/conference/web/beauty-effects.md +188 -0
- package/knowledge-base/slices/conference/web/device-control.md +338 -0
- package/knowledge-base/slices/conference/web/login-auth.md +261 -0
- package/knowledge-base/slices/conference/web/network-quality.md +190 -0
- package/knowledge-base/slices/conference/web/official-roomkit-api.md +298 -0
- package/knowledge-base/slices/conference/web/official-roomkit-login-ui.md +246 -0
- package/knowledge-base/slices/conference/web/participant-list.md +238 -0
- package/knowledge-base/slices/conference/web/participant-management.md +718 -0
- package/knowledge-base/slices/conference/web/prejoin-check.md +293 -0
- package/knowledge-base/slices/conference/web/room-call.md +213 -0
- package/knowledge-base/slices/conference/web/room-chat.md +426 -0
- package/knowledge-base/slices/conference/web/room-lifecycle.md +534 -0
- package/knowledge-base/slices/conference/web/room-schedule.md +281 -0
- package/knowledge-base/slices/conference/web/screen-share.md +211 -0
- package/knowledge-base/slices/conference/web/video-layout.md +675 -0
- package/knowledge-base/slices/conference/web/virtual-background.md +197 -0
- package/knowledge-base/slices/conference/web/webinar-interaction.md +206 -0
- package/knowledge-base/slices/live/anchor-lifecycle.md +122 -0
- package/knowledge-base/slices/live/anchor-preview.md +90 -0
- package/knowledge-base/slices/live/anchor-room-config.md +104 -0
- package/knowledge-base/slices/live/audience-list.md +86 -0
- package/knowledge-base/slices/live/audience-manage.md +92 -0
- package/knowledge-base/slices/live/audience-watch.md +85 -0
- package/knowledge-base/slices/live/audio.md +116 -0
- package/knowledge-base/slices/live/barrage.md +88 -0
- package/knowledge-base/slices/live/beauty.md +99 -0
- package/knowledge-base/slices/live/coguest-apply.md +105 -0
- package/knowledge-base/slices/live/device-control.md +91 -0
- package/knowledge-base/slices/live/error-codes.md +167 -0
- package/knowledge-base/slices/live/gift.md +84 -0
- package/knowledge-base/slices/live/ios/.gitkeep +0 -0
- package/knowledge-base/slices/live/ios/anchor-lifecycle.md +313 -0
- package/knowledge-base/slices/live/ios/anchor-preview.md +228 -0
- package/knowledge-base/slices/live/ios/anchor-room-config.md +257 -0
- package/knowledge-base/slices/live/ios/audience-list.md +353 -0
- package/knowledge-base/slices/live/ios/audience-manage.md +381 -0
- package/knowledge-base/slices/live/ios/audience-watch.md +286 -0
- package/knowledge-base/slices/live/ios/audio.md +373 -0
- package/knowledge-base/slices/live/ios/barrage.md +285 -0
- package/knowledge-base/slices/live/ios/beauty.md +323 -0
- package/knowledge-base/slices/live/ios/coguest-apply.md +506 -0
- package/knowledge-base/slices/live/ios/device-control.md +286 -0
- package/knowledge-base/slices/live/ios/error-codes.md +270 -0
- package/knowledge-base/slices/live/ios/gift.md +315 -0
- package/knowledge-base/slices/live/ios/live-list.md +269 -0
- package/knowledge-base/slices/live/ios/login-auth.md +247 -0
- package/knowledge-base/slices/live/live-list.md +82 -0
- package/knowledge-base/slices/live/login-auth.md +78 -0
- package/package.json +34 -0
- package/skills/trtc/SKILL.md +326 -0
- package/skills/trtc/room-builder/SKILL.md +138 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/README.md +108 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/docs/backend-contract.zh-CN.md +162 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/docs/integration.zh-CN.md +154 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/docs/theme.zh-CN.md +78 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/index.html +12 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/package.json +28 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/postcss.config.js +5 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/App.vue +25 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/ConsultationManagePanel.vue +838 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/LanguageSwitch.vue +102 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/LoadingSpinner.vue +6 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/MedicalAlert.vue +34 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/MedicalBusinessPanel.vue +148 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/MedicalButton.vue +49 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/MedicalConfirmDialog.vue +68 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/MedicalDataPanel.vue +196 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/MedicalRecordPanel.vue +270 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/components/PrescriptionPanel.vue +363 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/config/basic-info-config.ts +29 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/config/lib-generate-test-usersig-es.min.d.ts +4 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/config/lib-generate-test-usersig-es.min.js +2 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/config/runtime-config.ts +12 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/env.d.ts +32 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/components/ConsultationChatPanel.vue +123 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/components/ConsultationMembersPanel.vue +230 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/components/ConsultationTranscriptionPanel.vue +135 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/components/ConsultationVideoStage.vue +113 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/components/InviteDoctorDialog.vue +132 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/components/KickMemberConfirmDialog.vue +50 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/types.ts +77 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/useConsultationChat.ts +97 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/useConsultationDevices.ts +48 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/useConsultationParticipants.ts +121 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/useConsultationPermissions.ts +25 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/features/consultation/utils.ts +70 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/i18n/en-US/index.ts +553 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/i18n/index.ts +25 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/i18n/medicalTranslate.ts +85 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/i18n/state.ts +49 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/i18n/zh-CN/index.ts +463 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/main.ts +12 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/mock/appointments.ts +96 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/mock/users.ts +79 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/router/index.ts +63 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/index.ts +25 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/integration/appointmentService.ts +77 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/integration/authService.ts +38 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/integration/launchContext.ts +31 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/integration/userService.ts +35 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/mock/appointmentService.ts +43 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/mock/authService.ts +33 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/mock/userService.ts +43 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/services/adapters/types.ts +135 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/shared/icons.ts +53 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/styles/index.css +106 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/styles/tailwind.css +3 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/styles/theme.css +209 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/utils/auth.ts +50 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/utils/format.ts +24 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/utils/navigation.ts +12 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/utils/session.ts +28 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/DoctorConsultationView.vue +777 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/DoctorDashboardView.vue +678 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/LoginView.vue +441 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/PatientConsultationFinishedView.vue +185 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/PatientConsultationView.vue +1003 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/PatientSelectDoctorView.vue +317 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/src/views/PatientWaitingView.vue +454 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/tsconfig.json +21 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/tsconfig.node.json +8 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/vite.config.ts +17 -0
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation//346/216/245/345/205/245/350/257/264/346/230/216.md +6 -0
- package/skills/trtc/room-builder/tools/render_ai_instructions.py +226 -0
- package/skills/trtc-apply/SKILL.md +97 -0
- package/skills/trtc-apply/guardrails/apply_lib/__init__.py +0 -0
- package/skills/trtc-apply/guardrails/apply_lib/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/trtc-apply/guardrails/apply_lib/__pycache__/rule_parser.cpython-313.pyc +0 -0
- package/skills/trtc-apply/guardrails/apply_lib/rule_parser.py +268 -0
- package/skills/trtc-docs/SKILL.md +207 -0
- package/skills/trtc-onboarding/SKILL.md +839 -0
- package/skills/trtc-onboarding/reference/path-a1-demo.md +103 -0
- package/skills/trtc-onboarding/reference/path-a2-integrate.md +693 -0
- package/skills/trtc-onboarding/reference/path-b-troubleshoot.md +115 -0
- package/skills/trtc-onboarding/reference/path-c-expand.md +43 -0
- package/skills/trtc-onboarding/reference/reporting-protocol.md +174 -0
- package/skills/trtc-onboarding/reference/supported-matrix.md +100 -0
- package/skills/trtc-onboarding/reference/usersig-handling.md +140 -0
- package/skills/trtc-search/SKILL.md +221 -0
- package/skills/trtc-topic/SKILL.md +638 -0
- package/skills/trtc-topic/guardrails/__pycache__/gate_slice_read.cpython-313.pyc +0 -0
- package/skills/trtc-topic/guardrails/__pycache__/gate_slice_write.cpython-313.pyc +0 -0
- package/skills/trtc-topic/guardrails/__pycache__/stop_require_apply_evidence.cpython-313.pyc +0 -0
- package/skills/trtc-topic/guardrails/gate_slice_read.py +133 -0
- package/skills/trtc-topic/guardrails/gate_slice_write.py +169 -0
- package/skills/trtc-topic/guardrails/stop_require_apply_evidence.py +97 -0
- package/skills/trtc-topic/references/execution-units.yaml +58 -0
- package/skills/trtc-topic/runtime/README.md +50 -0
- package/skills/trtc-topic/runtime/RUNTIME.md +128 -0
- package/skills/trtc-topic/runtime/lib/__init__.py +0 -0
- package/skills/trtc-topic/runtime/lib/platforms.py +194 -0
- package/skills/trtc-topic/runtime/package-lock.json +1211 -0
- package/skills/trtc-topic/runtime/package.json +13 -0
- package/skills/trtc-topic/runtime/telemetry-bridge.mjs +339 -0
- package/skills/trtc-topic/runtime/telemetry_collector.py +293 -0
- package/skills/trtc-topic/scripts/STATE-MACHINE-GUIDE.md +186 -0
- package/skills/trtc-topic/scripts/__pycache__/apply.cpython-313.pyc +0 -0
- package/skills/trtc-topic/scripts/apply.py +581 -0
- package/skills/trtc-topic/scripts/finalize_session.py +113 -0
- package/skills/trtc-topic/scripts/init_slice_queue.py +96 -0
- package/skills/trtc-topic/scripts/lib/__pycache__/state_machine.cpython-313.pyc +0 -0
- package/skills/trtc-topic/scripts/lib/state_machine.py +328 -0
- package/skills/trtc-topic/scripts/next_slice.py +137 -0
- package/skills/trtc-topic/tests/README.md +70 -0
- package/skills/trtc-topic/tests/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/conftest.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_apply_cli.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_apply_cli.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_end_to_end.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_end_to_end.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_finalize_session.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_finalize_session.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_gates.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_gates.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_session_resolver.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_session_resolver.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_state_machine.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_state_machine.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_stop_require_apply.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_stop_require_apply.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_topic_skill_invariants.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_topic_skill_invariants.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/conftest.py +72 -0
- package/skills/trtc-topic/tests/test_apply_cli.py +480 -0
- package/skills/trtc-topic/tests/test_end_to_end.py +305 -0
- package/skills/trtc-topic/tests/test_finalize_session.py +51 -0
- package/skills/trtc-topic/tests/test_gates.py +316 -0
- package/skills/trtc-topic/tests/test_session_resolver.py +260 -0
- package/skills/trtc-topic/tests/test_state_machine.py +414 -0
- package/skills/trtc-topic/tests/test_stop_require_apply.py +99 -0
- package/skills/trtc-topic/tests/test_topic_skill_invariants.py +130 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: conference/network-quality
|
|
3
|
+
name: 网络质量
|
|
4
|
+
product: conference
|
|
5
|
+
platform: web
|
|
6
|
+
tags: [network, quality, loss, delay, NetworkQuality]
|
|
7
|
+
platforms: [web]
|
|
8
|
+
related: [conference/device-control, conference/room-lifecycle, conference/video-layout]
|
|
9
|
+
api_docs:
|
|
10
|
+
- title: 设备及网络
|
|
11
|
+
url: https://cloud.tencent.com/document/product/647/126923
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# 网络质量
|
|
15
|
+
|
|
16
|
+
## 功能说明
|
|
17
|
+
|
|
18
|
+
网络质量负责会议中的连接稳定性观测与弱网提示,帮助用户理解当前延迟、丢包、连接波动和恢复情况,并为卡顿、断线、恢复等体验提供统一的状态表达。它关注的是“网络现在怎么样”,而不是“是否立刻离房或重进房”。
|
|
19
|
+
|
|
20
|
+
## 核心概念
|
|
21
|
+
|
|
22
|
+
### 角色与操作
|
|
23
|
+
|
|
24
|
+
| 角色 | 关键操作 | 说明 |
|
|
25
|
+
|------|----------|------|
|
|
26
|
+
| 当前参会人 | 感知弱网状态 | 通过状态栏、角标或详情面板理解当前网络情况 |
|
|
27
|
+
| UI 状态层 | 映射网络等级 | 把原始时延、丢包和质量等级转成用户可理解的提示 |
|
|
28
|
+
| 房间生命周期模块 | 处理断连与重连 | 网络质量是观察信号,真正的离房和重入仍由房间生命周期负责 |
|
|
29
|
+
| 布局与挂件模块 | 消费弱网状态 | 可在画面单元或工具栏中展示弱网标记 |
|
|
30
|
+
|
|
31
|
+
### 事件流
|
|
32
|
+
|
|
33
|
+
| 阶段 | 参与方 | 关键动作 |
|
|
34
|
+
|------|--------|----------|
|
|
35
|
+
| 网络采样 | SDK / 客户端 | 周期性获取时延、丢包和质量等级 |
|
|
36
|
+
| 状态映射 | UI 状态层 | 把原始值映射成优、良、差、断连等可读状态 |
|
|
37
|
+
| 体验提示 | UI | 在工具栏、状态栏或成员挂件上展示网络提示 |
|
|
38
|
+
| 连接波动 | 房间生命周期 | 若发生断线、重连或恢复,和房间状态一起解释给用户 |
|
|
39
|
+
| 恢复收口 | UI | 网络恢复后更新提示,避免长期停留在错误状态 |
|
|
40
|
+
|
|
41
|
+
### 状态与数据
|
|
42
|
+
|
|
43
|
+
| 数据 / 状态 | 说明 |
|
|
44
|
+
|-------------|------|
|
|
45
|
+
| 网络质量等级 | 用于描述当前连接的大致稳定性 |
|
|
46
|
+
| 时延 | 反映当前链路往返延迟 |
|
|
47
|
+
| 上下行丢包率 | 用于辅助判断是本地发送问题还是接收问题 |
|
|
48
|
+
| 重连相关状态 | 用于解释断线、重连中、恢复等体验阶段 |
|
|
49
|
+
| 弱网提示文案 / 图标 | 面向用户的最终表达层 |
|
|
50
|
+
|
|
51
|
+
### 状态机
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
good
|
|
55
|
+
→ weak
|
|
56
|
+
→ bad
|
|
57
|
+
→ reconnecting
|
|
58
|
+
→ recovered
|
|
59
|
+
→ good
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 前置条件
|
|
63
|
+
**通用依赖**:见 [login-auth 平台 slice](login-auth.md)。
|
|
64
|
+
|
|
65
|
+
**额外依赖**:
|
|
66
|
+
- 已安装 `tuikit-atomicx-vue3@latest`
|
|
67
|
+
|
|
68
|
+
**前置状态**:
|
|
69
|
+
- 已阅读 `conference/network-quality`,明确当前能力的产品边界。
|
|
70
|
+
- 已完成 `conference/login-auth`,确保当前页面具备稳定登录态。
|
|
71
|
+
- 已根据业务流程接入会议上下文;需要房间状态时,优先通过 `conference/room-lifecycle` 统一承接。
|
|
72
|
+
|
|
73
|
+
## 最佳实践
|
|
74
|
+
|
|
75
|
+
### ✅ ALWAYS
|
|
76
|
+
|
|
77
|
+
1. **把原始网络指标映射成稳定、可读的用户提示** —— 用户不需要直接理解每个指标,但需要知道会议当前是否受影响。
|
|
78
|
+
2. **让网络状态与房间生命周期一起解释** —— 弱网提示和重连状态结合起来,体验上更连贯。
|
|
79
|
+
3. **在全局状态栏和局部挂件中复用同一套网络状态** —— 避免不同区域对同一网络情况给出相互矛盾的反馈。
|
|
80
|
+
4. **在恢复后及时清理弱网提示** —— 网络恢复时要同步收口,避免用户仍以为会议处于异常状态。
|
|
81
|
+
|
|
82
|
+
### ❌ NEVER
|
|
83
|
+
|
|
84
|
+
1. **不要把网络质量直接等同于必须离房或重进房** —— 观察信号不应替代真实的生命周期决策。
|
|
85
|
+
2. **不要只显示原始指标而没有语义化表达** —— 这会增加用户理解成本,也不利于产品统一。
|
|
86
|
+
3. **不要混淆本地网络问题与远端成员状态问题** —— 网络提示应明确是谁受影响、影响在哪一侧。
|
|
87
|
+
|
|
88
|
+
## 代码示例
|
|
89
|
+
### 基础接入:把网络质量映射成可读文案
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { computed } from 'vue';
|
|
93
|
+
import { useDeviceState, NetworkQuality } from 'tuikit-atomicx-vue3/room';
|
|
94
|
+
|
|
95
|
+
const { networkInfo } = useDeviceState();
|
|
96
|
+
|
|
97
|
+
const networkText = computed(() => {
|
|
98
|
+
switch (networkInfo.value?.quality) {
|
|
99
|
+
case NetworkQuality.Excellent: return '优秀';
|
|
100
|
+
case NetworkQuality.Good: return '良好';
|
|
101
|
+
case NetworkQuality.Poor: return '一般';
|
|
102
|
+
default: return '未知';
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 调用时序
|
|
108
|
+
```
|
|
109
|
+
完成 login-auth 并进入会议
|
|
110
|
+
│
|
|
111
|
+
▼
|
|
112
|
+
读取 useDeviceState().networkInfo
|
|
113
|
+
│
|
|
114
|
+
├─ quality 优秀 / 良好 → 展示常规状态
|
|
115
|
+
├─ quality 一般 / 较差 → 展示弱网提示与恢复建议
|
|
116
|
+
└─ 数据为空 → 等待进房与媒体状态稳定后再展示
|
|
117
|
+
│
|
|
118
|
+
▼
|
|
119
|
+
结合 room-lifecycle 的重连 / 离会状态做统一反馈
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## 平台特有注意事项
|
|
123
|
+
### 1. `networkInfo` 通常在进房且媒体链路建立后更稳定
|
|
124
|
+
仅完成登录但未进房时,网络质量数据往往不完整;展示层应允许初始为空或未知状态。
|
|
125
|
+
|
|
126
|
+
### 2. 弱网提示应与房间生命周期联动
|
|
127
|
+
如果只在顶部展示一个图标,却不联动重连、掉线、离会等状态,用户很难理解当前问题来源。
|
|
128
|
+
|
|
129
|
+
### 3. 网络状态适合做常驻感知,不适合做高频弹窗
|
|
130
|
+
建议把状态放到顶部工具栏、布局状态栏或参会者信息区,避免高频通知打断会议流程。
|
|
131
|
+
|
|
132
|
+
## 代码生成约束
|
|
133
|
+
### 编译必要条件
|
|
134
|
+
- **通用条件**:见 [login-auth 平台 slice](login-auth.md)。
|
|
135
|
+
- **额外导入**:至少需要导入 `useDeviceState`;如需映射等级,按需导入 `NetworkQuality`。
|
|
136
|
+
- **运行前提**:页面已进入会议流程,网络状态来源可用。
|
|
137
|
+
|
|
138
|
+
### 生成规则
|
|
139
|
+
#### MUST(生成时必须包含)
|
|
140
|
+
|
|
141
|
+
1. **通过 `networkInfo` 作为网络质量单一状态源** — 可避免 UI 与底层状态割裂。
|
|
142
|
+
**Verify**: 检查是否存在 `useDeviceState()` 与 `networkInfo` 读取逻辑。
|
|
143
|
+
2. **把质量等级映射为用户可理解的文案或图标** — 直接暴露枚举值不利于会议中快速感知。
|
|
144
|
+
**Verify**: 检查是否存在 `computed` / 映射表 / 文案转换逻辑。
|
|
145
|
+
|
|
146
|
+
#### MUST NOT(生成时绝不能出现)
|
|
147
|
+
|
|
148
|
+
1. **不要把弱网提示做成与房间状态无关的孤立展示** — 用户无法判断是否需要重试或重连。
|
|
149
|
+
**Verify**: 检查是否与 `room-lifecycle` 或页面状态联动。
|
|
150
|
+
2. **不要假设 `networkInfo` 在所有阶段都立即可用** — 初始空值必须可处理。
|
|
151
|
+
**Verify**: 检查是否对空值或未知状态做了兜底。
|
|
152
|
+
|
|
153
|
+
### 集成检查点
|
|
154
|
+
- 当前 slice 常与 `conference/video-layout`、`conference/room-lifecycle` 联动展示。
|
|
155
|
+
- 一般只需要新增状态条、角标或弱网提示组件,侵入性较低。
|
|
156
|
+
- 若业务侧已有独立网络探测能力,需要明确展示优先级,避免两套网络状态互相矛盾。
|
|
157
|
+
|
|
158
|
+
## 验证矩阵
|
|
159
|
+
| 层级 | 检查项 | 验证手段 | 预期结果 |
|
|
160
|
+
|------|--------|----------|---------|
|
|
161
|
+
| 1. 编译级 | 已导入 `useDeviceState` / `NetworkQuality` | 检查 `import` 语句 | 网络状态相关导入可解析 |
|
|
162
|
+
| 2. 静态规则级 | 网络枚举被映射为可读状态 | 搜索 `networkInfo` 和文案映射逻辑 | 存在从枚举到 UI 的转换 |
|
|
163
|
+
| 3. 运行时级 | 进房后可观测到网络状态变化 | 在会议中查看弱网提示区域 | 可看到网络等级或未知兜底 |
|
|
164
|
+
| 4. 业务行为级 | 弱网时用户能获得清晰反馈 | 模拟网络波动或弱网环境 | 页面出现明确的状态感知与提示 |
|
|
165
|
+
|
|
166
|
+
## 排障指南
|
|
167
|
+
|
|
168
|
+
### 常见问题
|
|
169
|
+
|
|
170
|
+
| 问题 | 表现 | 处理建议 |
|
|
171
|
+
|------|------|----------|
|
|
172
|
+
| 网络状态一直不变 | 明显卡顿,但界面中的网络图标长期不更新 | 检查网络采样结果是否真正驱动了 UI 状态映射 |
|
|
173
|
+
| 网络恢复后仍显示异常 | 已恢复正常,但工具栏仍显示弱网或重连中 | 检查恢复路径是否有及时清理旧提示状态 |
|
|
174
|
+
| 弱网提示与房间状态矛盾 | 页面提示网络正常,但房间却在重连或相反 | 检查网络质量状态与 `room-lifecycle` 的连接状态是否协同解释 |
|
|
175
|
+
|
|
176
|
+
### 排障流程
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
发现 网络质量 相关问题
|
|
180
|
+
├── 第 1 步:确认问题属于网络观测和提示层,而不是设备异常或房间主链路本身
|
|
181
|
+
├── 第 2 步:检查时延、丢包、质量等级是否已稳定映射为统一的 UI 状态
|
|
182
|
+
├── 第 3 步:确认弱网、重连、恢复提示是否与 room-lifecycle 使用同一套连接语义
|
|
183
|
+
└── 第 4 步:若仍异常,再回查 device-control / room-lifecycle / video-layout 的衔接是否正确
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## 关联知识
|
|
187
|
+
|
|
188
|
+
- **[conference/device-control](device-control.md)** —— 网络问题和设备问题常被用户混淆,需要分层排查。
|
|
189
|
+
- **[conference/room-lifecycle](room-lifecycle.md)** —— 断线、重连、恢复等真正的会议主链路状态由这里承接。
|
|
190
|
+
- **[conference/video-layout](video-layout.md)** —— 弱网状态可作为成员单元挂件或状态角标的一部分输入。
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: conference/official-roomkit-api
|
|
3
|
+
platform: web
|
|
4
|
+
api_docs:
|
|
5
|
+
- title: 快速接入 Web&H5 (Vue3)
|
|
6
|
+
url: https://cloud.tencent.com/document/product/647/81962
|
|
7
|
+
- title: 界面微调 (Web)
|
|
8
|
+
url: https://cloud.tencent.com/document/product/647/129842
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# 官方 RoomKit 适配层 API — Web 实现
|
|
12
|
+
|
|
13
|
+
> 本 slice 覆盖 `@tencentcloud/roomkit-web-vue3` 导出的 `conference` 对象的完整 API。
|
|
14
|
+
> 当 `ui_mode = official-roomkit` 时,业务侧通过此对象操作会议,
|
|
15
|
+
> 而不是直接调用 composable(composable 层见 `conference/web/room-lifecycle.md` 等)。
|
|
16
|
+
>
|
|
17
|
+
> 以下签名基于 `@tencentcloud/roomkit-web-vue3@5.9.0` 源码验证。
|
|
18
|
+
> 源码参考:`RoomKit/adapter/conference.ts` + `RoomKit/adapter/type.ts`。
|
|
19
|
+
|
|
20
|
+
## 前置条件
|
|
21
|
+
|
|
22
|
+
**安装依赖**:
|
|
23
|
+
```bash
|
|
24
|
+
npm install @tencentcloud/roomkit-web-vue3@5 tuikit-atomicx-vue3 \
|
|
25
|
+
@tencentcloud/uikit-base-component-vue3 @tencentcloud/universal-api
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**版本要求**:lockfile 中 `@tencentcloud/roomkit-web-vue3` 解析版本必须 `>=5.4.3`。
|
|
29
|
+
|
|
30
|
+
**导入来源**:
|
|
31
|
+
```ts
|
|
32
|
+
// 会议组件 + conference API + 事件/枚举
|
|
33
|
+
import {
|
|
34
|
+
ConferenceMainView,
|
|
35
|
+
ConferenceMainViewH5,
|
|
36
|
+
conference,
|
|
37
|
+
RoomEvent,
|
|
38
|
+
BuiltinWidget,
|
|
39
|
+
InterceptorAction,
|
|
40
|
+
} from '@tencentcloud/roomkit-web-vue3'
|
|
41
|
+
|
|
42
|
+
// UIKitProvider(包裹组件用)
|
|
43
|
+
import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 枚举定义
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
enum RoomEvent {
|
|
50
|
+
ROOM_LEAVE = 'RoomLeave',
|
|
51
|
+
ROOM_DISMISS = 'RoomDismiss',
|
|
52
|
+
ROOM_ERROR = 'RoomError',
|
|
53
|
+
KICKED_OUT = 'KickedOut',
|
|
54
|
+
KICKED_OFFLINE = 'KickedOffline',
|
|
55
|
+
USER_SIG_EXPIRED = 'UserSigExpired',
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
enum BuiltinWidget {
|
|
59
|
+
MicWidget = 'MicWidget',
|
|
60
|
+
CameraWidget = 'CameraWidget',
|
|
61
|
+
ScreenShareWidget = 'ScreenShareWidget',
|
|
62
|
+
RoomChatWidget = 'RoomChatWidget',
|
|
63
|
+
MemberWidget = 'MemberWidget',
|
|
64
|
+
InviteWidget = 'InviteWidget',
|
|
65
|
+
VirtualBackgroundWidget = 'VirtualBackgroundWidget',
|
|
66
|
+
BasicBeautyWidget = 'BasicBeautyWidget',
|
|
67
|
+
AIToolsWidget = 'AIToolsWidget',
|
|
68
|
+
SettingsWidget = 'SettingsWidget',
|
|
69
|
+
ThemeWidget = 'ThemeWidget',
|
|
70
|
+
LayoutWidget = 'LayoutWidget',
|
|
71
|
+
LocalNetworkInfoWidget = 'LocalNetworkInfoWidget',
|
|
72
|
+
LanguageWidget = 'LanguageWidget',
|
|
73
|
+
LoginUserInfoWidget = 'LoginUserInfoWidget',
|
|
74
|
+
CurrentRoomInfoWidget = 'CurrentRoomInfoWidget',
|
|
75
|
+
LeaveRoomWidget = 'LeaveRoomWidget',
|
|
76
|
+
SwitchCameraWidget = 'SwitchCameraWidget',
|
|
77
|
+
BarrageWidget = 'BarrageWidget',
|
|
78
|
+
RaiseHandsWidget = 'RaiseHandsWidget',
|
|
79
|
+
RaiseHandsListWidget = 'RaiseHandsListWidget',
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
enum InterceptorAction {
|
|
83
|
+
OpenMicrophone = 'openMicrophone',
|
|
84
|
+
CloseMicrophone = 'closeMicrophone',
|
|
85
|
+
OpenCamera = 'openCamera',
|
|
86
|
+
CloseCamera = 'closeCamera',
|
|
87
|
+
StartScreenShare = 'startScreenShare',
|
|
88
|
+
StopScreenShare = 'stopScreenShare',
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## API 签名
|
|
93
|
+
|
|
94
|
+
### 登录与用户信息
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
conference.login({ sdkAppId: number, userId: string, userSig: string }): Promise<void>
|
|
98
|
+
conference.setSelfInfo({ userName: string, avatarUrl: string }): Promise<void>
|
|
99
|
+
conference.logout(): Promise<void>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 房间生命周期
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
// 创建并加入房间
|
|
106
|
+
conference.createAndJoinRoom({
|
|
107
|
+
roomId: string,
|
|
108
|
+
roomType?: RoomType,
|
|
109
|
+
options?: CreateRoomOptions,
|
|
110
|
+
}): Promise<void>
|
|
111
|
+
|
|
112
|
+
interface CreateRoomOptions {
|
|
113
|
+
roomName?: string;
|
|
114
|
+
password?: string;
|
|
115
|
+
isAllMicrophoneDisabled?: boolean;
|
|
116
|
+
isAllCameraDisabled?: boolean;
|
|
117
|
+
isAllScreenShareDisabled?: boolean;
|
|
118
|
+
isAllMessageDisabled?: boolean;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// 加入已有房间
|
|
122
|
+
conference.joinRoom({
|
|
123
|
+
roomId: string,
|
|
124
|
+
roomType?: RoomType,
|
|
125
|
+
password?: string,
|
|
126
|
+
}): Promise<void>
|
|
127
|
+
|
|
128
|
+
// 离开(普通成员)
|
|
129
|
+
conference.leaveRoom(): Promise<void>
|
|
130
|
+
|
|
131
|
+
// 结束(主持人)
|
|
132
|
+
conference.endRoom(): Promise<void>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 事件
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
conference.on(eventType: RoomEvent, callback: (data?: any) => void): void
|
|
139
|
+
conference.off(eventType: RoomEvent, callback: (data?: any) => void): void
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 界面微调
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
// 隐藏/显示内置按钮
|
|
146
|
+
conference.setWidgetVisible(config: Partial<Record<BuiltinWidget, boolean>>): void
|
|
147
|
+
|
|
148
|
+
// 注册自定义按钮(返回注销函数)
|
|
149
|
+
conference.registerWidget(config: WidgetConfig): () => void
|
|
150
|
+
|
|
151
|
+
// 拦截内置操作(返回注销函数)
|
|
152
|
+
conference.onWill(action: InterceptorAction, handler: InterceptorHandler): () => void
|
|
153
|
+
|
|
154
|
+
type InterceptorHandler = (
|
|
155
|
+
action: InterceptorAction,
|
|
156
|
+
proceed: () => void,
|
|
157
|
+
abort: () => void,
|
|
158
|
+
) => void | Promise<void>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 特性配置
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
conference.setFeatureConfig(config: Partial<FeatureConfig>): void
|
|
165
|
+
|
|
166
|
+
interface FeatureConfig {
|
|
167
|
+
watermark?: WatermarkConfig;
|
|
168
|
+
shareLink?: string; // 纯字符串 URL
|
|
169
|
+
contactList?: ContactListProvider;
|
|
170
|
+
virtualBackground?: VirtualBackgroundFeatureConfig;
|
|
171
|
+
aiTools?: AIToolsConfig;
|
|
172
|
+
layoutTemplate?: RoomLayoutTemplate;
|
|
173
|
+
toolbar?: ToolbarConfig;
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## 调用时序
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
1. conference.login()
|
|
181
|
+
2. conference.setSelfInfo()
|
|
182
|
+
3. conference.setWidgetVisible() ← login 之后、进房之前
|
|
183
|
+
conference.registerWidget() ← 同上
|
|
184
|
+
conference.onWill() ← 同上
|
|
185
|
+
4. conference.createAndJoinRoom() 或 conference.joinRoom()
|
|
186
|
+
5. conference.setFeatureConfig() ← 进房成功后(shareLink 依赖最终 roomId)
|
|
187
|
+
...会中...
|
|
188
|
+
6. conference.leaveRoom() 或 conference.endRoom()
|
|
189
|
+
7. RoomEvent.ROOM_LEAVE / ROOM_DISMISS 回调 → 清理注销函数
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## 完整代码示例
|
|
193
|
+
|
|
194
|
+
```vue
|
|
195
|
+
<template>
|
|
196
|
+
<UIKitProvider theme="light" language="zh-CN">
|
|
197
|
+
<ConferenceMainView v-if="isPC" />
|
|
198
|
+
<ConferenceMainViewH5 v-else />
|
|
199
|
+
</UIKitProvider>
|
|
200
|
+
</template>
|
|
201
|
+
|
|
202
|
+
<script setup lang="ts">
|
|
203
|
+
import { ref, onMounted, onUnmounted } from 'vue'
|
|
204
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
205
|
+
import {
|
|
206
|
+
ConferenceMainView,
|
|
207
|
+
ConferenceMainViewH5,
|
|
208
|
+
conference,
|
|
209
|
+
RoomEvent,
|
|
210
|
+
BuiltinWidget,
|
|
211
|
+
} from '@tencentcloud/roomkit-web-vue3'
|
|
212
|
+
import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3'
|
|
213
|
+
|
|
214
|
+
const route = useRoute()
|
|
215
|
+
const router = useRouter()
|
|
216
|
+
const isPC = ref(window.innerWidth > 768)
|
|
217
|
+
function onResize() { isPC.value = window.innerWidth > 768 }
|
|
218
|
+
|
|
219
|
+
const cleanupFns: Array<() => void> = []
|
|
220
|
+
|
|
221
|
+
onMounted(async () => {
|
|
222
|
+
window.addEventListener('resize', onResize)
|
|
223
|
+
|
|
224
|
+
const sdkAppId = Number(route.query.sdkAppId)
|
|
225
|
+
const userId = route.query.userId as string
|
|
226
|
+
const userSig = route.query.userSig as string
|
|
227
|
+
const roomId = route.query.roomId as string
|
|
228
|
+
|
|
229
|
+
if (!sdkAppId || !userId || !userSig || !roomId) {
|
|
230
|
+
router.replace('/')
|
|
231
|
+
return
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// 1. 登录
|
|
235
|
+
await conference.login({ sdkAppId, userId, userSig })
|
|
236
|
+
await conference.setSelfInfo({ userName: userId, avatarUrl: '' })
|
|
237
|
+
|
|
238
|
+
// 2. 界面微调(login 之后、进房之前)
|
|
239
|
+
conference.setWidgetVisible({
|
|
240
|
+
[BuiltinWidget.InviteWidget]: false,
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
// 3. 监听离房
|
|
244
|
+
conference.on(RoomEvent.ROOM_LEAVE, handleLeave)
|
|
245
|
+
conference.on(RoomEvent.ROOM_DISMISS, handleLeave)
|
|
246
|
+
|
|
247
|
+
// 4. 创建并加入
|
|
248
|
+
await conference.createAndJoinRoom({
|
|
249
|
+
roomId,
|
|
250
|
+
options: { roomName: `会议-${roomId}` },
|
|
251
|
+
})
|
|
252
|
+
|
|
253
|
+
// 5. 进房后设置分享链接
|
|
254
|
+
conference.setFeatureConfig({
|
|
255
|
+
shareLink: `${window.location.origin}/meeting?roomId=${roomId}`,
|
|
256
|
+
})
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
function handleLeave() {
|
|
260
|
+
conference.off(RoomEvent.ROOM_LEAVE, handleLeave)
|
|
261
|
+
conference.off(RoomEvent.ROOM_DISMISS, handleLeave)
|
|
262
|
+
cleanupFns.forEach(fn => fn())
|
|
263
|
+
router.replace('/')
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
onUnmounted(() => {
|
|
267
|
+
window.removeEventListener('resize', onResize)
|
|
268
|
+
handleLeave()
|
|
269
|
+
})
|
|
270
|
+
</script>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## 代码生成约束
|
|
274
|
+
|
|
275
|
+
### MUST
|
|
276
|
+
|
|
277
|
+
1. **使用 UIKitProvider 包裹会议组件** — `ConferenceMainView` / `ConferenceMainViewH5` 必须放在 `UIKitProvider` 内。
|
|
278
|
+
2. **界面微调 API 在 login 之后、进房之前注册** — 避免按钮闪烁或拦截器遗漏。
|
|
279
|
+
3. **registerWidget / onWill 返回的注销函数必须收集并在 ROOM_LEAVE + ROOM_DISMISS 时清理** — 防止重复注册。
|
|
280
|
+
4. **shareLink 在进房成功后设置** — 依赖最终确定的 roomId。
|
|
281
|
+
|
|
282
|
+
### MUST NOT
|
|
283
|
+
|
|
284
|
+
1. **不要用不存在的枚举值** — `BuiltinWidget.InviteControl` 不存在,正确是 `BuiltinWidget.InviteWidget`。
|
|
285
|
+
2. **不要给 createAndJoinRoom 传顶层 roomName / isOpenCamera / isSeatEnabled** — `roomName` 在 `options` 内,其余不存在。
|
|
286
|
+
3. **不要给 joinRoom 传 isOpenCamera / isOpenMicrophone** — 只接受 `roomId`、`roomType`、`password`。
|
|
287
|
+
4. **不要把 shareLink 写成对象** — `setFeatureConfig({ shareLink: '...' })` 是纯字符串。
|
|
288
|
+
5. **不要用 CSS/DOM hack 修改 RoomKit 内部 UI** — 必须用 `setWidgetVisible` / `registerWidget` / `onWill`。
|
|
289
|
+
|
|
290
|
+
## 常见错误速查
|
|
291
|
+
|
|
292
|
+
| 错误写法 | 正确写法 | 原因 |
|
|
293
|
+
|---------|---------|------|
|
|
294
|
+
| `BuiltinWidget.InviteControl` | `BuiltinWidget.InviteWidget` | 枚举值不存在 |
|
|
295
|
+
| `createAndJoinRoom({ roomId, roomName })` | `createAndJoinRoom({ roomId, options: { roomName } })` | roomName 在 options 内 |
|
|
296
|
+
| `joinRoom({ roomId, isOpenCamera: true })` | `joinRoom({ roomId })` | 无 isOpenCamera 参数 |
|
|
297
|
+
| `setFeatureConfig({ shareLink: { link, title } })` | `setFeatureConfig({ shareLink: 'url' })` | shareLink 是字符串 |
|
|
298
|
+
| `import { UIKitProvider } from '@tencentcloud/roomkit-web-vue3'` | `import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3'` | UIKitProvider 在 peer 包中 |
|