@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,436 @@
|
|
|
1
|
+
## 简介
|
|
2
|
+
|
|
3
|
+
**DeviceStore** 提供了一套全面的 API 来管理音视频设备,包括麦克风、摄像头和屏幕分享等功能。
|
|
4
|
+
|
|
5
|
+
> **重要:**
|
|
6
|
+
>
|
|
7
|
+
|
|
8
|
+
> 请使用 **DeviceStore.shared** 单例获取 **DeviceStore** 实例。不要尝试直接初始化。
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
> **说明:**
|
|
12
|
+
>
|
|
13
|
+
|
|
14
|
+
> 设备状态更新通过 **deviceState** 发布者传递。订阅它以接收有关麦克风、摄像头、网络等状态的实时更新。
|
|
15
|
+
>
|
|
16
|
+
|
|
17
|
+
## 功能特性
|
|
18
|
+
- **麦克风管理**:打开/关闭麦克风,设置采集音量和输出音量。
|
|
19
|
+
|
|
20
|
+
- **摄像头管理**:打开/关闭摄像头,切换前后摄像头,设置镜像和视频质量。
|
|
21
|
+
|
|
22
|
+
- **音频路由**:切换扬声器和听筒。
|
|
23
|
+
|
|
24
|
+
- **屏幕分享**:开启和关闭屏幕分享功能。
|
|
25
|
+
|
|
26
|
+
- **网络状态**:实时监控网络质量信息。
|
|
27
|
+
|
|
28
|
+
## 可订阅数据
|
|
29
|
+
|
|
30
|
+
**DeviceState** 的字段描述如下:
|
|
31
|
+
| **属性名** | **类型** | **描述** |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| microphoneStatus | StateFlow<DeviceStatus> | 麦克风状态。 |
|
|
34
|
+
| microphoneLastError | StateFlow<DeviceError> | 麦克风错误,用于出现报错时提取错误信息。 |
|
|
35
|
+
| captureVolume | StateFlow<Int> | 采集音量,取值范围 [0, 100]。 |
|
|
36
|
+
| currentMicVolume | StateFlow<Int> | 当前用户实际输出音量。 |
|
|
37
|
+
| outputVolume | StateFlow<Int> | 最大输出音量,取值范围 [0, 100]。 |
|
|
38
|
+
| cameraStatus | StateFlow<DeviceStatus> | 摄像头状态。 |
|
|
39
|
+
| cameraLastError | StateFlow<DeviceError> | 摄像头错误,用于出现报错时提取错误信息。 |
|
|
40
|
+
| isFrontCamera | StateFlow<Boolean> | 是否为前置摄像头。 |
|
|
41
|
+
| localMirrorType | StateFlow<MirrorType> | 镜像状态。 |
|
|
42
|
+
| localVideoQuality | StateFlow<VideoQuality> | 本地视频质量。 |
|
|
43
|
+
| currentAudioRoute | StateFlow<AudioRoute> | 当前音频路由位置。 |
|
|
44
|
+
| screenStatus | StateFlow<DeviceStatus> | 屏幕分享状态。 |
|
|
45
|
+
| networkInfo | StateFlow<NetworkInfo> | 网络信息。 |
|
|
46
|
+
|
|
47
|
+
## API 列表
|
|
48
|
+
| **函数名** | **描述** |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| DeviceStore.shared | 单例对象。 |
|
|
51
|
+
| openLocalMicrophone | 打开本地麦克风。 |
|
|
52
|
+
| closeLocalMicrophone | 关闭本地麦克风。 |
|
|
53
|
+
| setCaptureVolume | 设置采集音量。 |
|
|
54
|
+
| setOutputVolume | 设置输出音量。 |
|
|
55
|
+
| setAudioRoute | 设置音频路由。 |
|
|
56
|
+
| startCameraTest | 开始摄像头测试。 |
|
|
57
|
+
| stopCameraTest | 停止摄像头测试。 |
|
|
58
|
+
| openLocalCamera | 打开本地摄像头。 |
|
|
59
|
+
| closeLocalCamera | 关闭本地摄像头。 |
|
|
60
|
+
| switchCamera | 切换摄像头。 |
|
|
61
|
+
| switchMirror | 切换镜像状态。 |
|
|
62
|
+
| updateVideoQuality | 更新视频质量。 |
|
|
63
|
+
| startScreenShare | 开启屏幕分享。 |
|
|
64
|
+
| stopScreenShare | 关闭屏幕分享。 |
|
|
65
|
+
| reset | 重置为默认状态。 |
|
|
66
|
+
|
|
67
|
+
### 获取实例
|
|
68
|
+
|
|
69
|
+
#### DeviceStore.shared
|
|
70
|
+
|
|
71
|
+
单例对象。
|
|
72
|
+
|
|
73
|
+
### 麦克风操作
|
|
74
|
+
|
|
75
|
+
#### openLocalMicrophone
|
|
76
|
+
|
|
77
|
+
打开本地麦克风
|
|
78
|
+
``` kotlin
|
|
79
|
+
abstract fun openLocalMicrophone(completion: CompletionHandler?)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**版本信息**
|
|
83
|
+
|
|
84
|
+
从 3.5 版本开始支持。
|
|
85
|
+
|
|
86
|
+
**参数说明**
|
|
87
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
88
|
+
| --- | --- | --- | --- |
|
|
89
|
+
| completion | CompletionHandler? | 必填 | 操作是否成功。 |
|
|
90
|
+
|
|
91
|
+
#### closeLocalMicrophone
|
|
92
|
+
|
|
93
|
+
关闭本地麦克风
|
|
94
|
+
``` kotlin
|
|
95
|
+
abstract fun closeLocalMicrophone()
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**版本信息**
|
|
99
|
+
|
|
100
|
+
从 3.5 版本开始支持。
|
|
101
|
+
|
|
102
|
+
#### setCaptureVolume
|
|
103
|
+
|
|
104
|
+
设置采集音量
|
|
105
|
+
``` kotlin
|
|
106
|
+
abstract fun setCaptureVolume(volume: Int)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**版本信息**
|
|
110
|
+
|
|
111
|
+
从 3.5 版本开始支持。
|
|
112
|
+
|
|
113
|
+
**参数说明**
|
|
114
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
115
|
+
| --- | --- | --- | --- |
|
|
116
|
+
| volume | Int | 必填 | 采集音量,取值范围 [0, 100]。 |
|
|
117
|
+
|
|
118
|
+
#### setOutputVolume
|
|
119
|
+
|
|
120
|
+
设置最大输出音量
|
|
121
|
+
``` kotlin
|
|
122
|
+
abstract fun setOutputVolume(volume: Int)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**版本信息**
|
|
126
|
+
|
|
127
|
+
从 3.5 版本开始支持。
|
|
128
|
+
|
|
129
|
+
**参数说明**
|
|
130
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
131
|
+
| --- | --- | --- | --- |
|
|
132
|
+
| volume | Int | 必填 | 最大音量,取值范围 [0, 100]。 |
|
|
133
|
+
|
|
134
|
+
### 音频路由
|
|
135
|
+
|
|
136
|
+
#### setAudioRoute
|
|
137
|
+
|
|
138
|
+
设置音频路由
|
|
139
|
+
``` kotlin
|
|
140
|
+
abstract fun setAudioRoute(audioRoute: AudioRoute)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**版本信息**
|
|
144
|
+
|
|
145
|
+
从 3.5 版本开始支持。
|
|
146
|
+
|
|
147
|
+
**参数说明**
|
|
148
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
149
|
+
| --- | --- | --- | --- |
|
|
150
|
+
| audioRoute | AudioRoute | 必填 | 路由位置。 |
|
|
151
|
+
|
|
152
|
+
### 摄像头操作
|
|
153
|
+
|
|
154
|
+
#### startCameraTest
|
|
155
|
+
|
|
156
|
+
开始摄像头测试,如果摄像头打开成功,会将画面渲染到设置的 CameraView 上
|
|
157
|
+
``` kotlin
|
|
158
|
+
abstract fun startCameraTest(cameraView: CameraView, completion: CompletionHandler?)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**版本信息**
|
|
162
|
+
|
|
163
|
+
从 3.5 版本开始支持。
|
|
164
|
+
|
|
165
|
+
**参数说明**
|
|
166
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
167
|
+
| --- | --- | --- | --- |
|
|
168
|
+
| cameraView | CameraView | 必填 | 摄像头采集画面的渲染视图。 |
|
|
169
|
+
| completion | CompletionHandler? | 必填 | 操作是否成功。 |
|
|
170
|
+
|
|
171
|
+
#### stopCameraTest
|
|
172
|
+
|
|
173
|
+
停止摄像头测试
|
|
174
|
+
``` kotlin
|
|
175
|
+
abstract fun stopCameraTest()
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**版本信息**
|
|
179
|
+
|
|
180
|
+
从 3.5 版本开始支持。
|
|
181
|
+
|
|
182
|
+
#### openLocalCamera
|
|
183
|
+
|
|
184
|
+
打开本地摄像头
|
|
185
|
+
``` kotlin
|
|
186
|
+
abstract fun openLocalCamera(isFront: Boolean, completion: CompletionHandler?)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**版本信息**
|
|
190
|
+
|
|
191
|
+
从 3.5 版本开始支持。
|
|
192
|
+
|
|
193
|
+
**参数说明**
|
|
194
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
195
|
+
| --- | --- | --- | --- |
|
|
196
|
+
| isFront | Boolean | 必填 | 是否前置摄像头。 |
|
|
197
|
+
| completion | CompletionHandler? | 必填 | 操作是否成功。 |
|
|
198
|
+
|
|
199
|
+
#### closeLocalCamera
|
|
200
|
+
|
|
201
|
+
关闭本地摄像头
|
|
202
|
+
``` kotlin
|
|
203
|
+
abstract fun closeLocalCamera()
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**版本信息**
|
|
207
|
+
|
|
208
|
+
从 3.5 版本开始支持。
|
|
209
|
+
|
|
210
|
+
#### switchCamera
|
|
211
|
+
|
|
212
|
+
切换摄像头
|
|
213
|
+
``` kotlin
|
|
214
|
+
abstract fun switchCamera(isFront: Boolean)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**版本信息**
|
|
218
|
+
|
|
219
|
+
从 3.5 版本开始支持。
|
|
220
|
+
|
|
221
|
+
**参数说明**
|
|
222
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
223
|
+
| --- | --- | --- | --- |
|
|
224
|
+
| isFront | Boolean | 必填 | 是否前置摄像头。 |
|
|
225
|
+
|
|
226
|
+
#### switchMirror
|
|
227
|
+
|
|
228
|
+
切换镜像状态
|
|
229
|
+
``` kotlin
|
|
230
|
+
abstract fun switchMirror(mirrorType: MirrorType)
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**版本信息**
|
|
234
|
+
|
|
235
|
+
从 3.5 版本开始支持。
|
|
236
|
+
|
|
237
|
+
**参数说明**
|
|
238
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
239
|
+
| --- | --- | --- | --- |
|
|
240
|
+
| mirrorType | MirrorType | 必填 | 镜像状态。 |
|
|
241
|
+
|
|
242
|
+
#### updateVideoQuality
|
|
243
|
+
|
|
244
|
+
更新视频质量
|
|
245
|
+
``` kotlin
|
|
246
|
+
abstract fun updateVideoQuality(quality: VideoQuality)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**版本信息**
|
|
250
|
+
|
|
251
|
+
从 3.5 版本开始支持。
|
|
252
|
+
|
|
253
|
+
**参数说明**
|
|
254
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
255
|
+
| --- | --- | --- | --- |
|
|
256
|
+
| quality | VideoQuality | 必填 | 视频质量。 |
|
|
257
|
+
|
|
258
|
+
### 屏幕分享
|
|
259
|
+
|
|
260
|
+
#### startScreenShare
|
|
261
|
+
|
|
262
|
+
开启屏幕分享
|
|
263
|
+
``` kotlin
|
|
264
|
+
abstract fun startScreenShare()
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**版本信息**
|
|
268
|
+
|
|
269
|
+
从 3.5 版本开始支持。
|
|
270
|
+
|
|
271
|
+
#### stopScreenShare
|
|
272
|
+
|
|
273
|
+
关闭屏幕采集
|
|
274
|
+
``` kotlin
|
|
275
|
+
abstract fun stopScreenShare()
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**版本信息**
|
|
279
|
+
|
|
280
|
+
从 3.5 版本开始支持。
|
|
281
|
+
|
|
282
|
+
### 重置
|
|
283
|
+
|
|
284
|
+
#### reset
|
|
285
|
+
|
|
286
|
+
重置为默认状态
|
|
287
|
+
``` kotlin
|
|
288
|
+
abstract fun reset()
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**版本信息**
|
|
292
|
+
|
|
293
|
+
从 3.5 版本开始支持。
|
|
294
|
+
|
|
295
|
+
## 数据结构
|
|
296
|
+
|
|
297
|
+
### DeviceType
|
|
298
|
+
|
|
299
|
+
设备类型。
|
|
300
|
+
| **枚举值** | **值** | **说明** |
|
|
301
|
+
| --- | --- | --- |
|
|
302
|
+
| MICROPHONE | 0 | 麦克风类型。 |
|
|
303
|
+
| CAMERA | 1 | 摄像头类型。 |
|
|
304
|
+
| SCREEN_SHARE | 2 | 屏幕分享类型。 |
|
|
305
|
+
|
|
306
|
+
### DeviceError
|
|
307
|
+
|
|
308
|
+
设备相关错误码。
|
|
309
|
+
| **枚举值** | **值** | **说明** |
|
|
310
|
+
| --- | --- | --- |
|
|
311
|
+
| NO_ERROR | 0 | 操作成功。 |
|
|
312
|
+
| NO_DEVICE_DETECTED | 1 | 未检测到设备。 |
|
|
313
|
+
| NO_SYSTEM_PERMISSION | 2 | 没有系统权限。 |
|
|
314
|
+
| NOT_SUPPORT_CAPTURE | 3 | 不支持采集。 |
|
|
315
|
+
| OCCUPIED_ERROR | 4 | 设备已占用。 |
|
|
316
|
+
| UNKNOWN_ERROR | 5 | 未知错误。 |
|
|
317
|
+
|
|
318
|
+
### DeviceStatus
|
|
319
|
+
|
|
320
|
+
设备开启状态。
|
|
321
|
+
| **枚举值** | **值** | **说明** |
|
|
322
|
+
| --- | --- | --- |
|
|
323
|
+
| OFF | 0 | 关闭。 |
|
|
324
|
+
| ON | 1 | 开启。 |
|
|
325
|
+
|
|
326
|
+
### AudioRoute
|
|
327
|
+
|
|
328
|
+
音频路由。
|
|
329
|
+
| **枚举值** | **值** | **说明** |
|
|
330
|
+
| --- | --- | --- |
|
|
331
|
+
| SPEAKERPHONE | 0 | 扬声器,使用扬声器播放(即"免提"),扬声器位于手机底部,声音偏大,适合外放音乐。 |
|
|
332
|
+
| EARPIECE | 1 | 听筒,使用听筒播放,听筒位于手机顶部,声音偏小,适合需要保护隐私的通话场景。 |
|
|
333
|
+
|
|
334
|
+
### VideoQuality
|
|
335
|
+
|
|
336
|
+
视频质量。
|
|
337
|
+
| **枚举值** | **值** | **说明** |
|
|
338
|
+
| --- | --- | --- |
|
|
339
|
+
| QUALITY_360P | 1 | 360P。 |
|
|
340
|
+
| QUALITY_540P | 2 | 540P。 |
|
|
341
|
+
| QUALITY_720P | 3 | 720P。 |
|
|
342
|
+
| QUALITY_1080P | 4 | 1080P。 |
|
|
343
|
+
|
|
344
|
+
### NetworkQuality
|
|
345
|
+
|
|
346
|
+
网络质量。
|
|
347
|
+
| **枚举值** | **值** | **说明** |
|
|
348
|
+
| --- | --- | --- |
|
|
349
|
+
| UNKNOWN | 0 | 未知网络。 |
|
|
350
|
+
| EXCELLENT | 1 | 极佳。 |
|
|
351
|
+
| GOOD | 2 | 良好。 |
|
|
352
|
+
| POOR | 3 | 较差。 |
|
|
353
|
+
| BAD | 4 | 差。 |
|
|
354
|
+
| VERY_BAD | 5 | 极差。 |
|
|
355
|
+
| DOWN | 6 | 中断。 |
|
|
356
|
+
|
|
357
|
+
### MirrorType
|
|
358
|
+
|
|
359
|
+
摄像头镜像状态。
|
|
360
|
+
| **枚举值** | **值** | **说明** |
|
|
361
|
+
| --- | --- | --- |
|
|
362
|
+
| AUTO | 0 | 自动,前置摄像头镜像,后置摄像头不镜像。 |
|
|
363
|
+
| ENABLE | 1 | 前后摄像头均镜像。 |
|
|
364
|
+
| DISABLE | 2 | 前后摄像头均不镜像。 |
|
|
365
|
+
|
|
366
|
+
### DeviceFocusOwner
|
|
367
|
+
|
|
368
|
+
设备焦点。
|
|
369
|
+
| **枚举值** | **说明** |
|
|
370
|
+
| --- | --- |
|
|
371
|
+
| call | 语音通话场景。 |
|
|
372
|
+
| live | 直播场景。 |
|
|
373
|
+
| none | 未设置。 |
|
|
374
|
+
|
|
375
|
+
### NetworkInfo
|
|
376
|
+
|
|
377
|
+
网络信息
|
|
378
|
+
| **属性** | **类型** | **说明** |
|
|
379
|
+
| --- | --- | --- |
|
|
380
|
+
| userID | String | 用户唯一ID。 |
|
|
381
|
+
| quality | NetworkQuality | 网络质量。 |
|
|
382
|
+
| upLoss | Int | 上行丢包率,取值范围 [0, 100]。 |
|
|
383
|
+
| downLoss | Int | 下行丢包率,取值范围 [0, 100]。 |
|
|
384
|
+
| delay | Int | 延迟(单位:毫秒)。 |
|
|
385
|
+
|
|
386
|
+
### DeviceState
|
|
387
|
+
|
|
388
|
+
设备状态。
|
|
389
|
+
| **属性** | **类型** | **说明** |
|
|
390
|
+
| --- | --- | --- |
|
|
391
|
+
| microphoneStatus | StateFlow<DeviceStatus> | 麦克风状态。 |
|
|
392
|
+
| microphoneLastError | StateFlow<DeviceError> | 麦克风错误,用于出现报错时提取错误信息。 |
|
|
393
|
+
| captureVolume | StateFlow<Int> | 采集音量,取值范围 [0, 100]。 |
|
|
394
|
+
| currentMicVolume | StateFlow<Int> | 当前用户实际输出音量。 |
|
|
395
|
+
| outputVolume | StateFlow<Int> | 最大输出音量,取值范围 [0, 100]。 |
|
|
396
|
+
| cameraStatus | StateFlow<DeviceStatus> | 摄像头状态。 |
|
|
397
|
+
| cameraLastError | StateFlow<DeviceError> | 摄像头错误,用于出现报错时提取错误信息。 |
|
|
398
|
+
| isFrontCamera | StateFlow<Boolean> | 是否为前置摄像头。 |
|
|
399
|
+
| localMirrorType | StateFlow<MirrorType> | 镜像状态。 |
|
|
400
|
+
| localVideoQuality | StateFlow<VideoQuality> | 本地视频质量。 |
|
|
401
|
+
| currentAudioRoute | StateFlow<AudioRoute> | 当前音频路由位置。 |
|
|
402
|
+
| screenStatus | StateFlow<DeviceStatus> | 屏幕分享状态。 |
|
|
403
|
+
| networkInfo | StateFlow<NetworkInfo> | 网络信息。 |
|
|
404
|
+
|
|
405
|
+
## 使用示例
|
|
406
|
+
``` kotlin
|
|
407
|
+
// 获取单例实例
|
|
408
|
+
val store = DeviceStore.shared()
|
|
409
|
+
|
|
410
|
+
// 订阅状态变化
|
|
411
|
+
lifecycleScope.launch {
|
|
412
|
+
store.deviceState.microphoneStatus.collect { status ->
|
|
413
|
+
println("麦克风状态: $status")
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
lifecycleScope.launch {
|
|
418
|
+
store.deviceState.cameraStatus.collect { status ->
|
|
419
|
+
println("摄像头状态: $status")
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// 打开麦克风
|
|
424
|
+
store.openLocalMicrophone { code, message ->
|
|
425
|
+
if (code == 0) {
|
|
426
|
+
println("麦克风打开成功")
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// 打开前置摄像头
|
|
431
|
+
store.openLocalCamera(isFront = true) { code, message ->
|
|
432
|
+
if (code == 0) {
|
|
433
|
+
println("摄像头打开成功")
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
```
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
## 简介
|
|
2
|
+
|
|
3
|
+
**GiftStore** 提供了一套完整的礼物管理 API,包括发送礼物、刷新礼物列表、设置语言和监听礼物事件。
|
|
4
|
+
通过该类,可以在直播间内实现礼物互动功能。
|
|
5
|
+
|
|
6
|
+
> **重要:**
|
|
7
|
+
>
|
|
8
|
+
|
|
9
|
+
> 使用 **GiftStore.create** 工厂方法创建 **GiftStore** 实例,需要传入有效的直播间 ID。
|
|
10
|
+
>
|
|
11
|
+
|
|
12
|
+
> **说明:**
|
|
13
|
+
>
|
|
14
|
+
|
|
15
|
+
> 礼物状态更新通过 **giftState** 发布者传递。订阅它以接收房间内礼物数据的实时更新。
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
## 功能特性
|
|
19
|
+
- **礼物发送**:支持向当前房间发送指定礼物。
|
|
20
|
+
|
|
21
|
+
- **礼物列表**:获取和刷新当前房间可用的礼物列表。
|
|
22
|
+
|
|
23
|
+
- **语言设置**:设置礼物信息的展示语言。
|
|
24
|
+
|
|
25
|
+
- **事件监听**:监听礼物接收事件。
|
|
26
|
+
|
|
27
|
+
## 可订阅数据
|
|
28
|
+
|
|
29
|
+
**GiftState** 的字段描述如下:
|
|
30
|
+
| **属性名** | **类型** | **描述** |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| usableGifts | StateFlow<List<GiftCategory>> | 当前房间可用的所有礼物分类及礼物列表。 |
|
|
33
|
+
|
|
34
|
+
## API 列表
|
|
35
|
+
| **函数名** | **描述** |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| GiftStore.create | 创建礼物管理实例。 |
|
|
38
|
+
| addGiftListener | 礼物事件回调。 |
|
|
39
|
+
| removeGiftListener | 礼物事件回调。 |
|
|
40
|
+
| sendGift | 发送礼物。 |
|
|
41
|
+
| refreshUsableGifts | 刷新可用礼物列表。 |
|
|
42
|
+
| setLanguage | 设置展示语言。 |
|
|
43
|
+
|
|
44
|
+
### 创建实例
|
|
45
|
+
|
|
46
|
+
#### GiftStore.create
|
|
47
|
+
|
|
48
|
+
创建礼物管理实例。
|
|
49
|
+
|
|
50
|
+
### 观察状态和事件
|
|
51
|
+
|
|
52
|
+
#### addGiftListener
|
|
53
|
+
|
|
54
|
+
礼物事件回调
|
|
55
|
+
|
|
56
|
+
#### removeGiftListener
|
|
57
|
+
|
|
58
|
+
礼物事件回调
|
|
59
|
+
|
|
60
|
+
### 礼物操作
|
|
61
|
+
|
|
62
|
+
#### sendGift
|
|
63
|
+
|
|
64
|
+
向当前房间发送指定礼物
|
|
65
|
+
``` kotlin
|
|
66
|
+
abstract fun sendGift(
|
|
67
|
+
giftID: String,
|
|
68
|
+
count: Int,
|
|
69
|
+
completion: CompletionHandler?
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**版本信息**
|
|
74
|
+
|
|
75
|
+
从 3.5 版本开始支持。
|
|
76
|
+
|
|
77
|
+
**参数说明**
|
|
78
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
79
|
+
| --- | --- | --- | --- |
|
|
80
|
+
| giftID | String | 必填 | 要发送的礼物唯一标识 ID。 |
|
|
81
|
+
| count | Int | 必填 | 单次发送的礼物数量。 |
|
|
82
|
+
| completion | CompletionHandler? | 必填 | 完成回调(成功/失败状态)。 |
|
|
83
|
+
|
|
84
|
+
#### refreshUsableGifts
|
|
85
|
+
|
|
86
|
+
手动刷新当前房间的可用礼物列表。
|
|
87
|
+
``` kotlin
|
|
88
|
+
abstract fun refreshUsableGifts(completion: CompletionHandler?)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**版本信息**
|
|
92
|
+
|
|
93
|
+
从 3.5 版本开始支持。
|
|
94
|
+
|
|
95
|
+
**参数说明**
|
|
96
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
97
|
+
| --- | --- | --- | --- |
|
|
98
|
+
| completion | CompletionHandler? | 必填 | 完成回调(成功时可通过 state 获取最新礼物列表,失败时返回错误信息)。 |
|
|
99
|
+
|
|
100
|
+
#### setLanguage
|
|
101
|
+
|
|
102
|
+
设置礼物信息的展示语言。
|
|
103
|
+
``` kotlin
|
|
104
|
+
abstract fun setLanguage(language: String)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**版本信息**
|
|
108
|
+
|
|
109
|
+
从 3.5 版本开始支持。
|
|
110
|
+
|
|
111
|
+
**参数说明**
|
|
112
|
+
| **参数名** | **类型** | **是否必填** | **描述** |
|
|
113
|
+
| --- | --- | --- | --- |
|
|
114
|
+
| language | String | 必填 | 语言代码("zh-CN" 表示中文,"en" 表示英文),设置完成展示界面刷新后礼物名称、描述等会同步更新为对应语言。 |
|
|
115
|
+
|
|
116
|
+
## 数据结构
|
|
117
|
+
|
|
118
|
+
### Gift
|
|
119
|
+
|
|
120
|
+
礼物数据模型,包含单个礼物的完整属性信息。
|
|
121
|
+
| **属性** | **类型** | **说明** |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| giftID | String | 礼物ID。 |
|
|
124
|
+
| name | String | 礼物名称。 |
|
|
125
|
+
| desc | String | 礼物描述。 |
|
|
126
|
+
| iconURL | String | 礼物图标图片的网络 URL,用于加载礼物缩略图。 |
|
|
127
|
+
| resourceURL | String | 礼物动效资源文件的网络 URL,用于加载礼物展示动效。 |
|
|
128
|
+
| level | Long | 礼物等级,用于区分礼物稀有度或价值层级。 |
|
|
129
|
+
| coins | Long | 礼物价格(金币)。 |
|
|
130
|
+
| extensionInfo | Map<String,String> | 礼物扩展信息,可自定义字段(如特效类型、赠送限制等)。 |
|
|
131
|
+
|
|
132
|
+
### GiftCategory
|
|
133
|
+
|
|
134
|
+
礼物分类。
|
|
135
|
+
| **属性** | **类型** | **说明** |
|
|
136
|
+
| --- | --- | --- |
|
|
137
|
+
| categoryID | String | 分类唯一标识 ID,用于区分不同礼物分类。 |
|
|
138
|
+
| name | String | 分类展示名称,用于 UI 分类显示(如 "热门礼物","高级礼物")。 |
|
|
139
|
+
| desc | String | 分类描述信息,用于说明该分类的特点。 |
|
|
140
|
+
| extensionInfo | Map<String,String> | 分类扩展信息,包含自定义字段(如排序权重、显示样式等)。 |
|
|
141
|
+
| giftList | List<Gift> | 当前分类下的所有礼物列表。 |
|
|
142
|
+
|
|
143
|
+
### GiftState
|
|
144
|
+
|
|
145
|
+
礼物状态,管理当前房间的礼物数据状态,支持实时更新并可被订阅监听。
|
|
146
|
+
| **属性** | **类型** | **说明** |
|
|
147
|
+
| --- | --- | --- |
|
|
148
|
+
| usableGifts | StateFlow<List<GiftCategory>> | 当前房间可用的所有礼物分类及礼物列表。 |
|
|
149
|
+
|
|
150
|
+
### GiftListener
|
|
151
|
+
|
|
152
|
+
礼物事件,用于接收直播间/语音聊天房内的礼物动态。
|
|
153
|
+
|
|
154
|
+
**方法**
|
|
155
|
+
|
|
156
|
+
**onReceiveGift**: 收到新礼物消息的事件回调。当直播间/语音聊天房内有其他观众发送礼物时,会触发该事件并返回相关信息。
|
|
157
|
+
``` kotlin
|
|
158
|
+
open fun onReceiveGift(liveID: String, gift: Gift, count: Int, sender: LiveUserInfo) {}
|
|
159
|
+
```
|
|
160
|
+
| **参数名** | **类型** | **说明** |
|
|
161
|
+
| --- | --- | --- |
|
|
162
|
+
| liveID | String | 直播间ID。 |
|
|
163
|
+
| gift | Gift | 礼物信息。 |
|
|
164
|
+
| count | Int | 礼物数量。 |
|
|
165
|
+
| sender | LiveUserInfo | 礼物发送者信息。 |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
## 简介
|
|
2
|
+
|
|
3
|
+
**LikeStore** 提供了一套完整的点赞管理 API,包括发送点赞、监听点赞事件和获取点赞状态。通过该类,可以在直播间内实现点赞互动功能。
|
|
4
|
+
|
|
5
|
+
> **重要:**
|
|
6
|
+
>
|
|
7
|
+
|
|
8
|
+
> 使用 **LikeStore.create** 工厂方法创建 **LikeStore** 实例,需要传入有效的直播间 ID。
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
> **说明:**
|
|
12
|
+
>
|
|
13
|
+
|
|
14
|
+
> 点赞状态更新通过 **likeState** 发布者传递。订阅它以接收房间内点赞数据的实时更新。
|
|
15
|
+
>
|
|
16
|
+
|
|
17
|
+
## 功能特性
|
|
18
|
+
- **点赞发送**:支持向当前房间发送点赞。
|
|
19
|
+
|
|
20
|
+
- **点赞状态**:获取当前房间的累计点赞数。
|
|
21
|
+
|
|
22
|
+
- **事件监听**:监听点赞接收事件。
|
|
23
|
+
|
|
24
|
+
## 数据结构
|
|
25
|
+
|
|
26
|
+
### LikeState
|
|
27
|
+
|
|
28
|
+
点赞状态,用于展示和订阅直播间/语音聊天房的点赞信息。
|
|
29
|
+
| **属性** | **类型** | **说明** |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| totalLikeCount | StateFlow<Long> | 当前直播间/语音聊天房的累计总点赞数,支持实时更新并可被订阅监听。 |
|
|
32
|
+
|
|
33
|
+
### LikeListener
|
|
34
|
+
|
|
35
|
+
点赞事件,用于接收直播间/语音聊天房内的点赞动态。
|
|
36
|
+
|
|
37
|
+
此监听器用于接收直播间/语音聊天房内的点赞动态。
|
|
38
|
+
|
|
39
|
+
**方法**
|
|
40
|
+
|
|
41
|
+
**onReceiveLikesMessage**: 收到新点赞消息的事件回调。当直播间/语音聊天房内有其他观众发送点赞时,会触发该事件并返回相关信息。
|
|
42
|
+
``` kotlin
|
|
43
|
+
open fun onReceiveLikesMessage(liveID: String, totalLikesReceived: Long, sender: LiveUserInfo) {}
|
|
44
|
+
```
|
|
45
|
+
| **参数名** | **类型** | **说明** |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| liveID | String | 直播间ID。 |
|
|
48
|
+
| totalLikesReceived | Long | 本次收到的新点赞数。 |
|
|
49
|
+
| sender | LiveUserInfo | 点赞发送者信息。 |
|