@tencentcloud/sdk-mcp 1.3.8 → 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/react/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/callkit/preset/android/integration.md +530 -0
- 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/chatkit/android/integration.md +498 -0
- 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/core-sdk/live/flutter/live-integration.md +687 -0
- 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/core-sdk/voice/android/voice-audience-list.md +264 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-audio-effect.md +226 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-barrage.md +456 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +539 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-gift.md +453 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-host-interaction.md +516 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-integration.md +509 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-room-list.md +365 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-audience-list.md +259 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-audio-effect.md +596 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-barrage.md +494 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +516 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-gift.md +418 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-integration.md +563 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-room-list.md +709 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-audience-list.md +262 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-audio-effect.md +211 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-barrage.md +414 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +492 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-gift.md +405 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-host-interaction.md +611 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-room-list.md +336 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-audience-list.md +234 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-audio-effect.md +218 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-barrage.md +376 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-co-guest-interaction.md +648 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-gift.md +362 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-room-list.md +470 -0
- 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 +118 -282
- 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 -18
- 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 -19
- 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 -30
- 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 -59
- 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/integration.md +0 -612
- package/resource/doc/chatuikit/android/workflow.md +0 -0
- 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/live-integration.md +0 -1029
- 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/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 -487
- package/resource/doc/tuicallkit/android/integration.md +0 -302
- package/resource/doc/tuicallkit/android/workflow.md +0 -0
- 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/vue/api.md +0 -1512
- package/resource/doc/tuicallkit/vue/faq.md +0 -986
- 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/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 -50
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -115
- 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 -95
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -53
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -30
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -101
- 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 -101
- 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
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
`RoomParticipantStore` 是 `AtomicXCore` 中专用于房间参与者管理的模块。该模块为多人房间场景提供了核心能力,支持构建完整的成员管理体系。
|
|
2
|
+
|
|
3
|
+
## 房间模式说明
|
|
4
|
+
|
|
5
|
+
在开始使用成员管理功能之前,需要了解 `AtomicXCore` 中房间模块支持的两种房间模式,不同模式下的成员管理功能有所区别:
|
|
6
|
+
| **标准房间模式(Standard Room)** | **网络研讨会房间模式(Webinar Room)** |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| - **适用场景:**小型会议、团队协作、朋友聊天等。<br>- **成员特点:**所有成员都是参与者,可以自由开启/关闭音视频设备。<br>- **管理特点:**扁平化管理,房主可设置管理员进行协助管理。 | - **适用场景**:网络研讨会、在线培训等。<br>- **成员特点**:<br>- **嘉宾(Participants)**:可以开启音视频设备,参与互动。<br>- **观众(Audience)**:只能观看,无法开启音视频设备。<br>- **管理特点**:分层管理,支持观众与嘉宾身份转换。 |
|
|
9
|
+
|
|
10
|
+
## 核心功能
|
|
11
|
+
- **获取参与者列表**:获取并展示当前房间内所有参与者信息(网络研讨会房间模式下,获取到的是嘉宾列表,嘉宾可以开启麦克风与其他嘉宾互动)。
|
|
12
|
+
|
|
13
|
+
- **获取观众列表:**网络研讨会房间模式下,获取观众列表信息。
|
|
14
|
+
|
|
15
|
+
- **搜索房间内成员:**搜索所在房间内的指定用户。
|
|
16
|
+
|
|
17
|
+
- **将观众提升为嘉宾:**网络研讨会房间模式下,可以将观众提升为嘉宾,提升为嘉宾的用户可以开启麦克风与房间内其他的嘉宾互动。
|
|
18
|
+
|
|
19
|
+
- **将嘉宾降级为观众:**网络研讨会房间模式下,可以将嘉宾降级为观众, 降级为观众的用户无法与房间内的嘉宾进行语音互动。
|
|
20
|
+
|
|
21
|
+
- **转移房主身份**:房主可以将房主身份转移给房间内任意一名参与者。
|
|
22
|
+
|
|
23
|
+
- **设置/撤销管理员**:房主可以设置参与者为管理员,同时也可撤销房间内的管理员。
|
|
24
|
+
|
|
25
|
+
- **将参与者移出房间**:房主或者管理员可以将房间内任意一名参与者移出房间。
|
|
26
|
+
|
|
27
|
+
- **参与者信息更新**:房间内所有人都可以更新自己的参与者信息。
|
|
28
|
+
|
|
29
|
+
- **音视频设备管理**:支持申请/邀请打开摄像头、麦克风,关闭远端摄像头、麦克风,以及房主和管理员设置全体静音,全体禁画功能。
|
|
30
|
+
|
|
31
|
+
## 功能对比
|
|
32
|
+
| **功能** | **标准房间模式** | **网络研讨会房间模式** |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| 获取参与者列表 | 获取所有房间成员 | 获取嘉宾列表 |
|
|
35
|
+
| 获取观众列表 | 不适用 | 获取观众列表 |
|
|
36
|
+
| 搜索房间内成员 | 支持 | 支持 |
|
|
37
|
+
| 将观众提升为嘉宾 | 不适用 | 支持 |
|
|
38
|
+
| 将嘉宾降级为观众 | 不适用 | 支持 |
|
|
39
|
+
| 转移房主身份 | 支持 | 支持 |
|
|
40
|
+
| 设置/撤销管理员 | 支持 | 支持 |
|
|
41
|
+
| 移出房间 | 支持 | 支持 |
|
|
42
|
+
| 更新参与者信息 | 支持 | 支持 |
|
|
43
|
+
| 音视频设备管理 | 支持 | 支持 |
|
|
44
|
+
|
|
45
|
+
## 核心概念
|
|
46
|
+
|
|
47
|
+
在开始集成之前,需要通过下表了解一下`RoomParticipantStore`相关的几个核心概念:
|
|
48
|
+
| **核心概念** | **类型** | **核心职责与描述** |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| [RoomParticipant](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.room/-room-participant/index.html) | `data class` | 代表参与者的核心数据模型,封装了参与者的完整信息和状态管理能力。<br>**标准房间模式:**代表房间内的所有成员。<br>**网络研讨会房间模式:**代表嘉宾,可以开启/关闭麦克风。<br>核心功能包括:参与者基本信息管理(用户 ID 、用户名称、用户头像、房间内角色身份)、参与者设备状态管理(麦克风状态,摄像头状态,屏幕分享状态,消息状态)。 |
|
|
51
|
+
| [RoomParticipantState](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.room/-room-participant-state/index.html) | `data class` | 代表参与者状态管理的核心数据结构,负责维护房间内与参与者相关状态信息。<br>核心属性:<br>- `participantList`**标准房间模式**存储所有房间成员,**网络研讨会房间模式**存储嘉宾列表。<br>- `participantListCursor`**标准房间模式**代表房间内所有成员列表的分页游标,**网络研讨会房间模式**代表房间内嘉宾列表的分页游标。<br>- `localParticipant` 代表自身所在房间内的参与者信息。 |
|
|
52
|
+
| [RoomParticipantListener](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.room/-room-participant-listener/index.html) | `abstract class` | 代表房间内和参与者相关的实时事件。主要事件分为三大类:参与者进退房事件、 参与者身份改变事件,参与者设备控制事件。 |
|
|
53
|
+
| [RoomParticipantStore](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.room/-room-participant-store/index.html) | `abstract class` | 这是参与者控制相关的核心类。功能包含:控制房间内参与者音视频状态、执行参与者管理操作,并通过订阅其 `RoomParticipantListener` 来接收实时事件。 |
|
|
54
|
+
|
|
55
|
+
## 实现步骤
|
|
56
|
+
|
|
57
|
+
### 步骤1:组件集成
|
|
58
|
+
|
|
59
|
+
请参考 接入概览 集成 **AtomicXCore SDK**,并已完成 实现登录逻辑 部分接入。
|
|
60
|
+
|
|
61
|
+
### 步骤2:获取参与者列表
|
|
62
|
+
|
|
63
|
+
在加入房间后,调用 `RoomParticipantStore` 的 `getParticipantList` 接口获取到房间内参与者列表。
|
|
64
|
+
``` java
|
|
65
|
+
import android.util.Log
|
|
66
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
67
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipant
|
|
68
|
+
import io.trtc.tuikit.atomicxcore.api.ListResultCompletionHandler
|
|
69
|
+
|
|
70
|
+
fun getParticipantList() {
|
|
71
|
+
// 1. 业务逻辑说明
|
|
72
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
73
|
+
val roomID = "test_room_001"
|
|
74
|
+
val participantStore = RoomParticipantStore.create(roomID)
|
|
75
|
+
|
|
76
|
+
// 2. 首次获取参与者列表(从头开始)
|
|
77
|
+
// 支持分页加载,可以通过 cursor 参数实现增量获取
|
|
78
|
+
val initialCursor: String? = null // null 表示从第一页开始获取
|
|
79
|
+
|
|
80
|
+
participantStore.getParticipantList(initialCursor, object : ListResultCompletionHandler<RoomParticipant> {
|
|
81
|
+
override fun onSuccess(result: List<RoomParticipant>, cursor: String) {
|
|
82
|
+
Log.d("Participant", "成功获取参与者列表,数量: ${result.size}")
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
override fun onFailure(code: Int, desc: String) {
|
|
86
|
+
Log.e("Participant", "获取参与者列表失败 [错误码: $code]: $desc")
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 步骤3:获取观众列表
|
|
93
|
+
|
|
94
|
+
在进入的房间类型为`WEBINAR`类型时,可以通过调用`RoomParticipantStore`的`getAudienceList`接口获取房间内的观众列表。
|
|
95
|
+
``` java
|
|
96
|
+
import android.util.Log
|
|
97
|
+
import io.trtc.tuikit.atomicxcore.api.ListResultCompletionHandler
|
|
98
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
99
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
100
|
+
|
|
101
|
+
fun getAudienceList() {
|
|
102
|
+
// 前提:需要先完成进房操作, 并且进房时 roomType 设置为 WEBINAR 类型。
|
|
103
|
+
// 1. 业务逻辑说明
|
|
104
|
+
// 通过进房的roomID创建RoomParticipantStore实例
|
|
105
|
+
val participantStore = RoomParticipantStore.create(roomID = "your_room_id")
|
|
106
|
+
|
|
107
|
+
// 2. 首次获取观众列表(从头开始)
|
|
108
|
+
// 支持分页加载,可以通过 cursor 参数实现增量获取
|
|
109
|
+
val initialCursor: String? = null // null 表示从第一页开始获取
|
|
110
|
+
|
|
111
|
+
participantStore.getAudienceList(cursor = initialCursor, completion = object : ListResultCompletionHandler<RoomUser> {
|
|
112
|
+
override fun onSuccess(result: List<RoomUser>, cursor: String) {
|
|
113
|
+
Log.d("Test", "获取观众列表成功,观众数量: ${result.size}")
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
override fun onFailure(code: Int, desc: String) {
|
|
117
|
+
Log.e("Test", "获取观众列表失败 [错误码: $code]: $desc")
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 步骤4:搜索房间内成员
|
|
124
|
+
|
|
125
|
+
进入房间成功后,可以通过调用`RoomParticipantStore`的`searchUsers`接口搜索房间内的成员。
|
|
126
|
+
``` java
|
|
127
|
+
import android.util.Log
|
|
128
|
+
import io.trtc.tuikit.atomicxcore.api.ListResultCompletionHandler
|
|
129
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
130
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
131
|
+
|
|
132
|
+
fun searchUsers() {
|
|
133
|
+
// 前提:需要先完成进房操作。
|
|
134
|
+
// 1. 业务逻辑说明
|
|
135
|
+
// 通过进房的roomID创建RoomParticipantStore实例
|
|
136
|
+
val participantStore = RoomParticipantStore.create(roomID = "your_room_id")
|
|
137
|
+
|
|
138
|
+
// 2. 通过用户名称为关键字搜索房间内成员
|
|
139
|
+
val keyword = "userName"
|
|
140
|
+
|
|
141
|
+
participantStore.searchUsers(keyword = keyword, completion = object : ListResultCompletionHandler<RoomUser> {
|
|
142
|
+
override fun onSuccess(result: List<RoomUser>, cursor: String) {
|
|
143
|
+
Log.d("Test", "搜索房间成员成功,成员数量: ${result.size}")
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
override fun onFailure(code: Int, desc: String) {
|
|
147
|
+
Log.e("Test", "搜索房间成员失败 [错误码: $code]: $desc")
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 步骤5:将**观众提升为嘉宾**
|
|
154
|
+
|
|
155
|
+
网络研讨会房间模式下,作为房主或管理员,调用`RoomParticipantStore`的`promoteAudienceToParticipant`接口可以将房间内的观众提升成为嘉宾。
|
|
156
|
+
``` java
|
|
157
|
+
import android.util.Log
|
|
158
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
159
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
160
|
+
|
|
161
|
+
fun promoteAudienceToParticipant(userID: String) {
|
|
162
|
+
// 前提:需要先完成进房操作。
|
|
163
|
+
// 1. 业务逻辑说明
|
|
164
|
+
// 通过进房的 roomID 创建 RoomParticipantStore 实例
|
|
165
|
+
val participantStore = RoomParticipantStore.create(roomID = "your_room_id")
|
|
166
|
+
|
|
167
|
+
// 2. 调用 RoomParticipantStore 提升观众为嘉宾接口
|
|
168
|
+
// 注意:只有房主或管理员才有权限执行此操作。
|
|
169
|
+
participantStore.promoteAudienceToParticipant(userID = userID, completion = object : CompletionHandler {
|
|
170
|
+
override fun onSuccess() {
|
|
171
|
+
Log.d("Test", "提升为嘉宾成功")
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
override fun onFailure(code: Int, desc: String) {
|
|
175
|
+
Log.e("Test", "提升为嘉宾失败 [错误码: $code]: $desc")
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
作为房间内成员订阅`RoomParticipantStore`的`RoomParticipantListener`中的`onAudiencePromotedToParticipant`事件,被动接收观众提升为嘉宾的变化通知。
|
|
182
|
+
``` java
|
|
183
|
+
import android.util.Log
|
|
184
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
185
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
186
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
187
|
+
|
|
188
|
+
fun subscribeParticipantEvent() {
|
|
189
|
+
// 1. 业务逻辑说明
|
|
190
|
+
// 前提:需要先完成进房操作,通过进房的 roomID 创建 RoomParticipantStore 实例
|
|
191
|
+
val participantStore = RoomParticipantStore.create(roomID = "your_room_id")
|
|
192
|
+
|
|
193
|
+
// 2. 订阅参与者事件
|
|
194
|
+
// 通过添加 RoomParticipantListener 监听所有参与者相关的事件
|
|
195
|
+
val listener = object : RoomParticipantListener() {
|
|
196
|
+
override fun onAudiencePromotedToParticipant(userInfo: RoomUser) {
|
|
197
|
+
Log.d("Test", "观众被提升为嘉宾,userInfo: $userInfo")
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
participantStore.addRoomParticipantListener(listener)
|
|
202
|
+
|
|
203
|
+
// 注意:在不需要监听时,记得移除监听器
|
|
204
|
+
// participantStore.removeRoomParticipantListener(listener)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 步骤6:将**嘉宾降级为观众**
|
|
210
|
+
|
|
211
|
+
网络研讨会房间模式下,作为房主或管理员,调用`RoomParticipantStore`的`demoteParticipantToAudience`接口可以将房间内的嘉宾降级成为观众。
|
|
212
|
+
``` java
|
|
213
|
+
import android.util.Log
|
|
214
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
215
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
216
|
+
|
|
217
|
+
fun demoteParticipantToAudience(userID: String) {
|
|
218
|
+
// 前提:需要先完成进房操作。
|
|
219
|
+
// 1. 业务逻辑说明
|
|
220
|
+
// 通过进房的 roomID 创建 RoomParticipantStore 实例
|
|
221
|
+
val participantStore = RoomParticipantStore.create(roomID = "your_room_id")
|
|
222
|
+
|
|
223
|
+
// 2. 调用 RoomParticipantStore 降级嘉宾为观众接口
|
|
224
|
+
// 注意:只有房主或管理员才有权限执行此操作。
|
|
225
|
+
participantStore.demoteParticipantToAudience(userID = userID, completion = object : CompletionHandler {
|
|
226
|
+
override fun onSuccess() {
|
|
227
|
+
Log.d("Test", "降级为观众成功")
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
override fun onFailure(code: Int, desc: String) {
|
|
231
|
+
Log.e("Test", "降级为观众失败 [错误码: $code]: $desc")
|
|
232
|
+
}
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
作为房间内成员订阅`RoomParticipantStore`的`RoomParticipantListener`中的`onParticipantDemotedToAudience`事件,被动接收嘉宾降级为观众的变化通知。
|
|
238
|
+
``` java
|
|
239
|
+
import android.util.Log
|
|
240
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
241
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
242
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
243
|
+
|
|
244
|
+
fun subscribeParticipantEvent() {
|
|
245
|
+
// 1. 业务逻辑说明
|
|
246
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
247
|
+
val participantStore = RoomParticipantStore.create(roomID = "your_room_id")
|
|
248
|
+
|
|
249
|
+
// 2. 订阅参与者事件
|
|
250
|
+
// 通过添加 RoomParticipantListener 监听所有参与者相关的事件
|
|
251
|
+
val listener = object : RoomParticipantListener() {
|
|
252
|
+
override fun onParticipantDemotedToAudience(userInfo: RoomUser) {
|
|
253
|
+
Log.d("Test", "嘉宾被降级为观众,userInfo: $userInfo")
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
participantStore.addRoomParticipantListener(listener)
|
|
258
|
+
|
|
259
|
+
// 注意:在不需要监听时,记得移除监听器
|
|
260
|
+
// participantStore.removeRoomParticipantListener(listener)
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### 步骤7:转移房主身份
|
|
265
|
+
|
|
266
|
+
作为房主,调用 `RoomParticipantStore` 的 `transferOwner` 接口可以将房主身份直接转移给房间内任意一位参与者,转移后原房主身份将变为普通参与者,一个房间内有且仅有一名房主。
|
|
267
|
+
``` java
|
|
268
|
+
import android.util.Log
|
|
269
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
270
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
271
|
+
|
|
272
|
+
fun transferOwner(userID: String) {
|
|
273
|
+
// 1. 业务逻辑说明
|
|
274
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
275
|
+
val roomID = "test_room_001"
|
|
276
|
+
val participantStore = RoomParticipantStore.create(roomID)
|
|
277
|
+
|
|
278
|
+
// 2. 调用 RoomParticipantStore 转移房主接口
|
|
279
|
+
// 注意:只有当前房主才有权限执行此操作,转移后原房主将变为普通用户
|
|
280
|
+
participantStore.transferOwner(userID, object : CompletionHandler {
|
|
281
|
+
override fun onSuccess() {
|
|
282
|
+
Log.d("Participant", "房主权限转移成功,新房主: $userID")
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
override fun onFailure(code: Int, desc: String) {
|
|
286
|
+
Log.e("Participant", "转移房主权限失败 [错误码: $code]: $desc")
|
|
287
|
+
}
|
|
288
|
+
})
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
作为参与者,订阅 `RoomParticipantStore` 的 `RoomParticipantListener` 中的 `onOwnerChanged` 事件,被动接收房主变化通知。
|
|
293
|
+
``` java
|
|
294
|
+
import android.util.Log
|
|
295
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
296
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
297
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
298
|
+
|
|
299
|
+
// 业务逻辑说明
|
|
300
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
301
|
+
private val roomID = "test_room_001"
|
|
302
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
303
|
+
|
|
304
|
+
// 参与者事件监听器
|
|
305
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
306
|
+
override fun onOwnerChanged(newOwner: RoomUser, oldOwner: RoomUser) {
|
|
307
|
+
Log.d("Participant", "房主变更通知,newOwner: $newOwner, oldOwner: $oldOwner")
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// 订阅参与者相关事件
|
|
312
|
+
private fun subscribeParticipantEvent() {
|
|
313
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### 步骤8:设置/撤销管理员
|
|
318
|
+
|
|
319
|
+
作为房主,调用 `RoomParticipantStore` 的 `setAdmin` 接口,指定房间内任意一位用户为管理员,也可以将管理员身份撤销。
|
|
320
|
+
``` java
|
|
321
|
+
import android.util.Log
|
|
322
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
323
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
324
|
+
|
|
325
|
+
// 业务逻辑说明
|
|
326
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
327
|
+
private val roomID = "test_room_001"
|
|
328
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
329
|
+
|
|
330
|
+
// 设置用户为管理员
|
|
331
|
+
fun setUserAsAdmin(userID: String) {
|
|
332
|
+
participantStore.setAdmin(userID, object : CompletionHandler {
|
|
333
|
+
override fun onSuccess() {
|
|
334
|
+
Log.d("Participant", "成功设置用户 $userID 为管理员")
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
override fun onFailure(code: Int, desc: String) {
|
|
338
|
+
Log.e("Participant", "设置管理员失败 [错误码: $code]: $desc")
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// 撤销用户的管理员权限
|
|
344
|
+
fun revokeAdmin(userID: String) {
|
|
345
|
+
participantStore.revokeAdmin(userID, object : CompletionHandler {
|
|
346
|
+
override fun onSuccess() {
|
|
347
|
+
Log.d("Participant", "成功撤销用户 $userID 的管理员权限")
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
override fun onFailure(code: Int, desc: String) {
|
|
351
|
+
Log.e("Participant", "撤销管理员失败 [错误码: $code]: $desc")
|
|
352
|
+
}
|
|
353
|
+
})
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
作为参与者,订阅 `RoomParticipantStore` 的 `RoomParticipantListener` 中的 `onAdminSet` 和 `onAdminRevoked` 事件,被动接收参与者身份变化通知。
|
|
358
|
+
``` java
|
|
359
|
+
import android.util.Log
|
|
360
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
361
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
362
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
363
|
+
|
|
364
|
+
// 业务逻辑说明
|
|
365
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
366
|
+
private val roomID = "test_room_001"
|
|
367
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
368
|
+
|
|
369
|
+
// 参与者事件监听器
|
|
370
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
371
|
+
override fun onAdminSet(userInfo: RoomUser) {
|
|
372
|
+
Log.d("Participant", "设置管理员事件通知,userInfo: $userInfo")
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
override fun onAdminRevoked(userInfo: RoomUser) {
|
|
376
|
+
Log.d("Participant", "撤销管理员事件通知,userInfo: $userInfo")
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// 订阅参与者相关事件
|
|
381
|
+
private fun subscribeParticipantEvents() {
|
|
382
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### 步骤9:**将参与者移出房间**
|
|
387
|
+
|
|
388
|
+
作为房主和管理员,调用 `RoomParticipantStore` 的 `kickUser` 可以将房间内参与者移出房间。
|
|
389
|
+
``` java
|
|
390
|
+
import android.util.Log
|
|
391
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
392
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
393
|
+
|
|
394
|
+
// 业务逻辑说明
|
|
395
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
396
|
+
private val roomID = "test_room_001"
|
|
397
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
398
|
+
|
|
399
|
+
fun kickUser(userID: String) {
|
|
400
|
+
// 1. 业务逻辑说明
|
|
401
|
+
// kickUser 接口用于将指定用户移出房间
|
|
402
|
+
// 注意:只有房主或管理员才有权限执行此操作
|
|
403
|
+
// 被移出的用户将立即离开房间,并收到相应的通知
|
|
404
|
+
|
|
405
|
+
// 2. 调用 RoomParticipantStore 移出用户接口
|
|
406
|
+
participantStore.kickUser(userID, object : CompletionHandler {
|
|
407
|
+
override fun onSuccess() {
|
|
408
|
+
Log.d("Participant", "用户移出成功,被移出用户: $userID")
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
override fun onFailure(code: Int, desc: String) {
|
|
412
|
+
Log.e("Participant", "移出用户失败 [错误码: $code]: $desc")
|
|
413
|
+
}
|
|
414
|
+
})
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
作为参与者,订阅 `RoomParticipantStore` 的 `RoomParticipantListener` 中的 `onKickedFromRoom` 事件,被动接收参与者被移出房间通知。
|
|
419
|
+
``` java
|
|
420
|
+
import android.util.Log
|
|
421
|
+
import io.trtc.tuikit.atomicxcore.api.room.KickedOutOfRoomReason
|
|
422
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
423
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
424
|
+
|
|
425
|
+
// 业务逻辑说明
|
|
426
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
427
|
+
private val roomID = "test_room_001"
|
|
428
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
429
|
+
|
|
430
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
431
|
+
override fun onKickedFromRoom(reason: KickedOutOfRoomReason, message: String) {
|
|
432
|
+
Log.d("Participant", "已被移出房间,被移出原因:$reason, 额外信息:$message")
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// 订阅参与者相关事件
|
|
437
|
+
private fun subscribeParticipantEvents() {
|
|
438
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### 步骤10:更新参与者信息
|
|
443
|
+
|
|
444
|
+
在加入房间后,调用 `RoomParticipantStore` 的 `updateParticipantNameCard`、 `updateParticipantMetaData` 更新您在房间里的参与者信息,包含:参与者名片信息,参与者自定义信息。
|
|
445
|
+
``` java
|
|
446
|
+
import android.util.Log
|
|
447
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
448
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
449
|
+
|
|
450
|
+
// 业务逻辑说明
|
|
451
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
452
|
+
private val roomID = "test_room_001"
|
|
453
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
454
|
+
|
|
455
|
+
fun updateParticipantNameCard(userID: String, nameCard: String) {
|
|
456
|
+
// 1. 业务逻辑说明
|
|
457
|
+
// updateParticipantNameCard 接口用于更新指定参与者的名片信息
|
|
458
|
+
// 名片通常用于显示用户的自定义昵称或标识
|
|
459
|
+
// 注意:通常只有管理员或用户本人才能修改名片
|
|
460
|
+
|
|
461
|
+
// 2. 调用 RoomParticipantStore 更新名片接口
|
|
462
|
+
participantStore.updateParticipantNameCard(userID, nameCard, object : CompletionHandler {
|
|
463
|
+
override fun onSuccess() {
|
|
464
|
+
Log.d("Participant", "名片更新成功,用户: $userID, 新名片: $nameCard")
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
override fun onFailure(code: Int, desc: String) {
|
|
468
|
+
Log.e("Participant", "名片更新失败 [错误码: $code]: $desc")
|
|
469
|
+
}
|
|
470
|
+
})
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
fun updateParticipantMetaData(userID: String, metaData: HashMap<String, ByteArray>) {
|
|
474
|
+
// 1. 业务逻辑说明
|
|
475
|
+
// updateParticipantMetaData 接口用于更新指定参与者的自定义信息
|
|
476
|
+
// 存储自定义的业务数据,如用户标签、扩展属性等
|
|
477
|
+
// 注意:自定义信息的键值对数量和大小有限制,键长度不能超过 50 字节,值长度不超过 200 字节
|
|
478
|
+
|
|
479
|
+
// 2. 调用 RoomParticipantStore 更新自定义信息接口
|
|
480
|
+
participantStore.updateParticipantMetaData(userID, metaData, object : CompletionHandler {
|
|
481
|
+
override fun onSuccess() {
|
|
482
|
+
Log.d("Participant", "自定义信息数据更新成功,用户: $userID, 键数量: ${metaData.size}")
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
override fun onFailure(code: Int, desc: String) {
|
|
486
|
+
Log.e("Participant", "自定义信息更新失败 [错误码: $code]: $desc")
|
|
487
|
+
}
|
|
488
|
+
})
|
|
489
|
+
}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### 步骤11:邀请参与者打开其设备
|
|
493
|
+
|
|
494
|
+
作为房主和管理员,调用 `RoomParticipantStore` 的 `inviteToOpenDevice` 接口,邀请房间内参与者打开摄像头,麦克风。
|
|
495
|
+
``` java
|
|
496
|
+
import android.util.Log
|
|
497
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
498
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
499
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
500
|
+
|
|
501
|
+
// 业务逻辑说明
|
|
502
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
503
|
+
private val roomID = "test_room_001"
|
|
504
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
505
|
+
|
|
506
|
+
fun inviteUserToOpenDevice(userID: String, device: DeviceType, timeout: Int = 30) {
|
|
507
|
+
// 1. 业务逻辑说明
|
|
508
|
+
// inviteToOpenDevice 接口用于邀请指定用户开启某个设备
|
|
509
|
+
// 通常用于管理员邀请参与者开启麦克风、摄像头或屏幕共享
|
|
510
|
+
// 被邀请的用户会收到邀请通知,可以选择接受或拒绝
|
|
511
|
+
|
|
512
|
+
// 2. 调用 RoomParticipantStore 邀请开启设备接口
|
|
513
|
+
participantStore.inviteToOpenDevice(userID, device, timeout, object : CompletionHandler {
|
|
514
|
+
override fun onSuccess() {
|
|
515
|
+
Log.d("Participant", "设备邀请发送成功,用户: $userID, 设备: $device")
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
override fun onFailure(code: Int, desc: String) {
|
|
519
|
+
Log.e("Participant", "设备邀请发送失败 [错误码: $code]: $desc")
|
|
520
|
+
}
|
|
521
|
+
})
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
作为参与者,需要:
|
|
526
|
+
- 订阅 `RoomParticipantStore` 的 `RoomParticipantListener` 中的 `onDeviceInvitationReceived` 事件,被动接收邀请打开设备通知。
|
|
527
|
+
|
|
528
|
+
- 接收到邀请打开设备通知后调用 `RoomParticipantStore` 的 `acceptOpenDeviceInvitation` 或者 `declineOpenDeviceInvitation` 接口接受或拒绝邀请。
|
|
529
|
+
|
|
530
|
+
``` java
|
|
531
|
+
import android.util.Log
|
|
532
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
533
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
534
|
+
import io.trtc.tuikit.atomicxcore.api.room.DeviceRequestInfo
|
|
535
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
536
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
537
|
+
|
|
538
|
+
// 业务逻辑说明
|
|
539
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
540
|
+
private val roomID = "test_room_001"
|
|
541
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
542
|
+
|
|
543
|
+
// 参与者事件监听器
|
|
544
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
545
|
+
override fun onDeviceInvitationReceived(invitation: DeviceRequestInfo) {
|
|
546
|
+
Log.d("Participant", "收到设备邀请 - 设备: ${invitation.device}, 发送者: ${invitation.senderUserName}")
|
|
547
|
+
// 处理接受、拒绝设备邀请
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// 订阅参与者相关事件
|
|
552
|
+
private fun subscribeParticipantEvents() {
|
|
553
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
fun acceptOpenDeviceInvitation(userID: String, device: DeviceType) {
|
|
557
|
+
// 处理接受邀请
|
|
558
|
+
participantStore.acceptOpenDeviceInvitation(userID, device, object : CompletionHandler {
|
|
559
|
+
override fun onSuccess() {
|
|
560
|
+
Log.d("Participant", "接受设备邀请成功 - 设备: $device")
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
override fun onFailure(code: Int, desc: String) {
|
|
564
|
+
Log.e("Participant", "接受设备邀请失败 [错误码: $code]: $desc")
|
|
565
|
+
}
|
|
566
|
+
})
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
fun declineOpenDeviceInvitation(userID: String, device: DeviceType) {
|
|
570
|
+
// 处理拒绝邀请
|
|
571
|
+
participantStore.declineOpenDeviceInvitation(userID, device, object : CompletionHandler {
|
|
572
|
+
override fun onSuccess() {
|
|
573
|
+
Log.d("Participant", "拒绝设备邀请成功 - 设备: $device")
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
override fun onFailure(code: Int, desc: String) {
|
|
577
|
+
Log.e("Participant", "拒绝设备邀请失败 [错误码: $code]: $desc")
|
|
578
|
+
}
|
|
579
|
+
})
|
|
580
|
+
}
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### 步骤12:关闭远端参与者设备
|
|
584
|
+
|
|
585
|
+
作为房主和管理员,调用`RoomParticipantStore`的`closeParticipantDevice`可以主动关闭远端参与者的摄像头,麦克风。
|
|
586
|
+
``` java
|
|
587
|
+
import android.util.Log
|
|
588
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
589
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
590
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
591
|
+
|
|
592
|
+
// 业务逻辑说明
|
|
593
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
594
|
+
private val roomID = "test_room_001"
|
|
595
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
596
|
+
|
|
597
|
+
fun closeParticipantDevice(userID: String, device: DeviceType) {
|
|
598
|
+
// 1. 业务逻辑说明
|
|
599
|
+
// closeParticipantDevice 接口用于房主或管理员关闭指定参与者的某个设备
|
|
600
|
+
// 被关闭的用户会收到设备被关闭通知
|
|
601
|
+
|
|
602
|
+
// 2. 调用 RoomParticipantStore 关闭参与者设备接口
|
|
603
|
+
participantStore.closeParticipantDevice(userID, device, object : CompletionHandler {
|
|
604
|
+
override fun onSuccess() {
|
|
605
|
+
Log.d("Participant", "关闭参与者设备成功 - 用户: $userID, 设备: $device")
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
override fun onFailure(code: Int, desc: String) {
|
|
609
|
+
Log.e("Participant", "关闭参与者设备失败: [错误码: $code]: $desc")
|
|
610
|
+
}
|
|
611
|
+
})
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
作为参与者,订阅`RoomParticipantStore`的`RoomParticipantListener`中的`onParticipantDeviceClosed`事件,被动接收设备被关闭通知,并在UI上做出提示。
|
|
616
|
+
``` java
|
|
617
|
+
import android.util.Log
|
|
618
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
619
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
620
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
621
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
622
|
+
|
|
623
|
+
// 业务逻辑说明
|
|
624
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
625
|
+
private val roomID = "test_room_001"
|
|
626
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
627
|
+
|
|
628
|
+
// 参与者事件监听器
|
|
629
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
630
|
+
override fun onParticipantDeviceClosed(device: DeviceType, operator: RoomUser) {
|
|
631
|
+
Log.d("Participant", "设备被关闭 - 设备: $device, 操作者: ${operator.userName}")
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// 订阅参与者相关事件
|
|
636
|
+
private fun subscribeParticipantEvents() {
|
|
637
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
638
|
+
}
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### 步骤13:参与者申请打开自己的设备
|
|
642
|
+
|
|
643
|
+
作为参与者,调用`RoomParticipantStore`的`requestToOpenDevice`接口,可以在房间被房主或管理员设置全体静音,全体禁画的场景下,主动申请打开摄像头,麦克风。
|
|
644
|
+
``` java
|
|
645
|
+
import android.util.Log
|
|
646
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
647
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
648
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
649
|
+
|
|
650
|
+
// 业务逻辑说明
|
|
651
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
652
|
+
private val roomID = "test_room_001"
|
|
653
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
654
|
+
|
|
655
|
+
fun requestToOpenDevice(device: DeviceType, timeout: Int = 30) {
|
|
656
|
+
// 1. 业务逻辑说明
|
|
657
|
+
// requestToOpenDevice 接口用于请求开启某个设备
|
|
658
|
+
// 通常用于参与者申请开启麦克风、摄像头或屏幕共享
|
|
659
|
+
// 房主和管理员会收到申请通知,可以选择同意或拒绝
|
|
660
|
+
|
|
661
|
+
// 2. 调用 RoomParticipantStore 请求开启设备接口
|
|
662
|
+
participantStore.requestToOpenDevice(device, timeout, object : CompletionHandler {
|
|
663
|
+
override fun onSuccess() {
|
|
664
|
+
Log.d("Participant", "设备开启请求发送成功 - 设备: $device")
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
override fun onFailure(code: Int, desc: String) {
|
|
668
|
+
Log.e("Participant", "设备开启请求发送失败 [错误码: $code]: $desc")
|
|
669
|
+
}
|
|
670
|
+
})
|
|
671
|
+
}
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
作为房主和管理员,需要:
|
|
675
|
+
- 订阅`RoomParticipantStore`的`RoomParticipantListener`中的`onDeviceRequestReceived`事件,被动接收申请打开设备通知。
|
|
676
|
+
|
|
677
|
+
- 接收到申请打开设备通知后,调用`RoomParticipantStore`的`approveOpenDeviceRequest`或者`rejectOpenDeviceRequest`接口,批准或者拒绝申请。
|
|
678
|
+
|
|
679
|
+
``` java
|
|
680
|
+
import android.util.Log
|
|
681
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
682
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
683
|
+
import io.trtc.tuikit.atomicxcore.api.room.DeviceRequestInfo
|
|
684
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
685
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
686
|
+
|
|
687
|
+
// 业务逻辑说明
|
|
688
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
689
|
+
private val roomID = "test_room_001"
|
|
690
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
691
|
+
|
|
692
|
+
// 参与者事件监听器
|
|
693
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
694
|
+
override fun onDeviceRequestReceived(request: DeviceRequestInfo) {
|
|
695
|
+
Log.d("Participant", "收到设备请求 - 用户: ${request.senderUserName}, 设备: ${request.device}")
|
|
696
|
+
// 批准、拒绝开启设备请求操作
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// 订阅参与者相关事件
|
|
701
|
+
private fun subscribeParticipantEvents() {
|
|
702
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
fun approveOpenDeviceRequest(device: DeviceType, userID: String) {
|
|
706
|
+
// 批准开启请求
|
|
707
|
+
participantStore.approveOpenDeviceRequest(device, userID, object : CompletionHandler {
|
|
708
|
+
override fun onSuccess() {
|
|
709
|
+
Log.d("Participant", "批准设备请求成功 - 用户: $userID, 设备: $device")
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
override fun onFailure(code: Int, desc: String) {
|
|
713
|
+
Log.e("Participant", "批准设备请求失败: $desc")
|
|
714
|
+
}
|
|
715
|
+
})
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
fun rejectOpenDeviceRequest(device: DeviceType, userID: String) {
|
|
719
|
+
// 拒绝开启请求
|
|
720
|
+
participantStore.rejectOpenDeviceRequest(device, userID, object : CompletionHandler {
|
|
721
|
+
override fun onSuccess() {
|
|
722
|
+
Log.d("Participant", "拒绝设备请求成功 - 用户: $userID, 设备: $device")
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
override fun onFailure(code: Int, desc: String) {
|
|
726
|
+
Log.e("Participant", "拒绝设备请求失败: [错误码: $code]: $desc")
|
|
727
|
+
}
|
|
728
|
+
})
|
|
729
|
+
}
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### 步骤14:全体静音、全体禁画
|
|
733
|
+
|
|
734
|
+
作为房主和管理员,调用`RoomParticipantStore`的`disableAllDevices`接口设置全员静音与全员禁用摄像头。开启后,房间内参与者的音视频开启权限将被限制,无法自主打开麦克风或摄像头设备。
|
|
735
|
+
``` java
|
|
736
|
+
import android.util.Log
|
|
737
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
738
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
739
|
+
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
740
|
+
|
|
741
|
+
// 业务逻辑说明
|
|
742
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
743
|
+
private val roomID = "test_room_001"
|
|
744
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
745
|
+
|
|
746
|
+
fun disableAllDevices(device: DeviceType, disable: Boolean) {
|
|
747
|
+
// 1. 业务逻辑说明
|
|
748
|
+
// disableAllDevices 接口用于房主或管理员设置房间禁用、解禁房间内全体成员麦克风,摄像头
|
|
749
|
+
// 设置后房间内参与者会收到禁用、解禁通知
|
|
750
|
+
|
|
751
|
+
// 2. 调用 RoomParticipantStore 禁用、解禁全体设备接口
|
|
752
|
+
participantStore.disableAllDevices(device, disable, object : CompletionHandler {
|
|
753
|
+
override fun onSuccess() {
|
|
754
|
+
val action = if (disable) "禁用" else "启用"
|
|
755
|
+
Log.d("Participant", "${action}所有${device}成功")
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
override fun onFailure(code: Int, desc: String) {
|
|
759
|
+
val action = if (disable) "禁用" else "启用"
|
|
760
|
+
Log.e("Participant", "${action}所有${device}失败 [错误码: $code]: $desc")
|
|
761
|
+
}
|
|
762
|
+
})
|
|
763
|
+
}
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
作为参与者,订阅 `RoomParticipantStore`的`RoomParticipantListener`中的`onAllDevicesDisabled`事件,可以监听全员静音或禁画指令,并在 UI 界面同步受控状态。受限状态下,摄像头与麦克风的主动开启功能将被锁定,参与者需发起开启申请,待房主或管理员核准授权后方可使用。
|
|
767
|
+
``` java
|
|
768
|
+
import android.util.Log
|
|
769
|
+
import io.trtc.tuikit.atomicxcore.api.device.DeviceType
|
|
770
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
771
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
772
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
773
|
+
|
|
774
|
+
// 业务逻辑说明
|
|
775
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
776
|
+
private val roomID = "test_room_001"
|
|
777
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
778
|
+
|
|
779
|
+
// 参与者事件监听器
|
|
780
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
781
|
+
override fun onAllDevicesDisabled(device: DeviceType, disable: Boolean, operator: RoomUser) {
|
|
782
|
+
val action = if (disable) "禁用" else "启用"
|
|
783
|
+
Log.d("Participant", "所有${device}被${action} - 操作者: ${operator.userName}")
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
// 订阅参与者相关事件
|
|
788
|
+
private fun subscribeParticipantEvents() {
|
|
789
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
790
|
+
}
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
### 步骤15:监听参与者事件
|
|
794
|
+
|
|
795
|
+
订阅`RoomParticipantListener`参与者相关的被动事件。以订阅参与者加入房间、离开房间为例,示例代码如下:
|
|
796
|
+
``` java
|
|
797
|
+
import android.util.Log
|
|
798
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantListener
|
|
799
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
800
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomUser
|
|
801
|
+
|
|
802
|
+
// 业务逻辑说明
|
|
803
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
804
|
+
private val roomID = "test_room_001"
|
|
805
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
806
|
+
|
|
807
|
+
// 参与者事件监听器
|
|
808
|
+
private val participantListener = object : RoomParticipantListener() {
|
|
809
|
+
override fun onParticipantJoined(participant: RoomUser) {
|
|
810
|
+
Log.d("Participant", "参与者加入房间 - 用户: ${participant.userName}, ID: ${participant.userID}")
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
override fun onParticipantLeft(participant: RoomUser) {
|
|
814
|
+
Log.d("Participant", "参与者离开房间 - 用户: ${participant.userName}, ID: ${participant.userID}")
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// 订阅参与者相关事件
|
|
819
|
+
private fun subscribeParticipantEvents() {
|
|
820
|
+
participantStore.addRoomParticipantListener(participantListener)
|
|
821
|
+
}
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
订阅`RoomParticipantState`参与者相关的属性状态变化。以订阅房间内正在说话的用户为例,示例代码如下:
|
|
825
|
+
``` java
|
|
826
|
+
import android.util.Log
|
|
827
|
+
import io.trtc.tuikit.atomicxcore.api.room.RoomParticipantStore
|
|
828
|
+
import kotlinx.coroutines.CoroutineScope
|
|
829
|
+
import kotlinx.coroutines.Dispatchers
|
|
830
|
+
import kotlinx.coroutines.launch
|
|
831
|
+
|
|
832
|
+
// 业务逻辑说明
|
|
833
|
+
// 前提:需要先完成进房操作,通过进房的roomID创建RoomParticipantStore实例
|
|
834
|
+
private val roomID = "test_room_001"
|
|
835
|
+
private val participantStore = RoomParticipantStore.create(roomID)
|
|
836
|
+
|
|
837
|
+
/// 设置参与者状态监听
|
|
838
|
+
private fun subscribeParticipantState() {
|
|
839
|
+
CoroutineScope(Dispatchers.Main).launch {
|
|
840
|
+
participantStore.state.speakingUsers.collect { speakingUsers ->
|
|
841
|
+
Log.d("Participant", "说话用户状态变更 - 当前说话用户数: ${speakingUsers.size}")
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
## API 文档
|
|
848
|
+
| **Store/Component** | **功能描述** | **API文档** |
|
|
849
|
+
| --- | --- | --- |
|
|
850
|
+
| **RoomParticipantStore** | 房间内参与者管理:设置管理员 / 转移房主 / 获取参与者列表 / 移出房间 / 参与者设备控制(例如关闭、邀请打开摄像头、麦克风等)/ 申请打开设备(例如申请打开摄像头、麦克风等)。 | [API 文档](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.room/-room-participant-store/index.html) |
|