@tencentcloud/sdk-mcp 1.3.9 → 1.4.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/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
- package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
- package/resource/doc/{tuicallkit/vue/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +63 -420
- package/resource/doc/callkit/preset/flutter/api.md +401 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
- package/resource/doc/callkit/preset/ios/api.md +282 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
- package/resource/doc/callkit/preset/react/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
- package/resource/doc/callkit/preset/vue/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +30 -126
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
- package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
- package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
- package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
- package/resource/doc/chatkit/react/components/conversation-preview.md +116 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
- package/resource/doc/chatkit/react/components/search.md +282 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
- package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
- package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
- package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -316
- package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
- package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +1 -23
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
- package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +26 -139
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +91 -338
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +160 -543
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +17 -88
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +26 -139
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +53 -262
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +60 -272
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +63 -440
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +23 -151
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audience-list.md +13 -91
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audio-effect.md +34 -177
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-barrage.md +18 -102
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -201
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-gift.md +66 -460
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +57 -419
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-room-list.md +24 -157
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +23 -96
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +33 -195
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +35 -150
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +45 -254
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +77 -457
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +52 -261
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +36 -167
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audience-list.md +15 -45
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audio-effect.md +23 -137
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-barrage.md +25 -131
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-co-guest-interaction.md +70 -366
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-gift.md +70 -424
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-room-list.md +24 -116
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
- package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
- package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +9 -48
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
- package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
- package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
- package/resource/doc/roomkit/android/features/room-state.md +358 -0
- package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
- package/resource/doc/roomkit/android/integration.md +433 -0
- package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
- package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
- package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
- package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
- package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
- package/resource/doc/roomkit/flutter/integration.md +405 -0
- package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
- package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
- package/resource/doc/roomkit/ios/features/room-state.md +320 -0
- package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
- package/resource/doc/roomkit/ios/integration.md +384 -0
- package/resource/doc/roomkit/vue/faq.md +1 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
- package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
- package/resource/doc/roomkit/vue/features/device-state.md +24 -44
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
- package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
- package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
- package/resource/doc/roomkit/vue/features/room-state.md +25 -36
- package/resource/doc/roomkit/vue/features/room-view.md +30 -127
- package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
- package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
- package/resource/doc/roomkit/vue/features/virtual-background.md +13 -34
- package/resource/doc/roomkit/vue/integration.md +21 -80
- package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
- package/resource/doc/rtcengine/faq/web/web.md +15 -22
- package/resource/doc/rtcengine/web/api.md +17 -21
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -4
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
- package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
- package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
- package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
- package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
- package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
- package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
- package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
- package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
- package/resource/doc/trtc/android/TXLiteAVCode.md +115 -900
- package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
- package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
- package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
- package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
- package/server.js +1 -5
- package/server.js.map +1 -1
- package/tools/call/get_callkit_api.js +32 -0
- package/tools/call/get_callkit_api.js.map +1 -0
- package/tools/call/get_native_call_uikit_integration.js +34 -0
- package/tools/call/get_native_call_uikit_integration.js.map +1 -0
- package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
- package/tools/call/get_web_call_uikit_integration.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_integration.js +45 -0
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_integration.js +45 -0
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
- package/tools/common/get_faq.js +265 -0
- package/tools/common/get_faq.js.map +1 -0
- package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
- package/tools/common/get_usersig.js.map +1 -0
- package/tools/common/present_framework_choice.js +63 -0
- package/tools/common/present_framework_choice.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +28 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +18 -19
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
- package/tools/definitions/get_usersig_def.js +17 -24
- package/tools/definitions/get_usersig_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +13 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +27 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +13 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +23 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/index.js +47 -61
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_features.js +65 -0
- package/tools/live/get_native_livekit_core_features.js.map +1 -0
- package/tools/live/get_native_livekit_core_integration.js +59 -0
- package/tools/live/get_native_livekit_core_integration.js.map +1 -0
- package/tools/live/get_web_live_uikit_integration.js +48 -0
- package/tools/live/get_web_live_uikit_integration.js.map +1 -0
- package/tools/live/get_web_livekit_api.js +32 -0
- package/tools/live/get_web_livekit_api.js.map +1 -0
- package/tools/live/get_web_livekit_component_detail.js +34 -0
- package/tools/live/get_web_livekit_component_detail.js.map +1 -0
- package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
- package/tools/room/get_web_room_uikit_integration.js.map +1 -0
- package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
- package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
- package/utils/generate-structured-result.js +61 -17
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +12 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/flutter/workflow.md +0 -816
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
- package/resource/doc/chatuikit/react/components/search.md +0 -885
- package/resource/doc/chatuikit/react/create-group.md +0 -22
- package/resource/doc/chatuikit/react/init.md +0 -25
- package/resource/doc/chatuikit/react/workflow.md +0 -254
- package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
- package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
- package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
- package/resource/doc/chatuikit/vue/create-group.md +0 -26
- package/resource/doc/chatuikit/vue/init.md +0 -35
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -322
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -352
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
- package/resource/doc/livekit/live/vue/workflow.md +0 -219
- package/resource/doc/livekit/voice/android/workflow.md +0 -333
- package/resource/doc/livekit/voice/flutter/workflow.md +0 -359
- package/resource/doc/livekit/voice/ios/voice-integration.md +0 -853
- package/resource/doc/livekit/voice/ios/workflow.md +0 -358
- package/resource/doc/livekit/voice/uni-app/voice-integration.md +0 -613
- package/resource/doc/livekit/voice/uni-app/workflow.md +0 -369
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -879
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -733
- package/resource/doc/tuicallkit/android/workflow.md +0 -432
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1512
- package/resource/doc/tuicallkit/react/faq.md +0 -986
- package/resource/doc/tuicallkit/vue/api.md +0 -1512
- package/tools/call/get-native-call-integration.js +0 -43
- package/tools/call/get-native-call-integration.js.map +0 -1
- package/tools/call/get-web-call-api.js +0 -27
- package/tools/call/get-web-call-api.js.map +0 -1
- package/tools/call/get-web-call-integration.js.map +0 -1
- package/tools/chat/get-native-chat-feature-detail.js +0 -30
- package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
- package/tools/chat/get-native-chat-integration.js +0 -45
- package/tools/chat/get-native-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-component-detail.js +0 -31
- package/tools/chat/get-web-chat-component-detail.js.map +0 -1
- package/tools/chat/get-web-chat-integration.js +0 -45
- package/tools/chat/get-web-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-init.js +0 -28
- package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
- package/tools/chat/get-web-create-group-doc.js +0 -28
- package/tools/chat/get-web-create-group-doc.js.map +0 -1
- package/tools/common/get-faq.js +0 -91
- package/tools/common/get-faq.js.map +0 -1
- package/tools/common/get-usersig.js.map +0 -1
- package/tools/common/present-framework-choice.js +0 -16
- package/tools/common/present-framework-choice.js.map +0 -1
- package/tools/common/present-scenario-choice.js +0 -16
- package/tools/common/present-scenario-choice.js.map +0 -1
- package/tools/common/record-prompt.js +0 -55
- package/tools/common/record-prompt.js.map +0 -1
- package/tools/common/record-result.js +0 -60
- package/tools/common/record-result.js.map +0 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_live_api_def.js +0 -22
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -17
- package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
- package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
- package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
- package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
- package/tools/definitions/get_web_create_group_doc_def.js +0 -18
- package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
- package/tools/definitions/get_web_live_state_detail_def.js +0 -19
- package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/present_scenario_choice_def.js +0 -53
- package/tools/definitions/present_scenario_choice_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -58
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -46
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -177
- package/tools/live/get-native-live-uikit-integration.js.map +0 -1
- package/tools/live/get-web-live-component-detail.js +0 -31
- package/tools/live/get-web-live-component-detail.js.map +0 -1
- package/tools/live/get-web-live-state-detail.js +0 -31
- package/tools/live/get-web-live-state-detail.js.map +0 -1
- package/tools/live/get-web-live-uikit-integration.js +0 -52
- package/tools/live/get-web-live-uikit-integration.js.map +0 -1
- package/tools/live/get_native_live_uikit_extra_features.js +0 -105
- package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
- package/tools/live/get_native_live_uikit_interaction.js +0 -194
- package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
- package/tools/native_live/get-native-live-api.js +0 -31
- package/tools/native_live/get-native-live-api.js.map +0 -1
- package/tools/room/get-web-room-feature-detail.js.map +0 -1
- package/tools/room/get-web-room-integration.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
- package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
- package/tools/trtc/get-trtc-native-api.js +0 -31
- package/tools/trtc/get-trtc-native-api.js.map +0 -1
- package/utils/handle-component-name.js +0 -33
- package/utils/handle-component-name.js.map +0 -1
- /package/resource/doc/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
|
@@ -7,15 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
- **直播教学:**学生可以在聊天区发送弹幕或问题,老师实时查看并解答,增强课堂互动性。
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
## 前提条件
|
|
12
11
|
|
|
13
12
|
在接入功能前,请确保满足以下条件:
|
|
14
|
-
- **用户状态:**用户已经通过 useLoginState 完成登录鉴权,参考
|
|
13
|
+
- **用户状态:**用户已经通过 useLoginState 完成登录鉴权,参考 接入概览,并已作为一个房间的房主或成员在房间内,参考 房间管理。
|
|
15
14
|
|
|
16
15
|
- **环境依赖:**项目已正确安装并引入 `tuikit-atomicx-vue3`。
|
|
17
16
|
|
|
18
|
-
|
|
19
17
|
## 实现会中聊天功能
|
|
20
18
|
|
|
21
19
|
本功能提供两种集成方案,您可以根据业务需求选择最适合的一种:
|
|
@@ -23,11 +21,8 @@
|
|
|
23
21
|
|
|
24
22
|
- **方案二(高级):**使用底层 API 自定义集成。基于 atomicx-core SDK API [useMessageListState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageListState) 和 [useMessageInputState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageInputState) 状态钩子自行实现 UI 和交互逻辑,灵活度最高。
|
|
25
23
|
|
|
26
|
-

|
|
27
|
-
|
|
28
24
|
会中聊天
|
|
29
25
|
|
|
30
|
-
|
|
31
26
|
## 方案一:使用 UI 组件快速集成
|
|
32
27
|
|
|
33
28
|
`tuikit-atomicx-vue3` 提供了两个核心组件:
|
|
@@ -35,13 +30,12 @@
|
|
|
35
30
|
|
|
36
31
|
- [**MessageInput**](https://github.com/Tencent-RTC/TUIKit_Vue3/tree/main/packages/tuikit-atomicx-vue3/src/components/MessageInput)**:** 消息输入组件,支持文本、表情、图片、文件发送,并可根据禁言状态自动禁用。
|
|
37
32
|
|
|
38
|
-
|
|
39
33
|
### 步骤1:数据初始化
|
|
40
34
|
|
|
41
35
|
在用户加入房间成功后,需要调用 [setActiveConversation](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#setActiveConversation) 接口初始化聊天数据。建议监听 [currentRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#currentRoom) 的变化来自动处理。
|
|
42
36
|
|
|
43
37
|
> **说明:**
|
|
44
|
-
>
|
|
38
|
+
>
|
|
45
39
|
> - `GROUP` 为固定前缀,`setActiveConversation` 参数必须为 ``GROUP${roomId}``,否则无法正常收发消息。
|
|
46
40
|
> - `GROUP` 为 IM SDK 群组会话的固定前缀(参考 [IM 会话类型](https://web.sdk.qcloud.com/im/doc/zh-cn/Conversation.html))。房间聊天基于 IM 群组实现,因此会话 ID 必须为 ``GROUP${roomId}`` 格式。
|
|
47
41
|
|
|
@@ -67,10 +61,10 @@ watch(() => currentRoom.value?.roomId, (roomId) => {
|
|
|
67
61
|
在您的页面中,可以直接组合使用这两个组件。同时结合 [useRoomParticipantState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomParticipantState) 获取当前用户的禁言状态,控制输入框的可用性。
|
|
68
62
|
|
|
69
63
|
> **注意:**
|
|
70
|
-
>
|
|
64
|
+
>
|
|
71
65
|
|
|
72
|
-
> 所有 TUIKit 组件必须包裹在
|
|
73
|
-
>
|
|
66
|
+
> 所有 TUIKit 组件必须包裹在 UIKitProvider 内部,否则将无法获取上下文依赖,导致样式异常。
|
|
67
|
+
>
|
|
74
68
|
|
|
75
69
|
``` typescript
|
|
76
70
|
<template>
|
|
@@ -108,7 +102,7 @@ const { localParticipant } = useRoomParticipantState();
|
|
|
108
102
|
const isMessageDisabled = computed(() => localParticipant.value?.isMessageDisabled);
|
|
109
103
|
|
|
110
104
|
// 根据状态动态显示占位符提示
|
|
111
|
-
const inputPlaceholder = computed(() =>
|
|
105
|
+
const inputPlaceholder = computed(() =>
|
|
112
106
|
isMessageDisabled.value ? '您已被禁言' : '请输入消息...'
|
|
113
107
|
);
|
|
114
108
|
</script>
|
|
@@ -151,18 +145,17 @@ const openChatWindow = () => {
|
|
|
151
145
|
本节主要介绍如何通过 atomicx-core SDK API [useMessageListState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageListState) 和 [useMessageInputState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageInputState) 接口来实现自定义的聊天界面。
|
|
152
146
|
|
|
153
147
|
> **注意:**
|
|
154
|
-
>
|
|
148
|
+
>
|
|
155
149
|
|
|
156
150
|
> `MessageInputState` 默认支持与 `@tiptap/vue-3` 编辑器集成。如果您仅需要简单的文本输入框(例如 `<input>` 或 `<textarea>`),请**忽略**`setEditorInstance`、`setContent` 等与编辑器实例绑定的 API,直接使用 `updateRawValue` 和 `sendMessage` 即可。
|
|
157
|
-
>
|
|
158
|
-
|
|
151
|
+
>
|
|
159
152
|
|
|
160
153
|
#### 步骤1:数据初始化
|
|
161
154
|
|
|
162
155
|
在用户加入房间成功后,需要调用 [setActiveConversation](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#setActiveConversation) 接口初始化聊天数据。建议监听 [currentRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#currentRoom) 的变化来自动处理。
|
|
163
156
|
|
|
164
157
|
> **说明:**
|
|
165
|
-
>
|
|
158
|
+
>
|
|
166
159
|
> - `GROUP` 为固定前缀,`setActiveConversation` 参数必须为 ``GROUP${roomId}``,否则无法正常收发消息。
|
|
167
160
|
> - 在房间切换或退房时,建议重置或清空活跃会话,避免消息错发至错误会话。
|
|
168
161
|
|
|
@@ -189,7 +182,7 @@ watch(() => currentRoom.value?.roomId, (roomId) => {
|
|
|
189
182
|
``` typescript
|
|
190
183
|
import { useMessageListState } from 'tuikit-atomicx-vue3/chat';
|
|
191
184
|
|
|
192
|
-
const {
|
|
185
|
+
const {
|
|
193
186
|
messageList, // 响应式消息列表
|
|
194
187
|
loadMoreOlderMessage, // 加载更多历史消息方法
|
|
195
188
|
hasMoreOlderMessage, // 是否还有更多历史消息
|
|
@@ -207,7 +200,7 @@ const {
|
|
|
207
200
|
``` typescript
|
|
208
201
|
import { useMessageInputState } from 'tuikit-atomicx-vue3/chat';
|
|
209
202
|
|
|
210
|
-
const {
|
|
203
|
+
const {
|
|
211
204
|
inputRawValue, // 响应式数据:当前输入内容
|
|
212
205
|
updateRawValue, // 方法:更新输入内容(会自动触发"对方正在输入"状态)
|
|
213
206
|
sendMessage // 方法:发送消息
|
|
@@ -216,17 +209,17 @@ const {
|
|
|
216
209
|
const handleSend = async () => {
|
|
217
210
|
// 校验非空
|
|
218
211
|
if (!inputRawValue.value) return;
|
|
219
|
-
|
|
212
|
+
|
|
220
213
|
try {
|
|
221
214
|
// 1. 发送消息
|
|
222
215
|
// 方式 A:发送当前 inputRawValue 的内容
|
|
223
216
|
await sendMessage();
|
|
224
|
-
|
|
217
|
+
|
|
225
218
|
// 方式 B:直接发送指定文本(不依赖 inputRawValue)
|
|
226
219
|
// await sendMessage('Hello World');
|
|
227
220
|
|
|
228
221
|
console.log('发送成功');
|
|
229
|
-
|
|
222
|
+
|
|
230
223
|
// 2. 发送成功后清空输入框
|
|
231
224
|
// 关键点:非富文本模式下,务必使用 updateRawValue('') 清空
|
|
232
225
|
// 请勿使用 setContent(''),该方法仅在绑定了 editor 实例后生效
|
|
@@ -237,10 +230,10 @@ const handleSend = async () => {
|
|
|
237
230
|
};
|
|
238
231
|
|
|
239
232
|
// 示例:绑定原生输入框
|
|
240
|
-
// <input
|
|
241
|
-
// :value="inputRawValue"
|
|
242
|
-
// @input="(e) => updateRawValue(e.target.value)"
|
|
243
|
-
// @keyup.enter="handleSend"
|
|
233
|
+
// <input
|
|
234
|
+
// :value="inputRawValue"
|
|
235
|
+
// @input="(e) => updateRawValue(e.target.value)"
|
|
236
|
+
// @keyup.enter="handleSend"
|
|
244
237
|
// />
|
|
245
238
|
```
|
|
246
239
|
|
|
@@ -249,15 +242,15 @@ const handleSend = async () => {
|
|
|
249
242
|
通过 [loadMoreOlderMessage](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageListState) 方法分页拉取历史消息。通常在滚动到列表顶部时触发。
|
|
250
243
|
|
|
251
244
|
> **注意:**
|
|
252
|
-
>
|
|
245
|
+
>
|
|
253
246
|
|
|
254
247
|
> 在加载历史消息后,通常需要手动调整滚动条位置,以保持当前浏览视角不发生跳变。
|
|
255
|
-
>
|
|
248
|
+
>
|
|
256
249
|
|
|
257
250
|
``` typescript
|
|
258
251
|
import { useMessageListState } from 'tuikit-atomicx-vue3/chat';
|
|
259
252
|
|
|
260
|
-
const {
|
|
253
|
+
const {
|
|
261
254
|
hasMoreOlderMessage,
|
|
262
255
|
loadMoreOlderMessage
|
|
263
256
|
} = useMessageListState();
|
|
@@ -266,9 +259,9 @@ const loadHistory = async () => {
|
|
|
266
259
|
if (hasMoreOlderMessage.value) {
|
|
267
260
|
// 记录加载前的滚动高度
|
|
268
261
|
// const previousHeight = scrollContainer.value.scrollHeight;
|
|
269
|
-
|
|
262
|
+
|
|
270
263
|
await loadMoreOlderMessage();
|
|
271
|
-
|
|
264
|
+
|
|
272
265
|
// DOM 更新后恢复滚动位置
|
|
273
266
|
// nextTick(() => {
|
|
274
267
|
// const currentHeight = scrollContainer.value.scrollHeight;
|
|
@@ -282,7 +275,7 @@ const loadHistory = async () => {
|
|
|
282
275
|
|
|
283
276
|
如果您需要已读回执功能,可以使用 [setEnableReadReceipt](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#setEnableReadReceipt)。
|
|
284
277
|
``` typescript
|
|
285
|
-
const {
|
|
278
|
+
const {
|
|
286
279
|
setEnableReadReceipt, // 开启/关闭已读回执
|
|
287
280
|
} = useMessageListState();
|
|
288
281
|
|
|
@@ -293,45 +286,36 @@ setEnableReadReceipt(true);
|
|
|
293
286
|
## 开发注意事项
|
|
294
287
|
- **禁言状态同步**
|
|
295
288
|
|
|
296
|
-
|
|
297
289
|
`localParticipant.isMessageDisabled` 是由房间管理员控制的。当管理员开启“全员禁言”或单独禁言某用户时,该属性会自动更新。请务必将此属性绑定到输入框的 `disabled` 状态上,以在前端层面限制用户发言。
|
|
298
290
|
|
|
299
291
|
- **会话切换时机**
|
|
300
292
|
|
|
301
|
-
|
|
302
293
|
确保 `setActiveConversation` 在进房成功后且 `roomId` 有值时调用。如果在进房前调用,可能会因为 SDK 尚未初始化完毕或未登录而失败。
|
|
303
294
|
|
|
304
295
|
- **容器布局要求(重要)**
|
|
305
296
|
|
|
306
|
-
|
|
307
297
|
消息列表组件内部处理了滚动逻辑,因此**父容器必须有固定的高度**(例如 `height: 100%` 或具体像素值)并设置 `overflow: hidden`,否则会导致列表无限拉长、无法滚动。
|
|
308
298
|
|
|
309
299
|
- **消息类型处理**
|
|
310
300
|
|
|
311
|
-
|
|
312
301
|
`messageList` 中包含多种类型的消息(文本、图片、文件等),自定义渲染时需根据 `msg.type` 进行区分处理。
|
|
313
302
|
|
|
314
303
|
- **输入状态管理**
|
|
315
304
|
|
|
316
|
-
|
|
317
305
|
使用 `updateRawValue` 更新输入内容会自动触发 "对方正在输入" 的状态通知(如果支持)。如果仅使用 `inputRawValue.value = 'xxx'` 可能不会触发该状态。
|
|
318
306
|
|
|
319
307
|
- **历史消息滚动维持**
|
|
320
308
|
|
|
321
|
-
|
|
322
309
|
在自定义开发中,调用 `loadMoreOlderMessage` 加载历史消息后,DOM 高度会增加。为了防止视图跳动,需要在加载前记录 `scrollHeight`,加载后(`nextTick`)计算高度差并调整 `scrollTop`。
|
|
323
310
|
|
|
324
311
|
- **新消息滚动策略**
|
|
325
312
|
|
|
326
|
-
|
|
327
313
|
建议实现“智能滚动”逻辑:当用户位于列表底部时,收到新消息自动滚动到底部;当用户正在浏览历史消息时,保持当前位置不动,并显示“有新消息”的提示气泡。
|
|
328
314
|
|
|
329
315
|
- **会话 ID 格式要求**
|
|
330
316
|
|
|
331
|
-
|
|
332
317
|
调用 `setActiveConversation` 时,必须使用 ``GROUP${roomId}`` 格式(GROUP 为固定前缀)。这是 IM SDK 群组会话的标准格式,不可自定义或省略前缀,否则无法正常收发消息。
|
|
333
318
|
|
|
334
|
-
|
|
335
319
|
## 常见问题
|
|
336
320
|
|
|
337
321
|
**切到群组会话失败或消息列表无内容?**
|
|
@@ -376,52 +360,10 @@ await sendMessage([{ type: 'image', file }]);
|
|
|
376
360
|
腾讯云在 GitHub 上提供了示例项目 [atomicx-vite-vue3-ts](https://github.com/Tencent-RTC/TUIRoomKit/tree/main/Web/example/atomicx-vite-vue3-ts) ,您可以参考以实现完整的 RoomKit 功能。
|
|
377
361
|
|
|
378
362
|
## API 文档
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
</tr>
|
|
387
|
-
|
|
388
|
-
<tr>
|
|
389
|
-
<td rowspan="1" colSpan="1" >**useRoomState**</td>
|
|
390
|
-
|
|
391
|
-
<td rowspan="1" colSpan="1" >房间状态管理(创建、加入、预约等)</td>
|
|
392
|
-
|
|
393
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomState)</td>
|
|
394
|
-
</tr>
|
|
395
|
-
|
|
396
|
-
<tr>
|
|
397
|
-
<td rowspan="1" colSpan="1" >**useRoomParticipantState**</td>
|
|
398
|
-
|
|
399
|
-
<td rowspan="1" colSpan="1" >房间参与者管理(成员列表、权限控制)</td>
|
|
400
|
-
|
|
401
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomParticipantState)</td>
|
|
402
|
-
</tr>
|
|
403
|
-
|
|
404
|
-
<tr>
|
|
405
|
-
<td rowspan="1" colSpan="1" >**useConversationListState**</td>
|
|
406
|
-
|
|
407
|
-
<td rowspan="1" colSpan="1" >会话列表管理</td>
|
|
408
|
-
|
|
409
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-ConversationListState)</td>
|
|
410
|
-
</tr>
|
|
411
|
-
|
|
412
|
-
<tr>
|
|
413
|
-
<td rowspan="1" colSpan="1" >**useMessageListState**</td>
|
|
414
|
-
|
|
415
|
-
<td rowspan="1" colSpan="1" >消息列表管理</td>
|
|
416
|
-
|
|
417
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageListState)</td>
|
|
418
|
-
</tr>
|
|
419
|
-
|
|
420
|
-
<tr>
|
|
421
|
-
<td rowspan="1" colSpan="1" >**useMessageInputState**</td>
|
|
422
|
-
|
|
423
|
-
<td rowspan="1" colSpan="1" >消息输入管理</td>
|
|
424
|
-
|
|
425
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageInputState)</td>
|
|
426
|
-
</tr>
|
|
427
|
-
</table>
|
|
363
|
+
| **State/Component** | **功能描述** | **API 文档** |
|
|
364
|
+
| --- | --- | --- |
|
|
365
|
+
| **useRoomState** | 房间状态管理(创建、加入、预约等) | [API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomState) |
|
|
366
|
+
| **useRoomParticipantState** | 房间参与者管理(成员列表、权限控制) | [API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomParticipantState) |
|
|
367
|
+
| **useConversationListState** | 会话列表管理 | [API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-ConversationListState) |
|
|
368
|
+
| **useMessageListState** | 消息列表管理 | [API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageListState) |
|
|
369
|
+
| **useMessageInputState** | 消息输入管理 | [API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-MessageInputState) |
|
|
@@ -9,20 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
- **分级管理:**支持对房主、管理员及普通成员实现差异化的权限策略。
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
## 前提条件
|
|
14
|
-
- 用户已经通过 [useLoginState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-LoginState) 完成登录鉴权,请参考
|
|
15
|
-
|
|
16
|
-
- 用户已经通过 [useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomState) 进入房间,请参考 [房间管理](https://write.woa.com/document/197379861957083136)。
|
|
13
|
+
- 用户已经通过 [useLoginState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-LoginState) 完成登录鉴权,请参考 接入概览。
|
|
17
14
|
|
|
15
|
+
- 用户已经通过 [useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomState) 进入房间,请参考 房间管理。
|
|
18
16
|
|
|
19
17
|
## 集成成员管理组件
|
|
20
18
|
|
|
21
19
|
如果您需要快速构建成员列表界面,推荐直接使用 `RoomParticipantList` 组件。`RoomParticipantList` 是一个开箱即用的参会者列表组件,内置了完整的成员管理 UI 和交互。
|
|
22
20
|
|
|
23
|
-

|
|
24
|
-
|
|
25
|
-
|
|
26
21
|
集成 `RoomParticipantList` 组件示例代码:
|
|
27
22
|
``` typescript
|
|
28
23
|
<template>
|
|
@@ -43,11 +38,11 @@
|
|
|
43
38
|
<script setup lang="ts">
|
|
44
39
|
import { ref } from 'vue';
|
|
45
40
|
import { IconClose } from '@tencentcloud/uikit-base-component-vue3';
|
|
46
|
-
import {
|
|
41
|
+
import {
|
|
47
42
|
RoomView,
|
|
48
43
|
RoomParticipantList,
|
|
49
44
|
useRoomState,
|
|
50
|
-
useRoomParticipantState
|
|
45
|
+
useRoomParticipantState
|
|
51
46
|
} from 'tuikit-atomicx-vue3/room';
|
|
52
47
|
|
|
53
48
|
const { currentRoom } = useRoomState();
|
|
@@ -86,11 +81,10 @@ const { participantList } = useRoomParticipantState();
|
|
|
86
81
|
```
|
|
87
82
|
|
|
88
83
|
> **说明:**
|
|
89
|
-
>
|
|
84
|
+
>
|
|
90
85
|
> - `RoomParticipantList` 会自动占满父容器的高度和宽度,请确保其父容器具备明确的尺寸。
|
|
91
86
|
> - 使用 `RoomParticipantList` 组件请确保在 `App.vue` 中配置全局 `UIKitProvider`,具体请参考 [配置 App.vue](https://cloud.tencent.com/document/product/647/81962#ce98ee15-b0cb-43af-81da-70f51231430e)。
|
|
92
87
|
|
|
93
|
-
|
|
94
88
|
## 实现成员管理功能
|
|
95
89
|
|
|
96
90
|
如果您需要自定义成员列表 UI 或在特定业务中触发管理行为,请使用 [useRoomParticipantState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomParticipantState)。
|
|
@@ -118,11 +112,10 @@ const handleLoadMore = async () => {
|
|
|
118
112
|
```
|
|
119
113
|
|
|
120
114
|
> **说明:**
|
|
121
|
-
>
|
|
115
|
+
>
|
|
122
116
|
|
|
123
117
|
> `getParticipantList` 接口拉取成功的数据会自动维护在 `participantList` 中,UI 只需要渲染 `participantList` 的数据即可。
|
|
124
|
-
>
|
|
125
|
-
|
|
118
|
+
>
|
|
126
119
|
|
|
127
120
|
### 步骤2:渲染参会者信息
|
|
128
121
|
|
|
@@ -137,15 +130,15 @@ const handleLoadMore = async () => {
|
|
|
137
130
|
</button>
|
|
138
131
|
</div>
|
|
139
132
|
<div class="list-content">
|
|
140
|
-
<div
|
|
141
|
-
v-for="participant in participantList"
|
|
133
|
+
<div
|
|
134
|
+
v-for="participant in participantList"
|
|
142
135
|
:key="participant.userId"
|
|
143
136
|
class="participant-item"
|
|
144
137
|
>
|
|
145
138
|
<!-- 头像 -->
|
|
146
|
-
<Avatar
|
|
147
|
-
:user-id="participant.userId"
|
|
148
|
-
:avatar-url="participant.avatarUrl"
|
|
139
|
+
<Avatar
|
|
140
|
+
:user-id="participant.userId"
|
|
141
|
+
:avatar-url="participant.avatarUrl"
|
|
149
142
|
/>
|
|
150
143
|
|
|
151
144
|
<!-- 用户信息 -->
|
|
@@ -153,14 +146,14 @@ const handleLoadMore = async () => {
|
|
|
153
146
|
<div class="user-name">
|
|
154
147
|
<span>{{ participant.userName }}</span>
|
|
155
148
|
<span v-if="participant.userId === localParticipant.userId" class="badge">我</span>
|
|
156
|
-
<span
|
|
157
|
-
v-if="participant.role === RoomParticipantRole.Owner"
|
|
149
|
+
<span
|
|
150
|
+
v-if="participant.role === RoomParticipantRole.Owner"
|
|
158
151
|
class="role-badge owner"
|
|
159
152
|
>
|
|
160
153
|
房主
|
|
161
154
|
</span>
|
|
162
|
-
<span
|
|
163
|
-
v-else-if="participant.role === RoomParticipantRole.Admin"
|
|
155
|
+
<span
|
|
156
|
+
v-else-if="participant.role === RoomParticipantRole.Admin"
|
|
164
157
|
class="role-badge admin"
|
|
165
158
|
>
|
|
166
159
|
管理员
|
|
@@ -170,15 +163,15 @@ const handleLoadMore = async () => {
|
|
|
170
163
|
|
|
171
164
|
<!-- 设备状态 -->
|
|
172
165
|
<div class="device-status">
|
|
173
|
-
<IconMicOn
|
|
166
|
+
<IconMicOn
|
|
174
167
|
size="20"
|
|
175
|
-
v-if="participant.microphoneStatus === DeviceStatus.On"
|
|
168
|
+
v-if="participant.microphoneStatus === DeviceStatus.On"
|
|
176
169
|
class="icon-on"
|
|
177
170
|
/>
|
|
178
171
|
<IconMicOff size="20" v-else class="icon-off" />
|
|
179
172
|
<IconCameraOn
|
|
180
173
|
size="20"
|
|
181
|
-
v-if="participant.cameraStatus === DeviceStatus.On"
|
|
174
|
+
v-if="participant.cameraStatus === DeviceStatus.On"
|
|
182
175
|
class="icon-on"
|
|
183
176
|
/>
|
|
184
177
|
<IconCameraOff size="20" v-else class="icon-off" />
|
|
@@ -191,15 +184,15 @@ const handleLoadMore = async () => {
|
|
|
191
184
|
<script setup lang="ts">
|
|
192
185
|
import { computed } from 'vue';
|
|
193
186
|
import { IconRefresh, IconMicOn, IconMicOff, IconCameraOn, IconCameraOff } from '@tencentcloud/uikit-base-component-vue3';
|
|
194
|
-
import {
|
|
187
|
+
import {
|
|
195
188
|
useRoomParticipantState,
|
|
196
189
|
Avatar,
|
|
197
190
|
RoomParticipantRole,
|
|
198
191
|
DeviceStatus
|
|
199
192
|
} from 'tuikit-atomicx-vue3/room';
|
|
200
193
|
|
|
201
|
-
const {
|
|
202
|
-
localParticipant,
|
|
194
|
+
const {
|
|
195
|
+
localParticipant,
|
|
203
196
|
participantList,
|
|
204
197
|
getParticipantList,
|
|
205
198
|
transferOwner
|
|
@@ -231,11 +224,11 @@ const handleRefresh = async () => {
|
|
|
231
224
|
<script setup lang="ts">
|
|
232
225
|
import { computed } from 'vue';
|
|
233
226
|
import { IconRefresh, IconMicOn, IconMicOff, IconCameraOn, IconCameraOff } from '@tencentcloud/uikit-base-component-vue3';
|
|
234
|
-
import {
|
|
227
|
+
import {
|
|
235
228
|
useRoomParticipantState,
|
|
236
229
|
} from 'tuikit-atomicx-vue3/room';
|
|
237
230
|
|
|
238
|
-
const {
|
|
231
|
+
const {
|
|
239
232
|
updateParticipantMetaData,
|
|
240
233
|
} = useRoomParticipantState();
|
|
241
234
|
|
|
@@ -362,27 +355,12 @@ await kickParticipant({ userId });
|
|
|
362
355
|
|
|
363
356
|
### 步骤9:邀请其他人加入房间
|
|
364
357
|
|
|
365
|
-
实际业务中,您可能需要向未进房的用户发起呼叫邀请。Atomicx 提供了完整的呼叫系统支持,请查看
|
|
358
|
+
实际业务中,您可能需要向未进房的用户发起呼叫邀请。Atomicx 提供了完整的呼叫系统支持,请查看 会中呼叫。
|
|
366
359
|
|
|
367
360
|
## API 文档
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
<td rowspan="1" colSpan="1" >**功能描述**</td>
|
|
373
|
-
|
|
374
|
-
<td rowspan="1" colSpan="1" >**API 文档**</td>
|
|
375
|
-
</tr>
|
|
376
|
-
|
|
377
|
-
<tr>
|
|
378
|
-
<td rowspan="1" colSpan="1" >**useRoomParticipantState**</td>
|
|
379
|
-
|
|
380
|
-
<td rowspan="1" colSpan="1" >包含房间内用户数据,用户管理接口。</td>
|
|
381
|
-
|
|
382
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomParticipantState)</td>
|
|
383
|
-
</tr>
|
|
384
|
-
</table>
|
|
385
|
-
|
|
361
|
+
| **State/Component** | **功能描述** | **API 文档** |
|
|
362
|
+
| --- | --- | --- |
|
|
363
|
+
| **useRoomParticipantState** | 包含房间内用户数据,用户管理接口。 | [API 文档](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomParticipantState) |
|
|
386
364
|
|
|
387
365
|
## 开发建议
|
|
388
366
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
本篇文档将详细指导您如何使用 Atomicx 的 [useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomState) 管理房间的完整生命周期,包括创建、加入、离开以及结束房间,以及处理关键的房间状态通知。以下时序图演示了房间从创建到销毁的主要流程。
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
## 功能介绍
|
|
7
4
|
|
|
8
5
|
[useRoomState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-RoomState) 是 Atomicx 方案中负责房间管理的核心 Hook。它封装了复杂的底层信令流程,开发者可以通过简单的响应式数据和方法调用来驱动房间状态。
|
|
@@ -12,10 +9,9 @@
|
|
|
12
9
|
|
|
13
10
|
- **权限分明的退出机制:**针对不同角色提供了清晰的操作边界。普通成员可以使用 [leaveRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#leaveRoom) 退出;而房主(主持人)则拥有 [endRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#endRoom) 权限,可以一键结束房间并销毁房间资源。
|
|
14
11
|
|
|
15
|
-
|
|
16
12
|
## **前提条件**
|
|
17
13
|
|
|
18
|
-
用户已经通过 [useLoginState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-LoginState) 完成登录鉴权,请参考
|
|
14
|
+
用户已经通过 [useLoginState](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#module-LoginState) 完成登录鉴权,请参考 接入概览。
|
|
19
15
|
|
|
20
16
|
## 实现房间管理
|
|
21
17
|
|
|
@@ -23,12 +19,12 @@
|
|
|
23
19
|
``` typescript
|
|
24
20
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
25
21
|
|
|
26
|
-
const {
|
|
27
|
-
createAndJoinRoom,
|
|
28
|
-
joinRoom,
|
|
29
|
-
leaveRoom,
|
|
22
|
+
const {
|
|
23
|
+
createAndJoinRoom,
|
|
24
|
+
joinRoom,
|
|
25
|
+
leaveRoom,
|
|
30
26
|
endRoom,
|
|
31
|
-
currentRoom
|
|
27
|
+
currentRoom
|
|
32
28
|
} = useRoomState();
|
|
33
29
|
```
|
|
34
30
|
|
|
@@ -37,17 +33,17 @@ const {
|
|
|
37
33
|
创建房间(房主):使用 [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#createAndJoinRoom),调用成功后该用户将自动获得房主权限。
|
|
38
34
|
|
|
39
35
|
> **注意:**
|
|
40
|
-
>
|
|
36
|
+
>
|
|
41
37
|
|
|
42
38
|
> 创建房间时指定的 roomId 建议由业务后台生成并下发,以确保房间 Id 在全局应用中的唯一性与稳定性。
|
|
43
|
-
>
|
|
39
|
+
>
|
|
44
40
|
|
|
45
41
|
- **示例一:用户创建房间**
|
|
46
42
|
|
|
47
43
|
``` typescript
|
|
48
44
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
49
45
|
const { createAndJoinRoom } = useRoomState();
|
|
50
|
-
|
|
46
|
+
|
|
51
47
|
await createAndJoinRoom({
|
|
52
48
|
roomId: 'YOUR_ROOM_ID', // 指定房间 Id,由业务后台生成
|
|
53
49
|
})
|
|
@@ -57,7 +53,7 @@ const {
|
|
|
57
53
|
``` typescript
|
|
58
54
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
59
55
|
const { createAndJoinRoom } = useRoomState();
|
|
60
|
-
|
|
56
|
+
|
|
61
57
|
await createAndJoinRoom({
|
|
62
58
|
roomId: 'YOUR_ROOM_ID', // 指定房间 Id,由业务后台生成
|
|
63
59
|
options: {
|
|
@@ -70,7 +66,7 @@ const {
|
|
|
70
66
|
``` typescript
|
|
71
67
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
72
68
|
const { createAndJoinRoom } = useRoomState();
|
|
73
|
-
|
|
69
|
+
|
|
74
70
|
await createAndJoinRoom({
|
|
75
71
|
roomId: 'YOUR_ROOM_ID', // 指定房间 Id,由业务后台生成
|
|
76
72
|
options: {
|
|
@@ -78,20 +74,20 @@ const {
|
|
|
78
74
|
password: '123456',
|
|
79
75
|
}
|
|
80
76
|
})
|
|
81
|
-
```
|
|
77
|
+
```
|
|
82
78
|
|
|
83
79
|
> **说明:**
|
|
84
|
-
>
|
|
80
|
+
>
|
|
85
81
|
|
|
86
82
|
> 创建者在调用 [createAndJoinRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#createAndJoinRoom) 时会自动加入房间,无需输入密码。
|
|
87
|
-
>
|
|
83
|
+
>
|
|
88
84
|
|
|
89
85
|
- **示例四:用户创建房间并配置成员管理信息**
|
|
90
86
|
|
|
91
87
|
``` typescript
|
|
92
88
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
93
89
|
const { createAndJoinRoom } = useRoomState();
|
|
94
|
-
|
|
90
|
+
|
|
95
91
|
await createAndJoinRoom({
|
|
96
92
|
roomId: 'YOUR_ROOM_ID', // 指定房间 Id,由业务后台生成
|
|
97
93
|
options: {
|
|
@@ -103,14 +99,13 @@ const {
|
|
|
103
99
|
isAllMessageDisabled: true, // 开启全员禁止发会中消息
|
|
104
100
|
}
|
|
105
101
|
})
|
|
106
|
-
```
|
|
102
|
+
```
|
|
107
103
|
|
|
108
104
|
> **说明:**
|
|
109
|
-
>
|
|
110
|
-
|
|
111
|
-
> 成员管理配置信息仅对普通成员生效,房主和管理员不受限制。如需在房间创建后修改成员管理配置或单独管理成员权限,请参考 [成员管理](https://write.woa.com/document/197380064613830656)。
|
|
112
|
-
>
|
|
105
|
+
>
|
|
113
106
|
|
|
107
|
+
> 成员管理配置信息仅对普通成员生效,房主和管理员不受限制。如需在房间创建后修改成员管理配置或单独管理成员权限,请参考 成员管理。
|
|
108
|
+
>
|
|
114
109
|
|
|
115
110
|
### 步骤3:用户加入已有房间
|
|
116
111
|
|
|
@@ -120,7 +115,7 @@ const {
|
|
|
120
115
|
``` typescript
|
|
121
116
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
122
117
|
const { joinRoom } = useRoomState();
|
|
123
|
-
|
|
118
|
+
|
|
124
119
|
await joinRoom({
|
|
125
120
|
roomId: 'YOUR_ROOM_ID', // 指定房间 Id,由业务后台生成
|
|
126
121
|
})
|
|
@@ -130,7 +125,7 @@ const {
|
|
|
130
125
|
``` typescript
|
|
131
126
|
import { useRoomState } from 'tuikit-atomicx-vue3/room';
|
|
132
127
|
const { joinRoom } = useRoomState();
|
|
133
|
-
|
|
128
|
+
|
|
134
129
|
await joinRoom({
|
|
135
130
|
roomId: 'YOUR_ROOM_ID', // 指定房间 Id,由业务后台生成
|
|
136
131
|
password: '123456',
|
|
@@ -154,11 +149,10 @@ await updateRoomInfo({
|
|
|
154
149
|
```
|
|
155
150
|
|
|
156
151
|
> **说明:**
|
|
157
|
-
>
|
|
152
|
+
>
|
|
158
153
|
|
|
159
154
|
> 房主必须在房间内才能调用 [updateRoomInfo](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#updateRoomInfo)。如果房主已离开房间,需要重新加入后才能更新房间信息。
|
|
160
|
-
>
|
|
161
|
-
|
|
155
|
+
>
|
|
162
156
|
|
|
163
157
|
### 步骤5:离开房间
|
|
164
158
|
|
|
@@ -181,11 +175,10 @@ await endRoom();
|
|
|
181
175
|
```
|
|
182
176
|
|
|
183
177
|
> **说明:**
|
|
184
|
-
>
|
|
178
|
+
>
|
|
185
179
|
> - 如果房主离开房间但未调用 [endRoom](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#endRoom),房间将继续存在,直到满足自动回收条件(连续 6 小时无用户)。
|
|
186
180
|
> - 房主可以通过 [transferOwner](https://web.sdk.qcloud.com/trtc/live/web/doc/zh/index.html#transferOwner) 接口将房主身份转移给其他用户。
|
|
187
181
|
|
|
188
|
-
|
|
189
182
|
### 步骤7:异常退出处理
|
|
190
183
|
|
|
191
184
|
#### 处理房间被销毁事件
|
|
@@ -268,9 +261,7 @@ Atomicx 提供了完整的预约房间能力,包括:
|
|
|
268
261
|
|
|
269
262
|
- **入会提醒:**支持开始前的自动提醒逻辑。
|
|
270
263
|
|
|
271
|
-
|
|
272
|
-
如果您需要实现上述更复杂的商业多人音视频房间管理逻辑,请参考:[预定房间](https://write.woa.com/document/197380092150673408)。
|
|
273
|
-
|
|
264
|
+
如果您需要实现上述更复杂的商业多人音视频房间管理逻辑,请参考:预定房间。
|
|
274
265
|
|
|
275
266
|
## 常见问题
|
|
276
267
|
|
|
@@ -284,8 +275,6 @@ Atomicx 提供了完整的预约房间能力,包括:
|
|
|
284
275
|
|
|
285
276
|
### 一个用户可以同时加入多个房间吗?
|
|
286
277
|
|
|
287
|
-
Atomicx 提供的 `useRoomState` 为单例接口,仅支持用户同时加入一个房间。若您需要支持一个用户同时加入多个房间,欢迎 [联系我们](https://cloud.tencent.com/document/product/647/19906) 提交反馈。
|
|
288
|
-
|
|
289
278
|
### 最多支持多少人同时加入房间?
|
|
290
279
|
|
|
291
280
|
房间内用户数量上限和您的套餐包相关,具体请查看 [TUIRoomKit 套餐包说明](https://cloud.tencent.com/document/product/647/104842#function)。
|