@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,77 @@
1
+ ---
2
+ title: "Why Web TUICallKit Shows a `Resume Playback` Dialog and How to Handle It( web TUICallKit 恢复播放弹窗)"
3
+ product: call
4
+ frameworks: [react, vue, web]
5
+ scope: platform_common
6
+ tags: [TUICallKit, resume playback, autoplay, webview, autoplay, enableAutoPlayDialog, callExperimentalAPI, no sound, vue2.6, vue2.7, vue3]
7
+ version_range: ">=4.0.0"
8
+ ---
9
+
10
+ # Why Web TUICallKit Shows a "Resume Playback" Dialog and How to Handle It
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - Browser autoplay restriction: browsers block media with sound from playing before the user interacts with the page. When Web TUICallKit detects a playback failure, it shows a "Resume Playback" dialog requiring the user to click "Resume."
15
+ - This issue occurs most often in webview environments (e.g., H5 pages embedded in native apps).
16
+ - Disabling this dialog is not recommended because it may cause no-sound issues. If you must disable it, use `callExperimentalAPI` to set `enableAutoPlayDialog: 0`.
17
+
18
+ ## 2. Field / API Reference
19
+
20
+ | Field / API | Purpose | Notes |
21
+ |---|---|---|
22
+ | `enableAutoPlayDialog` | Autoplay dialog toggle | `1` enabled (default), `0` disabled |
23
+ | `callExperimentalAPI` | Invoke experimental API | Called via the TRTC instance to set `enableAutoPlayDialog` |
24
+ | `getTUICallEngineInstance()` | Get the TUICallEngine instance | Obtained from `TUICallKitAPI` to access the underlying engine |
25
+ | `getTRTCCloudInstance()` | Get the TRTC instance | Obtained from TUICallEngine to access the TRTC cloud instance |
26
+
27
+ ## 3. Mechanism & Sequence
28
+
29
+ User enters the call page -> TUICallKit attempts to auto-play audio -> browser blocks autoplay -> playback fails -> TUICallKit shows the "Resume Playback" dialog -> user clicks "Resume" -> audio plays normally.
30
+
31
+ In webview scenarios, the host app imposes stricter autoplay restrictions, making this issue more likely.
32
+
33
+ ## 4. Standard Usage
34
+
35
+ Disabling the dialog is not recommended. If your use case requires it:
36
+
37
+ 1. Get the TUICallEngine instance from `TUICallKitAPI`.
38
+ 2. Get the TRTC cloud instance from TUICallEngine.
39
+ 3. Call `callExperimentalAPI` on the TRTC instance to set `enableAutoPlayDialog: 0`.
40
+
41
+ ```javascript
42
+ // React: @trtc/calls-uikit-react
43
+ // Vue 3: @trtc/calls-uikit-vue
44
+ // Vue 2.7: @trtc/calls-uikit-vue2
45
+ // Vue 2.6: @trtc/calls-uikit-vue2.6 (API 一致,仅包名不同)
46
+ import { TUICallKitAPI } from "@trtc/calls-uikit-react";
47
+
48
+ const trtcCloudInstance = TUICallKitAPI?.getTUICallEngineInstance()?.getTRTCCloudInstance();
49
+ const params = {
50
+ api: 'enableAutoPlayDialog',
51
+ params: { enable: 0 },
52
+ };
53
+ trtcCloudInstance?.callExperimentalAPI(JSON.stringify(params));
54
+ ```
55
+
56
+ ## 5. Expected Results
57
+
58
+ - Dialog enabled: a "Resume Playback" prompt appears during calls; audio plays normally after the user clicks it.
59
+ - Dialog disabled: no prompt appears during calls; audio auto-plays once the browser allows it (if still blocked, there is no sound).
60
+
61
+ ## 6. Common Pitfalls
62
+
63
+ - Pitfall 1: Assuming the dialog is a TUICallKit bug (it is actually the browser's autoplay restriction policy).
64
+ - Pitfall 2: Disabling the dialog and expecting audio to play correctly in all scenarios (disabling the dialog does not bypass the autoplay restriction; no-sound issues may still occur).
65
+ - Pitfall 3: Calling `enableAutoPlayDialog` before TUICallKit initialization (it must be called after obtaining the TRTC instance).
66
+
67
+ ## 7. Problem Definition (retrieval hint)
68
+
69
+ Web TUICallKit shows a "Resume Playback" dialog during calls, requiring a user click before audio is heard. How to resolve this and whether the dialog can be disabled.
70
+
71
+ ## 8. Alternative Queries (retrieval recall)
72
+
73
+ - Why is there no sound in TUICallKit calls?
74
+ - Why does TUICallKit show a "Resume Playback" prompt?
75
+ - How to disable the TUICallKit autoplay dialog?
76
+ - How to fix no sound in TUICallKit inside a webview?
77
+ - How to configure `enableAutoPlayDialog`?
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: "How to Display Call Messages When Integrating TUICallKit with a UI-less Chat SDK Project(TUICallKit 通话消息上屏 / 通话信令字段含义)"
3
+ product: call
4
+ frameworks: [react, vue, miniprogram, android, ios, flutter, uni-app, web]
5
+ scope: platform_common
6
+ tags: [TUICallKit, call-message, custom message, actionType, cmd, call_end, call message rendering]
7
+ version_range: ">=2.0.0"
8
+ ---
9
+
10
+ # How to Display Audio/Video Call Messages When Integrating TUICallKit with a UI-less Chat SDK Project
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - Call messages are custom messages sent by the backend via the Chat REST API during TUICallKit calls. Each platform can retrieve them through the Chat SDK's message-received event or by pulling message history.
15
+ - Real-time call states (ringing, answering, hanging up) are handled by TUICallKit event listeners and do not rely on Chat messages.
16
+ - Use `actionType` to determine the call result type (hang up / cancel / reject / timeout) and `cmd` to distinguish voice / video / busy.
17
+ - Call duration is obtained from the `call_end` field, in seconds.
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / API | Purpose | Notes |
22
+ |---|---|---|
23
+ | `actionType` | Call event type | 1=initiate/hang up, 2=cancel, 3=answer, 4=reject, 5=timeout |
24
+ | `cmd` | Call command subtype | `videoCall` video call, `audioCall` voice call, `hangup` hang up, `line_busy` busy |
25
+ | `call_end` | Call duration | Present when `actionType=1` and `cmd=hangup`, in seconds |
26
+ | `MESSAGE_RECEIVED` | Message received event | Unified Chat SDK event that includes call custom messages |
27
+ | `getMessageList` | Pull message history | Called when entering a conversation; call messages are included in the returned list |
28
+
29
+ ### actionType and cmd Mapping
30
+
31
+ | Scenario | actionType | cmd | Notes |
32
+ |---|---|---|---|
33
+ | Initiate call | 1 | `videoCall` or `audioCall` | Sent by caller |
34
+ | Answered | 3 | — | Triggered after callee answers |
35
+ | Call ended | 1 | `hangup` | One party hung up; `call_end` contains duration |
36
+ | Call cancelled | 2 | — | Caller cancelled before answer |
37
+ | Call rejected | 4 | — | Callee actively rejected |
38
+ | Remote busy | 4 | `line_busy` | Callee is already in a call |
39
+ | Timeout (no answer) | 5 | — | Callee did not answer within the time limit |
40
+
41
+ ## 3. Mechanism & Sequence
42
+
43
+ Caller initiates a call -> TUICallKit establishes the call connection via a signaling channel (not Chat messages) -> during the call, each state change (cancel / answer / reject / timeout / hang up) triggers the TUICallKit backend to send a custom message to the Chat SDK via REST API -> both parties receive the message through `MESSAGE_RECEIVED` -> parse `actionType` and `cmd` to identify the event type and update the UI.
44
+
45
+ The call process itself (initiate, answer, cancel, reject, timeout) does not rely on Chat custom messages for notification; Chat messages are solely used to display call records in the conversation after the call ends.
46
+
47
+ ## 4. Standard Usage
48
+
49
+ 1. Retrieve the call custom messages sent by the backend via the Chat SDK (listen to the message-received event or pull message history; the API name varies by platform but the semantics are the same).
50
+ 2. Read `message.actionType` and `message.cmd` to determine the call event type.
51
+ 3. For hang-up messages (`actionType=1, cmd=hangup`), read `message.call_end` to display the call duration.
52
+ 4. Other `actionType` values indicate why the call was not connected (cancel / reject / busy / timeout); update the UI display accordingly.
53
+
54
+ ## 5. Expected Results
55
+
56
+ - After each call state change, a call custom message can be received via the Chat SDK.
57
+ - `actionType` and `cmd` correctly reflect the call state change.
58
+ - The `call_end` value accurately reflects the actual call duration.
59
+
60
+ ## 6. Common Pitfalls
61
+
62
+ - Pitfall 1: Treating call messages as generic custom messages without reading `actionType` to distinguish states.
63
+ - Pitfall 2: Only handling `MESSAGE_RECEIVED` without processing offline call messages pulled via `getMessageList`.
64
+ - Pitfall 3: Calculating call duration from the `timestamp` difference between messages (should read directly from the `call_end` field).
65
+ - Pitfall 4: Not handling the `line_busy` scenario, causing busy to be treated as a normal rejection.
66
+
67
+ ## 7. Problem Definition (retrieval hint)
68
+
69
+ When integrating TUICallKit with a UI-less Chat SDK project, how to retrieve and render audio/video call messages (initiate / answer / hang up / cancel / reject / timeout / busy) via the Chat SDK.
70
+
71
+ ## 8. Alternative Queries (retrieval recall)
72
+
73
+ - How to parse TUICallKit call messages?
74
+ - What do the various `actionType` values mean?
75
+ - How to get the call duration after a call ends?
76
+ - How to distinguish between initiate and hang up in `MESSAGE_RECEIVED` call messages?
77
+ - How to determine if the callee is busy?
78
+ - Is call message parsing the same on mini programs and Web?
@@ -0,0 +1,110 @@
1
+ ---
2
+ title: "TUICallKit Difference Between calls and call/groupCall(call、groupCall 和 calls 的区别 / 参数1和2分别代表什么)"
3
+ product: call
4
+ frameworks: [react, vue, web]
5
+ scope: platform_common
6
+ tags: [call, calls, groupCall, userIDList, TUICallKit, init, v4.x, calls-uikit, vue2, vue2.6, vue2.7, vue3, call vs calls difference, callMediaType, parameters 1 and 2, numeric literal, call type, enum constant]
7
+ version_range: ">=4.0.0"
8
+ ---
9
+
10
+ # TUICallKit React/Vue: Difference Between calls and call/groupCall for Initiating Audio/Video Calls
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - TUICallKit React / Vue **v4.x must use `calls`** to initiate one-on-one or group calls.
15
+ - `call` and `groupCall` are deprecated since v4.0.0.
16
+ - `init` must be completed before initiating a call; otherwise the call may fail or enter an abnormal state.
17
+ - Use the `CallMediaType` enum constant for `type`; using numeric literals (1/2) as the primary approach is not recommended.
18
+ - `userIDList` must be an array (even for one-on-one calls); pass `chatGroupID` only when linking with a Chat group.
19
+
20
+ ## 2. Field / API Reference
21
+
22
+ | Field / API | Purpose | Notes |
23
+ |---|---|---|
24
+ | `TUICallKitAPI` | v4.x entry object | Imported from `@trtc/calls-uikit-{react\|vue}`, replaces the legacy `TUICallKitServer` |
25
+ | `calls` | Initiate a call (v4.x) | Unified entry for one-on-one and group calls |
26
+ | `call` / `groupCall` | Initiate a call (legacy) | Used before v4.0.0, deprecated in v4.x |
27
+ | `CallMediaType` | Call media type enum | `AUDIO` for voice, `VIDEO` for video |
28
+ | `roomID` / `strRoomID` | Room ID | Mutually exclusive; choose one, do not mix |
29
+
30
+ ## 3. Mechanism & Sequence
31
+
32
+ Initialize -> log in -> call `calls` to initiate a call -> wait for callee to answer -> call established -> call ends.
33
+
34
+ For new v4.x projects, start directly with `calls`. When migrating legacy projects, replace `call`/`groupCall` with `calls` and replace `TUICallKitServer` with `TUICallKitAPI`.
35
+
36
+ ## 4. Standard Usage
37
+
38
+ 1. Import `TUICallKitAPI` from the corresponding platform package.
39
+ 2. Call `TUICallKitAPI.init({ SDKAppID, userID, userSig })` to complete initialization.
40
+ 3. Call `TUICallKitAPI.calls({ userIDList, type })` to initiate a call.
41
+ 4. Handle call initiation failures in the `catch` branch.
42
+
43
+ ```javascript
44
+ // React: @trtc/calls-uikit-react
45
+ // Vue 3: @trtc/calls-uikit-vue
46
+ // Vue 2.7: @trtc/calls-uikit-vue2
47
+ // Vue 2.6: @trtc/calls-uikit-vue2.6 (API 一致,仅包名不同)
48
+ import { TUICallKitAPI } from "@trtc/calls-uikit-react";
49
+
50
+ // 1. 初始化
51
+ TUICallKitAPI.init({ SDKAppID, userID, userSig });
52
+
53
+ // 2. 发起通话(单聊或多人)
54
+ try {
55
+ await TUICallKitAPI.calls({
56
+ userIDList: ['jack', 'tom'],
57
+ type: CallMediaType.VIDEO_CALL
58
+ });
59
+ } catch (error: any) {
60
+ console.error(`[TUICallKit] Failed to call. Reason:${error}`);
61
+ }
62
+ ```
63
+
64
+ `calls` parameter reference:
65
+
66
+ | Parameter | Type | Required | Description |
67
+ |---|---|---|---|
68
+ | userIDList | Array\<String\> | Yes | List of users to call |
69
+ | type | CallMediaType | Yes | Call media type (`AUDIO`/`VIDEO`) |
70
+ | chatGroupID | String | No | Chat group ID |
71
+ | roomID | Number | No | Numeric room ID, range [1, 2147483647] |
72
+ | strRoomID | String | No | String room ID. Mutually exclusive with roomID; if both are provided, roomID takes priority |
73
+ | timeout | Number | No | Call timeout in seconds, default 30s, range 10s–600s |
74
+ | userData | String | No | Custom extension field; the callee can read it from `ON_CALL_RECEIVED` |
75
+ | offlinePushInfo | Object | No | Custom offline push parameters |
76
+
77
+ CallMediaType values:
78
+
79
+ | CallMediaType | Description |
80
+ |---|---|
81
+ | `CallMediaType.AUDIO` | Voice call |
82
+ | `CallMediaType.VIDEO` | Video call |
83
+
84
+ ## 5. Expected Results
85
+
86
+ - After `TUICallKitAPI.calls` succeeds, the callee receives a call invitation.
87
+ - Once the callee answers, the call is established and both parties can communicate via audio/video.
88
+ - When the call times out or the callee rejects, the `catch` branch receives a clear error message.
89
+
90
+ ## 6. Common Pitfalls
91
+
92
+ - Pitfall 1: Continuing to use `call` / `groupCall` in v4.x (deprecated; no error is thrown but functionality is incomplete).
93
+ - Pitfall 2: Passing a single string via a `userID` field instead of `userIDList` (v4.x no longer supports single-string parameters).
94
+ - Pitfall 3: Mixing `roomID` and `strRoomID` (they are mutually exclusive and not interchangeable).
95
+ - Pitfall 4: Persistently using numeric literals (1/2) for `type` instead of `CallMediaType` enum constants.
96
+
97
+ ## 7. Problem Definition (retrieval hint)
98
+
99
+ TUICallKit React/Vue v4.x users ask how to initiate audio/video calls and the difference between `calls` and the legacy `call`/`groupCall`, including migration steps.
100
+
101
+ ## 8. Alternative Queries (retrieval recall)
102
+
103
+ - How to initiate a call with TUICallKit React/Vue?
104
+ - What is the difference between `calls` and `call`?
105
+ - How to pass the `userIDList` parameter in v4.x?
106
+ - Can `CallMediaType` and numeric values 1/2 be mixed?
107
+ - What should I watch out for when migrating from `TUICallKitServer.call` to `TUICallKitAPI.calls`?
108
+ - What do `type` parameter values 1 and 2 represent in `call`?
109
+ - What do `callMediaType` values 1 and 2 mean — voice or video?
110
+ - What do TUICallKit call type numbers 1 and 2 mean?
@@ -0,0 +1,123 @@
1
+ ---
2
+ title: "TUICallEngine Call Invitation Receiving and Initiating Flow(TUICallEngine 发起通话的流程)"
3
+ product: call
4
+ frameworks: [web, miniprogram]
5
+ scope: platform_common
6
+ tags: [TUICallEngine, ON_CALL_RECEIVED, calls, accept, reject, call invitation, call-engine-lite, userData, callMediaType]
7
+ version_range: ">=4.0.0"
8
+ ---
9
+
10
+ # TUICallEngine Call Invitation Receiving and Initiating Flow
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - To receive call invitations, listen only to `TUICallEvent.ON_CALL_RECEIVED`. **Do not listen to the Chat SDK's `MESSAGE_RECEIVED` and parse call invitations manually.**
15
+ - To initiate a call, use `TUICallEngine.calls()` with `userIDList` (array) and `type` (media type) in the parameters.
16
+ - After receiving an invitation, call `accept()` to answer or `reject()` to decline. Extension data is passed via the `userData` string.
17
+ - The Web and mini program APIs are identical; only the package name differs (Web: `@trtc/call-engine-lite-js`, Mini Program: `@trtc/call-engine-lite-wx`).
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / API | Purpose | Notes |
22
+ |---|---|---|
23
+ | `TUICallEvent.ON_CALL_RECEIVED` | Receive call invitation event | Triggered when the callee receives an incoming call; do not parse from Chat custom messages |
24
+ | `calls({userIDList, type, ...})` | Initiate a call | Called by the caller; unified entry for one-on-one and group calls |
25
+ | `accept()` | Answer the call | Called by the callee after receiving an invitation |
26
+ | `reject()` | Reject the call | Called by the callee after receiving an invitation |
27
+ | `userData` | Custom extension data | A string passed by the caller; the callee reads it from the `ON_CALL_RECEIVED` event |
28
+ | `callMediaType` | Call media type | Carried in the `ON_CALL_RECEIVED` event: 1=voice, 2=video |
29
+ | `inviteID` | Invitation ID | Identifies a single call invitation, used to correlate subsequent events |
30
+ | `callId` | Call ID | Unique identifier for this call |
31
+ | `callRole` | Role | Caller (`call`) / Callee (`called`) |
32
+
33
+ ### ON_CALL_RECEIVED Event Fields
34
+
35
+ | Parameter | Type | Description |
36
+ |---|---|---|
37
+ | callerId | String | The inviter |
38
+ | calleeIdList | Array\<String\> | Other users also invited |
39
+ | isFromGroup | Boolean | Whether it is a group call |
40
+ | inviteData | Object | Call data |
41
+ | inviteID | String | Invitation ID |
42
+ | userData | String | Extension field — custom data passed by the caller |
43
+ | callId | String | Unique ID for this call |
44
+ | roomID | Number | Audio/video room ID |
45
+ | callMediaType | Number | Call media type (1=voice, 2=video) |
46
+ | callRole | String | Role: caller / callee |
47
+
48
+ ### calls Parameter Reference
49
+
50
+ | Parameter | Type | Required | Description |
51
+ |---|---|---|---|
52
+ | userIDList | Array\<String\> | Yes | List of users to call |
53
+ | type | Number | Yes | 1=voice, 2=video (`CallMediaType`) |
54
+ | userData | String | No | Custom extension data; the callee reads it from `ON_CALL_RECEIVED` |
55
+ | timeout | Number | No | Timeout in seconds, default 30 |
56
+ | roomID | Number | No | Numeric room ID, range [1, 2147483647] |
57
+ | strRoomID | String | No | String room ID; mutually exclusive with roomID |
58
+ | chatGroupID | String | No | Chat group ID; used for multi-party calls in a group chat |
59
+ | offlinePushInfo | Object | No | Custom offline push parameters |
60
+
61
+ ## 3. Mechanism & Sequence
62
+
63
+ Caller invokes `calls()` to send an invitation -> the SDK sends the invitation via the signaling channel -> callee triggers `ON_CALL_RECEIVED` -> callee calls `accept()` to answer or `reject()` to decline -> call is established / ended.
64
+
65
+ Real-time state changes during the call are handled through TUICallEngine event listeners and do not rely on Chat messages.
66
+
67
+ ## 4. Standard Usage
68
+
69
+ 1. Create a `TUICallEngine` instance and log in.
70
+ 2. The caller calls `calls()` to initiate a call invitation.
71
+ 3. The callee listens for the `ON_CALL_RECEIVED` event and calls `accept()` or `reject()` upon receiving it.
72
+ 4. Extension data is passed as a `userData` string; the callee reads it from the event.
73
+
74
+ ```javascript
75
+ // Web: @trtc/call-engine-lite-js
76
+ // 小程序: @trtc/call-engine-lite-wx (API 一致,仅包名不同)
77
+ import { TUICallEngine, TUICallEvent } from '@trtc/call-engine-lite-js';
78
+
79
+ // 创建实例并登录
80
+ const tuiCallEngine = TUICallEngine.createInstance({ SDKAppID: xxx, tim: timInstance });
81
+ await tuiCallEngine.login({ userID, userSig });
82
+
83
+ // 主叫:发起通话邀请
84
+ await tuiCallEngine.calls({
85
+ userIDList: ['user_bob'],
86
+ type: 2, // 1=语音 2=视频
87
+ userData: '{"ext":"info"}',
88
+ timeout: 30,
89
+ });
90
+
91
+ // 被叫:监听通话邀请
92
+ tuiCallEngine.on(TUICallEvent.ON_CALL_RECEIVED, (event) => {
93
+ console.log('来电', event);
94
+ // 展示接听 UI,随后调用 accept() 或 reject()
95
+ tuiCallEngine.accept({ inviteID: event.inviteID, roomID: event.roomID });
96
+ });
97
+ ```
98
+
99
+ ## 5. Expected Results
100
+
101
+ - After the caller invokes `calls()`, the callee receives the `ON_CALL_RECEIVED` event.
102
+ - After the callee calls `accept()`, the call is established; after `reject()`, the call is declined.
103
+ - `userData` passed by the caller can be correctly read by the callee from the event.
104
+ - Other events during the call (answer, hang up, timeout, etc.) are triggered normally through TUICallEngine's event mechanism.
105
+
106
+ ## 6. Common Pitfalls
107
+
108
+ - Pitfall 1: Listening to `MESSAGE_RECEIVED` to manually parse call invitations (use `ON_CALL_RECEIVED` instead).
109
+ - Pitfall 2: Using `businessID` / low-level payload formats or other SDK internal fields (no official public documentation exists; do not fabricate them).
110
+ - Pitfall 3: Assuming a `customData` field exists (v4.x uses the `userData` string to pass custom data).
111
+
112
+ ## 7. Problem Definition (retrieval hint)
113
+
114
+ TUICallEngine Web / mini program users need to understand how to receive call invitations, initiate calls, and pass custom extension data.
115
+
116
+ ## 8. Alternative Queries (retrieval recall)
117
+
118
+ - How does TUICallEngine receive call invitations?
119
+ - How does TUICallEngine initiate a call?
120
+ - What do the `ON_CALL_RECEIVED` fields mean?
121
+ - How to fill in the `calls` API parameters?
122
+ - How does TUICallEngine pass custom extension data?
123
+ - Is the call invitation flow in mini program TUICallEngine the same as Web?
@@ -0,0 +1,67 @@
1
+ ---
2
+ title: "Set log Level for TUICallEngine(TUICallEngine / setLogLevel / 日志级别 / 控制台日志 / 关闭日志)"
3
+ product: call
4
+ frameworks: [web, miniprogram]
5
+ scope: platform_common
6
+ tags: [TUICallEngine, setLogLevel, log level, console log, disable log]
7
+ version_range: ">=4.0.0"
8
+ ---
9
+
10
+ # Setting the Log Output Level for TUICallEngine
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - TUICallEngine provides the `setLogLevel` API to control the log output level. It can be called immediately after creating an instance.
15
+ - During integration and debugging, set the level to 0 (verbose). After going live, set it to level 1 (default, key info) or higher.
16
+ - To disable all logs, set the level to 4.
17
+
18
+ ## 2. Field / API Reference
19
+
20
+ | Level | Value | Description |
21
+ |---|---|---|
22
+ | Verbose | 0 | High log volume; recommended during integration and debugging |
23
+ | Key info | 1 | SDK outputs key information; **default log level** |
24
+ | Warning | 2 | SDK outputs only warning and error level logs |
25
+ | Error | 3 | SDK outputs only error level logs |
26
+ | Silent | 4 | SDK prints no logs at all |
27
+
28
+ ## 3. Mechanism & Sequence
29
+
30
+ Create a `TUICallEngine` instance -> call `setLogLevel` to set the log level -> the SDK outputs logs at the specified level going forward. A single call takes effect globally; no repeated calls are needed.
31
+
32
+ ## 4. Standard Usage
33
+
34
+ 1. Create an engine instance via `TUICallEngine.createInstance(options)`.
35
+ 2. Call `tuiCallEngine.setLogLevel(level)` to set the log level.
36
+ 3. Use level 0 during integration and debugging; adjust to level 1–4 as needed after going live.
37
+
38
+ ```javascript
39
+ import TUICallEngine from '@trtc/call-engine-lite-js'; // Web
40
+ // import TUICallEngine from '@trtc/call-engine-lite-wx'; // 小程序
41
+
42
+ const tuiCallEngine = TUICallEngine.createInstance({ SDKAppID: 0 });
43
+ tuiCallEngine.setLogLevel(0); // 接入调试:全量日志
44
+ ```
45
+
46
+ ## 5. Expected Results
47
+
48
+ - After calling `setLogLevel`, console log volume matches the target level.
49
+ - At level 4, the SDK produces no log output.
50
+ - Takes effect immediately without restarting or reinitializing.
51
+
52
+ ## 6. Common Pitfalls
53
+
54
+ - Pitfall 1: Assuming `setLogLevel` can only be called after `init` (it can actually be called as soon as the instance is created).
55
+ - Pitfall 2: Setting level 4 and still expecting to receive critical warnings (level 4 disables all logs).
56
+
57
+ ## 7. Problem Definition (retrieval hint)
58
+
59
+ TUICallEngine users want to control SDK log output volume: view full logs during integration, reduce logs after going live, or disable log output entirely.
60
+
61
+ ## 8. Alternative Queries (retrieval recall)
62
+
63
+ - How to disable TUICallEngine logs?
64
+ - How to set the TUICallEngine log level?
65
+ - What do the `setLogLevel` values mean?
66
+ - How to view full TUICallEngine logs during integration?
67
+ - Is the TUICallEngine log level the same on mini programs and Web?
@@ -0,0 +1,81 @@
1
+ ---
2
+ title: "How to Get the TUICallEngine Instance from Web TUICallKit(TUICallKit 如何获取 TUICallengine 实例)"
3
+ product: call
4
+ frameworks: [react, vue, miniprogram, web]
5
+ scope: platform_common
6
+ tags: [TUICallKit, getTUICallEngineInstance, engine instance, underlying engine, WeChat native mini program, uniapp mini program]
7
+ version_range: ">=4.0.0"
8
+ ---
9
+
10
+ # How to Get the TUICallEngine Instance from Web TUICallKit
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - Use `TUICallKitAPI.getTUICallEngineInstance()` to get the underlying TUICallEngine instance.
15
+ - Once you have the engine instance, you can listen to call events (e.g., `ON_CALL_BEGIN`, `ON_CALL_RECEIVED`) via `.on()`.
16
+
17
+ ## 2. Field / API Reference
18
+
19
+ | Field / API | Purpose | Notes |
20
+ |---|---|---|
21
+ | `TUICallKitAPI` | TUICallKit API entry | Imported from the corresponding platform package; provides `getTUICallEngineInstance()` |
22
+ | `getTUICallEngineInstance()` | Get the TUICallEngine instance | Returns the engine instance for event listening and underlying API calls |
23
+ | `TUICallEngine` | Engine instance | Obtained via this method; used to register event callbacks |
24
+
25
+ ## 3. Mechanism & Sequence
26
+
27
+ TUICallKit initialization completes -> call `TUICallKitAPI.getTUICallEngineInstance()` to get the engine instance -> use the engine instance to register event listeners or call underlying APIs.
28
+
29
+ Ensure TUICallKit initialization is complete before calling; otherwise it may return `undefined`.
30
+
31
+ ## 4. Standard Usage
32
+
33
+ 1. Import `TUICallKitAPI` from the corresponding platform package.
34
+ 2. Call `TUICallKitAPI.getTUICallEngineInstance()` to get the engine instance.
35
+ 3. Use the engine instance to register event listeners or call other underlying methods.
36
+
37
+ ```javascript
38
+ // React: @trtc/calls-uikit-react
39
+ // Vue 3: @trtc/calls-uikit-vue
40
+ // Vue 2.7: @trtc/calls-uikit-vue2
41
+ // Vue 2.6: @trtc/calls-uikit-vue2.6
42
+ // uniapp 小程序: @trtc/calls-uikit-wx-uniapp
43
+ // 微信原生小程序: @trtc/calls-uikit-wx (API 一致,仅包名不同)
44
+ import { TUICallKitAPI } from "@trtc/calls-uikit-react";
45
+
46
+ const tuiCallEngine = TUICallKitAPI.getTUICallEngineInstance();
47
+
48
+ if (tuiCallEngine) {
49
+ // 获取成功,可监听事件或调用底层 API
50
+ tuiCallEngine.on(TUICallEvent.ON_CALL_BEGIN, (event) => {
51
+ console.log('通话建立', event);
52
+ });
53
+ } else {
54
+ console.warn('TUICallEngine 实例未就绪,请确认 TUICallKit 已完成初始化');
55
+ }
56
+ ```
57
+
58
+ ## 5. Expected Results
59
+
60
+ - `getTUICallEngineInstance()` returns a non-`undefined` engine instance that can be used normally.
61
+ - Event callbacks registered via the engine instance trigger correctly.
62
+ - Multiple calls return the same engine instance (singleton).
63
+
64
+ ## 6. Common Pitfalls
65
+
66
+ - Pitfall 1: Calling `getTUICallEngineInstance()` before TUICallKit initialization completes (returns `undefined`).
67
+ - Pitfall 2: Assuming each call to `getTUICallEngineInstance()` creates a new engine instance (it is a singleton; multiple calls return the same instance).
68
+ - Pitfall 3: Directly creating an instance from the mini program engine package (use `TUICallKitAPI.getTUICallEngineInstance()` instead of creating one manually).
69
+
70
+ ## 7. Problem Definition (retrieval hint)
71
+
72
+ TUICallKit users need to obtain the underlying TUICallEngine instance to listen to call events or invoke underlying APIs.
73
+
74
+ ## 8. Alternative Queries (retrieval recall)
75
+
76
+ - How to get the TUICallEngine instance from TUICallKit?
77
+ - How to use `getTUICallEngineInstance`?
78
+ - How to get the TUICallEngine instance in TUICallKit Vue?
79
+ - How to listen to underlying TUICallEngine events in TUICallKit React?
80
+ - Can TUICallKit mini program get the TUICallEngine instance?
81
+ - What can you do after getting the engine instance from TUICallKit?
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: "How to get the roomID during a TUICallKit Call(获取 TUICallKit 房间号)"
3
+ product: call
4
+ frameworks: [react, vue, miniprogram, web]
5
+ scope: platform_common
6
+ tags: [TUICallKit, roomID, room ID, ON_CALL_BEGIN, ON_CALL_END, callengine, get room ID, call room ID, Roomid, onCallBegin]
7
+ version_range: ">=4.0.0"
8
+ ---
9
+
10
+ # How to Get the Room ID During a TUICallKit Call
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - To get the call room ID: listen to TUICallEngine events (`ON_CALL_BEGIN`, `ON_CALL_END`, etc.) and read `event.roomID`, which is the current call's room ID.
15
+ - First obtain the TUICallEngine instance via `TUICallKitAPI.getTUICallEngineInstance()`, then call `on()` to listen to events.
16
+ - The API is the same across React, Vue, and mini programs; only the package name differs.
17
+
18
+ ## 2. Field / API Reference
19
+
20
+ | Field / API | Purpose | Notes |
21
+ |---|---|---|
22
+ | `TUICallEvent.ON_CALL_BEGIN` | Call established event | Triggered when the call connects; carries `roomID` |
23
+ | `TUICallEvent.ON_CALL_END` | Call ended event | Triggered when the call ends; carries `roomID` |
24
+ | `TUICallKitAPI.getTUICallEngineInstance()` | Get the TUICallEngine instance | Obtains the underlying engine instance from TUICallKit |
25
+ | `engine.on(event, handler)` | Listen to engine events | Registers event callbacks via the engine instance |
26
+ | `event.roomID` | Call room ID | The room ID field in the event parameters |
27
+
28
+ ## 3. Mechanism & Sequence
29
+
30
+ TUICallKit initializes -> call connects (`ON_CALL_BEGIN`) -> call in progress -> call ends (`ON_CALL_END`). Call-related events such as `ON_CALL_BEGIN` and `ON_CALL_END` all carry `roomID`; simply read it in the callback.
31
+
32
+ ## 4. Standard Usage
33
+
34
+ 1. Get the TUICallEngine instance via `TUICallKitAPI.getTUICallEngineInstance()`.
35
+ 2. Call `engine.on()` to listen to `TUICallEvent.ON_CALL_BEGIN` or `ON_CALL_END`.
36
+ 3. Read `event.roomID` in the callback to obtain the room ID.
37
+
38
+ ```javascript
39
+ // Web: @trtc/call-engine-lite-js
40
+ // 小程序: @trtc/call-engine-lite-wx (API 一致,仅包名不同)
41
+ import { TUICallEvent } from "@trtc/call-engine-lite-js";
42
+
43
+ const handleOnCallBegin = function(event) {
44
+ // event.roomID 即为当前通话的房间号
45
+ console.log('通话建立,房间号:', event.roomID);
46
+ };
47
+
48
+ TUICallKitAPI.getTUICallEngineInstance().on(
49
+ TUICallEvent.ON_CALL_BEGIN,
50
+ handleOnCallBegin
51
+ );
52
+ ```
53
+
54
+ ## 5. Expected Results
55
+
56
+ - After the call is established, the `ON_CALL_BEGIN` callback fires and `event.roomID` returns a valid room ID.
57
+ - After the call ends, the `ON_CALL_END` callback fires and `event.roomID` can also be read.
58
+ - The `roomID` value remains constant throughout the call.
59
+
60
+ ## 6. Common Pitfalls
61
+
62
+ - Pitfall 1: Calling `getTUICallEngineInstance()` before TUICallKit initialization completes (ensure initialization is done first).
63
+ - Pitfall 2: Assuming `roomID` changes during the call (the room ID is fixed for a given call).
64
+
65
+ ## 7. Problem Definition (retrieval hint)
66
+
67
+ Web TUICallKit React/Vue/mini program users need to get the current call's room ID for logging or associating with other services.
68
+
69
+ ## 8. Alternative Queries (retrieval recall)
70
+
71
+ - How to get the room ID in TUICallKit?
72
+ - How to obtain the roomID when a call is established?
73
+ - How to listen to the `ON_CALL_BEGIN` event?
74
+ - How to get the call room ID in TUICallKit React?
75
+ - How to get the roomID in mini program TUICallKit?
76
+ - How to get the call room ID / Roomid?
77
+ - How to get the room ID in Web TUICallKit?
78
+ - How to obtain the call room ID?
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: "TUICallKit Limitations(TUICallKit:离线推送、支付宝、抖音、企微以及桌面版微信小程序)"
3
+ product: call
4
+ frameworks: [react, vue, miniprogram, web]
5
+ scope: platform_common
6
+ tags: [TUICallKit, limitation, unsupported, offline push, Alipay, Douyin mini program, WeCom, desktop, compatibility]
7
+ version_range: ">=2.0.0"
8
+ ---
9
+
10
+ # TUICallKit Limitations
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ | Question | Answer |
15
+ |---|---|
16
+ | Can Web TUICallKit receive offline push messages? | No. Web TUICallKit does not support receiving offline push messages. |
17
+ | Can WeChat Mini Program TUICallKit run on Alipay or Douyin mini programs? | No. It only supports running on WeChat Mini Programs. |
18
+ | Can WeChat Mini Program TUICallKit run in WeCom (Enterprise WeChat)? | No. It only supports running on WeChat Mini Programs. |
19
+ | Can WeChat Mini Program TUICallKit run in the PC desktop WeChat client? | No. It only supports running on WeChat Mini Programs. |
20
+ | Can WeChat Mini Program TUICallKit receive offline push messages? | No. WeChat Mini Program TUICallKit does not support receiving offline push messages. |
21
+
22
+ ## 3. Mechanism & Sequence
23
+
24
+ The capability boundaries of TUICallKit on each platform are determined by underlying platform restrictions. WeChat Mini Programs rely on WeChat native capabilities and cannot run cross-platform; the Web platform is limited by browser autoplay policies and offline push mechanisms.
25
+
26
+ ## 7. Problem Definition (retrieval hint)
27
+
28
+ Users inquire about TUICallKit capability boundaries across different platforms and scenarios, confirming whether offline push, cross-platform execution, etc. are supported.
29
+
30
+ ## 8. Alternative Queries (retrieval recall)
31
+
32
+ - Does TUICallKit support offline push?
33
+ - Can WeChat Mini Program TUICallKit run on Alipay?
34
+ - Can TUICallKit mini program run in WeCom?
35
+ - Does TUICallKit WeChat Mini Program support the PC WeChat client?
36
+ - Does TUICallKit Web have offline message notifications?
37
+ - Does TUICallKit mini program only support WeChat?