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