@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.
Files changed (307) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +53 -39
  3. package/knowledge/build-index.js +31 -4
  4. package/knowledge/chunker.js +82 -14
  5. package/knowledge/chunking-policy.js +100 -0
  6. package/knowledge/content-loader.js +3 -1
  7. package/knowledge/frontmatter-meta.js +167 -0
  8. package/knowledge/path-meta.js +28 -6
  9. package/knowledge/search/exact-lookup.js +9 -227
  10. package/knowledge/search/filter-pool.js +17 -26
  11. package/knowledge/search/framework-fallback.js +22 -0
  12. package/knowledge/search/intent-router.js +13 -0
  13. package/knowledge/search/query-normalizer.js +129 -0
  14. package/knowledge/search/search-core.js +391 -0
  15. package/knowledge/search/search-knowledge.js +351 -323
  16. package/knowledge/search/search-message.js +87 -0
  17. package/knowledge/search/search-pass.js +428 -0
  18. package/knowledge/search/search-types.js +1 -0
  19. package/knowledge/search/url-row-scorer.js +258 -0
  20. package/package.json +1 -1
  21. package/resource/_schema/feature-aliases.yaml +1 -0
  22. package/resource/_schema/query-normalization.yaml +9 -0
  23. package/resource/index/manifest.json +1 -1
  24. package/resource/integration/callkit/preset/android/integration.md +3 -14
  25. package/resource/integration/callkit/preset/flutter/integration.md +1 -12
  26. package/resource/integration/callkit/preset/ios/integration.md +2 -12
  27. package/resource/integration/callkit/preset/react/integration.md +1 -14
  28. package/resource/integration/callkit/preset/vue/integration.md +1 -14
  29. package/resource/integration/chat/preset/android/integration.md +6 -13
  30. package/resource/integration/chat/preset/flutter/integration.md +1 -8
  31. package/resource/integration/chat/preset/ios/integration.md +4 -12
  32. package/resource/integration/chat/preset/react/integration.md +6 -16
  33. package/resource/integration/chat/preset/vue/integration.md +0 -9
  34. package/resource/integration/livekit/preset/live/android/live-audience-integration.md +2 -6
  35. package/resource/integration/livekit/preset/live/android/live-host-integration.md +1 -11
  36. package/resource/integration/livekit/preset/live/android/live-list-integration.md +2 -6
  37. package/resource/integration/livekit/preset/live/android/prepare-integration.md +2 -7
  38. package/resource/integration/livekit/preset/live/ios/live-audience-integration.md +2 -7
  39. package/resource/integration/livekit/preset/live/ios/live-host-integration.md +1 -13
  40. package/resource/integration/livekit/preset/live/ios/live-list-integration.md +2 -10
  41. package/resource/integration/livekit/preset/live/ios/prepare-integration.md +3 -8
  42. package/resource/integration/livekit/preset/live/vue/live-list-integration.md +0 -4
  43. package/resource/integration/livekit/preset/live/vue/live-player-desk-integration.md +1 -5
  44. package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +2 -7
  45. package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +2 -8
  46. package/resource/integration/roomkit/preset/vue/integration.md +0 -11
  47. package/resource/knowledge/callkit/best-practice/callkit-miniprogram/uniapp-shrink.md +60 -0
  48. package/resource/knowledge/callkit/best-practice/common/call-autoplay-blocked.md +77 -0
  49. package/resource/knowledge/callkit/best-practice/common/call-message-in-chat.md +78 -0
  50. package/resource/knowledge/callkit/best-practice/common/call-vs-calls.md +110 -0
  51. package/resource/knowledge/callkit/best-practice/common/callengine-call-flow.md +123 -0
  52. package/resource/knowledge/callkit/best-practice/common/callengine-log-level.md +67 -0
  53. package/resource/knowledge/callkit/best-practice/common/callkit-get-engine-instance.md +81 -0
  54. package/resource/knowledge/callkit/best-practice/common/callkit-get-roomid.md +78 -0
  55. package/resource/knowledge/callkit/best-practice/common/callkit-limitations.md +37 -0
  56. package/resource/knowledge/callkit/best-practice/common/callkit-user-register-and-kicked.md +98 -0
  57. package/resource/knowledge/callkit/core-sdk/android/answer-call.md +0 -7
  58. package/resource/knowledge/callkit/core-sdk/android/make-call.md +0 -8
  59. package/resource/knowledge/callkit/core-sdk/android/offline-push.md +1 -9
  60. package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +2 -8
  61. package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +2 -8
  62. package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +1 -16
  63. package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +0 -8
  64. package/resource/knowledge/callkit/core-sdk/ios/make-call.md +0 -8
  65. package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +0 -11
  66. package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +178 -200
  67. package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +195 -217
  68. package/resource/knowledge/callkit/faq/android.md +4 -14
  69. package/resource/knowledge/callkit/faq/common.md +0 -2
  70. package/resource/knowledge/callkit/faq/error-code.md +2 -4
  71. package/resource/knowledge/callkit/faq/ios.md +1 -4
  72. package/resource/knowledge/callkit/preset/android/api.md +0 -6
  73. package/resource/knowledge/callkit/preset/ios/api.md +0 -4
  74. package/resource/knowledge/callkit/preset/react/api.md +3 -4
  75. package/resource/knowledge/callkit/preset/vue/api.md +3 -4
  76. package/resource/knowledge/chat/best-practice/common/avchatroom-message-loss-diagnosis.md +65 -0
  77. package/resource/knowledge/chat/best-practice/common/group-conversation-cleanup-on-system-notice.md +62 -0
  78. package/resource/knowledge/chat/best-practice/common/image-message-url-lifecycle.md +59 -0
  79. package/resource/knowledge/chat/best-practice/common/login-repeat-2025-diagnosis.md +61 -0
  80. package/resource/knowledge/chat/best-practice/common/message-read-report-and-receipt.md +64 -0
  81. package/resource/knowledge/chat/best-practice/common/message-receive-event.md +65 -0
  82. package/resource/knowledge/chat/best-practice/common/message-risk-error-and-render.md +65 -0
  83. package/resource/knowledge/chat/best-practice/common/message-unread-count.md +71 -0
  84. package/resource/knowledge/chat/best-practice/miniprogram/audio-message-send.md +113 -0
  85. package/resource/knowledge/chat/best-practice/miniprogram/login-timeout-2801-diagnosis.md +63 -0
  86. package/resource/knowledge/chat/best-practice/miniprogram/media-upload-fail-diagnosis.md +64 -0
  87. package/resource/knowledge/chat/best-practice/web/audio-message-send.md +118 -0
  88. package/resource/knowledge/chat/preset/android/features/chat-setting.md +0 -5
  89. package/resource/knowledge/chat/preset/android/features/contact-list.md +0 -7
  90. package/resource/knowledge/chat/preset/android/features/conversation-list.md +0 -6
  91. package/resource/knowledge/chat/preset/android/features/language.md +0 -8
  92. package/resource/knowledge/chat/preset/android/features/message-input.md +0 -6
  93. package/resource/knowledge/chat/preset/android/features/message-list.md +0 -8
  94. package/resource/knowledge/chat/preset/android/features/search.md +0 -7
  95. package/resource/knowledge/chat/preset/android/features/theme.md +0 -4
  96. package/resource/knowledge/chat/preset/android-view/integration.md +0 -6
  97. package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +0 -4
  98. package/resource/knowledge/chat/preset/flutter/features/contact-list.md +0 -9
  99. package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +0 -7
  100. package/resource/knowledge/chat/preset/flutter/features/language.md +0 -5
  101. package/resource/knowledge/chat/preset/flutter/features/message-input.md +0 -6
  102. package/resource/knowledge/chat/preset/flutter/features/message-list.md +0 -8
  103. package/resource/knowledge/chat/preset/flutter/features/search.md +0 -5
  104. package/resource/knowledge/chat/preset/flutter/features/theme.md +0 -4
  105. package/resource/knowledge/chat/preset/ios/features/chat-setting.md +0 -5
  106. package/resource/knowledge/chat/preset/ios/features/contact-list.md +0 -5
  107. package/resource/knowledge/chat/preset/ios/features/conversation-list.md +0 -7
  108. package/resource/knowledge/chat/preset/ios/features/language.md +1 -8
  109. package/resource/knowledge/chat/preset/ios/features/message-input.md +0 -6
  110. package/resource/knowledge/chat/preset/ios/features/message-list.md +0 -8
  111. package/resource/knowledge/chat/preset/ios/features/search.md +0 -5
  112. package/resource/knowledge/chat/preset/ios/features/theme.md +0 -4
  113. package/resource/knowledge/chat/preset/ios-uikit/integration.md +0 -6
  114. package/resource/knowledge/chat/preset/react/features/contact-list.md +0 -23
  115. package/resource/knowledge/chat/preset/react/features/conversation-actions.md +2 -11
  116. package/resource/knowledge/chat/preset/react/features/conversation-list.md +4 -26
  117. package/resource/knowledge/chat/preset/react/features/conversation-preview.md +0 -6
  118. package/resource/knowledge/chat/preset/react/features/search.md +0 -1
  119. package/resource/knowledge/chat/preset/react/features/theme.md +0 -1
  120. package/resource/knowledge/chat/preset/vue/features/contact-list.md +3 -9
  121. package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +0 -3
  122. package/resource/knowledge/chat/preset/vue/features/conversation-list.md +2 -13
  123. package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +2 -3
  124. package/resource/knowledge/chat/preset/vue/features/conversation-search.md +1 -0
  125. package/resource/knowledge/chat/preset/vue/features/search.md +4 -3
  126. package/resource/knowledge/chat/urls/sdk/web.md +1 -1
  127. package/resource/knowledge/livekit/best-practice/android/voice-room-anchor-start.md +120 -0
  128. package/resource/knowledge/livekit/best-practice/common/admin-take-seat.md +73 -0
  129. package/resource/knowledge/livekit/best-practice/common/audience-leave-live.md +81 -0
  130. package/resource/knowledge/livekit/best-practice/common/voice-room-no-audio-troubleshoot.md +100 -0
  131. package/resource/knowledge/livekit/best-practice/common/voice-room-seat-list-change.md +65 -0
  132. package/resource/knowledge/livekit/best-practice/flutter/voice-room-anchor-start.md +122 -0
  133. package/resource/knowledge/livekit/best-practice/ios/voice-room-anchor-start.md +126 -0
  134. package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +0 -7
  135. package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +0 -3
  136. package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +0 -3
  137. package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +0 -1
  138. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +0 -5
  139. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +0 -3
  140. package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +0 -2
  141. package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +0 -2
  142. package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +0 -2
  143. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +0 -2
  144. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +0 -1
  145. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +0 -2
  146. package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +0 -2
  147. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +0 -7
  148. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +0 -3
  149. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +0 -1
  150. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +0 -3
  151. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +0 -5
  152. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +0 -3
  153. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +0 -2
  154. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +0 -2
  155. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +0 -2
  156. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +0 -2
  157. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +0 -1
  158. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +0 -2
  159. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +1 -3
  160. package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +0 -7
  161. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +0 -3
  162. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +0 -1
  163. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +0 -3
  164. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +0 -5
  165. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +0 -3
  166. package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +0 -2
  167. package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +0 -2
  168. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +0 -2
  169. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +0 -2
  170. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +0 -1
  171. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +0 -2
  172. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +0 -2
  173. package/resource/knowledge/livekit/core-sdk/features/android/audience-list.md +2 -2
  174. package/resource/knowledge/livekit/core-sdk/features/android/audio-effect.md +2 -3
  175. package/resource/knowledge/livekit/core-sdk/features/android/barrage.md +2 -2
  176. package/resource/knowledge/livekit/core-sdk/features/android/base-beauty.md +2 -2
  177. package/resource/knowledge/livekit/core-sdk/features/android/gift.md +2 -7
  178. package/resource/knowledge/livekit/core-sdk/features/android/live-list.md +3 -4
  179. package/resource/knowledge/livekit/core-sdk/features/flutter/audience-list.md +2 -2
  180. package/resource/knowledge/livekit/core-sdk/features/flutter/audio-effect.md +2 -4
  181. package/resource/knowledge/livekit/core-sdk/features/flutter/barrage.md +2 -2
  182. package/resource/knowledge/livekit/core-sdk/features/flutter/base-beauty.md +0 -2
  183. package/resource/knowledge/livekit/core-sdk/features/flutter/gift.md +2 -7
  184. package/resource/knowledge/livekit/core-sdk/features/flutter/live-list.md +3 -2
  185. package/resource/knowledge/livekit/core-sdk/features/ios/audience-list.md +2 -2
  186. package/resource/knowledge/livekit/core-sdk/features/ios/audio-effect.md +2 -4
  187. package/resource/knowledge/livekit/core-sdk/features/ios/barrage.md +2 -2
  188. package/resource/knowledge/livekit/core-sdk/features/ios/base-beauty.md +2 -2
  189. package/resource/knowledge/livekit/core-sdk/features/ios/gift.md +2 -7
  190. package/resource/knowledge/livekit/core-sdk/features/ios/live-list.md +3 -4
  191. package/resource/knowledge/livekit/core-sdk/live/android/co-guest-interaction.md +0 -3
  192. package/resource/knowledge/livekit/core-sdk/live/android/host-interaction.md +0 -4
  193. package/resource/knowledge/livekit/core-sdk/live/android/integration.md +1 -4
  194. package/resource/knowledge/livekit/core-sdk/live/flutter/co-guest-interaction.md +1 -3
  195. package/resource/knowledge/livekit/core-sdk/live/flutter/host-interaction.md +0 -1
  196. package/resource/knowledge/livekit/core-sdk/live/flutter/integration.md +1 -4
  197. package/resource/knowledge/livekit/core-sdk/live/ios/co-guest-interaction.md +0 -3
  198. package/resource/knowledge/livekit/core-sdk/live/ios/host-interaction.md +0 -3
  199. package/resource/knowledge/livekit/core-sdk/live/ios/integration.md +1 -4
  200. package/resource/knowledge/livekit/core-sdk/voice/android/co-guest-interaction.md +0 -2
  201. package/resource/knowledge/livekit/core-sdk/voice/android/host-interaction.md +0 -5
  202. package/resource/knowledge/livekit/core-sdk/voice/android/integration.md +1 -4
  203. package/resource/knowledge/livekit/core-sdk/voice/flutter/co-guest-interaction.md +1 -4
  204. package/resource/knowledge/livekit/core-sdk/voice/flutter/integration.md +3 -6
  205. package/resource/knowledge/livekit/core-sdk/voice/ios/co-guest-interaction.md +0 -2
  206. package/resource/knowledge/livekit/core-sdk/voice/ios/host-interaction.md +0 -4
  207. package/resource/knowledge/livekit/core-sdk/voice/ios/integration.md +1 -4
  208. package/resource/knowledge/livekit/faq/error-code.md +0 -1
  209. package/resource/knowledge/livekit/preset/live/vue/features/barrage.md +2 -3
  210. package/resource/knowledge/livekit/preset/live/vue/features/live-audience-list.md +3 -3
  211. package/resource/knowledge/livekit/preset/live/vue/features/live-view.md +3 -3
  212. package/resource/knowledge/push/api-reference/android.md +0 -1
  213. package/resource/knowledge/push/api-reference/harmonyos.md +0 -2
  214. package/resource/knowledge/push/api-reference/react-native.md +3 -5
  215. package/resource/knowledge/push/api-reference/uni-app.md +3 -5
  216. package/resource/knowledge/push/api-reference/unity.md +0 -1
  217. package/resource/knowledge/push/api-reference/unreal-engine.md +0 -1
  218. package/resource/knowledge/push/config/android.md +0 -24
  219. package/resource/knowledge/push/config/harmonyos.md +0 -1
  220. package/resource/knowledge/push/config/ios.md +0 -3
  221. package/resource/knowledge/push/config/react-native.md +0 -29
  222. package/resource/knowledge/push/config/unity.md +1 -24
  223. package/resource/knowledge/push/config/unreal-engine.md +1 -24
  224. package/resource/knowledge/push/integration/android.md +0 -14
  225. package/resource/knowledge/push/integration/flutter.md +0 -19
  226. package/resource/knowledge/push/integration/harmonyos.md +0 -2
  227. package/resource/knowledge/push/integration/ios.md +0 -3
  228. package/resource/knowledge/push/integration/react-native.md +0 -24
  229. package/resource/knowledge/push/integration/uni-app.md +1 -11
  230. package/resource/knowledge/push/integration/unity.md +0 -9
  231. package/resource/knowledge/push/integration/unreal-engine.md +1 -17
  232. package/resource/knowledge/roomkit/best-practice/common/room-ghost-member.md +70 -0
  233. package/resource/knowledge/roomkit/best-practice/common/room-limit-and-multi.md +83 -0
  234. package/resource/knowledge/roomkit/best-practice/common/room-screen-share-preview.md +83 -0
  235. package/resource/knowledge/roomkit/best-practice/common/room-status-after-all-leave.md +69 -0
  236. package/resource/knowledge/roomkit/best-practice/vue/room-uikit-vs-atomicx.md +111 -0
  237. package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +0 -4
  238. package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +0 -4
  239. package/resource/knowledge/roomkit/core-sdk/android/room-state.md +0 -4
  240. package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +1 -5
  241. package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +0 -4
  242. package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +0 -4
  243. package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +0 -4
  244. package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +1 -5
  245. package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +1 -1
  246. package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +0 -6
  247. package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +0 -9
  248. package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +0 -11
  249. package/resource/knowledge/roomkit/core-sdk/vue/room-participant-state.md +1 -5
  250. package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +1 -8
  251. package/resource/knowledge/roomkit/core-sdk/vue/room-view.md +0 -3
  252. package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +0 -3
  253. package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +0 -5
  254. package/resource/knowledge/roomkit/preset/android/integration.md +0 -4
  255. package/resource/knowledge/roomkit/preset/flutter/integration.md +1 -13
  256. package/resource/knowledge/roomkit/preset/ios/integration.md +0 -6
  257. package/resource/knowledge/roomkit/preset/react/integration.md +0 -16
  258. package/resource/knowledge/rtcengine/web/api.md +1 -8
  259. package/resource/knowledge/rtcengine/web/faq.md +3 -5
  260. package/resource/knowledge/rtcengine/web/how_to_integrated_web_sdk.md +0 -6
  261. package/resource/knowledge/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +1 -1
  262. package/resource/knowledge/rtcengine/web/plugin/21-advanced-auto-play-policy.md +1 -1
  263. package/resource/knowledge/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +1 -1
  264. package/resource/knowledge/rtcengine/web/plugin/27-advanced-small-stream.md +1 -1
  265. package/resource/knowledge/rtcengine/web/plugin/30-advanced-cross-room-link.md +2 -0
  266. package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -3
  267. package/resource/knowledge/rtcengine/web/plugin/34-advanced-proxy.md +2 -4
  268. package/resource/knowledge/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -4
  269. package/resource/knowledge/rtcengine/web/plugin/39-advanced-video-decoder.md +1 -1
  270. package/resource/knowledge/trtc/android/TRTCCloud.md +8 -56
  271. package/resource/knowledge/trtc/android/TRTCCloudDef.md +6 -7
  272. package/resource/knowledge/trtc/android/TRTCCloudListener.md +1 -18
  273. package/resource/knowledge/trtc/android/TXAudioEffectManager.md +0 -14
  274. package/resource/knowledge/trtc/android/TXDeviceManager.md +0 -1
  275. package/resource/knowledge/trtc/android/TXLiteAVCode.md +1 -1
  276. package/resource/knowledge/trtc/c++/ITRTCCloud.md +7 -59
  277. package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +0 -14
  278. package/resource/knowledge/trtc/c++/ITXDeviceManager.md +0 -4
  279. package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1 -19
  280. package/resource/knowledge/trtc/c++/TRTCTypeDef.md +6 -7
  281. package/resource/knowledge/trtc/c++/TXLiteAVCode.md +1 -1
  282. package/resource/knowledge/trtc/ios/TRTCCloud.md +9 -60
  283. package/resource/knowledge/trtc/ios/TRTCCloudDef.md +6 -7
  284. package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1 -19
  285. package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +0 -13
  286. package/resource/knowledge/trtc/ios/TXDeviceManager.md +0 -4
  287. package/resource/knowledge/trtc/ios/TXLiteAVCode.md +1 -1
  288. package/server.js +27 -22
  289. package/tools/common/finalize_answer.js +9 -1
  290. package/tools/common/search_trtc_knowledge.js +3 -1
  291. package/tools/definitions/finalize_answer_def.js +2 -2
  292. package/tools/definitions/integration-boundary.js +2 -1
  293. package/tools/definitions/search_trtc_knowledge_def.js +2 -1
  294. package/utils/report-cls-client.js +3 -3
  295. package/utils/report-es-client.js +1 -1
  296. package/cursor-setting.png +0 -0
  297. package/mcp-server-prompt.png +0 -0
  298. package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +0 -80
  299. package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +0 -24
  300. package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +0 -116
  301. package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +0 -445
  302. package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +0 -465
  303. package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +0 -16
  304. package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +0 -230
  305. package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +0 -797
  306. package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +0 -325
  307. package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +0 -325
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: "Web Chat SDK: MESSAGE_RECEIVED Event and Group Tip Message Handling(MESSAGE_RECEIVED / 群提示消息TIMGroupTipElem / 接收消息 / 自己发的消息上屏)"
3
+ product: chat
4
+ frameworks: [web, miniprogram]
5
+ scope: platform_common
6
+ tags: [MESSAGE_RECEIVED, TIMGroupTipElem, TIMGroupSystemNoticeElem, message receive, self-sent message, event.data]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Web Chat SDK: MESSAGE_RECEIVED Event and Group Tip Message Handling
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - The Web Chat SDK delivers all message notifications to the business side through the unified `MESSAGE_RECEIVED` event.
15
+ - By iterating over `event.data` in the callback, you can distinguish between normal messages, group tip messages (`TIMGroupTipElem`), and group system notices (`TIMGroupSystemNoticeElem`) using the `type` field.
16
+ - Messages sent by the current instance are not delivered back to itself via `MESSAGE_RECEIVED`; self-sent messages should be added to the on-screen message list immediately after creation.
17
+ - In multi-instance or multi-device login scenarios, messages sent by other instances can be received via `MESSAGE_RECEIVED`.
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / Capability | Purpose | Description |
22
+ |---|---|---|
23
+ | `EVENT.MESSAGE_RECEIVED` | Unified receive entry | All received messages are delivered to the business side through this event |
24
+ | `event.data` | Message list payload | A single callback may contain multiple messages; all must be iterated and processed |
25
+ | `message.type` | Message classification field | Used to identify normal messages, `TIMGroupTipElem`, and `TIMGroupSystemNoticeElem` |
26
+ | Self-sent message rendering | UI timing control | Messages sent by the current instance should be rendered on screen immediately after creation, not relying on `MESSAGE_RECEIVED` |
27
+
28
+ ## 3. Mechanism & Sequence
29
+
30
+ Business subscribes to `MESSAGE_RECEIVED` -> SDK delivers message list `event.data` -> Business iterates the list and routes by `type`.
31
+ Current instance sends a message: creates message and immediately renders locally -> calls send API -> does not deliver back via `MESSAGE_RECEIVED`.
32
+ Other instances/devices send a message: current device receives it via `MESSAGE_RECEIVED` and processes by type.
33
+
34
+ ## 4. Standard Usage
35
+
36
+ 1. Subscribe to `EVENT.MESSAGE_RECEIVED`; read the full `event.data` list in the callback.
37
+ 2. Route each message by `type`: normal messages, `TIMGroupTipElem`, and `TIMGroupSystemNoticeElem` go to different business handlers.
38
+ 3. When sending a message yourself, add it to the local message list immediately after `createXXXMessage` to ensure timely on-screen display.
39
+ 4. Maintain clear responsibility boundaries between send callbacks and receive callbacks: the send path handles local state, the receive path handles messages from other devices/instances.
40
+
41
+ ## 5. Expected Results
42
+
43
+ - After a group tip event triggers, `TIMGroupTipElem` is correctly identified in `MESSAGE_RECEIVED` and the correct handling logic is executed.
44
+ - Group system notices are correctly identified as `TIMGroupSystemNoticeElem` in the callback and properly routed.
45
+ - When the current instance sends a message, it is rendered locally immediately without waiting for `MESSAGE_RECEIVED`.
46
+ - In multi-device login scenarios, messages sent from other devices are received normally via `MESSAGE_RECEIVED`.
47
+
48
+ ## 6. Common Pitfalls
49
+
50
+ - Pitfall 1: Treating `MESSAGE_RECEIVED` as a single-message callback and only processing `event.data[0]`.
51
+ - Pitfall 2: Expecting messages sent by the current instance to be delivered back via `MESSAGE_RECEIVED` before rendering on screen.
52
+ - Pitfall 3: Not classifying by `type`, causing group tip messages and normal text messages to share the same handling logic.
53
+
54
+ ## 7. Problem Definition (retrieval hint)
55
+
56
+ In the Web Chat SDK scenario, the business side needs to clarify two things:
57
+ 1) How to receive and identify group tip messages `TIMGroupTipElem`;
58
+ 2) Whether `MESSAGE_RECEIVED` delivers messages sent by the current instance itself.
59
+
60
+ ## 8. Alternative Queries (retrieval recall)
61
+
62
+ - How does the Web SDK receive group tip messages `TIMGroupTipElem`?
63
+ - How to distinguish between normal messages and group system messages in the `MESSAGE_RECEIVED` callback?
64
+ - Why are self-sent messages not received via `MESSAGE_RECEIVED`?
65
+ - In multi-device login, can messages sent from other devices be received via `MESSAGE_RECEIVED`?
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: "Web/Mini Program Chat SDK: Message Sending Error (80001/80004) and Content Moderation Rendering Strategy(发送消息报错 80001、80004 / 触发审核的消息渲染标识)"
3
+ product: chat
4
+ frameworks: [web, miniprogram]
5
+ scope: platform_common
6
+ tags: [sendMessage, 80001, 80004, hasRiskContent, MESSAGE_MODIFIED, cloud moderation, text moderation, image moderation, async moderation, audio message, video message]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Web/Mini Program Chat SDK: Message Sending Error (80001/80004) and Content Moderation Rendering Strategy
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - Text sending error `80001` indicates the text has hit a sensitive content moderation policy; investigate the message content and cloud-side sensitive word configuration.
15
+ - Image sending error `80004` indicates the image has hit a sensitive content moderation policy; investigate the image content and cloud-side image moderation rules.
16
+ - The standard field for determining whether a message has been flagged by moderation on the UI side is `message.hasRiskContent`.
17
+ - To receive `80001/80004` in `sendMessage`'s `catch` during synchronous moderation, you must enable "Deliver Blocking Error Code" in the IM console (Console > Cloud Moderation > Moderation Result Configuration > Deliver Blocking Error Code).
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / Capability | Purpose | Description |
22
+ |---|---|---|
23
+ | Error code `80001` | Text moderation blocking signal | Returned when a text message hits a sensitive policy |
24
+ | Error code `80004` | Image moderation blocking signal | Returned when an image message hits a sensitive policy |
25
+ | `message.hasRiskContent` | Risk content flag | Used by the UI to determine whether a message has been flagged by moderation |
26
+ | `EVENT.MESSAGE_MODIFIED` | Message modified notification event | After async moderation hits, the SDK delivers message field updates via this event |
27
+ | "Deliver Blocking Error Code" switch | Synchronous error return control | Must be enabled for `sendMessage.catch` to receive moderation blocking error codes |
28
+
29
+ ## 3. Mechanism & Sequence
30
+
31
+ Text messages use synchronous moderation: send message -> moderation hit -> `sendMessage.catch` returns `80001`; the returned `message.hasRiskContent=true`. In the text synchronous moderation hit scenario, the `EVENT.MESSAGE_MODIFIED` event is not dispatched.
32
+ Image messages default to synchronous moderation: send message -> if moderation completes and hits within 2 seconds -> `sendMessage.catch` returns `80004`; if moderation does not complete within 2 seconds -> automatically switches to async moderation; after async moderation hits, the update is delivered via `EVENT.MESSAGE_MODIFIED`.
33
+ Audio/video messages default to async moderation: send message -> backend performs async moderation -> after moderation hits, the update is delivered via `EVENT.MESSAGE_MODIFIED`.
34
+
35
+ ## 4. Standard Usage
36
+
37
+ 1. Enable "Deliver Blocking Error Code" in the console to ensure `sendMessage.catch` can detect the error code during synchronous moderation hits.
38
+ 2. When sending text/image messages, read the error code and the returned `message` in the `catch` branch; if `message.hasRiskContent=true`, immediately update the on-screen message status.
39
+ 3. Listen to `EVENT.MESSAGE_MODIFIED`, iterate over `event.data`, and update the corresponding on-screen message when `message.hasRiskContent=true` is found.
40
+ 4. When the text/image hit rate is abnormal, review the sensitive word library and image moderation rules respectively, and coordinate cloud moderation strategy adjustments.
41
+ 5. Use `hasRiskContent` uniformly for UI rendering decisions; do not rely on a single error code for long-term state determination.
42
+
43
+ ## 5. Expected Results
44
+
45
+ - When text hits a sensitive word, `sendMessage.catch` observes `80001` and the message status is updated to moderation-blocked.
46
+ - When an image hits a sensitive rule, it is received via the synchronous path as `80004`, or via the async path through `MESSAGE_MODIFIED` with `hasRiskContent=true` update.
47
+ - After async moderation hits for audio/video, the UI correctly updates the blocked status via `MESSAGE_MODIFIED`.
48
+ - For the same message, both synchronous and async paths ultimately render a consistent state based on `hasRiskContent`.
49
+
50
+ ## 6. Common Pitfalls
51
+
52
+ - Pitfall 1: Not enabling "Deliver Blocking Error Code" but expecting `sendMessage.catch` to always return `80001/80004`.
53
+ - Pitfall 2: Only handling `sendMessage.catch` without listening to `MESSAGE_MODIFIED`, causing missed rendering for async moderation hits.
54
+ - Pitfall 3: Rendering long-term state based solely on error codes without using `hasRiskContent` as the ultimate state source.
55
+
56
+ ## 7. Problem Definition (retrieval hint)
57
+
58
+ What causes the Web Chat SDK to return `80001` when sending text and `80004` when sending images? How should the UI determine whether a message has been flagged by content moderation (risk content)?
59
+
60
+ ## 8. Alternative Queries (retrieval recall)
61
+
62
+ - What causes text sending failure 80001?
63
+ - What causes image sending failure 80004?
64
+ - How does the frontend identify when a message is blocked by moderation?
65
+ - When does `message.hasRiskContent` get updated?
@@ -0,0 +1,71 @@
1
+ ---
2
+ title: "Web/Mini Program Chat SDK: Total Unread Message Count and C2C/Group Split Statistics(unreadCount / 未读总数 / 单聊未读 / 群聊未读)"
3
+ product: chat
4
+ frameworks: [web, miniprogram]
5
+ scope: platform_common
6
+ tags: [getTotalUnreadMessageCount, TOTAL_UNREAD_MESSAGE_COUNT_UPDATED, unreadCount, total unread, C2C unread, group unread]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Web/Mini Program Chat SDK: Total Unread Message Count and C2C/Group Split Statistics
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - Use `getTotalUnreadMessageCount` to get the total unread message count.
15
+ - The SDK does not currently provide a direct API for "C2C-only unread total" or "group-only unread total".
16
+ - The recommended pattern is "fetch once on initialization + continuous event updates": call `getTotalUnreadMessageCount` during initialization, then maintain the total unread count via `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED`.
17
+ - `getTotalUnreadMessageCount` depends on the SDK's conversation list data; if the cloud conversation list has not finished syncing when called, the return value may be `0`.
18
+ - The SDK syncs the conversation list in pages; each sync that causes a total unread change dispatches `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED`.
19
+
20
+ ## 2. Field / API Reference
21
+
22
+ | Field / Capability | Purpose | Description |
23
+ |---|---|---|
24
+ | `getTotalUnreadMessageCount` | Get current total unread count | Depends on the locally synced conversation list state |
25
+ | `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED` | Total unread update event | Triggered after conversation list page sync or unread count changes |
26
+ | `CONVERSATION_LIST_UPDATED` | Conversation list update event | Can be used to get all conversations and perform C2C/group split statistics |
27
+ | `conversation.type` | Conversation type identifier | Used to filter C2C or group conversations |
28
+ | `conversation.unreadCount` | Per-conversation unread count | Summed up to get C2C-dimension or group-dimension total unread count |
29
+
30
+ ## 3. Mechanism & Sequence
31
+
32
+ App starts -> SDK syncs conversation list (paginated) -> Business calls `getTotalUnreadMessageCount` during initialization to get the initial value (may be 0) -> Each time a page sync causes total unread change, SDK dispatches `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED` -> Business updates total unread display in real time.
33
+ If C2C/group dimension unread is needed: listen to `CONVERSATION_LIST_UPDATED` -> get all conversations -> filter by `conversation.type` and sum `conversation.unreadCount`.
34
+
35
+ ## 4. Standard Usage
36
+
37
+ 1. During app initialization, call `getTotalUnreadMessageCount` to get the current available total unread initial value.
38
+ 2. Listen to `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED`; use the event value as the continuous update source for total unread count.
39
+ 3. Listen to `CONVERSATION_LIST_UPDATED` to get the full conversation list.
40
+ 4. Filter by `conversation.type` to separate C2C and group conversations, then sum each conversation's `unreadCount` to get the C2C unread total and group unread total.
41
+ 5. When initialization returns `0`, do not immediately conclude "no unread"; use the statistics result after the conversation list sync event as the authoritative value.
42
+
43
+ ## 5. Expected Results
44
+
45
+ - `getTotalUnreadMessageCount` has been called during initialization, and the UI displays the initial value.
46
+ - During the conversation list page sync process, `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED` continuously drives total unread changes.
47
+ - C2C and group unread totals are stably derived from the `CONVERSATION_LIST_UPDATED + unreadCount` aggregation result.
48
+ - When `0` appears during initialization, the unread count correctly refreshes to the real value once syncing completes.
49
+
50
+ ## 6. Common Pitfalls
51
+
52
+ - Pitfall 1: Assuming the SDK provides a ready-made API for "C2C unread total" or "group unread total".
53
+ - Pitfall 2: Treating the `getTotalUnreadMessageCount` result of `0` during initialization as the final result.
54
+ - Pitfall 3: Only fetching the total unread count once during initialization without listening to `TOTAL_UNREAD_MESSAGE_COUNT_UPDATED`.
55
+
56
+ ## 7. Problem Definition (retrieval hint)
57
+
58
+ How does the Web Chat SDK get the total unread message count? Is there an API to get only the C2C unread total or group unread total?
59
+
60
+ ## 8. Alternative Queries (retrieval recall)
61
+
62
+ - How to get the total IM unread message count?
63
+ - Is there an official API for "C2C-only unread" or "group-only unread"?
64
+ - Why does `getTotalUnreadMessageCount` return 0 during initialization?
65
+ - Should the total unread count be updated via events or by polling the API?
66
+
67
+ ## 9. References
68
+
69
+ - getTotalUnreadMessageCount: `https://web.sdk.qcloud.com/im/doc/v3/zh-cn/SDK.html#getTotalUnreadMessageCount`
70
+ - TOTAL_UNREAD_MESSAGE_COUNT_UPDATED: `https://web.sdk.qcloud.com/im/doc/v3/zh-cn/module-EVENT.html#.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED`
71
+ - CONVERSATION_LIST_UPDATED: `https://web.sdk.qcloud.com/im/doc/v3/zh-cn/module-EVENT.html#.CONVERSATION_LIST_UPDATED`
@@ -0,0 +1,113 @@
1
+ ---
2
+ title: "Mini Program: Standard Approach for Sending Audio Messages with IM SDK(recorderManager / createAudioMessage / sendMessage / 小程序发送语音消息)"
3
+ product: chat
4
+ frameworks: [miniprogram]
5
+ scope: platform_specific
6
+ tags: [audio, voice, recorderManager, createAudioMessage, sendMessage, aac, miniprogram]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Mini Program: Standard Approach for Sending Audio Messages with IM SDK
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - On the mini program side, use the official WeChat `RecorderManager` for recording, then call `createAudioMessage` in the `onStop` callback to create the audio message.
15
+ - After message creation, send it via `sendMessage`; the send result is determined by the Promise success/failure callback.
16
+ - Using `aac` audio format enables cross-platform interoperability across IM on Android, iOS, Mini Program, and Web.
17
+ - Recording parameters must be explicitly configured: `duration`, `sampleRate`, `numberOfChannels`, `encodeBitRate`, `format`; also listen to `onError` to handle recording exceptions.
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / Capability | Purpose | Description |
22
+ |---|---|---|
23
+ | `wx.getRecorderManager()` | Recording entry | Gets the globally unique recorder manager instance |
24
+ | `recordOptions.format` | Audio format control | Set to `aac` for cross-platform interoperability |
25
+ | `recorderManager.onStop(res)` | Recording result callback | Use `res` in the callback to create the audio message |
26
+ | `chat.createAudioMessage({...})` | Create message instance | Generates an audio message object ready for rendering and sending |
27
+ | `chat.sendMessage(message)` | Send message | Returns a Promise; `then` for success, `catch` for failure |
28
+
29
+ ## 3. Mechanism & Sequence
30
+
31
+ Initialize `RecorderManager` -> Configure recording parameters -> Start recording -> Listen to `onStop` to get the recording result -> Call `createAudioMessage` to create the audio message -> Call `sendMessage` to send -> Update UI and logs based on send result.
32
+
33
+ ## 4. Standard Usage
34
+
35
+ 1. Get the recorder manager and configure recording parameters with `format` set to `aac`.
36
+ 2. Register `onError` and `onStop` callbacks; create the audio message based on the recording result in `onStop`.
37
+ 3. Call `sendMessage` to send the audio message and handle success/failure callbacks.
38
+ 4. Render the message instance on screen, and prompt retry on failure.
39
+
40
+ ```javascript
41
+ // 示例:使用微信官方的 RecorderManager 进行录音
42
+ // 参考 https://developers.weixin.qq.com/minigame/dev/api/media/recorder/RecorderManager.start.html
43
+ // 1. 获取全局唯一的录音管理器 RecorderManager
44
+ const recorderManager = wx.getRecorderManager();
45
+
46
+ // 录音部分参数
47
+ const recordOptions = {
48
+ duration: 60000, // 录音的时长,单位 ms,最大值 600000(10 分钟)
49
+ sampleRate: 44100, // 采样率
50
+ numberOfChannels: 1, // 录音通道数
51
+ encodeBitRate: 192000, // 编码码率
52
+ format: 'aac' // 音频格式,选择此格式创建的音频消息可以在 IM 全平台互通
53
+ };
54
+
55
+ // 2.1 监听录音错误事件
56
+ recorderManager.onError(function(errMsg) {
57
+ console.warn('recorder error:', errMsg);
58
+ });
59
+
60
+ // 2.2 监听录音结束事件,录音结束后创建并发送音频消息
61
+ recorderManager.onStop(function(res) {
62
+ console.log('recorder stop', res);
63
+
64
+ // 4. 创建消息实例,接口返回的实例可以上屏
65
+ const message = chat.createAudioMessage({
66
+ to: 'user1',
67
+ conversationType: TencentCloudChat.TYPES.CONV_C2C,
68
+ // 消息优先级,用于群聊
69
+ // priority: TencentCloudChat.TYPES.MSG_PRIORITY_NORMAL,
70
+ payload: {
71
+ file: res
72
+ },
73
+ // 消息自定义数据(云端保存,会发送到对端,程序卸载重装后还能拉取到)
74
+ // cloudCustomData: 'your cloud custom data'
75
+ });
76
+
77
+ // 5. 发送消息
78
+ chat.sendMessage(message).then(function(imResponse) {
79
+ // 发送成功
80
+ console.log(imResponse);
81
+ }).catch(function(imError) {
82
+ // 发送失败
83
+ console.warn('sendMessage error:', imError);
84
+ });
85
+ });
86
+
87
+ // 3. 开始录音
88
+ recorderManager.start(recordOptions);
89
+ ```
90
+
91
+ ## 5. Expected Results
92
+
93
+ - After recording ends, `onStop` is triggered reliably and a voice message instance is created successfully.
94
+ - On successful send, the `sendMessage` Promise enters `then` and the message renders on screen.
95
+ - The audio message can be played on Android, iOS, Mini Program, and Web (using `aac` format).
96
+ - On recording exceptions, `onError` provides clear logs with no silent failures.
97
+
98
+ ## 6. Common Pitfalls
99
+
100
+ - Pitfall 1: Not creating the message in the `onStop` callback, resulting in no valid audio file at send time.
101
+ - Pitfall 2: Not using `aac` for the audio format, causing cross-platform interoperability issues.
102
+ - Pitfall 3: Only calling `createAudioMessage` without calling `sendMessage`, mistakenly thinking the message has been sent.
103
+
104
+ ## 7. Problem Definition (retrieval hint)
105
+
106
+ When integrating IM SDK in a mini program, how to complete voice recording, create an audio message, and send it while ensuring cross-platform interoperability.
107
+
108
+ ## 8. Alternative Queries (retrieval recall)
109
+
110
+ - How to send an audio message with the mini program IM SDK?
111
+ - How to use `createAudioMessage` to send a message after recording in a mini program?
112
+ - How to integrate `RecorderManager` recording result with IM sending?
113
+ - What audio format allows interoperability with Android/iOS/Web?
@@ -0,0 +1,63 @@
1
+ ---
2
+ title: "Mini Program: IM SDK Login Timeout 2801 Diagnosis and Fix(小程序体验版和正式版登录超时 / 开发版正常)"
3
+ product: chat
4
+ frameworks: [miniprogram]
5
+ scope: platform_specific
6
+ tags: [login, timeout, 2801, websocket, domain allowlist, debug mode, ipv6]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Mini Program: IM SDK Login Timeout 2801 Diagnosis and Fix
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - The primary item to check in this scenario is whether the `websocket` domain allowlist is fully configured in the mini program management backend.
15
+ - The validation policies differ between dev builds and preview/production builds; a successful login in the dev build does not guarantee the allowlist is correctly configured.
16
+ - Preview builds can enable debug mode for verification: debug mode bypasses domain allowlist validation and can be used to quickly determine whether the issue is caused by the allowlist.
17
+ - The dedicated domain `wss://${SDKAppID}w4c.my-imcloud.com` requires SDK `v3.4.6` or above.
18
+ - The IPv6 domain `wss://wssv6.im.qcloud.com` requires SDK `v3.4.9` or above.
19
+
20
+ ## 2. Field / API Reference
21
+
22
+ | Field / Capability | Purpose | Description |
23
+ |---|---|---|
24
+ | Error code `2801` | Login timeout signal | When this occurs in preview/production builds, prioritize checking network connectivity and domain allowlist |
25
+ | `websocket` domain allowlist | Connection access control | Incomplete allowlist configuration causes connection failure or timeout in non-dev builds |
26
+ | Preview build debug mode | Diagnostic tool | Bypasses domain allowlist validation; used to verify whether the allowlist is the root cause |
27
+ | `wss://${SDKAppID}w4c.my-imcloud.com` | Dedicated domain | Supported from SDK `v3.4.6+` |
28
+ | `wss://wssv6.im.qcloud.com` | IPv6 domain | Supported from SDK `v3.4.9+` |
29
+
30
+ ## 3. Mechanism & Sequence
31
+
32
+ Dev build can log in -> Preview/production build login times out (2801) -> Check `websocket` domain allowlist in mini program management backend -> Enable debug mode in preview build and retest -> If debug mode resolves the issue, confirm it is an allowlist configuration problem.
33
+
34
+ ## 4. Standard Usage
35
+
36
+ 1. Log in to the mini program management backend and check whether the `websocket` domain allowlist is fully configured. Reference: `https://cloud.tencent.com/document/product/269/117335`.
37
+ 2. Enable debug mode in the preview build and retest login.
38
+ 3. If login recovers after enabling debug mode, complete/correct the `websocket` domain configuration per allowlist specifications.
39
+ 4. Verify the login path again in both preview and production builds to confirm 2801 no longer occurs.
40
+
41
+ ## 5. Expected Results
42
+
43
+ - Preview build can log in stably with debug mode disabled.
44
+ - Production build login no longer shows the 2801 timeout.
45
+ - The mini program backend `websocket` domain allowlist is fully consistent with the current connected domains.
46
+ - If using a dedicated domain or IPv6 domain, the SDK version meets `v3.4.6+` / `v3.4.9+` respectively.
47
+
48
+ ## 6. Common Pitfalls
49
+
50
+ - Pitfall 1: Assuming the domain allowlist is correctly configured just because the dev build can log in.
51
+ - Pitfall 2: Only verifying in debug mode and then directly publishing to production.
52
+ - Pitfall 3: Using a dedicated domain or IPv6 domain while ignoring the minimum SDK version requirement.
53
+
54
+ ## 7. Problem Definition (retrieval hint)
55
+
56
+ When integrating IM SDK in a mini program, the dev build logs in successfully, but the preview and production builds get a login timeout (2801).
57
+
58
+ ## 8. Alternative Queries (retrieval recall)
59
+
60
+ - How to handle IM login 2801 in a preview mini program?
61
+ - Why can the dev build log in but the preview and production builds timeout?
62
+ - Is preview build login timeout related to the websocket domain allowlist?
63
+ - Can a missing websocket allowlist entry cause IM login failure in a mini program?
@@ -0,0 +1,64 @@
1
+ ---
2
+ title: "Mini Program: IM SDK Media Upload Failure Diagnosis and Fix (Image/Video/Audio/File)(小程序体验版和正式版偶现发送图片、视频、语音、文件失败 / 开发版正常)"
3
+ product: chat
4
+ frameworks: [miniprogram]
5
+ scope: platform_specific
6
+ tags: [upload, media, image, video, audio, file, uploadFile, domain allowlist, debug mode, COS dedicated domain]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Mini Program: IM SDK Media Upload Failure Diagnosis and Fix (Image/Video/Audio/File)
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - The primary item to check in this scenario is whether the `uploadFile` domain allowlist is fully configured in the mini program management backend.
15
+ - The validation policies differ between dev builds and preview/production builds; successful uploads in the dev build do not guarantee the allowlist is correctly configured.
16
+ - Preview builds can enable debug mode for verification: debug mode bypasses domain allowlist validation and can be used to quickly determine whether the issue is caused by the `uploadFile` domain configuration.
17
+ - Starting from 2024-09-10, newly created apps are assigned a COS dedicated domain `https://${SDKAppID}-cn.rich.my-imcloud.com` by default.
18
+ - When using the COS dedicated domain, it must be added to the mini program `uploadFile` allowed domain allowlist.
19
+
20
+ ## 2. Field / API Reference
21
+
22
+ | Field / Capability | Purpose | Description |
23
+ |---|---|---|
24
+ | `uploadFile` domain allowlist | Upload channel access control | Incomplete allowlist configuration causes upload failures in preview/production builds |
25
+ | Preview build debug mode | Diagnostic tool | Bypasses domain allowlist validation; used to verify whether the allowlist is the root cause |
26
+ | `https://${SDKAppID}-cn.rich.my-imcloud.com` | COS dedicated domain | Assigned by default for new apps; must be added to the `uploadFile` allowlist |
27
+ | Media message types (image/video/audio/file) | Affected scope | All share the `uploadFile` path and are affected by allowlist configuration |
28
+
29
+ ## 3. Mechanism & Sequence
30
+
31
+ Dev build uploads successfully -> Preview/production build uploads fail -> Check `uploadFile` domain allowlist in mini program management backend -> Enable debug mode in preview build and retest -> If debug mode resolves the issue, confirm it is an allowlist configuration problem.
32
+
33
+ ## 4. Standard Usage
34
+
35
+ 1. Log in to the mini program management backend and check whether the `uploadFile` allowed domains are fully configured. Reference: `https://cloud.tencent.com/document/product/269/117335`.
36
+ 2. Verify and add the upload domains actually used by the current app, with special attention to confirming that the COS dedicated domain `https://${SDKAppID}-cn.rich.my-imcloud.com` is allowlisted.
37
+ 3. Enable debug mode in the preview build and retest image/video/audio/file uploads.
38
+ 4. If uploads recover after enabling debug mode, complete/correct the `uploadFile` domain configuration per allowlist specifications.
39
+ 5. After disabling debug mode, verify the upload path again in both preview and production builds.
40
+
41
+ ## 5. Expected Results
42
+
43
+ - Preview build can upload images/videos/audio/files successfully with debug mode disabled.
44
+ - Production build upload path is stable with no upload failures.
45
+ - The mini program backend `uploadFile` domain allowlist is fully consistent with the current connected domains.
46
+ - COS dedicated domain `https://${SDKAppID}-cn.rich.my-imcloud.com` has been added to the allowlist (applicable for new apps).
47
+
48
+ ## 6. Common Pitfalls
49
+
50
+ - Pitfall 1: Assuming the domain allowlist is correctly configured just because the dev build uploads successfully.
51
+ - Pitfall 2: Only verifying in debug mode and then directly publishing to production.
52
+ - Pitfall 3: Only checking `request` or `websocket` allowlists while ignoring the `uploadFile` allowlist.
53
+ - Pitfall 4: After a new app enables the COS dedicated domain, not syncing the `uploadFile` allowlist update.
54
+
55
+ ## 7. Problem Definition (retrieval hint)
56
+
57
+ When integrating IM SDK in a mini program, the dev build can upload images/videos/audio/files normally, but the preview and production builds fail to upload.
58
+
59
+ ## 8. Alternative Queries (retrieval recall)
60
+
61
+ - How to fix image upload failure in a preview mini program with IM?
62
+ - Why can the dev build upload but the preview and production builds fail?
63
+ - Can a missing `uploadFile` domain allowlist entry cause IM upload failure in a mini program?
64
+ - What does it mean when uploads recover after enabling debug mode in the preview build?
@@ -0,0 +1,118 @@
1
+ ---
2
+ title: "Web (PC/H5): Standard Approach for Sending Audio Messages with IM SDK(pc/h5发送语音消息)"
3
+ product: chat
4
+ frameworks: [web]
5
+ scope: platform_specific
6
+ tags: [audio, voice, createAudioMessage, sendMessage, Recorder, js-audio-recorder, h5, pc]
7
+ version_range: ">=3.0.0"
8
+ ---
9
+
10
+ # Web (PC/H5): Standard Approach for Sending Audio Messages with IM SDK
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - On the Web side, you can use a third-party recording library (e.g., `js-audio-recorder`) to record audio, then convert the recording result to a `File` and call `createAudioMessage`.
15
+ - The `audioFile` must have a `uri` field set (`audioFile.uri = window.URL.createObjectURL(audioFile)`); otherwise the audio message creation and sending pipeline is incomplete.
16
+ - After message creation, send it via `sendMessage`; the send result is determined by the Promise success/failure callback.
17
+ - It is recommended to pass an `onProgress` callback in `createAudioMessage` to monitor audio upload progress in real time.
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / Capability | Purpose | Description |
22
+ |---|---|---|
23
+ | `Recorder` | Recording capability | Captures audio data in the browser |
24
+ | `recorder.getWAVBlob()` | Export recording data | Gets WAV binary data for constructing a `File` |
25
+ | `audioFile.uri` | Local accessible address | Required field; generated using `window.URL.createObjectURL(audioFile)` |
26
+ | `chat.createAudioMessage({...})` | Create audio message instance | Generates an audio message object ready for rendering and sending |
27
+ | `chat.sendMessage(message)` | Send message | Returns a Promise; `then` for success, `catch` for failure |
28
+ | `onProgress` | Upload progress callback | Monitors the audio file upload process |
29
+
30
+ ## 3. Mechanism & Sequence
31
+
32
+ Start recording -> Stop recording -> Calculate duration and get WAV Blob -> Convert to `File` and add `uri` and `duration` -> Call `createAudioMessage` to create the audio message -> Call `sendMessage` to send -> Update UI and logs based on send result.
33
+
34
+ ## 4. Standard Usage
35
+
36
+ 1. Start recording with the recorder and record the start timestamp.
37
+ 2. After stopping recording, calculate the duration and get the `WAV Blob`.
38
+ 3. Convert the `Blob` to a `File` and set `audioFile.uri` and `audioFile.duration`.
39
+ 4. Call `createAudioMessage` to create the audio message, passing in the `onProgress` callback.
40
+ 5. Call `sendMessage` to send the audio message and handle success and failure branches.
41
+
42
+ ```javascript
43
+ // 在 Web 端创建语音消息并发送
44
+ // 示例:使用第三方库 js-audio-recorder 录制音频
45
+
46
+ // 1. 开始录制
47
+ let recorder = new Recorder({
48
+ sampleBits: 16, // 采样位数,支持 8 或 16,默认 16
49
+ sampleRate: 16000, // 采样率
50
+ numChannels: 1 // 声道,支持 1 或 2,默认 1
51
+ });
52
+
53
+ let startTs;
54
+ recorder.start().then(() => {
55
+ // 开始录音,记录起始时间戳
56
+ startTs = Date.now();
57
+ }, (error) => {
58
+ // 出错了
59
+ console.log(`${error.name} : ${error.message}`);
60
+ });
61
+
62
+ // 2. 结束录制
63
+ recorder.stop();
64
+
65
+ // 3. 计算录音时长,获取 WAV 数据
66
+ let duration = Date.now() - startTs; // 单位:ms
67
+ let wavBlob = recorder.getWAVBlob();
68
+
69
+ // 4. blob 数据转成 File 对象
70
+ let audioFile = new File([wavBlob], 'hello.wav', { type: 'wav' });
71
+ audioFile.uri = window.URL.createObjectURL(audioFile);
72
+ audioFile.duration = duration;
73
+
74
+ // 5. 创建音频消息
75
+ let message = chat.createAudioMessage({
76
+ to: 'user1',
77
+ conversationType: 'C2C',
78
+ payload: {
79
+ file: audioFile
80
+ },
81
+ // 音频上传进度回调
82
+ onProgress: function(event) {
83
+ console.log('file uploading:', event);
84
+ }
85
+ });
86
+
87
+ // 6. 发送消息
88
+ chat.sendMessage(message).then(function(imResponse) {
89
+ // 发送成功
90
+ console.log(imResponse);
91
+ }).catch(function(imError) {
92
+ // 发送失败
93
+ console.warn('sendMessage error:', imError);
94
+ });
95
+ ```
96
+
97
+ ## 5. Expected Results
98
+
99
+ - After recording ends, `wavBlob` is reliably obtained and `audioFile` is constructed successfully.
100
+ - `audioFile.uri` is set, and `createAudioMessage` creates the audio message normally.
101
+ - `sendMessage` enters `then` on success; the audio message renders on screen and is playable.
102
+ - During upload, `onProgress` callbacks are received; on failure, `catch` provides clear error logs.
103
+
104
+ ## 6. Common Pitfalls
105
+
106
+ - Pitfall 1: Not setting `audioFile.uri` before sending, causing the message pipeline to fail.
107
+ - Pitfall 2: Only creating the message without sending it, mistakenly thinking the message has been delivered.
108
+ - Pitfall 3: Not correctly calculating the duration or packaging the file after recording ends, causing the audio to be unusable.
109
+
110
+ ## 7. Problem Definition (retrieval hint)
111
+
112
+ When integrating IM SDK on Web (PC/H5), how to complete voice recording and reliably send audio messages.
113
+
114
+ ## 8. Alternative Queries (retrieval recall)
115
+
116
+ - How to send an audio message with the Web IM SDK?
117
+ - How to call `createAudioMessage` after recording on PC/H5?
118
+ - Why must `audioFile.uri` be set?
@@ -3,9 +3,6 @@
3
3
  ChatSetting is a set of chat settings components built with Jetpack Compose. It includes two main components: C2CChatSetting (C2C Chat Settings) and GroupChatSetting (Group Chat Settings).
4
4
 
5
5
  These components offer comprehensive chat session management features, such as user information management, permission controls, group management, and other essential capabilities.
6
- | <strong>C2C Chat Settings Interface</strong> | <strong>Group Chat Settings Interface</strong> |
7
- | --- | --- |
8
- | | |
9
6
 
10
7
  ## Component Integration
11
8
 
@@ -40,7 +37,6 @@ ChatSetting consists of two main components: C2CChatSetting (C2C Chat Settings)
40
37
 
41
38
  ## Basic Usage
42
39
 
43
- To display the C2C Chat Settings page, initialize C2CChatSetting as shown below:
44
40
  ``` swift
45
41
  Box {
46
42
  C2CChatSetting(
@@ -55,7 +51,6 @@ Box {
55
51
  }
56
52
  ```
57
53
 
58
- To display the Group Chat Settings page, initialize GroupChatSetting as shown below:
59
54
  ``` swift
60
55
  Box {
61
56
  GroupChatSetting(
@@ -1,9 +1,6 @@
1
1
  ## Component Overview
2
2
 
3
3
  ContactList is a Jetpack Compose-based contact list component that provides users with robust contact management features. It supports displaying friends, handling friend requests, managing group lists, managing blacklists, and offers a comprehensive set of interactive webhook interfaces.
4
- | <strong>Contact List</strong> | <strong>Group List</strong> | <strong>Friend Request List</strong> |
5
- | --- | --- | --- |
6
- | | | |
7
4
 
8
5
  ## Component Integration
9
6
 
@@ -19,15 +16,11 @@ The `ContactList` component is included in TUIKit Compose. To use `ContactList`,
19
16
  | <code>onContactClick: (ContactInfo) -> Unit</code> | Webhook triggered when a contact is clicked; this parameter is optional. | |
20
17
  | <code>contactListViewModelFactory: ContactListViewModelFactory</code> | Factory for creating the internal ContactListViewModel. Typically, you do not need to provide this manually, as a default implementation is included. | |
21
18
 
22
- The top section of `ContactList` provides entry points for subviews such as friend requests, group chat requests, group chat list, and blacklist. The bottom section displays the contact list, as shown below:
23
-
24
19
  ## Basic Usage
25
20
  - When you tap the entry points for friend requests, group chat requests, group chat list, or blacklist in `ContactList`, the component automatically handles navigation—no extra configuration is required.
26
21
 
27
22
  - When you tap a group in the group chat list or a contact in the contact list or blacklist, the corresponding webhook (`onGroupClick` or `onContactClick`) is triggered. You must handle these webhooks to implement custom navigation. See the routing example below:
28
23
 
29
- To display the contact list directly, initialize `ContactList` as shown below:
30
-
31
24
  ``` swift
32
25
  Box(
33
26
  modifier = Modifier
@@ -1,9 +1,6 @@
1
1
  ## Component Overview
2
2
 
3
3
  ConversationList is a Jetpack Compose component designed to display and manage user chat conversations. It offers a comprehensive set of features for viewing and interacting with conversations.
4
- | <strong>Conversation List</strong> | <strong>Conversation Actions</strong> |
5
- | --- | --- |
6
- | | |
7
4
 
8
5
  ## Component Integration
9
6
 
@@ -112,6 +109,3 @@ ConversationList() {
112
109
  ```
113
110
 
114
111
  The following images show the customization effects:
115
- | <strong>Conversation Actions</strong><br><strong>(Default Options)</strong> | <strong>Conversation Actions</strong><br><strong>(Delete Option Hidden)</strong> | <strong>Conversation Actions</strong><br><strong>(Share Option Added)</strong> |
116
- | --- | --- | --- |
117
- | | | |