@tencent-rtc/mcp 1.3.8 → 1.4.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 (429) hide show
  1. package/package.json +2 -2
  2. package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/android-faq.md} +10 -22
  3. package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/flutter-faq.md} +10 -22
  4. package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/ios-faq.md} +10 -22
  5. package/resource/doc/callkit/preset/android/api.md +296 -0
  6. package/resource/doc/callkit/preset/android/integration.md +430 -0
  7. package/resource/doc/callkit/preset/flutter/api.md +410 -0
  8. package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +35 -97
  9. package/resource/doc/callkit/preset/ios/api.md +80 -0
  10. package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +37 -118
  11. package/resource/doc/callkit/preset/react/api.md +501 -0
  12. package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +5 -20
  13. package/resource/doc/callkit/preset/vue/api.md +501 -0
  14. package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +4 -19
  15. package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -38
  16. package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
  17. package/resource/doc/chatkit/android/integration.md +490 -0
  18. package/resource/doc/chatkit/faq/android_sdk/client-api.md +281 -0
  19. package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +0 -1
  20. package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -1
  21. package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +199 -0
  22. package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
  23. package/resource/doc/chatkit/faq/ios_sdk/client-api.md +235 -0
  24. package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +3 -3
  25. package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
  26. package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +19 -88
  27. package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -38
  28. package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
  29. package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +47 -165
  30. package/resource/doc/{chatuikit → chatkit}/react/components/avatar.md +0 -33
  31. package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +8 -49
  32. package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +6 -35
  33. package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +0 -6
  34. package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -11
  35. package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +96 -502
  36. package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
  37. package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
  38. package/resource/doc/chatkit/react/components/conversation-preview.md +118 -0
  39. package/resource/doc/chatkit/react/components/conversation-search.md +60 -0
  40. package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -337
  41. package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +20 -212
  42. package/resource/doc/chatkit/react/components/search.md +243 -0
  43. package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +1 -47
  44. package/resource/doc/{chatuikit → chatkit}/react/integration.md +21 -81
  45. package/resource/doc/{chatuikit → chatkit}/vue/components/avatar.md +0 -33
  46. package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -48
  47. package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +3 -5
  48. package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +0 -5
  49. package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -15
  50. package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
  51. package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
  52. package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -492
  53. package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
  54. package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
  55. package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +2 -223
  56. package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -252
  57. package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
  58. package/resource/doc/{chatuikit → chatkit}/vue/components/tuikit.md +7 -21
  59. package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +3 -62
  60. package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
  61. package/resource/doc/{chatuikit → chatkit}/vue/integration.md +22 -23
  62. package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +18 -89
  63. package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
  64. package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +28 -141
  65. package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +20 -112
  66. package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +59 -193
  67. package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
  68. package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +94 -344
  69. package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +107 -515
  70. package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +33 -173
  71. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +14 -93
  72. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -179
  73. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +19 -107
  74. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -166
  75. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -163
  76. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +69 -443
  77. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
  78. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +107 -492
  79. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +23 -165
  80. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +35 -111
  81. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +35 -193
  82. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +31 -144
  83. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +24 -116
  84. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +37 -171
  85. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +79 -459
  86. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +69 -320
  87. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +85 -502
  88. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +32 -169
  89. package/resource/doc/livekit/core-sdk/voice/android/voice-audience-list.md +263 -0
  90. package/resource/doc/livekit/core-sdk/voice/android/voice-audio-effect.md +222 -0
  91. package/resource/doc/livekit/core-sdk/voice/android/voice-barrage.md +452 -0
  92. package/resource/doc/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +536 -0
  93. package/resource/doc/livekit/core-sdk/voice/android/voice-gift.md +442 -0
  94. package/resource/doc/livekit/core-sdk/voice/android/voice-host-interaction.md +489 -0
  95. package/resource/doc/livekit/core-sdk/voice/android/voice-integration.md +574 -0
  96. package/resource/doc/livekit/core-sdk/voice/android/voice-room-list.md +435 -0
  97. package/resource/doc/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +516 -0
  98. package/resource/doc/livekit/core-sdk/voice/flutter/voice-integration.md +576 -0
  99. package/resource/doc/livekit/core-sdk/voice/ios/voice-audience-list.md +263 -0
  100. package/resource/doc/livekit/core-sdk/voice/ios/voice-audio-effect.md +212 -0
  101. package/resource/doc/livekit/core-sdk/voice/ios/voice-barrage.md +404 -0
  102. package/resource/doc/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +499 -0
  103. package/resource/doc/livekit/core-sdk/voice/ios/voice-gift.md +403 -0
  104. package/resource/doc/livekit/core-sdk/voice/ios/voice-host-interaction.md +552 -0
  105. package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +514 -0
  106. package/resource/doc/livekit/core-sdk/voice/ios/voice-room-list.md +348 -0
  107. package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -2
  108. package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
  109. package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
  110. package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +10 -49
  111. package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +26 -144
  112. package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +12 -75
  113. package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +36 -227
  114. package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +215 -0
  115. package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
  116. package/resource/doc/livekit/preset/live/vue/live-list-integration.md +241 -0
  117. package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +299 -0
  118. package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +300 -0
  119. package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +743 -0
  120. package/resource/doc/roomkit/vue/faq.md +1 -0
  121. package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
  122. package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
  123. package/resource/doc/roomkit/vue/features/device-state.md +24 -44
  124. package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
  125. package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
  126. package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
  127. package/resource/doc/roomkit/vue/features/room-state.md +25 -34
  128. package/resource/doc/roomkit/vue/features/room-view.md +30 -125
  129. package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
  130. package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
  131. package/resource/doc/roomkit/vue/features/virtual-background.md +13 -29
  132. package/resource/doc/roomkit/vue/integration.md +173 -337
  133. package/resource/doc/rtcengine/faq/common/error_code.md +1 -0
  134. package/resource/doc/rtcengine/faq/web/web.md +14 -24
  135. package/resource/doc/rtcengine/web/api.md +1 -3
  136. package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +3 -10
  137. package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +1 -5
  138. package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +1 -2
  139. package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -4
  140. package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +3 -5
  141. package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +1 -7
  142. package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +0 -2
  143. package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +4 -8
  144. package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +11 -11
  145. package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +12 -88
  146. package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -5
  147. package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +30 -37
  148. package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +13 -90
  149. package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -2
  150. package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +1 -2
  151. package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +19 -19
  152. package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
  153. package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -5
  154. package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
  155. package/resource/doc/trtc/C++/ITRTCCloud.md +686 -2835
  156. package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
  157. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +202 -1022
  158. package/resource/doc/trtc/C++/ITXDeviceManager.md +126 -767
  159. package/resource/doc/trtc/C++/TRTCCloudCallback.md +579 -2147
  160. package/resource/doc/trtc/C++/TRTCTypeDef.md +703 -3378
  161. package/resource/doc/trtc/C++/TXLiteAVCode.md +116 -908
  162. package/resource/doc/trtc/android/TRTCCloud.md +606 -2573
  163. package/resource/doc/trtc/android/TRTCCloudDef.md +752 -3640
  164. package/resource/doc/trtc/android/TRTCCloudListener.md +581 -2008
  165. package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
  166. package/resource/doc/trtc/android/TXAudioEffectManager.md +202 -1022
  167. package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
  168. package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
  169. package/resource/doc/trtc/android/TXLiteAVCode.md +114 -892
  170. package/resource/doc/trtc/iOS/TRTCCloud.md +694 -2904
  171. package/resource/doc/trtc/iOS/TRTCCloudDef.md +726 -3498
  172. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +543 -2028
  173. package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
  174. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +174 -877
  175. package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
  176. package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
  177. package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
  178. package/server.js +1 -5
  179. package/server.js.map +1 -1
  180. package/tools/call/get_callkit_api.js +32 -0
  181. package/tools/call/get_callkit_api.js.map +1 -0
  182. package/tools/call/get_native_call_uikit_integration.js +34 -0
  183. package/tools/call/get_native_call_uikit_integration.js.map +1 -0
  184. package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
  185. package/tools/call/get_web_call_uikit_integration.js.map +1 -0
  186. package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
  187. package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
  188. package/tools/chat/get_native_chat_uikit_integration.js +45 -0
  189. package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
  190. package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
  191. package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
  192. package/tools/chat/get_web_chat_uikit_integration.js +45 -0
  193. package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
  194. package/tools/common/get_faq.js +265 -0
  195. package/tools/common/get_faq.js.map +1 -0
  196. package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
  197. package/tools/common/get_usersig.js.map +1 -0
  198. package/tools/common/present_framework_choice.js +63 -0
  199. package/tools/common/present_framework_choice.js.map +1 -0
  200. package/tools/definitions/get_callkit_api_def.js +29 -0
  201. package/tools/definitions/get_callkit_api_def.js.map +1 -0
  202. package/tools/definitions/get_faq_def.js +17 -18
  203. package/tools/definitions/get_faq_def.js.map +1 -1
  204. package/tools/definitions/get_native_call_uikit_integration_def.js +15 -18
  205. package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
  206. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
  207. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
  208. package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -19
  209. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
  210. package/tools/definitions/get_native_livekit_core_features_def.js +34 -0
  211. package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
  212. package/tools/definitions/get_native_livekit_core_integration_def.js +34 -0
  213. package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
  214. package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
  215. package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
  216. package/tools/definitions/get_usersig_def.js +17 -22
  217. package/tools/definitions/get_usersig_def.js.map +1 -1
  218. package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
  219. package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
  220. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
  221. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
  222. package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
  223. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
  224. package/tools/definitions/get_web_live_uikit_integration_def.js +15 -18
  225. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
  226. package/tools/definitions/get_web_livekit_api_def.js +30 -0
  227. package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
  228. package/tools/definitions/get_web_livekit_component_detail_def.js +32 -0
  229. package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
  230. package/tools/definitions/get_web_room_uikit_integration_def.js +15 -30
  231. package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
  232. package/tools/definitions/get_web_roomkit_feature_detail_def.js +31 -0
  233. package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
  234. package/tools/definitions/get_web_trtc_sdk_api_def.js +27 -0
  235. package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
  236. package/tools/definitions/get_web_trtc_sdk_integration_def.js +27 -0
  237. package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
  238. package/tools/definitions/get_web_trtc_sdk_plugin_def.js +27 -0
  239. package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
  240. package/tools/definitions/present_framework_choice_def.js +24 -12
  241. package/tools/definitions/present_framework_choice_def.js.map +1 -1
  242. package/tools/index.js +47 -59
  243. package/tools/index.js.map +1 -1
  244. package/tools/live/get_native_livekit_core_features.js +65 -0
  245. package/tools/live/get_native_livekit_core_features.js.map +1 -0
  246. package/tools/live/get_native_livekit_core_integration.js +59 -0
  247. package/tools/live/get_native_livekit_core_integration.js.map +1 -0
  248. package/tools/live/get_web_live_uikit_integration.js +48 -0
  249. package/tools/live/get_web_live_uikit_integration.js.map +1 -0
  250. package/tools/live/get_web_livekit_api.js +32 -0
  251. package/tools/live/get_web_livekit_api.js.map +1 -0
  252. package/tools/live/get_web_livekit_component_detail.js +34 -0
  253. package/tools/live/get_web_livekit_component_detail.js.map +1 -0
  254. package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
  255. package/tools/room/get_web_room_uikit_integration.js.map +1 -0
  256. package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
  257. package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
  258. package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
  259. package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
  260. package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
  261. package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
  262. package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
  263. package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
  264. package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
  265. package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
  266. package/utils/generate-structured-result.js +61 -17
  267. package/utils/generate-structured-result.js.map +1 -1
  268. package/utils/report-cls-client.js +12 -1
  269. package/utils/report-cls-client.js.map +1 -1
  270. package/utils/report-es-client.js +2 -2
  271. package/resource/doc/chatuikit/android/integration.md +0 -287
  272. package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1371
  273. package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -932
  274. package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1119
  275. package/resource/doc/chatuikit/flutter/workflow.md +0 -941
  276. package/resource/doc/chatuikit/iOS/workflow.md +0 -0
  277. package/resource/doc/chatuikit/react/components/conversation-list.md +0 -1017
  278. package/resource/doc/chatuikit/react/components/search.md +0 -745
  279. package/resource/doc/chatuikit/react/create-group.md +0 -23
  280. package/resource/doc/chatuikit/react/init.md +0 -26
  281. package/resource/doc/chatuikit/react/workflow.md +0 -258
  282. package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
  283. package/resource/doc/chatuikit/vue/create-group.md +0 -25
  284. package/resource/doc/chatuikit/vue/init.md +0 -40
  285. package/resource/doc/chatuikit/vue/workflow.md +0 -395
  286. package/resource/doc/livekit/live/android/workflow.md +0 -320
  287. package/resource/doc/livekit/live/flutter/workflow.md +0 -353
  288. package/resource/doc/livekit/live/ios/workflow.md +0 -454
  289. package/resource/doc/livekit/live/vue/components/barrage.md +0 -616
  290. package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -446
  291. package/resource/doc/livekit/live/vue/faq.md +0 -0
  292. package/resource/doc/livekit/live/vue/live-list-integration.md +0 -200
  293. package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -269
  294. package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -269
  295. package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -595
  296. package/resource/doc/livekit/live/vue/states/live-state.md +0 -3591
  297. package/resource/doc/livekit/live/vue/workflow.md +0 -218
  298. package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -312
  299. package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -430
  300. package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -679
  301. package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -671
  302. package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -271
  303. package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
  304. package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
  305. package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
  306. package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
  307. package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -865
  308. package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -657
  309. package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -437
  310. package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -335
  311. package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
  312. package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -327
  313. package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -507
  314. package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
  315. package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -659
  316. package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
  317. package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -814
  318. package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1000
  319. package/resource/doc/roomkit/vue/features/workflow.md +0 -553
  320. package/resource/doc/roomkit/vue/workflow.md +0 -487
  321. package/resource/doc/tuicallkit/android/integration.md +0 -286
  322. package/resource/doc/tuicallkit/android/workflow.md +0 -0
  323. package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -784
  324. package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -610
  325. package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -938
  326. package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -897
  327. package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -469
  328. package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -781
  329. package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -398
  330. package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
  331. package/resource/doc/tuicallkit/react/api.md +0 -1404
  332. package/resource/doc/tuicallkit/vue/api.md +0 -1406
  333. package/resource/doc/tuicallkit/vue/faq.md +0 -36
  334. package/tools/call/get-native-call-integration.js +0 -43
  335. package/tools/call/get-native-call-integration.js.map +0 -1
  336. package/tools/call/get-web-call-api.js +0 -27
  337. package/tools/call/get-web-call-api.js.map +0 -1
  338. package/tools/call/get-web-call-integration.js.map +0 -1
  339. package/tools/chat/get-native-chat-feature-detail.js +0 -30
  340. package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
  341. package/tools/chat/get-native-chat-integration.js +0 -45
  342. package/tools/chat/get-native-chat-integration.js.map +0 -1
  343. package/tools/chat/get-web-chat-component-detail.js +0 -31
  344. package/tools/chat/get-web-chat-component-detail.js.map +0 -1
  345. package/tools/chat/get-web-chat-integration.js +0 -45
  346. package/tools/chat/get-web-chat-integration.js.map +0 -1
  347. package/tools/chat/get-web-chat-uikit-init.js +0 -28
  348. package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
  349. package/tools/chat/get-web-create-group-doc.js +0 -28
  350. package/tools/chat/get-web-create-group-doc.js.map +0 -1
  351. package/tools/common/get-faq.js +0 -91
  352. package/tools/common/get-faq.js.map +0 -1
  353. package/tools/common/get-usersig.js.map +0 -1
  354. package/tools/common/present-framework-choice.js +0 -16
  355. package/tools/common/present-framework-choice.js.map +0 -1
  356. package/tools/common/record-prompt.js +0 -55
  357. package/tools/common/record-prompt.js.map +0 -1
  358. package/tools/common/record-result.js +0 -60
  359. package/tools/common/record-result.js.map +0 -1
  360. package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
  361. package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
  362. package/tools/definitions/get_native_live_api_def.js +0 -23
  363. package/tools/definitions/get_native_live_api_def.js.map +0 -1
  364. package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -87
  365. package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
  366. package/tools/definitions/get_native_live_uikit_integration_def.js +0 -49
  367. package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
  368. package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -74
  369. package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
  370. package/tools/definitions/get_trtc_native_api_def.js +0 -16
  371. package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
  372. package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
  373. package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
  374. package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
  375. package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
  376. package/tools/definitions/get_web_create_group_doc_def.js +0 -18
  377. package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
  378. package/tools/definitions/get_web_live_state_detail_def.js +0 -19
  379. package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
  380. package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
  381. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
  382. package/tools/definitions/get_web_room_feature_detail_def.js +0 -95
  383. package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
  384. package/tools/definitions/get_web_room_state_detail_def.js +0 -19
  385. package/tools/definitions/get_web_room_state_detail_def.js.map +0 -1
  386. package/tools/definitions/record_prompt_def.js +0 -53
  387. package/tools/definitions/record_prompt_def.js.map +0 -1
  388. package/tools/definitions/record_result_def.js +0 -30
  389. package/tools/definitions/record_result_def.js.map +0 -1
  390. package/tools/live/get-native-live-uikit-integration.js +0 -101
  391. package/tools/live/get-native-live-uikit-integration.js.map +0 -1
  392. package/tools/live/get-web-live-component-detail.js +0 -31
  393. package/tools/live/get-web-live-component-detail.js.map +0 -1
  394. package/tools/live/get-web-live-state-detail.js +0 -31
  395. package/tools/live/get-web-live-state-detail.js.map +0 -1
  396. package/tools/live/get-web-live-uikit-integration.js +0 -52
  397. package/tools/live/get-web-live-uikit-integration.js.map +0 -1
  398. package/tools/live/get_native_live_uikit_extra_features.js +0 -105
  399. package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
  400. package/tools/live/get_native_live_uikit_interaction.js +0 -101
  401. package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
  402. package/tools/native_live/get-native-live-api.js +0 -31
  403. package/tools/native_live/get-native-live-api.js.map +0 -1
  404. package/tools/room/get-web-room-feature-detail.js.map +0 -1
  405. package/tools/room/get-web-room-integration.js.map +0 -1
  406. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
  407. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
  408. package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
  409. package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
  410. package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
  411. package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
  412. package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
  413. package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
  414. package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
  415. package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
  416. package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
  417. package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
  418. package/tools/trtc/get-trtc-native-api.js +0 -31
  419. package/tools/trtc/get-trtc-native-api.js.map +0 -1
  420. package/utils/handle-component-name.js +0 -33
  421. package/utils/handle-component-name.js.map +0 -1
  422. /package/resource/doc/{chatuikit/android/workflow.md → callkit/core-sdk/.gitkeep} +0 -0
  423. /package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +0 -0
  424. /package/resource/doc/{tuicallkit/react/faq.md → callkit/faq/web-faq.md} +0 -0
  425. /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
  426. /package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +0 -0
  427. /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
  428. /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
  429. /package/resource/doc/roomkit/faq/common/{error_code.md → error-code.md} +0 -0
@@ -2,511 +2,116 @@
2
2
  ## Overview
3
3
  `TRTCCloudListener.java` provides the event callback interface for TRTC Real-Time Communication (TRTC SDK) on Android.
4
4
 
5
-
6
5
  ## TRTCVideoRenderListener
7
- <table>
8
- <tr>
9
- <td rowspan="1" colSpan="1" >Function List</td>
10
-
11
- <td rowspan="1" colSpan="1" >Description</td>
12
- </tr>
13
-
14
- <tr>
15
- <td rowspan="1" colSpan="1" >[onRenderVideoFrame](https://write.woa.com/document/87029920275542016)</td>
16
-
17
- <td rowspan="1" colSpan="1" >Self-definition video rendering callback</td>
18
- </tr>
19
- </table>
20
-
6
+ | Function List | Description |
7
+ | --- | --- |
8
+ | onRenderVideoFrame | Self-definition video rendering callback |
21
9
 
22
10
  ## TRTCVideoFrameListener
23
- <table>
24
- <tr>
25
- <td rowspan="1" colSpan="1" >Function List</td>
26
-
27
- <td rowspan="1" colSpan="1" >Description</td>
28
- </tr>
29
-
30
- <tr>
31
- <td rowspan="1" colSpan="1" >[onGLContextCreated](https://write.woa.com/document/87029920275542016)</td>
32
-
33
- <td rowspan="1" colSpan="1" >Notification that the SDK's internal OpenGL environment has been created</td>
34
- </tr>
35
-
36
- <tr>
37
- <td rowspan="1" colSpan="1" >[onProcessVideoFrame](https://write.woa.com/document/87029920275542016)</td>
38
-
39
- <td rowspan="1" colSpan="1" >Video processing callback for integrating third-party beauty components</td>
40
- </tr>
41
-
42
- <tr>
43
- <td rowspan="1" colSpan="1" >[onGLContextDestory](https://write.woa.com/document/87029920275542016)</td>
44
-
45
- <td rowspan="1" colSpan="1" >Notification that the SDK's internal OpenGL environment has been destroyed</td>
46
- </tr>
47
- </table>
48
-
11
+ | Function List | Description |
12
+ | --- | --- |
13
+ | onGLContextCreated | Notification that the SDK's internal OpenGL environment has been created |
14
+ | onProcessVideoFrame | Video processing callback for integrating third-party beauty components |
15
+ | onGLContextDestory | Notification that the SDK's internal OpenGL environment has been destroyed |
49
16
 
50
17
  ## TRTCAudioFrameListener
51
- <table>
52
- <tr>
53
- <td rowspan="1" colSpan="1" >Function List</td>
54
-
55
- <td rowspan="1" colSpan="1" >Description</td>
56
- </tr>
57
-
58
- <tr>
59
- <td rowspan="1" colSpan="1" >[onCapturedAudioFrame](https://write.woa.com/document/87029920275542016)</td>
60
-
61
- <td rowspan="1" colSpan="1" >Local audio data callback after preprocessing by the audio module</td>
62
- </tr>
63
-
64
- <tr>
65
- <td rowspan="1" colSpan="1" >[onLocalProcessedAudioFrame](https://write.woa.com/document/87029920275542016)</td>
66
-
67
- <td rowspan="1" colSpan="1" >Local audio data callback after preprocessing, sound-effect processing, and mixing BGM by the audio module</td>
68
- </tr>
69
-
70
- <tr>
71
- <td rowspan="1" colSpan="1" >[onRemoteUserAudioFrame](https://write.woa.com/document/87029920275542016)</td>
72
-
73
- <td rowspan="1" colSpan="1" >Audio data of each remote user before mixing</td>
74
- </tr>
75
-
76
- <tr>
77
- <td rowspan="1" colSpan="1" >[onMixedPlayAudioFrame](https://write.woa.com/document/87029920275542016)</td>
78
-
79
- <td rowspan="1" colSpan="1" >Callback of mixed audio data before final submission to the system for playback</td>
80
- </tr>
81
-
82
- <tr>
83
- <td rowspan="1" colSpan="1" >[onMixedAllAudioFrame](https://write.woa.com/document/87029920275542016)</td>
84
-
85
- <td rowspan="1" colSpan="1" >Audio data mixed by the SDK (including collected and to-be-played audio)</td>
86
- </tr>
87
-
88
- <tr>
89
- <td rowspan="1" colSpan="1" >[onVoiceEarMonitorAudioFrame](https://write.woa.com/document/87029920275542016)</td>
90
-
91
- <td rowspan="1" colSpan="1" >Audio data for ear return</td>
92
- </tr>
93
- </table>
94
-
18
+ | Function List | Description |
19
+ | --- | --- |
20
+ | onCapturedAudioFrame | Local audio data callback after preprocessing by the audio module |
21
+ | onLocalProcessedAudioFrame | Local audio data callback after preprocessing, sound-effect processing, and mixing BGM by the audio module |
22
+ | onRemoteUserAudioFrame | Audio data of each remote user before mixing |
23
+ | onMixedPlayAudioFrame | Callback of mixed audio data before final submission to the system for playback |
24
+ | onMixedAllAudioFrame | Audio data mixed by the SDK (including collected and to-be-played audio) |
25
+ | onVoiceEarMonitorAudioFrame | Audio data for ear return |
95
26
 
96
27
  ## TRTCLogListener
97
- <table>
98
- <tr>
99
- <td rowspan="1" colSpan="1" >Function List</td>
100
-
101
- <td rowspan="1" colSpan="1" >Description</td>
102
- </tr>
103
-
104
- <tr>
105
- <td rowspan="1" colSpan="1" >[onLog](https://write.woa.com/document/87029920275542016)</td>
106
-
107
- <td rowspan="1" colSpan="1" >Local LOG printing callback</td>
108
- </tr>
109
- </table>
110
-
28
+ | Function List | Description |
29
+ | --- | --- |
30
+ | onLog | Local LOG printing callback |
111
31
 
112
32
  ## TRTCCloudListener
113
- <table>
114
- <tr>
115
- <td rowspan="1" colSpan="1" >Function List</td>
116
-
117
- <td rowspan="1" colSpan="1" >Description</td>
118
- </tr>
119
-
120
- <tr>
121
- <td rowspan="1" colSpan="1" >[onError](https://write.woa.com/document/87029920275542016)</td>
122
-
123
- <td rowspan="1" colSpan="1" >Error event callback</td>
124
- </tr>
125
-
126
- <tr>
127
- <td rowspan="1" colSpan="1" >[onWarning](https://write.woa.com/document/87029920275542016)</td>
128
-
129
- <td rowspan="1" colSpan="1" >Warning event callback</td>
130
- </tr>
131
-
132
- <tr>
133
- <td rowspan="1" colSpan="1" >[onEnterRoom](https://write.woa.com/document/87029920275542016)</td>
134
-
135
- <td rowspan="1" colSpan="1" >Event callback for room entry success or failure</td>
136
- </tr>
137
-
138
- <tr>
139
- <td rowspan="1" colSpan="1" >[onExitRoom](https://write.woa.com/document/87029920275542016)</td>
140
-
141
- <td rowspan="1" colSpan="1" >Event callback for leaving the room</td>
142
- </tr>
143
-
144
- <tr>
145
- <td rowspan="1" colSpan="1" >[onSwitchRole](https://write.woa.com/document/87029920275542016)</td>
146
-
147
- <td rowspan="1" colSpan="1" >Event callback for switching roles</td>
148
- </tr>
149
-
150
- <tr>
151
- <td rowspan="1" colSpan="1" >[onSwitchRoom](https://write.woa.com/document/87029920275542016)</td>
152
-
153
- <td rowspan="1" colSpan="1" >Event callback for switching rooms result</td>
154
- </tr>
155
-
156
- <tr>
157
- <td rowspan="1" colSpan="1" >[onConnectOtherRoom](https://write.woa.com/document/87029920275542016)</td>
158
-
159
- <td rowspan="1" colSpan="1" >Event callback for cross-room communication request result</td>
160
- </tr>
161
-
162
- <tr>
163
- <td rowspan="1" colSpan="1" >[onDisConnectOtherRoom](https://write.woa.com/document/87029920275542016)</td>
164
-
165
- <td rowspan="1" colSpan="1" >Event callback for ending cross-room communication result</td>
166
- </tr>
167
-
168
- <tr>
169
- <td rowspan="1" colSpan="1" >[onUpdateOtherRoomForwardMode](https://write.woa.com/document/87029920275542016)</td>
170
-
171
- <td rowspan="1" colSpan="1" >Event callback for modifying cross-room broadcaster uplink capability result</td>
172
- </tr>
173
-
174
- <tr>
175
- <td rowspan="1" colSpan="1" >[onRemoteUserEnterRoom](https://write.woa.com/document/87029920275542016)</td>
176
-
177
- <td rowspan="1" colSpan="1" >A user has joined the current room</td>
178
- </tr>
179
-
180
- <tr>
181
- <td rowspan="1" colSpan="1" >[onRemoteUserLeaveRoom](https://write.woa.com/document/87029920275542016)</td>
182
-
183
- <td rowspan="1" colSpan="1" >A user has left the current room</td>
184
- </tr>
185
-
186
- <tr>
187
- <td rowspan="1" colSpan="1" >[onUserVideoAvailable](https://write.woa.com/document/87029920275542016)</td>
188
-
189
- <td rowspan="1" colSpan="1" >A remote user has started/stopped publishing the main video stream</td>
190
- </tr>
191
-
192
- <tr>
193
- <td rowspan="1" colSpan="1" >[onUserSubStreamAvailable](https://write.woa.com/document/87029920275542016)</td>
194
-
195
- <td rowspan="1" colSpan="1" >A remote user has started/stopped publishing the auxiliary video stream</td>
196
- </tr>
197
-
198
- <tr>
199
- <td rowspan="1" colSpan="1" >[onUserAudioAvailable](https://write.woa.com/document/87029920275542016)</td>
200
-
201
- <td rowspan="1" colSpan="1" >A remote user has started/stopped publishing their audio</td>
202
- </tr>
203
-
204
- <tr>
205
- <td rowspan="1" colSpan="1" >[onFirstVideoFrame](https://write.woa.com/document/87029920275542016)</td>
206
-
207
- <td rowspan="1" colSpan="1" >The SDK has started rendering the first frame of the local or remote user's video</td>
208
- </tr>
209
-
210
- <tr>
211
- <td rowspan="1" colSpan="1" >[onFirstAudioFrame](https://write.woa.com/document/87029920275542016)</td>
212
-
213
- <td rowspan="1" colSpan="1" >The SDK has started playing the remote user's first audio frame</td>
214
- </tr>
215
-
216
- <tr>
217
- <td rowspan="1" colSpan="1" >[onSendFirstLocalVideoFrame](https://write.woa.com/document/87029920275542016)</td>
218
-
219
- <td rowspan="1" colSpan="1" >The first local video frame has been published</td>
220
- </tr>
221
-
222
- <tr>
223
- <td rowspan="1" colSpan="1" >[onSendFirstLocalAudioFrame](https://write.woa.com/document/87029920275542016)</td>
224
-
225
- <td rowspan="1" colSpan="1" >The first local audio frame has been published</td>
226
- </tr>
227
-
228
- <tr>
229
- <td rowspan="1" colSpan="1" >[onRemoteVideoStatusUpdated](https://write.woa.com/document/87029920275542016)</td>
230
-
231
- <td rowspan="1" colSpan="1" >Event callback for remote video status changes</td>
232
- </tr>
233
-
234
- <tr>
235
- <td rowspan="1" colSpan="1" >[onRemoteAudioStatusUpdated](https://write.woa.com/document/87029920275542016)</td>
236
-
237
- <td rowspan="1" colSpan="1" >Event callback for remote audio status changes</td>
238
- </tr>
239
-
240
- <tr>
241
- <td rowspan="1" colSpan="1" >[onUserVideoSizeChanged](https://write.woa.com/document/87029920275542016)</td>
242
-
243
- <td rowspan="1" colSpan="1" >Callback for changes in user video size</td>
244
- </tr>
245
-
246
- <tr>
247
- <td rowspan="1" colSpan="1" >[onNetworkQuality](https://write.woa.com/document/87029920275542016)</td>
248
-
249
- <td rowspan="1" colSpan="1" >Real-time statistics callback for network quality</td>
250
- </tr>
251
-
252
- <tr>
253
- <td rowspan="1" colSpan="1" >[onStatistics](https://write.woa.com/document/87029920275542016)</td>
254
-
255
- <td rowspan="1" colSpan="1" >Real-time statistics callback for audio and video technical indicators</td>
256
- </tr>
257
-
258
- <tr>
259
- <td rowspan="1" colSpan="1" >[onSpeedTestResult](https://write.woa.com/document/87029920275542016)</td>
260
-
261
- <td rowspan="1" colSpan="1" >Callback for internet speed test results</td>
262
- </tr>
263
-
264
- <tr>
265
- <td rowspan="1" colSpan="1" >[onConnectionLost](https://write.woa.com/document/87029920275542016)</td>
266
-
267
- <td rowspan="1" colSpan="1" >The connection between the SDK and the cloud has been disconnected.</td>
268
- </tr>
269
-
270
- <tr>
271
- <td rowspan="1" colSpan="1" >[onTryToReconnect](https://write.woa.com/document/87029920275542016)</td>
272
-
273
- <td rowspan="1" colSpan="1" >The SDK is trying to reconnect to the cloud.</td>
274
- </tr>
275
-
276
- <tr>
277
- <td rowspan="1" colSpan="1" >[onConnectionRecovery](https://write.woa.com/document/87029920275542016)</td>
278
-
279
- <td rowspan="1" colSpan="1" >The connection between the SDK and the cloud has been restored.</td>
280
- </tr>
281
-
282
- <tr>
283
- <td rowspan="1" colSpan="1" >[onCameraDidReady](https://write.woa.com/document/87029920275542016)</td>
284
-
285
- <td rowspan="1" colSpan="1" >Camera is ready</td>
286
- </tr>
287
-
288
- <tr>
289
- <td rowspan="1" colSpan="1" >[onMicDidReady](https://write.woa.com/document/87029920275542016)</td>
290
-
291
- <td rowspan="1" colSpan="1" >Microphone is ready</td>
292
- </tr>
293
-
294
- <tr>
295
- <td rowspan="1" colSpan="1" >[onAudioRouteChanged](https://write.woa.com/document/87029920275542016)</td>
296
-
297
- <td rowspan="1" colSpan="1" >Current audio routing has changed (applicable only to mobile devices)</td>
298
- </tr>
299
-
300
- <tr>
301
- <td rowspan="1" colSpan="1" >[onUserVoiceVolume](https://write.woa.com/document/87029920275542016)</td>
302
-
303
- <td rowspan="1" colSpan="1" >Callback for volume feedback</td>
304
- </tr>
305
-
306
- <tr>
307
- <td rowspan="1" colSpan="1" >[onRecvCustomCmdMsg](https://write.woa.com/document/87029920275542016)</td>
308
-
309
- <td rowspan="1" colSpan="1" >Receipt of a custom Definition message</td>
310
- </tr>
311
-
312
- <tr>
313
- <td rowspan="1" colSpan="1" >[onMissCustomCmdMsg](https://write.woa.com/document/87029920275542016)</td>
314
-
315
- <td rowspan="1" colSpan="1" >Event callback for lost custom Definition messages</td>
316
- </tr>
317
-
318
- <tr>
319
- <td rowspan="1" colSpan="1" >[onRecvSEIMsg](https://write.woa.com/document/87029920275542016)</td>
320
-
321
- <td rowspan="1" colSpan="1" >Callback for receiving SEI message</td>
322
- </tr>
323
-
324
- <tr>
325
- <td rowspan="1" colSpan="1" >[onStartPublishing](https://write.woa.com/document/87029920275542016)</td>
326
-
327
- <td rowspan="1" colSpan="1" >Event callback for starting to publish audio and video streams to Tencent CSS CDN</td>
328
- </tr>
329
-
330
- <tr>
331
- <td rowspan="1" colSpan="1" >[onStopPublishing](https://write.woa.com/document/87029920275542016)</td>
332
-
333
- <td rowspan="1" colSpan="1" >Event callback for stopping the publishing of audio and video streams to Tencent CSS CDN</td>
334
- </tr>
335
-
336
- <tr>
337
- <td rowspan="1" colSpan="1" >[onStartPublishCDNStream](https://write.woa.com/document/87029920275542016)</td>
338
-
339
- <td rowspan="1" colSpan="1" >Event callback for starting to publish audio and video streams to a non-Tencent Cloud CDN</td>
340
- </tr>
341
-
342
- <tr>
343
- <td rowspan="1" colSpan="1" >[onStopPublishCDNStream](https://write.woa.com/document/87029920275542016)</td>
344
-
345
- <td rowspan="1" colSpan="1" >Event callback for stopping the publishing of audio and video streams to a non-Tencent Cloud CDN</td>
346
- </tr>
347
-
348
- <tr>
349
- <td rowspan="1" colSpan="1" >[onSetMixTranscodingConfig](https://write.woa.com/document/87029920275542016)</td>
350
-
351
- <td rowspan="1" colSpan="1" >Event callback for setting the layout and transcoding parameters of Cloud Mixed Streaming</td>
352
- </tr>
353
-
354
- <tr>
355
- <td rowspan="1" colSpan="1" >[onStartPublishMediaStream](https://write.woa.com/document/87029920275542016)</td>
356
-
357
- <td rowspan="1" colSpan="1" >Event callback for starting to publish the media stream</td>
358
- </tr>
359
-
360
- <tr>
361
- <td rowspan="1" colSpan="1" >[onUpdatePublishMediaStream](https://write.woa.com/document/87029920275542016)</td>
362
-
363
- <td rowspan="1" colSpan="1" >Event callback for updating the media stream</td>
364
- </tr>
365
-
366
- <tr>
367
- <td rowspan="1" colSpan="1" >[onStopPublishMediaStream](https://write.woa.com/document/87029920275542016)</td>
368
-
369
- <td rowspan="1" colSpan="1" >Event callback for stopping the media stream</td>
370
- </tr>
371
-
372
- <tr>
373
- <td rowspan="1" colSpan="1" >[onCdnStreamStateChanged](https://write.woa.com/document/87029920275542016)</td>
374
-
375
- <td rowspan="1" colSpan="1" >RTMP/RTMPS streaming status change callback</td>
376
- </tr>
377
-
378
- <tr>
379
- <td rowspan="1" colSpan="1" >[onScreenCaptureStarted](https://write.woa.com/document/87029920275542016)</td>
380
-
381
- <td rowspan="1" colSpan="1" >Event callback for starting screen sharing</td>
382
- </tr>
383
-
384
- <tr>
385
- <td rowspan="1" colSpan="1" >[onScreenCapturePaused](https://write.woa.com/document/87029920275542016)</td>
386
-
387
- <td rowspan="1" colSpan="1" >Event callback for pausing screen sharing</td>
388
- </tr>
389
-
390
- <tr>
391
- <td rowspan="1" colSpan="1" >[onScreenCaptureResumed](https://write.woa.com/document/87029920275542016)</td>
392
-
393
- <td rowspan="1" colSpan="1" >Event callback for resuming screen sharing</td>
394
- </tr>
395
-
396
- <tr>
397
- <td rowspan="1" colSpan="1" >[onScreenCaptureStopped](https://write.woa.com/document/87029920275542016)</td>
398
-
399
- <td rowspan="1" colSpan="1" >Event callback for stopping screen sharing</td>
400
- </tr>
401
-
402
- <tr>
403
- <td rowspan="1" colSpan="1" >[onLocalRecordBegin](https://write.woa.com/document/87029920275542016)</td>
404
-
405
- <td rowspan="1" colSpan="1" >Event callback for the local recording task that has started</td>
406
- </tr>
407
-
408
- <tr>
409
- <td rowspan="1" colSpan="1" >[onLocalRecording](https://write.woa.com/document/87029920275542016)</td>
410
-
411
- <td rowspan="1" colSpan="1" >Progress event callback for an ongoing local recording task</td>
412
- </tr>
413
-
414
- <tr>
415
- <td rowspan="1" colSpan="1" >[onLocalRecordFragment](https://write.woa.com/document/87029920275542016)</td>
416
-
417
- <td rowspan="1" colSpan="1" >Event callback for local recording shard</td>
418
- </tr>
419
-
420
- <tr>
421
- <td rowspan="1" colSpan="1" >[onLocalRecordComplete](https://write.woa.com/document/87029920275542016)</td>
422
-
423
- <td rowspan="1" colSpan="1" >Event callback for the local recording task that has ended</td>
424
- </tr>
425
-
426
- <tr>
427
- <td rowspan="1" colSpan="1" >[onSnapshotComplete](https://write.woa.com/document/87029920275542016)</td>
428
-
429
- <td rowspan="1" colSpan="1" >Event callback for local screenshot completion</td>
430
- </tr>
431
-
432
- <tr>
433
- <td rowspan="1" colSpan="1" >[onUserEnter](https://write.woa.com/document/87029920275542016)</td>
434
-
435
- <td rowspan="1" colSpan="1" >A host has joined the current room (deprecated)</td>
436
- </tr>
437
-
438
- <tr>
439
- <td rowspan="1" colSpan="1" >[onUserExit](https://write.woa.com/document/87029920275542016)</td>
440
-
441
- <td rowspan="1" colSpan="1" >A host has left the current room (deprecated)</td>
442
- </tr>
443
-
444
- <tr>
445
- <td rowspan="1" colSpan="1" >[onAudioEffectFinished](https://write.woa.com/document/87029920275542016)</td>
446
-
447
- <td rowspan="1" colSpan="1" >Sound effect playback has ended (deprecated)</td>
448
- </tr>
449
-
450
- <tr>
451
- <td rowspan="1" colSpan="1" >[onSpeedTest](https://write.woa.com/document/87029920275542016)</td>
452
-
453
- <td rowspan="1" colSpan="1" >Callback for server speed test results (deprecated)</td>
454
- </tr>
455
- </table>
456
-
33
+ | Function List | Description |
34
+ | --- | --- |
35
+ | onError | Error event callback |
36
+ | onWarning | Warning event callback |
37
+ | onEnterRoom | Event callback for room entry success or failure |
38
+ | onExitRoom | Event callback for leaving the room |
39
+ | onSwitchRole | Event callback for switching roles |
40
+ | onSwitchRoom | Event callback for switching rooms result |
41
+ | onConnectOtherRoom | Event callback for cross-room communication request result |
42
+ | onDisConnectOtherRoom | Event callback for ending cross-room communication result |
43
+ | onUpdateOtherRoomForwardMode | Event callback for modifying cross-room broadcaster uplink capability result |
44
+ | onRemoteUserEnterRoom | A user has joined the current room |
45
+ | onRemoteUserLeaveRoom | A user has left the current room |
46
+ | onUserVideoAvailable | A remote user has started/stopped publishing the main video stream |
47
+ | onUserSubStreamAvailable | A remote user has started/stopped publishing the auxiliary video stream |
48
+ | onUserAudioAvailable | A remote user has started/stopped publishing their audio |
49
+ | onFirstVideoFrame | The SDK has started rendering the first frame of the local or remote user's video |
50
+ | onFirstAudioFrame | The SDK has started playing the remote user's first audio frame |
51
+ | onSendFirstLocalVideoFrame | The first local video frame has been published |
52
+ | onSendFirstLocalAudioFrame | The first local audio frame has been published |
53
+ | onRemoteVideoStatusUpdated | Event callback for remote video status changes |
54
+ | onRemoteAudioStatusUpdated | Event callback for remote audio status changes |
55
+ | onUserVideoSizeChanged | Callback for changes in user video size |
56
+ | onNetworkQuality | Real-time statistics callback for network quality |
57
+ | onStatistics | Real-time statistics callback for audio and video technical indicators |
58
+ | onSpeedTestResult | Callback for internet speed test results |
59
+ | onConnectionLost | The connection between the SDK and the cloud has been disconnected. |
60
+ | onTryToReconnect | The SDK is trying to reconnect to the cloud. |
61
+ | onConnectionRecovery | The connection between the SDK and the cloud has been restored. |
62
+ | onCameraDidReady | Camera is ready |
63
+ | onMicDidReady | Microphone is ready |
64
+ | onAudioRouteChanged | Current audio routing has changed (applicable only to mobile devices) |
65
+ | onUserVoiceVolume | Callback for volume feedback |
66
+ | onRecvCustomCmdMsg | Receipt of a custom Definition message |
67
+ | onMissCustomCmdMsg | Event callback for lost custom Definition messages |
68
+ | onRecvSEIMsg | Callback for receiving SEI message |
69
+ | onStartPublishing | Event callback for starting to publish audio and video streams to Tencent CSS CDN |
70
+ | onStopPublishing | Event callback for stopping the publishing of audio and video streams to Tencent CSS CDN |
71
+ | onStartPublishCDNStream | Event callback for starting to publish audio and video streams to a non-Tencent Cloud CDN |
72
+ | onStopPublishCDNStream | Event callback for stopping the publishing of audio and video streams to a non-Tencent Cloud CDN |
73
+ | onSetMixTranscodingConfig | Event callback for setting the layout and transcoding parameters of Cloud Mixed Streaming |
74
+ | onStartPublishMediaStream | Event callback for starting to publish the media stream |
75
+ | onUpdatePublishMediaStream | Event callback for updating the media stream |
76
+ | onStopPublishMediaStream | Event callback for stopping the media stream |
77
+ | onCdnStreamStateChanged | RTMP/RTMPS streaming status change callback |
78
+ | onScreenCaptureStarted | Event callback for starting screen sharing |
79
+ | onScreenCapturePaused | Event callback for pausing screen sharing |
80
+ | onScreenCaptureResumed | Event callback for resuming screen sharing |
81
+ | onScreenCaptureStopped | Event callback for stopping screen sharing |
82
+ | onLocalRecordBegin | Event callback for the local recording task that has started |
83
+ | onLocalRecording | Progress event callback for an ongoing local recording task |
84
+ | onLocalRecordFragment | Event callback for local recording shard |
85
+ | onLocalRecordComplete | Event callback for the local recording task that has ended |
86
+ | onSnapshotComplete | Event callback for local screenshot completion |
87
+ | onUserEnter | A host has joined the current room (deprecated) |
88
+ | onUserExit | A host has left the current room (deprecated) |
89
+ | onAudioEffectFinished | Sound effect playback has ended (deprecated) |
90
+ | onSpeedTest | Callback for server speed test results (deprecated) |
457
91
 
458
92
  ## onRenderVideoFrame
459
93
 
460
-
461
-
462
94
  #### Self-definition video rendering callback
463
95
 
464
96
  When you set a local or remote self-definition video rendering callback, the SDK will deliver the video frames, originally intended for the rendering controls, to you through this callback interface for self-definition rendering.
465
- <table>
466
- <tr>
467
- <td rowspan="1" colSpan="1" >Parameters</td>
468
-
469
- <td rowspan="1" colSpan="1" >Description</td>
470
- </tr>
471
-
472
- <tr>
473
- <td rowspan="1" colSpan="1" >frame</td>
474
-
475
- <td rowspan="1" colSpan="1" >Information on video frames to be rendered.</td>
476
- </tr>
477
-
478
- <tr>
479
- <td rowspan="1" colSpan="1" >streamType</td>
480
-
481
- <td rowspan="1" colSpan="1" >Frequency stream type: Main (generally used for carrying camera footage) and Sub (generally used for carrying screen sharing footage).</td>
482
- </tr>
483
-
484
- <tr>
485
- <td rowspan="1" colSpan="1" >userId</td>
486
-
487
- <td rowspan="1" colSpan="1" >UserId of the video source. If it's a local video callback (setLocalVideoRenderDelegate), this parameter can be ignored.</td>
488
- </tr>
489
- </table>
490
-
97
+ | Parameters | Description |
98
+ | --- | --- |
99
+ | frame | Information on video frames to be rendered. |
100
+ | streamType | Frequency stream type: Main (generally used for carrying camera footage) and Sub (generally used for carrying screen sharing footage). |
101
+ | userId | UserId of the video source. If it's a local video callback (setLocalVideoRenderDelegate), this parameter can be ignored. |
491
102
 
492
103
  ## onGLContextCreated
493
104
 
494
-
495
-
496
105
  #### Notification that the SDK's internal OpenGL environment has been created
497
106
 
498
107
  ## onProcessVideoFrame
499
108
 
500
-
501
-
502
109
  #### Video processing callback for integrating third-party beauty components
503
110
 
504
111
  If you have purchased a third-party beauty filter component, you need to set the third-party beauty filter callback in TRTCCloud. TRTC will then deliver the video frames that need preprocessing through this callback interface.
505
112
 
506
113
  You can then hand over the video frames from TRTC to the third-party beauty filter component for image processing. Since the data is readable and writable, the results from the third-party beauty filter can be synchronized back to TRTC for subsequent encoding and transmission.
507
114
 
508
-
509
-
510
115
  Scenario 1: The beauty filter component generates a new texture on its own.
511
116
 
512
117
  If the beauty filter component you are using generates a new texture (to carry the processed image) during the image processing, please set dstFrame.textureId to the new texture ID in the callback function:
@@ -538,44 +143,23 @@ int onProcessVideoFrame(TRTCCloudDef.TRTCVideoFrame srcFrame, TRTCCloudDef.TRTCV
538
143
  return 0;
539
144
  }
540
145
  ```
541
- <table>
542
- <tr>
543
- <td rowspan="1" colSpan="1" >Parameters</td>
544
-
545
- <td rowspan="1" colSpan="1" >Description</td>
546
- </tr>
547
-
548
- <tr>
549
- <td rowspan="1" colSpan="1" >dstFrame</td>
550
-
551
- <td rowspan="1" colSpan="1" >Used to receive video frames processed by the third-party beauty filter.</td>
552
- </tr>
553
-
554
- <tr>
555
- <td rowspan="1" colSpan="1" >srcFrame</td>
556
-
557
- <td rowspan="1" colSpan="1" >Used to carry camera footage collected by TRTC.</td>
558
- </tr>
559
- </table>
560
-
146
+ | Parameters | Description |
147
+ | --- | --- |
148
+ | dstFrame | Used to receive video frames processed by the third-party beauty filter. |
149
+ | srcFrame | Used to carry camera footage collected by TRTC. |
561
150
 
562
151
  > **Note**
563
- >
152
+ >
564
153
 
565
154
  > Currently supports only OpenGL texture schemes (PC supports only TRTCVideoBufferType_Buffer format).
566
- >
567
-
155
+ >
568
156
 
569
157
  ## onGLContextDestory
570
158
 
571
-
572
-
573
159
  #### Notification that the SDK's internal OpenGL environment has been destroyed
574
160
 
575
161
  ## onCapturedAudioFrame
576
162
 
577
-
578
-
579
163
  #### Local audio data callback after preprocessing by the audio module
580
164
 
581
165
  After you set the audio data self-definition callback, the SDK will deliver the freshly collected and preprocessed (ANS, AEC, AGC) data to you in PCM format through this interface callback.
@@ -585,38 +169,24 @@ After you set the audio data self-definition callback, the SDK will deliver the
585
169
 
586
170
  - For example, with TRTC's default audio recording format of 48000 sampling rate, mono channel, and 16-bit sampling point width, the byte frame length is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
587
171
 
588
- <table>
589
- <tr>
590
- <td rowspan="1" colSpan="1" >Parameters</td>
591
-
592
- <td rowspan="1" colSpan="1" >Description</td>
593
- </tr>
594
-
595
- <tr>
596
- <td rowspan="1" colSpan="1" >frame</td>
597
-
598
- <td rowspan="1" colSpan="1" >Audio data frame in PCM format.</td>
599
- </tr>
600
- </table>
601
-
172
+ | Parameters | Description |
173
+ | --- | --- |
174
+ | frame | Audio data frame in PCM format. |
602
175
 
603
176
  > **Note**
604
- >
177
+ >
605
178
 
606
179
  > 1. Please avoid any time-consuming operations in this callback function, as the SDK processes one frame of audio data every 20ms. If your processing time exceeds 20ms, it will cause sound anomalies.
607
- >
180
+ >
608
181
 
609
182
  > 2. The audio data from this interface callback is read-write, meaning you can modify the audio data synchronously within the callback function, but ensure that the processing time is efficient.
610
- >
183
+ >
611
184
 
612
185
  > 3. The audio data callback from this interface has undergone preprocessing (ANS, AEC, AGC) but does ** not include ** background music, sound effects, reverb, etc., with low latency.
613
- >
614
-
186
+ >
615
187
 
616
188
  ## onLocalProcessedAudioFrame
617
189
 
618
-
619
-
620
190
  #### Local audio data callback after preprocessing, sound-effect processing, and mixing BGM by the audio module
621
191
 
622
192
  After you set the audio data self-definition callback, the SDK will deliver the freshly collected and preprocessed audio data, processed with sound effects and mixed BGM, in PCM format through this interface callback before final network encoding.
@@ -626,48 +196,29 @@ After you set the audio data self-definition callback, the SDK will deliver the
626
196
 
627
197
  - Taking TRTC's default audio recording format as an example: 48000 sampling rate, mono, 16 sampling point width, the byte frame length is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
628
198
 
629
-
630
-
631
-
632
199
  Special note:
633
200
 
634
201
  You can achieve the signaling transmission purpose by setting the ` TRTCAudioFrame.extraData ` field in the interface. Since the data block at the head of the audio frame cannot be too large, it is recommended that when you write ` extraData `, try to control the signaling to be within a few bytes. If it exceeds 100 bytes, the written data will not be sent.
635
202
 
636
-
637
-
638
- Other users in the room can receive data through the `TRTCAudioFrame.extraData` field callback in `onRemoteUserAudioFrame` of [TRTCAudioFrameListener](https://write.woa.com/document/87029920275542016).
639
- <table>
640
- <tr>
641
- <td rowspan="1" colSpan="1" >Parameters</td>
642
-
643
- <td rowspan="1" colSpan="1" >Description</td>
644
- </tr>
645
-
646
- <tr>
647
- <td rowspan="1" colSpan="1" >frame</td>
648
-
649
- <td rowspan="1" colSpan="1" >Audio data frame in PCM format.</td>
650
- </tr>
651
- </table>
652
-
203
+ Other users in the room can receive data through the `TRTCAudioFrame.extraData` field callback in `onRemoteUserAudioFrame` of TRTCAudioFrameListener.
204
+ | Parameters | Description |
205
+ | --- | --- |
206
+ | frame | Audio data frame in PCM format. |
653
207
 
654
208
  > **Note**
655
- >
209
+ >
656
210
 
657
211
  > 1. Please avoid any time-consuming operations in this callback function, as the SDK processes one frame of audio data every 20ms. If your processing time exceeds 20ms, it will cause sound anomalies.
658
- >
212
+ >
659
213
 
660
214
  > 2. The audio data from this interface callback is read-write, meaning you can modify the audio data synchronously within the callback function, but ensure that the processing time is efficient.
661
- >
662
-
663
- > 3. The data from this callback interface has undergone preprocessing (ANS, AEC, AGC), sound effects and mixed BGM processing, resulting in higher sound delay compared to [ onCapturedAudioFrame ](https://write.woa.com/document/87029920275542016).
664
- >
215
+ >
665
216
 
217
+ > 3. The data from this callback interface has undergone preprocessing (ANS, AEC, AGC), sound effects and mixed BGM processing, resulting in higher sound delay compared to onCapturedAudioFrame .
218
+ >
666
219
 
667
220
  ## onRemoteUserAudioFrame
668
221
 
669
-
670
-
671
222
  #### Audio data of each remote user before mixing
672
223
 
673
224
  After you set the audio data self-definition callback, the SDK will deliver the raw data of each remote source to you in PCM format through this interface callback before final mixing.
@@ -677,38 +228,19 @@ After you set the audio data self-definition callback, the SDK will deliver the
677
228
 
678
229
  - Taking TRTC's default audio recording format as an example: 48000 sampling rate, mono, 16 sampling point width, the byte frame length is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
679
230
 
680
- <table>
681
- <tr>
682
- <td rowspan="1" colSpan="1" >Parameters</td>
683
-
684
- <td rowspan="1" colSpan="1" >Description</td>
685
- </tr>
686
-
687
- <tr>
688
- <td rowspan="1" colSpan="1" >frame</td>
689
-
690
- <td rowspan="1" colSpan="1" >Audio data frame in PCM format.</td>
691
- </tr>
692
-
693
- <tr>
694
- <td rowspan="1" colSpan="1" >userId</td>
695
-
696
- <td rowspan="1" colSpan="1" >User identifier.</td>
697
- </tr>
698
- </table>
699
-
231
+ | Parameters | Description |
232
+ | --- | --- |
233
+ | frame | Audio data frame in PCM format. |
234
+ | userId | User identifier. |
700
235
 
701
236
  > **Note**
702
- >
237
+ >
703
238
 
704
239
  > The audio data from this callback interface is read-only and cannot be modified.
705
- >
706
-
240
+ >
707
241
 
708
242
  ## onMixedPlayAudioFrame
709
243
 
710
-
711
-
712
244
  #### Callback of mixed audio data before final submission to the system for playback
713
245
 
714
246
  After you set the audio data self-definition callback, the SDK will deliver the mixed audio data of each audio track to you in PCM format through this interface callback before submitting it for system playback.
@@ -718,38 +250,24 @@ After you set the audio data self-definition callback, the SDK will deliver the
718
250
 
719
251
  - For example, with TRTC's default audio recording format of 48000 sampling rate, mono channel, and 16-bit sampling point width, the byte frame length is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
720
252
 
721
- <table>
722
- <tr>
723
- <td rowspan="1" colSpan="1" >Parameters</td>
724
-
725
- <td rowspan="1" colSpan="1" >Description</td>
726
- </tr>
727
-
728
- <tr>
729
- <td rowspan="1" colSpan="1" >frame</td>
730
-
731
- <td rowspan="1" colSpan="1" >Audio data frame in PCM format.</td>
732
- </tr>
733
- </table>
734
-
253
+ | Parameters | Description |
254
+ | --- | --- |
255
+ | frame | Audio data frame in PCM format. |
735
256
 
736
257
  > **Note**
737
- >
258
+ >
738
259
 
739
260
  > 1. Please avoid any time-consuming operations in this callback function, as the SDK processes one frame of audio data every 20ms. If your processing time exceeds 20ms, it will cause sound anomalies.
740
- >
261
+ >
741
262
 
742
263
  > 2. The audio data from this interface callback is read-write, meaning you can modify the audio data synchronously within the callback function, but ensure that the processing time is efficient.
743
- >
264
+ >
744
265
 
745
266
  > 3. This interface callback delivers the mixed data of each audio track to be played, but it does not include ear return audio data.
746
- >
747
-
267
+ >
748
268
 
749
269
  ## onMixedAllAudioFrame
750
270
 
751
-
752
-
753
271
  #### Audio data mixed by the SDK (including collected and to-be-played audio)
754
272
 
755
273
  After you set the audio data self-definition callback, the SDK will mix all the collected and to-be-played audio data and deliver it to you in PCM format through this interface callback for your self-definition recording.
@@ -759,1673 +277,728 @@ After you set the audio data self-definition callback, the SDK will mix all the
759
277
 
760
278
  - For example, with TRTC's default audio recording format of 48000 sampling rate, mono channel, and 16-bit sampling point width, the byte frame length is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
761
279
 
762
- <table>
763
- <tr>
764
- <td rowspan="1" colSpan="1" >Parameters</td>
765
-
766
- <td rowspan="1" colSpan="1" >Description</td>
767
- </tr>
768
-
769
- <tr>
770
- <td rowspan="1" colSpan="1" >frame</td>
771
-
772
- <td rowspan="1" colSpan="1" >Audio data frame in PCM format.</td>
773
- </tr>
774
- </table>
775
-
776
-
777
- > **Note**
778
- >
779
-
780
- > 1. This interface callback delivers the mixed data of all audio data from the SDK, including: local audio after 3A preprocessing, special effects overlay, and background music mixing; all remote audio; but not including ear return audio.
781
- >
782
-
783
- > 2. The audio data from this interface callback does not support modification.
784
- >
785
-
786
-
787
- ## onVoiceEarMonitorAudioFrame
788
-
789
-
790
-
791
- #### Audio data for ear return
792
-
793
- After you set the audio data self-definition callback, the SDK will deliver the ear return audio data to you in PCM format through this interface callback before playback.
794
- - The audio time frame length from this interface callback is not fixed and is in PCM format.
795
-
796
- - The formula to convert time frame length to byte frame length is ` Sampling Rate × Time Frame Length × Number of Channels × Sampling Point Width `.
797
-
798
- - Taking the default audio recording format of TRTC with a sampling rate of 48000, mono, and 16-bit sample depth as an example, the byte frame length of 0.02s audio data is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
799
-
800
- <table>
801
- <tr>
802
- <td rowspan="1" colSpan="1" >Parameters</td>
803
-
804
- <td rowspan="1" colSpan="1" >Description</td>
805
- </tr>
806
-
807
- <tr>
808
- <td rowspan="1" colSpan="1" >frame</td>
809
-
810
- <td rowspan="1" colSpan="1" >Audio data frame in PCM format.</td>
811
- </tr>
812
- </table>
813
-
814
-
815
- > **Note**
816
- >
817
-
818
- > 1. Please avoid performing any time-consuming operations in this callback function, as it may cause sound anomalies.
819
- >
820
-
821
- > 2. The audio data from this interface callback is read-write, meaning you can modify the audio data synchronously within the callback function, but ensure that the processing time is efficient.
822
- >
823
-
824
-
825
- ## onLog
826
-
827
-
828
-
829
- #### Local LOG printing callback
830
-
831
- If you wish to capture the SDK's local log printing behavior, you can set a log callback, allowing the SDK to send all logs to you through this callback interface.
832
- <table>
833
- <tr>
834
- <td rowspan="1" colSpan="1" >Parameters</td>
835
-
836
- <td rowspan="1" colSpan="1" >Description</td>
837
- </tr>
838
-
839
- <tr>
840
- <td rowspan="1" colSpan="1" >level</td>
841
-
842
- <td rowspan="1" colSpan="1" >For log levels, please refer to TRTC_LOG_LEVEL.</td>
843
- </tr>
844
-
845
- <tr>
846
- <td rowspan="1" colSpan="1" >log</td>
847
-
848
- <td rowspan="1" colSpan="1" >Log content.</td>
849
- </tr>
850
-
851
- <tr>
852
- <td rowspan="1" colSpan="1" >module</td>
853
-
854
- <td rowspan="1" colSpan="1" >Reserved field; currently has no specific meaning and is fixed at TXLiteAVSDK.</td>
855
- </tr>
856
- </table>
857
-
858
-
859
- ## onError
860
-
861
-
862
-
863
- #### Error event callback
864
-
865
- Error events indicate unrecoverable errors thrown by the SDK, such as room entry failure or device startup failure.
866
-
867
- Reference document: [Error Code Table](https://cloud.tencent.com/document/product/647/38308)
868
- <table>
869
- <tr>
870
- <td rowspan="1" colSpan="1" >Parameters</td>
871
-
872
- <td rowspan="1" colSpan="1" >Description</td>
873
- </tr>
874
-
875
- <tr>
876
- <td rowspan="1" colSpan="1" >errCode</td>
877
-
878
- <td rowspan="1" colSpan="1" >Error Code</td>
879
- </tr>
880
-
881
- <tr>
882
- <td rowspan="1" colSpan="1" >errMsg</td>
883
-
884
- <td rowspan="1" colSpan="1" >Error Message</td>
885
- </tr>
886
-
887
- <tr>
888
- <td rowspan="1" colSpan="1" >extInfo</td>
889
-
890
- <td rowspan="1" colSpan="1" >Expand Information Field, some error codes may carry additional information to help pinpoint issues</td>
891
- </tr>
892
- </table>
893
-
894
-
895
- ## onWarning
896
-
897
-
898
-
899
- #### Warning event callback
900
-
901
- Warning events indicate prompt issues thrown by the SDK, such as video stuttering or high CPU utilization.
902
-
903
- Reference document: [Error Code Table](https://cloud.tencent.com/document/product/647/38308)
904
- <table>
905
- <tr>
906
- <td rowspan="1" colSpan="1" >Parameters</td>
907
-
908
- <td rowspan="1" colSpan="1" >Description</td>
909
- </tr>
910
-
911
- <tr>
912
- <td rowspan="1" colSpan="1" >extInfo</td>
913
-
914
- <td rowspan="1" colSpan="1" >Expand Information Field, some warning codes may carry additional information to help pinpoint issues</td>
915
- </tr>
916
-
917
- <tr>
918
- <td rowspan="1" colSpan="1" >warningCode</td>
919
-
920
- <td rowspan="1" colSpan="1" >Warning Codes</td>
921
- </tr>
922
-
923
- <tr>
924
- <td rowspan="1" colSpan="1" >warningMsg</td>
925
-
926
- <td rowspan="1" colSpan="1" >Warning Information</td>
927
- </tr>
928
- </table>
929
-
930
-
931
- ## onEnterRoom
932
-
933
-
934
-
935
- #### Event callback for room entry success or failure
936
-
937
- After calling the enterRoom() method in TRTCCloud to enter the room, you will receive the onEnterRoom(result) callback from TRTCCloudListener:
938
- - If the entry is successful, the result will be a positive number (result > 0), representing the time taken to enter the room, in milliseconds (ms).
939
-
940
- - If the entry fails, the result will be a negative number (result < 0), representing the error code of the failure reason.
941
-
942
-
943
- For the meaning of error codes of room entry failure, please see [Error Code Table](https://cloud.tencent.com/document/product/647/38308).
944
- <table>
945
- <tr>
946
- <td rowspan="1" colSpan="1" >Parameters</td>
947
-
948
- <td rowspan="1" colSpan="1" >Description</td>
949
- </tr>
950
-
951
- <tr>
952
- <td rowspan="1" colSpan="1" >result</td>
953
-
954
- <td rowspan="1" colSpan="1" >When result > 0, it means the time taken to enter the room (ms). When result < 0, it means the error code for entering the room.</td>
955
- </tr>
956
- </table>
957
-
958
-
959
- > **Note**
960
- >
961
-
962
- > 1. In versions before Ver6.6, only successful room entry would throw the onEnterRoom(result) callback; failure would be thrown by the onError() callback.
963
- >
964
-
965
- > 2. In versions after Ver6.6: regardless of success or failure, the onEnterRoom(result) callback will be thrown, and room entry failure will also throw the onError() callback.
966
- >
967
-
968
-
969
- ## onExitRoom
970
-
971
-
972
-
973
- #### Event callback for leaving the room
974
-
975
- Calling the exitRoom interface in TRTCCloud will execute the related logic of leaving the room, such as releasing audio/video device resources and codec resources.
976
-
977
- After all resources occupied by the SDK are released, the SDK will trigger the onExitRoom() callback to notify you.
978
-
979
-
980
-
981
- If you want to call enterRoom again or switch to another audio and video SDK, please wait for the onExitRoom callback before performing related operations. Otherwise, you may encounter various abnormal issues, such as the camera and microphone equipment being forcibly occupied.
982
- <table>
983
- <tr>
984
- <td rowspan="1" colSpan="1" >Parameters</td>
985
-
986
- <td rowspan="1" colSpan="1" >Description</td>
987
- </tr>
988
-
989
- <tr>
990
- <td rowspan="1" colSpan="1" >reason</td>
991
-
992
- <td rowspan="1" colSpan="1" >Reasons for leaving the room: 0: Actively call exitRoom to leave the room; 1: Kicked out of the current room by the server; 2: The entire current room is dissolved.</td>
993
- </tr>
994
- </table>
995
-
996
-
997
- ## onSwitchRole
998
-
999
-
1000
-
1001
- #### Event callback for switching roles
1002
-
1003
- Calling the switchRole() interface in TRTCCloud will switch the roles of anchor and audience. This operation will involve a circuit switching process, and once the SDK completes the switch, it will trigger the onSwitchRole() event callback.
1004
- <table>
1005
- <tr>
1006
- <td rowspan="1" colSpan="1" >Parameters</td>
1007
-
1008
- <td rowspan="1" colSpan="1" >Description</td>
1009
- </tr>
1010
-
1011
- <tr>
1012
- <td rowspan="1" colSpan="1" >errCode</td>
1013
-
1014
- <td rowspan="1" colSpan="1" >Error Code, ERR_NULL represents successful switching. For others, please refer to [ Error Code ](https://cloud.tencent.com/document/product/647/32257).</td>
1015
- </tr>
1016
-
1017
- <tr>
1018
- <td rowspan="1" colSpan="1" >errMsg</td>
1019
-
1020
- <td rowspan="1" colSpan="1" >Error message.</td>
1021
- </tr>
1022
- </table>
1023
-
1024
-
1025
- ## onSwitchRoom
1026
-
1027
-
1028
-
1029
- #### Event callback for switching rooms result
1030
-
1031
- Calling the switchRoom() interface in TRTCCloud allows the user to quickly switch from one room to another. After the SDK completes the switch, it will trigger the onSwitchRoom() event callback.
1032
- <table>
1033
- <tr>
1034
- <td rowspan="1" colSpan="1" >Parameters</td>
1035
-
1036
- <td rowspan="1" colSpan="1" >Description</td>
1037
- </tr>
1038
-
1039
- <tr>
1040
- <td rowspan="1" colSpan="1" >errCode</td>
1041
-
1042
- <td rowspan="1" colSpan="1" >Error Code, ERR_NULL represents successful switching. For others, please refer to [ Error Code ](https://cloud.tencent.com/document/product/647/32257).</td>
1043
- </tr>
1044
-
1045
- <tr>
1046
- <td rowspan="1" colSpan="1" >errMsg</td>
1047
-
1048
- <td rowspan="1" colSpan="1" >Error message.</td>
1049
- </tr>
1050
- </table>
1051
-
1052
-
1053
- ## onConnectOtherRoom
1054
-
1055
-
1056
-
1057
- #### Event callback for cross-room communication request result
1058
-
1059
- Calling the connectOtherRoom() interface in TRTCCloud will initiate a video call between broadcasters in two different rooms, which is the so-called “Host PK” feature.
1060
-
1061
- The caller will receive the onConnectOtherRoom() callback to learn whether the cross-room communication is successful
1062
-
1063
- If successful, all users in both rooms will receive the onUserVideoAvailable() callback from the PK anchor in the other room.
1064
- <table>
1065
- <tr>
1066
- <td rowspan="1" colSpan="1" >Parameters</td>
1067
-
1068
- <td rowspan="1" colSpan="1" >Description</td>
1069
- </tr>
1070
-
1071
- <tr>
1072
- <td rowspan="1" colSpan="1" >errCode</td>
1073
-
1074
- <td rowspan="1" colSpan="1" >Error Code, ERR_NULL represents successful switching. For others, please refer to [ Error Code ](https://cloud.tencent.com/document/product/647/32257).</td>
1075
- </tr>
1076
-
1077
- <tr>
1078
- <td rowspan="1" colSpan="1" >errMsg</td>
1079
-
1080
- <td rowspan="1" colSpan="1" >Error message.</td>
1081
- </tr>
1082
-
1083
- <tr>
1084
- <td rowspan="1" colSpan="1" >userId</td>
1085
-
1086
- <td rowspan="1" colSpan="1" >User ID of the anchor in the other room for cross-room communication.</td>
1087
- </tr>
1088
- </table>
1089
-
1090
-
1091
- ## onDisConnectOtherRoom
1092
-
1093
-
1094
-
1095
- #### Event callback for ending cross-room communication result
1096
-
1097
- ## onUpdateOtherRoomForwardMode
1098
-
1099
-
1100
-
1101
- #### Event callback for modifying cross-room broadcaster uplink capability result
1102
-
1103
- ## onRemoteUserEnterRoom
1104
-
1105
-
1106
-
1107
- #### A user has joined the current room
1108
-
1109
- For performance considerations, the behavior of this notification differs in two different TRTC application scenarios (i.e., AppScene, specified by the second parameter when calling enterRoom):
1110
- - Live streaming scenarios (TRTC_APP_SCENE_LIVE and TRTC_APP_SCENE_VOICE_CHATROOM): In this scenario, users are distinguished between hosts and audience. This notification is only triggered when a host enters the room. Audience members entering the room will not trigger this notification.
1111
-
1112
- - Call scenarios (TRTC_APP_SCENE_VIDEOCALL and TRTC_APP_SCENE_AUDIOCALL): In this scenario, users are not distinguished by roles (all users can be considered as hosts). Any user entering the room will trigger this notification.
1113
-
1114
- <table>
1115
- <tr>
1116
- <td rowspan="1" colSpan="1" >Parameters</td>
1117
-
1118
- <td rowspan="1" colSpan="1" >Description</td>
1119
- </tr>
1120
-
1121
- <tr>
1122
- <td rowspan="1" colSpan="1" >userId</td>
1123
-
1124
- <td rowspan="1" colSpan="1" >User Identifier of the remote user.</td>
1125
- </tr>
1126
- </table>
1127
-
1128
-
1129
- > **Note**
1130
- >
1131
-
1132
- > 1. The event callbacks onRemoteUserEnterRoom and onRemoteUserLeaveRoom are only applicable for maintaining the "user list" in the current room. The presence of these callbacks does not necessarily imply video streams.
1133
- >
1134
-
1135
- > 2. To display the remote screen, please listen for the onUserVideoAvailable() event callback, which indicates whether a specific user has video footage.
1136
- >
1137
-
1138
-
1139
- ## onRemoteUserLeaveRoom
1140
-
1141
-
1142
-
1143
- #### A user has left the current room
1144
-
1145
- Corresponding to onRemoteUserEnterRoom, the behavior of this notification differs in two different application scenarios (i.e., AppScene, specified by the second parameter when calling enterRoom):
1146
- - In live streaming scenarios (TRTC_APP_SCENE_LIVE and TRTC_APP_SCENE_VOICE_CHATROOM): This notification is triggered only when a host leaves the room. Audience members leaving the room will not trigger this notification.
1147
-
1148
- - In call scenarios (TRTC_APP_SCENE_VIDEOCALL and TRTC_APP_SCENE_AUDIOCALL): In this scenario, users are not distinguished by roles. Any user leaving the room will trigger this notification.
1149
-
1150
- <table>
1151
- <tr>
1152
- <td rowspan="1" colSpan="1" >Parameters</td>
1153
-
1154
- <td rowspan="1" colSpan="1" >Description</td>
1155
- </tr>
1156
-
1157
- <tr>
1158
- <td rowspan="1" colSpan="1" >reason</td>
1159
-
1160
- <td rowspan="1" colSpan="1" >Reason for leaving: 0 indicates the user left the room voluntarily, 1 indicates a timeout exit, 2 indicates the user was kicked out of the room, and 3 indicates the anchor switched to audience mode and left the room.</td>
1161
- </tr>
1162
-
1163
- <tr>
1164
- <td rowspan="1" colSpan="1" >userId</td>
1165
-
1166
- <td rowspan="1" colSpan="1" >User Identifier of the remote user.</td>
1167
- </tr>
1168
- </table>
1169
-
1170
-
1171
- ## onUserVideoAvailable
1172
-
1173
-
1174
-
1175
- #### A remote user has started/stopped publishing the main video stream
1176
-
1177
- **The primary video** is generally used to carry the camera's video feed. When you receive the onUserVideoAvailable(userId, true) notification, it indicates that video frames are available for playback on this channel.
1178
-
1179
- At this point, you need to call the [startRemoteView](https://write.woa.com/document/87029900866228224) interface to subscribe to the user's remote screen. Upon successful subscription, you will continue to receive the user's first frame rendering callback onFirstVideoFrame(userId).
1180
-
1181
-
1182
-
1183
- When you receive the onUserVideoAvailable(userId, false) notification, it means that the remote video on this channel has been turned off. The shutdown may be due to the user invoking [muteLocalVideo](https://write.woa.com/document/87029900866228224) or [stopLocalPreview](https://write.woa.com/document/87029900866228224).
1184
- <table>
1185
- <tr>
1186
- <td rowspan="1" colSpan="1" >Parameters</td>
1187
-
1188
- <td rowspan="1" colSpan="1" >Description</td>
1189
- </tr>
1190
-
1191
- <tr>
1192
- <td rowspan="1" colSpan="1" >available</td>
1193
-
1194
- <td rowspan="1" colSpan="1" >Whether the user has published (or cancelled publishing) the Main Road Picture, true: published; false: cancelled.</td>
1195
- </tr>
1196
-
1197
- <tr>
1198
- <td rowspan="1" colSpan="1" >userId</td>
1199
-
1200
- <td rowspan="1" colSpan="1" >User Identifier of the remote user.</td>
1201
- </tr>
1202
- </table>
1203
-
1204
-
1205
- ## onUserSubStreamAvailable
1206
-
1207
-
1208
-
1209
- #### A remote user has started/stopped publishing the auxiliary video stream
1210
-
1211
- "Auxiliary Road Picture" is generally used to carry the screen sharing content. When you receive the onUserSubStreamAvailable(userId, true) notification, it indicates that video frames are available for playback on this channel.
1212
-
1213
- At this point, you need to call the [startRemoteView](https://write.woa.com/document/87029900866228224) interface to subscribe to the user's remote screen. Upon successful subscription, you will continue to receive the user's first frame rendering callback onFirstVideoFrame(userId).
1214
- <table>
1215
- <tr>
1216
- <td rowspan="1" colSpan="1" >Parameters</td>
1217
-
1218
- <td rowspan="1" colSpan="1" >Description</td>
1219
- </tr>
1220
-
1221
- <tr>
1222
- <td rowspan="1" colSpan="1" >available</td>
1223
-
1224
- <td rowspan="1" colSpan="1" >Whether the user has published (or cancelled publishing) the auxiliary video content, true: published; false: cancelled.</td>
1225
- </tr>
1226
-
1227
- <tr>
1228
- <td rowspan="1" colSpan="1" >userId</td>
1229
-
1230
- <td rowspan="1" colSpan="1" >User Identifier of the remote user.</td>
1231
- </tr>
1232
- </table>
1233
-
1234
-
1235
- > **Note**
1236
- >
1237
-
1238
- > The function used to display the auxiliary road picture is [startRemoteView](https://write.woa.com/document/87029900866228224), not startRemoteSubStreamView. The latter has been deprecated.
1239
- >
1240
-
1241
-
1242
- ## onUserAudioAvailable
1243
-
1244
-
1245
-
1246
- #### A remote user has started/stopped publishing their audio
1247
-
1248
- When you receive the onUserAudioAvailable(userId, true) notification, it means the user has published their audio. At this time, the SDK behaves as follows:
1249
- - In Automatic Subscription Mode, you do not need to take any action; the SDK will automatically play the user's audio.
1250
-
1251
- - In manual subscription mode, you can use [muteRemoteAudio](https://write.woa.com/document/87029900866228224)(userid, false) to play the user's audio.
1252
-
1253
- <table>
1254
- <tr>
1255
- <td rowspan="1" colSpan="1" >Parameters</td>
1256
-
1257
- <td rowspan="1" colSpan="1" >Description</td>
1258
- </tr>
1259
-
1260
- <tr>
1261
- <td rowspan="1" colSpan="1" >available</td>
1262
-
1263
- <td rowspan="1" colSpan="1" >Whether the user has published (or cancelled publishing) their audio, true: published; false: cancelled.</td>
1264
- </tr>
1265
-
1266
- <tr>
1267
- <td rowspan="1" colSpan="1" >userId</td>
1268
-
1269
- <td rowspan="1" colSpan="1" >User Identifier of the remote user.</td>
1270
- </tr>
1271
- </table>
1272
-
1273
-
1274
- > **Note**
1275
- >
1276
-
1277
- > The SDK uses automatic subscription mode by default. You can set it to manual subscription by calling [setDefaultStreamRecvMode](https://write.woa.com/document/87029900866228224), but this must be done before you enter the room.
1278
- >
1279
-
1280
-
1281
- ## onFirstVideoFrame
1282
-
1283
-
1284
-
1285
- #### The SDK has started rendering the first frame of the local or remote user's video
1286
-
1287
- The SDK triggers this event when rendering the first video frame of the local or remote user. You can use the userId parameter in the callback event to determine whether the event is from "Local" or "Remote".
1288
- - If userId is empty, it means the SDK has started rendering your local video footage, but you must have called [startLocalPreview](https://write.woa.com/document/87029900866228224) or [startScreenCapture](https://write.woa.com/document/87029900866228224).
1289
-
1290
- - If userId is not empty, it means the SDK has started rendering the remote user's video footage. However, you must have called [startRemoteView](https://write.woa.com/document/87029900866228224) to subscribe to the user's video footage.
1291
-
1292
- <table>
1293
- <tr>
1294
- <td rowspan="1" colSpan="1" >Parameters</td>
1295
-
1296
- <td rowspan="1" colSpan="1" >Description</td>
1297
- </tr>
1298
-
1299
- <tr>
1300
- <td rowspan="1" colSpan="1" >height</td>
1301
-
1302
- <td rowspan="1" colSpan="1" >Height of the video footage.</td>
1303
- </tr>
1304
-
1305
- <tr>
1306
- <td rowspan="1" colSpan="1" >streamType</td>
1307
-
1308
- <td rowspan="1" colSpan="1" >Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage.</td>
1309
- </tr>
1310
-
1311
- <tr>
1312
- <td rowspan="1" colSpan="1" >userId</td>
1313
-
1314
- <td rowspan="1" colSpan="1" >The user identifier of local or remote. If userId is empty, it means your local first video frame has arrived. If userId is not empty, it means the remote user's first video frame has arrived.</td>
1315
- </tr>
1316
-
1317
- <tr>
1318
- <td rowspan="1" colSpan="1" >width</td>
1319
-
1320
- <td rowspan="1" colSpan="1" >Width of the video footage.</td>
1321
- </tr>
1322
- </table>
1323
-
1324
-
1325
- > **Note**
1326
- >
1327
-
1328
- > 1. The local first video frame event callback is triggered only after you call [startLocalPreview](https://write.woa.com/document/87029900866228224) or [startScreenCapture](https://write.woa.com/document/87029900866228224).
1329
- >
1330
-
1331
- > 2. The remote user's first video frame event callback is triggered only after you call [startRemoteView](https://write.woa.com/document/87029900866228224) or startRemoteSubStreamView.
1332
- >
1333
-
1334
-
1335
- ## onFirstAudioFrame
1336
-
1337
-
1338
-
1339
- #### The SDK has started playing the remote user's first audio frame
1340
-
1341
- The SDK will throw this event when playing the remote user's first frame of audio. The first frame event of local audio is not thrown for now.
1342
- <table>
1343
- <tr>
1344
- <td rowspan="1" colSpan="1" >Parameters</td>
1345
-
1346
- <td rowspan="1" colSpan="1" >Description</td>
1347
- </tr>
1348
-
1349
- <tr>
1350
- <td rowspan="1" colSpan="1" >userId</td>
1351
-
1352
- <td rowspan="1" colSpan="1" >User Identifier of the remote user.</td>
1353
- </tr>
1354
- </table>
1355
-
1356
-
1357
- ## onSendFirstLocalVideoFrame
1358
-
1359
-
1360
-
1361
- #### The first local video frame has been published
1362
-
1363
- After successfully joining the room and starting local video capture via [startLocalPreview](https://write.woa.com/document/87029900866228224) or [startScreenCapture](https://write.woa.com/document/87029900866228224) (the order of starting capture and joining the room does not matter), the SDK will start video encoding and publish the local video data to the cloud using its network module. Once the SDK successfully sends the first frame of local video data to the cloud, the onSendFirstLocalVideoFrame event callback will be triggered.
1364
- <table>
1365
- <tr>
1366
- <td rowspan="1" colSpan="1" >Parameters</td>
1367
-
1368
- <td rowspan="1" colSpan="1" >Description</td>
1369
- </tr>
1370
-
1371
- <tr>
1372
- <td rowspan="1" colSpan="1" >streamType</td>
1373
-
1374
- <td rowspan="1" colSpan="1" >Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage.</td>
1375
- </tr>
1376
- </table>
1377
-
1378
-
1379
- ## onSendFirstLocalAudioFrame
1380
-
1381
-
1382
-
1383
- #### The first local audio frame has been published
1384
-
1385
- After successfully joining the room and starting local audio capture via [startLocalAudio](https://write.woa.com/document/87029900866228224) (the order of starting capture and joining the room does not matter), the SDK will start audio encoding and publish the local audio data to the cloud using its network module. Once the SDK successfully sends the first frame of local audio data to the cloud, the onSendFirstLocalAudioFrame event callback will be triggered.
1386
-
1387
- ## onRemoteVideoStatusUpdated
1388
-
1389
-
1390
-
1391
- #### Event callback for remote video status changes
1392
-
1393
- You can use this event callback to obtain the playback status of each remote video stream (including three states: Playing, Loading, and Stopped) for corresponding UI display.
1394
- <table>
1395
- <tr>
1396
- <td rowspan="1" colSpan="1" >Parameters</td>
1397
-
1398
- <td rowspan="1" colSpan="1" >Description</td>
1399
- </tr>
1400
-
1401
- <tr>
1402
- <td rowspan="1" colSpan="1" >extrainfo</td>
1403
-
1404
- <td rowspan="1" colSpan="1" >Additional Information.</td>
1405
- </tr>
1406
-
1407
- <tr>
1408
- <td rowspan="1" colSpan="1" >reason</td>
1409
-
1410
- <td rowspan="1" colSpan="1" >Reasons for video status changes.</td>
1411
- </tr>
1412
-
1413
- <tr>
1414
- <td rowspan="1" colSpan="1" >status</td>
1415
-
1416
- <td rowspan="1" colSpan="1" >Video Status: Including Playing, Loading, and Stopped states.</td>
1417
- </tr>
1418
-
1419
- <tr>
1420
- <td rowspan="1" colSpan="1" >streamType</td>
1421
-
1422
- <td rowspan="1" colSpan="1" >Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage.</td>
1423
- </tr>
1424
-
1425
- <tr>
1426
- <td rowspan="1" colSpan="1" >userId</td>
1427
-
1428
- <td rowspan="1" colSpan="1" >User identifier.</td>
1429
- </tr>
1430
- </table>
1431
-
1432
-
1433
- ## onRemoteAudioStatusUpdated
1434
-
1435
-
1436
-
1437
- #### Event callback for remote audio status changes
1438
-
1439
- You can use this event callback to obtain the playback status of each remote audio stream (including three states: Playing, Loading, and Stopped) for corresponding UI display.
1440
- <table>
1441
- <tr>
1442
- <td rowspan="1" colSpan="1" >Parameters</td>
1443
-
1444
- <td rowspan="1" colSpan="1" >Description</td>
1445
- </tr>
1446
-
1447
- <tr>
1448
- <td rowspan="1" colSpan="1" >extrainfo</td>
1449
-
1450
- <td rowspan="1" colSpan="1" >Additional Information.</td>
1451
- </tr>
1452
-
1453
- <tr>
1454
- <td rowspan="1" colSpan="1" >reason</td>
1455
-
1456
- <td rowspan="1" colSpan="1" >Reasons for audio status changes.</td>
1457
- </tr>
1458
-
1459
- <tr>
1460
- <td rowspan="1" colSpan="1" >status</td>
1461
-
1462
- <td rowspan="1" colSpan="1" >Audio Status: Including Playing, Loading, and Stopped states.</td>
1463
- </tr>
1464
-
1465
- <tr>
1466
- <td rowspan="1" colSpan="1" >userId</td>
1467
-
1468
- <td rowspan="1" colSpan="1" >User identifier.</td>
1469
- </tr>
1470
- </table>
1471
-
1472
-
1473
- ## onUserVideoSizeChanged
1474
-
1475
-
1476
-
1477
- #### Callback for changes in user video size
1478
-
1479
- When you receive the onUserVideoSizeChanged(userId, streamtype, newWidth, newHeight) notification, it indicates that the video size has changed, possibly because the user has called setVideoEncoderParam or setSubStreamEncoderParam to reset the video dimensions.
1480
- <table>
1481
- <tr>
1482
- <td rowspan="1" colSpan="1" >Parameters</td>
1483
-
1484
- <td rowspan="1" colSpan="1" >Description</td>
1485
- </tr>
1486
-
1487
- <tr>
1488
- <td rowspan="1" colSpan="1" >newHeight</td>
1489
-
1490
- <td rowspan="1" colSpan="1" >The height of the video stream (in pixels).</td>
1491
- </tr>
1492
-
1493
- <tr>
1494
- <td rowspan="1" colSpan="1" >newWidth</td>
1495
-
1496
- <td rowspan="1" colSpan="1" >The width of the video stream (in pixels).</td>
1497
- </tr>
1498
-
1499
- <tr>
1500
- <td rowspan="1" colSpan="1" >streamType</td>
1501
-
1502
- <td rowspan="1" colSpan="1" >Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage.</td>
1503
- </tr>
1504
-
1505
- <tr>
1506
- <td rowspan="1" colSpan="1" >userId</td>
1507
-
1508
- <td rowspan="1" colSpan="1" >User identifier.</td>
1509
- </tr>
1510
- </table>
1511
-
1512
-
1513
- ## onNetworkQuality
1514
-
1515
-
1516
-
1517
- #### Real-time statistics callback for network quality
1518
-
1519
- This statistical callback is thrown every 2 seconds to notify the SDK of the perceived current network's uplink and downlink quality.
1520
-
1521
- The SDK uses a set of proprietary algorithms to assess the current network's latency, bandwidth, and stability, and calculates an evaluation result: An evaluation result of 1 (Excellent) indicates that the current network condition is very good, while a result of 6 (Down) indicates that the current network cannot support normal calls on TRTC.
1522
- <table>
1523
- <tr>
1524
- <td rowspan="1" colSpan="1" >Parameters</td>
1525
-
1526
- <td rowspan="1" colSpan="1" >Description</td>
1527
- </tr>
1528
-
1529
- <tr>
1530
- <td rowspan="1" colSpan="1" >localQuality</td>
1531
-
1532
- <td rowspan="1" colSpan="1" >Uplink network quality.</td>
1533
- </tr>
1534
-
1535
- <tr>
1536
- <td rowspan="1" colSpan="1" >remoteQuality</td>
1537
-
1538
- <td rowspan="1" colSpan="1" >Downlink network quality, represents the data quality finally gathered at the client-end after the data stream travels through a complete transmission link from "remote-end -> cloud -> client-end". Thus, the downlink network quality represents the result influenced by both the remote uplink and the client downlink.</td>
1539
- </tr>
1540
- </table>
1541
-
1542
-
1543
- > **Note**
1544
- >
1545
-
1546
- > It is temporarily impossible to assess the remote user's uplink quality through this interface alone.
1547
- >
1548
-
1549
-
1550
- ## onStatistics
1551
-
1552
-
1553
-
1554
- #### Real-time statistics callback for audio and video technical indicators
1555
-
1556
- This statistical callback is thrown every 2 seconds, notifying the SDK internal audio, video, and network-related technical indicators. This information is listed in [TRTCStatistics](https://write.woa.com/document/87029938343555072):
1557
- - Video statistical information: Video resolution, frame rate (FPS), and bitrate information.
1558
-
1559
- - Audio statistical information: Audio sample rate, channel, and bitrate information.
1560
-
1561
- - Network Statistics: Network Latency (RTT), Packet Loss Rate (loss), Upstream Traffic (sentBytes), Downstream Traffic (receivedBytes), and other information from a round-trip (SDK > Cloud > SDK).
1562
-
1563
- <table>
1564
- <tr>
1565
- <td rowspan="1" colSpan="1" >Parameters</td>
1566
-
1567
- <td rowspan="1" colSpan="1" >Description</td>
1568
- </tr>
1569
-
1570
- <tr>
1571
- <td rowspan="1" colSpan="1" >statistics</td>
1572
-
1573
- <td rowspan="1" colSpan="1" >Statistics including local and remote user statistics, for details refer to [TRTCStatistics](https://write.woa.com/document/87029938343555072).</td>
1574
- </tr>
1575
- </table>
1576
-
1577
-
1578
- > **Note**
1579
- >
1580
-
1581
- > If you just need to know the current network quality and do not want to spend too much time studying this statistical callback, it is recommended to use [onNetworkQuality](https://write.woa.com/document/87029920275542016) to solve the problem.
1582
- >
1583
-
1584
-
1585
- ## onSpeedTestResult
1586
-
1587
-
1588
-
1589
- #### Callback for internet speed test results
1590
-
1591
- This statistical callback is triggered by startSpeedTest.
1592
- <table>
1593
- <tr>
1594
- <td rowspan="1" colSpan="1" >Parameters</td>
1595
-
1596
- <td rowspan="1" colSpan="1" >Description</td>
1597
- </tr>
1598
-
1599
- <tr>
1600
- <td rowspan="1" colSpan="1" >result</td>
1601
-
1602
- <td rowspan="1" colSpan="1" >Internet Speed Test results, including packet loss, round-trip delay, upstream and downstream bandwidth rates; for details, refer to [TRTCSpeedTestResult](https://write.woa.com/document/87029993616093184).</td>
1603
- </tr>
1604
- </table>
1605
-
1606
-
1607
- ## onConnectionLost
1608
-
1609
-
1610
-
1611
- #### The connection between the SDK and the cloud has been disconnected.
1612
-
1613
- The SDK will throw this event callback when the connection to the cloud is disconnected. The main reasons for disconnection are network unavailability or network switching, such as when the user enters an elevator during a call.
1614
-
1615
- After throwing this event, the SDK will attempt to re-establish the connection with the cloud. During the reconnection process, it will throw [onTryToReconnect](https://write.woa.com/document/87029920275542016), and once the connection is restored, it will throw [onConnectionRecovery](https://write.woa.com/document/87029920275542016).
1616
-
1617
- Thus, the SDK will switch among the following three connection-related events in the following manner:
1618
-
1619
- ![](https://qcloudimg.tencent-cloud.cn/raw/fb3c40a4fca55b0010d385cf3b2472cd.png)
1620
-
1621
- ## onTryToReconnect
1622
-
1623
-
1624
-
1625
- #### The SDK is trying to reconnect to the cloud.
1626
-
1627
- The SDK will throw [onConnectionLost](https://write.woa.com/document/87029920275542016) when the connection to the cloud is disconnected, then it will attempt to re-establish the connection with the cloud and throw this event. Once the connection is restored, it will throw [onConnectionRecovery](https://write.woa.com/document/87029920275542016).
1628
-
1629
- ## onConnectionRecovery
1630
-
1631
-
1632
-
1633
- #### The connection between the SDK and the cloud has been restored.
1634
-
1635
- The SDK will throw [onConnectionLost](https://write.woa.com/document/87029920275542016) when the connection to the cloud is disconnected. It will then attempt to re-establish the connection and throw [onTryToReconnect](https://write.woa.com/document/87029920275542016). Once the connection is restored, this event callback will be triggered.
1636
-
1637
- ## onCameraDidReady
1638
-
1639
-
1640
-
1641
- #### Camera is ready
1642
-
1643
- When you call startLocalPreivew, the SDK will attempt to enable the camera. If successful, this event will be thrown.
1644
-
1645
- If enabling the camera fails, it is most likely because the current application does not have access permissions to the camera or the camera is currently being used exclusively by another application.
1646
-
1647
- You can capture the [onError](https://write.woa.com/document/87029920275542016) event callback to understand these exceptional conditions and prompt users through the UI interface.
1648
-
1649
- ## onMicDidReady
1650
-
1651
-
1652
-
1653
- #### Microphone is ready
1654
-
1655
- When you call [startLocalAudio](https://write.woa.com/document/87029900866228224), the SDK will attempt to enable the microphone. If successful, this event will be thrown.
1656
-
1657
- If enabling the microphone fails, it is most likely because the current application does not have access permissions to the microphone or the microphone is currently being used exclusively by another application.
1658
-
1659
- You can capture the [onError](https://write.woa.com/document/87029920275542016) event callback to understand these exceptional conditions and prompt users through the UI interface.
1660
-
1661
- ## onAudioRouteChanged
1662
-
1663
-
1664
-
1665
- #### Current audio routing has changed (applicable only to mobile devices)
1666
-
1667
- The term "Audio Routing" refers to whether the sound is played through the phone's speaker or receiver. A change in audio routing means a change in the playback location of the sound.
1668
- - When the audio routing is set to receiver, the sound is quieter, and you need to bring the phone close to your ear to hear clearly. This offers better privacy and is suitable for phone calls.
1669
-
1670
- - When the audio routing is set to speaker, the sound is louder, allowing for clear listening without holding the phone to your face, thus enabling the "hands-free" feature.
1671
-
1672
- - When the audio routing is set to wired headphones.
1673
-
1674
- - When the audio routing is set to Bluetooth headphones.
1675
-
1676
- - When the audio routing is set to USB professional sound card device.
1677
-
1678
- <table>
1679
- <tr>
1680
- <td rowspan="1" colSpan="1" >Parameters</td>
1681
-
1682
- <td rowspan="1" colSpan="1" >Description</td>
1683
- </tr>
1684
-
1685
- <tr>
1686
- <td rowspan="1" colSpan="1" >fromRoute</td>
1687
-
1688
- <td rowspan="1" colSpan="1" >Audio routing before the change.</td>
1689
- </tr>
1690
-
1691
- <tr>
1692
- <td rowspan="1" colSpan="1" >route</td>
1693
-
1694
- <td rowspan="1" colSpan="1" >Audio routing, which refers to where the sound is output (speaker, receiver).</td>
1695
- </tr>
1696
- </table>
1697
-
1698
-
1699
- ## onUserVoiceVolume
1700
-
1701
-
1702
-
1703
- #### Callback for volume feedback
1704
-
1705
- The SDK can assess the volume of each audio stream and periodically trigger this event callback. You can provide corresponding UI indications based on the volume, such as `waveform chart` or `volume slider`.
1706
-
1707
- To implement this feature, you need to call [enableAudioVolumeEvaluation](https://write.woa.com/document/87029900866228224) to enable this capability and set the time interval for event triggers.
1708
-
1709
- It is important to note that, regardless of whether anyone is speaking in the current room, the SDK will periodically trigger this event callback at the interval you set.
1710
- <table>
1711
- <tr>
1712
- <td rowspan="1" colSpan="1" >Parameters</td>
1713
-
1714
- <td rowspan="1" colSpan="1" >Description</td>
1715
- </tr>
1716
-
1717
- <tr>
1718
- <td rowspan="1" colSpan="1" >totalVolume</td>
1719
-
1720
- <td rowspan="1" colSpan="1" >The total volume level of all remote users, with a range of 0 to 100.</td>
1721
- </tr>
1722
-
1723
- <tr>
1724
- <td rowspan="1" colSpan="1" >userVolumes</td>
1725
-
1726
- <td rowspan="1" colSpan="1" >It is an array that holds the volume levels of all speaking users, with a range of 0 to 100.</td>
1727
- </tr>
1728
- </table>
1729
-
1730
-
1731
- > **Note**
1732
- >
1733
-
1734
- > userVolumes is an array. For each element in the array, if the userId is empty, it represents the volume level collected by the local microphone. If the userId is not empty, it represents the volume level of remote users.
1735
- >
1736
-
1737
-
1738
- ## onRecvCustomCmdMsg
1739
-
1740
-
1741
-
1742
- #### Receipt of a custom Definition message
1743
-
1744
- When a user in a room uses [sendCustomCmdMsg](https://write.woa.com/document/87029900866228224) to send a Definition UDP Message, other users in the room can receive the message through the onRecvCustomCmdMsg event callback.
1745
- <table>
1746
- <tr>
1747
- <td rowspan="1" colSpan="1" >Parameters</td>
1748
-
1749
- <td rowspan="1" colSpan="1" >Description</td>
1750
- </tr>
1751
-
1752
- <tr>
1753
- <td rowspan="1" colSpan="1" >cmdID</td>
1754
-
1755
- <td rowspan="1" colSpan="1" >Command ID.</td>
1756
- </tr>
1757
-
1758
- <tr>
1759
- <td rowspan="1" colSpan="1" >message</td>
1760
-
1761
- <td rowspan="1" colSpan="1" >Message Data.</td>
1762
- </tr>
1763
-
1764
- <tr>
1765
- <td rowspan="1" colSpan="1" >seq</td>
1766
-
1767
- <td rowspan="1" colSpan="1" >Message serial number.</td>
1768
- </tr>
1769
-
1770
- <tr>
1771
- <td rowspan="1" colSpan="1" >userId</td>
1772
-
1773
- <td rowspan="1" colSpan="1" >User identifier.</td>
1774
- </tr>
1775
- </table>
1776
-
1777
-
1778
- ## onMissCustomCmdMsg
1779
-
1780
-
1781
-
1782
- #### Event callback for lost custom Definition messages
1783
-
1784
- When you use [sendCustomCmdMsg](https://write.woa.com/document/87029900866228224) to send a Definition UDP message, even if reliable transmission is set, it cannot guarantee 100% message delivery, but the probability of message loss is very low and meets conventional reliability requirements.
1785
-
1786
- After setting reliable transmission on the sender side, the SDK will notify the number of lost Definition messages during the past time period (usually 5 seconds) through this callback.
1787
- <table>
1788
- <tr>
1789
- <td rowspan="1" colSpan="1" >Parameters</td>
1790
-
1791
- <td rowspan="1" colSpan="1" >Description</td>
1792
- </tr>
280
+ | Parameters | Description |
281
+ | --- | --- |
282
+ | frame | Audio data frame in PCM format. |
1793
283
 
1794
- <tr>
1795
- <td rowspan="1" colSpan="1" >cmdID</td>
284
+ > **Note**
285
+ >
1796
286
 
1797
- <td rowspan="1" colSpan="1" >Command ID.</td>
1798
- </tr>
287
+ > 1. This interface callback delivers the mixed data of all audio data from the SDK, including: local audio after 3A preprocessing, special effects overlay, and background music mixing; all remote audio; but not including ear return audio.
288
+ >
1799
289
 
1800
- <tr>
1801
- <td rowspan="1" colSpan="1" >errCode</td>
290
+ > 2. The audio data from this interface callback does not support modification.
291
+ >
1802
292
 
1803
- <td rowspan="1" colSpan="1" >Error code.</td>
1804
- </tr>
293
+ ## onVoiceEarMonitorAudioFrame
1805
294
 
1806
- <tr>
1807
- <td rowspan="1" colSpan="1" >missed</td>
295
+ #### Audio data for ear return
1808
296
 
1809
- <td rowspan="1" colSpan="1" >Number of lost messages.</td>
1810
- </tr>
297
+ After you set the audio data self-definition callback, the SDK will deliver the ear return audio data to you in PCM format through this interface callback before playback.
298
+ - The audio time frame length from this interface callback is not fixed and is in PCM format.
1811
299
 
1812
- <tr>
1813
- <td rowspan="1" colSpan="1" >userId</td>
300
+ - The formula to convert time frame length to byte frame length is ` Sampling Rate × Time Frame Length × Number of Channels × Sampling Point Width `.
1814
301
 
1815
- <td rowspan="1" colSpan="1" >User identifier.</td>
1816
- </tr>
1817
- </table>
302
+ - Taking the default audio recording format of TRTC with a sampling rate of 48000, mono, and 16-bit sample depth as an example, the byte frame length of 0.02s audio data is ` 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes `.
1818
303
 
304
+ | Parameters | Description |
305
+ | --- | --- |
306
+ | frame | Audio data frame in PCM format. |
1819
307
 
1820
308
  > **Note**
1821
- >
1822
-
1823
- > Only if reliable transmission is set on the sender side can the receiver receive the message loss callback.
1824
- >
1825
-
309
+ >
1826
310
 
1827
- ## onRecvSEIMsg
311
+ > 1. Please avoid performing any time-consuming operations in this callback function, as it may cause sound anomalies.
312
+ >
1828
313
 
314
+ > 2. The audio data from this interface callback is read-write, meaning you can modify the audio data synchronously within the callback function, but ensure that the processing time is efficient.
315
+ >
1829
316
 
317
+ ## onLog
1830
318
 
1831
- #### Callback for receiving SEI message
319
+ #### Local LOG printing callback
1832
320
 
1833
- When a user in the room sends an SEI message through the video frame using [sendSEIMsg](https://write.woa.com/document/87029900866228224), other users in the room can receive the message via the onRecvSEIMsg event callback.
1834
- <table>
1835
- <tr>
1836
- <td rowspan="1" colSpan="1" >Parameters</td>
321
+ If you wish to capture the SDK's local log printing behavior, you can set a log callback, allowing the SDK to send all logs to you through this callback interface.
322
+ | Parameters | Description |
323
+ | --- | --- |
324
+ | level | For log levels, please refer to TRTC_LOG_LEVEL. |
325
+ | log | Log content. |
326
+ | module | Reserved field; currently has no specific meaning and is fixed at TXLiteAVSDK. |
1837
327
 
1838
- <td rowspan="1" colSpan="1" >Description</td>
1839
- </tr>
328
+ ## onError
1840
329
 
1841
- <tr>
1842
- <td rowspan="1" colSpan="1" >message</td>
330
+ #### Error event callback
1843
331
 
1844
- <td rowspan="1" colSpan="1" >Data.</td>
1845
- </tr>
332
+ Error events indicate unrecoverable errors thrown by the SDK, such as room entry failure or device startup failure.
1846
333
 
1847
- <tr>
1848
- <td rowspan="1" colSpan="1" >userId</td>
334
+ Reference document: [Error Code Table](https://cloud.tencent.com/document/product/647/38308)
335
+ | Parameters | Description |
336
+ | --- | --- |
337
+ | errCode | Error Code |
338
+ | errMsg | Error Message |
339
+ | extInfo | Expand Information Field, some error codes may carry additional information to help pinpoint issues |
1849
340
 
1850
- <td rowspan="1" colSpan="1" >User identifier.</td>
1851
- </tr>
1852
- </table>
341
+ ## onWarning
1853
342
 
343
+ #### Warning event callback
1854
344
 
1855
- ## onStartPublishing
345
+ Warning events indicate prompt issues thrown by the SDK, such as video stuttering or high CPU utilization.
1856
346
 
347
+ Reference document: [Error Code Table](https://cloud.tencent.com/document/product/647/38308)
348
+ | Parameters | Description |
349
+ | --- | --- |
350
+ | extInfo | Expand Information Field, some warning codes may carry additional information to help pinpoint issues |
351
+ | warningCode | Warning Codes |
352
+ | warningMsg | Warning Information |
1857
353
 
354
+ ## onEnterRoom
1858
355
 
1859
- #### Event callback for starting to publish audio and video streams to Tencent CSS CDN
356
+ #### Event callback for room entry success or failure
1860
357
 
1861
- When you call startPublishing to start publishing audio and video streams to the Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server.
358
+ After calling the enterRoom() method in TRTCCloud to enter the room, you will receive the onEnterRoom(result) callback from TRTCCloudListener:
359
+ - If the entry is successful, the result will be a positive number (result > 0), representing the time taken to enter the room, in milliseconds (ms).
1862
360
 
1863
- The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
1864
- <table>
1865
- <tr>
1866
- <td rowspan="1" colSpan="1" >Parameters</td>
361
+ - If the entry fails, the result will be a negative number (result < 0), representing the error code of the failure reason.
1867
362
 
1868
- <td rowspan="1" colSpan="1" >Description</td>
1869
- </tr>
363
+ For the meaning of error codes of room entry failure, please see [Error Code Table](https://cloud.tencent.com/document/product/647/38308).
364
+ | Parameters | Description |
365
+ | --- | --- |
366
+ | result | When result > 0, it means the time taken to enter the room (ms). When result < 0, it means the error code for entering the room. |
1870
367
 
1871
- <tr>
1872
- <td rowspan="1" colSpan="1" >err</td>
368
+ > **Note**
369
+ >
1873
370
 
1874
- <td rowspan="1" colSpan="1" >0 indicates success, other values indicate failure.</td>
1875
- </tr>
371
+ > 1. In versions before Ver6.6, only successful room entry would throw the onEnterRoom(result) callback; failure would be thrown by the onError() callback.
372
+ >
1876
373
 
1877
- <tr>
1878
- <td rowspan="1" colSpan="1" >errMsg</td>
374
+ > 2. In versions after Ver6.6: regardless of success or failure, the onEnterRoom(result) callback will be thrown, and room entry failure will also throw the onError() callback.
375
+ >
1879
376
 
1880
- <td rowspan="1" colSpan="1" >Specific error reasons.</td>
1881
- </tr>
1882
- </table>
377
+ ## onExitRoom
1883
378
 
379
+ #### Event callback for leaving the room
1884
380
 
1885
- ## onStopPublishing
381
+ Calling the exitRoom interface in TRTCCloud will execute the related logic of leaving the room, such as releasing audio/video device resources and codec resources.
1886
382
 
383
+ After all resources occupied by the SDK are released, the SDK will trigger the onExitRoom() callback to notify you.
1887
384
 
385
+ If you want to call enterRoom again or switch to another audio and video SDK, please wait for the onExitRoom callback before performing related operations. Otherwise, you may encounter various abnormal issues, such as the camera and microphone equipment being forcibly occupied.
386
+ | Parameters | Description |
387
+ | --- | --- |
388
+ | reason | Reasons for leaving the room: 0: Actively call exitRoom to leave the room; 1: Kicked out of the current room by the server; 2: The entire current room is dissolved. |
1888
389
 
1889
- #### Event callback for stopping the publishing of audio and video streams to Tencent CSS CDN
390
+ ## onSwitchRole
1890
391
 
1891
- When you call stopPublishing to stop publishing audio and video streams to the Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server.
392
+ #### Event callback for switching roles
1892
393
 
1893
- The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
1894
- <table>
1895
- <tr>
1896
- <td rowspan="1" colSpan="1" >Parameters</td>
394
+ Calling the switchRole() interface in TRTCCloud will switch the roles of anchor and audience. This operation will involve a circuit switching process, and once the SDK completes the switch, it will trigger the onSwitchRole() event callback.
395
+ | Parameters | Description |
396
+ | --- | --- |
397
+ | errCode | Error Code, ERR_NULL represents successful switching. For others, please refer to [ Error Code ](https://cloud.tencent.com/document/product/647/32257). |
398
+ | errMsg | Error message. |
1897
399
 
1898
- <td rowspan="1" colSpan="1" >Description</td>
1899
- </tr>
400
+ ## onSwitchRoom
1900
401
 
1901
- <tr>
1902
- <td rowspan="1" colSpan="1" >err</td>
402
+ #### Event callback for switching rooms result
1903
403
 
1904
- <td rowspan="1" colSpan="1" >0 indicates success, other values indicate failure.</td>
1905
- </tr>
404
+ Calling the switchRoom() interface in TRTCCloud allows the user to quickly switch from one room to another. After the SDK completes the switch, it will trigger the onSwitchRoom() event callback.
405
+ | Parameters | Description |
406
+ | --- | --- |
407
+ | errCode | Error Code, ERR_NULL represents successful switching. For others, please refer to [ Error Code ](https://cloud.tencent.com/document/product/647/32257). |
408
+ | errMsg | Error message. |
1906
409
 
1907
- <tr>
1908
- <td rowspan="1" colSpan="1" >errMsg</td>
410
+ ## onConnectOtherRoom
1909
411
 
1910
- <td rowspan="1" colSpan="1" >Specific error reasons.</td>
1911
- </tr>
1912
- </table>
412
+ #### Event callback for cross-room communication request result
1913
413
 
414
+ Calling the connectOtherRoom() interface in TRTCCloud will initiate a video call between broadcasters in two different rooms, which is the so-called “Host PK” feature.
1914
415
 
1915
- ## onStartPublishCDNStream
416
+ The caller will receive the onConnectOtherRoom() callback to learn whether the cross-room communication is successful
1916
417
 
418
+ If successful, all users in both rooms will receive the onUserVideoAvailable() callback from the PK anchor in the other room.
419
+ | Parameters | Description |
420
+ | --- | --- |
421
+ | errCode | Error Code, ERR_NULL represents successful switching. For others, please refer to [ Error Code ](https://cloud.tencent.com/document/product/647/32257). |
422
+ | errMsg | Error message. |
423
+ | userId | User ID of the anchor in the other room for cross-room communication. |
1917
424
 
425
+ ## onDisConnectOtherRoom
1918
426
 
1919
- #### Event callback for starting to publish audio and video streams to a non-Tencent Cloud CDN
427
+ #### Event callback for ending cross-room communication result
1920
428
 
1921
- When you call startPublishCDNStream to start publishing audio and video streams to a non-Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server. The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
1922
- <table>
1923
- <tr>
1924
- <td rowspan="1" colSpan="1" >Parameters</td>
429
+ ## onUpdateOtherRoomForwardMode
1925
430
 
1926
- <td rowspan="1" colSpan="1" >Description</td>
1927
- </tr>
431
+ #### Event callback for modifying cross-room broadcaster uplink capability result
1928
432
 
1929
- <tr>
1930
- <td rowspan="1" colSpan="1" >err</td>
433
+ ## onRemoteUserEnterRoom
1931
434
 
1932
- <td rowspan="1" colSpan="1" >0 indicates success, other values indicate failure.</td>
1933
- </tr>
435
+ #### A user has joined the current room
1934
436
 
1935
- <tr>
1936
- <td rowspan="1" colSpan="1" >errMsg</td>
437
+ For performance considerations, the behavior of this notification differs in two different TRTC application scenarios (i.e., AppScene, specified by the second parameter when calling enterRoom):
438
+ - Live streaming scenarios (TRTC_APP_SCENE_LIVE and TRTC_APP_SCENE_VOICE_CHATROOM): In this scenario, users are distinguished between hosts and audience. This notification is only triggered when a host enters the room. Audience members entering the room will not trigger this notification.
1937
439
 
1938
- <td rowspan="1" colSpan="1" >Specific error reasons.</td>
1939
- </tr>
1940
- </table>
440
+ - Call scenarios (TRTC_APP_SCENE_VIDEOCALL and TRTC_APP_SCENE_AUDIOCALL): In this scenario, users are not distinguished by roles (all users can be considered as hosts). Any user entering the room will trigger this notification.
1941
441
 
442
+ | Parameters | Description |
443
+ | --- | --- |
444
+ | userId | User Identifier of the remote user. |
1942
445
 
1943
446
  > **Note**
1944
- >
1945
-
1946
- > When you receive a successful event callback, it only indicates that your publishing command has been synchronized to the Tencent Cloud backend server, but if the target CDN provider's server does not accept the video stream, it may still result in a publishing failure.
1947
- >
447
+ >
1948
448
 
449
+ > 1. The event callbacks onRemoteUserEnterRoom and onRemoteUserLeaveRoom are only applicable for maintaining the "user list" in the current room. The presence of these callbacks does not necessarily imply video streams.
450
+ >
1949
451
 
1950
- ## onStopPublishCDNStream
452
+ > 2. To display the remote screen, please listen for the onUserVideoAvailable() event callback, which indicates whether a specific user has video footage.
453
+ >
1951
454
 
455
+ ## onRemoteUserLeaveRoom
1952
456
 
457
+ #### A user has left the current room
1953
458
 
1954
- #### Event callback for stopping the publishing of audio and video streams to a non-Tencent Cloud CDN
459
+ Corresponding to onRemoteUserEnterRoom, the behavior of this notification differs in two different application scenarios (i.e., AppScene, specified by the second parameter when calling enterRoom):
460
+ - In live streaming scenarios (TRTC_APP_SCENE_LIVE and TRTC_APP_SCENE_VOICE_CHATROOM): This notification is triggered only when a host leaves the room. Audience members leaving the room will not trigger this notification.
1955
461
 
1956
- When you call stopPublishCDNStream to stop publishing audio and video streams to a non-Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server. The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
1957
- <table>
1958
- <tr>
1959
- <td rowspan="1" colSpan="1" >Parameters</td>
462
+ - In call scenarios (TRTC_APP_SCENE_VIDEOCALL and TRTC_APP_SCENE_AUDIOCALL): In this scenario, users are not distinguished by roles. Any user leaving the room will trigger this notification.
1960
463
 
1961
- <td rowspan="1" colSpan="1" >Description</td>
1962
- </tr>
464
+ | Parameters | Description |
465
+ | --- | --- |
466
+ | reason | Reason for leaving: 0 indicates the user left the room voluntarily, 1 indicates a timeout exit, 2 indicates the user was kicked out of the room, and 3 indicates the anchor switched to audience mode and left the room. |
467
+ | userId | User Identifier of the remote user. |
1963
468
 
1964
- <tr>
1965
- <td rowspan="1" colSpan="1" >err</td>
469
+ ## onUserVideoAvailable
1966
470
 
1967
- <td rowspan="1" colSpan="1" >0 indicates success, other values indicate failure.</td>
1968
- </tr>
471
+ #### A remote user has started/stopped publishing the main video stream
1969
472
 
1970
- <tr>
1971
- <td rowspan="1" colSpan="1" >errMsg</td>
473
+ **The primary video** is generally used to carry the camera's video feed. When you receive the onUserVideoAvailable(userId, true) notification, it indicates that video frames are available for playback on this channel.
1972
474
 
1973
- <td rowspan="1" colSpan="1" >Specific error reasons.</td>
1974
- </tr>
1975
- </table>
475
+ At this point, you need to call the startRemoteView interface to subscribe to the user's remote screen. Upon successful subscription, you will continue to receive the user's first frame rendering callback onFirstVideoFrame(userId).
1976
476
 
477
+ When you receive the onUserVideoAvailable(userId, false) notification, it means that the remote video on this channel has been turned off. The shutdown may be due to the user invoking muteLocalVideo or stopLocalPreview.
478
+ | Parameters | Description |
479
+ | --- | --- |
480
+ | available | Whether the user has published (or cancelled publishing) the Main Road Picture, true: published; false: cancelled. |
481
+ | userId | User Identifier of the remote user. |
1977
482
 
1978
- ## onSetMixTranscodingConfig
483
+ ## onUserSubStreamAvailable
1979
484
 
485
+ #### A remote user has started/stopped publishing the auxiliary video stream
1980
486
 
487
+ "Auxiliary Road Picture" is generally used to carry the screen sharing content. When you receive the onUserSubStreamAvailable(userId, true) notification, it indicates that video frames are available for playback on this channel.
1981
488
 
1982
- #### Event callback for setting the layout and transcoding parameters of Cloud Mixed Streaming
489
+ At this point, you need to call the startRemoteView interface to subscribe to the user's remote screen. Upon successful subscription, you will continue to receive the user's first frame rendering callback onFirstVideoFrame(userId).
490
+ | Parameters | Description |
491
+ | --- | --- |
492
+ | available | Whether the user has published (or cancelled publishing) the auxiliary video content, true: published; false: cancelled. |
493
+ | userId | User Identifier of the remote user. |
1983
494
 
1984
- When you call setMixTranscodingConfig to adjust the layout and transcoding parameters of cloud mixed streaming, the SDK will immediately sync this adjustment command to the cloud server. The SDK will then receive the process results from the cloud server and notify you of the execution results through this event callback.
1985
- <table>
1986
- <tr>
1987
- <td rowspan="1" colSpan="1" >Parameters</td>
495
+ > **Note**
496
+ >
1988
497
 
1989
- <td rowspan="1" colSpan="1" >Description</td>
1990
- </tr>
498
+ > The function used to display the auxiliary road picture is startRemoteView, not startRemoteSubStreamView. The latter has been deprecated.
499
+ >
1991
500
 
1992
- <tr>
1993
- <td rowspan="1" colSpan="1" >err</td>
501
+ ## onUserAudioAvailable
1994
502
 
1995
- <td rowspan="1" colSpan="1" >Error code: 0 indicates success, other values indicate failure.</td>
1996
- </tr>
503
+ #### A remote user has started/stopped publishing their audio
1997
504
 
1998
- <tr>
1999
- <td rowspan="1" colSpan="1" >errMsg</td>
505
+ When you receive the onUserAudioAvailable(userId, true) notification, it means the user has published their audio. At this time, the SDK behaves as follows:
506
+ - In Automatic Subscription Mode, you do not need to take any action; the SDK will automatically play the user's audio.
2000
507
 
2001
- <td rowspan="1" colSpan="1" >Specific error reason.</td>
2002
- </tr>
2003
- </table>
508
+ - In manual subscription mode, you can use muteRemoteAudio(userid, false) to play the user's audio.
2004
509
 
510
+ | Parameters | Description |
511
+ | --- | --- |
512
+ | available | Whether the user has published (or cancelled publishing) their audio, true: published; false: cancelled. |
513
+ | userId | User Identifier of the remote user. |
2005
514
 
2006
- ## onStartPublishMediaStream
515
+ > **Note**
516
+ >
2007
517
 
518
+ > The SDK uses automatic subscription mode by default. You can set it to manual subscription by calling setDefaultStreamRecvMode, but this must be done before you enter the room.
519
+ >
2008
520
 
521
+ ## onFirstVideoFrame
2009
522
 
2010
- #### Event callback for starting to publish the media stream
523
+ #### The SDK has started rendering the first frame of the local or remote user's video
2011
524
 
2012
- When you call [startPublishMediaStream](https://write.woa.com/document/87029900866228224) to start publishing the media stream to TRTC backend services, the SDK will immediately sync this command to the cloud server. The SDK will then receive the process results from the cloud server and notify you of the execution results through this event callback.
2013
- <table>
2014
- <tr>
2015
- <td rowspan="1" colSpan="1" >Parameters</td>
525
+ The SDK triggers this event when rendering the first video frame of the local or remote user. You can use the userId parameter in the callback event to determine whether the event is from "Local" or "Remote".
526
+ - If userId is empty, it means the SDK has started rendering your local video footage, but you must have called startLocalPreview or startScreenCapture.
2016
527
 
2017
- <td rowspan="1" colSpan="1" >Description</td>
2018
- </tr>
528
+ - If userId is not empty, it means the SDK has started rendering the remote user's video footage. However, you must have called startRemoteView to subscribe to the user's video footage.
2019
529
 
2020
- <tr>
2021
- <td rowspan="1" colSpan="1" >code</td>
530
+ | Parameters | Description |
531
+ | --- | --- |
532
+ | height | Height of the video footage. |
533
+ | streamType | Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage. |
534
+ | userId | The user identifier of local or remote. If userId is empty, it means your local first video frame has arrived. If userId is not empty, it means the remote user's first video frame has arrived. |
535
+ | width | Width of the video footage. |
2022
536
 
2023
- <td rowspan="1" colSpan="1" >Callback result, 0 indicates success, other values indicate failure.</td>
2024
- </tr>
537
+ > **Note**
538
+ >
2025
539
 
2026
- <tr>
2027
- <td rowspan="1" colSpan="1" >extraInfo</td>
540
+ > 1. The local first video frame event callback is triggered only after you call startLocalPreview or startScreenCapture.
541
+ >
2028
542
 
2029
- <td rowspan="1" colSpan="1" >Expand information field, some error codes may carry additional information to help locate the problem.</td>
2030
- </tr>
543
+ > 2. The remote user's first video frame event callback is triggered only after you call startRemoteView or startRemoteSubStreamView.
544
+ >
2031
545
 
2032
- <tr>
2033
- <td rowspan="1" colSpan="1" >message</td>
546
+ ## onFirstAudioFrame
2034
547
 
2035
- <td rowspan="1" colSpan="1" >Specific callback information.</td>
2036
- </tr>
548
+ #### The SDK has started playing the remote user's first audio frame
2037
549
 
2038
- <tr>
2039
- <td rowspan="1" colSpan="1" >taskId</td>
550
+ The SDK will throw this event when playing the remote user's first frame of audio. The first frame event of local audio is not thrown for now.
551
+ | Parameters | Description |
552
+ | --- | --- |
553
+ | userId | User Identifier of the remote user. |
2040
554
 
2041
- <td rowspan="1" colSpan="1" >When the request is successful, the TRTC backend will provide the taskId of this task in the callback. Subsequently, you can use this taskId in combination with [updatePublishMediaStream](https://write.woa.com/document/87029900866228224) and [stopPublishMediaStream](https://write.woa.com/document/87029900866228224) to update and stop.</td>
2042
- </tr>
2043
- </table>
555
+ ## onSendFirstLocalVideoFrame
2044
556
 
557
+ #### The first local video frame has been published
2045
558
 
2046
- ## onUpdatePublishMediaStream
559
+ After successfully joining the room and starting local video capture via startLocalPreview or startScreenCapture (the order of starting capture and joining the room does not matter), the SDK will start video encoding and publish the local video data to the cloud using its network module. Once the SDK successfully sends the first frame of local video data to the cloud, the onSendFirstLocalVideoFrame event callback will be triggered.
560
+ | Parameters | Description |
561
+ | --- | --- |
562
+ | streamType | Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage. |
2047
563
 
564
+ ## onSendFirstLocalAudioFrame
2048
565
 
566
+ #### The first local audio frame has been published
2049
567
 
2050
- #### Event callback for updating the media stream
568
+ After successfully joining the room and starting local audio capture via startLocalAudio (the order of starting capture and joining the room does not matter), the SDK will start audio encoding and publish the local audio data to the cloud using its network module. Once the SDK successfully sends the first frame of local audio data to the cloud, the onSendFirstLocalAudioFrame event callback will be triggered.
2051
569
 
2052
- When you call the media stream publishing interface ([updatePublishMediaStream](https://write.woa.com/document/87029900866228224)) to start updating the media stream to the TRTC backend services, the SDK will immediately sync this command to the cloud server. The SDK will then receive the process results from the cloud server and notify you of the execution results through this event callback.
2053
- <table>
2054
- <tr>
2055
- <td rowspan="1" colSpan="1" >Parameters</td>
570
+ ## onRemoteVideoStatusUpdated
2056
571
 
2057
- <td rowspan="1" colSpan="1" >Description</td>
2058
- </tr>
572
+ #### Event callback for remote video status changes
2059
573
 
2060
- <tr>
2061
- <td rowspan="1" colSpan="1" >code</td>
574
+ You can use this event callback to obtain the playback status of each remote video stream (including three states: Playing, Loading, and Stopped) for corresponding UI display.
575
+ | Parameters | Description |
576
+ | --- | --- |
577
+ | extrainfo | Additional Information. |
578
+ | reason | Reasons for video status changes. |
579
+ | status | Video Status: Including Playing, Loading, and Stopped states. |
580
+ | streamType | Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage. |
581
+ | userId | User identifier. |
2062
582
 
2063
- <td rowspan="1" colSpan="1" >Callback result, 0 indicates success, other values indicate failure.</td>
2064
- </tr>
583
+ ## onRemoteAudioStatusUpdated
2065
584
 
2066
- <tr>
2067
- <td rowspan="1" colSpan="1" >extraInfo</td>
585
+ #### Event callback for remote audio status changes
2068
586
 
2069
- <td rowspan="1" colSpan="1" >Expand information field, some error codes may carry additional information to help locate the problem.</td>
2070
- </tr>
587
+ You can use this event callback to obtain the playback status of each remote audio stream (including three states: Playing, Loading, and Stopped) for corresponding UI display.
588
+ | Parameters | Description |
589
+ | --- | --- |
590
+ | extrainfo | Additional Information. |
591
+ | reason | Reasons for audio status changes. |
592
+ | status | Audio Status: Including Playing, Loading, and Stopped states. |
593
+ | userId | User identifier. |
2071
594
 
2072
- <tr>
2073
- <td rowspan="1" colSpan="1" >message</td>
595
+ ## onUserVideoSizeChanged
2074
596
 
2075
- <td rowspan="1" colSpan="1" >Specific callback information.</td>
2076
- </tr>
597
+ #### Callback for changes in user video size
2077
598
 
2078
- <tr>
2079
- <td rowspan="1" colSpan="1" >taskId</td>
599
+ When you receive the onUserVideoSizeChanged(userId, streamtype, newWidth, newHeight) notification, it indicates that the video size has changed, possibly because the user has called setVideoEncoderParam or setSubStreamEncoderParam to reset the video dimensions.
600
+ | Parameters | Description |
601
+ | --- | --- |
602
+ | newHeight | The height of the video stream (in pixels). |
603
+ | newWidth | The width of the video stream (in pixels). |
604
+ | streamType | Video stream type: Main is generally used for carrying camera footage, while Sub is generally used for carrying screen sharing footage. |
605
+ | userId | User identifier. |
2080
606
 
2081
- <td rowspan="1" colSpan="1" >The taskId you provide when calling the media stream publishing interface ([updatePublishMediaStream](https://write.woa.com/document/87029900866228224)) will be brought back to you through this callback, to identify which update request this callback belongs to.</td>
2082
- </tr>
2083
- </table>
607
+ ## onNetworkQuality
2084
608
 
609
+ #### Real-time statistics callback for network quality
2085
610
 
2086
- ## onStopPublishMediaStream
611
+ This statistical callback is thrown every 2 seconds to notify the SDK of the perceived current network's uplink and downlink quality.
2087
612
 
613
+ The SDK uses a set of proprietary algorithms to assess the current network's latency, bandwidth, and stability, and calculates an evaluation result: An evaluation result of 1 (Excellent) indicates that the current network condition is very good, while a result of 6 (Down) indicates that the current network cannot support normal calls on TRTC.
614
+ | Parameters | Description |
615
+ | --- | --- |
616
+ | localQuality | Uplink network quality. |
617
+ | remoteQuality | Downlink network quality, represents the data quality finally gathered at the client-end after the data stream travels through a complete transmission link from "remote-end -> cloud -> client-end". Thus, the downlink network quality represents the result influenced by both the remote uplink and the client downlink. |
2088
618
 
619
+ > **Note**
620
+ >
2089
621
 
2090
- #### Event callback for stopping the media stream
622
+ > It is temporarily impossible to assess the remote user's uplink quality through this interface alone.
623
+ >
2091
624
 
2092
- When you call stop publishing media stream ([stopPublishMediaStream](https://write.woa.com/document/87029900866228224)) to stop the media stream to TRTC backend service, the SDK will immediately synchronize this command to the cloud server. Subsequently, the SDK will receive the process results from the cloud server and notify you of the execution results of the command through this event callback.
2093
- <table>
2094
- <tr>
2095
- <td rowspan="1" colSpan="1" >Parameters</td>
625
+ ## onStatistics
2096
626
 
2097
- <td rowspan="1" colSpan="1" >Description</td>
2098
- </tr>
627
+ #### Real-time statistics callback for audio and video technical indicators
2099
628
 
2100
- <tr>
2101
- <td rowspan="1" colSpan="1" >code</td>
629
+ This statistical callback is thrown every 2 seconds, notifying the SDK internal audio, video, and network-related technical indicators. This information is listed in TRTCStatistics:
630
+ - Video statistical information: Video resolution, frame rate (FPS), and bitrate information.
2102
631
 
2103
- <td rowspan="1" colSpan="1" >Callback result, 0 indicates success, other values indicate failure.</td>
2104
- </tr>
632
+ - Audio statistical information: Audio sample rate, channel, and bitrate information.
2105
633
 
2106
- <tr>
2107
- <td rowspan="1" colSpan="1" >extraInfo</td>
634
+ - Network Statistics: Network Latency (RTT), Packet Loss Rate (loss), Upstream Traffic (sentBytes), Downstream Traffic (receivedBytes), and other information from a round-trip (SDK > Cloud > SDK).
2108
635
 
2109
- <td rowspan="1" colSpan="1" >Expand information field, some error codes may carry additional information to help locate the problem.</td>
2110
- </tr>
636
+ | Parameters | Description |
637
+ | --- | --- |
638
+ | statistics | Statistics including local and remote user statistics, for details refer to TRTCStatistics. |
2111
639
 
2112
- <tr>
2113
- <td rowspan="1" colSpan="1" >message</td>
640
+ > **Note**
641
+ >
2114
642
 
2115
- <td rowspan="1" colSpan="1" >Specific callback information.</td>
2116
- </tr>
643
+ > If you just need to know the current network quality and do not want to spend too much time studying this statistical callback, it is recommended to use onNetworkQuality to solve the problem.
644
+ >
2117
645
 
2118
- <tr>
2119
- <td rowspan="1" colSpan="1" >taskId</td>
646
+ ## onSpeedTestResult
2120
647
 
2121
- <td rowspan="1" colSpan="1" >The taskId you passed in when you called stop publishing media stream ([stopPublishMediaStream](https://write.woa.com/document/87029900866228224)) will be brought back to you through this callback, identifying which stop request this callback belongs to.</td>
2122
- </tr>
2123
- </table>
648
+ #### Callback for internet speed test results
2124
649
 
650
+ This statistical callback is triggered by startSpeedTest.
651
+ | Parameters | Description |
652
+ | --- | --- |
653
+ | result | Internet Speed Test results, including packet loss, round-trip delay, upstream and downstream bandwidth rates; for details, refer to TRTCSpeedTestResult. |
2125
654
 
2126
- ## onCdnStreamStateChanged
655
+ ## onConnectionLost
2127
656
 
657
+ #### The connection between the SDK and the cloud has been disconnected.
2128
658
 
659
+ The SDK will throw this event callback when the connection to the cloud is disconnected. The main reasons for disconnection are network unavailability or network switching, such as when the user enters an elevator during a call.
2129
660
 
2130
- #### RTMP/RTMPS streaming status change callback
661
+ After throwing this event, the SDK will attempt to re-establish the connection with the cloud. During the reconnection process, it will throw onTryToReconnect, and once the connection is restored, it will throw onConnectionRecovery.
2131
662
 
2132
- When you call [startPublishMediaStream](https://write.woa.com/document/87029900866228224) to start publishing media stream to TRTC backend service, the SDK will immediately synchronize this command to the cloud service.
663
+ Thus, the SDK will switch among the following three connection-related events in the following manner:
2133
664
 
2134
- If you set the URL configuration for publishing audio and video streaming to Tencent or third-party CDN in the target stream configuration ([TRTCPublishTarget](https://write.woa.com/document/87029993616093184)), the specific RTMP or RTMPS streaming status will be synchronized to you through this callback.
2135
- <table>
2136
- <tr>
2137
- <td rowspan="1" colSpan="1" >Parameters</td>
665
+ ## onTryToReconnect
2138
666
 
2139
- <td rowspan="1" colSpan="1" >Description</td>
2140
- </tr>
667
+ #### The SDK is trying to reconnect to the cloud.
2141
668
 
2142
- <tr>
2143
- <td rowspan="1" colSpan="1" >cdnUrl</td>
669
+ The SDK will throw onConnectionLost when the connection to the cloud is disconnected, then it will attempt to re-establish the connection with the cloud and throw this event. Once the connection is restored, it will throw onConnectionRecovery.
2144
670
 
2145
- <td rowspan="1" colSpan="1" >The URL you passed in through the target stream configuration ([TRTCPublishTarget](https://write.woa.com/document/87029993616093184)) when you called [startPublishMediaStream](https://write.woa.com/document/87029900866228224) will be synchronized to you through this callback when the streaming status changes.</td>
2146
- </tr>
671
+ ## onConnectionRecovery
2147
672
 
2148
- <tr>
2149
- <td rowspan="1" colSpan="1" >code</td>
673
+ #### The connection between the SDK and the cloud has been restored.
2150
674
 
2151
- <td rowspan="1" colSpan="1" >Stream Push Result, 0 means success, other values indicate an error.</td>
2152
- </tr>
675
+ The SDK will throw onConnectionLost when the connection to the cloud is disconnected. It will then attempt to re-establish the connection and throw onTryToReconnect. Once the connection is restored, this event callback will be triggered.
2153
676
 
2154
- <tr>
2155
- <td rowspan="1" colSpan="1" >extraInfo</td>
677
+ ## onCameraDidReady
2156
678
 
2157
- <td rowspan="1" colSpan="1" >Expand information field, some error codes may carry additional information to help locate the problem.</td>
2158
- </tr>
679
+ #### Camera is ready
2159
680
 
2160
- <tr>
2161
- <td rowspan="1" colSpan="1" >message</td>
681
+ When you call startLocalPreivew, the SDK will attempt to enable the camera. If successful, this event will be thrown.
2162
682
 
2163
- <td rowspan="1" colSpan="1" >Specific Stream Push Information.</td>
2164
- </tr>
683
+ If enabling the camera fails, it is most likely because the current application does not have access permissions to the camera or the camera is currently being used exclusively by another application.
2165
684
 
2166
- <tr>
2167
- <td rowspan="1" colSpan="1" >status</td>
685
+ You can capture the onError event callback to understand these exceptional conditions and prompt users through the UI interface.
2168
686
 
2169
- <td rowspan="1" colSpan="1" >Streaming Status.<br>- 0: Streaming not started or already ended. This status is returned when you call [stopPublishMediaStream](https://write.woa.com/document/87029900866228224).<br>- 1: Connecting to TRTC server and CDN server. If not immediately successful, TRTC backend service will retry multiple times and return this status (callback every 5s). If successful, it enters status 2; if server error occurs or streaming is not successful within 60 seconds, it enters status 4.<br>- 2: CDN streaming is in progress. This status is returned when streaming is successful.<br>- 3: TRTC server and CDN server streaming interruption, recovering. When CDN has an issue or streaming briefly interrupts, the TRTC backend service will automatically attempt to recover streaming and return this status (callback every 5 seconds). If streaming recovers successfully, it will transition to status 2; if server error occurs or recovery fails within 60 seconds, it will transition to status 4.<br>- 4: TRTC server and CDN server streaming interrupted, and recovery or connection timeout. At this point, streaming failed, you can call [updatePublishMediaStream](https://write.woa.com/document/87029900866228224) again to attempt streaming.<br>- 5: Disconnecting TRTC server and CDN server. When you call [stopPublishMediaStream](https://write.woa.com/document/87029900866228224), the TRTC backend service will transition to status 5 and then status 0.</td>
2170
- </tr>
2171
- </table>
687
+ ## onMicDidReady
2172
688
 
689
+ #### Microphone is ready
2173
690
 
2174
- ## onScreenCaptureStarted
691
+ When you call startLocalAudio, the SDK will attempt to enable the microphone. If successful, this event will be thrown.
2175
692
 
693
+ If enabling the microphone fails, it is most likely because the current application does not have access permissions to the microphone or the microphone is currently being used exclusively by another application.
2176
694
 
695
+ You can capture the onError event callback to understand these exceptional conditions and prompt users through the UI interface.
2177
696
 
2178
- #### Event callback for starting screen sharing
697
+ ## onAudioRouteChanged
2179
698
 
2180
- When you start screen sharing through [startScreenCapture](https://write.woa.com/document/87029900866228224) or related interfaces, the SDK will trigger this event callback.
699
+ #### Current audio routing has changed (applicable only to mobile devices)
2181
700
 
2182
- ## onScreenCapturePaused
701
+ The term "Audio Routing" refers to whether the sound is played through the phone's speaker or receiver. A change in audio routing means a change in the playback location of the sound.
702
+ - When the audio routing is set to receiver, the sound is quieter, and you need to bring the phone close to your ear to hear clearly. This offers better privacy and is suitable for phone calls.
2183
703
 
704
+ - When the audio routing is set to speaker, the sound is louder, allowing for clear listening without holding the phone to your face, thus enabling the "hands-free" feature.
2184
705
 
706
+ - When the audio routing is set to wired headphones.
2185
707
 
2186
- #### Event callback for pausing screen sharing
708
+ - When the audio routing is set to Bluetooth headphones.
2187
709
 
2188
- When you pause screen sharing through [pauseScreenCapture](https://write.woa.com/document/87029900866228224), the SDK will trigger this event callback.
710
+ - When the audio routing is set to USB professional sound card device.
2189
711
 
2190
- ## onScreenCaptureResumed
712
+ | Parameters | Description |
713
+ | --- | --- |
714
+ | fromRoute | Audio routing before the change. |
715
+ | route | Audio routing, which refers to where the sound is output (speaker, receiver). |
2191
716
 
717
+ ## onUserVoiceVolume
2192
718
 
719
+ #### Callback for volume feedback
2193
720
 
2194
- #### Event callback for resuming screen sharing
721
+ The SDK can assess the volume of each audio stream and periodically trigger this event callback. You can provide corresponding UI indications based on the volume, such as `waveform chart` or `volume slider`.
2195
722
 
2196
- When you resume screen sharing through [resumeScreenCapture](https://write.woa.com/document/87029900866228224), the SDK will trigger this event callback.
723
+ To implement this feature, you need to call enableAudioVolumeEvaluation to enable this capability and set the time interval for event triggers.
2197
724
 
2198
- ## onScreenCaptureStopped
725
+ It is important to note that, regardless of whether anyone is speaking in the current room, the SDK will periodically trigger this event callback at the interval you set.
726
+ | Parameters | Description |
727
+ | --- | --- |
728
+ | totalVolume | The total volume level of all remote users, with a range of 0 to 100. |
729
+ | userVolumes | It is an array that holds the volume levels of all speaking users, with a range of 0 to 100. |
2199
730
 
731
+ > **Note**
732
+ >
2200
733
 
734
+ > userVolumes is an array. For each element in the array, if the userId is empty, it represents the volume level collected by the local microphone. If the userId is not empty, it represents the volume level of remote users.
735
+ >
2201
736
 
2202
- #### Event callback for stopping screen sharing
737
+ ## onRecvCustomCmdMsg
2203
738
 
2204
- When you stop screen sharing by calling [stopScreenCapture](https://write.woa.com/document/87029900866228224), the SDK will trigger this event callback.
2205
- <table>
2206
- <tr>
2207
- <td rowspan="1" colSpan="1" >Parameters</td>
739
+ #### Receipt of a custom Definition message
2208
740
 
2209
- <td rowspan="1" colSpan="1" >Description</td>
2210
- </tr>
741
+ When a user in a room uses sendCustomCmdMsg to send a Definition UDP Message, other users in the room can receive the message through the onRecvCustomCmdMsg event callback.
742
+ | Parameters | Description |
743
+ | --- | --- |
744
+ | cmdID | Command ID. |
745
+ | message | Message Data. |
746
+ | seq | Message serial number. |
747
+ | userId | User identifier. |
2211
748
 
2212
- <tr>
2213
- <td rowspan="1" colSpan="1" >reason</td>
749
+ ## onMissCustomCmdMsg
2214
750
 
2215
- <td rowspan="1" colSpan="1" >Stop Reason, 0: User proactively stopped; 1: Screen window closed causing stop; 2: Indicates a change in the display screen status for screen sharing (e.g., interface unplugged, change in projection mode, etc.).</td>
2216
- </tr>
2217
- </table>
751
+ #### Event callback for lost custom Definition messages
2218
752
 
753
+ When you use sendCustomCmdMsg to send a Definition UDP message, even if reliable transmission is set, it cannot guarantee 100% message delivery, but the probability of message loss is very low and meets conventional reliability requirements.
2219
754
 
2220
- ## onLocalRecordBegin
755
+ After setting reliable transmission on the sender side, the SDK will notify the number of lost Definition messages during the past time period (usually 5 seconds) through this callback.
756
+ | Parameters | Description |
757
+ | --- | --- |
758
+ | cmdID | Command ID. |
759
+ | errCode | Error code. |
760
+ | missed | Number of lost messages. |
761
+ | userId | User identifier. |
2221
762
 
763
+ > **Note**
764
+ >
2222
765
 
766
+ > Only if reliable transmission is set on the sender side can the receiver receive the message loss callback.
767
+ >
2223
768
 
2224
- #### Event callback for the local recording task that has started
769
+ ## onRecvSEIMsg
2225
770
 
2226
- When you start a local media recording task by calling [startLocalRecording](https://write.woa.com/document/87029900866228224), the SDK will trigger this event callback to notify you whether the recording task has successfully started.
2227
- <table>
2228
- <tr>
2229
- <td rowspan="1" colSpan="1" >Parameters</td>
771
+ #### Callback for receiving SEI message
2230
772
 
2231
- <td rowspan="1" colSpan="1" >Description</td>
2232
- </tr>
773
+ When a user in the room sends an SEI message through the video frame using sendSEIMsg, other users in the room can receive the message via the onRecvSEIMsg event callback.
774
+ | Parameters | Description |
775
+ | --- | --- |
776
+ | message | Data. |
777
+ | userId | User identifier. |
2233
778
 
2234
- <tr>
2235
- <td rowspan="1" colSpan="1" >errCode</td>
779
+ ## onStartPublishing
2236
780
 
2237
- <td rowspan="1" colSpan="1" >Status Code.<br>- 0: Recording task started successfully.<br>- -1: Internal error caused the recording task to fail to start.<br>- -2: Incorrect file suffix name (e.g., unsupported recording format).<br>- -6: Recording has already started, needs to stop recording first.<br>- -7: Recording file already exists, needs to delete the file first.<br>- -8: No write permission in the recording directory, please check directory permissions.</td>
2238
- </tr>
781
+ #### Event callback for starting to publish audio and video streams to Tencent CSS CDN
2239
782
 
2240
- <tr>
2241
- <td rowspan="1" colSpan="1" >storagePath</td>
783
+ When you call startPublishing to start publishing audio and video streams to the Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server.
2242
784
 
2243
- <td rowspan="1" colSpan="1" >CFS path for recording.</td>
2244
- </tr>
2245
- </table>
785
+ The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
786
+ | Parameters | Description |
787
+ | --- | --- |
788
+ | err | 0 indicates success, other values indicate failure. |
789
+ | errMsg | Specific error reasons. |
2246
790
 
791
+ ## onStopPublishing
2247
792
 
2248
- ## onLocalRecording
793
+ #### Event callback for stopping the publishing of audio and video streams to Tencent CSS CDN
2249
794
 
795
+ When you call stopPublishing to stop publishing audio and video streams to the Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server.
2250
796
 
797
+ The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
798
+ | Parameters | Description |
799
+ | --- | --- |
800
+ | err | 0 indicates success, other values indicate failure. |
801
+ | errMsg | Specific error reasons. |
2251
802
 
2252
- #### Progress event callback for an ongoing local recording task
803
+ ## onStartPublishCDNStream
2253
804
 
2254
- After you successfully start a local media recording task by calling [startLocalRecording](https://write.woa.com/document/87029900866228224), the SDK will periodically trigger this event callback.
805
+ #### Event callback for starting to publish audio and video streams to a non-Tencent Cloud CDN
2255
806
 
2256
- You can capture this event callback to know the health status of the recording task.
807
+ When you call startPublishCDNStream to start publishing audio and video streams to a non-Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server. The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
808
+ | Parameters | Description |
809
+ | --- | --- |
810
+ | err | 0 indicates success, other values indicate failure. |
811
+ | errMsg | Specific error reasons. |
2257
812
 
2258
- You can set the interval for this event callback when you call [startLocalRecording](https://write.woa.com/document/87029900866228224).
2259
- <table>
2260
- <tr>
2261
- <td rowspan="1" colSpan="1" >Parameters</td>
813
+ > **Note**
814
+ >
2262
815
 
2263
- <td rowspan="1" colSpan="1" >Description</td>
2264
- </tr>
816
+ > When you receive a successful event callback, it only indicates that your publishing command has been synchronized to the Tencent Cloud backend server, but if the target CDN provider's server does not accept the video stream, it may still result in a publishing failure.
817
+ >
2265
818
 
2266
- <tr>
2267
- <td rowspan="1" colSpan="1" >duration</td>
819
+ ## onStopPublishCDNStream
2268
820
 
2269
- <td rowspan="1" colSpan="1" >The cumulative recorded duration in milliseconds.</td>
2270
- </tr>
821
+ #### Event callback for stopping the publishing of audio and video streams to a non-Tencent Cloud CDN
2271
822
 
2272
- <tr>
2273
- <td rowspan="1" colSpan="1" >storagePath</td>
823
+ When you call stopPublishCDNStream to stop publishing audio and video streams to a non-Tencent CSS CDN, the SDK will immediately synchronize this command to the cloud server. The SDK will then receive the processing results from the cloud server and notify you of the execution results of the command through this event callback.
824
+ | Parameters | Description |
825
+ | --- | --- |
826
+ | err | 0 indicates success, other values indicate failure. |
827
+ | errMsg | Specific error reasons. |
2274
828
 
2275
- <td rowspan="1" colSpan="1" >CFS path for recording.</td>
2276
- </tr>
2277
- </table>
829
+ ## onSetMixTranscodingConfig
2278
830
 
831
+ #### Event callback for setting the layout and transcoding parameters of Cloud Mixed Streaming
2279
832
 
2280
- ## onLocalRecordFragment
833
+ When you call setMixTranscodingConfig to adjust the layout and transcoding parameters of cloud mixed streaming, the SDK will immediately sync this adjustment command to the cloud server. The SDK will then receive the process results from the cloud server and notify you of the execution results through this event callback.
834
+ | Parameters | Description |
835
+ | --- | --- |
836
+ | err | Error code: 0 indicates success, other values indicate failure. |
837
+ | errMsg | Specific error reason. |
2281
838
 
839
+ ## onStartPublishMediaStream
2282
840
 
841
+ #### Event callback for starting to publish the media stream
2283
842
 
2284
- #### Event callback for local recording shard
843
+ When you call startPublishMediaStream to start publishing the media stream to TRTC backend services, the SDK will immediately sync this command to the cloud server. The SDK will then receive the process results from the cloud server and notify you of the execution results through this event callback.
844
+ | Parameters | Description |
845
+ | --- | --- |
846
+ | code | Callback result, 0 indicates success, other values indicate failure. |
847
+ | extraInfo | Expand information field, some error codes may carry additional information to help locate the problem. |
848
+ | message | Specific callback information. |
849
+ | taskId | When the request is successful, the TRTC backend will provide the taskId of this task in the callback. Subsequently, you can use this taskId in combination with updatePublishMediaStream and stopPublishMediaStream to update and stop. |
2285
850
 
2286
- When you enable shard recording, each completed shard will trigger a callback through this interface.
2287
- <table>
2288
- <tr>
2289
- <td rowspan="1" colSpan="1" >Parameters</td>
851
+ ## onUpdatePublishMediaStream
2290
852
 
2291
- <td rowspan="1" colSpan="1" >Description</td>
2292
- </tr>
853
+ #### Event callback for updating the media stream
2293
854
 
2294
- <tr>
2295
- <td rowspan="1" colSpan="1" >storagePath</td>
855
+ When you call the media stream publishing interface (updatePublishMediaStream) to start updating the media stream to the TRTC backend services, the SDK will immediately sync this command to the cloud server. The SDK will then receive the process results from the cloud server and notify you of the execution results through this event callback.
856
+ | Parameters | Description |
857
+ | --- | --- |
858
+ | code | Callback result, 0 indicates success, other values indicate failure. |
859
+ | extraInfo | Expand information field, some error codes may carry additional information to help locate the problem. |
860
+ | message | Specific callback information. |
861
+ | taskId | The taskId you provide when calling the media stream publishing interface (updatePublishMediaStream) will be brought back to you through this callback, to identify which update request this callback belongs to. |
2296
862
 
2297
- <td rowspan="1" colSpan="1" >Shard CFS path.</td>
2298
- </tr>
2299
- </table>
863
+ ## onStopPublishMediaStream
2300
864
 
865
+ #### Event callback for stopping the media stream
2301
866
 
2302
- ## onLocalRecordComplete
867
+ When you call stop publishing media stream (stopPublishMediaStream) to stop the media stream to TRTC backend service, the SDK will immediately synchronize this command to the cloud server. Subsequently, the SDK will receive the process results from the cloud server and notify you of the execution results of the command through this event callback.
868
+ | Parameters | Description |
869
+ | --- | --- |
870
+ | code | Callback result, 0 indicates success, other values indicate failure. |
871
+ | extraInfo | Expand information field, some error codes may carry additional information to help locate the problem. |
872
+ | message | Specific callback information. |
873
+ | taskId | The taskId you passed in when you called stop publishing media stream (stopPublishMediaStream) will be brought back to you through this callback, identifying which stop request this callback belongs to. |
2303
874
 
875
+ ## onCdnStreamStateChanged
2304
876
 
877
+ #### RTMP/RTMPS streaming status change callback
2305
878
 
2306
- #### Event callback for the local recording task that has ended
879
+ When you call startPublishMediaStream to start publishing media stream to TRTC backend service, the SDK will immediately synchronize this command to the cloud service.
2307
880
 
2308
- When you call [stopLocalRecording](https://write.woa.com/document/87029900866228224) to stop the local media recording task, the SDK will trigger this event callback to notify you of the final result of the recording task.
2309
- <table>
2310
- <tr>
2311
- <td rowspan="1" colSpan="1" >Parameters</td>
881
+ If you set the URL configuration for publishing audio and video streaming to Tencent or third-party CDN in the target stream configuration (TRTCPublishTarget), the specific RTMP or RTMPS streaming status will be synchronized to you through this callback.
882
+ | Parameters | Description |
883
+ | --- | --- |
884
+ | cdnUrl | The URL you passed in through the target stream configuration (TRTCPublishTarget) when you called startPublishMediaStream will be synchronized to you through this callback when the streaming status changes. |
885
+ | code | Stream Push Result, 0 means success, other values indicate an error. |
886
+ | extraInfo | Expand information field, some error codes may carry additional information to help locate the problem. |
887
+ | message | Specific Stream Push Information. |
888
+ | status | Streaming Status.<br>- 0: Streaming not started or already ended. This status is returned when you call stopPublishMediaStream.<br>- 1: Connecting to TRTC server and CDN server. If not immediately successful, TRTC backend service will retry multiple times and return this status (callback every 5s). If successful, it enters status 2; if server error occurs or streaming is not successful within 60 seconds, it enters status 4.<br>- 2: CDN streaming is in progress. This status is returned when streaming is successful.<br>- 3: TRTC server and CDN server streaming interruption, recovering. When CDN has an issue or streaming briefly interrupts, the TRTC backend service will automatically attempt to recover streaming and return this status (callback every 5 seconds). If streaming recovers successfully, it will transition to status 2; if server error occurs or recovery fails within 60 seconds, it will transition to status 4.<br>- 4: TRTC server and CDN server streaming interrupted, and recovery or connection timeout. At this point, streaming failed, you can call updatePublishMediaStream again to attempt streaming.<br>- 5: Disconnecting TRTC server and CDN server. When you call stopPublishMediaStream, the TRTC backend service will transition to status 5 and then status 0. |
2312
889
 
2313
- <td rowspan="1" colSpan="1" >Description</td>
2314
- </tr>
890
+ ## onScreenCaptureStarted
2315
891
 
2316
- <tr>
2317
- <td rowspan="1" colSpan="1" >errCode</td>
892
+ #### Event callback for starting screen sharing
2318
893
 
2319
- <td rowspan="1" colSpan="1" >Status Code.<br>- 0: Successfully ended the recording task.<br>- -1: Recording failed.<br>- -2: Changing resolution or switching between portrait and landscape mode caused the recording to end.<br>- -3: The recording duration is too short, or no video or audio data was captured. Please check the recording duration, or whether audio and video capture is enabled.</td>
2320
- </tr>
894
+ When you start screen sharing through startScreenCapture or related interfaces, the SDK will trigger this event callback.
2321
895
 
2322
- <tr>
2323
- <td rowspan="1" colSpan="1" >storagePath</td>
896
+ ## onScreenCapturePaused
2324
897
 
2325
- <td rowspan="1" colSpan="1" >CFS path for recording.</td>
2326
- </tr>
2327
- </table>
898
+ #### Event callback for pausing screen sharing
2328
899
 
900
+ When you pause screen sharing through pauseScreenCapture, the SDK will trigger this event callback.
2329
901
 
2330
- ## onSnapshotComplete
902
+ ## onScreenCaptureResumed
2331
903
 
904
+ #### Event callback for resuming screen sharing
2332
905
 
906
+ When you resume screen sharing through resumeScreenCapture, the SDK will trigger this event callback.
2333
907
 
2334
- #### Event callback for local screenshot completion
2335
- <table>
2336
- <tr>
2337
- <td rowspan="1" colSpan="1" >Parameters</td>
908
+ ## onScreenCaptureStopped
2338
909
 
2339
- <td rowspan="1" colSpan="1" >Description</td>
2340
- </tr>
910
+ #### Event callback for stopping screen sharing
2341
911
 
2342
- <tr>
2343
- <td rowspan="1" colSpan="1" >bmp</td>
912
+ When you stop screen sharing by calling stopScreenCapture, the SDK will trigger this event callback.
913
+ | Parameters | Description |
914
+ | --- | --- |
915
+ | reason | Stop Reason, 0: User proactively stopped; 1: Screen window closed causing stop; 2: Indicates a change in the display screen status for screen sharing (e.g., interface unplugged, change in projection mode, etc.). |
2344
916
 
2345
- <td rowspan="1" colSpan="1" >Screenshot result, if bmp is null it means the screenshot operation failed.</td>
2346
- </tr>
917
+ ## onLocalRecordBegin
2347
918
 
2348
- <tr>
2349
- <td rowspan="1" colSpan="1" >data</td>
919
+ #### Event callback for the local recording task that has started
2350
920
 
2351
- <td rowspan="1" colSpan="1" >Screenshot data, nullptr means the screenshot failed.</td>
2352
- </tr>
921
+ When you start a local media recording task by calling startLocalRecording, the SDK will trigger this event callback to notify you whether the recording task has successfully started.
922
+ | Parameters | Description |
923
+ | --- | --- |
924
+ | errCode | Status Code.<br>- 0: Recording task started successfully.<br>- -1: Internal error caused the recording task to fail to start.<br>- -2: Incorrect file suffix name (e.g., unsupported recording format).<br>- -6: Recording has already started, needs to stop recording first.<br>- -7: Recording file already exists, needs to delete the file first.<br>- -8: No write permission in the recording directory, please check directory permissions. |
925
+ | storagePath | CFS path for recording. |
2353
926
 
2354
- <tr>
2355
- <td rowspan="1" colSpan="1" >format</td>
927
+ ## onLocalRecording
2356
928
 
2357
- <td rowspan="1" colSpan="1" >Screenshot data format, currently only supports TRTCVideoPixelFormat_BGRA32.</td>
2358
- </tr>
929
+ #### Progress event callback for an ongoing local recording task
2359
930
 
2360
- <tr>
2361
- <td rowspan="1" colSpan="1" >height</td>
931
+ After you successfully start a local media recording task by calling startLocalRecording, the SDK will periodically trigger this event callback.
2362
932
 
2363
- <td rowspan="1" colSpan="1" >Height of the screenshot.</td>
2364
- </tr>
933
+ You can capture this event callback to know the health status of the recording task.
2365
934
 
2366
- <tr>
2367
- <td rowspan="1" colSpan="1" >length</td>
935
+ You can set the interval for this event callback when you call startLocalRecording.
936
+ | Parameters | Description |
937
+ | --- | --- |
938
+ | duration | The cumulative recorded duration in milliseconds. |
939
+ | storagePath | CFS path for recording. |
2368
940
 
2369
- <td rowspan="1" colSpan="1" >Length of the screenshot data, for BGRA32, length = width * height * 4.</td>
2370
- </tr>
941
+ ## onLocalRecordFragment
2371
942
 
2372
- <tr>
2373
- <td rowspan="1" colSpan="1" >type</td>
943
+ #### Event callback for local recording shard
2374
944
 
2375
- <td rowspan="1" colSpan="1" >Video stream type.</td>
2376
- </tr>
945
+ When you enable shard recording, each completed shard will trigger a callback through this interface.
946
+ | Parameters | Description |
947
+ | --- | --- |
948
+ | storagePath | Shard CFS path. |
2377
949
 
2378
- <tr>
2379
- <td rowspan="1" colSpan="1" >userId</td>
950
+ ## onLocalRecordComplete
2380
951
 
2381
- <td rowspan="1" colSpan="1" >User Identifier, if userId is an empty string, it means the local screen was captured.</td>
2382
- </tr>
952
+ #### Event callback for the local recording task that has ended
2383
953
 
2384
- <tr>
2385
- <td rowspan="1" colSpan="1" >width</td>
954
+ When you call stopLocalRecording to stop the local media recording task, the SDK will trigger this event callback to notify you of the final result of the recording task.
955
+ | Parameters | Description |
956
+ | --- | --- |
957
+ | errCode | Status Code.<br>- 0: Successfully ended the recording task.<br>- -1: Recording failed.<br>- -2: Changing resolution or switching between portrait and landscape mode caused the recording to end.<br>- -3: The recording duration is too short, or no video or audio data was captured. Please check the recording duration, or whether audio and video capture is enabled. |
958
+ | storagePath | CFS path for recording. |
2386
959
 
2387
- <td rowspan="1" colSpan="1" >Width of the screenshot.</td>
2388
- </tr>
2389
- </table>
960
+ ## onSnapshotComplete
2390
961
 
962
+ #### Event callback for local screenshot completion
963
+ | Parameters | Description |
964
+ | --- | --- |
965
+ | bmp | Screenshot result, if bmp is null it means the screenshot operation failed. |
966
+ | data | Screenshot data, nullptr means the screenshot failed. |
967
+ | format | Screenshot data format, currently only supports TRTCVideoPixelFormat_BGRA32. |
968
+ | height | Height of the screenshot. |
969
+ | length | Length of the screenshot data, for BGRA32, length = width * height * 4. |
970
+ | type | Video stream type. |
971
+ | userId | User Identifier, if userId is an empty string, it means the local screen was captured. |
972
+ | width | Width of the screenshot. |
2391
973
 
2392
974
  > **Note**
2393
- >
975
+ >
2394
976
 
2395
977
  > The parameters for the C++ interface and the Java interface across all platforms are different. The C++ interface uses 7 parameters to describe a screenshot, while the Java interface uses only one Bitmap to describe a screenshot.
2396
- >
2397
-
978
+ >
2398
979
 
2399
980
  ## onUserEnter
2400
981
 
2401
-
2402
-
2403
982
  #### A host has joined the current room (deprecated)
2404
983
 
2405
- @deprecated Starting from the new version, it is recommended to use [onRemoteUserEnterRoom](https://write.woa.com/document/87029920275542016) instead.
984
+ @deprecated Starting from the new version, it is recommended to use onRemoteUserEnterRoom instead.
2406
985
 
2407
986
  ## onUserExit
2408
987
 
2409
-
2410
-
2411
988
  #### A host has left the current room (deprecated)
2412
989
 
2413
- @deprecated Starting from the new version, it is recommended to use [onRemoteUserLeaveRoom](https://write.woa.com/document/87029920275542016) instead.
990
+ @deprecated Starting from the new version, it is recommended to use onRemoteUserLeaveRoom instead.
2414
991
 
2415
992
  ## onAudioEffectFinished
2416
993
 
2417
-
2418
-
2419
994
  #### Sound effect playback has ended (deprecated)
2420
995
 
2421
996
  @deprecated Starting from the new version, it is recommended to use the ITXAudioEffectManager interface instead.
2422
997
 
2423
- In the new interface, background music and sound effects are no longer distinguished and are unified with [startPlayMusic](https://write.woa.com/document/87029952305344512) instead.
998
+ In the new interface, background music and sound effects are no longer distinguished and are unified with startPlayMusic instead.
2424
999
 
2425
1000
  ## onSpeedTest
2426
1001
 
2427
-
2428
-
2429
1002
  #### Callback for server speed test results (deprecated)
2430
1003
 
2431
- @deprecated Starting from the new version, it is recommended to use the [onSpeedTestResult](https://write.woa.com/document/87029920275542016) interface instead.
1004
+ @deprecated Starting from the new version, it is recommended to use the onSpeedTestResult interface instead.