@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
|
@@ -4,10 +4,6 @@ The `ConversationList` component provides the main conversation list functionali
|
|
|
4
4
|
|
|
5
5
|
This guide covers basic usage, component customization, flexible composition, and a complete list of component props.
|
|
6
6
|
|
|
7
|
-
|**Conversation List**|**Conversation Actions**|**Conversation Search**|**Create Conversation**|
|
|
8
|
-
|---------|---------|---------|---------|
|
|
9
|
-
|||||
|
|
10
|
-
|
|
11
7
|
## Component Structure
|
|
12
8
|
|
|
13
9
|
The `ConversationList` component includes the following:
|
|
@@ -46,17 +42,15 @@ Control the display of conversation search, conversation creation, and conversat
|
|
|
46
42
|
``` typescript
|
|
47
43
|
<ConversationList enableSearch={false} />
|
|
48
44
|
```
|
|
45
|
+
|
|
49
46
|
``` typescript
|
|
50
47
|
<ConversationList enableCreate={false} />
|
|
51
48
|
```
|
|
49
|
+
|
|
52
50
|
``` typescript
|
|
53
51
|
<ConversationList enableActions={false} />
|
|
54
52
|
```
|
|
55
53
|
|
|
56
|
-
|`enableSearch={false}`|`enableCreate={false}`|`enableActions={false}`|
|
|
57
|
-
|---------|---------|---------|
|
|
58
|
-
||||
|
|
59
|
-
|
|
60
54
|
### Data Filtering and Sorting
|
|
61
55
|
|
|
62
56
|
The `ConversationList` component provides `filterConversation` and `sortConversation` properties to filter and sort conversation list data.
|
|
@@ -103,7 +97,7 @@ By using the `filter` and `sort` properties, you can efficiently filter and sort
|
|
|
103
97
|
|
|
104
98
|
Use actionsConfig to control the basic functionality of `ConversationActions`.
|
|
105
99
|
|
|
106
|
-
For additional customization
|
|
100
|
+
For additional customization.
|
|
107
101
|
``` typescript
|
|
108
102
|
import { ConversationList } from '@tencentcloud/chat-uikit-react';
|
|
109
103
|
import type { ConversationInfo } from '@tencentcloud/chat-uikit-react';
|
|
@@ -122,10 +116,6 @@ import type { ConversationInfo } from '@tencentcloud/chat-uikit-react';
|
|
|
122
116
|
/>
|
|
123
117
|
```
|
|
124
118
|
|
|
125
|
-
|`enablePin: false`|`enableDelete: false`|`enableMute: false`|`customConversationActions`|
|
|
126
|
-
|---------|---------|---------|---------|
|
|
127
|
-
|||||
|
|
128
|
-
|
|
129
119
|
### Custom Placeholder
|
|
130
120
|
|
|
131
121
|
Customize the list display for different states by passing `PlaceholderEmptyList`, `PlaceholderLoading`, and `PlaceholderLoadError`.
|
|
@@ -176,10 +166,6 @@ const CustomConversationListHeader = (props) => {
|
|
|
176
166
|
|
|
177
167
|
The following example implements conversation grouping, categorizing by All, Unread, C2C, and Group. Clicking each group button applies a different filter.
|
|
178
168
|
|
|
179
|
-
|**Before**|**After**|
|
|
180
|
-
|---------|---------|
|
|
181
|
-
|||
|
|
182
|
-
|
|
183
169
|
``` typescript
|
|
184
170
|
import { useState } from 'react';
|
|
185
171
|
import { ConversationList, UIKitProvider, ConversationInfo } from '@tencentcloud/chat-uikit-react';
|
|
@@ -216,6 +202,7 @@ const App = () => {
|
|
|
216
202
|
);
|
|
217
203
|
};
|
|
218
204
|
```
|
|
205
|
+
|
|
219
206
|
``` scss
|
|
220
207
|
.conversation-group-wrapper {
|
|
221
208
|
display: flex;
|
|
@@ -264,8 +251,6 @@ By default, it displays the current conversation list data (`filteredAndSortedCo
|
|
|
264
251
|
|
|
265
252
|
#### Basic Customization
|
|
266
253
|
|
|
267
|
-
The `List` component manages different UI states as shown below. State transitions are handled internally within `ConversationList`.
|
|
268
|
-
|
|
269
254
|
You can also control the component state by passing custom `empty`, `loading`, or `error` props.
|
|
270
255
|
``` typescript
|
|
271
256
|
import { ConversationList, ConversationListContent } from '@tencentcloud/chat-uikit-react';
|
|
@@ -277,27 +262,20 @@ const CustomConversationListContent = (props) => {
|
|
|
277
262
|
<ConversationList List={CustomConversationListContent} />
|
|
278
263
|
```
|
|
279
264
|
|
|
280
|
-
|`default`|`empty={true}`|`loading={true}`|`error={true}`|
|
|
281
|
-
|---------|---------|---------|---------|
|
|
282
|
-
|||||
|
|
283
|
-
|
|
284
265
|
### Custom ConversationPreview
|
|
285
266
|
|
|
286
|
-
For details, see the ConversationPreview section.
|
|
287
267
|
``` typescript
|
|
288
268
|
<ConversationList ConversationPreview={CustomConversationPreview} />
|
|
289
269
|
```
|
|
290
270
|
|
|
291
271
|
### Custom ConversationActions
|
|
292
272
|
|
|
293
|
-
For details, see the ConversationActions section.
|
|
294
273
|
``` typescript
|
|
295
274
|
<ConversationList ConversationActions={CustomConversationActions} />
|
|
296
275
|
```
|
|
297
276
|
|
|
298
277
|
### Custom ConversationSearch
|
|
299
278
|
|
|
300
|
-
For details, see the ConversationSearch section.
|
|
301
279
|
``` typescript
|
|
302
280
|
<ConversationList ConversationSearch={CustomConversationSearch} />
|
|
303
281
|
```
|
|
@@ -27,8 +27,6 @@ Meanwhile, you can also use the `onConversationSelect` function to define select
|
|
|
27
27
|
|
|
28
28
|
### Discord-Like Style
|
|
29
29
|
|
|
30
|
-
Discord is a popular chat application, similar to Skype or Telegram. The message content in Discord is as shown below:
|
|
31
|
-
|
|
32
30
|
By customizing the `ConversationPreview` layout, features, and style, we can quickly achieve a Discord-like effect.
|
|
33
31
|
|
|
34
32
|
【React】
|
|
@@ -94,8 +92,4 @@ const App = () => {
|
|
|
94
92
|
|
|
95
93
|
`ConversationListPreview` effect as follows after customization:
|
|
96
94
|
|
|
97
|
-
|**Before Modification**|**Modified**|
|
|
98
|
-
|---------|---------|
|
|
99
|
-
|||
|
|
100
|
-
|
|
101
95
|
###
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Search is a complete search solution with a full set of components, including search bar, result display, advanced search, and other features. It is suitable for user, group, and message search in instant messaging, online meeting, and online education scenarios.
|
|
4
4
|
|
|
5
5
|
> **Note:**
|
|
6
|
-
>
|
|
7
6
|
> Note: This feature belongs to VAS. You need to purchase cloud search plugin. Please click [purchase](https://console.trtc.io/chat/plugin/TUICloudSearch).
|
|
8
7
|
>
|
|
9
8
|
|
|
@@ -167,6 +167,7 @@ const handleClick = () => {
|
|
|
167
167
|
</style>
|
|
168
168
|
|
|
169
169
|
```
|
|
170
|
+
|
|
170
171
|
``` typescript
|
|
171
172
|
<template>
|
|
172
173
|
<ContactList :ContactItem="CustomContactItem" />
|
|
@@ -177,9 +178,6 @@ import { ContactList } from '@tencentcloud/chat-uikit-vue3';
|
|
|
177
178
|
import CustomContactItem from './CustomContactItem.vue';
|
|
178
179
|
</script>
|
|
179
180
|
```
|
|
180
|
-
| Before | After |
|
|
181
|
-
| --- | --- |
|
|
182
|
-
| | |
|
|
183
181
|
|
|
184
182
|
### Custom Contact Detail Action Toggle
|
|
185
183
|
|
|
@@ -191,9 +189,6 @@ Use the `showActions` prop to control whether action buttons are shown on the co
|
|
|
191
189
|
/>
|
|
192
190
|
</template>
|
|
193
191
|
```
|
|
194
|
-
| Before | After |
|
|
195
|
-
| --- | --- |
|
|
196
|
-
| | |
|
|
197
192
|
|
|
198
193
|
### Custom Contact Detail Empty State
|
|
199
194
|
|
|
@@ -205,6 +200,7 @@ When no contact is selected, you can customize the empty state component.
|
|
|
205
200
|
</div>
|
|
206
201
|
</template>
|
|
207
202
|
```
|
|
203
|
+
|
|
208
204
|
``` typescript
|
|
209
205
|
<template>
|
|
210
206
|
<ContactInfo
|
|
@@ -259,6 +255,7 @@ defineProps<{
|
|
|
259
255
|
</style>
|
|
260
256
|
|
|
261
257
|
```
|
|
258
|
+
|
|
262
259
|
``` typescript
|
|
263
260
|
<template>
|
|
264
261
|
<ContactInfo
|
|
@@ -272,6 +269,3 @@ import type { FriendInfoProps, GroupInfoProps } from '@tencentcloud/chat-uikit-v
|
|
|
272
269
|
import CustomFriendInfo from './CustomFriendInfo.vue';
|
|
273
270
|
</script>
|
|
274
271
|
```
|
|
275
|
-
| Before | After |
|
|
276
|
-
| --- | --- |
|
|
277
|
-
| | |
|
|
@@ -131,9 +131,6 @@ Use `enablePin`, `enableDelete`, `enableMute`, and `enableMarkUnread` to control
|
|
|
131
131
|
<ConversationActions :enableMarkUnread="false" :conversation="conversation" />
|
|
132
132
|
</template>
|
|
133
133
|
```
|
|
134
|
-
| <code>enablePin: false</code> | <code>enableDelete: false</code> | <code>enableMute: false</code> | enableMarkUnread="false" |
|
|
135
|
-
| --- | --- | --- | --- |
|
|
136
|
-
| | | | |
|
|
137
134
|
|
|
138
135
|
### Event handlers
|
|
139
136
|
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
The `ConversationList` component renders the conversation list and supports search, creation, pinning, deletion, and other conversation actions.
|
|
4
4
|
|
|
5
|
-
|**Conversation List**|**Conversation Actions**|**Create Conversation**|
|
|
6
|
-
|---------|---------|---------|
|
|
7
|
-
||||
|
|
8
|
-
|
|
9
5
|
## Component Structure
|
|
10
6
|
|
|
11
7
|
The `ConversationList` component includes the following:
|
|
@@ -43,15 +39,14 @@ Use `enableSearch`, `enableCreate`, and `enableActions` to control whether conve
|
|
|
43
39
|
``` typescript
|
|
44
40
|
<ConversationList :enableSearch="false" />
|
|
45
41
|
```
|
|
42
|
+
|
|
46
43
|
``` typescript
|
|
47
44
|
<ConversationList :enableCreate="false" />
|
|
48
45
|
```
|
|
46
|
+
|
|
49
47
|
``` typescript
|
|
50
48
|
<ConversationList :enableActions="false" />
|
|
51
49
|
```
|
|
52
|
-
| <code>enableSearch="false"</code> | <code>enableCreate="false"</code> | <code>enableActions="false"</code> |
|
|
53
|
-
| --- | --- | --- |
|
|
54
|
-
| | | |
|
|
55
50
|
|
|
56
51
|
### Data Filtering and Sorting
|
|
57
52
|
|
|
@@ -126,9 +121,6 @@ import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
|
126
121
|
import type { ConversationInfo } from '@tencentcloud/chat-uikit-vue3';
|
|
127
122
|
</script>
|
|
128
123
|
```
|
|
129
|
-
| <code>enablePin: false</code> | <code>enableDelete: false</code> | <code>enableMute: false</code> | <code>customConversationActions</code> |
|
|
130
|
-
| --- | --- | --- | --- |
|
|
131
|
-
| | | | |
|
|
132
124
|
|
|
133
125
|
### Custom Placeholder
|
|
134
126
|
|
|
@@ -300,9 +292,6 @@ const handleFilterClick = (filterType: FilterType) => {
|
|
|
300
292
|
</style>
|
|
301
293
|
|
|
302
294
|
```
|
|
303
|
-
| **Before** | **After** |
|
|
304
|
-
| --- | --- |
|
|
305
|
-
| | |
|
|
306
295
|
|
|
307
296
|
## Props
|
|
308
297
|
|
|
@@ -27,6 +27,7 @@ interface Props {
|
|
|
27
27
|
const props = withDefaults(defineProps<Props>(), {});
|
|
28
28
|
</script>
|
|
29
29
|
```
|
|
30
|
+
|
|
30
31
|
``` typescript
|
|
31
32
|
<template>
|
|
32
33
|
<ConversationList :Preview="CustomConversationPreview" />
|
|
@@ -199,6 +200,7 @@ const handleSelectConversation = () => {
|
|
|
199
200
|
</style>
|
|
200
201
|
|
|
201
202
|
```
|
|
203
|
+
|
|
202
204
|
``` typescript
|
|
203
205
|
<template>
|
|
204
206
|
<ConversationList :Preview="CustomConversationPreview" />
|
|
@@ -211,6 +213,3 @@ import CustomConversationPreview from './CustomConversationPreview.vue';
|
|
|
211
213
|
```
|
|
212
214
|
|
|
213
215
|
After customizing `ConversationListPreview`, the result looks like this:
|
|
214
|
-
| <strong>Before</strong> | <strong>After</strong> |
|
|
215
|
-
| --- | --- |
|
|
216
|
-
| | |
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Search is a complete search solution with a full set of components, including search bar, result display, advanced search, and more. It is suitable for user, group, and message search in instant messaging, online meeting, and online education scenarios.
|
|
4
4
|
|
|
5
|
-
> **Note:**
|
|
6
|
-
>
|
|
7
|
-
|
|
8
5
|
> This feature is a value-added service. You need to purchase the cloud search plugin. Click [Purchase](https://cloud.tencent.com/document/product/269/120945).
|
|
9
6
|
>
|
|
10
7
|
|
|
@@ -204,6 +201,7 @@ const handleClear = () => {
|
|
|
204
201
|
</style>
|
|
205
202
|
|
|
206
203
|
```
|
|
204
|
+
|
|
207
205
|
``` typescript
|
|
208
206
|
<template>
|
|
209
207
|
<Search :SearchBar="CustomSearchBar" />
|
|
@@ -394,6 +392,7 @@ const handleResultClick = (item: SearchResultItemType) => {
|
|
|
394
392
|
</style>
|
|
395
393
|
|
|
396
394
|
```
|
|
395
|
+
|
|
397
396
|
``` typescript
|
|
398
397
|
<template>
|
|
399
398
|
<Search :SearchResults="CustomSearchResults" />
|
|
@@ -548,6 +547,7 @@ const handleSearchTypeChange = (type: SearchType) => {
|
|
|
548
547
|
</style>
|
|
549
548
|
|
|
550
549
|
```
|
|
550
|
+
|
|
551
551
|
``` typescript
|
|
552
552
|
<template>
|
|
553
553
|
<Search :SearchAdvanced="CustomSearchAdvanced" />
|
|
@@ -708,6 +708,7 @@ const formatTime = (timestamp: number) => {
|
|
|
708
708
|
}
|
|
709
709
|
</style>
|
|
710
710
|
```
|
|
711
|
+
|
|
711
712
|
``` typescript
|
|
712
713
|
<template>
|
|
713
714
|
<Search :SearchResultItem="CustomSearchItem" />
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
| Text message (createTextMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
22
22
|
| Group @ message (createTextAtMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
23
23
|
| Image message (createImageMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
24
|
-
|
|
|
24
|
+
| Audio message (createAudioMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
25
25
|
| Video message (createVideoMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
26
26
|
| File message (createFileMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
27
27
|
| Custom message (createCustomMessage → sendMessage) | `https://trtc.io/document/47993` |
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Anchor Creates Room and Starts Streaming (Android)(语聊房 / 房主 / 开播 / createLive)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [android]
|
|
5
|
+
scope: platform_specific
|
|
6
|
+
tags: [voice room, anchor, start streaming, publish audio, createLive, openLocalMicrophone, muteMicrophone, unmuteMicrophone, LiveListStore, AudioSalon, keepOwnerOnSeat, seatMode, TakeSeatMode, Android]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Anchor Creates Room and Starts Streaming (Android)
|
|
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 — it is the unique identifier of the live room.
|
|
16
|
+
- Setting `keepOwnerOnSeat` to `true` makes the anchor automatically take a seat upon entering the room (taking a seat is a prerequisite for publishing audio — only seated users can publish audio streams in the room).
|
|
17
|
+
- `seatTemplate` should be set to `SeatLayoutTemplate.AudioSalon(n)`, where n is the maximum seat count supported by the plan or a value less than it.
|
|
18
|
+
- `seatMode` sets the seat-taking mode (e.g., `TakeSeatMode.APPLY` for apply-to-take-seat).
|
|
19
|
+
- `muteMicrophone` pauses publishing local audio; `unmuteMicrophone` resumes publishing local audio.
|
|
20
|
+
|
|
21
|
+
## 2. Field / API Reference
|
|
22
|
+
|
|
23
|
+
| Field / Capability | Purpose | Notes |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `LiveInfo` | Room information | Contains `liveID`, `liveName`, `seatTemplate`, `keepOwnerOnSeat`, `seatMode`, etc. |
|
|
26
|
+
| `liveID` | Room ID | Required parameter for `createLive` |
|
|
27
|
+
| `liveName` | Room name | Display name of the room |
|
|
28
|
+
| `seatTemplate` | Seat layout template | Use `SeatLayoutTemplate.AudioSalon(seatCount = n)` for voice rooms, where n ≤ max seats in plan |
|
|
29
|
+
| `keepOwnerOnSeat` | Auto-seat the owner | Set to `true` so the anchor automatically takes a seat upon entering |
|
|
30
|
+
| `seatMode` | Seat-taking mode | e.g., `TakeSeatMode.APPLY` for apply-to-take-seat |
|
|
31
|
+
| `createLive(liveInfo, callback)` | Create room (start streaming) | Pass `LiveInfo` and `LiveInfoCompletionHandler` callback |
|
|
32
|
+
| `openLocalMicrophone` | Capture and publish audio | Opens local microphone and publishes audio stream to the room |
|
|
33
|
+
| `muteMicrophone` | Pause audio publishing | Pauses local audio stream while microphone remains open |
|
|
34
|
+
| `unmuteMicrophone` | Resume audio publishing | Resumes local audio stream while microphone remains open |
|
|
35
|
+
|
|
36
|
+
## 3. Mechanism & Sequence
|
|
37
|
+
|
|
38
|
+
Construct `LiveInfo` (`liveID` required, `seatTemplate=AudioSalon(n)`, `keepOwnerOnSeat=true`, `seatMode` as needed) -> call `createLive` to create the room -> `onSuccess` callback fires, anchor is auto-seated -> call `openLocalMicrophone` to capture and publish audio -> other users in the room hear the anchor.
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
## 4. Standard Usage
|
|
43
|
+
|
|
44
|
+
1. Construct `LiveInfo`: set `liveID`, `seatTemplate`, `keepOwnerOnSeat`, `seatMode`.
|
|
45
|
+
2. Implement `LiveInfoCompletionHandler` and call `createLive` to start streaming.
|
|
46
|
+
3. In `onSuccess` callback, call `openLocalMicrophone` to capture and publish audio.
|
|
47
|
+
4. Call `muteMicrophone` / `unmuteMicrophone` to pause/resume streaming as needed.
|
|
48
|
+
|
|
49
|
+
```kotlin
|
|
50
|
+
import android.util.Log
|
|
51
|
+
import androidx.appcompat.app.AppCompatActivity
|
|
52
|
+
import io.trtc.tuikit.atomicxcore.api.live.LiveInfo
|
|
53
|
+
import io.trtc.tuikit.atomicxcore.api.live.LiveInfoCompletionHandler
|
|
54
|
+
import io.trtc.tuikit.atomicxcore.api.live.TakeSeatMode
|
|
55
|
+
|
|
56
|
+
class YourAnchorActivity : AppCompatActivity() {
|
|
57
|
+
// ... 其他代码 ...
|
|
58
|
+
|
|
59
|
+
private fun startLive() {
|
|
60
|
+
val liveInfo = LiveInfo().apply {
|
|
61
|
+
// 1. 设置房间基础信息
|
|
62
|
+
liveID = this@YourAnchorActivity.liveID
|
|
63
|
+
liveName = "test 语聊房"
|
|
64
|
+
|
|
65
|
+
// 2. 设置语聊房麦位模板,seatCount 传入所需麦位数(≤ 套餐最大麦位数)
|
|
66
|
+
seatTemplate = SeatLayoutTemplate.AudioSalon(seatCount = 9)
|
|
67
|
+
|
|
68
|
+
// 3. 主播开播后自动上麦(上麦后才能推音频流)
|
|
69
|
+
keepOwnerOnSeat = true
|
|
70
|
+
|
|
71
|
+
// 4. 设置上麦模式(例如申请上麦)
|
|
72
|
+
seatMode = TakeSeatMode.APPLY
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 5. 调用 createLive 创建房间(开播)
|
|
76
|
+
liveListStore.createLive(liveInfo, object : LiveInfoCompletionHandler {
|
|
77
|
+
override fun onFailure(code: Int, desc: String) {
|
|
78
|
+
Log.e("Live", "Response startLive onError: $desc")
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
override fun onSuccess(liveInfo: LiveInfo) {
|
|
82
|
+
Log.d("Live", "Response startLive onSuccess")
|
|
83
|
+
// 6. 房主创建成功后默认自动上麦,此时调用 openLocalMicrophone 采集并发布音频
|
|
84
|
+
liveSeatStore.openLocalMicrophone(null)
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 5. Expected Results
|
|
92
|
+
|
|
93
|
+
- `onSuccess` callback fires: room created successfully, anchor is auto-seated.
|
|
94
|
+
- After `openLocalMicrophone`: other users in the room can hear the anchor.
|
|
95
|
+
- After `muteMicrophone`: local audio publishing is paused; after `unmuteMicrophone`: publishing resumes.
|
|
96
|
+
- If `keepOwnerOnSeat` is not set to `true`: the anchor is not auto-seated and cannot publish audio.
|
|
97
|
+
- `onFailure(code, desc)` callback fires: streaming failed, `code` is the error code, `desc` is the error description.
|
|
98
|
+
|
|
99
|
+
## 6. Common Pitfalls
|
|
100
|
+
|
|
101
|
+
- Pitfall 1: Calling `openLocalMicrophone` without calling `createLive` first (cannot publish audio without creating a room).
|
|
102
|
+
- Pitfall 2: Not setting `keepOwnerOnSeat` to `true`, so the anchor is not seated and audio publishing does not work.
|
|
103
|
+
- Pitfall 3: Not setting `seatTemplate` or setting `seatCount` beyond the plan's maximum seat count.
|
|
104
|
+
- Pitfall 4: Confusing `muteMicrophone` (pauses audio stream publishing) with closing the microphone (stops audio capture).
|
|
105
|
+
- Pitfall 5: Reusing `liveID` (it must be globally unique; otherwise creation fails).
|
|
106
|
+
- Pitfall 6: Confusing `onSuccess` and `onFailure` callbacks (both branches require defensive handling).
|
|
107
|
+
|
|
108
|
+
## 7. Problem Definition (retrieval hint)
|
|
109
|
+
|
|
110
|
+
An Android 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`.
|
|
111
|
+
|
|
112
|
+
## 8. Alternative Queries (retrieval recall)
|
|
113
|
+
|
|
114
|
+
- How does an Android voice room anchor start streaming?
|
|
115
|
+
- What is the call order of `createLive` and `openLocalMicrophone` on Android?
|
|
116
|
+
- How does an Android anchor take a seat and publish audio?
|
|
117
|
+
- What does the `keepOwnerOnSeat` parameter do?
|
|
118
|
+
- How to set the `AudioSalon` template for `seatTemplate`?
|
|
119
|
+
- What is the difference between `muteMicrophone` and `unmuteMicrophone` on Android?
|
|
120
|
+
- How to publish audio after creating a voice room?
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Admin Seat-Taking and Seat Locking(语聊房 / 管理员 / 上麦 / takeSeat / lockSeat)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [android, ios, flutter]
|
|
5
|
+
scope: platform_common
|
|
6
|
+
tags: [voice room, admin, take seat, takeSeat, lockSeat, unlockSeat, seatMode, FREE, seat, host seat, owner approval, VoiceRoom]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Admin Seat-Taking and Seat Locking
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaways
|
|
13
|
+
|
|
14
|
+
- An admin takes a seat by calling `takeSeat` with the seat index. There is no need to call `applyForSeat` — admins are **not restricted by `seatMode=APPLY`** and do **not need** owner approval.
|
|
15
|
+
- Admins are **not restricted by `lockSeat`** — they can directly `takeSeat` to any seat (including seat 0, the host seat).
|
|
16
|
+
- Regular users can only call `takeSeat` when `seatMode` is `FREE`, and they **are restricted by `lockSeat`**.
|
|
17
|
+
- The seat management API in `LiveSeatStore` is consistent across all three platforms (Android/iOS/Flutter).
|
|
18
|
+
|
|
19
|
+
## 2. Field / API Reference
|
|
20
|
+
|
|
21
|
+
| Field / Capability | Purpose | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `takeSeat` | Take a seat | Pass the seat index; admins are not restricted by `seatMode`/`lockSeat`; regular users require `seatMode=FREE` and the seat must be unlocked |
|
|
24
|
+
| `lockSeat` | Lock a seat | After locking, regular users cannot `takeSeat`; admins are unaffected |
|
|
25
|
+
| `unlockSeat` | Unlock a seat | After unlocking, regular users can `takeSeat` again |
|
|
26
|
+
| `seatMode` | Seat-taking mode | Regular users can only `takeSeat` in `FREE` mode |
|
|
27
|
+
| `LiveSeatStore` | Seat management | Provides `takeSeat`/`leaveSeat`/`lockSeat`/`unlockSeat` operations |
|
|
28
|
+
| Owner | Room owner | Can lock/unlock seats |
|
|
29
|
+
|
|
30
|
+
## 3. Mechanism & Sequence
|
|
31
|
+
|
|
32
|
+
### Admin Taking a Seat
|
|
33
|
+
|
|
34
|
+
Admin calls `takeSeat(index)` to take a seat directly (passing the target seat index) -> not restricted by `seatMode` -> no owner approval needed -> not restricted by `lockSeat` -> seat taken successfully.
|
|
35
|
+
|
|
36
|
+
## 4. Standard Usage
|
|
37
|
+
|
|
38
|
+
1. **Admin takes a seat**: Call `takeSeat(index)` where `index` is the target seat number (e.g., seat 0 for the host seat). Not restricted by `seatMode`/`lockSeat`.
|
|
39
|
+
2. **Regular user takes a seat**: Confirm `seatMode=FREE` and the target seat is unlocked, then call `takeSeat(index)`.
|
|
40
|
+
3. **Lock a seat**: Admin/owner calls `lockSeat(index)`. After locking, regular users cannot `takeSeat`, but admins are unaffected.
|
|
41
|
+
4. **Unlock then take seat**: First call `unlockSeat(index)` to unlock, then the regular user can `takeSeat(index)`.
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
// API is consistent across all three platforms (Android Kotlin / iOS Swift / Flutter Dart)
|
|
45
|
+
// 1. 管理员直接上麦(不受 seatMode / lockSeat 限制,无需房主同意)
|
|
46
|
+
liveSeatStore.takeSeat(0); // 上麦到 0 号主持麦位
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 5. Expected Results
|
|
50
|
+
|
|
51
|
+
- Admin `takeSeat(index)` succeeds immediately, not restricted by `seatMode`, no owner approval needed.
|
|
52
|
+
- After `lockSeat`, an admin can still `takeSeat` on the same seat (admins are not restricted by seat locking).
|
|
53
|
+
- Regular users can only `takeSeat` successfully when `seatMode=FREE`; if the seat is locked, it fails — `unlockSeat` must be called first.
|
|
54
|
+
|
|
55
|
+
## 6. Common Pitfalls
|
|
56
|
+
|
|
57
|
+
- Pitfall 1: Admin calls `applyForSeat` to take a seat (admins should call `takeSeat` directly — no application needed).
|
|
58
|
+
- Pitfall 2: Assuming admin `takeSeat` requires owner approval (admins are not subject to this restriction).
|
|
59
|
+
- Pitfall 3: Assuming `lockSeat` prevents admins from calling `takeSeat` on the same seat (admins are not restricted by seat locking — only regular users are).
|
|
60
|
+
|
|
61
|
+
## 7. Problem Definition (retrieval hint)
|
|
62
|
+
|
|
63
|
+
How a voice room admin directly takes a specified seat (including seat 0, the host seat), whether admins are restricted by `seatMode`/`lockSeat`, and the `seatMode` and locking conditions for regular users to take a seat.
|
|
64
|
+
|
|
65
|
+
## 8. Alternative Queries (retrieval recall)
|
|
66
|
+
|
|
67
|
+
- How does a voice room admin take seat 0?
|
|
68
|
+
- Does admin `takeSeat` require owner approval?
|
|
69
|
+
- Is admin seat-taking restricted by `seatMode`?
|
|
70
|
+
- Can an admin `takeSeat` after `lockSeat`?
|
|
71
|
+
- When can a regular user `takeSeat`?
|
|
72
|
+
- Can a regular user take a seat when `seatMode=FREE`?
|
|
73
|
+
- How to unlock a locked seat and take it?
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Voice Room Audience Leaving and Seat State(语聊房 / 观众 / 上麦 / 下麦 / leaveLive)"
|
|
3
|
+
product: live
|
|
4
|
+
frameworks: [android, ios, flutter]
|
|
5
|
+
scope: platform_common
|
|
6
|
+
tags: [voice room, audience, take seat, leave seat, leaveLive, leaveSeat, exit, seat, re-take seat, VoiceRoom]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Voice Room Audience Leaving and Seat State
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaways
|
|
13
|
+
|
|
14
|
+
- When a seated audience member calls `leaveLive` to exit the voice room, they are automatically removed from the seat.
|
|
15
|
+
- After exiting and re-entering the room, the user is **not seated** and must take a seat again.
|
|
16
|
+
- The method for taking a seat depends on `seatMode`:
|
|
17
|
+
- `seatMode = FREE`: Call `takeSeat` directly.
|
|
18
|
+
- `seatMode = APPLY`: Call `applyForSeat` to submit a seat request; the owner/admin must approve before the user is seated.
|
|
19
|
+
- `leaveLive` does **not require** calling `leaveSeat` first — exiting automatically removes the user from the seat.
|
|
20
|
+
- Behavior is consistent across all three platforms (Android/iOS/Flutter).
|
|
21
|
+
|
|
22
|
+
## 2. Field / API Reference
|
|
23
|
+
|
|
24
|
+
| Field / Capability | Purpose | Notes |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `leaveLive` | Exit the voice room | Exits the room and automatically leaves the seat |
|
|
27
|
+
| `leaveSeat` | Manually leave a seat | Used for explicit seat departure; not required before `leaveLive` since exiting auto-leaves the seat |
|
|
28
|
+
| `takeSeat` | Take a seat freely (`seatMode = FREE`) | Call directly after re-entering the room in free mode |
|
|
29
|
+
| `applyForSeat` | Apply to take a seat (`seatMode = APPLY`) | Submit a request; owner/admin approval is required |
|
|
30
|
+
| `seatMode` | Seat mode | `FREE`: free seat-taking; `APPLY`: requires approval |
|
|
31
|
+
| Seat state | Whether the user is seated | Cleared after `leaveLive`; user must re-take a seat after re-entering |
|
|
32
|
+
|
|
33
|
+
## 3. Mechanism & Sequence
|
|
34
|
+
|
|
35
|
+
Seated audience calls `leaveLive` -> automatically leaves seat (no need to call `leaveSeat` first) -> exits room -> re-enters room -> seat state is empty, user is not seated -> choose seat-taking method based on `seatMode`:
|
|
36
|
+
|
|
37
|
+
- `seatMode = FREE`: Call `takeSeat(seatIndex)` to take a seat directly.
|
|
38
|
+
- `seatMode = APPLY`: Call `applyForSeat(seatIndex)` to submit a request and wait for owner/admin approval.
|
|
39
|
+
|
|
40
|
+
## 4. Standard Usage
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
// API is consistent across all three platforms (Android Kotlin / iOS Swift / Flutter Dart)
|
|
44
|
+
// 1. 直接退出语聊房(会自动下麦,无需先 leaveSeat)
|
|
45
|
+
liveListStore.leaveLive();
|
|
46
|
+
|
|
47
|
+
// 2. 重新进房后,根据 seatMode 选择上麦方式
|
|
48
|
+
// seatMode = FREE 时:直接上麦
|
|
49
|
+
liveSeatStore.takeSeat(seatIndex);
|
|
50
|
+
|
|
51
|
+
// seatMode = APPLY 时:申请上麦(需房主/管理员同意)
|
|
52
|
+
liveSeatStore.applyForSeat(seatIndex);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 5. Expected Results
|
|
56
|
+
|
|
57
|
+
- After `leaveLive`, the user is automatically removed from the seat.
|
|
58
|
+
- After re-entering the room, `LiveSeatStore.seatList` does not contain the user.
|
|
59
|
+
- `seatMode = FREE`: Calling `takeSeat` succeeds and the user is seated again.
|
|
60
|
+
- `seatMode = APPLY`: After calling `applyForSeat`, the user waits for approval; once approved, the user is seated again.
|
|
61
|
+
|
|
62
|
+
## 6. Common Pitfalls
|
|
63
|
+
|
|
64
|
+
- Pitfall 1: Calling `leaveSeat` before exiting (not necessary — `leaveLive` automatically leaves the seat).
|
|
65
|
+
- Pitfall 2: Assuming the user is still seated after re-entering the room (they must take a seat again).
|
|
66
|
+
- Pitfall 3: Worrying that `leaveLive` does not leave the seat, causing a stale seat entry (it auto-leaves — no stale entries).
|
|
67
|
+
- Pitfall 4: Calling `takeSeat` directly when `seatMode = APPLY` (use `applyForSeat` instead — otherwise it will fail or have no effect).
|
|
68
|
+
|
|
69
|
+
## 7. Problem Definition (retrieval hint)
|
|
70
|
+
|
|
71
|
+
Whether a seated audience member is automatically removed from the seat after calling `leaveLive`, whether the user is still seated after re-entering, whether `leaveLive` requires calling `leaveSeat` first, and how to re-take a seat under different `seatMode` values (FREE/APPLY) using `takeSeat` vs `applyForSeat`.
|
|
72
|
+
|
|
73
|
+
## 8. Alternative Queries (retrieval recall)
|
|
74
|
+
|
|
75
|
+
- Does a voice room audience member leave the seat after exiting?
|
|
76
|
+
- Do I need to take a seat again after re-entering?
|
|
77
|
+
- Do I need to call `leaveSeat` before `leaveLive`?
|
|
78
|
+
- Is the seat cleared when a voice room audience member exits?
|
|
79
|
+
- How to re-take a seat after entering the room?
|
|
80
|
+
- How to take a seat when `seatMode = APPLY`?
|
|
81
|
+
- When to use `takeSeat` vs `applyForSeat`?
|