@tencentcloud/sdk-mcp 1.3.9 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
- package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
- package/resource/doc/{tuicallkit/vue/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +63 -420
- package/resource/doc/callkit/preset/flutter/api.md +401 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
- package/resource/doc/callkit/preset/ios/api.md +282 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
- package/resource/doc/callkit/preset/react/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
- package/resource/doc/callkit/preset/vue/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +30 -126
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
- package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
- package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
- package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
- package/resource/doc/chatkit/react/components/conversation-preview.md +116 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
- package/resource/doc/chatkit/react/components/search.md +282 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
- package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
- package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
- package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -316
- package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
- package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +1 -23
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
- package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +26 -139
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +91 -338
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +160 -543
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +17 -88
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +26 -139
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +53 -262
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +60 -272
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +63 -440
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +23 -151
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audience-list.md +13 -91
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audio-effect.md +34 -177
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-barrage.md +18 -102
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -201
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-gift.md +66 -460
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +57 -419
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-room-list.md +24 -157
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +23 -96
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +33 -195
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +35 -150
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +45 -254
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +77 -457
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +52 -261
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +36 -167
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audience-list.md +15 -45
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audio-effect.md +23 -137
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-barrage.md +25 -131
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-co-guest-interaction.md +70 -366
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-gift.md +70 -424
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-room-list.md +24 -116
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
- package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
- package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +9 -48
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
- package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
- package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
- package/resource/doc/roomkit/android/features/room-state.md +358 -0
- package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
- package/resource/doc/roomkit/android/integration.md +433 -0
- package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
- package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
- package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
- package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
- package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
- package/resource/doc/roomkit/flutter/integration.md +405 -0
- package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
- package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
- package/resource/doc/roomkit/ios/features/room-state.md +320 -0
- package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
- package/resource/doc/roomkit/ios/integration.md +384 -0
- package/resource/doc/roomkit/vue/faq.md +1 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
- package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
- package/resource/doc/roomkit/vue/features/device-state.md +24 -44
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
- package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
- package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
- package/resource/doc/roomkit/vue/features/room-state.md +25 -36
- package/resource/doc/roomkit/vue/features/room-view.md +30 -127
- package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
- package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
- package/resource/doc/roomkit/vue/features/virtual-background.md +13 -34
- package/resource/doc/roomkit/vue/integration.md +21 -80
- package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
- package/resource/doc/rtcengine/faq/web/web.md +15 -22
- package/resource/doc/rtcengine/web/api.md +17 -21
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -4
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
- package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
- package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
- package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
- package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
- package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
- package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
- package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
- package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
- package/resource/doc/trtc/android/TXLiteAVCode.md +115 -900
- package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
- package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
- package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
- package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
- package/server.js +1 -5
- package/server.js.map +1 -1
- package/tools/call/get_callkit_api.js +32 -0
- package/tools/call/get_callkit_api.js.map +1 -0
- package/tools/call/get_native_call_uikit_integration.js +34 -0
- package/tools/call/get_native_call_uikit_integration.js.map +1 -0
- package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
- package/tools/call/get_web_call_uikit_integration.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_integration.js +45 -0
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_integration.js +45 -0
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
- package/tools/common/get_faq.js +265 -0
- package/tools/common/get_faq.js.map +1 -0
- package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
- package/tools/common/get_usersig.js.map +1 -0
- package/tools/common/present_framework_choice.js +63 -0
- package/tools/common/present_framework_choice.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +28 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +18 -19
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
- package/tools/definitions/get_usersig_def.js +17 -24
- package/tools/definitions/get_usersig_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +13 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +27 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +13 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +23 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/index.js +47 -61
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_features.js +65 -0
- package/tools/live/get_native_livekit_core_features.js.map +1 -0
- package/tools/live/get_native_livekit_core_integration.js +59 -0
- package/tools/live/get_native_livekit_core_integration.js.map +1 -0
- package/tools/live/get_web_live_uikit_integration.js +48 -0
- package/tools/live/get_web_live_uikit_integration.js.map +1 -0
- package/tools/live/get_web_livekit_api.js +32 -0
- package/tools/live/get_web_livekit_api.js.map +1 -0
- package/tools/live/get_web_livekit_component_detail.js +34 -0
- package/tools/live/get_web_livekit_component_detail.js.map +1 -0
- package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
- package/tools/room/get_web_room_uikit_integration.js.map +1 -0
- package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
- package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
- package/utils/generate-structured-result.js +61 -17
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +12 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/flutter/workflow.md +0 -816
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
- package/resource/doc/chatuikit/react/components/search.md +0 -885
- package/resource/doc/chatuikit/react/create-group.md +0 -22
- package/resource/doc/chatuikit/react/init.md +0 -25
- package/resource/doc/chatuikit/react/workflow.md +0 -254
- package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
- package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
- package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
- package/resource/doc/chatuikit/vue/create-group.md +0 -26
- package/resource/doc/chatuikit/vue/init.md +0 -35
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -322
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -352
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
- package/resource/doc/livekit/live/vue/workflow.md +0 -219
- package/resource/doc/livekit/voice/android/workflow.md +0 -333
- package/resource/doc/livekit/voice/flutter/workflow.md +0 -359
- package/resource/doc/livekit/voice/ios/voice-integration.md +0 -853
- package/resource/doc/livekit/voice/ios/workflow.md +0 -358
- package/resource/doc/livekit/voice/uni-app/voice-integration.md +0 -613
- package/resource/doc/livekit/voice/uni-app/workflow.md +0 -369
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -879
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -733
- package/resource/doc/tuicallkit/android/workflow.md +0 -432
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1512
- package/resource/doc/tuicallkit/react/faq.md +0 -986
- package/resource/doc/tuicallkit/vue/api.md +0 -1512
- package/tools/call/get-native-call-integration.js +0 -43
- package/tools/call/get-native-call-integration.js.map +0 -1
- package/tools/call/get-web-call-api.js +0 -27
- package/tools/call/get-web-call-api.js.map +0 -1
- package/tools/call/get-web-call-integration.js.map +0 -1
- package/tools/chat/get-native-chat-feature-detail.js +0 -30
- package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
- package/tools/chat/get-native-chat-integration.js +0 -45
- package/tools/chat/get-native-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-component-detail.js +0 -31
- package/tools/chat/get-web-chat-component-detail.js.map +0 -1
- package/tools/chat/get-web-chat-integration.js +0 -45
- package/tools/chat/get-web-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-init.js +0 -28
- package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
- package/tools/chat/get-web-create-group-doc.js +0 -28
- package/tools/chat/get-web-create-group-doc.js.map +0 -1
- package/tools/common/get-faq.js +0 -91
- package/tools/common/get-faq.js.map +0 -1
- package/tools/common/get-usersig.js.map +0 -1
- package/tools/common/present-framework-choice.js +0 -16
- package/tools/common/present-framework-choice.js.map +0 -1
- package/tools/common/present-scenario-choice.js +0 -16
- package/tools/common/present-scenario-choice.js.map +0 -1
- package/tools/common/record-prompt.js +0 -55
- package/tools/common/record-prompt.js.map +0 -1
- package/tools/common/record-result.js +0 -60
- package/tools/common/record-result.js.map +0 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_live_api_def.js +0 -22
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -17
- package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
- package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
- package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
- package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
- package/tools/definitions/get_web_create_group_doc_def.js +0 -18
- package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
- package/tools/definitions/get_web_live_state_detail_def.js +0 -19
- package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/present_scenario_choice_def.js +0 -53
- package/tools/definitions/present_scenario_choice_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -58
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -46
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -177
- package/tools/live/get-native-live-uikit-integration.js.map +0 -1
- package/tools/live/get-web-live-component-detail.js +0 -31
- package/tools/live/get-web-live-component-detail.js.map +0 -1
- package/tools/live/get-web-live-state-detail.js +0 -31
- package/tools/live/get-web-live-state-detail.js.map +0 -1
- package/tools/live/get-web-live-uikit-integration.js +0 -52
- package/tools/live/get-web-live-uikit-integration.js.map +0 -1
- package/tools/live/get_native_live_uikit_extra_features.js +0 -105
- package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
- package/tools/live/get_native_live_uikit_interaction.js +0 -194
- package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
- package/tools/native_live/get-native-live-api.js +0 -31
- package/tools/native_live/get-native-live-api.js.map +0 -1
- package/tools/room/get-web-room-feature-detail.js.map +0 -1
- package/tools/room/get-web-room-integration.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
- package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
- package/tools/trtc/get-trtc-native-api.js +0 -31
- package/tools/trtc/get-trtc-native-api.js.map +0 -1
- package/utils/handle-component-name.js +0 -33
- package/utils/handle-component-name.js.map +0 -1
- /package/resource/doc/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
本文档将帮助开发者使用 `AtomicXCore SDK` 的 `LiveListState` 和 `LiveSeatState` 快速构建一个包含主播开播和观众进房功能的语聊房 `App`。
|
|
2
|
+
|
|
3
|
+
## 准备工作
|
|
4
|
+
|
|
5
|
+
### 步骤 1. 开通服务
|
|
6
|
+
|
|
7
|
+
请参见 开通服务,获取体验版或付费版 SDK。
|
|
8
|
+
|
|
9
|
+
### 步骤2. 导入 tuikit-atomic-x
|
|
10
|
+
1. **安装组件**:打开 [AtomicXCore SDK](https://ext.dcloud.net.cn/plugin?id=25488) ,单击**下载插件并导入HBuilderX**,选择需要集成的项目并单击**确定**。
|
|
11
|
+
|
|
12
|
+
2. **配置工程权限: **请在应用的 manifest.json 文件的app-plus > distribute 节点下,确保添加了以下必要的权限:
|
|
13
|
+
|
|
14
|
+
- Android 平台(`android`节点):在 `permissions` 数组中,请确保包含以下权限:
|
|
15
|
+
|
|
16
|
+
``` json
|
|
17
|
+
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\" />"
|
|
18
|
+
```
|
|
19
|
+
- iOS 平台(ios 节点):在 `privacyDescription` 对象中,请确保包含以下描述:
|
|
20
|
+
|
|
21
|
+
``` json
|
|
22
|
+
"NSMicrophoneUsageDescription" : "应用需要访问您的麦克风以进行直播"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
在 `UIBackgroundModes` 数组中,添加 `audio` 以支持后台播放音频。
|
|
26
|
+
|
|
27
|
+
``` json
|
|
28
|
+
"UIBackgroundModes" : [ "audio" ]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 步骤 3. 完成登录
|
|
32
|
+
|
|
33
|
+
在您的项目中调用 LoginState 中的 login 方法完成登录,**这是使用 **`AtomicXCore`** 所有功能的关键前提**。
|
|
34
|
+
|
|
35
|
+
> **重要:**
|
|
36
|
+
>
|
|
37
|
+
|
|
38
|
+
> 推荐在您 App 自身的用户账户登录成功后,再调用 LoginState 中的 login 方法,以确保登录业务逻辑的清晰和一致。
|
|
39
|
+
>
|
|
40
|
+
|
|
41
|
+
``` typescript
|
|
42
|
+
import { useLoginState } from "@/uni_modules/tuikit-atomic-x/state/LoginState";
|
|
43
|
+
|
|
44
|
+
const { login } = useLoginState();
|
|
45
|
+
|
|
46
|
+
const handleLogin = () => {
|
|
47
|
+
login({
|
|
48
|
+
sdkAppID: 1400000001, // 替换为您的 SDKAppID
|
|
49
|
+
userID: "test_001", // 替换为您的 UserID
|
|
50
|
+
userSig: "xxxxxxxxxx" // 替换为您的 UserSig
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**登录接口参数说明:**
|
|
56
|
+
| 参数 | 类型 | 说明 |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| sdkAppID | number | 从 [控制台](https://console.cloud.tencent.com/trtc)获取,通常是以 `140` 或 `160` 开头的 10 位整数。 |
|
|
59
|
+
| userID | string | 当前用户的唯一 ID,仅包含英文字母、数字、连字符和下划线。为避免多端登录冲突,**请勿使用**`1`、`123`**等简单 ID**。 |
|
|
60
|
+
| userSig | string | 用于腾讯云鉴权的票据。请注意:<br>- 开发环境:您可以采用本地 `GenerateTestUserSig.genTestSig` 函数生成 userSig 或者 通过 [UserSig 辅助工具](https://console.cloud.tencent.com/im/tool-usersig) 生成临时的 UserSig。<br>- 生产环境:为了防止密钥泄露,请务必采用服务端生成 UserSig 的方式。详细信息请参考 [服务端生成 UserSig](https://cloud.tencent.com/document/product/647/17275)。<br>更多信息请参见 [如何计算及使用 UserSig](https://cloud.tencent.com/document/product/647/17275)。 |
|
|
61
|
+
|
|
62
|
+
## 搭建语音聊天室
|
|
63
|
+
|
|
64
|
+
### 步骤1:实现房主创建语聊房
|
|
65
|
+
|
|
66
|
+
房主开播流程如下,您只需执行以下几步操作,即可快速搭建一个语聊房。
|
|
67
|
+
|
|
68
|
+
#### **1. 初始化麦位 **`State`
|
|
69
|
+
|
|
70
|
+
在您的房主页面中,创建一个 `LiveSeatState` 实例。您需要监听响应式数据的变化,以实时获取麦位数据来渲染您的 `UI`。
|
|
71
|
+
``` typescript
|
|
72
|
+
import { watch } from 'vue';
|
|
73
|
+
import { useLiveSeatState } from '@/uni_modules/tuikit-atomic-x/state/LiveSeatState';
|
|
74
|
+
|
|
75
|
+
// 定义直播间 ID(需要与后续 createLive 中使用的 liveID 保持一致)
|
|
76
|
+
const liveID = 'your_live_room_id'; // 替换为您的直播间 ID
|
|
77
|
+
|
|
78
|
+
// 使用 liveID 获取 LiveSeatState 实例
|
|
79
|
+
const { seatList } = useLiveSeatState(liveID);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### **2. 打开麦克风**
|
|
83
|
+
|
|
84
|
+
通过调用 `DeviceState` 的 `openLocalMicrophone` 接口打开麦克风,示例代码如下:
|
|
85
|
+
``` typescript
|
|
86
|
+
import { useDeviceState } from "@/uni_modules/tuikit-atomic-x/state/DeviceState";
|
|
87
|
+
|
|
88
|
+
const { openLocalMicrophone } = useDeviceState();
|
|
89
|
+
|
|
90
|
+
const openMic = () => {
|
|
91
|
+
openLocalMicrophone()
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### **3. 开始语聊**
|
|
96
|
+
|
|
97
|
+
通过调用 `LiveListState` 的 `createLive` 接口开始语聊房直播,完整示例代码如下:
|
|
98
|
+
``` typescript
|
|
99
|
+
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState';
|
|
100
|
+
|
|
101
|
+
// 获取 LiveListState 实例
|
|
102
|
+
const { createLive } = useLiveListState();
|
|
103
|
+
|
|
104
|
+
// 开始直播
|
|
105
|
+
const startLive = () => {
|
|
106
|
+
createLive({
|
|
107
|
+
liveInfo: {
|
|
108
|
+
liveID: 'xxx', // 设置直播的房间 id
|
|
109
|
+
liveName: 'text', // 设置直播的房间名称
|
|
110
|
+
keepOwnerOnSeat: true, // 配置主播始终在麦位上
|
|
111
|
+
isSeatEnabled: true,
|
|
112
|
+
seatLayoutTemplateID: 70, // 麦位布局模板(例如 70 为 10 麦位模板)
|
|
113
|
+
seatMode: 'APPLY' // 上麦模式,例如申请上麦
|
|
114
|
+
maxSeatCount: 10 // 最大麦位数
|
|
115
|
+
},
|
|
116
|
+
success: () => {
|
|
117
|
+
console.log('创建直播间成功')
|
|
118
|
+
//您可以在这里进行页面的跳转
|
|
119
|
+
},
|
|
120
|
+
fail: (error) => {
|
|
121
|
+
console.log('创建直播间失败', error)
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`LiveInfo`**参数说明:**
|
|
128
|
+
| **参数名** | **类型** | **属性** | **描述** |
|
|
129
|
+
| --- | --- | --- | --- |
|
|
130
|
+
| `liveID` | `string` | 必填 | 直播间的唯一标识符 |
|
|
131
|
+
| `liveName` | `string` | 选填 | 直播间的标题 |
|
|
132
|
+
| `notice` | `string` | 选填 | 直播间的公告信息 |
|
|
133
|
+
| `isMessageDisable` | `boolean` | 选填 | 是否禁言(`true`:是,`false`:否) |
|
|
134
|
+
| `isPublicVisible` | `boolean` | 选填 | 是否公开可见(`true`:是,`false`:否) |
|
|
135
|
+
| `isSeatEnabled` | `boolean` | 选填 | 是否启用麦位功能(`true`:是,`false`:否) |
|
|
136
|
+
| `keepOwnerOnSeat` | `boolean` | 选填 | 是否保持房主在麦位上 |
|
|
137
|
+
| `maxSeatCount` | `number` | 必填 | 最大麦位数量 |
|
|
138
|
+
| `seatMode` | `string` | 选填 | 上麦模式(`'FREE'`:自由上麦,`'APPLY'`:申请上麦) |
|
|
139
|
+
| `seatLayoutTemplateID` | `number` | 必填 | 麦位布局模板 `ID` |
|
|
140
|
+
| `coverURL` | `string` | 选填 | 直播间的封面图片地址 |
|
|
141
|
+
| `backgroundURL` | `string` | 选填 | 直播间的背景图片地址 |
|
|
142
|
+
| `activityStatus` | `number` | 选填 | 直播活动状态 |
|
|
143
|
+
| `isGiftEnabled` | `boolean` | 选填 | 是否启用礼物功能(`true`:是,`false`:否) |
|
|
144
|
+
|
|
145
|
+
#### **4. 构建麦位 UI 界面**
|
|
146
|
+
|
|
147
|
+
通过 `LiveSeatState` 实例,监听 `seatList` 的变化,以实时获取麦位数据来渲染您的界面 UI 。您可以在主播页通过以下方式监听数据:
|
|
148
|
+
``` typescript
|
|
149
|
+
import { watch } from 'vue';
|
|
150
|
+
import { useLiveSeatState } from '@/uni_modules/tuikit-atomic-x/state/LiveSeatState';
|
|
151
|
+
|
|
152
|
+
// 使用 liveID 获取 LiveSeatState 实例
|
|
153
|
+
const { seatList } = useLiveSeatState(liveID);
|
|
154
|
+
|
|
155
|
+
watch( seatList ,(newSeatList) => {
|
|
156
|
+
console.log('新的麦位列表', newSeatList)
|
|
157
|
+
// 用这个数据来维护您的 UI
|
|
158
|
+
})
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### **5. 结束语聊**
|
|
162
|
+
|
|
163
|
+
语聊结束后,房主可以调用 `LiveListState` 的 `endLive` 接口结束语聊,`SDK` 会处理停止推流和销毁房间的逻辑。
|
|
164
|
+
``` typescript
|
|
165
|
+
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState';
|
|
166
|
+
|
|
167
|
+
// 获取 LiveListState 实例
|
|
168
|
+
const { endLive } = useLiveListState();
|
|
169
|
+
|
|
170
|
+
// 结束直播
|
|
171
|
+
const handleEndLive = () => {
|
|
172
|
+
endLive({
|
|
173
|
+
success: () => {
|
|
174
|
+
console.log('结束直播成功')
|
|
175
|
+
//您可以在这里进行页面的跳转
|
|
176
|
+
},
|
|
177
|
+
fail: (error) => {
|
|
178
|
+
console.log('结束直播失败', error)
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 步骤2:实现观众进入语聊房
|
|
185
|
+
|
|
186
|
+
观众进房流程如下,通过简单几步操作,即可实现观众进入语聊房
|
|
187
|
+
|
|
188
|
+
#### **1. 初始化麦位 **`State`
|
|
189
|
+
|
|
190
|
+
在您的观众页面 中,创建 `LiveSeatState` 实例,并监听 `seatList` 的变化,以渲染麦位 `UI` 。
|
|
191
|
+
``` typescript
|
|
192
|
+
import { watch } from 'vue';
|
|
193
|
+
import { useLiveSeatState } from '@/uni_modules/tuikit-atomic-x/state/LiveSeatState';
|
|
194
|
+
|
|
195
|
+
// 观众进房前,需要先获取要加入的直播间 ID(liveID)。通常有以下几种方式:
|
|
196
|
+
// 通过房间列表选择(可从 LiveListState 的 liveList 数据中获取)
|
|
197
|
+
// 使用 liveID 获取 LiveSeatState 实例
|
|
198
|
+
const { seatList } = useLiveSeatState(liveID);
|
|
199
|
+
|
|
200
|
+
watch(seatList,(newSeatList) => {
|
|
201
|
+
console.log('新的麦位列表', newSeatList)
|
|
202
|
+
// 用这个数据来维护您的 UI
|
|
203
|
+
})
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### **2. 进入语聊房**
|
|
207
|
+
|
|
208
|
+
通过调用 `LiveListState` 的 `joinLive` 接口加入语聊房,完整示例代码如下:
|
|
209
|
+
``` typescript
|
|
210
|
+
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState';
|
|
211
|
+
|
|
212
|
+
// 获取 LiveListState 实例
|
|
213
|
+
const { joinLive } = useLiveListState();
|
|
214
|
+
|
|
215
|
+
// 加入直播
|
|
216
|
+
const handleJoinLive = () => {
|
|
217
|
+
joinLive({
|
|
218
|
+
liveID: 'xxx', // 想要加入语聊房的 liveID
|
|
219
|
+
success: () => {
|
|
220
|
+
console.log('成功进入语聊房')
|
|
221
|
+
//您可以在这里进行页面的跳转
|
|
222
|
+
},
|
|
223
|
+
fail: (error) => {
|
|
224
|
+
console.log('进入语聊房失败', error)
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### **3. 构建麦位 UI 界面**
|
|
231
|
+
|
|
232
|
+
观众构建麦位 UI的流程与主播完全一致,请参考主播 构建麦位 UI 界面
|
|
233
|
+
|
|
234
|
+
#### **4. 退出语聊房**
|
|
235
|
+
|
|
236
|
+
观众退出语聊房时,需要调用 `LiveListState` 的 `leaveLive` 接口来退出。
|
|
237
|
+
``` typescript
|
|
238
|
+
|
|
239
|
+
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState';
|
|
240
|
+
|
|
241
|
+
// 获取 LiveListState 实例
|
|
242
|
+
const { leaveLive } = useLiveListState();
|
|
243
|
+
|
|
244
|
+
// 退出语聊房
|
|
245
|
+
const handleLeaveLive = () => {
|
|
246
|
+
leaveLive({
|
|
247
|
+
liveID: 'xxx', // 您当前加入语聊房的 liveID
|
|
248
|
+
success: () => {
|
|
249
|
+
console.log('退出语聊房成功')
|
|
250
|
+
//您可以在这里进行页面的跳转
|
|
251
|
+
},
|
|
252
|
+
fail: (error) => {
|
|
253
|
+
console.log('退出语聊房失败', error)
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### 运行效果
|
|
260
|
+
|
|
261
|
+
完成上述步骤后,即可完成一个最基础的语聊直播场景。您可以参考 丰富语聊场景 来完善语聊场景。
|
|
262
|
+
|
|
263
|
+
## 功能进阶
|
|
264
|
+
|
|
265
|
+
### **实现麦上用户说话音浪**
|
|
266
|
+
|
|
267
|
+
在语聊房场景中,一个常见的需求是当麦上用户说话时,在其头像上显示一个波浪动画,以提示全房间用户“谁在说话”,`LiveSeatState` 提供了 `speakingUsers` 数据流,专门用于实现此功能。
|
|
268
|
+
|
|
269
|
+
#### 实现效果
|
|
270
|
+
|
|
271
|
+
在您构建的麦位 UI 界面中监听 `speakingUsers` 变化,并更新“正在说话”状态,代码示例如下
|
|
272
|
+
``` typescript
|
|
273
|
+
import { watch } from 'vue';
|
|
274
|
+
import { useLiveSeatState } from '@/uni_modules/tuikit-atomic-x/state/LiveSeatState';
|
|
275
|
+
|
|
276
|
+
// 使用 liveID 获取 LiveSeatState 实例
|
|
277
|
+
const { speakingUsers } = useLiveSeatState(liveID);
|
|
278
|
+
|
|
279
|
+
watch(speakingUsers,(newSpeaker) => {
|
|
280
|
+
console.log('正在说话的人', newSpeaker)
|
|
281
|
+
// 用这个数据和之前监听的 seatList 进行匹配来更新 UI
|
|
282
|
+
})
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## 丰富语音聊天室场景
|
|
286
|
+
|
|
287
|
+
当您完成了基础的语音聊天室功能后,您可以参考以下功能指南来为语音聊天室添加丰富的互动玩法。
|
|
288
|
+
| **语音聊天室功能** | **功能介绍** | **功能 State** | **实现指南** |
|
|
289
|
+
| --- | --- | --- | --- |
|
|
290
|
+
| **实现观众音频连麦** | 观众申请上麦,与主播进行实时音频互动。 | [CoGuestState](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-CoGuestState) | 实现观众连麦 |
|
|
291
|
+
| **添加弹幕聊天功能** | 观众可以在语音聊天室发送和接收实时文字消息。 | [BarrageState](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-BarrageState) | 实现弹幕功能 |
|
|
292
|
+
| **构建礼物赠送系统** | 观众可以向主播赠送虚拟礼物,增加互动和趣味性。 | [GiftState](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-GiftState) | 实现礼物功能 |
|
|
293
|
+
| **添加设置音效功能** | 变声(童声 / 男声)、混响(KTV 等)、耳返调节,实时切换特效。 | [AudioEffectState](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-AudioEffectState) | 实现音效功能 |
|
|
294
|
+
|
|
295
|
+
## API 文档
|
|
296
|
+
| **State** | **功能描述** | **API 文档** |
|
|
297
|
+
| --- | --- | --- |
|
|
298
|
+
| **LiveListState** | 语音聊天室全生命周期管理:创建 / 加入 / 离开 / 销毁房间,查询房间列表,修改语音聊天室信息(名称、公告等),监听语音聊天室状态(如被踢出、结束)。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LiveListState) |
|
|
299
|
+
| **DeviceState** | 音视频设备控制:麦克风(开关 / 音量),设备状态实时监听。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-DeviceState) |
|
|
300
|
+
| **CoGuestState** | 观众连麦管理:连麦申请 / 邀请 / 同意 / 拒绝,连麦成员权限控制(麦克风),状态同步。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-CoGuestState) |
|
|
301
|
+
| **CoHostState** | 主播跨房连线:支持多布局模板(动态网格等),发起 / 接受 / 拒绝连线,连麦主播互动管理。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-CoHostState) |
|
|
302
|
+
| **GiftState** | 礼物互动:获取礼物列表,发送 / 接收礼物,监听礼物事件(含发送者、礼物详情)。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-GiftState) |
|
|
303
|
+
| **BarrageState** | 弹幕功能:发送文本 / 自定义弹幕,维护弹幕列表,实时监听弹幕状态。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-BarrageState) |
|
|
304
|
+
| **LikeState** | 点赞互动:发送点赞,监听点赞事件,同步总点赞数。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LikeState) |
|
|
305
|
+
| **LiveAudienceState** | 观众管理:获取实时观众列表( ID / 名称 / 头像),统计观众数量,监听观众进出事件。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LiveAudienceState) |
|
|
306
|
+
| **AudioEffectState** | 音频特效:变声(童声 / 男声)、混响( KTV 等)、耳返调节,实时切换特效。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-AudioEffectState) |
|
|
307
|
+
|
|
308
|
+
## 常见问题
|
|
309
|
+
|
|
310
|
+
### 代码变更后,没有效果或者编译报错?
|
|
311
|
+
|
|
312
|
+
引入 uni_modules 后,需要重新制作自定义基座,详情参见 制作自定义基座流程。
|
|
313
|
+
|
|
314
|
+
### 原生能力集成问题
|
|
315
|
+
- 问题:插件调用失败或无响应。
|
|
316
|
+
|
|
317
|
+
- 解决方案:
|
|
318
|
+
|
|
319
|
+
- 必须打包自定义基座:在开发调试原生插件时,不能使用标准基座,必须通过 `HBuilderX` > 运行 > 运行到手机或模拟器 > 制作自定义基座,然后选择这个自定义基座来运行。
|
|
320
|
+
|
|
321
|
+
- 检查权限:如本文档“准备工作”中所述,`manifest.json` manifest.json必须声明相机、麦克风等权限。
|
|
322
|
+
|
|
323
|
+
- 查看原生日志:这是终极调试手段。通过 `Android Studio (Logcat)` 或 `Xcode (Console)` 查看设备的原生日志,通常能发现最直接的错误信息。
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
`LiveListState` 是 `AtomicXCore` 中负责管理直播房间列表、创建、加入以及维护房间状态的核心模块。通过`LiveListState`,您可以为您的应用构建完整的直播生命周期管理。
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
## 核心功能
|
|
7
4
|
- **直播列表拉取**:获取当前所有公开的直播间列表,支持分页加载。
|
|
8
5
|
|
|
@@ -14,12 +11,11 @@
|
|
|
14
11
|
|
|
15
12
|
- **自定义业务数据**:强大的自定义元数据(`MetaData`)能力,允许您在房间内存储和同步任何业务相关的信息,例如直播状态、音乐信息、自定义角色等 。
|
|
16
13
|
|
|
17
|
-
|
|
18
14
|
## 实现步骤
|
|
19
15
|
|
|
20
16
|
### 步骤1:组件集成
|
|
21
17
|
|
|
22
|
-
请参考
|
|
18
|
+
请参考 快速接入 集成 **AtomicXCore**,并完成搭建基础语聊房的功能实现。
|
|
23
19
|
|
|
24
20
|
### 步骤2:实现观众从直播列表进入直播间
|
|
25
21
|
|
|
@@ -33,8 +29,8 @@
|
|
|
33
29
|
<cell v-for="(row, idx) in groupedList" :key="`row-${idx}`">
|
|
34
30
|
<view class="row">
|
|
35
31
|
<!-- 卡片循环 -->
|
|
36
|
-
<view
|
|
37
|
-
v-for="live in row"
|
|
32
|
+
<view
|
|
33
|
+
v-for="live in row"
|
|
38
34
|
:key="live.liveID"
|
|
39
35
|
class="card"
|
|
40
36
|
@tap="handleJoinLive(live)"
|
|
@@ -146,80 +142,16 @@ const handleJoinLive = (live: any) => {
|
|
|
146
142
|
```
|
|
147
143
|
|
|
148
144
|
**LiveInfo 参数说明**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<td rowspan="1" colSpan="1" >`liveID`</td>
|
|
160
|
-
|
|
161
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
162
|
-
|
|
163
|
-
<td rowspan="1" colSpan="1" >直播间的唯一标识符</td>
|
|
164
|
-
</tr>
|
|
165
|
-
|
|
166
|
-
<tr>
|
|
167
|
-
<td rowspan="1" colSpan="1" >`liveName`</td>
|
|
168
|
-
|
|
169
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
170
|
-
|
|
171
|
-
<td rowspan="1" colSpan="1" >直播间的标题</td>
|
|
172
|
-
</tr>
|
|
173
|
-
|
|
174
|
-
<tr>
|
|
175
|
-
<td rowspan="1" colSpan="1" >`coverURL`</td>
|
|
176
|
-
|
|
177
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
178
|
-
|
|
179
|
-
<td rowspan="1" colSpan="1" >直播间的封面图片地址</td>
|
|
180
|
-
</tr>
|
|
181
|
-
|
|
182
|
-
<tr>
|
|
183
|
-
<td rowspan="1" colSpan="1" >`liveOwner`</td>
|
|
184
|
-
|
|
185
|
-
<td rowspan="1" colSpan="1" >[LiveUserInfo](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/liveuserinfo)</td>
|
|
186
|
-
|
|
187
|
-
<td rowspan="1" colSpan="1" >房主的个人信息</td>
|
|
188
|
-
</tr>
|
|
189
|
-
|
|
190
|
-
<tr>
|
|
191
|
-
<td rowspan="1" colSpan="1" >`totalViewerCount`</td>
|
|
192
|
-
|
|
193
|
-
<td rowspan="1" colSpan="1" >`number`</td>
|
|
194
|
-
|
|
195
|
-
<td rowspan="1" colSpan="1" >直播间的总观看人数</td>
|
|
196
|
-
</tr>
|
|
197
|
-
|
|
198
|
-
<tr>
|
|
199
|
-
<td rowspan="1" colSpan="1" >`categoryList`</td>
|
|
200
|
-
|
|
201
|
-
<td rowspan="1" colSpan="1" >`[number]`</td>
|
|
202
|
-
|
|
203
|
-
<td rowspan="1" colSpan="1" >直播间的分类标签列表</td>
|
|
204
|
-
</tr>
|
|
205
|
-
|
|
206
|
-
<tr>
|
|
207
|
-
<td rowspan="1" colSpan="1" >`notice`</td>
|
|
208
|
-
|
|
209
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
210
|
-
|
|
211
|
-
<td rowspan="1" colSpan="1" >直播间的公告信息</td>
|
|
212
|
-
</tr>
|
|
213
|
-
|
|
214
|
-
<tr>
|
|
215
|
-
<td rowspan="1" colSpan="1" >`metaData`</td>
|
|
216
|
-
|
|
217
|
-
<td rowspan="1" colSpan="1" >`[string: string]`</td>
|
|
218
|
-
|
|
219
|
-
<td rowspan="1" colSpan="1" >开发者自定义的元数据,用于实现复杂的业务场景</td>
|
|
220
|
-
</tr>
|
|
221
|
-
</table>
|
|
222
|
-
|
|
145
|
+
| **参数名** | **类型** | **描述** |
|
|
146
|
+
| --- | --- | --- |
|
|
147
|
+
| `liveID` | `string` | 直播间的唯一标识符 |
|
|
148
|
+
| `liveName` | `string` | 直播间的标题 |
|
|
149
|
+
| `coverURL` | `string` | 直播间的封面图片地址 |
|
|
150
|
+
| `liveOwner` | [LiveUserInfo](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/liveuserinfo) | 房主的个人信息 |
|
|
151
|
+
| `totalViewerCount` | `number` | 直播间的总观看人数 |
|
|
152
|
+
| `categoryList` | `[number]` | 直播间的分类标签列表 |
|
|
153
|
+
| `notice` | `string` | 直播间的公告信息 |
|
|
154
|
+
| `metaData` | `[string: string]` | 开发者自定义的元数据,用于实现复杂的业务场景 |
|
|
223
155
|
|
|
224
156
|
## 功能进阶
|
|
225
157
|
|
|
@@ -227,9 +159,6 @@ const handleJoinLive = (live: any) => {
|
|
|
227
159
|
|
|
228
160
|
在 App 的直播广场页,顶部设有“热门”、“音乐”、“游戏”等分类标签。用户点击不同的标签后,下方的直播列表会动态筛选,只展示对应分类的直播间,从而帮助用户快速发现感兴趣的内容。
|
|
229
161
|
|
|
230
|
-

|
|
231
|
-
|
|
232
|
-
|
|
233
162
|
#### 实现方式
|
|
234
163
|
|
|
235
164
|
核心是利用 `LiveInfo` 模型中的 `categoryList` 属性。当主播开播设置分类后,`fetchLiveList` 返回的 `LiveInfo` 对象中就会包含这些分类信息。您的 App 在获取到完整的直播列表后,只需在客户端根据用户选择的分类,对这个列表进行一次简单的筛选,然后刷新 UI 即可。
|
|
@@ -242,7 +171,7 @@ const handleJoinLive = (live: any) => {
|
|
|
242
171
|
<view class="live-list">
|
|
243
172
|
<!-- 分类标签栏 -->
|
|
244
173
|
<view class="category-tabs">
|
|
245
|
-
<view
|
|
174
|
+
<view
|
|
246
175
|
v-for="cat in categories"
|
|
247
176
|
:key="cat.id"
|
|
248
177
|
class="tab"
|
|
@@ -259,19 +188,19 @@ const handleJoinLive = (live: any) => {
|
|
|
259
188
|
<cell v-for="(row, idx) in groupedList" :key="`row-${idx}`">
|
|
260
189
|
<view class="row">
|
|
261
190
|
<!-- 卡片循环 -->
|
|
262
|
-
<view
|
|
263
|
-
v-for="live in row"
|
|
191
|
+
<view
|
|
192
|
+
v-for="live in row"
|
|
264
193
|
:key="live.liveID"
|
|
265
194
|
class="card"
|
|
266
195
|
@tap="handleJoinLive(live)"
|
|
267
196
|
>
|
|
268
197
|
<image :src="live.coverURL" class="cover" />
|
|
269
|
-
|
|
198
|
+
|
|
270
199
|
<!-- 分类标签 -->
|
|
271
200
|
<view v-if="live.liveInfo?.categoryList?.length" class="category-badge">
|
|
272
201
|
<text class="badge-text">{{ getCategoryName(live.liveInfo.categoryList[0]) }}</text>
|
|
273
202
|
</view>
|
|
274
|
-
|
|
203
|
+
|
|
275
204
|
<view class="info">
|
|
276
205
|
<text class="title">{{ live.liveName }}</text>
|
|
277
206
|
<text class="owner">{{ live.liveOwner?.userName }}</text>
|
|
@@ -321,12 +250,12 @@ const getCategoryName = (categoryId: number) => {
|
|
|
321
250
|
// 计算属性:过滤分类后的列表
|
|
322
251
|
const filteredList = computed(() => {
|
|
323
252
|
const list = liveList.value || [];
|
|
324
|
-
|
|
253
|
+
|
|
325
254
|
// 如果选择"全部",直接返回全部列表
|
|
326
255
|
if (selectedCategory.value === 0) {
|
|
327
256
|
return list;
|
|
328
257
|
}
|
|
329
|
-
|
|
258
|
+
|
|
330
259
|
// 根据选中的分类过滤
|
|
331
260
|
return list.filter(live => {
|
|
332
261
|
const categoryList = live.liveInfo?.categoryList || [];
|
|
@@ -471,7 +400,6 @@ const handleJoinLive = (live: any) => {
|
|
|
471
400
|
|
|
472
401
|
2. 观众端只需监听`currentLive 中 metaData` 的变化,一旦发现关心的 key 更新,就解析其 value 并刷新业务状态。
|
|
473
402
|
|
|
474
|
-
|
|
475
403
|
#### 代码示例
|
|
476
404
|
``` typescript
|
|
477
405
|
import { useLiveListState } from "@/uni_modules/tuikit-atomic-x/state/LiveListState";
|
|
@@ -504,25 +432,10 @@ watch( currentLive, (newVal, oldVal) => {
|
|
|
504
432
|
|
|
505
433
|
## API 文档
|
|
506
434
|
|
|
507
|
-
关于 [LiveListState](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LiveListState) 及其相关类的所有公开接口、属性和方法的详细信息,请参阅随
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
<td rowspan="1" colSpan="1" >**功能描述**</td>
|
|
513
|
-
|
|
514
|
-
<td rowspan="1" colSpan="1" >**API 文档**</td>
|
|
515
|
-
</tr>
|
|
516
|
-
|
|
517
|
-
<tr>
|
|
518
|
-
<td rowspan="1" colSpan="1" >LiveListState</td>
|
|
519
|
-
|
|
520
|
-
<td rowspan="1" colSpan="1" >直播间全生命周期管理:创建 / 加入 / 离开 / 销毁房间,查询房间列表,修改直播信息(名称、公告等),监听直播状态(例如被踢出、结束)。</td>
|
|
521
|
-
|
|
522
|
-
<td rowspan="1" colSpan="1" >[API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LiveListState)</td>
|
|
523
|
-
</tr>
|
|
524
|
-
</table>
|
|
525
|
-
|
|
435
|
+
关于 [LiveListState](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LiveListState) 及其相关类的所有公开接口、属性和方法的详细信息,请参阅随 AtomicXCore 框架的官方 API 文档。本文档使用到的相关 Store 如下:
|
|
436
|
+
| **State** | **功能描述** | **API 文档** |
|
|
437
|
+
| --- | --- | --- |
|
|
438
|
+
| LiveListState | 直播间全生命周期管理:创建 / 加入 / 离开 / 销毁房间,查询房间列表,修改直播信息(名称、公告等),监听直播状态(例如被踢出、结束)。 | [API 文档](https://liteav.sdk.qcloud.com/doc/product/tuikit/atomic-x/uni-app/zh/v1.0/api/index.html#module-LiveListState) |
|
|
526
439
|
|
|
527
440
|
## 常见问题
|
|
528
441
|
|
|
@@ -541,7 +454,6 @@ watch( currentLive, (newVal, oldVal) => {
|
|
|
541
454
|
|
|
542
455
|
- **步骤2:获取列表时检查前缀 **客户端在拉取到列表后,通过检查 liveID 字符串的前缀来进行区分。
|
|
543
456
|
|
|
544
|
-
|
|
545
457
|
### 使用 `updateLiveMetaData` 时有哪些需要注意的限制和规则?
|
|
546
458
|
|
|
547
459
|
为了保证系统的稳定和高效,`metaData` 的使用遵循以下规则:
|
|
@@ -556,7 +468,3 @@ watch( currentLive, (newVal, oldVal) => {
|
|
|
556
468
|
- 单个房间所有 value 的总大小不超过 **16KB**。
|
|
557
469
|
|
|
558
470
|
- **冲突解决**: `metaData` 的更新机制是“后来者覆盖”。如果多个管理员在短时间内修改同一个 key,最后一次的修改会生效。建议在业务设计上避免多人同时修改同一个关键信息。
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
@@ -19,7 +19,7 @@ keywords: ['错误码', '报错', 'live', 'liveKit', '直播间异常', 'pk 报
|
|
|
19
19
|
- 只有 live 类型的房间支持该接口。
|
|
20
20
|
- 当前布局模板无需改变。
|
|
21
21
|
- PK请求时长超过了最大限制(默认为 5 分钟)。
|
|
22
|
-
**解决方案:**
|
|
22
|
+
**解决方案:**
|
|
23
23
|
- 检查您使用的套餐,首次使用,可以[开通体验版](https://cloud.tencent.com/document/product/647/105439);也可以前往[腾讯云控制台](https://buy.cloud.tencent.com/trtc)购买或者升级套餐包。
|
|
24
24
|
- 检查直播间名称、直播间ID是否符合要求,确认房间类型是否为 live。
|
|
25
25
|
- 检查布局模板参数,确认是否需要更改布局。
|
|
@@ -50,12 +50,11 @@ keywords: ['错误码', '报错', 'live', 'liveKit', '直播间异常', 'pk 报
|
|
|
50
50
|
- 未购买套餐包或者已欠费。
|
|
51
51
|
- 直播间之间的跨房间连麦功能不可用。
|
|
52
52
|
- 直播间之间的PK功能不可用。
|
|
53
|
-
**解决方案:**
|
|
53
|
+
**解决方案:**
|
|
54
54
|
- 套餐问题请前往[腾讯云控制台](https://buy.cloud.tencent.com/trtc)购买。首次使用,可以[开通体验版](https://cloud.tencent.com/document/product/647/105439)。
|
|
55
55
|
- 直播间之间的跨房间连麦功能不可用问题,请前往[腾讯云控制台](https://buy.cloud.tencent.com/trtc)购买或者升级套餐包。
|
|
56
56
|
- 直播间之间的PK功能不可用问题,请前往[腾讯云控制台](https://buy.cloud.tencent.com/trtc)购买或者升级套餐包。
|
|
57
57
|
|
|
58
|
-
|
|
59
58
|
## 错误码 100012
|
|
60
59
|
**原因:** 请求频繁。
|
|
61
60
|
**解决方案:** 请求频繁,请稍后再试。
|