@tencent-rtc/mcp 1.6.7 → 1.7.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/CHANGELOG.md +25 -0
- package/README.md +53 -39
- package/knowledge/build-index.js +31 -4
- package/knowledge/chunker.js +82 -14
- package/knowledge/chunking-policy.js +100 -0
- package/knowledge/content-loader.js +3 -1
- package/knowledge/frontmatter-meta.js +167 -0
- package/knowledge/path-meta.js +28 -6
- package/knowledge/search/exact-lookup.js +9 -227
- package/knowledge/search/filter-pool.js +17 -26
- package/knowledge/search/framework-fallback.js +22 -0
- package/knowledge/search/intent-router.js +13 -0
- package/knowledge/search/query-normalizer.js +129 -0
- package/knowledge/search/search-core.js +391 -0
- package/knowledge/search/search-knowledge.js +351 -323
- package/knowledge/search/search-message.js +87 -0
- package/knowledge/search/search-pass.js +428 -0
- package/knowledge/search/search-types.js +1 -0
- package/knowledge/search/url-row-scorer.js +258 -0
- package/package.json +1 -1
- package/resource/_schema/feature-aliases.yaml +1 -0
- package/resource/_schema/query-normalization.yaml +9 -0
- package/resource/index/manifest.json +1 -1
- package/resource/integration/callkit/preset/android/integration.md +3 -14
- package/resource/integration/callkit/preset/flutter/integration.md +1 -12
- package/resource/integration/callkit/preset/ios/integration.md +2 -12
- package/resource/integration/callkit/preset/react/integration.md +1 -14
- package/resource/integration/callkit/preset/vue/integration.md +1 -14
- package/resource/integration/chat/preset/android/integration.md +6 -13
- package/resource/integration/chat/preset/flutter/integration.md +1 -8
- package/resource/integration/chat/preset/ios/integration.md +4 -12
- package/resource/integration/chat/preset/react/integration.md +6 -16
- package/resource/integration/chat/preset/vue/integration.md +0 -9
- package/resource/integration/livekit/preset/live/android/live-audience-integration.md +2 -6
- package/resource/integration/livekit/preset/live/android/live-host-integration.md +1 -11
- package/resource/integration/livekit/preset/live/android/live-list-integration.md +2 -6
- package/resource/integration/livekit/preset/live/android/prepare-integration.md +2 -7
- package/resource/integration/livekit/preset/live/ios/live-audience-integration.md +2 -7
- package/resource/integration/livekit/preset/live/ios/live-host-integration.md +1 -13
- package/resource/integration/livekit/preset/live/ios/live-list-integration.md +2 -10
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +3 -8
- package/resource/integration/livekit/preset/live/vue/live-list-integration.md +0 -4
- package/resource/integration/livekit/preset/live/vue/live-player-desk-integration.md +1 -5
- package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +2 -7
- package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +2 -8
- package/resource/integration/roomkit/preset/vue/integration.md +0 -11
- package/resource/knowledge/callkit/best-practice/callkit-miniprogram/uniapp-shrink.md +60 -0
- package/resource/knowledge/callkit/best-practice/common/call-autoplay-blocked.md +77 -0
- package/resource/knowledge/callkit/best-practice/common/call-message-in-chat.md +78 -0
- package/resource/knowledge/callkit/best-practice/common/call-vs-calls.md +110 -0
- package/resource/knowledge/callkit/best-practice/common/callengine-call-flow.md +123 -0
- package/resource/knowledge/callkit/best-practice/common/callengine-log-level.md +67 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-get-engine-instance.md +81 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-get-roomid.md +78 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-limitations.md +37 -0
- package/resource/knowledge/callkit/best-practice/common/callkit-user-register-and-kicked.md +98 -0
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +0 -7
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +0 -8
- package/resource/knowledge/callkit/core-sdk/android/offline-push.md +1 -9
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +2 -8
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +2 -8
- package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +1 -16
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +0 -8
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +0 -8
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +0 -11
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +178 -200
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +195 -217
- package/resource/knowledge/callkit/faq/android.md +4 -14
- package/resource/knowledge/callkit/faq/common.md +0 -2
- package/resource/knowledge/callkit/faq/error-code.md +2 -4
- package/resource/knowledge/callkit/faq/ios.md +1 -4
- package/resource/knowledge/callkit/preset/android/api.md +0 -6
- package/resource/knowledge/callkit/preset/ios/api.md +0 -4
- package/resource/knowledge/callkit/preset/react/api.md +3 -4
- package/resource/knowledge/callkit/preset/vue/api.md +3 -4
- package/resource/knowledge/chat/best-practice/common/avchatroom-message-loss-diagnosis.md +65 -0
- package/resource/knowledge/chat/best-practice/common/group-conversation-cleanup-on-system-notice.md +62 -0
- package/resource/knowledge/chat/best-practice/common/image-message-url-lifecycle.md +59 -0
- package/resource/knowledge/chat/best-practice/common/login-repeat-2025-diagnosis.md +61 -0
- package/resource/knowledge/chat/best-practice/common/message-read-report-and-receipt.md +64 -0
- package/resource/knowledge/chat/best-practice/common/message-receive-event.md +65 -0
- package/resource/knowledge/chat/best-practice/common/message-risk-error-and-render.md +65 -0
- package/resource/knowledge/chat/best-practice/common/message-unread-count.md +71 -0
- package/resource/knowledge/chat/best-practice/miniprogram/audio-message-send.md +113 -0
- package/resource/knowledge/chat/best-practice/miniprogram/login-timeout-2801-diagnosis.md +63 -0
- package/resource/knowledge/chat/best-practice/miniprogram/media-upload-fail-diagnosis.md +64 -0
- package/resource/knowledge/chat/best-practice/web/audio-message-send.md +118 -0
- package/resource/knowledge/chat/preset/android/features/chat-setting.md +0 -5
- package/resource/knowledge/chat/preset/android/features/contact-list.md +0 -7
- package/resource/knowledge/chat/preset/android/features/conversation-list.md +0 -6
- package/resource/knowledge/chat/preset/android/features/language.md +0 -8
- package/resource/knowledge/chat/preset/android/features/message-input.md +0 -6
- package/resource/knowledge/chat/preset/android/features/message-list.md +0 -8
- package/resource/knowledge/chat/preset/android/features/search.md +0 -7
- package/resource/knowledge/chat/preset/android/features/theme.md +0 -4
- package/resource/knowledge/chat/preset/android-view/integration.md +0 -6
- package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +0 -4
- package/resource/knowledge/chat/preset/flutter/features/contact-list.md +0 -9
- package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +0 -7
- package/resource/knowledge/chat/preset/flutter/features/language.md +0 -5
- package/resource/knowledge/chat/preset/flutter/features/message-input.md +0 -6
- package/resource/knowledge/chat/preset/flutter/features/message-list.md +0 -8
- package/resource/knowledge/chat/preset/flutter/features/search.md +0 -5
- package/resource/knowledge/chat/preset/flutter/features/theme.md +0 -4
- package/resource/knowledge/chat/preset/ios/features/chat-setting.md +0 -5
- package/resource/knowledge/chat/preset/ios/features/contact-list.md +0 -5
- package/resource/knowledge/chat/preset/ios/features/conversation-list.md +0 -7
- package/resource/knowledge/chat/preset/ios/features/language.md +1 -8
- package/resource/knowledge/chat/preset/ios/features/message-input.md +0 -6
- package/resource/knowledge/chat/preset/ios/features/message-list.md +0 -8
- package/resource/knowledge/chat/preset/ios/features/search.md +0 -5
- package/resource/knowledge/chat/preset/ios/features/theme.md +0 -4
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +0 -6
- package/resource/knowledge/chat/preset/react/features/contact-list.md +0 -23
- package/resource/knowledge/chat/preset/react/features/conversation-actions.md +2 -11
- package/resource/knowledge/chat/preset/react/features/conversation-list.md +4 -26
- package/resource/knowledge/chat/preset/react/features/conversation-preview.md +0 -6
- package/resource/knowledge/chat/preset/react/features/search.md +0 -1
- package/resource/knowledge/chat/preset/react/features/theme.md +0 -1
- package/resource/knowledge/chat/preset/vue/features/contact-list.md +3 -9
- package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +0 -3
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +2 -13
- package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +2 -3
- package/resource/knowledge/chat/preset/vue/features/conversation-search.md +1 -0
- package/resource/knowledge/chat/preset/vue/features/search.md +4 -3
- package/resource/knowledge/chat/urls/sdk/web.md +1 -1
- package/resource/knowledge/livekit/best-practice/android/voice-room-anchor-start.md +120 -0
- package/resource/knowledge/livekit/best-practice/common/admin-take-seat.md +73 -0
- package/resource/knowledge/livekit/best-practice/common/audience-leave-live.md +81 -0
- package/resource/knowledge/livekit/best-practice/common/voice-room-no-audio-troubleshoot.md +100 -0
- package/resource/knowledge/livekit/best-practice/common/voice-room-seat-list-change.md +65 -0
- package/resource/knowledge/livekit/best-practice/flutter/voice-room-anchor-start.md +122 -0
- package/resource/knowledge/livekit/best-practice/ios/voice-room-anchor-start.md +126 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +0 -7
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +0 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +0 -7
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +0 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +1 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +0 -7
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +0 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +0 -3
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/android/audience-list.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/android/audio-effect.md +2 -3
- package/resource/knowledge/livekit/core-sdk/features/android/barrage.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/android/base-beauty.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/android/gift.md +2 -7
- package/resource/knowledge/livekit/core-sdk/features/android/live-list.md +3 -4
- package/resource/knowledge/livekit/core-sdk/features/flutter/audience-list.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/audio-effect.md +2 -4
- package/resource/knowledge/livekit/core-sdk/features/flutter/barrage.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/gift.md +2 -7
- package/resource/knowledge/livekit/core-sdk/features/flutter/live-list.md +3 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/audience-list.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/audio-effect.md +2 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/barrage.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/base-beauty.md +2 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/gift.md +2 -7
- package/resource/knowledge/livekit/core-sdk/features/ios/live-list.md +3 -4
- package/resource/knowledge/livekit/core-sdk/live/android/co-guest-interaction.md +0 -3
- package/resource/knowledge/livekit/core-sdk/live/android/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/integration.md +1 -4
- package/resource/knowledge/livekit/core-sdk/live/flutter/co-guest-interaction.md +1 -3
- package/resource/knowledge/livekit/core-sdk/live/flutter/host-interaction.md +0 -1
- package/resource/knowledge/livekit/core-sdk/live/flutter/integration.md +1 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/co-guest-interaction.md +0 -3
- package/resource/knowledge/livekit/core-sdk/live/ios/host-interaction.md +0 -3
- package/resource/knowledge/livekit/core-sdk/live/ios/integration.md +1 -4
- package/resource/knowledge/livekit/core-sdk/voice/android/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/host-interaction.md +0 -5
- package/resource/knowledge/livekit/core-sdk/voice/android/integration.md +1 -4
- package/resource/knowledge/livekit/core-sdk/voice/flutter/co-guest-interaction.md +1 -4
- package/resource/knowledge/livekit/core-sdk/voice/flutter/integration.md +3 -6
- package/resource/knowledge/livekit/core-sdk/voice/ios/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/ios/integration.md +1 -4
- package/resource/knowledge/livekit/faq/error-code.md +0 -1
- package/resource/knowledge/livekit/preset/live/vue/features/barrage.md +2 -3
- package/resource/knowledge/livekit/preset/live/vue/features/live-audience-list.md +3 -3
- package/resource/knowledge/livekit/preset/live/vue/features/live-view.md +3 -3
- package/resource/knowledge/push/api-reference/android.md +0 -1
- package/resource/knowledge/push/api-reference/harmonyos.md +0 -2
- package/resource/knowledge/push/api-reference/react-native.md +3 -5
- package/resource/knowledge/push/api-reference/uni-app.md +3 -5
- package/resource/knowledge/push/api-reference/unity.md +0 -1
- package/resource/knowledge/push/api-reference/unreal-engine.md +0 -1
- package/resource/knowledge/push/config/android.md +0 -24
- package/resource/knowledge/push/config/harmonyos.md +0 -1
- package/resource/knowledge/push/config/ios.md +0 -3
- package/resource/knowledge/push/config/react-native.md +0 -29
- package/resource/knowledge/push/config/unity.md +1 -24
- package/resource/knowledge/push/config/unreal-engine.md +1 -24
- package/resource/knowledge/push/integration/android.md +0 -14
- package/resource/knowledge/push/integration/flutter.md +0 -19
- package/resource/knowledge/push/integration/harmonyos.md +0 -2
- package/resource/knowledge/push/integration/ios.md +0 -3
- package/resource/knowledge/push/integration/react-native.md +0 -24
- package/resource/knowledge/push/integration/uni-app.md +1 -11
- package/resource/knowledge/push/integration/unity.md +0 -9
- package/resource/knowledge/push/integration/unreal-engine.md +1 -17
- package/resource/knowledge/roomkit/best-practice/common/room-ghost-member.md +70 -0
- package/resource/knowledge/roomkit/best-practice/common/room-limit-and-multi.md +83 -0
- package/resource/knowledge/roomkit/best-practice/common/room-screen-share-preview.md +83 -0
- package/resource/knowledge/roomkit/best-practice/common/room-status-after-all-leave.md +69 -0
- package/resource/knowledge/roomkit/best-practice/vue/room-uikit-vs-atomicx.md +111 -0
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +0 -4
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +0 -4
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +0 -4
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +1 -5
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +0 -4
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +0 -4
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +0 -4
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +1 -5
- package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +0 -6
- package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +0 -9
- package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +0 -11
- package/resource/knowledge/roomkit/core-sdk/vue/room-participant-state.md +1 -5
- package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +1 -8
- package/resource/knowledge/roomkit/core-sdk/vue/room-view.md +0 -3
- package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +0 -3
- package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +0 -5
- package/resource/knowledge/roomkit/preset/android/integration.md +0 -4
- package/resource/knowledge/roomkit/preset/flutter/integration.md +1 -13
- package/resource/knowledge/roomkit/preset/ios/integration.md +0 -6
- package/resource/knowledge/roomkit/preset/react/integration.md +0 -16
- package/resource/knowledge/rtcengine/web/api.md +1 -8
- package/resource/knowledge/rtcengine/web/faq.md +3 -5
- package/resource/knowledge/rtcengine/web/how_to_integrated_web_sdk.md +0 -6
- package/resource/knowledge/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/21-advanced-auto-play-policy.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/27-advanced-small-stream.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/30-advanced-cross-room-link.md +2 -0
- package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -3
- package/resource/knowledge/rtcengine/web/plugin/34-advanced-proxy.md +2 -4
- package/resource/knowledge/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -4
- package/resource/knowledge/rtcengine/web/plugin/39-advanced-video-decoder.md +1 -1
- package/resource/knowledge/trtc/android/TRTCCloud.md +8 -56
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +6 -7
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +1 -18
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +0 -14
- package/resource/knowledge/trtc/android/TXDeviceManager.md +0 -1
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +1 -1
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +7 -59
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +0 -14
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +0 -4
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1 -19
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +6 -7
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +1 -1
- package/resource/knowledge/trtc/ios/TRTCCloud.md +9 -60
- package/resource/knowledge/trtc/ios/TRTCCloudDef.md +6 -7
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1 -19
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +0 -13
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +0 -4
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +1 -1
- package/server.js +27 -22
- package/tools/common/finalize_answer.js +9 -1
- package/tools/common/search_trtc_knowledge.js +3 -1
- package/tools/definitions/finalize_answer_def.js +2 -2
- package/tools/definitions/integration-boundary.js +2 -1
- package/tools/definitions/search_trtc_knowledge_def.js +2 -1
- package/utils/report-cls-client.js +3 -3
- package/utils/report-es-client.js +1 -1
- package/cursor-setting.png +0 -0
- package/mcp-server-prompt.png +0 -0
- package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +0 -80
- package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +0 -24
- package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +0 -116
- package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +0 -445
- package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +0 -465
- package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +0 -16
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +0 -230
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +0 -797
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +0 -325
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +0 -325
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Audience Cannot Hear Anchor — Troubleshooting Guide(语聊房 / 观众听不到声音 / 没声音)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [android, ios, flutter]
|
|
5
|
+
scope: platform_common
|
|
6
|
+
tags: [voice room, no audio, no sound, troubleshoot, LiveSeatStore, DeviceStore, takeSeat, openLocalMicrophone, unmuteMicrophone, LoginStore, joinLive, seatList, microphoneStatus, LiveSeatState, DeviceState]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Audience Cannot Hear Anchor — Troubleshooting Guide
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaways
|
|
13
|
+
|
|
14
|
+
- When the audience cannot hear the anchor, troubleshoot in order from anchor side to audience side: room → seat → microphone → mute → login → room entry — checking state at each layer.
|
|
15
|
+
- Anchor side: confirm the anchor is seated (`seatList`), microphone is open (`DeviceStore.microphoneStatus`), and not muted (`userInfo.microphoneStatus`).
|
|
16
|
+
- Audience side: confirm login status (`loginStatus == LOGIN`), room entry (`currentLive`), and device volume is normal.
|
|
17
|
+
- API and state structures are consistent across all three platforms (Android/iOS/Flutter); the troubleshooting flow is universal.
|
|
18
|
+
|
|
19
|
+
## 2. Field / API Reference
|
|
20
|
+
|
|
21
|
+
| Field / Capability | Purpose | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `LiveSeatStore` | Seat management | Provides `seatList`; check whether anchor info is present to determine if the anchor is seated |
|
|
24
|
+
| `LiveSeatStore.seatList` | Seat list | Check for anchor info; the anchor item's `userInfo.microphoneStatus` indicates mute state |
|
|
25
|
+
| `takeSeat` | Take a seat | Called when the anchor is not seated |
|
|
26
|
+
| `DeviceStore` | Device management | Provides `DeviceState`; check `microphoneStatus` to determine if the microphone is open |
|
|
27
|
+
| `DeviceState.microphoneStatus` | Microphone on/off state | Determines whether the anchor's microphone is open |
|
|
28
|
+
| `openLocalMicrophone` | Open microphone | Called when the microphone is closed |
|
|
29
|
+
| `unmuteMicrophone` | Resume audio publishing | Called when the anchor is muted |
|
|
30
|
+
| `LoginStore` | Login management | Provides `loginState.loginStatus`; `LOGIN` means logged in |
|
|
31
|
+
| `LiveListStore` | Live room management | Provides `LiveListState.currentLive`; determines if room entry succeeded |
|
|
32
|
+
| `joinLive` | Enter room | Called when the audience has not entered the room |
|
|
33
|
+
|
|
34
|
+
## 3. Mechanism & Sequence
|
|
35
|
+
|
|
36
|
+
### Anchor-Side Troubleshooting (in order)
|
|
37
|
+
|
|
38
|
+
1. Is the anchor seated? Check whether `LiveSeatStore.seatList` contains anchor info; if not, call `takeSeat`.
|
|
39
|
+
2. Is the microphone open? Check `DeviceState.microphoneStatus`; if closed, call `openLocalMicrophone`.
|
|
40
|
+
3. Is the anchor muted? Check the anchor item's `userInfo.microphoneStatus` in `seatList`; if muted, call `unmuteMicrophone`.
|
|
41
|
+
|
|
42
|
+
### Audience-Side Troubleshooting (in order)
|
|
43
|
+
|
|
44
|
+
1. Is the user logged in? Check whether `loginState.loginStatus` is `LOGIN`.
|
|
45
|
+
2. Has the user entered the room? Check whether `LiveListState.currentLive` matches the current live room; if not, call `joinLive`.
|
|
46
|
+
3. Is the device volume normal? Verify the system volume is audible.
|
|
47
|
+
|
|
48
|
+
## 4. Standard Usage
|
|
49
|
+
|
|
50
|
+
Follow this flow step by step — check the state and handle accordingly:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
观众听不到主播说话
|
|
54
|
+
│
|
|
55
|
+
├── 主播侧排查
|
|
56
|
+
│ ├── 1. 是否在麦上? → 否 → takeSeat 上麦
|
|
57
|
+
│ │ 查看 LiveSeatStore.seatList
|
|
58
|
+
│ ├── 2. 麦克风是否打开? → 否 → openLocalMicrophone
|
|
59
|
+
│ │ 查看 DeviceState.microphoneStatus
|
|
60
|
+
│ └── 3. 是否静音? → 是 → unmuteMicrophone
|
|
61
|
+
│ 查看 seatList 主播 userInfo.microphoneStatus
|
|
62
|
+
│
|
|
63
|
+
└── 观众侧排查
|
|
64
|
+
├── 1. 是否已登录? → 否 → 登录
|
|
65
|
+
│ 查看 loginState.loginStatus == LOGIN
|
|
66
|
+
├── 2. 是否进房? → 否 → joinLive 进房
|
|
67
|
+
│ 查看 LiveListState.currentLive
|
|
68
|
+
└── 3. 手机音量正常? → 否 → 调整音量
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 5. Expected Results
|
|
72
|
+
|
|
73
|
+
- Anchor's `LiveSeatStore.seatList` contains anchor info: anchor is seated and can publish audio.
|
|
74
|
+
- `DeviceState.microphoneStatus` is open: microphone is capturing audio.
|
|
75
|
+
- `userInfo.microphoneStatus` is open: not muted, audio is being published normally.
|
|
76
|
+
- Audience `loginStatus == LOGIN`: logged in.
|
|
77
|
+
- `LiveListState.currentLive` matches the current live room: room entry succeeded.
|
|
78
|
+
- If all conditions above are met and the audience still cannot hear audio: check device volume or contact the development team.
|
|
79
|
+
|
|
80
|
+
## 6. Common Pitfalls
|
|
81
|
+
|
|
82
|
+
- Pitfall 1: Only troubleshooting the audience side while ignoring the anchor's seat/microphone/mute state.
|
|
83
|
+
- Pitfall 2: Confusing `DeviceState.microphoneStatus` (device on/off) with `userInfo.microphoneStatus` (mute state) — the former is local device capture, the latter is the remote-visible state.
|
|
84
|
+
- Pitfall 3: Anchor publishes audio without taking a seat (taking a seat is a prerequisite for publishing).
|
|
85
|
+
- Pitfall 4: Audience has not entered the room (`currentLive` is incorrect) but assumes the anchor has no audio.
|
|
86
|
+
- Pitfall 5: Skipping login status check and directly troubleshooting the audio pipeline.
|
|
87
|
+
|
|
88
|
+
## 7. Problem Definition (retrieval hint)
|
|
89
|
+
|
|
90
|
+
When a voice room audience member cannot hear the anchor, how to troubleshoot layer by layer on the anchor side (seat/microphone/mute) and audience side (login/room entry/volume) to locate the issue.
|
|
91
|
+
|
|
92
|
+
## 8. Alternative Queries (retrieval recall)
|
|
93
|
+
|
|
94
|
+
- What to do when voice room audience cannot hear the anchor?
|
|
95
|
+
- How to troubleshoot no sound from the microphone in a voice room?
|
|
96
|
+
- Anchor is seated but audience cannot hear audio?
|
|
97
|
+
- How to check if the anchor is muted using `microphoneStatus`?
|
|
98
|
+
- No sound after entering a voice room?
|
|
99
|
+
- How to determine if the anchor is seated in a voice room?
|
|
100
|
+
- What to check first when audience cannot hear audio?
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Seat Microphone Status Synchronization(语聊房 / 麦位 / 麦克风状态更新同步)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [android, ios, flutter]
|
|
5
|
+
scope: platform_common
|
|
6
|
+
tags: [voice room, seat, microphone status, mic on, mic off, userMicrophoneStatus, SeatListChanged, muteMicrophone, unmuteMicrophone, closeMicrophone, openMicrophone, sync]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Seat Microphone Status Synchronization
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaways
|
|
13
|
+
|
|
14
|
+
- Both the anchor side and the audience side listen for seat microphone status (`userMicrophoneStatus`) changes via **`SeatListChanged`**.
|
|
15
|
+
- `userMicrophoneStatus` values: `0` = mic on; `1` = mic off (self-muted, can be re-opened by self); `2` = mic off (muted by admin, cannot be re-opened by self).
|
|
16
|
+
- `userMicrophoneStatus` can only be changed by **the anchor or a seated audience member** through `mute/unmute` or `close/open` APIs.
|
|
17
|
+
- The audience side only listens for status changes and does **not need** to call `mute/unmute` or `close/open` to modify `userMicrophoneStatus`.
|
|
18
|
+
|
|
19
|
+
## 2. Field / API Reference
|
|
20
|
+
|
|
21
|
+
| Field / Capability | Purpose | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `userMicrophoneStatus` | Seat microphone on/off state | `0` = mic on; `1` = mic off (self-muted, can reopen); `2` = mic off (admin-muted, cannot reopen) |
|
|
24
|
+
| `SeatListChanged` | Seat list change event | Both anchor and audience listen to this for `userMicrophoneStatus` changes; SDK syncs automatically |
|
|
25
|
+
| `muteMicrophone` / `unmuteMicrophone` | Mute / unmute | Called by anchor or seated audience; triggers `userMicrophoneStatus` change |
|
|
26
|
+
| `closeMicrophone` / `openMicrophone` | Close / open microphone | Called by anchor or seated audience; triggers `userMicrophoneStatus` change |
|
|
27
|
+
| Audience side | Read-only state | Only listens for status; does not call `mute/unmute` or `close/open` |
|
|
28
|
+
|
|
29
|
+
## 3. Mechanism & Sequence
|
|
30
|
+
|
|
31
|
+
Anchor or seated audience calls `mute/unmute` or `close/open` API -> triggers `userMicrophoneStatus` change -> SDK fires `SeatListChanged`, automatically syncing to all clients -> both anchor and audience receive the updated seat state via `SeatListChanged`.
|
|
32
|
+
|
|
33
|
+
`userMicrophoneStatus` can only be changed by the anchor or a seated audience member via `mute/unmute` or `close/open` APIs; the audience side only listens for status and does not actively modify it.
|
|
34
|
+
|
|
35
|
+
## 4. Standard Usage
|
|
36
|
+
|
|
37
|
+
Both anchor and audience listen for `SeatListChanged` and update the UI based on `userMicrophoneStatus`.
|
|
38
|
+
The anchor or a seated audience member changes the microphone state via `mute/unmute` or `close/open` APIs, and the SDK automatically syncs to all clients.
|
|
39
|
+
|
|
40
|
+
## 5. Expected Results
|
|
41
|
+
|
|
42
|
+
- After the anchor or seated audience calls `mute/unmute` or `close/open`, `userMicrophoneStatus` in `SeatListChanged` is updated on all clients.
|
|
43
|
+
- `userMicrophoneStatus = 0`: mic is on.
|
|
44
|
+
- `userMicrophoneStatus = 1`: mic is off (self-muted; can be re-opened by self).
|
|
45
|
+
- `userMicrophoneStatus = 2`: mic is off (admin-muted; cannot be re-opened by self).
|
|
46
|
+
- Audience side does not need to call `mute/unmute` or `close/open`; status is synced automatically by the SDK.
|
|
47
|
+
|
|
48
|
+
## 6. Common Pitfalls
|
|
49
|
+
|
|
50
|
+
- Pitfall 1: Audience calls `mute/unmute` or `close/open` to modify `userMicrophoneStatus` (not needed — status is auto-synced by SDK; audience side is read-only).
|
|
51
|
+
- Pitfall 2: Assuming `userMicrophoneStatus = 1` and `2` mean the same thing (`1` = self-muted and can reopen; `2` = admin-muted and cannot reopen).
|
|
52
|
+
- Pitfall 3: Assuming `userMicrophoneStatus` can be changed from the audience side (it can only be triggered by the anchor or a seated audience member via `mute/unmute` or `close/open`).
|
|
53
|
+
|
|
54
|
+
## 7. Problem Definition (retrieval hint)
|
|
55
|
+
|
|
56
|
+
The meaning of each `userMicrophoneStatus` value in a voice room seat, how it syncs to both anchor and audience via `SeatListChanged`, and which roles can change it through which APIs.
|
|
57
|
+
|
|
58
|
+
## 8. Alternative Queries (retrieval recall)
|
|
59
|
+
|
|
60
|
+
- Audience cannot see anchor's mic-on status in a voice room — what to do?
|
|
61
|
+
- What do `userMicrophoneStatus` values 0/1/2 mean?
|
|
62
|
+
- How does `SeatListChanged` sync seat microphone status?
|
|
63
|
+
- Who can change `userMicrophoneStatus`?
|
|
64
|
+
- Does the audience need to call `muteMicrophone` to update mic status?
|
|
65
|
+
- After admin mutes a user, can the user reopen their mic?
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Anchor Creates Room and Starts Streaming (Flutter)(语聊房 / 房主 / 开播 / createLive)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [flutter]
|
|
5
|
+
scope: platform_specific
|
|
6
|
+
tags: [voice room, anchor, start streaming, publish audio, createLive, openLocalMicrophone, muteMicrophone, unmuteMicrophone, LiveListStore, AudioSalon, keepOwnerOnSeat, seatMode, TakeSeatMode, Flutter, AtomicXCore]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Anchor Creates Room and Starts Streaming (Flutter)
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaways
|
|
13
|
+
|
|
14
|
+
- Voice room streaming flow: construct `LiveInfo` (with `liveID`, `seatTemplate`, `seatMode`, `keepOwnerOnSeat`), call `createLive` to create the room; on success, call `openLocalMicrophone` to capture and publish audio so other users in the room can hear the anchor.
|
|
15
|
+
- `liveID` is required; setting `keepOwnerOnSeat` to `true` makes the anchor automatically take a seat upon entering (taking a seat is a prerequisite for publishing audio — only seated users can publish audio streams in the room).
|
|
16
|
+
- `seatTemplate` should be set to the voice room template `AudioSalon(n)`, where n is the maximum seat count supported by the plan or a value less than it.
|
|
17
|
+
- `seatMode` sets the seat-taking mode (e.g., `TakeSeatMode.apply` for apply-to-take-seat).
|
|
18
|
+
- `muteMicrophone` pauses publishing local audio; `unmuteMicrophone` resumes publishing local audio.
|
|
19
|
+
|
|
20
|
+
## 2. Field / API Reference
|
|
21
|
+
|
|
22
|
+
| Field / Capability | Purpose | Notes |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `LiveInfo` | Room information | Dart constructor `LiveInfo({liveID, liveName, seatTemplate, seatMode, keepOwnerOnSeat})` |
|
|
25
|
+
| `liveID` | Room ID | Required parameter for `createLive` |
|
|
26
|
+
| `liveName` | Room name | Display name of the room |
|
|
27
|
+
| `seatTemplate` | Seat layout template | Use `AudioSalon(n)` for voice rooms, where n ≤ max seats in plan |
|
|
28
|
+
| `seatMode` | Seat-taking mode | e.g., `TakeSeatMode.apply` for apply-to-take-seat |
|
|
29
|
+
| `keepOwnerOnSeat` | Auto-seat the owner | Set to `true` so the anchor automatically takes a seat upon entering |
|
|
30
|
+
| `createLive(liveInfo)` | Create room (start streaming) | Pass `LiveInfo`, returns `Future<result>` for async handling |
|
|
31
|
+
| `result.isSuccess` | Success flag | `true` means creation succeeded |
|
|
32
|
+
| `result.message` | Error message | Returns error description on failure |
|
|
33
|
+
| `openLocalMicrophone` | Capture and publish audio | Opens local microphone and publishes audio stream to the room |
|
|
34
|
+
| `muteMicrophone` | Pause audio publishing | Pauses local audio stream while microphone remains open |
|
|
35
|
+
| `unmuteMicrophone` | Resume audio publishing | Resumes local audio stream while microphone remains open |
|
|
36
|
+
|
|
37
|
+
## 3. Mechanism & Sequence
|
|
38
|
+
|
|
39
|
+
Construct `LiveInfo` (`liveID` required, `seatTemplate=AudioSalon(n)`, `seatMode` as needed, `keepOwnerOnSeat=true`) -> `await createLive(liveInfo)` -> `result.isSuccess` is `true`, anchor is auto-seated -> call `openLocalMicrophone` to capture and publish audio -> other users in the room hear the anchor.
|
|
40
|
+
|
|
41
|
+
Taking a seat is a prerequisite for streaming: `keepOwnerOnSeat=true` ensures the anchor takes a seat before publishing audio. `muteMicrophone` / `unmuteMicrophone` are used to pause/resume during streaming.
|
|
42
|
+
|
|
43
|
+
## 4. Standard Usage
|
|
44
|
+
|
|
45
|
+
1. Construct `LiveInfo`: set `liveID`, `seatTemplate`, `seatMode`, `keepOwnerOnSeat`.
|
|
46
|
+
2. Call `await _liveListStore.createLive(liveInfo)` to start streaming.
|
|
47
|
+
3. Check `result.isSuccess`; on success, call `openLocalMicrophone` to capture and publish audio.
|
|
48
|
+
4. Call `muteMicrophone` / `unmuteMicrophone` to pause/resume streaming as needed.
|
|
49
|
+
|
|
50
|
+
```dart
|
|
51
|
+
class _YourAnchorPageState extends State<YourAnchorPage> {
|
|
52
|
+
// ... 其他代码 ...
|
|
53
|
+
final String _liveID = "test_voice_room_001";
|
|
54
|
+
|
|
55
|
+
@override
|
|
56
|
+
void initState() {
|
|
57
|
+
super.initState();
|
|
58
|
+
// ... 其他代码 ...
|
|
59
|
+
|
|
60
|
+
// 开始语聊
|
|
61
|
+
_startLive();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
Future<void> _startLive() async {
|
|
65
|
+
// 1. 准备 LiveInfo 对象
|
|
66
|
+
final liveInfo = LiveInfo(
|
|
67
|
+
// 2. 设置房间 id
|
|
68
|
+
liveID: _liveID,
|
|
69
|
+
// 3. 设置房间名称
|
|
70
|
+
liveName: "test 语聊房",
|
|
71
|
+
// 4. 设置语聊房布局模板(传入 9 即代表有 9 个麦位)
|
|
72
|
+
seatTemplate: AudioSalon(9),
|
|
73
|
+
// 5. 设置上麦模式,例如申请上麦
|
|
74
|
+
seatMode: TakeSeatMode.apply,
|
|
75
|
+
// 6. 设置主播开播后自动上麦
|
|
76
|
+
keepOwnerOnSeat: true,
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
// 7. 调用 createLive 开始直播
|
|
80
|
+
final result = await _liveListStore.createLive(liveInfo);
|
|
81
|
+
|
|
82
|
+
if (result.isSuccess) {
|
|
83
|
+
debugPrint("Response startLive onSuccess");
|
|
84
|
+
// 8. 房主创建成功后默认自动上麦,此时调用 openLocalMicrophone 采集并发布音频
|
|
85
|
+
_liveSeatStore.openLocalMicrophone();
|
|
86
|
+
} else {
|
|
87
|
+
debugPrint("Response startLive onError: ${result.message}");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 5. Expected Results
|
|
94
|
+
|
|
95
|
+
- `result.isSuccess == true`: room created successfully, anchor is auto-seated.
|
|
96
|
+
- After `openLocalMicrophone`: other users in the room can hear the anchor.
|
|
97
|
+
- After `muteMicrophone`: local audio publishing is paused; after `unmuteMicrophone`: publishing resumes.
|
|
98
|
+
- If `keepOwnerOnSeat` is not set to `true`: the anchor is not auto-seated and cannot publish audio.
|
|
99
|
+
- `result.isSuccess == false`: streaming failed, `result.message` contains the error description.
|
|
100
|
+
|
|
101
|
+
## 6. Common Pitfalls
|
|
102
|
+
|
|
103
|
+
- Pitfall 1: Calling `openLocalMicrophone` without calling `createLive` first (cannot publish audio without creating a room).
|
|
104
|
+
- Pitfall 2: Not setting `keepOwnerOnSeat` to `true`, so the anchor is not seated and audio publishing does not work.
|
|
105
|
+
- Pitfall 3: Not setting `seatTemplate` or setting n beyond the plan's maximum seat count.
|
|
106
|
+
- Pitfall 4: Confusing `muteMicrophone` (pauses audio stream publishing) with closing the microphone (stops audio capture).
|
|
107
|
+
- Pitfall 5: Reusing `liveID` (it must be globally unique; otherwise creation fails).
|
|
108
|
+
- Pitfall 6: `AudioSalon(9)` is a constructor form (not an enum); `seatMode` uses `TakeSeatMode.apply` (Dart enum lowercase).
|
|
109
|
+
|
|
110
|
+
## 7. Problem Definition (retrieval hint)
|
|
111
|
+
|
|
112
|
+
A Flutter voice room anchor needs to create a room and start audio streaming in the correct order, understanding the call timing and parameter meanings of `createLive`, `openLocalMicrophone`, `muteMicrophone`, and `unmuteMicrophone`.
|
|
113
|
+
|
|
114
|
+
## 8. Alternative Queries (retrieval recall)
|
|
115
|
+
|
|
116
|
+
- How does a Flutter voice room anchor start streaming?
|
|
117
|
+
- What is the call order of `createLive` and `openLocalMicrophone` in Flutter?
|
|
118
|
+
- How does a Flutter anchor take a seat and publish audio?
|
|
119
|
+
- What does the `keepOwnerOnSeat` parameter do?
|
|
120
|
+
- How to set the `AudioSalon` template for `seatTemplate`?
|
|
121
|
+
- What is the difference between `muteMicrophone` and `unmuteMicrophone` in Flutter?
|
|
122
|
+
- How to publish audio after creating a voice room?
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Anchor Creates Room and Starts Streaming (iOS)(语聊房 / 房主 / 开播 / createLive)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [ios]
|
|
5
|
+
scope: platform_specific
|
|
6
|
+
tags: [voice room, anchor, start streaming, publish audio, createLive, openLocalMicrophone, muteMicrophone, unmuteMicrophone, LiveListStore, AudioSalon, keepOwnerOnSeat, seatMode, iOS, Swift, AtomicXCore]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Anchor Creates Room and Starts Streaming (iOS)
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaways
|
|
13
|
+
|
|
14
|
+
- Voice room streaming flow: construct `LiveInfo` (with `liveID`, `seatTemplate`, `keepOwnerOnSeat`, `seatMode`), call `createLive` to create the room; on success, call `openLocalMicrophone` to capture and publish audio so other users in the room can hear the anchor.
|
|
15
|
+
- `liveID` is required; setting `keepOwnerOnSeat` to `true` makes the anchor automatically take a seat upon entering (taking a seat is a prerequisite for publishing audio — only seated users can publish audio streams in the room).
|
|
16
|
+
- `seatTemplate` should be set to `SeatLayoutTemplate.AudioSalon(seatCount: n)`, where n is the maximum seat count supported by the plan or a value less than it.
|
|
17
|
+
- `seatMode` sets the seat-taking mode (e.g., `.apply` for apply-to-take-seat).
|
|
18
|
+
- `muteMicrophone` pauses publishing local audio; `unmuteMicrophone` resumes publishing local audio.
|
|
19
|
+
|
|
20
|
+
## 2. Field / API Reference
|
|
21
|
+
|
|
22
|
+
| Field / Capability | Purpose | Notes |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `LiveInfo` | Room information | Contains `liveID`, `liveName`, `seatTemplate`, `keepOwnerOnSeat`, `seatMode`, etc. |
|
|
25
|
+
| `liveID` | Room ID | Required parameter for `createLive` |
|
|
26
|
+
| `liveName` | Room name | Display name of the room |
|
|
27
|
+
| `seatTemplate` | Seat layout template | Use `SeatLayoutTemplate.AudioSalon(seatCount: n)` for voice rooms, where n ≤ max seats in plan |
|
|
28
|
+
| `keepOwnerOnSeat` | Auto-seat the owner | Set to `true` so the anchor automatically takes a seat upon entering |
|
|
29
|
+
| `seatMode` | Seat-taking mode | e.g., `.apply` for apply-to-take-seat |
|
|
30
|
+
| `createLive(liveInfo)` | Create room (start streaming) | Pass `LiveInfo`, returns `Result` for async handling |
|
|
31
|
+
| `openLocalMicrophone` | Capture and publish audio | Opens local microphone and publishes audio stream to the room |
|
|
32
|
+
| `muteMicrophone` | Pause audio publishing | Pauses local audio stream while microphone remains open |
|
|
33
|
+
| `unmuteMicrophone` | Resume audio publishing | Resumes local audio stream while microphone remains open |
|
|
34
|
+
|
|
35
|
+
## 3. Mechanism & Sequence
|
|
36
|
+
|
|
37
|
+
Construct `LiveInfo` (`liveID` required, `seatTemplate=AudioSalon(n)`, `keepOwnerOnSeat=true`, `seatMode` as needed) -> call `createLive` to create the room -> `case .success` callback fires, anchor is auto-seated -> call `openLocalMicrophone` to capture and publish audio -> other users in the room hear the anchor.
|
|
38
|
+
|
|
39
|
+
Taking a seat is a prerequisite for streaming: `keepOwnerOnSeat=true` ensures the anchor takes a seat before publishing audio. `muteMicrophone` / `unmuteMicrophone` are used to pause/resume during streaming.
|
|
40
|
+
|
|
41
|
+
## 4. Standard Usage
|
|
42
|
+
|
|
43
|
+
1. Construct `LiveInfo`: set `liveID`, `seatTemplate`, `keepOwnerOnSeat`, `seatMode`.
|
|
44
|
+
2. Call `createLive(liveInfo)` and handle success/failure in `switch result`.
|
|
45
|
+
3. In `case .success`, call `openLocalMicrophone` to capture and publish audio.
|
|
46
|
+
4. Call `muteMicrophone` / `unmuteMicrophone` to pause/resume streaming as needed.
|
|
47
|
+
|
|
48
|
+
```swift
|
|
49
|
+
import UIKit
|
|
50
|
+
import AtomicXCore
|
|
51
|
+
|
|
52
|
+
class YourAnchorViewController: UIViewController {
|
|
53
|
+
// ... 其他代码 ...
|
|
54
|
+
private let liveID = "test_voice_room_001"
|
|
55
|
+
|
|
56
|
+
override func viewDidLoad() {
|
|
57
|
+
super.viewDidLoad()
|
|
58
|
+
// ... 其他代码 ...
|
|
59
|
+
|
|
60
|
+
// 开始语聊
|
|
61
|
+
startLive()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private func startLive() {
|
|
65
|
+
// 1. 准备 LiveInfo 对象
|
|
66
|
+
var liveInfo = LiveInfo()
|
|
67
|
+
|
|
68
|
+
// 2. 设置房间 id
|
|
69
|
+
liveInfo.liveID = liveID
|
|
70
|
+
// 3. 设置房间名称
|
|
71
|
+
liveInfo.liveName = "test 语聊房"
|
|
72
|
+
// 4. 设置语聊房布局模板(传入 9 即代表有 9 个麦位)
|
|
73
|
+
liveInfo.seatTemplate = SeatLayoutTemplate.AudioSalon(seatCount: 9)
|
|
74
|
+
|
|
75
|
+
// 5. 设置主播开播后自动上麦
|
|
76
|
+
liveInfo.keepOwnerOnSeat = true
|
|
77
|
+
|
|
78
|
+
// 6. 设置上麦模式,例如申请上麦
|
|
79
|
+
liveInfo.seatMode = .apply
|
|
80
|
+
|
|
81
|
+
// 7. 调用 createLive 开始直播
|
|
82
|
+
liveListStore.createLive(liveInfo) { [weak self] result in
|
|
83
|
+
guard let self = self else { return }
|
|
84
|
+
switch result {
|
|
85
|
+
case .success(let liveInfo):
|
|
86
|
+
print("Response startLive onSuccess")
|
|
87
|
+
// 8. 房主创建成功后默认自动上麦,此时调用 openLocalMicrophone 采集并发布音频
|
|
88
|
+
liveSeatStore.openLocalMicrophone(completion: nil)
|
|
89
|
+
case .failure(let errorInfo):
|
|
90
|
+
print("Response startLive onError: \(errorInfo.message)")
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## 5. Expected Results
|
|
98
|
+
|
|
99
|
+
- `case .success` callback fires: room created successfully, anchor is auto-seated.
|
|
100
|
+
- After `openLocalMicrophone`: other users in the room can hear the anchor.
|
|
101
|
+
- After `muteMicrophone`: local audio publishing is paused; after `unmuteMicrophone`: publishing resumes.
|
|
102
|
+
- If `keepOwnerOnSeat` is not set to `true`: the anchor is not auto-seated and cannot publish audio.
|
|
103
|
+
- `case .failure(let errorInfo)` callback fires: streaming failed, `errorInfo.message` contains the error description.
|
|
104
|
+
|
|
105
|
+
## 6. Common Pitfalls
|
|
106
|
+
|
|
107
|
+
- Pitfall 1: Calling `openLocalMicrophone` without calling `createLive` first (cannot publish audio without creating a room).
|
|
108
|
+
- Pitfall 2: Not setting `keepOwnerOnSeat` to `true`, so the anchor is not seated and audio publishing does not work.
|
|
109
|
+
- Pitfall 3: Not setting `seatTemplate` or setting `seatCount` beyond the plan's maximum seat count.
|
|
110
|
+
- Pitfall 4: Confusing `muteMicrophone` (pauses audio stream publishing) with closing the microphone (stops audio capture).
|
|
111
|
+
- Pitfall 5: Reusing `liveID` (it must be globally unique; otherwise creation fails).
|
|
112
|
+
- Pitfall 6: Forgetting `[weak self]` (to avoid retain cycles causing memory leaks); both `success` and `failure` branches of `switch result` must be handled.
|
|
113
|
+
|
|
114
|
+
## 7. Problem Definition (retrieval hint)
|
|
115
|
+
|
|
116
|
+
An iOS voice room anchor needs to create a room and start audio streaming in the correct order, understanding the call timing and parameter meanings of `createLive`, `openLocalMicrophone`, `muteMicrophone`, and `unmuteMicrophone`.
|
|
117
|
+
|
|
118
|
+
## 8. Alternative Queries (retrieval recall)
|
|
119
|
+
|
|
120
|
+
- How does an iOS voice room anchor start streaming?
|
|
121
|
+
- What is the call order of `createLive` and `openLocalMicrophone` on iOS?
|
|
122
|
+
- How does an iOS anchor take a seat and publish audio?
|
|
123
|
+
- What does the `keepOwnerOnSeat` parameter do?
|
|
124
|
+
- How to set the `AudioSalon` template for `seatTemplate`?
|
|
125
|
+
- What is the difference between `muteMicrophone` and `unmuteMicrophone` on iOS?
|
|
126
|
+
- How to publish audio after creating a voice room?
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
`AudioEffectStore` provides a complete set of audio effect management APIs, including voice changer effects, reverb effects, and ear monitor functionality. Through this class, anchors can adjust their voice effects in real-time during live streaming to enhance the experience.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use the **AudioEffectStore.shared** singleton to get the `AudioEffectStore` instance. The set effects will automatically become invalid after leaving the room, and need to be set again for the next room entry.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Audio effect state updates are delivered through the **audioEffectState** publisher. Subscribe to it to receive real-time updates about voice changer, reverb, and ear monitor states.
|
|
13
11
|
>
|
|
14
12
|
|
|
15
13
|
> **Warning:**
|
|
16
|
-
>
|
|
17
14
|
> Due to the very high hardware latency of Bluetooth earphones, the ear monitor feature cannot be enabled when the anchor is wearing Bluetooth earphones. Please prompt the anchor to wear wired earphones in the user interface.
|
|
18
15
|
>
|
|
19
16
|
|
|
@@ -78,7 +75,6 @@ Call after entering the room and when voice changer effect is needed.
|
|
|
78
75
|
**Notes**
|
|
79
76
|
|
|
80
77
|
> **Note:**
|
|
81
|
-
>
|
|
82
78
|
> The set effect will automatically become invalid after leaving the room. If you need the corresponding effect for the next room entry, you need to call this interface again to set it.
|
|
83
79
|
>
|
|
84
80
|
|
|
@@ -112,7 +108,6 @@ Call after entering the room and when reverb effect is needed.
|
|
|
112
108
|
**Notes**
|
|
113
109
|
|
|
114
110
|
> **Note:**
|
|
115
|
-
>
|
|
116
111
|
> The set effect will automatically become invalid after leaving the room. If you need the corresponding effect for the next room entry, you need to call this interface again to set it.
|
|
117
112
|
>
|
|
118
113
|
|
|
@@ -148,7 +143,6 @@ Call after entering the room and when the anchor is wearing wired earphones.
|
|
|
148
143
|
**Notes**
|
|
149
144
|
|
|
150
145
|
> **Warning:**
|
|
151
|
-
>
|
|
152
146
|
> Due to the very high hardware latency of Bluetooth earphones, this effect cannot be enabled when the anchor is wearing Bluetooth earphones. Please try to prompt the anchor to wear wired earphones in the user interface.
|
|
153
147
|
>
|
|
154
148
|
|
|
@@ -178,7 +172,6 @@ Call after enabling the ear monitor feature.
|
|
|
178
172
|
**Notes**
|
|
179
173
|
|
|
180
174
|
> **Note:**
|
|
181
|
-
>
|
|
182
175
|
> If the volume is still too low after setting it to 100, you can set the volume to a maximum of 150, but a volume exceeding 100 may cause distortion, please operate with caution.
|
|
183
176
|
>
|
|
184
177
|
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
`BarrageStore` provides a complete set of barrage management APIs, including sending text barrages, sending custom barrages, and adding local tip messages. Through this class, you can implement barrage interaction functionality in live rooms.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use the **BarrageStore.create** factory method to create a `BarrageStore` instance, which requires a valid live room ID.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Barrage state updates are delivered through the **barrageState** publisher. Subscribe to it to receive real-time updates of barrage data in the room.
|
|
13
11
|
>
|
|
14
12
|
|
|
@@ -117,7 +115,6 @@ Supported since version 3.5.
|
|
|
117
115
|
**Notes**
|
|
118
116
|
|
|
119
117
|
> **Note:**
|
|
120
|
-
>
|
|
121
118
|
> This message is only displayed locally and will not be sent to other users through the network.
|
|
122
119
|
>
|
|
123
120
|
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
PK feature enables real-time interactive battles between hosts. `BattleStore` provides a comprehensive set of APIs to manage the entire PK lifecycle.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Always use the factory method **BattleStore.create** with a valid live room ID to create a `BattleStore` instance. Do not attempt to initialize directly.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> PK state updates are delivered through the **battleState** publisher. Subscribe to it to receive real-time updates about PK information, participating users, and scores.
|
|
13
11
|
>
|
|
14
12
|
|
|
15
13
|
> **Warning:**
|
|
16
|
-
>
|
|
17
14
|
> If a PK request does not receive a response within the specified timeout, a timeout event will be triggered. Always handle timeout scenarios in the UI.
|
|
18
15
|
>
|
|
19
16
|
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
Co-guest feature enables real-time interaction between hosts and audience members through a seat-based system. `CoGuestStore` provides a comprehensive set of APIs to manage the entire co-guest lifecycle.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Always use the factory method **CoGuestStore.create** with a valid live room ID to create a `CoGuestStore` instance. Do not attempt to initialize directly.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Co-guest state updates are delivered through the **coGuestState** publisher. Subscribe to it to receive real-time updates about connected users, invitations and applications.
|
|
13
11
|
>
|
|
14
12
|
|
|
15
13
|
> **Warning:**
|
|
16
|
-
>
|
|
17
14
|
> If a co-guest request does not receive a response within the specified timeout, an event with `NoResponseReason.timeout` will be triggered. Always handle timeout scenarios in your UI.
|
|
18
15
|
>
|
|
19
16
|
|
|
@@ -169,7 +166,6 @@ Supported since version 3.5.
|
|
|
169
166
|
**Notes**
|
|
170
167
|
|
|
171
168
|
> **Note:**
|
|
172
|
-
>
|
|
173
169
|
> If no host responds within the timeout, {ref2} event with **NoResponseReason.TIMEOUT** will be triggered.
|
|
174
170
|
>
|
|
175
171
|
|
|
@@ -200,7 +196,6 @@ Supported since version 3.5.
|
|
|
200
196
|
**Notes**
|
|
201
197
|
|
|
202
198
|
> **Note:**
|
|
203
|
-
>
|
|
204
199
|
> If the application has already been processed by a host, the cancellation may have no effect.
|
|
205
200
|
>
|
|
206
201
|
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
Cross-room connection feature allows hosts from different live rooms to interact in real-time. `CoHostStore` provides a comprehensive set of APIs to manage the entire cross-room connection lifecycle.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Always use the factory method **CoHostStore.create** with a valid live room ID to create a `CoHostStore` instance. Do not attempt to initialize directly.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Connection state updates are delivered through the **coHostState** publisher. Subscribe to it to receive real-time updates about connection status, connected hosts, invitations and applications.
|
|
13
11
|
>
|
|
14
12
|
|
|
15
13
|
> **Warning:**
|
|
16
|
-
>
|
|
17
14
|
> If a connection request does not receive a response within the specified timeout, the timeout event will be triggered. Always handle timeout scenarios in your UI.
|
|
18
15
|
>
|
|
19
16
|
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
`DeviceStore` provides a comprehensive set of APIs to manage audio and video devices, including microphone, camera and screen sharing features.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use **DeviceStore.shared** singleton to get the `DeviceStore` instance. Do not attempt to initialize directly.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Device state updates are delivered through the **deviceState** publisher. Subscribe to it to receive real-time updates about microphone, camera, network and other states.
|
|
13
11
|
>
|
|
14
12
|
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
`GiftStore` provides a complete set of gift management APIs, including sending gifts, refreshing gift lists, setting language, and listening to gift events. Through this class, gift interaction features can be implemented in live rooms.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use the **GiftStore.create** factory method to create a `GiftStore` instance, passing a valid live room ID.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Gift state updates are delivered through the **giftState** publisher. Subscribe to it to receive real-time updates of gift data in the room.
|
|
13
11
|
>
|
|
14
12
|
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
`LikeStore` provides a complete set of like management APIs, including sending likes, listening to like events, and getting like states. Through this class, you can implement like interaction features in live rooms.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use the **LikeStore.create** factory method to create a `LikeStore` instance, which requires a valid live room ID.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Like state updates are delivered through the **likeState** publisher. Subscribe to it to receive real-time updates of like data in the room.
|
|
13
11
|
>
|
|
14
12
|
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
`LiveAudienceStore` provides a complete set of audience management APIs, including fetching audience list, setting administrators, kicking users, muting, etc. Through this class, you can implement audience management functions in live rooms.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use the **LiveAudienceStore.create** factory method to create a `LiveAudienceStore` instance, which requires a valid live room ID.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Audience state updates are delivered through the **liveAudienceState** publisher. Subscribe to it to receive real-time updates of audience data in the room.
|
|
13
11
|
>
|
|
14
12
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
`LiveCoreView` provides view container for live streaming push and playback, supporting multi-person co-guest, PK and other features. Through this component, video rendering and interaction in live rooms can be implemented.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Before using, you need to call **setLiveID** to set the live room ID first.
|
|
8
7
|
>
|
|
9
8
|
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
`LiveSeatStore` provides a complete set of seat management APIs, including taking seat, leaving seat, locking seat, unlocking seat, kicking user off seat, remote device control, etc. Through this class, seat management functionality can be implemented in the live room.
|
|
4
4
|
|
|
5
5
|
> **Important:**
|
|
6
|
-
>
|
|
7
6
|
> Use the **LiveSeatStore.create** factory method to create a `LiveSeatStore` instance, passing a valid live room ID.
|
|
8
7
|
>
|
|
9
8
|
|
|
10
9
|
> **Note:**
|
|
11
|
-
>
|
|
12
10
|
> Seat state updates are delivered through the **liveSeatState** publisher. Subscribe to it to receive real-time updates of seat data in the room.
|
|
13
11
|
>
|
|
14
12
|
|