@tencentcloud/sdk-mcp 1.3.9 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
- package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
- package/resource/doc/{tuicallkit/vue/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +63 -420
- package/resource/doc/callkit/preset/flutter/api.md +401 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
- package/resource/doc/callkit/preset/ios/api.md +282 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
- package/resource/doc/callkit/preset/react/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
- package/resource/doc/callkit/preset/vue/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +30 -126
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
- package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
- package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
- package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
- package/resource/doc/chatkit/react/components/conversation-preview.md +116 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
- package/resource/doc/chatkit/react/components/search.md +282 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
- package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
- package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
- package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -316
- package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
- package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +1 -23
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
- package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +26 -139
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +91 -338
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +160 -543
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +17 -88
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +26 -139
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +53 -262
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +60 -272
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +63 -440
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +23 -151
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audience-list.md +13 -91
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audio-effect.md +34 -177
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-barrage.md +18 -102
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -201
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-gift.md +66 -460
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +57 -419
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-room-list.md +24 -157
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +23 -96
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +33 -195
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +35 -150
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +45 -254
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +77 -457
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +52 -261
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +36 -167
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audience-list.md +15 -45
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audio-effect.md +23 -137
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-barrage.md +25 -131
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-co-guest-interaction.md +70 -366
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-gift.md +70 -424
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-room-list.md +24 -116
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
- package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
- package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +9 -48
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
- package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
- package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
- package/resource/doc/roomkit/android/features/room-state.md +358 -0
- package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
- package/resource/doc/roomkit/android/integration.md +433 -0
- package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
- package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
- package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
- package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
- package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
- package/resource/doc/roomkit/flutter/integration.md +405 -0
- package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
- package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
- package/resource/doc/roomkit/ios/features/room-state.md +320 -0
- package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
- package/resource/doc/roomkit/ios/integration.md +384 -0
- package/resource/doc/roomkit/vue/faq.md +1 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
- package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
- package/resource/doc/roomkit/vue/features/device-state.md +24 -44
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
- package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
- package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
- package/resource/doc/roomkit/vue/features/room-state.md +25 -36
- package/resource/doc/roomkit/vue/features/room-view.md +30 -127
- package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
- package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
- package/resource/doc/roomkit/vue/features/virtual-background.md +13 -34
- package/resource/doc/roomkit/vue/integration.md +21 -80
- package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
- package/resource/doc/rtcengine/faq/web/web.md +15 -22
- package/resource/doc/rtcengine/web/api.md +17 -21
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -4
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
- package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
- package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
- package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
- package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
- package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
- package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
- package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
- package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
- package/resource/doc/trtc/android/TXLiteAVCode.md +115 -900
- package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
- package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
- package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
- package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
- package/server.js +1 -5
- package/server.js.map +1 -1
- package/tools/call/get_callkit_api.js +32 -0
- package/tools/call/get_callkit_api.js.map +1 -0
- package/tools/call/get_native_call_uikit_integration.js +34 -0
- package/tools/call/get_native_call_uikit_integration.js.map +1 -0
- package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
- package/tools/call/get_web_call_uikit_integration.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_integration.js +45 -0
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_integration.js +45 -0
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
- package/tools/common/get_faq.js +265 -0
- package/tools/common/get_faq.js.map +1 -0
- package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
- package/tools/common/get_usersig.js.map +1 -0
- package/tools/common/present_framework_choice.js +63 -0
- package/tools/common/present_framework_choice.js.map +1 -0
- package/tools/common/record_skill_session.js +58 -0
- package/tools/common/record_skill_session.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +28 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +18 -19
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
- package/tools/definitions/get_usersig_def.js +17 -24
- package/tools/definitions/get_usersig_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +13 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +27 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +13 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +23 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/definitions/record_skill_session_def.js +31 -0
- package/tools/definitions/record_skill_session_def.js.map +1 -0
- package/tools/index.js +49 -61
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_features.js +65 -0
- package/tools/live/get_native_livekit_core_features.js.map +1 -0
- package/tools/live/get_native_livekit_core_integration.js +59 -0
- package/tools/live/get_native_livekit_core_integration.js.map +1 -0
- package/tools/live/get_web_live_uikit_integration.js +48 -0
- package/tools/live/get_web_live_uikit_integration.js.map +1 -0
- package/tools/live/get_web_livekit_api.js +32 -0
- package/tools/live/get_web_livekit_api.js.map +1 -0
- package/tools/live/get_web_livekit_component_detail.js +34 -0
- package/tools/live/get_web_livekit_component_detail.js.map +1 -0
- package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
- package/tools/room/get_web_room_uikit_integration.js.map +1 -0
- package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
- package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
- package/utils/generate-structured-result.js +61 -17
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +21 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/flutter/workflow.md +0 -816
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
- package/resource/doc/chatuikit/react/components/search.md +0 -885
- package/resource/doc/chatuikit/react/create-group.md +0 -22
- package/resource/doc/chatuikit/react/init.md +0 -25
- package/resource/doc/chatuikit/react/workflow.md +0 -254
- package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
- package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
- package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
- package/resource/doc/chatuikit/vue/create-group.md +0 -26
- package/resource/doc/chatuikit/vue/init.md +0 -35
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -322
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -352
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
- package/resource/doc/livekit/live/vue/workflow.md +0 -219
- package/resource/doc/livekit/voice/android/workflow.md +0 -333
- package/resource/doc/livekit/voice/flutter/workflow.md +0 -359
- package/resource/doc/livekit/voice/ios/voice-integration.md +0 -853
- package/resource/doc/livekit/voice/ios/workflow.md +0 -358
- package/resource/doc/livekit/voice/uni-app/voice-integration.md +0 -613
- package/resource/doc/livekit/voice/uni-app/workflow.md +0 -369
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -879
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -733
- package/resource/doc/tuicallkit/android/workflow.md +0 -432
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1512
- package/resource/doc/tuicallkit/react/faq.md +0 -986
- package/resource/doc/tuicallkit/vue/api.md +0 -1512
- package/tools/call/get-native-call-integration.js +0 -43
- package/tools/call/get-native-call-integration.js.map +0 -1
- package/tools/call/get-web-call-api.js +0 -27
- package/tools/call/get-web-call-api.js.map +0 -1
- package/tools/call/get-web-call-integration.js.map +0 -1
- package/tools/chat/get-native-chat-feature-detail.js +0 -30
- package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
- package/tools/chat/get-native-chat-integration.js +0 -45
- package/tools/chat/get-native-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-component-detail.js +0 -31
- package/tools/chat/get-web-chat-component-detail.js.map +0 -1
- package/tools/chat/get-web-chat-integration.js +0 -45
- package/tools/chat/get-web-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-init.js +0 -28
- package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
- package/tools/chat/get-web-create-group-doc.js +0 -28
- package/tools/chat/get-web-create-group-doc.js.map +0 -1
- package/tools/common/get-faq.js +0 -91
- package/tools/common/get-faq.js.map +0 -1
- package/tools/common/get-usersig.js.map +0 -1
- package/tools/common/present-framework-choice.js +0 -16
- package/tools/common/present-framework-choice.js.map +0 -1
- package/tools/common/present-scenario-choice.js +0 -16
- package/tools/common/present-scenario-choice.js.map +0 -1
- package/tools/common/record-prompt.js +0 -55
- package/tools/common/record-prompt.js.map +0 -1
- package/tools/common/record-result.js +0 -60
- package/tools/common/record-result.js.map +0 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_live_api_def.js +0 -22
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -17
- package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
- package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
- package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
- package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
- package/tools/definitions/get_web_create_group_doc_def.js +0 -18
- package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
- package/tools/definitions/get_web_live_state_detail_def.js +0 -19
- package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/present_scenario_choice_def.js +0 -53
- package/tools/definitions/present_scenario_choice_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -58
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -46
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -177
- package/tools/live/get-native-live-uikit-integration.js.map +0 -1
- package/tools/live/get-web-live-component-detail.js +0 -31
- package/tools/live/get-web-live-component-detail.js.map +0 -1
- package/tools/live/get-web-live-state-detail.js +0 -31
- package/tools/live/get-web-live-state-detail.js.map +0 -1
- package/tools/live/get-web-live-uikit-integration.js +0 -52
- package/tools/live/get-web-live-uikit-integration.js.map +0 -1
- package/tools/live/get_native_live_uikit_extra_features.js +0 -105
- package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
- package/tools/live/get_native_live_uikit_interaction.js +0 -194
- package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
- package/tools/native_live/get-native-live-api.js +0 -31
- package/tools/native_live/get-native-live-api.js.map +0 -1
- package/tools/room/get-web-room-feature-detail.js.map +0 -1
- package/tools/room/get-web-room-integration.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
- package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
- package/tools/trtc/get-trtc-native-api.js +0 -31
- package/tools/trtc/get-trtc-native-api.js.map +0 -1
- package/utils/handle-component-name.js +0 -33
- package/utils/handle-component-name.js.map +0 -1
- /package/resource/doc/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
本篇文档旨在指导您如何使用 `AtomicXCore` 框架中的 `AudioEffectStore` 和 `DeviceStore` 模块,为您的直播应用快速集成音效控制功能,包括麦克风音量、耳返监听,并添加多种趣味变声效果和混响效果。
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
## 核心功能
|
|
7
4
|
|
|
8
5
|
通过组合 `AudioEffectStore` 和 `DeviceStore`,您将能实现以下核心功能:
|
|
@@ -14,72 +11,21 @@
|
|
|
14
11
|
|
|
15
12
|
- **混响效果**:模拟不同环境的声场效果,例如 KTV、金属声、低沉、洪亮等。
|
|
16
13
|
|
|
17
|
-
|
|
18
14
|
## 概念说明
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<tr>
|
|
29
|
-
<td rowspan="1" colSpan="1" >`AudioChangerType`</td>
|
|
30
|
-
|
|
31
|
-
<td rowspan="1" colSpan="1" >`enum`</td>
|
|
32
|
-
|
|
33
|
-
<td rowspan="1" colSpan="1" >变声效果枚举,例如,“小孩”,“男人”等。</td>
|
|
34
|
-
</tr>
|
|
35
|
-
|
|
36
|
-
<tr>
|
|
37
|
-
<td rowspan="1" colSpan="1" ><br>`AudioReverbType`<br></td>
|
|
38
|
-
|
|
39
|
-
<td rowspan="1" colSpan="1" >`enum`</td>
|
|
40
|
-
|
|
41
|
-
<td rowspan="1" colSpan="1" >混响效果枚举,例如,“ktv”,“礼堂”等。</td>
|
|
42
|
-
</tr>
|
|
43
|
-
|
|
44
|
-
<tr>
|
|
45
|
-
<td rowspan="1" colSpan="1" >`AudioEffectState`</td>
|
|
46
|
-
|
|
47
|
-
<td rowspan="1" colSpan="1" >`struct`</td>
|
|
48
|
-
|
|
49
|
-
<td rowspan="1" colSpan="1" >代表音效模块的当前状态,通常用于UI渲染。包括变声状态、混响状态、耳返开启状态、耳返音量。</td>
|
|
50
|
-
</tr>
|
|
51
|
-
|
|
52
|
-
<tr>
|
|
53
|
-
<td rowspan="1" colSpan="1" >`AudioEffectStore`</td>
|
|
54
|
-
|
|
55
|
-
<td rowspan="1" colSpan="1" >`class`</td>
|
|
56
|
-
|
|
57
|
-
<td rowspan="1" colSpan="1" >代表音效模块**单例数据管理类**。通过它您可以调用修改音效接口,当您调用接口后,相应的`state`属性会自动更新,可以通过订阅这个state响应式数据来接收和监听状态更新。</td>
|
|
58
|
-
</tr>
|
|
59
|
-
|
|
60
|
-
<tr>
|
|
61
|
-
<td rowspan="1" colSpan="1" >`DeviceState`</td>
|
|
62
|
-
|
|
63
|
-
<td rowspan="1" colSpan="1" >`struct`</td>
|
|
64
|
-
|
|
65
|
-
<td rowspan="1" colSpan="1" >代表设备模块的当前状态,通常用于UI渲染。核心属性包括摄像头、麦克风的设备状态。</td>
|
|
66
|
-
</tr>
|
|
67
|
-
|
|
68
|
-
<tr>
|
|
69
|
-
<td rowspan="1" colSpan="1" >`DeviceStore`</td>
|
|
70
|
-
|
|
71
|
-
<td rowspan="1" colSpan="1" >`class`</td>
|
|
72
|
-
|
|
73
|
-
<td rowspan="1" colSpan="1" >代表设备模块**单例数据管理类**。通过它您可以调用操作摄像头、麦克风接口,当您调用接口后,相应的`state`属性会自动更新,可以通过订阅这个state响应式数据来接收和监听状态更新。</td>
|
|
74
|
-
</tr>
|
|
75
|
-
</table>
|
|
76
|
-
|
|
15
|
+
| **核心概念** | **类型** | **核心职责与描述** |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `AudioChangerType` | `enum` | 变声效果枚举,例如,“小孩”,“男人”等。 |
|
|
18
|
+
| `AudioReverbType` | `enum` | 混响效果枚举,例如,“ktv”,“礼堂”等。 |
|
|
19
|
+
| `AudioEffectState` | `struct` | 代表音效模块的当前状态,通常用于UI渲染。包括变声状态、混响状态、耳返开启状态、耳返音量。 |
|
|
20
|
+
| `AudioEffectStore` | `class` | 代表音效模块**单例数据管理类**。通过它您可以调用修改音效接口,当您调用接口后,相应的`state`属性会自动更新,可以通过订阅这个state响应式数据来接收和监听状态更新。 |
|
|
21
|
+
| `DeviceState` | `struct` | 代表设备模块的当前状态,通常用于UI渲染。核心属性包括摄像头、麦克风的设备状态。 |
|
|
22
|
+
| `DeviceStore` | `class` | 代表设备模块**单例数据管理类**。通过它您可以调用操作摄像头、麦克风接口,当您调用接口后,相应的`state`属性会自动更新,可以通过订阅这个state响应式数据来接收和监听状态更新。 |
|
|
77
23
|
|
|
78
24
|
## 实现步骤
|
|
79
25
|
|
|
80
26
|
### 步骤1:组件集成
|
|
81
27
|
|
|
82
|
-
请参考
|
|
28
|
+
请参考 快速接入 集成 **AtomicXCore。**
|
|
83
29
|
|
|
84
30
|
### 步骤2:获取 Store 实例
|
|
85
31
|
|
|
@@ -98,11 +44,10 @@ let deviceStore = DeviceStore.shared
|
|
|
98
44
|
耳返功能允许用户实时监听自己的麦克风声音,可以通过调用本节介绍的接口管理耳返功能。
|
|
99
45
|
|
|
100
46
|
> **注意:**
|
|
101
|
-
>
|
|
47
|
+
>
|
|
102
48
|
|
|
103
49
|
> 耳返功能通常需要连接耳机才能正常工作。
|
|
104
|
-
>
|
|
105
|
-
|
|
50
|
+
>
|
|
106
51
|
|
|
107
52
|
#### 实现方式:
|
|
108
53
|
1. **开关耳返**:您可以使用`UISwitch`控件实现开关耳返功能。
|
|
@@ -111,7 +56,6 @@ let deviceStore = DeviceStore.shared
|
|
|
111
56
|
|
|
112
57
|
3. **监听状态更新 UI**:您可以订阅实时的耳返状态值更新 UI。
|
|
113
58
|
|
|
114
|
-
|
|
115
59
|
#### 代码示例:
|
|
116
60
|
``` swift
|
|
117
61
|
// 1. 开启耳返
|
|
@@ -135,44 +79,14 @@ audioEffectStore.state
|
|
|
135
79
|
```
|
|
136
80
|
|
|
137
81
|
#### setVoiceEarMonitorEnable 接口参数
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
143
|
-
|
|
144
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
145
|
-
</tr>
|
|
146
|
-
|
|
147
|
-
<tr>
|
|
148
|
-
<td rowspan="1" colSpan="1" >`enable`</td>
|
|
149
|
-
|
|
150
|
-
<td rowspan="1" colSpan="1" >`Bool`</td>
|
|
151
|
-
|
|
152
|
-
<td rowspan="1" colSpan="1" >是否开启耳返。<br>- true:开启<br>- false:关闭</td>
|
|
153
|
-
</tr>
|
|
154
|
-
</table>
|
|
155
|
-
|
|
82
|
+
| **参数名** | **类型** | **描述** |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `enable` | `Bool` | 是否开启耳返。<br>- true:开启<br>- false:关闭 |
|
|
156
85
|
|
|
157
86
|
#### setVoiceEarMonitorVolume 接口参数
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
163
|
-
|
|
164
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
165
|
-
</tr>
|
|
166
|
-
|
|
167
|
-
<tr>
|
|
168
|
-
<td rowspan="1" colSpan="1" >`volume`</td>
|
|
169
|
-
|
|
170
|
-
<td rowspan="1" colSpan="1" >`Int`</td>
|
|
171
|
-
|
|
172
|
-
<td rowspan="1" colSpan="1" >耳返音量大小。<br>- 取值范围: [0, 150]<br>- 默认值:100</td>
|
|
173
|
-
</tr>
|
|
174
|
-
</table>
|
|
175
|
-
|
|
87
|
+
| **参数名** | **类型** | **描述** |
|
|
88
|
+
| --- | --- | --- |
|
|
89
|
+
| `volume` | `Int` | 耳返音量大小。<br>- 取值范围: [0, 150]<br>- 默认值:100 |
|
|
176
90
|
|
|
177
91
|
### 步骤4:实现人声音量调节
|
|
178
92
|
|
|
@@ -183,7 +97,6 @@ audioEffectStore.state
|
|
|
183
97
|
|
|
184
98
|
2. **监听状态更新 UI**:您可以订阅实时的音量状态值更新 UI。
|
|
185
99
|
|
|
186
|
-
|
|
187
100
|
#### 示例代码:
|
|
188
101
|
``` swift
|
|
189
102
|
// 1. 调节音量
|
|
@@ -201,24 +114,9 @@ deviceStore.state
|
|
|
201
114
|
```
|
|
202
115
|
|
|
203
116
|
#### setCaptureVolume 接口参数
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
209
|
-
|
|
210
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
211
|
-
</tr>
|
|
212
|
-
|
|
213
|
-
<tr>
|
|
214
|
-
<td rowspan="1" colSpan="1" >`volume`</td>
|
|
215
|
-
|
|
216
|
-
<td rowspan="1" colSpan="1" >`Int`</td>
|
|
217
|
-
|
|
218
|
-
<td rowspan="1" colSpan="1" >采集音量大小。<br>- 取值范围: [0, 150]<br>- 默认值:100</td>
|
|
219
|
-
</tr>
|
|
220
|
-
</table>
|
|
221
|
-
|
|
117
|
+
| **参数名** | **类型** | **描述** |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| `volume` | `Int` | 采集音量大小。<br>- 取值范围: [0, 150]<br>- 默认值:100 |
|
|
222
120
|
|
|
223
121
|
### 步骤5:实现变声效果
|
|
224
122
|
|
|
@@ -233,24 +131,9 @@ audioEffectStore.setAudioChangerType(type: .none)
|
|
|
233
131
|
```
|
|
234
132
|
|
|
235
133
|
#### setAudioChangerType 接口参数
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
241
|
-
|
|
242
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
243
|
-
</tr>
|
|
244
|
-
|
|
245
|
-
<tr>
|
|
246
|
-
<td rowspan="1" colSpan="1" >`type`</td>
|
|
247
|
-
|
|
248
|
-
<td rowspan="1" colSpan="1" >`AudioChangerType`</td>
|
|
249
|
-
|
|
250
|
-
<td rowspan="1" colSpan="1" >变声效果枚举。</td>
|
|
251
|
-
</tr>
|
|
252
|
-
</table>
|
|
253
|
-
|
|
134
|
+
| **参数名** | **类型** | **描述** |
|
|
135
|
+
| --- | --- | --- |
|
|
136
|
+
| `type` | `AudioChangerType` | 变声效果枚举。 |
|
|
254
137
|
|
|
255
138
|
### 步骤6:实现混响效果
|
|
256
139
|
|
|
@@ -263,33 +146,17 @@ audioEffectStore.setAudioReverbType(type: .none)
|
|
|
263
146
|
```
|
|
264
147
|
|
|
265
148
|
#### setAudioReverbType 接口参数
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
271
|
-
|
|
272
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
273
|
-
</tr>
|
|
274
|
-
|
|
275
|
-
<tr>
|
|
276
|
-
<td rowspan="1" colSpan="1" >`type`</td>
|
|
277
|
-
|
|
278
|
-
<td rowspan="1" colSpan="1" >`AudioReverbType`</td>
|
|
279
|
-
|
|
280
|
-
<td rowspan="1" colSpan="1" >混响效果枚举。</td>
|
|
281
|
-
</tr>
|
|
282
|
-
</table>
|
|
283
|
-
|
|
149
|
+
| **参数名** | **类型** | **描述** |
|
|
150
|
+
| --- | --- | --- |
|
|
151
|
+
| `type` | `AudioReverbType` | 混响效果枚举。 |
|
|
284
152
|
|
|
285
153
|
### 步骤7:重置音效设置
|
|
286
154
|
|
|
287
155
|
> **重要:**
|
|
288
|
-
>
|
|
156
|
+
>
|
|
289
157
|
|
|
290
158
|
> AudioEffectStore和DeviceStore是单例,这意味着音效和设备设置是全局生效的,如果您在当前直播间的设置不想影响到您创建的其他直播间,就需要在当前直播间结束的时候重置音效和设备设置。
|
|
291
|
-
>
|
|
292
|
-
|
|
159
|
+
>
|
|
293
160
|
|
|
294
161
|
以下两种情况您可能需要重置音效设置:
|
|
295
162
|
1. 当前直播间结束时,需要重置音效设置。
|
|
@@ -297,7 +164,7 @@ audioEffectStore.setAudioReverbType(type: .none)
|
|
|
297
164
|
2. 您需要提供“一键恢复”的功能,可以通过调用 store的`reset()` 方法实现。
|
|
298
165
|
|
|
299
166
|
``` swift
|
|
300
|
-
class YourMainViewController: UIViewController {
|
|
167
|
+
class YourMainViewController: UIViewController {
|
|
301
168
|
func reset() {
|
|
302
169
|
AudioEffectStore.shared.reset()
|
|
303
170
|
DeviceStore.shared.reset()
|
|
@@ -308,32 +175,10 @@ audioEffectStore.setAudioReverbType(type: .none)
|
|
|
308
175
|
## API 文档
|
|
309
176
|
|
|
310
177
|
关于 [AudioEffectStore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/audioeffectstore) 和 [DeviceStore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore) 及其相关类的所有公开接口、属性的详细信息,请参阅随 [AtomicXCore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore) 框架的官方 API 文档。
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
<td rowspan="1" colSpan="1" >**功能描述**</td>
|
|
316
|
-
|
|
317
|
-
<td rowspan="1" colSpan="1" >**API 文档**</td>
|
|
318
|
-
</tr>
|
|
319
|
-
|
|
320
|
-
<tr>
|
|
321
|
-
<td rowspan="1" colSpan="1" >AudioEffectStore</td>
|
|
322
|
-
|
|
323
|
-
<td rowspan="1" colSpan="1" >音效管理:进行音效设置,并获取实时音效状态。</td>
|
|
324
|
-
|
|
325
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/audioeffectstore/)</td>
|
|
326
|
-
</tr>
|
|
327
|
-
|
|
328
|
-
<tr>
|
|
329
|
-
<td rowspan="1" colSpan="1" >DeviceStore </td>
|
|
330
|
-
|
|
331
|
-
<td rowspan="1" colSpan="1" >设备管理:进行摄像头、麦克风操作,并获取实时设备状态。</td>
|
|
332
|
-
|
|
333
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore)</td>
|
|
334
|
-
</tr>
|
|
335
|
-
</table>
|
|
336
|
-
|
|
178
|
+
| **Store/Component** | **功能描述** | **API 文档** |
|
|
179
|
+
| --- | --- | --- |
|
|
180
|
+
| AudioEffectStore | 音效管理:进行音效设置,并获取实时音效状态。 | [API 文档](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/audioeffectstore/) |
|
|
181
|
+
| DeviceStore | 设备管理:进行摄像头、麦克风操作,并获取实时设备状态。 | [API 文档](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore) |
|
|
337
182
|
|
|
338
183
|
## 常见问题
|
|
339
184
|
|
|
@@ -348,7 +193,6 @@ audioEffectStore.setAudioReverbType(type: .none)
|
|
|
348
193
|
|
|
349
194
|
- **耳返音量 (EarMonitorVolume):**通过 `AudioEffectStore.setVoiceEarMonitorVolume()`** 设置。它只**决定了**您自己**在耳机里听到的监听声音大小,**不会**影响观众。
|
|
350
195
|
|
|
351
|
-
|
|
352
196
|
### **新创建的直播间为什么直接就有音效、或者出现音量很大、很小等问题?**
|
|
353
197
|
|
|
354
198
|
`AudioEffectStore`和`DeviceStore`是单例,这意味着音效和设备设置是全局生效的,出现这种情况很可能是因为您之前设置过音效但是没有重置,需要在合适的地方调用`reset()`方法重置。
|
|
@@ -362,12 +206,6 @@ audioEffectStore.setAudioReverbType(type: .none)
|
|
|
362
206
|
|
|
363
207
|
3. **麦克风是否开启**:确认 `DeviceStore` 中的麦克风是开启状态(即已调用 `openLocalMicrophone`)。
|
|
364
208
|
|
|
365
|
-
|
|
366
209
|
### **变声效果 和混响效果 可以同时生效吗?**
|
|
367
210
|
|
|
368
211
|
可以。`AudioChangerType` 和 `AudioReverbType` 是可以叠加生效的。例如,您可以同时设置 `.littleGirl` 变声和 `.ktv` 混响。
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
本篇文档旨在指导 iOS 开发者如何使用 `AtomicXCore` 框架中的 `BarrageStore` 模块,为您的直播应用快速集成功能丰富、性能卓越的弹幕系统。
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
## 核心功能
|
|
7
4
|
|
|
8
5
|
`BarrageStore` 为您的直播应用提供了一套完整的弹幕解决方案,核心功能包括:
|
|
@@ -14,50 +11,20 @@
|
|
|
14
11
|
|
|
15
12
|
- 在本地消息列表中插入系统提示(例如,“欢迎 XX 进入直播间”)。
|
|
16
13
|
|
|
17
|
-
|
|
18
14
|
## 核心概念解析
|
|
19
15
|
|
|
20
16
|
在开始集成之前,我们先通过下表了解一下 BarrageStore 相关的几个核心概念:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<td rowspan="1" colSpan="1" >**核心职责与描述**</td>
|
|
28
|
-
</tr>
|
|
29
|
-
|
|
30
|
-
<tr>
|
|
31
|
-
<td rowspan="1" colSpan="1" >[Barrage](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/barrage)</td>
|
|
32
|
-
|
|
33
|
-
<td rowspan="1" colSpan="1" >`struct`</td>
|
|
34
|
-
|
|
35
|
-
<td rowspan="1" colSpan="1" >代表一条弹幕消息的数据模型。它包含了发送者信息 (`sender`)、消息内容 (`textContent` 或 `data`)、消息类型 (`messageType`) 等所有关键信息。</td>
|
|
36
|
-
</tr>
|
|
37
|
-
|
|
38
|
-
<tr>
|
|
39
|
-
<td rowspan="1" colSpan="1" >[BarrageState](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/barragestate)</td>
|
|
40
|
-
|
|
41
|
-
<td rowspan="1" colSpan="1" >`struct`</td>
|
|
42
|
-
|
|
43
|
-
<td rowspan="1" colSpan="1" >代表弹幕模块的当前状态。其核心属性 `messageList` 是一个 `[Barrage]` 数组,按时间顺序存储了当前直播间的所有弹幕消息,是UI渲染的数据源。</td>
|
|
44
|
-
</tr>
|
|
45
|
-
|
|
46
|
-
<tr>
|
|
47
|
-
<td rowspan="1" colSpan="1" >[BarrageStore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/barragestore)</td>
|
|
48
|
-
|
|
49
|
-
<td rowspan="1" colSpan="1" >`class`</td>
|
|
50
|
-
|
|
51
|
-
<td rowspan="1" colSpan="1" >这是与弹幕功能交互的核心管理类。通过它,您可以发送消息 (`sendTextMessage`, `sendCustomMessage`),并通过订阅其 `state` 属性来接收和监听所有弹幕消息的更新。</td>
|
|
52
|
-
</tr>
|
|
53
|
-
</table>
|
|
54
|
-
|
|
17
|
+
| **核心概念** | **类型** | **核心职责与描述** |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| [Barrage](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/barrage) | `struct` | 代表一条弹幕消息的数据模型。它包含了发送者信息 (`sender`)、消息内容 (`textContent` 或 `data`)、消息类型 (`messageType`) 等所有关键信息。 |
|
|
20
|
+
| [BarrageState](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/barragestate) | `struct` | 代表弹幕模块的当前状态。其核心属性 `messageList` 是一个 `[Barrage]` 数组,按时间顺序存储了当前直播间的所有弹幕消息,是UI渲染的数据源。 |
|
|
21
|
+
| [BarrageStore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/barragestore) | `class` | 这是与弹幕功能交互的核心管理类。通过它,您可以发送消息 (`sendTextMessage`, `sendCustomMessage`),并通过订阅其 `state` 属性来接收和监听所有弹幕消息的更新。 |
|
|
55
22
|
|
|
56
23
|
## 实现步骤
|
|
57
24
|
|
|
58
25
|
### 步骤1:组件集成
|
|
59
26
|
|
|
60
|
-
请参考
|
|
27
|
+
请参考 开始直播 集成 **AtomicXCore**,完成接入。
|
|
61
28
|
|
|
62
29
|
### 步骤2:初始化并监听弹幕
|
|
63
30
|
|
|
@@ -68,23 +35,23 @@ import AtomicXCore // 确保导入核心库
|
|
|
68
35
|
import Combine // 用于处理响应式编程
|
|
69
36
|
|
|
70
37
|
class BarrageManager {
|
|
71
|
-
|
|
38
|
+
|
|
72
39
|
private let liveId: String
|
|
73
40
|
private let barrageStore: BarrageStore
|
|
74
41
|
private var cancellables = Set<AnyCancellable>()
|
|
75
|
-
|
|
42
|
+
|
|
76
43
|
// 对外暴露【全量】消息列表的发布者,方便UI层订阅
|
|
77
44
|
let messagesPublisher = PassthroughSubject<[Barrage], Never>()
|
|
78
|
-
|
|
45
|
+
|
|
79
46
|
init(liveId: String) {
|
|
80
47
|
self.liveId = liveId
|
|
81
48
|
// 1. 通过 liveId 获取 BarrageStore 的单例
|
|
82
49
|
self.barrageStore = BarrageStore.create(liveID: liveId)
|
|
83
|
-
|
|
50
|
+
|
|
84
51
|
// 2. 初始化后立即开始监听弹幕消息
|
|
85
52
|
subscribeToBarrageUpdates()
|
|
86
53
|
}
|
|
87
|
-
|
|
54
|
+
|
|
88
55
|
private func subscribeToBarrageUpdates() {
|
|
89
56
|
barrageStore.state
|
|
90
57
|
.subscribe() // 订阅 BarrageState 的所有变化
|
|
@@ -104,7 +71,7 @@ class BarrageManager {
|
|
|
104
71
|
调用 `sendTextMessage` 方法向直播间内的所有用户广播一条纯文本消息。
|
|
105
72
|
``` swift
|
|
106
73
|
extension BarrageManager {
|
|
107
|
-
|
|
74
|
+
|
|
108
75
|
/// 发送一条文本弹幕
|
|
109
76
|
func sendTextMessage(text: String) {
|
|
110
77
|
// 建议:增加非空校验,避免发送无效消息
|
|
@@ -112,7 +79,7 @@ extension BarrageManager {
|
|
|
112
79
|
print("弹幕内容不能为空")
|
|
113
80
|
return
|
|
114
81
|
}
|
|
115
|
-
|
|
82
|
+
|
|
116
83
|
// 调用核心API发送消息
|
|
117
84
|
barrageStore.sendTextMessage(text: text, extensionInfo: nil) { result in
|
|
118
85
|
// 在回调中处理发送结果,例如给用户提示
|
|
@@ -128,40 +95,11 @@ extension BarrageManager {
|
|
|
128
95
|
```
|
|
129
96
|
|
|
130
97
|
#### **接口参数**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
138
|
-
</tr>
|
|
139
|
-
|
|
140
|
-
<tr>
|
|
141
|
-
<td rowspan="1" colSpan="1" >`text`</td>
|
|
142
|
-
|
|
143
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
144
|
-
|
|
145
|
-
<td rowspan="1" colSpan="1" >要发送的文本内容。</td>
|
|
146
|
-
</tr>
|
|
147
|
-
|
|
148
|
-
<tr>
|
|
149
|
-
<td rowspan="1" colSpan="1" >`extensionInfo`</td>
|
|
150
|
-
|
|
151
|
-
<td rowspan="1" colSpan="1" >`[String: String]?`</td>
|
|
152
|
-
|
|
153
|
-
<td rowspan="1" colSpan="1" >附加的扩展信息,可用于业务自定义。</td>
|
|
154
|
-
</tr>
|
|
155
|
-
|
|
156
|
-
<tr>
|
|
157
|
-
<td rowspan="1" colSpan="1" >`completion`</td>
|
|
158
|
-
|
|
159
|
-
<td rowspan="1" colSpan="1" >`CompletionClosure?`</td>
|
|
160
|
-
|
|
161
|
-
<td rowspan="1" colSpan="1" >发送完成后的回调,包含成功或失败的结果。</td>
|
|
162
|
-
</tr>
|
|
163
|
-
</table>
|
|
164
|
-
|
|
98
|
+
| **参数** | **类型** | **描述** |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| `text` | `String` | 要发送的文本内容。 |
|
|
101
|
+
| `extensionInfo` | `[String: String]?` | 附加的扩展信息,可用于业务自定义。 |
|
|
102
|
+
| `completion` | `CompletionClosure?` | 发送完成后的回调,包含成功或失败的结果。 |
|
|
165
103
|
|
|
166
104
|
### 步骤4:发送自定义弹幕
|
|
167
105
|
|
|
@@ -172,8 +110,8 @@ extension BarrageManager {
|
|
|
172
110
|
/// 发送一条自定义弹幕,例如用于发送礼物
|
|
173
111
|
func sendGiftMessage(giftId: String, giftCount: Int) {
|
|
174
112
|
// 1. 定义一个能识别业务的ID
|
|
175
|
-
let businessId = "live_gift"
|
|
176
|
-
|
|
113
|
+
let businessId = "live_gift"
|
|
114
|
+
|
|
177
115
|
// 2. 将业务数据编码为 JSON 字符串
|
|
178
116
|
let giftData: [String: Any] = ["gift_id": giftId, "gift_count": giftCount]
|
|
179
117
|
guard let jsonData = try? JSONSerialization.data(withJSONObject: giftData),
|
|
@@ -181,7 +119,7 @@ extension BarrageManager {
|
|
|
181
119
|
print("无法将礼物数据编码为JSON")
|
|
182
120
|
return
|
|
183
121
|
}
|
|
184
|
-
|
|
122
|
+
|
|
185
123
|
// 3. 调用核心API发送自定义消息
|
|
186
124
|
barrageStore.sendCustomMessage(businessID: businessId, data: jsonString) { result in
|
|
187
125
|
switch result {
|
|
@@ -196,47 +134,18 @@ extension BarrageManager {
|
|
|
196
134
|
```
|
|
197
135
|
|
|
198
136
|
#### **接口参数**
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
206
|
-
</tr>
|
|
207
|
-
|
|
208
|
-
<tr>
|
|
209
|
-
<td rowspan="1" colSpan="1" >`businessId`</td>
|
|
210
|
-
|
|
211
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
212
|
-
|
|
213
|
-
<td rowspan="1" colSpan="1" >业务唯一标识符,例如 "live_gift",用于接收端区分不同的自定义消息。</td>
|
|
214
|
-
</tr>
|
|
215
|
-
|
|
216
|
-
<tr>
|
|
217
|
-
<td rowspan="1" colSpan="1" >`data`</td>
|
|
218
|
-
|
|
219
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
220
|
-
|
|
221
|
-
<td rowspan="1" colSpan="1" >业务数据,通常为 JSON 格式的字符串。</td>
|
|
222
|
-
</tr>
|
|
223
|
-
|
|
224
|
-
<tr>
|
|
225
|
-
<td rowspan="1" colSpan="1" >`completion`</td>
|
|
226
|
-
|
|
227
|
-
<td rowspan="1" colSpan="1" >`CompletionClosure?`</td>
|
|
228
|
-
|
|
229
|
-
<td rowspan="1" colSpan="1" >发送完成后的回调。</td>
|
|
230
|
-
</tr>
|
|
231
|
-
</table>
|
|
232
|
-
|
|
137
|
+
| **参数** | **类型** | **描述** |
|
|
138
|
+
| --- | --- | --- |
|
|
139
|
+
| `businessId` | `String` | 业务唯一标识符,例如 "live_gift",用于接收端区分不同的自定义消息。 |
|
|
140
|
+
| `data` | `String` | 业务数据,通常为 JSON 格式的字符串。 |
|
|
141
|
+
| `completion` | `CompletionClosure?` | 发送完成后的回调。 |
|
|
233
142
|
|
|
234
143
|
### 步骤5:在本地插入提示消息
|
|
235
144
|
|
|
236
145
|
在当前用户的消息列表中插入一条本地消息,这条消息不会被发送到直播间的其他用户。这非常适合用来显示系统欢迎、警告或操作提示等信息。
|
|
237
146
|
``` swift
|
|
238
147
|
extension BarrageManager {
|
|
239
|
-
|
|
148
|
+
|
|
240
149
|
/// 在本地消息列表中插入一条欢迎提示
|
|
241
150
|
func showWelcomeMessage(for user: LiveUserInfo) {
|
|
242
151
|
// 1. 创建一条 Barrage 消息
|
|
@@ -244,7 +153,7 @@ extension BarrageManager {
|
|
|
244
153
|
welcomeTip.messageType = .text // 可以复用 text 类型来显示
|
|
245
154
|
welcomeTip.textContent = "欢迎 \(user.userName) 进入直播间!"
|
|
246
155
|
// sender 可以留空或设置为一个系统用户的标识
|
|
247
|
-
|
|
156
|
+
|
|
248
157
|
// 2. 调用API将其插入本地列表
|
|
249
158
|
barrageStore.appendLocalTip(message: welcomeTip)
|
|
250
159
|
}
|
|
@@ -252,24 +161,9 @@ extension BarrageManager {
|
|
|
252
161
|
```
|
|
253
162
|
|
|
254
163
|
#### **接口参数**
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
260
|
-
|
|
261
|
-
<td rowspan="1" colSpan="1" >**描述**</td>
|
|
262
|
-
</tr>
|
|
263
|
-
|
|
264
|
-
<tr>
|
|
265
|
-
<td rowspan="1" colSpan="1" >`message`</td>
|
|
266
|
-
|
|
267
|
-
<td rowspan="1" colSpan="1" >`Barrage`</td>
|
|
268
|
-
|
|
269
|
-
<td rowspan="1" colSpan="1" >要在本地插入的消息对象。SDK 会将此消息对象追加到 BarrageState 的 messageList 中。</td>
|
|
270
|
-
</tr>
|
|
271
|
-
</table>
|
|
272
|
-
|
|
164
|
+
| **参数** | **类型** | **描述** |
|
|
165
|
+
| --- | --- | --- |
|
|
166
|
+
| `message` | `Barrage` | 要在本地插入的消息对象。SDK 会将此消息对象追加到 BarrageState 的 messageList 中。 |
|
|
273
167
|
|
|
274
168
|
### 步骤6:管理用户发言(禁言与解禁)
|
|
275
169
|
|
|
@@ -310,7 +204,7 @@ import AtomicXCore
|
|
|
310
204
|
let liveListStore = LiveListStore.shared
|
|
311
205
|
|
|
312
206
|
// 2. 获取当前直播间信息,并修改全体禁言状态
|
|
313
|
-
var currentLiveInfo = liveListStore.state.value.currentLive
|
|
207
|
+
var currentLiveInfo = liveListStore.state.value.currentLive
|
|
314
208
|
currentLiveInfo.isMessageDisable = true // true为全体禁言, false为关闭
|
|
315
209
|
|
|
316
210
|
// 3. 调用更新接口,并指定修改的标志位
|
|
@@ -392,7 +286,7 @@ class BarrageUIManager {
|
|
|
392
286
|
|
|
393
287
|
SDK 返回的全量 `messageList` 会在长时间直播中无限增长,即使 UI 层做了节流,数据层持有的这个巨大数组也会持续侵占内存,最终导致应用闪退。
|
|
394
288
|
|
|
395
|
-
#### 优化方案:固定容量的循环数组 (Circular Buffer)
|
|
289
|
+
#### 优化方案:固定容量的循环数组 (Circular Buffer)
|
|
396
290
|
|
|
397
291
|
**只让您自己的数据源(DataSource)持有有限数量的消息**。无论 SDK 返回的全量列表有多大,您的应用只截取其中最新的部分用于显示。
|
|
398
292
|
|
|
@@ -406,7 +300,7 @@ class BarrageUIManager {
|
|
|
406
300
|
|
|
407
301
|
private func refreshUIIfNeeded() {
|
|
408
302
|
guard let fullList = self.latestMessageList, let tableView = self.tableView else { return }
|
|
409
|
-
self.latestMessageList = nil
|
|
303
|
+
self.latestMessageList = nil
|
|
410
304
|
|
|
411
305
|
// 关键点:截取最新的N条消息
|
|
412
306
|
let cappedList = Array(fullList.suffix(self.capacity))
|
|
@@ -487,7 +381,6 @@ class BarrageCell: UITableViewCell {
|
|
|
487
381
|
|
|
488
382
|
3. **接收端**: 在接收到弹幕消息后,检查其 `messageType` 是否为 `.custom` 以及 `businessId` 是否匹配。如果匹配,则解析 `data` 字符串(通常是解析JSON),根据解析出的数据(例如 `color、text`)来渲染您的自定义UI样式。
|
|
489
383
|
|
|
490
|
-
|
|
491
384
|
### 我在不同的类、不同的文件中都调用了 `BarrageStore.create(liveID: "some_id")`,这会创建出多个实例导致混乱吗?
|
|
492
385
|
|
|
493
386
|
完全不会。`AtomicXCore` 内部机制会确保只要您传入的 `liveId` 相同,获取到的永远是同一个与该直播间绑定的 `BarrageStore` 实例。您可以在需要的地方随用随取,无需手动管理单例。
|
|
@@ -503,7 +396,6 @@ class BarrageCell: UITableViewCell {
|
|
|
503
396
|
|
|
504
397
|
4. **网络问题**:检查设备当前的网络连接是否正常。消息发送依赖于网络。
|
|
505
398
|
|
|
506
|
-
|
|
507
399
|
### 新观众进入直播间时,如何让他们看到加入前的历史弹幕消息?
|
|
508
400
|
|
|
509
401
|
`AtomicXCore` 支持拉取历史弹幕消息,但这需要您在**服务端控制台**进行一项简单的配置。配置完成后,SDK 会自动处理后续的一切,您无需编写额外的代码。
|
|
@@ -513,17 +405,10 @@ class BarrageCell: UITableViewCell {
|
|
|
513
405
|
|
|
514
406
|
2. 在左侧导航栏按照路径:**消息服务 Chat** >** 功能配置 **>** 群组配置 **> **群功能配置** >** 直播群新成员查看入群前消息量配置**进行导航。
|
|
515
407
|
|
|
516
|
-

|
|
517
|
-
|
|
518
408
|
3. 修改“新成员可查看最近消息数”,最大支持 **50** 条。
|
|
519
409
|
|
|
520
|
-
|
|
521
410
|
**步骤2:客户端无感获取 **
|
|
522
411
|
|
|
523
|
-
|
|
524
|
-
完成上述配置后,您的客户端代码**无需做任何改动**。
|
|
525
|
-
|
|
412
|
+
完成上述配置后,您的客户端代码**无需做任何改动**。
|
|
526
413
|
|
|
527
414
|
当新用户加入直播间时,`AtomicXCore` 的底层 会自动拉取您配置的历史消息数量。这些历史消息会和实时消息一样,通过您已实现的 `BarrageStore.state` 订阅通道推送给您的UI层。您的应用会像接收实时弹幕一样,自然地接收并展示这些历史弹幕。
|
|
528
|
-
|
|
529
|
-
|