@tencent-rtc/mcp 1.4.6 → 1.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cursor-setting.png +0 -0
- package/knowledge/bm25-cache.js +74 -0
- package/knowledge/bm25-cache.js.map +1 -0
- package/knowledge/bm25.js +148 -0
- package/knowledge/bm25.js.map +1 -0
- package/knowledge/build-index.js +70 -0
- package/knowledge/build-index.js.map +1 -0
- package/knowledge/chunker.js +168 -0
- package/knowledge/chunker.js.map +1 -0
- package/knowledge/content-loader.js +40 -0
- package/knowledge/content-loader.js.map +1 -0
- package/knowledge/doc-url-resolver.js +143 -0
- package/knowledge/doc-url-resolver.js.map +1 -0
- package/knowledge/extractors.js +26 -0
- package/knowledge/extractors.js.map +1 -0
- package/knowledge/path-meta.js +185 -0
- package/knowledge/path-meta.js.map +1 -0
- package/knowledge/search/exact-lookup.js +498 -0
- package/knowledge/search/exact-lookup.js.map +1 -0
- package/knowledge/search/filter-pool.js +105 -0
- package/knowledge/search/filter-pool.js.map +1 -0
- package/knowledge/search/product-scope-intent.js +41 -0
- package/knowledge/search/product-scope-intent.js.map +1 -0
- package/knowledge/search/requires-framework.js +82 -0
- package/knowledge/search/requires-framework.js.map +1 -0
- package/knowledge/search/search-knowledge.js +230 -0
- package/knowledge/search/search-knowledge.js.map +1 -0
- package/mcp-server-prompt.png +0 -0
- package/package.json +1 -1
- package/resource/_schema/feature-aliases.yaml +10 -0
- package/resource/_schema/goal-tags.yaml +72 -0
- package/resource/_schema/products.yaml +19 -0
- package/resource/_schema/trtc-intents.yaml +27 -0
- package/resource/_schema/types.yaml +43 -0
- package/resource/index/component-slugs.json +1 -0
- package/resource/index/doc-source-urls.json +1 -0
- package/resource/index/manifest.json +1 -0
- package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
- package/resource/integration/callkit/preset/flutter/integration.md +346 -0
- package/resource/integration/callkit/preset/ios/integration.md +408 -0
- package/resource/integration/callkit/preset/react/integration.md +362 -0
- package/resource/integration/callkit/preset/vue/integration.md +356 -0
- package/resource/integration/chat/preset/android/integration.md +500 -0
- package/resource/integration/chat/preset/flutter/integration.md +370 -0
- package/resource/integration/chat/preset/ios/integration.md +566 -0
- package/resource/integration/chat/preset/react/integration.md +490 -0
- package/resource/integration/chat/preset/vue/integration.md +504 -0
- package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
- package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
- package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
- package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
- package/resource/integration/roomkit/preset/vue/integration.md +562 -0
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
- package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
- package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
- package/resource/knowledge/callkit/faq/android.md +92 -0
- package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
- package/resource/knowledge/callkit/faq/error-code.md +67 -0
- package/resource/knowledge/callkit/faq/flutter.md +52 -0
- package/resource/knowledge/callkit/faq/ios.md +104 -0
- package/resource/knowledge/callkit/faq/web.md +74 -0
- package/resource/knowledge/callkit/preset/android/api.md +412 -0
- package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
- package/resource/knowledge/callkit/preset/ios/api.md +234 -0
- package/resource/knowledge/callkit/preset/web/api.md +83 -0
- package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
- package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
- package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
- package/resource/knowledge/chat/preset/android/features/language.md +136 -0
- package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
- package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
- package/resource/knowledge/chat/preset/android/features/search.md +64 -0
- package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
- package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
- package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
- package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
- package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
- package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
- package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
- package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
- package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
- package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
- package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
- package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
- package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
- package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
- package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
- package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
- package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
- package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
- package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
- package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
- package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
- package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
- package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
- package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
- package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
- package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
- package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
- package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
- package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
- package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
- package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
- package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
- package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
- package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
- package/resource/knowledge/chat/urls/error-code.md +17 -0
- package/resource/knowledge/chat/urls/product.md +43 -0
- package/resource/knowledge/chat/urls/restapi.md +204 -0
- package/resource/knowledge/chat/urls/sdk/android.md +80 -0
- package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
- package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
- package/resource/knowledge/chat/urls/sdk/web.md +80 -0
- package/resource/knowledge/chat/urls/webhook.md +68 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
- package/resource/knowledge/livekit/faq/error-code.md +193 -0
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
- package/resource/knowledge/push/config/android.md +92 -0
- package/resource/knowledge/push/config/harmonyos.md +83 -0
- package/resource/knowledge/push/config/ios.md +254 -0
- package/resource/knowledge/push/config/react-native.md +254 -0
- package/resource/knowledge/push/config/unity.md +209 -0
- package/resource/knowledge/push/config/unreal-engine.md +194 -0
- package/resource/knowledge/push/integration/android.md +404 -0
- package/resource/knowledge/push/integration/flutter.md +465 -0
- package/resource/knowledge/push/integration/harmonyos.md +63 -0
- package/resource/knowledge/push/integration/ios.md +246 -0
- package/resource/knowledge/push/integration/react-native.md +366 -0
- package/resource/knowledge/push/integration/uni-app.md +208 -0
- package/resource/knowledge/push/integration/unity.md +389 -0
- package/resource/knowledge/push/integration/unreal-engine.md +390 -0
- package/resource/knowledge/push/overview/prepare.md +60 -0
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
- package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
- package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
- package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
- package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
- package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
- package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
- package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
- package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
- package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
- package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
- package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
- package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
- package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
- package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
- package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
- package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
- package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
- package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
- package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
- package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
- package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
- package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
- package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
- package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
- package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
- package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
- package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
- package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
- package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
- package/server.js +35 -10
- package/server.js.map +1 -1
- package/tools/call/get_native_call_uikit_integration.js +2 -3
- package/tools/call/get_native_call_uikit_integration.js.map +1 -1
- package/tools/call/get_native_callkit_core_integration.js +2 -5
- package/tools/call/get_native_callkit_core_integration.js.map +1 -1
- package/tools/call/get_web_call_uikit_integration.js +2 -3
- package/tools/call/get_web_call_uikit_integration.js.map +1 -1
- package/tools/chat/get_native_chat_uikit_integration.js +2 -3
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -1
- package/tools/chat/get_web_chat_uikit_integration.js +2 -3
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -1
- package/tools/common/present_framework_choice.js +19 -13
- package/tools/common/present_framework_choice.js.map +1 -1
- package/tools/common/record_answer.js +19 -25
- package/tools/common/record_answer.js.map +1 -1
- package/tools/common/record_feedback.js +17 -30
- package/tools/common/record_feedback.js.map +1 -1
- package/tools/common/search_trtc_knowledge.js +45 -0
- package/tools/common/search_trtc_knowledge.js.map +1 -0
- package/tools/definitions/get_native_call_uikit_integration_def.js +3 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_callkit_core_integration_def.js +5 -3
- package/tools/definitions/get_native_callkit_core_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -2
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_integration_def.js +6 -5
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +4 -2
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -0
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +5 -5
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_room_core_integration_def.js +50 -0
- package/tools/definitions/get_web_room_core_integration_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +5 -4
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/integration-boundary.js +6 -0
- package/tools/definitions/integration-boundary.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +12 -10
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/definitions/record_answer_def.js +19 -17
- package/tools/definitions/record_answer_def.js.map +1 -1
- package/tools/definitions/record_feedback_def.js +14 -13
- package/tools/definitions/record_feedback_def.js.map +1 -1
- package/tools/definitions/search_trtc_knowledge_def.js +40 -0
- package/tools/definitions/search_trtc_knowledge_def.js.map +1 -0
- package/tools/index.js +5 -36
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_integration.js +1 -3
- package/tools/live/get_native_livekit_core_integration.js.map +1 -1
- package/tools/live/get_web_live_uikit_integration.js +2 -4
- package/tools/live/get_web_live_uikit_integration.js.map +1 -1
- package/tools/room/get_web_room_core_integration.js +48 -0
- package/tools/room/get_web_room_core_integration.js.map +1 -0
- package/tools/room/get_web_room_uikit_integration.js +2 -3
- package/tools/room/get_web_room_uikit_integration.js.map +1 -1
- package/utils/generate-structured-result.js +24 -30
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/get-doc-content.js +14 -8
- package/utils/get-doc-content.js.map +1 -1
- package/utils/report-cls-client.js +18 -20
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
- package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
- package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
- package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
- package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
- package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
- package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
- package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
- package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
- package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
- package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
- package/resource/doc/callkit/faq/common/error-code.md +0 -47
- package/resource/doc/callkit/faq/flutter-faq.md +0 -115
- package/resource/doc/callkit/faq/ios-faq.md +0 -115
- package/resource/doc/callkit/faq/web-faq.md +0 -36
- package/resource/doc/callkit/preset/android/api.md +0 -296
- package/resource/doc/callkit/preset/flutter/api.md +0 -410
- package/resource/doc/callkit/preset/flutter/integration.md +0 -164
- package/resource/doc/callkit/preset/ios/api.md +0 -80
- package/resource/doc/callkit/preset/ios/integration.md +0 -187
- package/resource/doc/callkit/preset/react/api.md +0 -501
- package/resource/doc/callkit/preset/react/integration.md +0 -86
- package/resource/doc/callkit/preset/vue/api.md +0 -501
- package/resource/doc/callkit/preset/vue/integration.md +0 -83
- package/resource/doc/chatkit/android/faq.md +0 -111
- package/resource/doc/chatkit/android/features/theme.md +0 -219
- package/resource/doc/chatkit/android/integration.md +0 -490
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
- package/resource/doc/chatkit/faq/common/product.md +0 -7
- package/resource/doc/chatkit/faq/common/server.md +0 -44
- package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
- package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
- package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
- package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
- package/resource/doc/chatkit/flutter/faq.md +0 -23
- package/resource/doc/chatkit/flutter/features/theme.md +0 -235
- package/resource/doc/chatkit/flutter/integration.md +0 -344
- package/resource/doc/chatkit/ios/faq.md +0 -111
- package/resource/doc/chatkit/ios/features/theme.md +0 -267
- package/resource/doc/chatkit/react/components/avatar.md +0 -104
- package/resource/doc/chatkit/react/components/chat-header.md +0 -148
- package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
- package/resource/doc/chatkit/react/components/chat.md +0 -38
- package/resource/doc/chatkit/react/components/component-list.md +0 -37
- package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
- package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
- package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
- package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
- package/resource/doc/chatkit/react/components/message-list.md +0 -293
- package/resource/doc/chatkit/react/components/tuikit.md +0 -34
- package/resource/doc/chatkit/react/faq.md +0 -26
- package/resource/doc/chatkit/react/integration.md +0 -416
- package/resource/doc/chatkit/vue/components/avatar.md +0 -104
- package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
- package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
- package/resource/doc/chatkit/vue/components/chat.md +0 -45
- package/resource/doc/chatkit/vue/components/component-list.md +0 -87
- package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
- package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
- package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
- package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
- package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
- package/resource/doc/chatkit/vue/components/message-list.md +0 -433
- package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
- package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
- package/resource/doc/chatkit/vue/faq.md +0 -36
- package/resource/doc/chatkit/vue/integration.md +0 -428
- package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
- package/resource/doc/livekit/faq/common/error-code.md +0 -88
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
- package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
- package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
- package/resource/doc/roomkit/faq/common/error-code.md +0 -67
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
- package/resource/doc/roomkit/vue/features/device-state.md +0 -460
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
- package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
- package/resource/doc/roomkit/vue/features/room-state.md +0 -282
- package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
- package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
- package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
- package/resource/doc/roomkit/vue/integration.md +0 -315
- package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
- package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
- package/resource/doc/rtcengine/web/.gitkeep +0 -0
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
- package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
- package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
- package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
- package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
- package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
- package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
- package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
- package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
- package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
- package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
- package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
- package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
- package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
- package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
- package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
- package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
- package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
- package/tools/call/get_callkit_api.js +0 -33
- package/tools/call/get_callkit_api.js.map +0 -1
- package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
- package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
- package/tools/common/get_faq.js +0 -266
- package/tools/common/get_faq.js.map +0 -1
- package/tools/common/record_skill_session.js +0 -69
- package/tools/common/record_skill_session.js.map +0 -1
- package/tools/definitions/get_callkit_api_def.js +0 -29
- package/tools/definitions/get_callkit_api_def.js.map +0 -1
- package/tools/definitions/get_faq_def.js +0 -49
- package/tools/definitions/get_faq_def.js.map +0 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
- package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_livekit_api_def.js +0 -30
- package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
- package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
- package/tools/definitions/record_skill_session_def.js +0 -31
- package/tools/definitions/record_skill_session_def.js.map +0 -1
- package/tools/live/get_native_livekit_core_features.js +0 -68
- package/tools/live/get_native_livekit_core_features.js.map +0 -1
- package/tools/live/get_web_livekit_api.js +0 -33
- package/tools/live/get_web_livekit_api.js.map +0 -1
- package/tools/live/get_web_livekit_component_detail.js +0 -35
- package/tools/live/get_web_livekit_component_detail.js.map +0 -1
- package/tools/room/get_web_roomkit_feature_detail.js +0 -69
- package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
- package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
- package/utils/build-session-directives.js +0 -120
- package/utils/build-session-directives.js.map +0 -1
- package/utils/handle-framework.js +0 -9
- package/utils/handle-framework.js.map +0 -1
- package/utils/handle-state-name.js +0 -29
- package/utils/handle-state-name.js.map +0 -1
- package/utils/report-runtime-error-cls-client.js +0 -91
- package/utils/report-runtime-error-cls-client.js.map +0 -1
- /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
- /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
- /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
product: 'Chat'
|
|
3
|
-
tech_stack: 'web_js_sdk'
|
|
4
|
-
framework: 'sdk'
|
|
5
|
-
title: 'Web JS SDK Frequently Asked Questions'
|
|
6
|
-
keywords: ['sdk integration', 'login API', 'create group']
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Web JS SDK FAQ
|
|
10
|
-
|
|
11
|
-
## Important Notice
|
|
12
|
-
**SDK Version Information:**
|
|
13
|
-
- v3: `@tencentcloud/chat`
|
|
14
|
-
When providing code examples, always use the latest version `@tencentcloud/chat` for demonstration.
|
|
15
|
-
|
|
16
|
-
## Web JS SDK Frequently Asked Questions (Topic: SDK FAQ)
|
|
17
|
-
|
|
18
|
-
### Q: How to receive streaming messages sent via Chat REST API (https://trtc.io/document/71131?product=chat&menulabel=core%20sdk&platform=javascript) through the SDK?
|
|
19
|
-
**A:** The SDK handles streaming messages through the message received event [TencentCloudChat.EVENT.MESSAGE_RECEIVED](https://trtc.io/document/47996?product=chat&menulabel=core%20sdk&platform=javascript) and message modified event [TencentCloudChat.EVENT.MESSAGE_MODIFIED](https://trtc.io/document/48005?product=chat&menulabel=core%20sdk&platform=javascript). When REST API sends the first fragment, the SDK notifies the application through the message received event. Subsequent fragments are notified through the message modified event.
|
|
20
|
-
|
|
21
|
-
### Q: Why does SDK login fail?
|
|
22
|
-
**A:** Please provide the error message or error code.
|
|
23
|
-
|
|
24
|
-
### Q: Why can I still receive SDK events after calling the off interface to unregister event listeners?
|
|
25
|
-
**A:** For the same event, such as [TencentCloudChat.EVENT.MESSAGE_RECEIVED](https://trtc.io/document/47996?product=chat&menulabel=core%20sdk&platform=javascript), when calling the [on](https://trtc.io/document/47967?platform=javascript&product=chat&menulabel=sdk#d39fb50f-f0f2-4b67-9b15-acd7e8608105) interface to listen for events and the [off](https://trtc.io/document/47967?platform=javascript&product=chat&menulabel=sdk#c4cb09c5-142a-4d8c-8c03-ea7f446aa844) interface to unregister event listeners, the handler parameter should point to the same function. Recommended approach:
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
// Recommended approach
|
|
29
|
-
tim.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived, this);
|
|
30
|
-
tim.off(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
|
|
31
|
-
|
|
32
|
-
// Note: The following code has a bug and cannot unregister TencentCloudChat.EVENT.MESSAGE_RECEIVED because bind() returns a new function each time
|
|
33
|
-
tim.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, this.onMessageReceived.bind(this));
|
|
34
|
-
tim.off(TencentCloudChat.EVENT.MESSAGE_RECEIVED, this.onMessageReceived.bind(this));
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Q: Does the SDK automatically unregister events that were registered via the on interface when logout is called?
|
|
38
|
-
**A:** No. To unregister event listeners, you must actively call the [off](https://trtc.io/document/47967?platform=javascript&product=chat&menulabel=sdk#c4cb09c5-142a-4d8c-8c03-ea7f446aa844) interface.
|
|
39
|
-
|
|
40
|
-
### Q: After successful login, I cannot send messages and receive a prompt about improper API call timing?
|
|
41
|
-
**A:** SDK APIs can only be called after the SDK is ready. Listen for the [TencentCloudChat.EVENT.SDK_READY](https://trtc.io/document/47967?product=chat&menulabel=core%20sdk&platform=javascript#b7ca8a5b-e020-4c43-a442-71125e55da2d) event and only call authenticated interfaces like sending messages after the SDK is ready.
|
|
42
|
-
|
|
43
|
-
### Q: I want to implement like and flower-sending features in an audio-video chatroom. How do I do this?
|
|
44
|
-
**A:** Use the [createCustomMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#creating-a-custom-message) and [sendMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#sending-a-message) interfaces to implement this.
|
|
45
|
-
|
|
46
|
-
### Q: How does Web IM SDK v2.x/v3.x/v4.x handle combined messages sent via REST API or legacy IM?
|
|
47
|
-
**A:** The content of combined messages is stored in the _elements property of the Message instance. You need to parse it yourself. Refer to [Message Format](https://trtc.io/document/47990?product=chat&menulabel=core%20sdk&platform=javascript) for parsing.
|
|
48
|
-
For non-combined messages, use the recommended approach: use the type and payload properties of the [Message](https://trtc.io/document/47990?product=chat&menulabel=core%20sdk&platform=javascript) instance.
|
|
49
|
-
|
|
50
|
-
### Q: Why don't I receive the TencentCloudChat.EVENT.MESSAGE_RECEIVED event after successfully sending a message via Web IM SDK's sendMessage?
|
|
51
|
-
**A:** Messages sent by yourself are not notified to the application through `TencentCloudChat.EVENT.MESSAGE_RECEIVED`. The [sendMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#sending-a-message) interface returns a `Promise`. Handle success or failure business logic through `Promise.then` or `Promise.catch`.
|
|
52
|
-
|
|
53
|
-
### Q: After merging messages retrieved via getMessageList with messages received through TencentCloudChat.EVENT.MESSAGE_RECEIVED event listener, I sometimes notice messages are out of order. Why?
|
|
54
|
-
**A:** When maintaining the conversation message list, ensure messages are enqueued in the correct order. If the message list is sorted from oldest to newest, historical messages retrieved via [getMessageList](https://trtc.io/document/47999?product=chat&menulabel=core%20sdk&platform=javascript) should be added to the head of the list, while real-time messages received via [TencentCloudChat.EVENT.MESSAGE_RECEIVED](https://trtc.io/document/47996?product=chat&menulabel=core%20sdk&platform=javascript) should be added to the tail.
|
|
55
|
-
|
|
56
|
-
### Q: After creating a live streaming group via the createGroup interface, I cannot receive messages?
|
|
57
|
-
**A:** For live streaming groups, you need to actively join the group to start the long-polling message channel. After creating a live streaming group using the [createGroup](https://trtc.io/document/48465?product=chat&menulabel=core%20sdk&platform=javascript#creating-a-group) interface, you must call the [joinGroup](https://trtc.io/document/48465?product=chat&menulabel=core%20sdk&platform=javascript#joining-a-group) interface to join the group before you can send and receive messages.
|
|
58
|
-
```typescript
|
|
59
|
-
let promise = tim.joinGroup({ groupID: 'group1' });
|
|
60
|
-
promise.then(function(imResponse) {
|
|
61
|
-
switch (imResponse.data.status) {
|
|
62
|
-
case TencentCloudChat.TYPES.JOIN_STATUS_WAIT_APPROVAL:
|
|
63
|
-
break;
|
|
64
|
-
case TencentCloudChat.TYPES.JOIN_STATUS_SUCCESS:
|
|
65
|
-
console.log(imResponse.data.group); // Joined group profile
|
|
66
|
-
break;
|
|
67
|
-
case TencentCloudChat.TYPES.JOIN_STATUS_ALREADY_IN_GROUP:
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
}).catch(function(imError){
|
|
73
|
-
console.warn('joinGroup error:', imError);
|
|
74
|
-
});
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Q: Why don't live streaming groups have unread message counts? Why can't I retrieve message history?
|
|
78
|
-
**A:** By design: live streaming groups do not support unread message counts, and new members cannot view message history before joining. See [Group System](https://trtc.io/document/33529?product=chat&menulabel=core%20sdk&platform=javascript) for details. Ultimate or Enterprise editions support new members viewing message history before joining live streaming groups (SDK v2.16.0 or higher required).
|
|
79
|
-
|
|
80
|
-
### Q: Can I join two or more live streaming groups simultaneously?
|
|
81
|
-
**A:** No, a user can only join one live streaming group at a time. Joining multiple live streaming groups simultaneously would start multiple long-polling message channels, which can significantly impact web/H5 or mini-program performance.
|
|
82
|
-
|
|
83
|
-
### Q: How does the SDK implement message reactions?
|
|
84
|
-
**A:** The SDK supports message reaction capability. You need to purchase the Ultimate or Enterprise edition package. For API implementation, refer to the official documentation: https://trtc.io/document/60749?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
85
|
-
|
|
86
|
-
### Q: How to mark one-to-one messages as read?
|
|
87
|
-
**A:** To mark one-to-one messages as read and clear the conversation unread count, use [setMessageRead](https://trtc.io/document/48319?product=chat&menulabel=core%20sdk&platform=javascript#clearing-the-conversation-unread-count).
|
|
88
|
-
|
|
89
|
-
### Q: How to clear unread count for group messages?
|
|
90
|
-
**A:** To clear the unread count for group conversations, use [setMessageRead](https://trtc.io/document/48319?product=chat&menulabel=core%20sdk&platform=javascript#clearing-the-conversation-unread-count).
|
|
91
|
-
|
|
92
|
-
### Q: How to implement single message read status for one-to-one and group messages?
|
|
93
|
-
**A:** To implement single message read status, use the message read receipt feature. For details on how to enable read receipts, send read receipts, etc., refer to: https://trtc.io/document/48021?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
94
|
-
|
|
95
|
-
### Q: How to send image messages with Web SDK?
|
|
96
|
-
**A:** Use [createImageMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#creating-an-image-message) to create an image message instance, then use [sendMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#sending-a-message) to send the image message.
|
|
97
|
-
|
|
98
|
-
### Q: How to send video messages with Web SDK?
|
|
99
|
-
**A:** Use [createVideoMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#creating-a-video-message) to create a video message instance, then use [sendMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#sending-a-message) to send the video message.
|
|
100
|
-
|
|
101
|
-
### Q: How to send audio messages with Web SDK?
|
|
102
|
-
**A:** Use [createAudioMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#creating-an-audio-message) to create an audio message instance, then use [sendMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#sending-a-message) to send the audio message.
|
|
103
|
-
|
|
104
|
-
### Q: How to send file messages with Web SDK?
|
|
105
|
-
**A:** Use [createFileMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#creating-a-file-message) to create a file message instance, then use [sendMessage](https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#sending-a-message) to send the file message.
|
|
106
|
-
|
|
107
|
-
### Q: How to implement user online status feature in Chat?
|
|
108
|
-
**A:**
|
|
109
|
-
1. Chat SDK provides **user status query, subscription, unSubscription APIs and status change event notifications**. For details, please refer to: https://trtc.io/document/49561.
|
|
110
|
-
2. For server-side **online status change callback**, please refer to: https://trtc.io/document/34357?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
111
|
-
|
|
112
|
-
### Q: How to implement message list feature without UI in Chat SDK?
|
|
113
|
-
**A:** To implement message list feature without UI, you need to combine SDK's `sendMessage`, `getMessageList` APIs and `MESSAGE_RECEIVED` event.
|
|
114
|
-
|
|
115
|
-
### Q: How to implement @all and @someone features without UI in Chat SDK?
|
|
116
|
-
**A:** SDK provides `createTextAtMessage` API for implementing @ mentions. For details, please refer to: https://trtc.io/document/47993?product=chat&menulabel=core%20sdk&platform=javascript#creating-an-.40-message.
|
|
117
|
-
|
|
118
|
-
### Q: How to implement search functionality in Chat SDK?
|
|
119
|
-
**A:** SDK provides **cloud search** capabilities, supporting message search, user search, group search, and group member search. API details can be found in the following links:
|
|
120
|
-
- Search messages: https://trtc.io/document/67677?product=chat&menulabel=core%20sdk&platform=javascript
|
|
121
|
-
- Search users: https://trtc.io/document/67679?product=chat&menulabel=core%20sdk&platform=javascript
|
|
122
|
-
- Search groups: https://trtc.io/document/67681?product=chat&menulabel=core%20sdk&platform=javascript
|
|
123
|
-
- Search group members: https://trtc.io/document/67683?product=chat&menulabel=core%20sdk&platform=javascript
|
|
124
|
-
|
|
125
|
-
### Q: How to create groups, add group members, and set administrators in Chat SDK?
|
|
126
|
-
**A:** For specific information about creating groups, adding group members, and setting administrators in SDK, please refer to the documentation below:
|
|
127
|
-
- Create group: https://trtc.io/document/48465?product=chat&menulabel=core%20sdk&platform=javascript
|
|
128
|
-
- Add group members: https://trtc.io/document/48180?product=chat&menulabel=core%20sdk&platform=javascript#49b805dd-4898-44a3-89a4-3b201f839fce
|
|
129
|
-
- Modify group member role (can set administrator): https://trtc.io/document/48180?product=chat&menulabel=core%20sdk&platform=javascript#f35fb570-648c-4b97-99a1-cef5b81b1284
|
|
130
|
-
|
|
131
|
-
### Q: How to create a C2C one-to-one conversation?
|
|
132
|
-
**A:** The UI layer can create a one-to-one conversation by querying conversation profile using `getConversationProfile`. The `conversationID` format is: `C2C${userID}`. After SDK successfully creates the conversation, it will notify the conversation list update through the `CONVERSATION_LIST_UPDATE` event.
|
|
133
|
-
|
|
134
|
-
### Q: How to get total unread message count and listen to real-time changes?
|
|
135
|
-
**A:** For detailed information about total unread message count, please refer to: https://trtc.io/document/48319?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
136
|
-
1. To get total unread message count, call `getTotalUnreadMessageCount` API.
|
|
137
|
-
2. To listen for total unread count changes, monitor the `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED` event.
|
|
138
|
-
Note: During initialization, it's recommended to listen to the `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED` event to get the total unread message count, because the calculation of total unread count depends on the synchronization of cloud conversation list. Calling `getTotalUnreadMessageCount` directly after successful login may return 0 because the cloud conversation list hasn't finished synchronizing yet.
|
|
139
|
-
|
|
140
|
-
### Q: How to get original and thumbnail images in SDK image messages?
|
|
141
|
-
**A:** For image messages, high-resolution original image (type = 0), thumbnail (type = 1), and large image (type = 2) can be obtained. For details, please refer to the Message structure documentation: https://trtc.io/document/47990?product=chat&menulabel=core%20sdk&platform=javascript#893c75e0-e592-475a-bd9a-0c4ec30114b9.
|
|
142
|
-
|
|
143
|
-
### Q: How to handle message sending failures in SDK?
|
|
144
|
-
**A:** When SDK message sending fails, the `sendMessage` interface will throw an error, which needs to be caught using `sendMessage().catch()`. The error contains the complete message structure, where message.status is `fail`. You can resend the failed message using `resendMessage`.
|
|
145
|
-
|
|
146
|
-
### Q: In weak network environments, how does SDK ensure WebSocket stability and reconnection?
|
|
147
|
-
**A:** In weak network environments, if WebSocket disconnects, SDK will automatically reconnect. WebSocket status changes can be monitored through the `NET_STATE_CHANGE` event (https://trtc.io/document/47967?platform=javascript&product=chat&menulabel=sdk#d39fb50f-f0f2-4b67-9b15-acd7e8608105).
|
|
148
|
-
|
|
149
|
-
### Q: How to delete conversations in SDK?
|
|
150
|
-
**A:** Conversation deletion only supports one-way deletion. SDK delete conversation API is `deleteConversation`. Reference documentation: https://trtc.io/document/48313?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
151
|
-
|
|
152
|
-
### Q: How to get friend list in SDK?
|
|
153
|
-
**A:** Get friend list using `getFriendList` API. Friend list updates can be monitored through the `FRIEND_LIST_UPDATED` event. Reference documentation: https://trtc.io/document/48158?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
154
|
-
|
|
155
|
-
### Q: How to listen for friend online status updates in SDK?
|
|
156
|
-
**A:** Friend online status changes can be implemented in two ways:
|
|
157
|
-
1. If you have enabled automatic friend status notification in the IM Console, when a friend's status changes, SDK will dispatch the `USER_STATUS_UPDATED` event, where you can get the friend's latest status.
|
|
158
|
-
2. If you haven't enabled automatic friend status notification and still want to sense friend status changes, you need to call `subscribeUserStatus` to actively subscribe to friend status. When a friend's status changes, SDK will dispatch the `USER_STATUS_UPDATED` callback.
|
|
159
|
-
For detailed documentation, please refer to: https://trtc.io/document/49561?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
160
|
-
|
|
161
|
-
### Q: How to delete conversation history messages in SDK?
|
|
162
|
-
**A:** SDK provides the `clearHistoryMessage` API to clear conversation history messages. For detailed documentation, please refer to: https://trtc.io/document/53498?product=chat&menulabel=core%20sdk&platform=javascript.
|
|
163
|
-
|
|
164
|
-
### Q: How to get the number of unhandled group join requests and how to handle group join applications in Chat SDK and Chat Engine?
|
|
165
|
-
**A:** According to the customer's usage scenario, solutions are provided from both Chat SDK and Chat Engine. When users query such questions, please provide accurate answers based on the actual scenario.
|
|
166
|
-
## Scenario 1: Solution when the customer integrates Chat SDK without UI
|
|
167
|
-
- Get Group Application List During Initialization, API: [getGroupApplicationList](https://trtc.io/document/48465?product=chat&menulabel=core%20sdk&platform=javascript#c69d4d7c-3f0b-4486-b31a-190e6176a1c5)
|
|
168
|
-
- Get the Number of Unhandled Group Join Requests. Based on the list data returned by `getGroupApplicationList`, `applicationType = 0` represents the number of group join requests.
|
|
169
|
-
```typescript
|
|
170
|
-
let unhandledCount = 0;
|
|
171
|
-
let promise = chat.getGroupApplicationList();
|
|
172
|
-
promise.then(function(imResponse) {
|
|
173
|
-
const { applicationList } = imResponse.data;
|
|
174
|
-
applicationList.forEach((item) => {
|
|
175
|
-
// item.applicant - Applicant's userID
|
|
176
|
-
// item.applicantNick - Applicant's nickname
|
|
177
|
-
// item.groupID - Group ID
|
|
178
|
-
// item.groupName - Group name
|
|
179
|
-
// item.applicationType - Application type: 0 for join group request, 2 for invitation to join group
|
|
180
|
-
// item.userID - When applicationType = 2, this is the invited user's userID
|
|
181
|
-
// item.note - Additional message, not supported for group invitations, returns empty string
|
|
182
|
-
if (item.applicationType === 0) {
|
|
183
|
-
unhandledCount++;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}).catch(function(imError) {});
|
|
187
|
-
```
|
|
188
|
-
- Update Unread Count When Receiving Group Join Requests Online
|
|
189
|
-
This requires listening to the [MESSAGE_RECEIVED](https://trtc.io/document/47967?product=chat&menulabel=core%20sdk&platform=javascript#d39fb50f-f0f2-4b67-9b15-acd7e8608105) event.
|
|
190
|
-
```typescript
|
|
191
|
-
// For Message data structure details, please refer to https://trtc.io/document/47990?product=chat&menulabel=core%20sdk&platform=javascript
|
|
192
|
-
let unhandledCount = 0;
|
|
193
|
-
let onMessageReceived = function(event) {
|
|
194
|
-
const messageList = event.data;
|
|
195
|
-
messageList.forEach((message) => {
|
|
196
|
-
if (message?.type === 'TIMGroupSystemNoticeElem') {
|
|
197
|
-
if (message.payload?.operationType === 1) {
|
|
198
|
-
unhandledCount++;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
})
|
|
202
|
-
};
|
|
203
|
-
chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
|
|
204
|
-
```
|
|
205
|
-
- Handle Group Join Applications
|
|
206
|
-
API: [handleGroupApplication](https://trtc.io/document/48465?product=chat&menulabel=core%20sdk&platform=javascript#processing-(approving-or-rejecting)-a-group-join-request)
|
|
207
|
-
|
|
208
|
-
```typescript
|
|
209
|
-
// Handle group join requests by getting the pending list
|
|
210
|
-
let promise = chat.getGroupApplicationList();
|
|
211
|
-
promise.then(function(imResponse) {
|
|
212
|
-
const { applicationList } = imResponse.data;
|
|
213
|
-
applicationList.forEach((item) => {
|
|
214
|
-
if (item.applicationType === 0) {
|
|
215
|
-
chat.handleGroupApplication({
|
|
216
|
-
handleAction: 'Agree',
|
|
217
|
-
application: {...item},
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}).catch(function(imError) {});
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## Scenario 2: Solution when the customer integrates Chat UIKit with UI or integrates ChatEngine
|
|
225
|
-
- Get Group Application List During Initialization, API: [getGroupApplicationList](https://web.sdk.qcloud.com/im/doc/chat-engine/en/ITUIGroupService.html#getGroupApplicationList)
|
|
226
|
-
- Get the Number of Unhandled Group Join Requests. Based on the list data returned by `getGroupApplicationList`, `applicationType = 0` represents the number of group join requests.
|
|
227
|
-
```typescript
|
|
228
|
-
import { TUIGroupService } from '@tencentcloud/chat-uikit-engine-lite';
|
|
229
|
-
|
|
230
|
-
let unhandledCount = 0;
|
|
231
|
-
let promise = TUIGroupService.getGroupApplicationList();
|
|
232
|
-
promise.then(function(imResponse) {
|
|
233
|
-
const { applicationList } = imResponse.data;
|
|
234
|
-
applicationList.forEach((item) => {
|
|
235
|
-
// item.applicant - Applicant's userID
|
|
236
|
-
// item.applicantNick - Applicant's nickname
|
|
237
|
-
// item.groupID - Group ID
|
|
238
|
-
// item.groupName - Group name
|
|
239
|
-
// item.applicationType - Application type: 0 for join group request, 2 for invitation to join group
|
|
240
|
-
// item.userID - When applicationType = 2, this is the invited user's userID
|
|
241
|
-
// item.note - Additional message, not supported for group invitations, returns empty string
|
|
242
|
-
if (item.applicationType === 0) {
|
|
243
|
-
unhandledCount++;
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
}).catch(function(imError) {});
|
|
247
|
-
```
|
|
248
|
-
- Update Unread Count When Receiving Group Join Requests Online
|
|
249
|
-
This requires monitoring the [GroupStore](https://web.sdk.qcloud.com/im/doc/chat-engine/en/global.html#GroupStore) provided `groupSystemNoticeList` key through TUIStore.
|
|
250
|
-
```typescript
|
|
251
|
-
// For Message data structure details, please refer to https://trtc.io/document/47990?product=chat&menulabel=core%20sdk&platform=javascript
|
|
252
|
-
import { TUIStore, StoreName } from '@tencentcloud/chat-uikit-engine-lite';
|
|
253
|
-
|
|
254
|
-
let unhandledCount = 0;
|
|
255
|
-
let onGroupSystemNoticeListUpdated = function(messageList = []) {
|
|
256
|
-
messageList.forEach((message) => {
|
|
257
|
-
if (message?.type === 'TIMGroupSystemNoticeElem') {
|
|
258
|
-
if (message.payload?.operationType === 1) {
|
|
259
|
-
unhandledCount++;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
})
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
TUIStore.watch(StoreName.GRP, {
|
|
266
|
-
groupSystemNoticeList: onGroupSystemNoticeListUpdated,
|
|
267
|
-
})
|
|
268
|
-
```
|
|
269
|
-
- Handle Group Join Applications, API: [handleGroupApplication](https://web.sdk.qcloud.com/im/doc/chat-engine/en/ITUIGroupService.html#handleGroupApplication)
|
|
270
|
-
|
|
271
|
-
```typescript
|
|
272
|
-
import { TUIGroupService } from '@tencentcloud/chat-uikit-engine-lite';
|
|
273
|
-
|
|
274
|
-
// Handle group join requests by getting the pending list
|
|
275
|
-
let promise = TUIGroupService.getGroupApplicationList();
|
|
276
|
-
promise.then(function(imResponse) {
|
|
277
|
-
const { applicationList } = imResponse.data;
|
|
278
|
-
applicationList.forEach((item) => {
|
|
279
|
-
if (item.applicationType === 0) {
|
|
280
|
-
TUIGroupService.handleGroupApplication({
|
|
281
|
-
handleAction: 'Agree',
|
|
282
|
-
application: {...item},
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
}).catch(function(imError) {});
|
|
287
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
product: 'Chat'
|
|
3
|
-
tech_stack: 'flutter_native_sdk'
|
|
4
|
-
framework: 'flutter'
|
|
5
|
-
title: 'Flutter UIKit Integration and Common Issue Solutions'
|
|
6
|
-
keywords: ['flutter', 'initialization', 'component', 'integration', 'TUIKit']
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Flutter TUIKit Integration and Common Issue Solutions
|
|
10
|
-
|
|
11
|
-
## Important Notice
|
|
12
|
-
- Agent must strictly output results according to the example code of the interface
|
|
13
|
-
|
|
14
|
-
## Module 1: Common Issue Solutions (Topic: Question)
|
|
15
|
-
|
|
16
|
-
### Q: How to set message do-not-disturb in Flutter Chat SDK or UIKit?
|
|
17
|
-
|
|
18
|
-
**A:** Flutter Chat message do-not-disturb related APIs:
|
|
19
|
-
- Set one-to-one chat message do-not-disturb option [setC2CReceiveMessageOpt](https://pub.dev/documentation/tencent_cloud_chat_sdk/latest/manager_v2_tim_message_manager/V2TIMMessageManager/setC2CReceiveMessageOpt.html).
|
|
20
|
-
- Query one-to-one chat message do-not-disturb option [getC2CReceiveMessageOpt](https://pub.dev/documentation/tencent_cloud_chat_sdk/latest/manager_v2_tim_message_manager/V2TIMMessageManager/setC2CReceiveMessageOpt.html).
|
|
21
|
-
- Set group chat message do-not-disturb option [setGroupReceiveMessageOpt](https://pub.dev/documentation/tencent_cloud_chat_sdk/latest/manager_v2_tim_message_manager/V2TIMMessageManager/setGroupReceiveMessageOpt.html).
|
|
22
|
-
|
|
23
|
-
Message do-not-disturb documentation (no UI): https://cloud.tencent.com/document/product/269/75355
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
TUIKit Flutter provides powerful appearance customization capabilities, supporting custom theme modes (Light/Dark/Follow System) and theme colors for your application. Through simple configuration, developers can easily implement app-level theme switching and brand color customization.
|
|
2
|
-
|
|
3
|
-
Taking the message list as an example, the effects of custom theme modes and theme colors are shown below:
|
|
4
|
-
| **Light + Default Color** | **Light + Orange** | **Dark + Default Color** | **Dark + Green Theme** |
|
|
5
|
-
| --- | --- | --- | --- |
|
|
6
|
-
| | | | |
|
|
7
|
-
|
|
8
|
-
## Core Capabilities
|
|
9
|
-
|
|
10
|
-
**Mode Switching**
|
|
11
|
-
- Light Mode: Bright interface suitable for daytime use.
|
|
12
|
-
|
|
13
|
-
- Dark Mode: Dark interface suitable for nighttime use.
|
|
14
|
-
|
|
15
|
-
- Follow System: Automatically follows system appearance settings.
|
|
16
|
-
|
|
17
|
-
**Theme Color Customization**
|
|
18
|
-
|
|
19
|
-
- Preset Theme Colors: Provides standard colors like blue, green, red, orange, etc.
|
|
20
|
-
|
|
21
|
-
- Custom Theme Colors: Supports any Hex format color.
|
|
22
|
-
|
|
23
|
-
- Smart Palette Generation: Automatically generates a complete palette of 10 color shades.
|
|
24
|
-
|
|
25
|
-
- Clear Customization: One-click restore to default theme color.
|
|
26
|
-
|
|
27
|
-
## API Reference
|
|
28
|
-
|
|
29
|
-
The above functionalities are based on a set of concise APIs provided by `ThemeState` for theme configuration and information queries.
|
|
30
|
-
|
|
31
|
-
### Set Theme Mode
|
|
32
|
-
| Method | Parameters | Return Value | Description |
|
|
33
|
-
| --- | --- | --- | --- |
|
|
34
|
-
| `setThemeMode` | `ThemeType` | `void` | Sets the display mode, automatically saves and refreshes.<br>• `ThemeType.SYSTEM`: Follow system appearance.<br>• `ThemeType.LIGHT`: Force light mode.<br>• `ThemeType.DARK`: Force dark mode. |
|
|
35
|
-
|
|
36
|
-
### Set Theme Color
|
|
37
|
-
| Method | Parameters | Return Value | Description |
|
|
38
|
-
| --- | --- | --- | --- |
|
|
39
|
-
| `setPrimaryColor` | `String` | `Unit` | Sets the theme color, requires Hex format (e.g., "#1C66E5"). |
|
|
40
|
-
| `clearPrimaryColor` | None | `Unit` | Clears custom theme color and restores default blue. |
|
|
41
|
-
|
|
42
|
-
> **Note:**
|
|
43
|
-
>
|
|
44
|
-
> - After calling `setThemeMode` or `setPrimaryColor`, the configuration is automatically saved to persistent storage without manual saving. It will automatically load on next app launch.
|
|
45
|
-
> - Cache is automatically cleared when modifying theme configuration, ensuring the color scheme updates in real-time. Developers don't need to manage cache.
|
|
46
|
-
> - Avoid frequently switching themes when using settings APIs (e.g., calling in a loop).
|
|
47
|
-
|
|
48
|
-
### Query ThemeState Information
|
|
49
|
-
|
|
50
|
-
The following read-only properties can be used to query the current theme configuration status and information:
|
|
51
|
-
| Property | Type | Description |
|
|
52
|
-
| --- | --- | --- |
|
|
53
|
-
| `currentMode` | `ThemeType` | Current theme mode. |
|
|
54
|
-
| `currentPrimaryColor` | `String?` | Current theme color (Hex format). |
|
|
55
|
-
| `hasCustomPrimaryColor` | `Boolean` | Whether a custom theme color is set. |
|
|
56
|
-
| `isDarkMode` | `Boolean` | Whether currently in dark mode. |
|
|
57
|
-
|
|
58
|
-
## Usage
|
|
59
|
-
|
|
60
|
-
This section introduces how to integrate and use theme and theme color customization features in your application, providing three approaches from simple to complex.
|
|
61
|
-
|
|
62
|
-
### Approach 1: Using AppBuilder Configuration (Recommended)
|
|
63
|
-
|
|
64
|
-
AppBuilder is a convenient feature and UI customization configuration tool, managed through JSON configuration files, suitable for scenarios where Web + Native dual-platform applications need to maintain a unified appearance.
|
|
65
|
-
|
|
66
|
-
You can experience the AppBuilder feature at [Chat Web Demo](https://trtc.io/demo/homepage/#/detail?scene=messenger), experience entry:
|
|
67
|
-
|
|
68
|
-
Although the Chat Web Demo currently cannot preview mobile configuration effects in real-time, mobile platforms already support AppBuilder's configuration capabilities.
|
|
69
|
-
|
|
70
|
-
Next, we'll introduce how to apply custom configurations to mobile projects after setting up AppBuilder in the Web demo. The process is quite simple, with only 2 steps:
|
|
71
|
-
1. Download the configuration file.
|
|
72
|
-
|
|
73
|
-
2. Drag the configuration file appConfig.json into your Flutter project.
|
|
74
|
-
|
|
75
|
-
3. Load the configuration file when the app starts.
|
|
76
|
-
|
|
77
|
-
#### Step 1: Download Configuration File
|
|
78
|
-
|
|
79
|
-
Visit [Chat Web Demo](https://trtc.io/demo/homepage/#/detail?scene=messenger) and download the appConfig.json configuration file. The download path is:
|
|
80
|
-
|
|
81
|
-
The `appConfig.json` file content is shown below, corresponding one-to-one with the configuration items on the AppBuilder page. The appearance-related configurations are `theme` and its subfields:
|
|
82
|
-
``` json
|
|
83
|
-
{
|
|
84
|
-
"theme": {
|
|
85
|
-
"mode": "light", // Theme mode: light-Light mode, dark-Dark mode, system-Follow system
|
|
86
|
-
"primaryColor": "#E65100" // Primary color, hex color value
|
|
87
|
-
},
|
|
88
|
-
"messageList": {
|
|
89
|
-
"alignment": "two-sided",
|
|
90
|
-
"enableReadReceipt": false,
|
|
91
|
-
"messageActionList": [
|
|
92
|
-
"copy",
|
|
93
|
-
"recall",
|
|
94
|
-
"quote",
|
|
95
|
-
"forward",
|
|
96
|
-
"delete"
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
"conversationList": {
|
|
100
|
-
"enableCreateConversation": true,
|
|
101
|
-
"conversationActionList": [
|
|
102
|
-
"delete",
|
|
103
|
-
"mute",
|
|
104
|
-
"pin",
|
|
105
|
-
"markUnread"
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
"messageInput": {
|
|
109
|
-
"hideSendButton": false,
|
|
110
|
-
"attachmentPickerMode": "collapsed"
|
|
111
|
-
},
|
|
112
|
-
"search": {
|
|
113
|
-
"hideSearch": false
|
|
114
|
-
},
|
|
115
|
-
"avatar": {
|
|
116
|
-
"shape": "circular"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**Configuration Options**
|
|
122
|
-
| Parameter | Type | Options | Description |
|
|
123
|
-
| --- | --- | --- | --- |
|
|
124
|
-
| `mode` | String | `"system"`, `"light"`, `"dark"` | Theme mode |
|
|
125
|
-
| `primaryColor` | String | Hex color value, e.g., `"#0ABF77"` | Theme color |
|
|
126
|
-
|
|
127
|
-
#### Step 2: Add Configuration File to Project
|
|
128
|
-
|
|
129
|
-
Drag appConfig.json into your project. Taking the GitHub open source Demo [TUIKit Flutter](https://github.com/Tencent-RTC/TUIKit_Flutter/tree/main) project as an example, appConfig.json is located in the demo's assets folder:
|
|
130
|
-
|
|
131
|
-
And configure assets resources in the project's pubspec.yaml file:
|
|
132
|
-
``` java
|
|
133
|
-
assets:
|
|
134
|
-
- assets/
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
#### Step 3: Load Configuration File
|
|
138
|
-
|
|
139
|
-
Please set the JSON file path and load the configuration file when your app starts.
|
|
140
|
-
``` java
|
|
141
|
-
class _MyAppState extends State<MyApp> {
|
|
142
|
-
bool _isInitialized = false;
|
|
143
|
-
|
|
144
|
-
@override
|
|
145
|
-
void initState() {
|
|
146
|
-
super.initState();
|
|
147
|
-
_initializeApp();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
Future<void> _initializeApp() async {
|
|
151
|
-
await StorageUtil.init();
|
|
152
|
-
await AppBuilder.init(configPath: 'packages/uikit_next/assets/appConfig.json');
|
|
153
|
-
|
|
154
|
-
if (mounted) {
|
|
155
|
-
setState(() {
|
|
156
|
-
_isInitialized = true;
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
After this, when you launch the app, the mode and theme color of TUIKit Flutter components will automatically display the values you set in appConfig.json.
|
|
164
|
-
|
|
165
|
-
### Approach 2: Set Theme Mode via Code
|
|
166
|
-
|
|
167
|
-
You can directly set the theme mode through the API `setThemeMode`. Example code:
|
|
168
|
-
``` swift
|
|
169
|
-
val themeState = ThemeState.shared
|
|
170
|
-
Column {
|
|
171
|
-
Button(onClick = {
|
|
172
|
-
themeState.setThemeMode(ThemeMode.SYSTEM)
|
|
173
|
-
}) { Text(text = "Follow System") }
|
|
174
|
-
Button(onClick = {
|
|
175
|
-
themeState.setThemeMode(ThemeMode.LIGHT)
|
|
176
|
-
}) { Text(text = "Light Mode") }
|
|
177
|
-
Button(onClick = {
|
|
178
|
-
themeState.setThemeMode(ThemeMode.DARK)
|
|
179
|
-
}) { Text(text = "Dark Mode") }
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Approach 3: Set Theme Color via Code
|
|
184
|
-
|
|
185
|
-
You can set the theme color through the API `setPrimaryColor` by passing a primary color value. The entire TUIKit Flutter component will automatically adapt a set of similar color values in the same color scheme based on this primary color value to render the interface, without the need for manual UI adaptation. Example code:
|
|
186
|
-
``` swift
|
|
187
|
-
final themeState = BaseThemeProvider.of(context);
|
|
188
|
-
themeState.setPrimaryColor('#1C66E5');
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
> **Usage Recommendations:**
|
|
192
|
-
>
|
|
193
|
-
> - For most applications, it's recommended to use the JSON configuration file approach, which is simple, reliable, and supports multi-platform uniformity.
|
|
194
|
-
> - Consistently use colors from `themeState.colors` throughout the application to ensure interface consistency when switching themes.
|
|
195
|
-
|
|
196
|
-
## FAQ
|
|
197
|
-
|
|
198
|
-
### **How to determine if currently in dark mode?**
|
|
199
|
-
``` java
|
|
200
|
-
if (themeState.isDarkMode) {
|
|
201
|
-
// Currently in dark mode
|
|
202
|
-
} else {
|
|
203
|
-
// Currently in light mode
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### **Can I set transparency?**
|
|
208
|
-
|
|
209
|
-
Not supported. Theme colors only support 6-digit Hex format (RGB), not 8-digit format (RGBA).
|
|
210
|
-
|
|
211
|
-
### **How to restore default theme?**
|
|
212
|
-
``` swift
|
|
213
|
-
themeState.clearPrimaryColor() // Clear custom theme color
|
|
214
|
-
themeState.setThemeMode(ThemeType.SYSTEM) // Restore follow system
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### **Where is theme configuration stored?**
|
|
218
|
-
|
|
219
|
-
Stored in the app's persistent storage. It will be lost after uninstalling the app and will restore to default configuration after reinstalling.
|
|
220
|
-
|
|
221
|
-
### **How to get the complete current theme configuration?**
|
|
222
|
-
``` swift
|
|
223
|
-
final themeState = BaseThemeProvider.of(context);
|
|
224
|
-
final config = themeState.currentTheme;
|
|
225
|
-
print("Mode: ${config.type}");
|
|
226
|
-
print("Theme Color: ${config.primaryColor ?? "Default"}");
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### **Can I set mode and theme color simultaneously?**
|
|
230
|
-
|
|
231
|
-
Yes, you can call both methods separately, and the system will automatically merge the configurations:
|
|
232
|
-
``` swift
|
|
233
|
-
themeState.setThemeMode(ThemeType.DARK)
|
|
234
|
-
themeState.setPrimaryColor("#0ABF77")
|
|
235
|
-
```
|