@tencent-rtc/mcp 1.4.7 → 1.6.0-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/cursor-setting.png +0 -0
- package/knowledge/bm25-cache.js +74 -0
- package/knowledge/bm25-cache.js.map +1 -0
- package/knowledge/bm25.js +148 -0
- package/knowledge/bm25.js.map +1 -0
- package/knowledge/build-index.js +70 -0
- package/knowledge/build-index.js.map +1 -0
- package/knowledge/chunker.js +168 -0
- package/knowledge/chunker.js.map +1 -0
- package/knowledge/content-loader.js +40 -0
- package/knowledge/content-loader.js.map +1 -0
- package/knowledge/doc-url-resolver.js +143 -0
- package/knowledge/doc-url-resolver.js.map +1 -0
- package/knowledge/extractors.js +26 -0
- package/knowledge/extractors.js.map +1 -0
- package/knowledge/path-meta.js +185 -0
- package/knowledge/path-meta.js.map +1 -0
- package/knowledge/search/exact-lookup.js +498 -0
- package/knowledge/search/exact-lookup.js.map +1 -0
- package/knowledge/search/filter-pool.js +105 -0
- package/knowledge/search/filter-pool.js.map +1 -0
- package/knowledge/search/product-scope-intent.js +41 -0
- package/knowledge/search/product-scope-intent.js.map +1 -0
- package/knowledge/search/requires-framework.js +82 -0
- package/knowledge/search/requires-framework.js.map +1 -0
- package/knowledge/search/search-knowledge.js +230 -0
- package/knowledge/search/search-knowledge.js.map +1 -0
- package/mcp-server-prompt.png +0 -0
- package/package.json +1 -1
- package/resource/_schema/feature-aliases.yaml +10 -0
- package/resource/_schema/goal-tags.yaml +72 -0
- package/resource/_schema/products.yaml +19 -0
- package/resource/_schema/trtc-intents.yaml +27 -0
- package/resource/_schema/types.yaml +43 -0
- package/resource/index/component-slugs.json +1 -0
- package/resource/index/doc-source-urls.json +1 -0
- package/resource/index/manifest.json +1 -0
- package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
- package/resource/integration/callkit/preset/flutter/integration.md +346 -0
- package/resource/integration/callkit/preset/ios/integration.md +408 -0
- package/resource/integration/callkit/preset/react/integration.md +362 -0
- package/resource/integration/callkit/preset/vue/integration.md +356 -0
- package/resource/integration/chat/preset/android/integration.md +500 -0
- package/resource/integration/chat/preset/flutter/integration.md +370 -0
- package/resource/integration/chat/preset/ios/integration.md +566 -0
- package/resource/integration/chat/preset/react/integration.md +490 -0
- package/resource/integration/chat/preset/vue/integration.md +504 -0
- package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
- package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
- package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
- package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
- package/resource/integration/roomkit/preset/vue/integration.md +562 -0
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
- package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
- package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
- package/resource/knowledge/callkit/faq/android.md +92 -0
- package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
- package/resource/knowledge/callkit/faq/error-code.md +67 -0
- package/resource/knowledge/callkit/faq/flutter.md +52 -0
- package/resource/knowledge/callkit/faq/ios.md +104 -0
- package/resource/knowledge/callkit/faq/web.md +74 -0
- package/resource/knowledge/callkit/preset/android/api.md +412 -0
- package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
- package/resource/knowledge/callkit/preset/ios/api.md +234 -0
- package/resource/knowledge/callkit/preset/web/api.md +83 -0
- package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
- package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
- package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
- package/resource/knowledge/chat/preset/android/features/language.md +136 -0
- package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
- package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
- package/resource/knowledge/chat/preset/android/features/search.md +64 -0
- package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
- package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
- package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
- package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
- package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
- package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
- package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
- package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
- package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
- package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
- package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
- package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
- package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
- package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
- package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
- package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
- package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
- package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
- package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
- package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
- package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
- package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
- package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
- package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
- package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
- package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
- package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
- package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
- package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
- package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
- package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
- package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
- package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
- package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
- package/resource/knowledge/chat/urls/error-code.md +17 -0
- package/resource/knowledge/chat/urls/product.md +43 -0
- package/resource/knowledge/chat/urls/restapi.md +204 -0
- package/resource/knowledge/chat/urls/sdk/android.md +80 -0
- package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
- package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
- package/resource/knowledge/chat/urls/sdk/web.md +80 -0
- package/resource/knowledge/chat/urls/webhook.md +68 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
- package/resource/knowledge/livekit/faq/error-code.md +193 -0
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
- package/resource/knowledge/push/config/android.md +92 -0
- package/resource/knowledge/push/config/harmonyos.md +83 -0
- package/resource/knowledge/push/config/ios.md +254 -0
- package/resource/knowledge/push/config/react-native.md +254 -0
- package/resource/knowledge/push/config/unity.md +209 -0
- package/resource/knowledge/push/config/unreal-engine.md +194 -0
- package/resource/knowledge/push/integration/android.md +404 -0
- package/resource/knowledge/push/integration/flutter.md +465 -0
- package/resource/knowledge/push/integration/harmonyos.md +63 -0
- package/resource/knowledge/push/integration/ios.md +246 -0
- package/resource/knowledge/push/integration/react-native.md +366 -0
- package/resource/knowledge/push/integration/uni-app.md +208 -0
- package/resource/knowledge/push/integration/unity.md +389 -0
- package/resource/knowledge/push/integration/unreal-engine.md +390 -0
- package/resource/knowledge/push/overview/prepare.md +60 -0
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
- package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
- package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
- package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
- package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
- package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
- package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
- package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
- package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
- package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
- package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
- package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
- package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
- package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
- package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
- package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
- package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
- package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
- package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
- package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
- package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
- package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
- package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
- package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
- package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
- package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
- package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
- package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
- package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
- package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
- package/server.js +35 -11
- package/server.js.map +1 -1
- package/tools/call/get_native_call_uikit_integration.js +2 -3
- package/tools/call/get_native_call_uikit_integration.js.map +1 -1
- package/tools/call/get_native_callkit_core_integration.js +2 -5
- package/tools/call/get_native_callkit_core_integration.js.map +1 -1
- package/tools/call/get_web_call_uikit_integration.js +2 -3
- package/tools/call/get_web_call_uikit_integration.js.map +1 -1
- package/tools/chat/get_native_chat_uikit_integration.js +2 -3
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -1
- package/tools/chat/get_web_chat_uikit_integration.js +2 -3
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -1
- package/tools/common/present_framework_choice.js +19 -13
- package/tools/common/present_framework_choice.js.map +1 -1
- package/tools/common/record_answer.js +19 -25
- package/tools/common/record_answer.js.map +1 -1
- package/tools/common/record_feedback.js +17 -30
- package/tools/common/record_feedback.js.map +1 -1
- package/tools/common/search_trtc_knowledge.js +45 -0
- package/tools/common/search_trtc_knowledge.js.map +1 -0
- package/tools/definitions/get_native_call_uikit_integration_def.js +3 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_callkit_core_integration_def.js +5 -3
- package/tools/definitions/get_native_callkit_core_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -2
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_integration_def.js +6 -5
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +4 -2
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -0
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +5 -5
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_room_core_integration_def.js +50 -0
- package/tools/definitions/get_web_room_core_integration_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +5 -4
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/integration-boundary.js +6 -0
- package/tools/definitions/integration-boundary.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +12 -10
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/definitions/record_answer_def.js +19 -17
- package/tools/definitions/record_answer_def.js.map +1 -1
- package/tools/definitions/record_feedback_def.js +14 -13
- package/tools/definitions/record_feedback_def.js.map +1 -1
- package/tools/definitions/search_trtc_knowledge_def.js +40 -0
- package/tools/definitions/search_trtc_knowledge_def.js.map +1 -0
- package/tools/index.js +5 -36
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_integration.js +1 -3
- package/tools/live/get_native_livekit_core_integration.js.map +1 -1
- package/tools/live/get_web_live_uikit_integration.js +2 -4
- package/tools/live/get_web_live_uikit_integration.js.map +1 -1
- package/tools/room/get_web_room_core_integration.js +48 -0
- package/tools/room/get_web_room_core_integration.js.map +1 -0
- package/tools/room/get_web_room_uikit_integration.js +2 -3
- package/tools/room/get_web_room_uikit_integration.js.map +1 -1
- package/utils/generate-structured-result.js +24 -30
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/get-doc-content.js +14 -8
- package/utils/get-doc-content.js.map +1 -1
- package/utils/report-cls-client.js +18 -20
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
- package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
- package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
- package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
- package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
- package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
- package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
- package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
- package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
- package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
- package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
- package/resource/doc/callkit/faq/common/error-code.md +0 -47
- package/resource/doc/callkit/faq/flutter-faq.md +0 -115
- package/resource/doc/callkit/faq/ios-faq.md +0 -115
- package/resource/doc/callkit/faq/web-faq.md +0 -36
- package/resource/doc/callkit/preset/android/api.md +0 -296
- package/resource/doc/callkit/preset/flutter/api.md +0 -410
- package/resource/doc/callkit/preset/flutter/integration.md +0 -164
- package/resource/doc/callkit/preset/ios/api.md +0 -80
- package/resource/doc/callkit/preset/ios/integration.md +0 -187
- package/resource/doc/callkit/preset/react/api.md +0 -501
- package/resource/doc/callkit/preset/react/integration.md +0 -86
- package/resource/doc/callkit/preset/vue/api.md +0 -501
- package/resource/doc/callkit/preset/vue/integration.md +0 -83
- package/resource/doc/chatkit/android/faq.md +0 -111
- package/resource/doc/chatkit/android/features/theme.md +0 -219
- package/resource/doc/chatkit/android/integration.md +0 -490
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
- package/resource/doc/chatkit/faq/common/product.md +0 -7
- package/resource/doc/chatkit/faq/common/server.md +0 -44
- package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
- package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
- package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
- package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
- package/resource/doc/chatkit/flutter/faq.md +0 -23
- package/resource/doc/chatkit/flutter/features/theme.md +0 -235
- package/resource/doc/chatkit/flutter/integration.md +0 -344
- package/resource/doc/chatkit/ios/faq.md +0 -111
- package/resource/doc/chatkit/ios/features/theme.md +0 -267
- package/resource/doc/chatkit/react/components/avatar.md +0 -104
- package/resource/doc/chatkit/react/components/chat-header.md +0 -148
- package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
- package/resource/doc/chatkit/react/components/chat.md +0 -38
- package/resource/doc/chatkit/react/components/component-list.md +0 -37
- package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
- package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
- package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
- package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
- package/resource/doc/chatkit/react/components/message-list.md +0 -293
- package/resource/doc/chatkit/react/components/tuikit.md +0 -34
- package/resource/doc/chatkit/react/faq.md +0 -26
- package/resource/doc/chatkit/react/integration.md +0 -416
- package/resource/doc/chatkit/vue/components/avatar.md +0 -104
- package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
- package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
- package/resource/doc/chatkit/vue/components/chat.md +0 -45
- package/resource/doc/chatkit/vue/components/component-list.md +0 -87
- package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
- package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
- package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
- package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
- package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
- package/resource/doc/chatkit/vue/components/message-list.md +0 -433
- package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
- package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
- package/resource/doc/chatkit/vue/faq.md +0 -36
- package/resource/doc/chatkit/vue/integration.md +0 -428
- package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
- package/resource/doc/livekit/faq/common/error-code.md +0 -88
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
- package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
- package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
- package/resource/doc/roomkit/faq/common/error-code.md +0 -67
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
- package/resource/doc/roomkit/vue/features/device-state.md +0 -460
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
- package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
- package/resource/doc/roomkit/vue/features/room-state.md +0 -282
- package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
- package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
- package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
- package/resource/doc/roomkit/vue/integration.md +0 -315
- package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
- package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
- package/resource/doc/rtcengine/web/.gitkeep +0 -0
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
- package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
- package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
- package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
- package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
- package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
- package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
- package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
- package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
- package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
- package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
- package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
- package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
- package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
- package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
- package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
- package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
- package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
- package/tools/call/get_callkit_api.js +0 -33
- package/tools/call/get_callkit_api.js.map +0 -1
- package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
- package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
- package/tools/common/get_faq.js +0 -266
- package/tools/common/get_faq.js.map +0 -1
- package/tools/common/record_skill_session.js +0 -69
- package/tools/common/record_skill_session.js.map +0 -1
- package/tools/definitions/get_callkit_api_def.js +0 -29
- package/tools/definitions/get_callkit_api_def.js.map +0 -1
- package/tools/definitions/get_faq_def.js +0 -47
- package/tools/definitions/get_faq_def.js.map +0 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
- package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_livekit_api_def.js +0 -30
- package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
- package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
- package/tools/definitions/record_skill_session_def.js +0 -31
- package/tools/definitions/record_skill_session_def.js.map +0 -1
- package/tools/live/get_native_livekit_core_features.js +0 -68
- package/tools/live/get_native_livekit_core_features.js.map +0 -1
- package/tools/live/get_web_livekit_api.js +0 -33
- package/tools/live/get_web_livekit_api.js.map +0 -1
- package/tools/live/get_web_livekit_component_detail.js +0 -35
- package/tools/live/get_web_livekit_component_detail.js.map +0 -1
- package/tools/room/get_web_roomkit_feature_detail.js +0 -69
- package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
- package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
- package/utils/build-session-directives.js +0 -120
- package/utils/build-session-directives.js.map +0 -1
- package/utils/handle-framework.js +0 -9
- package/utils/handle-framework.js.map +0 -1
- package/utils/handle-state-name.js +0 -29
- package/utils/handle-state-name.js.map +0 -1
- package/utils/report-runtime-error-cls-client.js +0 -91
- package/utils/report-runtime-error-cls-client.js.map +0 -1
- /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
- /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
- /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
This document
|
|
1
|
+
This document guides you on how to manage participants in a room. Atomicx provides the ready-to-use list component `RoomParticipantList` for quick integration, and exposes the [useRoomParticipantState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-RoomParticipantState) Hook to help you implement custom participant control logic.
|
|
2
2
|
|
|
3
|
-
## Feature
|
|
3
|
+
## Feature Overview
|
|
4
4
|
|
|
5
|
-
The
|
|
6
|
-
- **Real-time
|
|
5
|
+
The participant management module covers a full set of capabilities for displaying user information in a room and handling permissions:
|
|
6
|
+
- **Real-time list display:** Dynamically presents the nickname, role, audio/video status, and volume fluctuations of all participants in the room.
|
|
7
7
|
|
|
8
|
-
- **Permission
|
|
8
|
+
- **Permission control:** Supports the room owner or administrators performing management operations such as removing participants, muting all participants, and transferring the room owner role.
|
|
9
9
|
|
|
10
|
-
- **Tiered
|
|
10
|
+
- **Tiered management:** Supports differentiated permission strategies for the room owner, administrators, and regular participants.
|
|
11
11
|
|
|
12
12
|
## Prerequisites
|
|
13
|
-
-
|
|
13
|
+
- The user has completed login authentication via [useLoginState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-LoginState). For details, refer to the Integration Overview.
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- The user has entered a room via [useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-RoomState). For details, refer to Room Management.
|
|
16
16
|
|
|
17
|
-
## Integrating
|
|
17
|
+
## Integrating the Participant Management Component
|
|
18
18
|
|
|
19
|
-
If you need to quickly build a
|
|
19
|
+
If you need to quickly build a participant list interface, we recommend using the `RoomParticipantList` component directly. `RoomParticipantList` is a ready-to-use participant list component with a complete built-in participant management UI and interactions.
|
|
20
20
|
|
|
21
|
-
Example code for integrating `RoomParticipantList` component:
|
|
21
|
+
Example code for integrating the `RoomParticipantList` component:
|
|
22
22
|
``` typescript
|
|
23
23
|
<template>
|
|
24
24
|
<div class="room-page">
|
|
@@ -82,28 +82,28 @@ const { participantList } = useRoomParticipantState();
|
|
|
82
82
|
|
|
83
83
|
> **Note:**
|
|
84
84
|
>
|
|
85
|
-
> - `RoomParticipantList`
|
|
86
|
-
> - When using the `RoomParticipantList` component,
|
|
85
|
+
> - `RoomParticipantList` automatically fills the height and width of its parent container, so make sure its parent container has explicit dimensions.
|
|
86
|
+
> - When using the `RoomParticipantList` component, make sure to configure the global `UIKitProvider` in `App.vue`. For details, refer to [Configuring App.vue](https://cloud.tencent.com/document/product/647/81962#ce98ee15-b0cb-43af-81da-70f51231430e).
|
|
87
87
|
|
|
88
|
-
## Implementing
|
|
88
|
+
## Implementing Participant Management Features
|
|
89
89
|
|
|
90
|
-
If you need to customize
|
|
90
|
+
If you need to customize the participant list UI or trigger management actions in a specific business scenario, use [useRoomParticipantState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-RoomParticipantState).
|
|
91
91
|
|
|
92
|
-
### Step 1: Get
|
|
92
|
+
### Step 1: Get the participant list
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Use [getParticipantList](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#getParticipantList) to get the reactive participant data [participantList](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#participantList).
|
|
95
95
|
``` typescript
|
|
96
96
|
import { useRoomState, useRoomParticipantState } from 'tuikit-atomicx-vue3/room';
|
|
97
97
|
|
|
98
98
|
const { currentRoom } = useRoomState();
|
|
99
99
|
const { participantList, participantListCursor, getParticipantList } = useRoomParticipantState();
|
|
100
100
|
|
|
101
|
-
// Get
|
|
101
|
+
// Get the list of users in the room after successfully entering the room
|
|
102
102
|
watch(() => currentRoom.value?.roomId, async () => {
|
|
103
103
|
await getParticipantList();
|
|
104
104
|
})
|
|
105
105
|
|
|
106
|
-
// Load more users when
|
|
106
|
+
// Load more users when the list scrolls to the bottom
|
|
107
107
|
const handleLoadMore = async () => {
|
|
108
108
|
if (participantListCursor.value) {
|
|
109
109
|
await getParticipantList({ cursor: participantListCursor.value });
|
|
@@ -114,12 +114,12 @@ const handleLoadMore = async () => {
|
|
|
114
114
|
> **Note:**
|
|
115
115
|
>
|
|
116
116
|
|
|
117
|
-
>
|
|
117
|
+
> The data successfully fetched by the `getParticipantList` interface is automatically maintained in `participantList`. The UI only needs to render the data in `participantList`.
|
|
118
118
|
>
|
|
119
119
|
|
|
120
|
-
### Step 2: Render
|
|
120
|
+
### Step 2: Render participant information
|
|
121
121
|
|
|
122
|
-
Developers can use [participantList](https://web.sdk.qcloud.com/trtc/live/web/doc/
|
|
122
|
+
Developers can use the [participantList](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#participantList) data to customize the rendering of the user information list.
|
|
123
123
|
``` typescript
|
|
124
124
|
<template>
|
|
125
125
|
<div class="participant-list">
|
|
@@ -141,7 +141,7 @@ Developers can use [participantList](https://web.sdk.qcloud.com/trtc/live/web/do
|
|
|
141
141
|
:avatar-url="participant.avatarUrl"
|
|
142
142
|
/>
|
|
143
143
|
|
|
144
|
-
<!-- User
|
|
144
|
+
<!-- User information -->
|
|
145
145
|
<div class="user-info">
|
|
146
146
|
<div class="user-name">
|
|
147
147
|
<span>{{ participant.userName }}</span>
|
|
@@ -150,13 +150,13 @@ Developers can use [participantList](https://web.sdk.qcloud.com/trtc/live/web/do
|
|
|
150
150
|
v-if="participant.role === RoomParticipantRole.Owner"
|
|
151
151
|
class="role-badge owner"
|
|
152
152
|
>
|
|
153
|
-
|
|
153
|
+
Room owner
|
|
154
154
|
</span>
|
|
155
155
|
<span
|
|
156
156
|
v-else-if="participant.role === RoomParticipantRole.Admin"
|
|
157
157
|
class="role-badge admin"
|
|
158
158
|
>
|
|
159
|
-
|
|
159
|
+
Administrator
|
|
160
160
|
</span>
|
|
161
161
|
</div>
|
|
162
162
|
</div>
|
|
@@ -208,9 +208,9 @@ const handleRefresh = async () => {
|
|
|
208
208
|
</style>
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
### Step 3: Set
|
|
211
|
+
### Step 3: Set custom user information
|
|
212
212
|
|
|
213
|
-
Developers can use the [updateParticipantMetaData](https://web.sdk.qcloud.com/trtc/live/web/doc/
|
|
213
|
+
Developers can use the [updateParticipantMetaData](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#updateParticipantMetaData) interface to set custom user data, used to **implement capabilities such as job title** and **purchase status**. After updating, the `metaData` information is maintained in the reactive data of the corresponding user in `participantList`.
|
|
214
214
|
``` typescript
|
|
215
215
|
<template>
|
|
216
216
|
<div v-for="participant in participantList" :key="participant.userId">
|
|
@@ -233,33 +233,33 @@ const {
|
|
|
233
233
|
} = useRoomParticipantState();
|
|
234
234
|
|
|
235
235
|
await updateParticipantMetaData({
|
|
236
|
-
userId: '', // Specify user id
|
|
236
|
+
userId: '', // Specify the user id
|
|
237
237
|
metaData: JSON.stringify({ level: 1 }), // Business custom information
|
|
238
238
|
})
|
|
239
239
|
</script>
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
### Step 4: Manage
|
|
242
|
+
### Step 4: Manage participant roles
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
The room owner can use the [setAdmin](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#setAdmin) interface to change a user's role to administrator, and use the [revokeAdmin](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#revokeAdmin) method to revoke a user's administrator role.
|
|
245
245
|
``` typescript
|
|
246
246
|
const { setAdmin, revokeAdmin } = useRoomParticipantState();
|
|
247
247
|
|
|
248
|
-
// Set regular user as administrator
|
|
248
|
+
// Set a regular user as an administrator
|
|
249
249
|
await setAdmin({ userId });
|
|
250
250
|
|
|
251
|
-
//
|
|
251
|
+
// Set an administrator back to a regular user
|
|
252
252
|
await revokeAdmin({ userId });
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
### Step 5: Manage
|
|
255
|
+
### Step 5: Manage participant media devices
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
The room owner and administrators can use the [closeParticipantDevice](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#closeParticipantDevice) interface to remotely control other participants' media devices, in order to keep the meeting environment quiet and orderly.
|
|
258
258
|
``` typescript
|
|
259
259
|
import { useRoomParticipantState, DeviceType } from 'tuikit-atomicx-vue3/room';
|
|
260
260
|
const { closeParticipantDevice } = useRoomParticipantState();
|
|
261
261
|
|
|
262
|
-
//
|
|
262
|
+
// Forcibly turn off the microphone of a specified participant
|
|
263
263
|
async function handleCloseUserMicrophone(userId: string) {
|
|
264
264
|
await closeParticipantDevice({
|
|
265
265
|
userId,
|
|
@@ -267,7 +267,7 @@ async function handleCloseUserMicrophone(userId: string) {
|
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
//
|
|
270
|
+
// Forcibly turn off the camera of a specified participant
|
|
271
271
|
async function handleCloseUserCamera(userId: string) {
|
|
272
272
|
await closeParticipantDevice({
|
|
273
273
|
userId,
|
|
@@ -276,16 +276,16 @@ async function handleCloseUserCamera(userId: string) {
|
|
|
276
276
|
}
|
|
277
277
|
```
|
|
278
278
|
|
|
279
|
-
### Step 6: Enable
|
|
279
|
+
### Step 6: Enable global state management
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
The room owner and administrators can enable room-wide global state management via the [disableAllDevices](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#disableAllDevices) and [disableAllMessages](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#disableAllMessages) interfaces.
|
|
282
282
|
|
|
283
|
-
#### **Disable media devices of all regular users in the room**
|
|
283
|
+
#### **Disable the media devices of all regular users in the room**
|
|
284
284
|
``` typescript
|
|
285
285
|
import { useRoomParticipantState, DeviceType } from 'tuikit-atomicx-vue3/room';
|
|
286
286
|
const { closeParticipantDevice } = useRoomParticipantState();
|
|
287
287
|
|
|
288
|
-
//
|
|
288
|
+
// Forcibly turn off the microphones of all regular participants
|
|
289
289
|
async function handleDisableAllMicrophone() {
|
|
290
290
|
await disableAllDevices({
|
|
291
291
|
deviceType: DeviceType.Microphone,
|
|
@@ -293,7 +293,7 @@ async function handleDisableAllMicrophone() {
|
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
//
|
|
296
|
+
// Lift the microphone disable for all participants
|
|
297
297
|
async function handleEnableAllMicrophone() {
|
|
298
298
|
await disableAllDevices({
|
|
299
299
|
deviceType: DeviceType.Microphone,
|
|
@@ -301,7 +301,7 @@ async function handleEnableAllMicrophone() {
|
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
//
|
|
304
|
+
// Forcibly turn off the cameras of all regular participants
|
|
305
305
|
async function handleDisableAllCamera() {
|
|
306
306
|
await disableAllDevices({
|
|
307
307
|
deviceType: DeviceType.Camera,
|
|
@@ -309,7 +309,7 @@ async function handleDisableAllCamera() {
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
//
|
|
312
|
+
// Lift the camera disable for all participants
|
|
313
313
|
async function handleEnableAllCamera() {
|
|
314
314
|
await disableAllDevices({
|
|
315
315
|
deviceType: DeviceType.Camera,
|
|
@@ -323,7 +323,7 @@ async function handleEnableAllCamera() {
|
|
|
323
323
|
import { useRoomParticipantState, DeviceType } from 'tuikit-atomicx-vue3/room';
|
|
324
324
|
const { disableAllMessages } = useRoomParticipantState();
|
|
325
325
|
|
|
326
|
-
//
|
|
326
|
+
// Forcibly disable the chat capability of all regular participants
|
|
327
327
|
async function handleDisableAllMessage() {
|
|
328
328
|
await disableAllMessages({
|
|
329
329
|
disable: true,
|
|
@@ -331,55 +331,56 @@ async function handleDisableAllMessage() {
|
|
|
331
331
|
}
|
|
332
332
|
```
|
|
333
333
|
|
|
334
|
-
### **Step 7:** Monitor
|
|
334
|
+
### **Step 7:** Monitor participant speaking status
|
|
335
335
|
|
|
336
|
-
|
|
336
|
+
Using [speakingUsers](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#speakingUsers), you can obtain in real time the users who are currently speaking in the room and their volume levels.
|
|
337
337
|
``` typescript
|
|
338
338
|
const { speakingUsers } = useRoomParticipantState();
|
|
339
339
|
|
|
340
|
-
//
|
|
340
|
+
// Determine whether a user is currently speaking
|
|
341
341
|
const isSpeaking = (userId: string) => speakingUsers.value.has(userId);
|
|
342
|
-
// Get user real-time volume (0-100)
|
|
342
|
+
// Get a user's real-time volume (0-100)
|
|
343
343
|
const getVolume = (userId: string) => speakingUsers.value.get(userId) || 0;
|
|
344
344
|
```
|
|
345
345
|
|
|
346
|
-
### Step 8:
|
|
346
|
+
### Step 8: Remove a participant from the room
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
The room owner and administrators can use the [kickParticipant](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#kickParticipant) interface to remove a user from the room.
|
|
349
349
|
``` typescript
|
|
350
350
|
const { kickParticipant } = useRoomParticipantState();
|
|
351
351
|
|
|
352
|
-
//
|
|
352
|
+
// Remove a user from the room
|
|
353
353
|
await kickParticipant({ userId });
|
|
354
354
|
```
|
|
355
355
|
|
|
356
|
-
### Step 9: Invite
|
|
356
|
+
### Step 9: Invite others to join the room
|
|
357
357
|
|
|
358
|
-
In
|
|
358
|
+
In actual business scenarios, you may need to send a call invitation to users who have not yet entered the room. Atomicx provides full support for a calling system. For details, refer to In-Meeting Calling.
|
|
359
359
|
|
|
360
360
|
## API Documentation
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
361
|
+
|
|
362
|
+
|**State/Component**|**Description**|**API Documentation**|
|
|
363
|
+
|---------|---------|---------|
|
|
364
|
+
|**useRoomParticipantState**|Contains the user data in the room and the user management interfaces.|[API Documentation](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-RoomParticipantState)|
|
|
364
365
|
|
|
365
366
|
## Development Recommendations
|
|
366
367
|
|
|
367
|
-
**Permission
|
|
368
|
+
**Permission validation:** At the UI layer, we recommend using `participant.role` to determine the current user's operation permissions, and hiding the **Remove** or **Mute** buttons from users who do not have management permissions.
|
|
368
369
|
``` typescript
|
|
369
370
|
<script setup>
|
|
370
371
|
import { RoomParticipantRole } from 'tuikit-atomicx-vue3/room';
|
|
371
372
|
|
|
372
373
|
const { localParticipant } = useRoomParticipantState();
|
|
373
374
|
|
|
374
|
-
//
|
|
375
|
+
// Determine whether the current user has management permissions
|
|
375
376
|
const hasAdminPermission = computed(() => {
|
|
376
377
|
return localParticipant.value.role === RoomParticipantRole.Owner ||
|
|
377
378
|
localParticipant.value.role === RoomParticipantRole.Admin;
|
|
378
379
|
});
|
|
379
380
|
</script>
|
|
380
381
|
|
|
381
|
-
// Use in template
|
|
382
|
+
// Use in the template
|
|
382
383
|
<template>
|
|
383
|
-
<button v-if="hasAdminPermission" @click="handleKick">
|
|
384
|
+
<button v-if="hasAdminPermission" @click="handleKick">Remove</button>
|
|
384
385
|
<template>
|
|
385
386
|
```
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
This document provides a detailed guide on how to use Atomicx's [useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-RoomState) to manage the full lifecycle of a room, including creating, joining, leaving, and ending a room, as well as handling key room state notifications. The following sequence diagram illustrates the main flow of a room from creation to destruction.
|
|
2
|
+
|
|
3
|
+
## Feature Overview
|
|
4
|
+
|
|
5
|
+
[useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-RoomState) is the core Hook responsible for room management in the Atomicx solution. It encapsulates the complex underlying signaling flow, allowing developers to drive room state through simple reactive data and method calls.
|
|
6
|
+
- **Create and join:** Create and join a room via the [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#createAndJoinRoom) method, or join an existing room via the [joinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#joinRoom) method.
|
|
7
|
+
|
|
8
|
+
- **Real-time state synchronization:** The `useRoomState` Hook internally maintains the [currentRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#currentRoom) reactive data, automatically synchronizing information such as the room name, mode, and participant count.
|
|
9
|
+
|
|
10
|
+
- **Role-based exit mechanism:** Provides clear operation boundaries for different roles. A regular participant can use [leaveRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#leaveRoom) to exit; while the room owner (host) has the [endRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#endRoom) permission and can end the room and destroy its resources with one click.
|
|
11
|
+
|
|
12
|
+
## **Prerequisites**
|
|
13
|
+
|
|
14
|
+
The user has completed login authentication via [useLoginState](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#module-LoginState). Please refer to Integration Overview.
|
|
15
|
+
|
|
16
|
+
## Implementing Room Management
|
|
17
|
+
|
|
18
|
+
### Step 1: Import useRoomState
|
|
19
|
+
``` typescript
|
|
20
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
createAndJoinRoom,
|
|
24
|
+
joinRoom,
|
|
25
|
+
leaveRoom,
|
|
26
|
+
endRoom,
|
|
27
|
+
currentRoom
|
|
28
|
+
} = useRoomState();
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 2: Create a Room
|
|
32
|
+
|
|
33
|
+
Create a room (room owner): Use [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#createAndJoinRoom). After a successful call, the user automatically gains room owner permissions.
|
|
34
|
+
|
|
35
|
+
> **Note:**
|
|
36
|
+
>
|
|
37
|
+
|
|
38
|
+
> It is recommended that the roomId specified when creating a room be generated and delivered by the business backend, to ensure the uniqueness and stability of the room ID across the entire application globally.
|
|
39
|
+
>
|
|
40
|
+
|
|
41
|
+
- **Example 1: A user creates a room**
|
|
42
|
+
|
|
43
|
+
``` typescript
|
|
44
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
45
|
+
const { createAndJoinRoom } = useRoomState();
|
|
46
|
+
|
|
47
|
+
await createAndJoinRoom({
|
|
48
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
49
|
+
})
|
|
50
|
+
```
|
|
51
|
+
- **Example 2: A user creates a room and specifies the room name**
|
|
52
|
+
|
|
53
|
+
``` typescript
|
|
54
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
55
|
+
const { createAndJoinRoom } = useRoomState();
|
|
56
|
+
|
|
57
|
+
await createAndJoinRoom({
|
|
58
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
59
|
+
options: {
|
|
60
|
+
roomName: 'My Temporary Room'
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
- **Example 3: A user creates a password-protected room**
|
|
65
|
+
|
|
66
|
+
``` typescript
|
|
67
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
68
|
+
const { createAndJoinRoom } = useRoomState();
|
|
69
|
+
|
|
70
|
+
await createAndJoinRoom({
|
|
71
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
72
|
+
options: {
|
|
73
|
+
roomName: 'My Temporary Room',
|
|
74
|
+
password: '123456',
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
> **Note:**
|
|
80
|
+
>
|
|
81
|
+
|
|
82
|
+
> When the creator calls [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#createAndJoinRoom), they automatically join the room without needing to enter the password.
|
|
83
|
+
>
|
|
84
|
+
|
|
85
|
+
- **Example 4: A user creates a room and configures member management settings**
|
|
86
|
+
|
|
87
|
+
``` typescript
|
|
88
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
89
|
+
const { createAndJoinRoom } = useRoomState();
|
|
90
|
+
|
|
91
|
+
await createAndJoinRoom({
|
|
92
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
93
|
+
options: {
|
|
94
|
+
roomName: 'My Temporary Room',
|
|
95
|
+
password: '123456',
|
|
96
|
+
isAllMicrophoneDisabled: true, // Enable mute-all
|
|
97
|
+
isAllCameraDisabled: true, // Enable disable-all-cameras
|
|
98
|
+
isAllScreenShareDisabled: true, // Enable disable-all-screen-sharing
|
|
99
|
+
isAllMessageDisabled: true, // Enable disable-all-in-room-messages
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
> **Note:**
|
|
105
|
+
>
|
|
106
|
+
|
|
107
|
+
> Member management configuration only applies to regular participants; the room owner and administrators are not restricted. If you need to modify the member management configuration after the room is created or manage individual member permissions separately, please refer to Member Management.
|
|
108
|
+
>
|
|
109
|
+
|
|
110
|
+
### Step 3: A User Joins an Existing Room
|
|
111
|
+
|
|
112
|
+
A logged-in user can call [joinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#joinRoom) to join an existing room. Atomicx only supports a user joining one room at a time.
|
|
113
|
+
- **Example 1: A user joins a room**
|
|
114
|
+
|
|
115
|
+
``` typescript
|
|
116
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
117
|
+
const { joinRoom } = useRoomState();
|
|
118
|
+
|
|
119
|
+
await joinRoom({
|
|
120
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
121
|
+
})
|
|
122
|
+
```
|
|
123
|
+
- **Example 2: A user joins a password-protected room**
|
|
124
|
+
|
|
125
|
+
``` typescript
|
|
126
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
127
|
+
const { joinRoom } = useRoomState();
|
|
128
|
+
|
|
129
|
+
await joinRoom({
|
|
130
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
131
|
+
password: '123456',
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Step 4: Update Room Information
|
|
136
|
+
|
|
137
|
+
The room owner can use [updateRoomInfo](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#updateRoomInfo) to update the room name and password after creating the room.
|
|
138
|
+
``` typescript
|
|
139
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
140
|
+
const { updateRoomInfo } = useRoomState();
|
|
141
|
+
|
|
142
|
+
await updateRoomInfo({
|
|
143
|
+
roomId: 'YOUR_ROOM_ID', // Specify the room ID, generated by the business backend
|
|
144
|
+
options: {
|
|
145
|
+
roomName: 'New Room Name',
|
|
146
|
+
password: '234567',
|
|
147
|
+
},
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
> **Note:**
|
|
152
|
+
>
|
|
153
|
+
|
|
154
|
+
> The room owner must be inside the room to call [updateRoomInfo](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#updateRoomInfo). If the room owner has already left the room, they need to rejoin before they can update the room information.
|
|
155
|
+
>
|
|
156
|
+
|
|
157
|
+
### Step 5: Leave a Room
|
|
158
|
+
|
|
159
|
+
Both the room owner and regular users can call the [leaveRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#leaveRoom) interface to leave a room. The prerequisite for using this interface is that the user has already joined the room via the [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#createAndJoinRoom) or [joinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#joinRoom) interface.
|
|
160
|
+
``` typescript
|
|
161
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
162
|
+
const { leaveRoom } = useRoomState();
|
|
163
|
+
|
|
164
|
+
await leaveRoom();
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Step 6: Destroy a Room
|
|
168
|
+
|
|
169
|
+
Only the room owner can call the [endRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#endRoom) interface to destroy a room. The prerequisite for using this interface is that the user has created the room via [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#createAndJoinRoom) or has already obtained the room owner identity.
|
|
170
|
+
``` typescript
|
|
171
|
+
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
172
|
+
const { endRoom } = useRoomState();
|
|
173
|
+
|
|
174
|
+
await endRoom();
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
> **Note:**
|
|
178
|
+
>
|
|
179
|
+
> - If the room owner leaves the room but does not call [endRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#endRoom), the room will continue to exist until the automatic reclamation condition is met (no users for 6 consecutive hours).
|
|
180
|
+
> - The room owner can transfer the room owner identity to another user via the [transferOwner](https://web.sdk.qcloud.com/trtc/live/web/doc/en/index.html#transferOwner) interface.
|
|
181
|
+
|
|
182
|
+
### Step 7: Handling Abnormal Exits
|
|
183
|
+
|
|
184
|
+
#### Handling the Room Destroyed Event
|
|
185
|
+
|
|
186
|
+
Regular users can listen to the `RoomEvent.onRoomEnded` event to handle the business interaction for when a room is destroyed.
|
|
187
|
+
``` typescript
|
|
188
|
+
import { useRoomState, RoomEvent } from 'tuikit-atomicx-vue3/room';
|
|
189
|
+
import { TUIMessageBox } from '@tencentcloud/uikit-base-component-vue3';
|
|
190
|
+
const { subscribeEvent, unsubscribeEvent } = useRoomState();
|
|
191
|
+
|
|
192
|
+
function onRoomEnded() {
|
|
193
|
+
TUIMessageBox.alert({
|
|
194
|
+
title: 'Notice',
|
|
195
|
+
content: 'The room owner has dismissed the room',
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Listen to RoomEvent when the component is mounted
|
|
200
|
+
subscribeEvent(RoomEvent.onRoomEnded, onRoomEnded);
|
|
201
|
+
// Cancel the RoomEvent listener when the component is destroyed
|
|
202
|
+
unsubscribeEvent(RoomEvent.onRoomEnded, onRoomEnded);
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### Handling the User Kicked Out Event
|
|
206
|
+
|
|
207
|
+
Regular users can listen to the `RoomParticipantEvent.onKickedFromRoom` event to handle the business interaction for when a user is kicked out of the room.
|
|
208
|
+
``` typescript
|
|
209
|
+
import { useRoomParticipantState, RoomParticipantEvent, KickedOutOfRoomReason } from 'tuikit-atomicx-vue3/room';
|
|
210
|
+
import { TUIMessageBox } from '@tencentcloud/uikit-base-component-vue3';
|
|
211
|
+
|
|
212
|
+
const { subscribeEvent, unsubscribeEvent } = useRoomParticipantState();
|
|
213
|
+
|
|
214
|
+
function onKickedFromRoom({ reason }: { reason: KickedOutOfRoomReason; message: string }) {
|
|
215
|
+
let notice = '';
|
|
216
|
+
switch (reason) {
|
|
217
|
+
case KickedOutOfRoomReason.KickedByAdmin:
|
|
218
|
+
notice = 'You have been removed from the room by the room owner';
|
|
219
|
+
break;
|
|
220
|
+
case KickedOutOfRoomReason.ReplacedByAnotherDevice:
|
|
221
|
+
notice = 'Your account has logged in on another device';
|
|
222
|
+
break;
|
|
223
|
+
case KickedOutOfRoomReason.KickedByServer:
|
|
224
|
+
notice = 'You have been removed from the room by the server';
|
|
225
|
+
break;
|
|
226
|
+
case KickedOutOfRoomReason.ConnectionTimeout:
|
|
227
|
+
notice = 'Network connection timed out, exiting the room';
|
|
228
|
+
break;
|
|
229
|
+
case KickedOutOfRoomReason.InvalidStatusOnReconnect:
|
|
230
|
+
notice = 'The room has been dismissed or you were removed while offline';
|
|
231
|
+
break;
|
|
232
|
+
case KickedOutOfRoomReason.RoomLimitExceeded:
|
|
233
|
+
notice = 'The room has reached its participant limit and cannot be joined';
|
|
234
|
+
break;
|
|
235
|
+
default:
|
|
236
|
+
notice = 'You have been removed from the room';
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
TUIMessageBox.alert({
|
|
240
|
+
title: 'Notice',
|
|
241
|
+
content: notice,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Listen to RoomParticipantEvent when the component is mounted
|
|
246
|
+
subscribeEvent(RoomParticipantEvent.onKickedFromRoom, onKickedFromRoom);
|
|
247
|
+
// Cancel the RoomParticipantEvent listener when the component is destroyed
|
|
248
|
+
unsubscribeEvent(RoomParticipantEvent.onKickedFromRoom, onKickedFromRoom);
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Advanced Implementation
|
|
252
|
+
|
|
253
|
+
The current document describes quickly creating and immediately joining a room, which is suitable for instant multi-person audio/video communication scenarios.
|
|
254
|
+
|
|
255
|
+
However, in real-world business scenarios, we often need to plan ahead: set the room topic, schedule specific start and end times, and invite participants. Participants can receive a reminder before the multi-person audio/video room begins and join on time.
|
|
256
|
+
|
|
257
|
+
Atomicx provides complete scheduled room capabilities, including:
|
|
258
|
+
- **Schedule rooms:** Set the multi-person room time and participant list in advance.
|
|
259
|
+
|
|
260
|
+
- **Scheduled list**: View and manage all your upcoming multi-person rooms.
|
|
261
|
+
|
|
262
|
+
- **Join reminders:** Support automatic reminder logic before the start.
|
|
263
|
+
|
|
264
|
+
If you need to implement the more complex business logic for managing multi-person audio/video rooms described above, please refer to: Schedule Room.
|
|
265
|
+
|
|
266
|
+
## FAQ
|
|
267
|
+
|
|
268
|
+
### If there are no more users in a room but the room has not been dismissed, will the room exist indefinitely?
|
|
269
|
+
|
|
270
|
+
When there are no users entering a room for 6 consecutive hours, the backend will attempt to reclaim the room.
|
|
271
|
+
|
|
272
|
+
### If there are no more users in a room but the room has not been dismissed, will it incur any cost?
|
|
273
|
+
|
|
274
|
+
A room that has no users but has not been dismissed only occupies the group count of your package; it does not incur minute consumption or additional cost.
|
|
275
|
+
|
|
276
|
+
### Can a user join multiple rooms at the same time?
|
|
277
|
+
|
|
278
|
+
### What is the maximum number of people that can join a room at the same time?
|
|
279
|
+
|
|
280
|
+
The maximum number of users in a room depends on your package. For details, see the [TUIRoomKit Package Description](https://cloud.tencent.com/document/product/647/104842#function).
|