@tencent-rtc/mcp 1.4.7 → 1.6.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 (553) hide show
  1. package/cursor-setting.png +0 -0
  2. package/index.js +0 -1
  3. package/knowledge/bm25-cache.js +73 -0
  4. package/knowledge/bm25.js +147 -0
  5. package/knowledge/build-index.js +69 -0
  6. package/knowledge/chunker.js +167 -0
  7. package/knowledge/content-loader.js +39 -0
  8. package/knowledge/doc-url-resolver.js +142 -0
  9. package/knowledge/extractors.js +25 -0
  10. package/knowledge/path-meta.js +184 -0
  11. package/knowledge/search/exact-lookup.js +497 -0
  12. package/knowledge/search/filter-pool.js +104 -0
  13. package/knowledge/search/product-scope-intent.js +40 -0
  14. package/knowledge/search/requires-framework.js +81 -0
  15. package/knowledge/search/search-knowledge.js +229 -0
  16. package/mcp-server-prompt.png +0 -0
  17. package/package.json +1 -1
  18. package/resource/_schema/feature-aliases.yaml +10 -0
  19. package/resource/_schema/goal-tags.yaml +72 -0
  20. package/resource/_schema/products.yaml +19 -0
  21. package/resource/_schema/trtc-intents.yaml +27 -0
  22. package/resource/_schema/types.yaml +43 -0
  23. package/resource/index/component-slugs.json +1 -0
  24. package/resource/index/doc-source-urls.json +1 -0
  25. package/resource/index/manifest.json +1 -0
  26. package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
  27. package/resource/integration/callkit/preset/flutter/integration.md +346 -0
  28. package/resource/integration/callkit/preset/ios/integration.md +408 -0
  29. package/resource/integration/callkit/preset/react/integration.md +362 -0
  30. package/resource/integration/callkit/preset/vue/integration.md +356 -0
  31. package/resource/integration/chat/preset/android/integration.md +500 -0
  32. package/resource/integration/chat/preset/flutter/integration.md +370 -0
  33. package/resource/integration/chat/preset/ios/integration.md +566 -0
  34. package/resource/integration/chat/preset/react/integration.md +490 -0
  35. package/resource/integration/chat/preset/vue/integration.md +504 -0
  36. package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
  37. package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
  38. package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
  39. package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
  40. package/resource/integration/roomkit/preset/vue/integration.md +562 -0
  41. package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
  42. package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
  43. package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
  44. package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
  45. package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
  46. package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
  47. package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
  48. package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
  49. package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
  50. package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
  51. package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
  52. package/resource/knowledge/callkit/faq/android.md +92 -0
  53. package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
  54. package/resource/knowledge/callkit/faq/error-code.md +67 -0
  55. package/resource/knowledge/callkit/faq/flutter.md +52 -0
  56. package/resource/knowledge/callkit/faq/ios.md +104 -0
  57. package/resource/knowledge/callkit/faq/web.md +74 -0
  58. package/resource/knowledge/callkit/preset/android/api.md +412 -0
  59. package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
  60. package/resource/knowledge/callkit/preset/ios/api.md +234 -0
  61. package/resource/knowledge/callkit/preset/web/api.md +83 -0
  62. package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
  63. package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
  64. package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
  65. package/resource/knowledge/chat/preset/android/features/language.md +136 -0
  66. package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
  67. package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
  68. package/resource/knowledge/chat/preset/android/features/search.md +64 -0
  69. package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
  70. package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
  71. package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
  72. package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
  73. package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
  74. package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
  75. package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
  76. package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
  77. package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
  78. package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
  79. package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
  80. package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
  81. package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
  82. package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
  83. package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
  84. package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
  85. package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
  86. package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
  87. package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
  88. package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
  89. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
  90. package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
  91. package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
  92. package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
  93. package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
  94. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
  95. package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
  96. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
  97. package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
  98. package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
  99. package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
  100. package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
  101. package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
  102. package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
  103. package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
  104. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
  105. package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
  106. package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
  107. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
  108. package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
  109. package/resource/knowledge/chat/urls/error-code.md +17 -0
  110. package/resource/knowledge/chat/urls/product.md +43 -0
  111. package/resource/knowledge/chat/urls/restapi.md +204 -0
  112. package/resource/knowledge/chat/urls/sdk/android.md +80 -0
  113. package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
  114. package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
  115. package/resource/knowledge/chat/urls/sdk/web.md +80 -0
  116. package/resource/knowledge/chat/urls/webhook.md +68 -0
  117. package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
  118. package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
  119. package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
  120. package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
  121. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
  122. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
  123. package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
  124. package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
  125. package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
  126. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
  127. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
  128. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
  129. package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
  130. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
  131. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
  132. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
  133. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
  134. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
  135. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
  136. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
  137. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
  138. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
  139. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
  140. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
  141. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
  142. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
  143. package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
  144. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
  145. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
  146. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
  147. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
  148. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
  149. package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
  150. package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
  151. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
  152. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
  153. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
  154. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
  155. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
  156. package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
  157. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
  158. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
  159. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
  160. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
  161. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
  162. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
  163. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
  164. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
  165. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
  166. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
  167. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
  168. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
  169. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
  170. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
  171. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
  172. package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
  173. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
  174. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
  175. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
  176. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
  177. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
  178. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
  179. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
  180. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
  181. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
  182. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
  183. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
  184. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
  185. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
  186. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
  187. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
  188. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
  189. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
  190. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
  191. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
  192. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
  193. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
  194. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
  195. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
  196. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
  197. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
  198. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
  199. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
  200. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
  201. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
  202. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
  203. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
  204. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
  205. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
  206. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
  207. package/resource/knowledge/livekit/faq/error-code.md +193 -0
  208. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
  209. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
  210. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
  211. package/resource/knowledge/push/config/android.md +92 -0
  212. package/resource/knowledge/push/config/harmonyos.md +83 -0
  213. package/resource/knowledge/push/config/ios.md +254 -0
  214. package/resource/knowledge/push/config/react-native.md +254 -0
  215. package/resource/knowledge/push/config/unity.md +209 -0
  216. package/resource/knowledge/push/config/unreal-engine.md +194 -0
  217. package/resource/knowledge/push/integration/android.md +404 -0
  218. package/resource/knowledge/push/integration/flutter.md +465 -0
  219. package/resource/knowledge/push/integration/harmonyos.md +63 -0
  220. package/resource/knowledge/push/integration/ios.md +246 -0
  221. package/resource/knowledge/push/integration/react-native.md +366 -0
  222. package/resource/knowledge/push/integration/uni-app.md +208 -0
  223. package/resource/knowledge/push/integration/unity.md +389 -0
  224. package/resource/knowledge/push/integration/unreal-engine.md +390 -0
  225. package/resource/knowledge/push/overview/prepare.md +60 -0
  226. package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
  227. package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
  228. package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
  229. package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
  230. package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
  231. package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
  232. package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
  233. package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
  234. package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
  235. package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
  236. package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
  237. package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
  238. package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
  239. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
  240. package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
  241. package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
  242. package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
  243. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
  244. package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
  245. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
  246. package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
  247. package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
  248. package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
  249. package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
  250. package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
  251. package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
  252. package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
  253. package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
  254. package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
  255. package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
  256. package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
  257. package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
  258. package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
  259. package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
  260. package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
  261. package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
  262. package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
  263. package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
  264. package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
  265. package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
  266. package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
  267. package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
  268. package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
  269. package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
  270. package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
  271. package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
  272. package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
  273. package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
  274. package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
  275. package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
  276. package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
  277. package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
  278. package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
  279. package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
  280. package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
  281. package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
  282. package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
  283. package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
  284. package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
  285. package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
  286. package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
  287. package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
  288. package/server-config.js +0 -1
  289. package/server.js +35 -12
  290. package/streamable-http.js +0 -1
  291. package/tools/call/get_native_call_uikit_integration.js +2 -4
  292. package/tools/call/get_native_callkit_core_integration.js +2 -6
  293. package/tools/call/get_web_call_uikit_integration.js +2 -4
  294. package/tools/chat/get_native_chat_uikit_integration.js +2 -4
  295. package/tools/chat/get_web_chat_uikit_integration.js +2 -4
  296. package/tools/common/get_usersig.js +0 -1
  297. package/tools/common/present_framework_choice.js +19 -14
  298. package/tools/common/record_answer.js +19 -26
  299. package/tools/common/record_feedback.js +17 -31
  300. package/tools/common/search_trtc_knowledge.js +44 -0
  301. package/tools/definitions/get_native_call_uikit_integration_def.js +3 -2
  302. package/tools/definitions/get_native_callkit_core_integration_def.js +5 -4
  303. package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -3
  304. package/tools/definitions/get_native_livekit_core_integration_def.js +6 -6
  305. package/tools/definitions/get_usersig_def.js +0 -1
  306. package/tools/definitions/get_web_call_uikit_integration_def.js +4 -3
  307. package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -1
  308. package/tools/definitions/get_web_live_uikit_integration_def.js +5 -6
  309. package/tools/definitions/get_web_room_core_integration_def.js +49 -0
  310. package/tools/definitions/get_web_room_uikit_integration_def.js +5 -5
  311. package/tools/definitions/integration-boundary.js +5 -0
  312. package/tools/definitions/present_framework_choice_def.js +12 -11
  313. package/tools/definitions/record_answer_def.js +19 -18
  314. package/tools/definitions/record_feedback_def.js +14 -14
  315. package/tools/definitions/search_trtc_knowledge_def.js +39 -0
  316. package/tools/index.js +5 -37
  317. package/tools/live/get_native_livekit_core_integration.js +1 -4
  318. package/tools/live/get_web_live_uikit_integration.js +2 -5
  319. package/tools/room/get_web_room_core_integration.js +47 -0
  320. package/tools/room/get_web_room_uikit_integration.js +2 -4
  321. package/utils/generate-structured-result.js +24 -31
  322. package/utils/generate-usersig.js +0 -1
  323. package/utils/get-device-identifier.js +0 -1
  324. package/utils/get-doc-content.js +14 -9
  325. package/utils/http-get.js +0 -1
  326. package/utils/http-post.js +0 -1
  327. package/utils/report-cls-client.js +18 -21
  328. package/utils/report-es-client.js +1 -2
  329. package/index.js.map +0 -1
  330. package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
  331. package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
  332. package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
  333. package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
  334. package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
  335. package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
  336. package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
  337. package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
  338. package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
  339. package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
  340. package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
  341. package/resource/doc/callkit/faq/common/error-code.md +0 -47
  342. package/resource/doc/callkit/faq/flutter-faq.md +0 -115
  343. package/resource/doc/callkit/faq/ios-faq.md +0 -115
  344. package/resource/doc/callkit/faq/web-faq.md +0 -36
  345. package/resource/doc/callkit/preset/android/api.md +0 -296
  346. package/resource/doc/callkit/preset/flutter/api.md +0 -410
  347. package/resource/doc/callkit/preset/flutter/integration.md +0 -164
  348. package/resource/doc/callkit/preset/ios/api.md +0 -80
  349. package/resource/doc/callkit/preset/ios/integration.md +0 -187
  350. package/resource/doc/callkit/preset/react/api.md +0 -501
  351. package/resource/doc/callkit/preset/react/integration.md +0 -86
  352. package/resource/doc/callkit/preset/vue/api.md +0 -501
  353. package/resource/doc/callkit/preset/vue/integration.md +0 -83
  354. package/resource/doc/chatkit/android/faq.md +0 -111
  355. package/resource/doc/chatkit/android/features/theme.md +0 -219
  356. package/resource/doc/chatkit/android/integration.md +0 -490
  357. package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
  358. package/resource/doc/chatkit/faq/common/product.md +0 -7
  359. package/resource/doc/chatkit/faq/common/server.md +0 -44
  360. package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
  361. package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
  362. package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
  363. package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
  364. package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
  365. package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
  366. package/resource/doc/chatkit/flutter/faq.md +0 -23
  367. package/resource/doc/chatkit/flutter/features/theme.md +0 -235
  368. package/resource/doc/chatkit/flutter/integration.md +0 -344
  369. package/resource/doc/chatkit/ios/faq.md +0 -111
  370. package/resource/doc/chatkit/ios/features/theme.md +0 -267
  371. package/resource/doc/chatkit/react/components/avatar.md +0 -104
  372. package/resource/doc/chatkit/react/components/chat-header.md +0 -148
  373. package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
  374. package/resource/doc/chatkit/react/components/chat.md +0 -38
  375. package/resource/doc/chatkit/react/components/component-list.md +0 -37
  376. package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
  377. package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
  378. package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
  379. package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
  380. package/resource/doc/chatkit/react/components/message-list.md +0 -293
  381. package/resource/doc/chatkit/react/components/tuikit.md +0 -34
  382. package/resource/doc/chatkit/react/faq.md +0 -26
  383. package/resource/doc/chatkit/react/integration.md +0 -416
  384. package/resource/doc/chatkit/vue/components/avatar.md +0 -104
  385. package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
  386. package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
  387. package/resource/doc/chatkit/vue/components/chat.md +0 -45
  388. package/resource/doc/chatkit/vue/components/component-list.md +0 -87
  389. package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
  390. package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
  391. package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
  392. package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
  393. package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
  394. package/resource/doc/chatkit/vue/components/message-list.md +0 -433
  395. package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
  396. package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
  397. package/resource/doc/chatkit/vue/faq.md +0 -36
  398. package/resource/doc/chatkit/vue/integration.md +0 -428
  399. package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
  400. package/resource/doc/livekit/faq/common/error-code.md +0 -88
  401. package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
  402. package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
  403. package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
  404. package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
  405. package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
  406. package/resource/doc/roomkit/faq/common/error-code.md +0 -67
  407. package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
  408. package/resource/doc/roomkit/vue/features/device-state.md +0 -460
  409. package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
  410. package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
  411. package/resource/doc/roomkit/vue/features/room-state.md +0 -282
  412. package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
  413. package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
  414. package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
  415. package/resource/doc/roomkit/vue/integration.md +0 -315
  416. package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
  417. package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
  418. package/resource/doc/rtcengine/web/.gitkeep +0 -0
  419. package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
  420. package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
  421. package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
  422. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
  423. package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
  424. package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
  425. package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
  426. package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
  427. package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
  428. package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
  429. package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
  430. package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
  431. package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
  432. package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
  433. package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
  434. package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
  435. package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
  436. package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
  437. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
  438. package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
  439. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
  440. package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
  441. package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
  442. package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
  443. package/server-config.js.map +0 -1
  444. package/server.js.map +0 -1
  445. package/streamable-http.js.map +0 -1
  446. package/tools/call/get_callkit_api.js +0 -33
  447. package/tools/call/get_callkit_api.js.map +0 -1
  448. package/tools/call/get_native_call_uikit_integration.js.map +0 -1
  449. package/tools/call/get_native_callkit_core_integration.js.map +0 -1
  450. package/tools/call/get_web_call_uikit_integration.js.map +0 -1
  451. package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
  452. package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
  453. package/tools/chat/get_native_chat_uikit_integration.js.map +0 -1
  454. package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
  455. package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
  456. package/tools/chat/get_web_chat_uikit_integration.js.map +0 -1
  457. package/tools/common/get_faq.js +0 -266
  458. package/tools/common/get_faq.js.map +0 -1
  459. package/tools/common/get_usersig.js.map +0 -1
  460. package/tools/common/present_framework_choice.js.map +0 -1
  461. package/tools/common/record_answer.js.map +0 -1
  462. package/tools/common/record_feedback.js.map +0 -1
  463. package/tools/common/record_skill_session.js +0 -69
  464. package/tools/common/record_skill_session.js.map +0 -1
  465. package/tools/definitions/get_callkit_api_def.js +0 -29
  466. package/tools/definitions/get_callkit_api_def.js.map +0 -1
  467. package/tools/definitions/get_faq_def.js +0 -47
  468. package/tools/definitions/get_faq_def.js.map +0 -1
  469. package/tools/definitions/get_native_call_uikit_integration_def.js.map +0 -1
  470. package/tools/definitions/get_native_callkit_core_integration_def.js.map +0 -1
  471. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
  472. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
  473. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +0 -1
  474. package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
  475. package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
  476. package/tools/definitions/get_native_livekit_core_integration_def.js.map +0 -1
  477. package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
  478. package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
  479. package/tools/definitions/get_usersig_def.js.map +0 -1
  480. package/tools/definitions/get_web_call_uikit_integration_def.js.map +0 -1
  481. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
  482. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
  483. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +0 -1
  484. package/tools/definitions/get_web_live_uikit_integration_def.js.map +0 -1
  485. package/tools/definitions/get_web_livekit_api_def.js +0 -30
  486. package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
  487. package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
  488. package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
  489. package/tools/definitions/get_web_room_uikit_integration_def.js.map +0 -1
  490. package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
  491. package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
  492. package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
  493. package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
  494. package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
  495. package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
  496. package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
  497. package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
  498. package/tools/definitions/present_framework_choice_def.js.map +0 -1
  499. package/tools/definitions/record_answer_def.js.map +0 -1
  500. package/tools/definitions/record_feedback_def.js.map +0 -1
  501. package/tools/definitions/record_skill_session_def.js +0 -31
  502. package/tools/definitions/record_skill_session_def.js.map +0 -1
  503. package/tools/index.js.map +0 -1
  504. package/tools/live/get_native_livekit_core_features.js +0 -68
  505. package/tools/live/get_native_livekit_core_features.js.map +0 -1
  506. package/tools/live/get_native_livekit_core_integration.js.map +0 -1
  507. package/tools/live/get_web_live_uikit_integration.js.map +0 -1
  508. package/tools/live/get_web_livekit_api.js +0 -33
  509. package/tools/live/get_web_livekit_api.js.map +0 -1
  510. package/tools/live/get_web_livekit_component_detail.js +0 -35
  511. package/tools/live/get_web_livekit_component_detail.js.map +0 -1
  512. package/tools/room/get_web_room_uikit_integration.js.map +0 -1
  513. package/tools/room/get_web_roomkit_feature_detail.js +0 -69
  514. package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
  515. package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
  516. package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
  517. package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
  518. package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
  519. package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
  520. package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
  521. package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
  522. package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
  523. package/utils/build-session-directives.js +0 -120
  524. package/utils/build-session-directives.js.map +0 -1
  525. package/utils/generate-structured-result.js.map +0 -1
  526. package/utils/generate-usersig.js.map +0 -1
  527. package/utils/get-device-identifier.js.map +0 -1
  528. package/utils/get-doc-content.js.map +0 -1
  529. package/utils/handle-framework.js +0 -9
  530. package/utils/handle-framework.js.map +0 -1
  531. package/utils/handle-state-name.js +0 -29
  532. package/utils/handle-state-name.js.map +0 -1
  533. package/utils/http-get.js.map +0 -1
  534. package/utils/http-post.js.map +0 -1
  535. package/utils/report-cls-client.js.map +0 -1
  536. package/utils/report-es-client.js.map +0 -1
  537. package/utils/report-runtime-error-cls-client.js +0 -91
  538. package/utils/report-runtime-error-cls-client.js.map +0 -1
  539. /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
  540. /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
  541. /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
  542. /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
  543. /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
  544. /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
  545. /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
  546. /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
  547. /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
  548. /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
  549. /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
  550. /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
  551. /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
  552. /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
  553. /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
@@ -1,1970 +0,0 @@
1
- # TRTC Real-Time Communication (TRTC SDK) Documentation
2
- ## Overview
3
- `ITRTCCloud.h` is the API reference for TRTC Real-Time Communication (TRTC SDK) on C++. It provides detailed documentation for features including stream publishing, stream playback, stream mixing, and recording.
4
-
5
- ## ITRTCCloud
6
- | Function List | Description |
7
- | --- | --- |
8
- | getTRTCShareInstance | Create a `TRTCCloud` Instance (Singleton Pattern) |
9
- | destroyTRTCShareInstance | Terminate `TRTCCloud` Instance (Singleton Pattern) |
10
- | addCallback | Add TRTC Event Callback |
11
- | removeCallback | Remove TRTC Event Callback |
12
- | enterRoom | Enter Room |
13
- | exitRoom | Leave Room |
14
- | switchRole | Switch Role |
15
- | switchRole | Switch Role (Supports Setting Permission Bit) |
16
- | switchRoom | Switch Room |
17
- | connectOtherRoom | Request Cross-room Communication |
18
- | disconnectOtherRoom | Exit Cross-room Communication |
19
- | setDefaultStreamRecvMode | Set Subscription Mode (Needs to be set before entering the room to take effect) |
20
- | createSubCloud | Create Sub-room Instances (For Multi-room Concurrent Viewing) |
21
- | destroySubCloud | Terminate Sub-room Instances |
22
- | updateOtherRoomForwardMode | Modify the uplink capability of cross-room broadcasters in this room |
23
- | startPublishMediaStream | Start publishing media stream |
24
- | updatePublishMediaStream | Update the published media stream. |
25
- | stopPublishMediaStream | Stop publishing media stream. |
26
- | startLocalPreview | Enable the preview screen of the local camera (Mobile Terminal) |
27
- | startLocalPreview | Enable the preview screen of the local camera (Desktop Terminal) |
28
- | updateLocalView | Update the preview screen of the local camera |
29
- | stopLocalPreview | Stop camera preview |
30
- | muteLocalVideo | Suspend/Resume publishing local video stream |
31
- | setVideoMuteImage | Set the alternative image during the suspension of the local screen |
32
- | startRemoteView | Subscribe to the video stream of a remote user and bind the video rendering control |
33
- | updateRemoteView | Update the video rendering control of a remote user |
34
- | stopRemoteView | Unsubscribe from the remote user's video stream and release the rendering control |
35
- | stopAllRemoteView | Unsubscribe from all remote users' video streams and release all rendering resources |
36
- | muteRemoteVideoStream | Suspend/Resume subscription of the remote user's video stream |
37
- | muteAllRemoteVideoStreams | Suspend/Resume subscription of all remote users' video streams |
38
- | setVideoEncoderParam | Set encoding parameters for the video encoder |
39
- | setNetworkQosParam | Set network quality control parameters |
40
- | setLocalRenderParams | Set rendering parameters for the local screen |
41
- | setRemoteRenderParams | Set rendering mode for the remote screen |
42
- | enableSmallVideoStream | Enable picture-in-picture dual-stream encoding mode |
43
- | setRemoteVideoStreamType | Switch picture-in-picture for the specified remote user |
44
- | snapshotVideo | Take a video screenshot |
45
- | setGravitySensorAdaptiveMode | Set gravity sensing adaptive mode (11.7 and above) |
46
- | startLocalAudio | Enable collection and publishing of local audio |
47
- | stopLocalAudio | Stop collection and publishing of local audio |
48
- | muteLocalAudio | Pause/Resume publishing of the local audio stream |
49
- | muteRemoteAudio | Pause/Resume playing of the remote audio stream |
50
- | muteAllRemoteAudio | Pause/Resume playing of all remote users' audio streams |
51
- | setRemoteAudioVolume | Set the playback volume for a specific remote user |
52
- | setAudioCaptureVolume | Sets the local audio capture volume. |
53
- | getAudioCaptureVolume | Obtains the local audio capture volume. |
54
- | setAudioPlayoutVolume | Sets the remote audio playback volume. |
55
- | getAudioPlayoutVolume | Obtains the remote audio playback volume. |
56
- | enableAudioVolumeEvaluation | Enable volume reminder |
57
- | startAudioRecording | Start recording |
58
- | stopAudioRecording | Stop recording |
59
- | startLocalRecording | Enable local media recording |
60
- | stopLocalRecording | Stop local media recording |
61
- | setRemoteAudioParallelParams | Set intelligent concurrent playback strategy for remote audio streams |
62
- | enable3DSpatialAudioEffect | Enable 3D audio |
63
- | updateSelf3DSpatialPosition | Set self coordinates and orientation information in 3D audio |
64
- | updateRemote3DSpatialPosition | Set remote user coordinate information in 3D audio |
65
- | set3DSpatialReceivingRange | Set the receivable range of sounds emitted by a specified user |
66
- | getDeviceManager | Get Device Management Class (TXDeviceManager) |
67
- | setBeautyStyle | Set special effects like beauty filter, whitening, and rosy skin |
68
- | setWaterMark | Watermarking |
69
- | getAudioEffectManager | Get Audio Effect Management Class (TXAudioEffectManager) |
70
- | startSystemAudioLoopback | Enable System Sound Capture (iOS not yet supported) |
71
- | stopSystemAudioLoopback | Stop System Sound Capture (iOS not yet supported) |
72
- | setSystemAudioLoopbackVolume | Sets the Volume of System Sound Capture |
73
- | startScreenCapture | Start Screen Sharing |
74
- | stopScreenCapture | Stopping Screen Sharing |
75
- | pauseScreenCapture | Pause Screen Sharing |
76
- | resumeScreenCapture | Resume Screen Sharing |
77
- | getScreenCaptureSources | Enumerate shareable screens and windows (this interface supports only desktop systems) |
78
- | selectScreenCaptureTarget | Select the screen or window to share (this interface supports only desktop systems) |
79
- | setSubStreamEncoderParam | Set Video Encoding Parameters for Screen Sharing (Sub-Stream) (Supported on Both Desktop and Mobile Systems) |
80
- | setSubStreamMixVolume | Set the Mixing Volume for Screen Sharing (This Interface Supports Only Desktop Systems) |
81
- | addExcludedShareWindow | Add the Specified Window to the Exclusion List of Screen Sharing (This Interface Supports Only Desktop Systems) |
82
- | removeExcludedShareWindow | Remove the Specified Window from the Exclusion List of Screen Sharing (This Interface Supports Only Desktop Systems) |
83
- | removeAllExcludedShareWindow | Remove All Windows from the Exclusion List of Screen Sharing (This Interface Supports Only Desktop Systems) |
84
- | addIncludedShareWindow | Add the Specified Window to the Contains List of Screen Sharing (This Interface Supports Only Desktop Systems) |
85
- | removeIncludedShareWindow | Remove the Specified Window from the Contains List of Screen Sharing (This Interface Supports Only Desktop Systems) |
86
- | removeAllIncludedShareWindow | Remove All Windows from the Contains List of Screen Sharing (This Interface Supports Only Desktop Systems) |
87
- | enableCustomVideoCapture | Enable/Disable Custom Video Capturing Mode |
88
- | sendCustomVideoData | Submit Self-collected Video Frames to the SDK |
89
- | enableCustomAudioCapture | Enable Custom Audio Capturing Mode |
90
- | sendCustomAudioData | Submit Self-collected Audio Data to the SDK |
91
- | enableMixExternalAudioFrame | Enable/Disable Custom Audio Track |
92
- | mixExternalAudioFrame | Mix Custom Audio Track into the SDK |
93
- | setMixExternalAudioVolume | Set the Streaming Volume and Playback Volume for External Audio Mixed During Streaming |
94
- | generateCustomPTS | Generate Timestamp for Custom Capturing |
95
- | enableLocalVideoCustomProcess | .1 Enable third-party beauty filter for video |
96
- | setLocalVideoCustomProcessCallback | .2 Set video data callback for third-party beauty filter |
97
- | setLocalVideoRenderCallback | Set Local Video Custom Rendering Callback |
98
- | setRemoteVideoRenderCallback | Sets the rendering callback for remote video self-definition |
99
- | setAudioFrameCallback | Sets the audio data self-definition callback |
100
- | setCapturedAudioFrameCallbackFormat | Sets the callback format for audio frames captured by the local microphone |
101
- | setLocalProcessedAudioFrameCallbackFormat | Sets the callback format for local audio frames after preprocessing |
102
- | setMixedPlayAudioFrameCallbackFormat | Sets the callback format for audio frames that will eventually be played by the system |
103
- | enableCustomAudioRendering | Enable self-definition audio playback |
104
- | getCustomAudioRenderingFrame | Get playable audio data |
105
- | sendCustomCmdMsg | Sends a custom message using UDP channel to all users in a room |
106
- | sendSEIMsg | Sends a custom message using SEI channel to all users in a room |
107
- | startSpeedTest | Start internet speed test (use before entering the room) |
108
- | stopSpeedTest | Stops network speed testing |
109
- | getSDKVersion | Obtains the SDK version. |
110
- | setLogLevel | Sets the log output level. |
111
- | setConsoleEnabled | Enables/Disables console log print. |
112
- | setLogCompressEnabled | Enables/Disables local log compression |
113
- | setLogDirPath | Sets the save path for local logs |
114
- | setLogCallback | Log callback |
115
- | showDebugView | Show Dashboard |
116
- | callExperimentalAPI | Calls an experimental API. |
117
- | enablePayloadPrivateEncryption | Enable or disable media stream private encryption |
118
-
119
- ## getTRTCShareInstance
120
-
121
- #### Create a `TRTCCloud` Instance (Singleton Pattern)
122
- | Parameters | Description |
123
- | --- | --- |
124
- | context | Only applies to the Android platform. The SDK internally converts it to the Android platform's ApplicationContext to call Android System API.<br>If the passed context parameter is NULL, the SDK will automatically obtain the current process's ApplicationContext. |
125
-
126
- > **Note**
127
- >
128
-
129
- > 1. Using delete ITRTCCloud* will cause compilation errors. Please use destroyTRTCCloud to release the object pointer.
130
- >
131
-
132
- > 2. On Windows, Mac, and iOS platforms, please call the getTRTCShareInstance() interface.
133
- >
134
-
135
- > 3. On the Android platform, please call the getTRTCShareInstance(void *context) interface.
136
- >
137
-
138
- ## destroyTRTCShareInstance
139
-
140
- #### Terminate `TRTCCloud` Instance (Singleton Pattern)
141
-
142
- ## addCallback
143
-
144
- #### Add TRTC Event Callback
145
-
146
- You can obtain various event notifications from the SDK through ITRTCCloudCallback (e.g., Error Code, Warning Code, Audio and Video Status Parameters, etc.).
147
-
148
- ## removeCallback
149
-
150
- #### Remove TRTC Event Callback
151
-
152
- ## enterRoom
153
-
154
- #### Enter Room
155
-
156
- All TRTC users must enter a room to "publish" or "subscribe" to audio and video streams. "Publish" means pushing your audio and video to the cloud, and "subscribe" means pulling audio and video streams from other users in the room from the cloud.
157
-
158
- To call this interface, you need to specify your application scenario TRTCAppScene for the best audio and video transmission experience. These scenarios can be divided into two major categories:
159
-
160
- **Real-time Call:**
161
-
162
- Includes TRTCAppSceneVideoCall and TRTCAppSceneAudioCall as two options: video call and audio call. This mode is suitable for 1-on-1 audio and video calls or online meetings with up to 300 participants.
163
-
164
- **Online Live Streaming:**
165
-
166
- Includes TRTCAppSceneLIVE and TRTCAppSceneVoiceChatRoom as two options: video live streaming and voice live streaming. This mode is suitable for online live streaming scenarios with up to 100,000 participants. However, you need to specify the **role** field in the TRTCParams parameter introduced later, distinguishing users in the room into two different roles: **Anchor** (TRTCRoleAnchor) and **Audience** (TRTCRoleAudience).
167
-
168
- After calling this interface, you will receive the onEnterRoom(result) callback from ITRTCCloudCallback:
169
- - If entering the room is successful, the result parameter will be a positive number (result > 0), indicating the time taken from the function call to entering the room, in milliseconds (ms).
170
-
171
- - If entering the room fails, the result parameter will be a negative number (result < 0), indicating the failure [Error Code](https://cloud.tencent.com/document/product/647/32257).
172
-
173
- | Parameters | Description |
174
- | --- | --- |
175
- | param | Room entry parameters are used to specify the user's identity, role, and security token information. For details, please refer to TRTCParams. |
176
- | scene | Application scenario parameters are used to specify your business scenario. All users in the same room need to set the same TRTCAppScene. |
177
-
178
- > **Note**
179
- >
180
-
181
- > 1. All users in the same room need to set the same scene. Different scenes can occasionally lead to anomalies.
182
- >
183
-
184
- > 2. When you set the parameter scene to TRTCAppSceneLIVE or TRTCAppSceneVoiceChatRoom, you must use the "role" field in TRTCParams to set the role of the current user in the room.
185
- >
186
-
187
- > 3. Please ensure that enterRoom and exitRoom are paired before and after use, i.e., ensure "exit the previous room before entering the next room," otherwise, many anomalies may occur.
188
- >
189
-
190
- ## exitRoom
191
-
192
- #### Leave Room
193
-
194
- Calling this interface will make the user leave the audio and video room they are in and release resources such as the camera, microphone, and speaker.
195
-
196
- After the resources are fully released, the SDK will notify you via the ITRTCCloudCallback in the onExitRoom callback.
197
-
198
- If you want to call enterRoom again or switch to another provider's SDK, it is recommended to wait for the onExitRoom callback before performing subsequent operations to avoid camera or microphone occupation issues.
199
-
200
- ## switchRole
201
-
202
- #### Switch Role
203
-
204
- This interface allows users to switch between the roles of `Anchor` and `Audience`.
205
-
206
- Since video streaming and voice chat rooms need to support up to 100,000 viewers simultaneously, the rule is set that **only anchors can publish their audio and video**. Therefore, if some audience members wish to publish their audio and video streams (to interact with the anchors), they need to switch their role to **Anchor** first.
207
-
208
- When entering a room, you can predefine the user's role using the role field in TRTCParams, or dynamically switch roles after entering the room using the switchRole interface.
209
- | Parameters | Description |
210
- | --- | --- |
211
- | role | Role, defaults to **Anchor**.<br>- TRTCRoleAnchor: Anchor, can publish their own audio and video. A maximum of 50 anchors can simultaneously publish audio and video in the same room.<br>- TRTCRoleAudience: Audience, cannot publish their own audio and video streams, can only view audio and video of other anchors in the room. To publish their own audio and video, they need to switch to **Anchor** via the switchRole interface. A maximum of 100,000 audience members can be accommodated in the same room. |
212
-
213
- > **Note**
214
- >
215
-
216
- > 1. This interface is only applicable to video live streaming (TRTCAppSceneLIVE) and voice chat room (TRTCAppSceneVoiceChatRoom) scenarios.
217
- >
218
-
219
- > 2. If the scene specified in enterRoom is TRTCAppSceneVideoCall or TRTCAppSceneAudioCall, do not call this interface.
220
- >
221
-
222
- ## switchRole
223
-
224
- #### Switch Role (Supports Setting Permission Bit)
225
-
226
- This interface allows users to switch between the roles of `Anchor` and `Audience`.
227
-
228
- Due to video live streaming and voice chat rooms needing to support up to 100,000 viewers simultaneously, a rule has been established that "only the host can publish their own audio and video".
229
-
230
- Therefore, when some viewers wish to publish their own audio and video streams (in order to interact with the host), they need to first switch their role to "host".
231
-
232
- When entering a room, you can predefine the user's role using the role field in TRTCParams, or dynamically switch roles after entering the room using the switchRole interface.
233
- | Parameters | Description |
234
- | --- | --- |
235
- | privateMapKey | Permission tickets are used for permission control. When you want to restrict a specific room to allow only specific userIds to enter or upload videos, you need to use privateMapKey for permission protection.<br>- It is recommended only for customers with high-level security requirements. For more details, please refer to [Enabling Advanced Permission Control](https://cloud.tencent.com/document/product/647/32240). |
236
- | role | Role, defaults to "Anchor":<br>- TRTCRoleAnchor: Anchor, can publish their own audio and video. A maximum of 50 anchors can simultaneously publish audio and video in the same room.<br>- TRTCRoleAudience: Audience cannot publish their own audio and video streams and can only watch other anchors' audio and video in the room. If you want to publish your own audio and video, you need to switch to "Anchor" through switchRole. A maximum of 100,000 audience members can be accommodated in the same room. |
237
-
238
- > **Note**
239
- >
240
-
241
- > 1. This interface is only applicable to video live streaming (TRTCAppSceneLIVE) and voice chat room (TRTCAppSceneVoiceChatRoom) scenarios.
242
- >
243
-
244
- > 2. If the scene specified in enterRoom is TRTCAppSceneVideoCall or TRTCAppSceneAudioCall, do not call this interface.
245
- >
246
-
247
- ## switchRoom
248
-
249
- #### Switch Room
250
-
251
- This interface allows users to quickly switch from one room to another.
252
- - If the user's role is "Audience", the effect of calling this interface is equivalent to exitRoom (current room) + enterRoom (new room).
253
-
254
- - If the user's role is "Anchor", this interface will maintain the user's audio and video publishing status while switching rooms. As a result, the preview of the camera and the collection of sound will not be interrupted during the room switching process.
255
-
256
- This interface is suitable for scenarios in online education where supervising teachers need to switch quickly between multiple rooms. In this scenario, using switchRoom can achieve better smoothness and less code volume compared to using exitRoom + enterRoom.
257
-
258
- The result of the interface call will be notified to you through the onSwitchRoom(errCode, errMsg) callback in ITRTCCloudCallback.
259
- | Parameters | Description |
260
- | --- | --- |
261
- | config | For room parameters, please refer to TRTCSwitchRoomConfig. |
262
-
263
- > **Note**
264
- >
265
-
266
- > Due to the need for compatibility with older SDK versions, the config parameters contain both roomId and strRoomId. The specifications for filling these parameters are particularly important, so please take note of the following:
267
- >
268
-
269
- > 1. If you choose strRoomId, then roomId needs to be set to 0. If both are filled, roomId will be selected by default.
270
- >
271
-
272
- > 2. All rooms must either use strRoomId or roomId consistently. Mixing both will result in unexpected bugs.
273
- >
274
-
275
- ## connectOtherRoom
276
-
277
- #### Request Cross-room Communication
278
-
279
- By default, only users within the same room can make audio and video calls. Audio and video streams in different rooms are isolated.
280
-
281
- However, you can use this interface to publish the audio and video streams of a host in another room to your own room. At the same time, this interface will also publish your own audio and video streams to the target host's room.
282
-
283
- In other words, you can use this interface to enable cross-room audio and video stream sharing between hosts in two different rooms, allowing audiences in each room to watch the audio and video streams of both hosts. This feature can be used to implement a PK feature between hosts.
284
-
285
- The result of the cross-room call request will be notified to you via the ITRTCCloudCallback in the onConnectOtherRoom callback.
286
-
287
- For example, when Host A in room "101" establishes a cross-room call with Host B in room "102" using connectOtherRoom(),
288
- - All users in room "101" will receive the two event callbacks onRemoteUserEnterRoom(B) and onUserVideoAvailable(B,true) for host B, meaning all users in room "101" can subscribe to host B's audio and video.
289
-
290
- - Users in room "102" will receive the onRemoteUserEnterRoom(A) and onUserVideoAvailable(A,true) event callbacks for Anchor A. This means users in room "102" can subscribe to Anchor A's audio and video.
291
-
292
- To consider compatibility issues with subsequent extension fields, the parameters for cross-room communication temporarily use JSON format:
293
-
294
- **Case 1: Numeric Room Number**
295
-
296
- If Host A in room '101' wants to connect with Host B in room '102', Host A needs to pass in the following when calling the interface: {"roomId": 102, "userId": "userB"}
297
-
298
- Below is the sample code:
299
- ``` cpp
300
- Json::Value jsonObj;
301
- jsonObj["roomId"] = 102;
302
- jsonObj["userId"] = "userB";
303
- Json::FastWriter writer;
304
- std::string params = writer.write(jsonObj);
305
- trtc.ConnectOtherRoom(params.c_str());
306
- ```
307
-
308
- **Case 2: String Room Number**
309
-
310
- If you are using a string room number, be sure to replace "roomId" in the JSON with "strRoomId": {"strRoomId": "102", "userId": "userB"}
311
-
312
- Below is the sample code:
313
- ``` cpp
314
- Json::Value jsonObj;
315
- jsonObj["strRoomId"] = "102";
316
- jsonObj["userId"] = "userB";
317
- Json::FastWriter writer;
318
- std::string params = writer.write(jsonObj);
319
- trtc.ConnectOtherRoom(params.c_str());
320
- ```
321
- | Parameters | Description |
322
- | --- | --- |
323
- | param | You need to pass in a JSON-formatted string argument, where roomId represents the room number in numeric format, strRoomId represents the room number in string format, and userId represents the target broadcaster's user ID. |
324
-
325
- ## disconnectOtherRoom
326
-
327
- #### Exit Cross-room Communication
328
-
329
- The exit result will be notified to you via the ITRTCCloudCallback in the onDisconnectOtherRoom callback.
330
-
331
- ## setDefaultStreamRecvMode
332
-
333
- #### Set Subscription Mode (Needs to be set before entering the room to take effect)
334
-
335
- You can switch between "auto-subscribe" and "manual subscribe" modes via this interface:
336
- - Automatic Subscription: Default mode where users receive audio and video streams from the room immediately after entering. Audio plays automatically and video starts decoding automatically (you still need to bind the rendering control through the startRemoteView interface).
337
-
338
- - Manual subscription: After the user enters the room, they need to manually call the startRemoteView interface to start the subscription and decoding of the video stream. They need to manually call the muteRemoteAudio(false) interface to start the playback of the sound.
339
-
340
- In most scenarios, users entering a room will subscribe to all the audio and video streams from the broadcasters within that room. Therefore, TRTC defaults to an automatic subscription mode to achieve the best "instant start experience".
341
-
342
- If your application scenario involves many audio and video streams being published in each room and each user only wants to selectively subscribe to 1-2 of them, it is recommended to use the "manual subscription" mode to save on bandwidth costs.
343
- | Parameters | Description |
344
- | --- | --- |
345
- | autoRecvAudio | true: Automatically subscribe to audio; false: You need to manually call muteRemoteAudio(false) to subscribe to audio. Default value: true. |
346
- | autoRecvVideo | true: Automatically subscribe to video; false: You need to manually call startRemoteView to subscribe to video. Default value: true. |
347
-
348
- > **Note**
349
- >
350
-
351
- > 1. This setting needs to be called before entering the room to take effect.
352
- >
353
-
354
- > 2. In automatic subscription mode, if the user does not call startRemoteView to subscribe to the video stream after entering the room, the SDK will automatically stop subscribing to the video stream to save traffic.
355
- >
356
-
357
- ## createSubCloud
358
-
359
- #### Create Sub-room Instances (For Multi-room Concurrent Viewing)
360
-
361
- TRTCCloud was initially designed as a Singleton Pattern, limiting the ability to watch multiple rooms concurrently.
362
-
363
- By calling this interface, you can create multiple TRTCCloud instances to watch audio and video streams from multiple rooms simultaneously.
364
-
365
- However, please note that the ability to publish audio and video streams across multiple TRTCCloud instances is subject to certain restrictions.
366
-
367
- This feature is primarily used in a business scenario called "super small class" in online education settings, aimed at addressing the limitation that "each TRTC room can only have up to 50 people broadcasting their audio and video streams simultaneously".
368
-
369
- Below is the sample code:
370
- ``` cpp
371
- //In the small room that needs interaction, enter the room as an anchor and push audio and video streams
372
- ITRTCCloud *mainCloud = getTRTCShareInstance();
373
- TRTCParams mainParams;
374
- //Fill your params
375
- mainParams.role = TRTCRoleAnchor;
376
- mainCloud->enterRoom(mainParams, TRTCAppSceneLIVE);
377
- //...
378
- mainCloud->startLocalAudio(TRTCAudioQualityDefault);
379
- mainCloud->startLocalPreview(renderView);
380
-
381
- //In the large room that only needs to watch, enter the room as an audience and pull audio and video streams
382
- ITRTCCloud *subCloud = mainCloud->createSubCloud();
383
- TRTCParams subParams;
384
- //Fill your params
385
- subParams.role = TRTCRoleAudience;
386
- subCloud->enterRoom(subParams, TRTCAppSceneLIVE);
387
- //...
388
- subCloud->startRemoteView(userId, TRTCVideoStreamTypeBig, renderView);
389
- //...
390
- //Exit from new room and release it.
391
- subCloud->exitRoom();
392
- mainCloud->destroySubCloud(subCloud);
393
- ```
394
-
395
- > **Note**
396
- >
397
- > - The same user can enter multiple rooms with different roomIds using the same userId.
398
- > - Two different terminal devices cannot use the same userId to enter the same roomId simultaneously.
399
- > - You can set ITRTCCloudCallback for different instances to get their respective event notifications.
400
- > - The same user can stream on multiple TRTCCloud instances and call interfaces related to local audio and video in sub-instances. However, please note:
401
- > - The audio for multiple instances must be either microphone capture or custom data collection, and invoking interfaces related to audio devices will be based on the last call
402
- > - Calls related to the camera will take the last one as definitive: startLocalPreview.
403
-
404
- #### Return value description:
405
-
406
- Sub TRTCCloud instances
407
-
408
- ## destroySubCloud
409
-
410
- #### Terminate Sub-room Instances
411
- | Parameters | Description |
412
- | --- | --- |
413
- | subCloud | Sub-room instances |
414
-
415
- ## updateOtherRoomForwardMode
416
-
417
- #### Modify the uplink capability of cross-room broadcasters in this room
418
-
419
- Usually, after calling the connectOtherRoom interface to conduct cross-room communication with another room's broadcaster, all viewers in this room will receive the audio and video stream published by that broadcaster.
420
-
421
- You can call this interface to restrict the uplink capability of a cross-room broadcaster in this room, either forbidding or allowing them to publish audio/main video/auxiliary video. This action will affect all users in the room.
422
-
423
- After disabling certain uplink capabilities of the cross-room broadcaster, all users in this room will not be able to receive the corresponding audio and video streams, nor will they be able to subscribe to them.
424
-
425
- It should be noted that this interface can only be called by the broadcaster conducting cross-room communication, and the restrictions set through this interface will reset if the cross-room communication is interrupted or the corresponding broadcaster exits the room.
426
-
427
- The result of calling this interface will be notified to you via the ITRTCCloudCallback in the onUpdateOtherRoomForwardMode callback.
428
-
429
- For example:
430
-
431
- In room "101", there is Host A and Audience B, while in room "102", there is Host C, who is normally publishing audio and video streams. Host A establishes a cross-room call with Host C using connectOtherRoom().
432
- - At this time, both Anchor A and Viewer B will receive the onRemoteUserEnterRoom(C), onUserVideoAvailable(C,true), and onUserAudioAvailable(C,true) event callbacks for Anchor C and can subscribe to Anchor C's audio and video.
433
-
434
- Later, Host A calls this interface to disable Host C's ability to publish audio in the current room.
435
- - After that, Anchor C's audio stream cannot be published to room "101." Anchor A and Viewer B will receive the onUserAudioAvailable(C,false) event callback and can no longer subscribe to Anchor C's audio through muteRemoteAudio(C,false).
436
-
437
- - Host C's video stream will not be affected. Other audience members in room "102" are also unaffected and can normally subscribe to Host C's audio.
438
-
439
- To consider compatibility issues with subsequent extension fields, the parameters for this interface temporarily use JSON format. The example is as follows:
440
-
441
- **Case 1: Numeric Room Number**
442
- ``` cpp
443
- {
444
- "roomId":102,
445
- "userId":"userC",
446
- "muteAudio":false,
447
- "muteVideo":true,
448
- "muteSubStream":false
449
- }
450
- ```
451
-
452
- **Case 2: String Room Number**
453
- ``` cpp
454
- {
455
- "strRoomId":"102",
456
- "userId":"userC",
457
- "muteAudio":false,
458
- "muteVideo":true,
459
- "muteSubStream":false
460
- }
461
- ```
462
- | Parameters | Description |
463
- | --- | --- |
464
- | param | You need to pass in a JSON-formatted string argument where roomId represents the room number in numeric format, strRoomId represents the room number in string format, userId represents the target broadcaster's user ID. The options muteAudio, muteVideo, and muteSubStream denote whether to disable or allow the cross-room broadcaster to publish audio, main stream video, and sub-stream video respectively. |
465
-
466
- ## startPublishMediaStream
467
-
468
- #### Start publishing media stream
469
-
470
- This interface sends an instruction to the TRTC server to relay/transcode the current user's audio and video streams to the Live CDN or push them back into the TRTC room. You can specify the publishing mode through TRTCPublishTarget configuration and TRTCPublishMode
471
- | Parameters | Description |
472
- | --- | --- |
473
- | config | Media stream transcoding configuration parameters. Refer to TRTCStreamMixingConfig for detailed configuration. This is required when transcoding and pushing back to the TRTC room. You need to specify your desired transcoding configuration parameters. It is invalid in relay mode. |
474
- | params | Media stream encoding output parameters. Refer to TRTCStreamEncoderParam for detailed configuration. This is required when transcoding and pushing back to the TRTC room. You need to specify your desired transcoding output parameters. For better relay stability and CDN compatibility, it is also recommended to configure this during relay. |
475
- | target | The target address for media stream publishing. Refer to TRTCPublishTarget for detailed configuration. Supports relay/transcoding to Tencent or third-party CDNs, and also supports transcoding pushback to the TRTC room. |
476
-
477
- > **Note**
478
- >
479
-
480
- > 1. The SDK will provide the task identifier (taskId) for the backend startup through the callback onStartPublishMediaStream.
481
- >
482
-
483
- > 2. The same task (both TRTCPublishMode and TRTCPublishCdnUrl are identical) can only be started once. If you need to update or stop this task later, you must record and use the returned taskId to operate through updatePublishMediaStream or stopPublishMediaStream.
484
- >
485
-
486
- > 3. The target supports configuring multiple CDN URLs simultaneously (up to 10). If the same relay/transcoding task needs to be published to multiple CDNs, you only need to configure multiple CDN URLs in the target. Even if there are multiple relay addresses for the same transcoding task, only one transcoding fee will be charged.
487
- >
488
-
489
- > 4. When using, do not push multiple tasks to the same URL addresses simultaneously to avoid abnormal streaming status. A recommended scheme is to use "sdkappid_roomid_userid_main" in the URL as a distinguishing identifier. This naming convention is easy to recognize and will not cause conflicts in your multiple applications.
490
- >
491
-
492
- ## updatePublishMediaStream
493
-
494
- #### Update the published media stream.
495
-
496
- This interface will send directives to the TRTC server to update the media stream started by startPublishMediaStream
497
- | Parameters | Description |
498
- | --- | --- |
499
- | config | Media stream transcoding configuration parameters. Refer to TRTCStreamMixingConfig for detailed configuration. This is required when transcoding and pushing back to the TRTC room. You need to specify your desired transcoding configuration parameters. It is invalid in relay mode. |
500
- | params | Media stream encoding output parameters. Refer to TRTCStreamEncoderParam for detailed configuration. This is required when transcoding and pushing back to the TRTC room. You need to specify your desired transcoding output parameters. For better relay stability and CDN compatibility, it is also recommended to configure this during relay. |
501
- | target | The target address for media stream publishing. Refer to TRTCPublishTarget for detailed configuration. Supports relay/transcoding to Tencent or third-party CDNs, and also supports transcoding pushback to the TRTC room. |
502
- | taskId | It will provide you with the task identifier (i.e., taskId) for the background start task through the onStartPublishMediaStream callback |
503
-
504
- > **Note**
505
- >
506
-
507
- > 1. You can use this interface to update the published CDN URL (supports add and delete, up to 10 at the same time), but ensure you do not push multiple tasks to the same URL addresses simultaneously to avoid abnormal streaming status.
508
- >
509
-
510
- > 2. You can update or adjust relay/transcoding tasks using taskId. For example, in PK business, you can initiate relay through startPublishMediaStream first, then use taskId and this interface to update the relay to a transcoding task when the anchor initiates PK. At this time, CDN playback will be continuous and without stream disconnection (you need to keep the media stream encoding output parameters consistent).
511
- >
512
-
513
- > 3. The same task does not support switching between Audio Only, Audio and Video, and Pure Video.
514
- >
515
-
516
- ## stopPublishMediaStream
517
-
518
- #### Stop publishing media stream.
519
-
520
- This interface will send directives to the TRTC server to stop the media stream started by startPublishMediaStream
521
- | Parameters | Description |
522
- | --- | --- |
523
- | taskId | It will provide you with the task identifier (i.e., taskId) for the background start task through the onStartPublishMediaStream callback |
524
-
525
- > **Note**
526
- >
527
-
528
- > 1. If your business backend has not saved the taskId, after your host re-enters the room following an abnormal exit, you can call startPublishMediaStream again to start the task. TRTC backend will return a task start failure and provide you with the taskId from the last attempt
529
- >
530
-
531
- > 2. If the taskId is an empty string, all media streams started by startPublishMediaStream for that user will stop. If you have only started one media stream or want to stop all media streams you started, this method is recommended.
532
- >
533
-
534
- ## startLocalPreview
535
-
536
- #### Enable the preview screen of the local camera (Mobile Terminal)
537
-
538
- Call this function before enterRoom. The SDK will only enable the camera and wait until you call enterRoom to start streaming.
539
-
540
- After calling this function after enterRoom, the SDK will enable the Camera and automatically start Video Push Streaming. When the first frame of the camera image starts to render, you will receive the onCameraDidReady callback notification from ITRTCCloudCallback.
541
- | Parameters | Description |
542
- | --- | --- |
543
- | frontCamera | true: Front-facing camera; false: Rear-facing camera. |
544
- | view | Control carrying the video screen. |
545
-
546
- > **Note**
547
- >
548
-
549
- > If you wish to preview the camera screen and use BeautyManager to adjust the beauty parameters before streaming, you can:
550
- >
551
- > - Option 1: Call startLocalPreview before enterRoom.
552
- > - Option 2: Call startLocalPreview + muteLocalVideo(true) after enterRoom.
553
-
554
- ## startLocalPreview
555
-
556
- #### Enable the preview screen of the local camera (Desktop Terminal)
557
-
558
- Before calling this interface, you can call setCurrentCameraDevice to choose between the Mac's built-in camera or an external camera.
559
-
560
- Call this function before enterRoom. The SDK will only enable the camera and wait until you call enterRoom to start streaming.
561
-
562
- Call this function after enterRoom. The SDK will enable the camera and automatically begin video streaming.
563
-
564
- When the first frame of the camera image starts to render, you will receive the onCameraDidReady callback notification from TRTCCloudDelegate.
565
- | Parameters | Description |
566
- | --- | --- |
567
- | view | Control carrying the video screen. |
568
-
569
- > **Note**
570
- >
571
-
572
- > If you wish to preview the camera screen and use BeautyManager to adjust the beauty parameters before streaming, you can:
573
- >
574
- > - Option 1: Call startLocalPreview before enterRoom.
575
- > - Option 2: Call startLocalPreview + muteLocalVideo(true) after enterRoom.
576
-
577
- ## updateLocalView
578
-
579
- #### Update the preview screen of the local camera
580
-
581
- ## stopLocalPreview
582
-
583
- #### Stop camera preview
584
-
585
- ## muteLocalVideo
586
-
587
- #### Suspend/Resume publishing local video stream
588
-
589
- This interface can suspend (or recover) the publishing of local video screens. After suspension, other users in the same room will not be able to see your screen.
590
-
591
- This interface is equivalent to start/stopLocalPreview when specifying TRTCVideoStreamTypeBig, but has better response speed.
592
-
593
- Because start/stopLocalPreview requires turning on and off the camera, and turning on and off the camera is a hardware-related operation, which is very time-consuming.
594
-
595
- In comparison, muteLocalVideo only needs to suspend or pass the data stream at the software layer. Therefore, it is more efficient and more suitable for scenarios requiring frequent openings and closings.
596
-
597
- When suspending/recovering the publishing of the specified TRTCVideoStreamTypeBig, other users in the same room will receive the onUserVideoAvailable callback notification.
598
-
599
- When suspending/recovering the publishing of the specified TRTCVideoStreamTypeSub, other users in the same room will receive the onUserSubStreamAvailable callback notification.
600
- | Parameters | Description |
601
- | --- | --- |
602
- | mute | true: pause; false: resume. |
603
- | streamType | The video stream type to be suspended/recovered (only supports TRTCVideoStreamTypeBig and TRTCVideoStreamTypeSub). |
604
-
605
- ## setVideoMuteImage
606
-
607
- #### Set the alternative image during the suspension of the local screen
608
-
609
- When you call muteLocalVideo(true) to pause the local video, you can set a placeholder image through this interface. After setting, other users in the room will see this placeholder image instead of a black screen.
610
- | Parameters | Description |
611
- | --- | --- |
612
- | fps | Set the frame rate for the alternative image, with a minimum value of 5 and a maximum value of 10. The default is 5. |
613
- | image | Set the alternative image. A null value means no video stream data will be sent after muteLocalVideo. The default is null. |
614
-
615
- ## startRemoteView
616
-
617
- #### Subscribe to the video stream of a remote user and bind the video rendering control
618
-
619
- By calling this API, the SDK can pull the video stream of the specified user ID and render it on the rendering control specified by the parameter view. You can set the display mode of the screen through setRemoteRenderParams.
620
- - If you already know the user ID of a user who has a video stream in the room, you can directly call startRemoteView to subscribe to that user's video feed.
621
-
622
- - If you do not know which users in the room are publishing video, you can wait for a notification from onUserVideoAvailable after entering the room.
623
-
624
- Calling this API only starts pulling the video stream, at this point the screen still needs to load and buffer. When buffering is complete, you will receive a notification from onFirstVideoFrame.
625
- | Parameters | Description |
626
- | --- | --- |
627
- | streamType | Specify the type of video stream of the user you want to watch.<br>- High-definition main stream: TRTCVideoStreamTypeBig.<br>- Low-quality small screen: TRTCVideoStreamTypeSmall (effective only after the remote user enables Dual-channel encoding through enableSmallVideoStream).<br>- Substream (commonly used for screen sharing): TRTCVideoStreamTypeSub. |
628
- | userId | Specify the remote user's ID. |
629
- | view | Rendering control used to display the video screen. |
630
-
631
- > **Note**
632
- >
633
-
634
- > Note a few rules:
635
- >
636
-
637
- > 1. The SDK supports watching the main stream and substream of a certain user ID simultaneously, or watching the substream and small stream of a certain user ID simultaneously, but does not support watching the main stream and small stream simultaneously.
638
- >
639
-
640
- > 2. Only when the specified userid enables Dual-channel encoding through enableSmallVideoStream can you watch the user's small screen.
641
- >
642
-
643
- > 3. When the small stream of the specified user ID does not exist, the SDK will default to the user's main stream.
644
- >
645
-
646
- ## updateRemoteView
647
-
648
- #### Update the video rendering control of a remote user
649
-
650
- This interface can be used to update the rendering control of a remote video image and is commonly used in scenarios that involve switching display areas.
651
- | Parameters | Description |
652
- | --- | --- |
653
- | streamType | To set the stream type of the preview window (only supports TRTCVideoStreamTypeBig and TRTCVideoStreamTypeSub). |
654
- | userId | Specify the remote user's ID. |
655
- | view | Control carrying the video screen. |
656
-
657
- ## stopRemoteView
658
-
659
- #### Unsubscribe from the remote user's video stream and release the rendering control
660
-
661
- Calling this interface will make the SDK stop receiving the video stream of the user and release the decoding and rendering resources of that video stream.
662
- | Parameters | Description |
663
- | --- | --- |
664
- | streamType | Specify the type of video stream of the user you want to watch.<br>- High-definition main stream: TRTCVideoStreamTypeBig.<br>- Low-definition small picture: TRTCVideoStreamTypeSmall.<br>- Substream (commonly used for screen sharing): TRTCVideoStreamTypeSub. |
665
- | userId | Specify the remote user's ID. |
666
-
667
- ## stopAllRemoteView
668
-
669
- #### Unsubscribe from all remote users' video streams and release all rendering resources
670
-
671
- Calling this interface will make the SDK stop receiving all remote video streams and release all decoding and rendering resources.
672
-
673
- > **Note**
674
- >
675
-
676
- > If there is a currently displayed substream (screen sharing), it will also be stopped.
677
- >
678
-
679
- ## muteRemoteVideoStream
680
-
681
- #### Suspend/Resume subscription of the remote user's video stream
682
-
683
- This interface only pauses/resumes receiving the video stream of a designated user but does not release the display resources. The video image will be frozen on the last frame at the time of the interface call.
684
- | Parameters | Description |
685
- | --- | --- |
686
- | mute | Pause receiving or not. |
687
- | streamType | The video stream type to be paused/resumed.<br>- High-definition main stream: TRTCVideoStreamTypeBig.<br>- Low-definition small picture: TRTCVideoStreamTypeSmall.<br>- Substream (commonly used for screen sharing): TRTCVideoStreamTypeSub. |
688
- | userId | Specify the remote user's ID. |
689
-
690
- > **Note**
691
- >
692
-
693
- > This interface supports calling before entering the room (enterRoom), and the paused state will be reset after leaving the room (exitRoom).
694
- >
695
-
696
- > After calling this interface to pause receiving a specified user's video stream, calling only the startRemoteView interface will not play the specified user's video. You need to call muteRemoteVideoStream(false) or muteAllRemoteVideoStreams(false) to recover.
697
- >
698
-
699
- ## muteAllRemoteVideoStreams
700
-
701
- #### Suspend/Resume subscription of all remote users' video streams
702
-
703
- This interface only pauses/resumes receiving all users' video streams but does not release the display resources. The video image will be frozen on the last frame at the time of the interface call.
704
- | Parameters | Description |
705
- | --- | --- |
706
- | mute | Pause receiving or not. |
707
-
708
- > **Note**
709
- >
710
-
711
- > This interface supports calling before entering the room (enterRoom), and the paused state will be reset after leaving the room (exitRoom).
712
- >
713
-
714
- > After calling this interface to pause receiving all users' video streams, calling only the startRemoteView interface will not play a specified user's video. You need to call muteRemoteVideoStream(false) or muteAllRemoteVideoStreams(false) to recover.
715
- >
716
-
717
- ## setVideoEncoderParam
718
-
719
- #### Set encoding parameters for the video encoder
720
-
721
- This setting determines the screen quality seen by remote users, and also affects the screen quality of the recorded video file on the cloud.
722
- | Parameters | Description |
723
- | --- | --- |
724
- | param | Used to set the video encoder parameters. For details, see TRTCVideoEncParam. |
725
-
726
- > **Note**
727
- >
728
-
729
- > Starting from version v11.5, the encoding output resolution will align with width 8 height 2 bytes, and it will be adjusted downwards; eg: input resolution 540x960, actual encoding output resolution 536x960.
730
- >
731
-
732
- ## setNetworkQosParam
733
-
734
- #### Set network quality control parameters
735
-
736
- This setting determines the quality control strategy under poor network conditions, such as "Quality Priority" or "Smoothness Priority" strategies.
737
- | Parameters | Description |
738
- | --- | --- |
739
- | param | Used to set the network quality control parameters. For details, see TRTCNetworkQosParam. |
740
-
741
- ## setLocalRenderParams
742
-
743
- #### Set rendering parameters for the local screen
744
-
745
- Configurable parameters include: rotation angle, fill mode, and left-right mirroring of the picture.
746
- | Parameters | Description |
747
- | --- | --- |
748
- | params | Picture render parameters, see TRTCRenderParams for details. |
749
-
750
- ## setRemoteRenderParams
751
-
752
- #### Set rendering mode for the remote screen
753
-
754
- Configurable parameters include: rotation angle, fill mode, and left-right mirroring of the picture.
755
- | Parameters | Description |
756
- | --- | --- |
757
- | params | Picture render parameters, see TRTCRenderParams for details. |
758
- | streamType | It can be set as the main road picture (TRTCVideoStreamTypeBig) or auxiliary road picture (TRTCVideoStreamTypeSub). |
759
- | userId | Specify the remote user's ID. |
760
-
761
- ## enableSmallVideoStream
762
-
763
- #### Enable picture-in-picture dual-stream encoding mode
764
-
765
- After enabling the dual-stream encoding mode, the current user's encoder will output both [HD large screen] and [low-definition small picture] video streams (but only one audio stream).
766
-
767
- This way, other users in the room can choose to subscribe to [HD large screen] or [low-definition small screen] based on their network conditions or screen size.
768
- | Parameters | Description |
769
- | --- | --- |
770
- | enable | Whether to enable small picture encoding, default value: false. |
771
- | smallVideoEncParam | Video parameters for the substream. |
772
-
773
- > **Note**
774
- >
775
-
776
- > When the dual-stream encoding mode is enabled, it consumes more CPU and network bandwidth. Therefore, it may be considered for use on Mac, Windows, or high-performance Pads. It is not recommended for mobile devices.
777
- >
778
-
779
- #### Return value description:
780
-
781
- 0: Success; -1: The current main screen has been set to lower quality, making dual-channel encoding unnecessary.
782
-
783
- ## setRemoteVideoStreamType
784
-
785
- #### Switch picture-in-picture for the specified remote user
786
-
787
- After a host in the room has enabled dual-channel encoding, the default screen subscribed by other users in the room through startRemoteView will be [HD large screen].
788
-
789
- You can use this interface to select whether you want to subscribe to the large screen or small screen. This interface is effective whether called before or after startRemoteView.
790
- | Parameters | Description |
791
- | --- | --- |
792
- | streamType | Video stream type, i.e., choose to watch the large screen or the small screen, default is large screen. |
793
- | userId | Specify the remote user's ID. |
794
-
795
- > **Note**
796
- >
797
-
798
- > This feature requires the target user to have already enabled Dual-channel encoding mode in advance through enableSmallVideoStream, otherwise, this call will have no actual effect.
799
- >
800
-
801
- ## snapshotVideo
802
-
803
- #### Take a video screenshot
804
-
805
- You can use this interface to capture the local video footage, the main stream picture of a remote user, and the auxiliary stream (screen sharing) picture of a remote user.
806
- | Parameters | Description |
807
- | --- | --- |
808
- | sourceType | Source of the picture can be chosen as captured video stream (TRTCSnapshotSourceTypeStream), video rendering picture (TRTCSnapshotSourceTypeView), or captured picture (TRTCSnapshotSourceTypeCapture). Captured picture screenshots are clearer. |
809
- | streamType | Video stream type, you can choose to capture the main stream picture (TRTCVideoStreamTypeBig, commonly used for cameras) or the auxiliary stream picture (TRTCVideoStreamTypeSub, commonly used for screen sharing). |
810
- | userId | User ID, if left blank, indicates capturing the local video footage. |
811
-
812
- > **Note**
813
- >
814
-
815
- > Windows platform currently only supports capturing TRTCSnapshotSourceTypeStream source video footage.
816
- >
817
-
818
- ## setGravitySensorAdaptiveMode
819
-
820
- #### Set gravity sensing adaptive mode (11.7 and above)
821
-
822
- After gravity sensing is enabled, if the collection end device rotates, both the collection end and audience side will render the image accordingly to ensure the image in the view is always upright.
823
-
824
- It only takes effect in the SDK internal camera capture scene and only works on the mobile terminal.
825
-
826
- 1. This interface only affects the collection end. If you are just watching the image in the room, enabling this interface is ineffective
827
-
828
- 2. When the collection end device rotates 90 degrees or 270 degrees, the image seen by the collection end or audience side may be cropped to maintain aspect ratio coordination
829
- | Parameters | Description |
830
- | --- | --- |
831
- | mode | Gravity sensing mode. For details, see TRTCGravitySensorAdaptiveMode_Disable, TRTCGravitySensorAdaptiveMode_FillByCenterCrop, and TRTCGravitySensorAdaptiveMode_FitWithBlackBorder. Default value: TRTCGravitySensorAdaptiveMode_Disable. |
832
-
833
- ## startLocalAudio
834
-
835
- #### Enable collection and publishing of local audio
836
-
837
- The SDK does not enable the microphone by default. When users need to publish local audio, they need to call this interface to enable microphone collection and encoding and publish the audio to the current room.
838
-
839
- After enabling the collection and publishing of local audio, other users in the room will receive onUserAudioAvailable(userId, true) notification.
840
- | Parameters | Description |
841
- | --- | --- |
842
- | quality | Sound quality<br>- TRTCAudioQualitySpeech, Fluent: Sample rate: 16k; Mono; Audio bitrate: 16kbps; Suitable for voice call-dominated scenarios, such as online meetings and voice calls.<br>- TRTCAudioQualityDefault, Default: Sample rate: 48k; Mono; Audio bitrate: 50kbps; The default audio quality of the SDK, recommended unless there are special requirements.<br>- TRTCAudioQualityMusic, High Quality: Sample rate: 48k; Stereo + full band; Audio bitrate: 128kbps; Suitable for high-fidelity music transmission scenarios, such as online KTV and music live streaming. |
843
-
844
- > **Note**
845
- >
846
-
847
- > This function checks the microphone permissions. If the current app does not have microphone permissions, the SDK will automatically request microphone permissions from the user.
848
- >
849
-
850
- ## stopLocalAudio
851
-
852
- #### Stop collection and publishing of local audio
853
-
854
- After stopping the collection and publishing of local audio, other users in the room will receive onUserAudioAvailable(userId, false) notification.
855
-
856
- ## muteLocalAudio
857
-
858
- #### Pause/Resume publishing of the local audio stream
859
-
860
- When you pause the publishing of the local audio stream, other users in the room will receive onUserAudioAvailable(userId, false) notification.
861
-
862
- When you resume the publishing of the local audio stream, other users in the room will receive onUserAudioAvailable(userId, true) notification.
863
-
864
- The difference from stopLocalAudio is that muteLocalAudio(true) does not release the microphone permissions but continues to send a low-bit-rate silent packet.
865
-
866
- This is very suitable for scenarios that require cloud recording because video files in formats like MP4 demand high continuity of audio data, and using stopLocalAudio will make the recorded MP4 files difficult to play.
867
-
868
- Therefore, in scenarios where the quality of the recorded files is highly required, it is recommended to choose muteLocalAudio instead of stopLocalAudio.
869
- | Parameters | Description |
870
- | --- | --- |
871
- | mute | true: Mute; false: Unmute. |
872
-
873
- ## muteRemoteAudio
874
-
875
- #### Pause/Resume playing of the remote audio stream
876
-
877
- When you mute a user's remote audio, the SDK will stop playing the specified user's sound and will also stop pulling that user's audio data.
878
- | Parameters | Description |
879
- | --- | --- |
880
- | mute | true: Mute; false: Unmute. |
881
- | userId | Used to specify the remote user's ID. |
882
-
883
- > **Note**
884
- >
885
-
886
- > This interface is effective whether called before or after entering the room (enterRoom). The mute status will be reset to false after exiting the room (exitRoom).
887
- >
888
-
889
- ## muteAllRemoteAudio
890
-
891
- #### Pause/Resume playing of all remote users' audio streams
892
-
893
- When you mute all users' remote audio, the SDK will stop playing all remote audio streams and will also stop pulling all users' audio data.
894
- | Parameters | Description |
895
- | --- | --- |
896
- | mute | true: Mute; false: Unmute. |
897
-
898
- > **Note**
899
- >
900
-
901
- > This interface is effective whether called before or after entering the room (enterRoom). The mute status will be reset to false after exiting the room (exitRoom).
902
- >
903
-
904
- ## setRemoteAudioVolume
905
-
906
- #### Set the playback volume for a specific remote user
907
-
908
- You can mute a remote user's sound by using setRemoteAudioVolume(userId, 0).
909
- | Parameters | Description |
910
- | --- | --- |
911
- | userId | Used to specify the remote user's ID. |
912
- | volume | Volume. Value range: 0-100. Default value: 100. |
913
-
914
- > **Note**
915
- >
916
-
917
- > If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
918
- >
919
-
920
- ## setAudioCaptureVolume
921
-
922
- #### Sets the local audio capture volume.
923
- | Parameters | Description |
924
- | --- | --- |
925
- | volume | Volume. Value range: 0-100. Default value: 100. |
926
-
927
- > **Note**
928
- >
929
-
930
- > If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
931
- >
932
-
933
- ## getAudioCaptureVolume
934
-
935
- #### Obtains the local audio capture volume.
936
-
937
- ## setAudioPlayoutVolume
938
-
939
- #### Sets the remote audio playback volume.
940
-
941
- This interface controls the volume that the SDK finally delivers to the system for playback. The adjustment will affect the volume of the local audio recording file, but it will not affect the volume of the ear return.
942
- | Parameters | Description |
943
- | --- | --- |
944
- | volume | Volume. Value range: 0-100. Default value: 100. |
945
-
946
- > **Note**
947
- >
948
-
949
- > If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
950
- >
951
-
952
- ## getAudioPlayoutVolume
953
-
954
- #### Obtains the remote audio playback volume.
955
-
956
- ## enableAudioVolumeEvaluation
957
-
958
- #### Enable volume reminder
959
-
960
- After enabling this feature, the SDK will provide feedback on the local or remote user's audio volume assessment information, including volume level, voice detection, audio spectrum, etc., in the ITRTCCloudCallback callback onUserVoiceVolume.
961
- | Parameters | Description |
962
- | --- | --- |
963
- | enable | Whether to enable volume prompts, disabled by default. |
964
- | params | For volume assessment and other related parameters, please refer to TRTCAudioVolumeEvaluateParams. |
965
-
966
- ## startAudioRecording
967
-
968
- #### Start recording
969
-
970
- When you call this interface, the SDK will mix and record all local and remote audio (including local audio, remote audio, background music, and sound effects) into a local file.
971
-
972
- This interface can be called both before and after entering the room. If the recording task is not stopped by stopAudioRecording before exiting the room, the task will automatically stop after exiting the room.
973
-
974
- The start and completion status of this recording will be notified through local recording-related callbacks. See the TRTCCloud related callbacks.
975
- | Parameters | Description |
976
- | --- | --- |
977
- | param | For recording parameters, please refer to TRTCAudioRecordingParams. |
978
-
979
- > **Note**
980
- >
981
-
982
- > Starting from version 11.5, the status results of audio recording are uniformly adjusted to asynchronous callback notifications. See the TRTCCloud related callbacks.
983
- >
984
-
985
- #### Return value description:
986
-
987
- 0: Success; -1: Recording has already started; -2: File or directory creation failed; -3: The audio format specified by the extension is not supported.
988
-
989
- ## stopAudioRecording
990
-
991
- #### Stop recording
992
-
993
- If the recording task is not stopped by this interface before exiting the room, the recording task will automatically stop after exiting the room.
994
-
995
- ## startLocalRecording
996
-
997
- #### Enable local media recording
998
-
999
- After enabling, the audio and video content during the live stream will be recorded to a local file.
1000
- | Parameters | Description |
1001
- | --- | --- |
1002
- | params | For recording parameters, please refer to TRTCLocalRecordingParams. |
1003
-
1004
- ## stopLocalRecording
1005
-
1006
- #### Stop local media recording
1007
-
1008
- If the recording task is not stopped by this interface before exiting the room, the recording task will automatically stop after exiting the room.
1009
-
1010
- ## setRemoteAudioParallelParams
1011
-
1012
- #### Set intelligent concurrent playback strategy for remote audio streams
1013
-
1014
- Set intelligent concurrent playback strategy for remote audio streams, suitable for scenarios with a large number of people on the microphone.
1015
- | Parameters | Description |
1016
- | --- | --- |
1017
- | params | For audio concurrency parameters, please refer to TRTCAudioParallelParams. |
1018
-
1019
- ## enable3DSpatialAudioEffect
1020
-
1021
- #### Enable 3D audio
1022
-
1023
- Enable 3D audio effects. Note that smooth sound quality TRTCAudioQualitySpeech or default sound quality TRTCAudioQualityDefault should be used.
1024
- | Parameters | Description |
1025
- | --- | --- |
1026
- | enabled | Whether to enable 3D audio effects, disabled by default. |
1027
-
1028
- ## updateSelf3DSpatialPosition
1029
-
1030
- #### Set self coordinates and orientation information in 3D audio
1031
-
1032
- Update your position and orientation in the world coordinate system. The SDK will calculate the relative position between yourself and remote users based on the parameters of this method and render spatial audio effects accordingly. Note that each parameter should be passed in as an array of length 3.
1033
- | Parameters | Description |
1034
- | --- | --- |
1035
- | axisForward | The unit vector of the front axis of the local coordinate system in the world coordinate system, with three values representing the front, right, and up coordinate values, respectively. |
1036
- | axisRight | The unit vector of the right axis of the local coordinate system in the world coordinate system, with three values representing the front, right, and up coordinate values, respectively. |
1037
- | axisUp | The unit vector of the up axis of the local coordinate system in the world coordinate system, with three values representing the front, right, and up coordinate values, respectively. |
1038
- | position | Your coordinate in the world coordinate system, with three values representing the front, right, and up coordinate values, respectively. |
1039
-
1040
- > **Note**
1041
- >
1042
-
1043
- > Please appropriately limit the invocation frequency. It is recommended to set coordinates at intervals of at least 100ms.
1044
- >
1045
-
1046
- ## updateRemote3DSpatialPosition
1047
-
1048
- #### Set remote user coordinate information in 3D audio
1049
-
1050
- Update the position of remote users in the world coordinate system. The SDK will render spatial audio effects based on the relative position between yourself and the remote users. Note that the parameter is an array of length 3.
1051
- | Parameters | Description |
1052
- | --- | --- |
1053
- | position | The coordinate of the remote user in the world coordinate system, with three values representing the front, right, and up coordinate values, respectively. |
1054
- | userId | Specify the remote user's ID. |
1055
-
1056
- > **Note**
1057
- >
1058
-
1059
- > Please appropriately limit the invocation frequency. It is recommended to set coordinates for the same remote user at intervals of at least 100ms.
1060
- >
1061
-
1062
- ## set3DSpatialReceivingRange
1063
-
1064
- #### Set the receivable range of sounds emitted by a specified user
1065
-
1066
- After setting this range size, the specified user's voice will be audible within this range, and any sound beyond this range will be attenuated to 0.
1067
- | Parameters | Description |
1068
- | --- | --- |
1069
- | range | Maximum range at which the sound can be received. |
1070
- | userId | Specify the remote user's ID. |
1071
-
1072
- ## getDeviceManager
1073
-
1074
- #### Get Device Management Class (TXDeviceManager)
1075
-
1076
- ## setBeautyStyle
1077
-
1078
- #### Set special effects like beauty filter, whitening, and rosy skin
1079
-
1080
- The SDK integrates two different skin smoothing algorithms:
1081
-
1082
- -"Smooth": This algorithm is more aggressive, providing a more noticeable smoothing effect, suitable for show live streaming.
1083
-
1084
- -"Natural": This algorithm retains more facial details, offering a more natural smoothing effect, suitable for most live streaming scenarios.
1085
- | Parameters | Description |
1086
- | --- | --- |
1087
- | beautyLevel | Beauty level, value range 0 - 9, 0 means disabled, the greater the value from 1 - 9, the more obvious the effect. |
1088
- | ruddinessLevel | Rosy level, value range 0 - 9, 0 means disabled, the greater the value from 1 - 9, the more obvious the effect. |
1089
- | style | Skin smoothing algorithm, available in two types: "Smooth" and "Natural". |
1090
- | whitenessLevel | Whitening level, value range 0 - 9, 0 means disabled, the greater the value from 1 - 9, the more obvious the effect. |
1091
-
1092
- ## setWaterMark
1093
-
1094
- #### Watermarking
1095
-
1096
- The watermark position is specified by xOffset, yOffset, and fWidthRatio.
1097
- - xOffset: The watermark's coordinate in the range of 0 - 1 as a floating point number.
1098
-
1099
- - yOffset: The watermark's coordinate in the range of 0 - 1 as a floating point number.
1100
-
1101
- - fWidthRatio: The watermark's size ratio in the range of 0 - 1 as a floating point number.
1102
-
1103
- | Parameters | Description |
1104
- | --- | --- |
1105
- | fWidthRatio | The width of the watermark displayed as a proportion of the screen width (the watermark is proportionally scaled according to this parameter). |
1106
- | isVisibleOnLocalPreview | true: Watermark displayed in local preview; false: Watermark not displayed in local preview, effective only on win/mac. |
1107
- | nHeight | Watermark image pixel height (ignored if source data is file path). |
1108
- | nWidth | Watermark image pixel width (ignored if source data is file path). |
1109
- | srcData | Watermark image source data (set to nullptr to remove watermark). |
1110
- | srcType | Watermark image source data type. |
1111
- | streamType | Stream type to apply the watermark (TRTCVideoStreamTypeBig, TRTCVideoStreamTypeSub). |
1112
- | xOffset | X-axis offset for the top-left corner of watermark display. |
1113
- | yOffset | Y-axis offset for the top-left corner of watermark display. |
1114
-
1115
- > **Note**
1116
- >
1117
-
1118
- > This interface only supports adding image watermarks to the main video stream.
1119
- >
1120
-
1121
- ## getAudioEffectManager
1122
-
1123
- #### Get Audio Effect Management Class (TXAudioEffectManager)
1124
-
1125
- TXAudioEffectManager is the audio effect management interface. Through this interface, you can implement the following features:
1126
- - Background Music: Supports online and local music, variable speed, pitch shift, and other special effects. Supports native and accompaniment playback as well as loop playback.
1127
-
1128
- - In-ear monitor feedback: The microphone captures the sound and plays it in real-time through the earphones, commonly used in music live streaming.
1129
-
1130
- - Reverb Effect: KTV, small room, hall, deep, resonant....
1131
-
1132
- - Voice changing effect: Lolita, uncle, heavy metal....
1133
-
1134
- - Short sound effects: short sound effect files such as applause, laughter, etc. (for files less than 10 seconds, please set the isShortFile parameter to true).
1135
-
1136
- ## startSystemAudioLoopback
1137
-
1138
- #### Enable System Sound Capture (iOS not yet supported)
1139
-
1140
- This interface captures audio data from the computer's sound card and mixes it into the current audio data stream of the SDK, so that other users in the room can also hear the sound played by the broadcaster's computer.
1141
-
1142
- In online education scenarios, teachers can use this feature to allow the SDK to capture the audio from educational videos and broadcast it to students in the same room.
1143
-
1144
- In music live streaming scenarios, the host can use this feature to allow the SDK to capture audio from the music player to add background music to their live stream.
1145
- | Parameters | Description |
1146
- | --- | --- |
1147
- | deviceName | You can set this parameter to nullptr, indicating the SDK captures the entire system sound. |
1148
-
1149
- > **Note**
1150
- >
1151
-
1152
- > On the Windows platform, you can also set the parameter deviceName to the absolute path of an application executable (e.g., QQMusic.exe). In this case, the SDK will capture only the application's sound (supports 32-bit SDK, and 64-bit SDK requires Windows version 10.0.19042 or higher).
1153
- >
1154
-
1155
- > You can also set the parameter to a specific speaker device name to capture sound from that speaker (get the speaker devices of type TXMediaDeviceTypeSpeaker from the TXDeviceManager's getDevicesList interface).
1156
- >
1157
-
1158
- > On the Windows platform, you can also set this parameter to a process id (format as "process_xxx", where xxx is the process id). The SDK will capture the sound from that process (requires Windows version 10.0.19042 or higher).
1159
- >
1160
-
1161
- > On the Windows platform, you can also set this parameter as a process ID (format as "exclude_process_xxx", where xxx is the process ID). In this case, the SDK will capture all audio except for the specified process (requires Windows version 10.0.19042 or higher).
1162
- >
1163
-
1164
- ## stopSystemAudioLoopback
1165
-
1166
- #### Stop System Sound Capture (iOS not yet supported)
1167
-
1168
- ## setSystemAudioLoopbackVolume
1169
-
1170
- #### Sets the Volume of System Sound Capture
1171
- | Parameters | Description |
1172
- | --- | --- |
1173
- | volume | Set the volume level, range: [0 ~ 150], default value is 100. |
1174
-
1175
- ## startScreenCapture
1176
-
1177
- #### Start Screen Sharing
1178
-
1179
- This interface can capture the entire screen content or the content of a specific application window you designate, sharing it with other users in the same room.
1180
- | Parameters | Description |
1181
- | --- | --- |
1182
- | encParam | Screen Sharing Encoding Parameters: The SDK prioritizes the encoding parameters you set through this interface<br>- If you set encParam to null and have set substream video encoding parameters through setSubStreamEncoderParam, the SDK will use those parameters for screen sharing.<br>- If you set encParam to null and have not set substream video encoding parameters through setSubStreamEncoderParam, the SDK will automatically select the best encoding parameters for screen sharing. |
1183
- | streamType | The circuit used for screen sharing can be set to Main Road (TRTCVideoStreamTypeBig) or Auxiliary Road (TRTCVideoStreamTypeSub), with the auxiliary road being recommended. |
1184
- | view | The parent control of the rendering control can be set to null, indicating that the preview effect of screen sharing will not be displayed. |
1185
-
1186
- > **Note**
1187
- >
1188
-
1189
- > 1. The same user can publish only one main road (TRTCVideoStreamTypeBig) screen and one auxiliary road (TRTCVideoStreamTypeSub) screen at the same time.
1190
- >
1191
-
1192
- > 2. By default, screen sharing uses the auxiliary road. If you use the main road for screen sharing, you need to stop local preview (stopLocalPreview) in advance to avoid conflicts.
1193
- >
1194
-
1195
- > 3. Only one user can use the auxiliary road for screen sharing in the same room at any given time. In other words, only one user can enable the auxiliary road in the same room simultaneously.
1196
- >
1197
-
1198
- > 4. If another user in the room is already sharing the screen using an auxiliary road, calling this interface will receive an onError(ERR_SERVER_CENTER_ANOTHER_USER_PUSH_SUB_VIDEO) callback from ITRTCCloudCallback.
1199
- >
1200
-
1201
- ## stopScreenCapture
1202
-
1203
- #### Stopping Screen Sharing
1204
-
1205
- ## pauseScreenCapture
1206
-
1207
- #### Pause Screen Sharing
1208
-
1209
- > **Note**
1210
- >
1211
-
1212
- > Starting from version 11.5, suspending screen capture will output the last frame at a frame rate of 1fps.
1213
- >
1214
-
1215
- ## resumeScreenCapture
1216
-
1217
- #### Resume Screen Sharing
1218
-
1219
- ## getScreenCaptureSources
1220
-
1221
- #### Enumerate shareable screens and windows (this interface supports only desktop systems)
1222
-
1223
- When integrating the screen sharing feature on a desktop system, it is usually necessary to display an interface for selecting a sharing target. This allows users to choose whether to share the entire screen or a specific window.
1224
-
1225
- Through this interface, you can query the current system for the ID, name, and thumbnail of available windows for sharing. We provide a default interface implementation in our Demo for your reference.
1226
- | Parameters | Description |
1227
- | --- | --- |
1228
- | iconSize | Specify the size of the window icon to be retrieved. |
1229
- | thumbnailSize | Specify the size of the window thumbnail to be retrieved. Thumbnails can be used to render on the window selection interface. |
1230
-
1231
- > **Note**
1232
- >
1233
-
1234
- > 1. The returned list includes screens and application windows, with the screen being the first element in the list. If the user has multiple monitors, each monitor is a sharing target.
1235
- >
1236
-
1237
- > 2. Do not use delete ITRTCScreenCaptureSourceList* to remove SourceList as it is prone to cause crashes. Use the release method in ITRTCScreenCaptureSourceList to release the list.
1238
- >
1239
-
1240
- #### Return value description:
1241
-
1242
- The window list includes the screen.
1243
-
1244
- ## selectScreenCaptureTarget
1245
-
1246
- #### Select the screen or window to share (this interface supports only desktop systems)
1247
-
1248
- After you retrieve the shareable screens and windows using getScreenCaptureSources, you can call this interface to select the desired target screen or window for sharing.
1249
-
1250
- During screen sharing, you can also call this interface at any time to switch the sharing target.
1251
-
1252
- Supports the following four cases:
1253
- - Share the entire screen: The type in sourceInfoList is Screen, and captureRect is set to { 0, 0, 0, 0 }
1254
-
1255
- - Share a specified area: The type in sourceInfoList is Screen, and captureRect is set to a non-nullptr, for example, { 100, 100, 300, 300 }
1256
-
1257
- - Share the entire window: The type in sourceInfoList is Window, and captureRect is set to { 0, 0, 0, 0 }
1258
-
1259
- - Share a window area: The type in sourceInfoList is Window, and captureRect is set to a non-nullptr, for example, { 100, 100, 300, 300 }
1260
-
1261
- | Parameters | Description |
1262
- | --- | --- |
1263
- | captureRect | Specify the capture area |
1264
- | property | Specify the properties of the screen sharing target, including capturing the mouse, highlighting the capture window, etc. For details, refer to the TRTCScreenCaptureProperty Definition |
1265
- | source | Specifying sharing source |
1266
-
1267
- > **Note**
1268
- >
1269
-
1270
- > Setting highlight border color and width parameter is not effective on Mac platform.
1271
- >
1272
-
1273
- ## setSubStreamEncoderParam
1274
-
1275
- #### Set Video Encoding Parameters for Screen Sharing (Sub-Stream) (Supported on Both Desktop and Mobile Systems)
1276
-
1277
- This interface can set the screen sharing (sub-stream) quality seen by remote users, and also determine the screen sharing quality in the cloud-recorded video file.
1278
-
1279
- Please note the differences between the following two interfaces:
1280
- - setVideoEncoderParam is used to set the video encoding parameters for the main stream (TRTCVideoStreamTypeBig, usually for the camera).
1281
-
1282
- - setSubStreamEncoderParam is used to set the video encoding parameters for the auxiliary stream (TRTCVideoStreamTypeSub, usually for screen sharing).
1283
-
1284
- | Parameters | Description |
1285
- | --- | --- |
1286
- | param | For auxiliary stream encoding parameters, please refer to TRTCVideoEncParam. |
1287
-
1288
- ## setSubStreamMixVolume
1289
-
1290
- #### Set the Mixing Volume for Screen Sharing (This Interface Supports Only Desktop Systems)
1291
-
1292
- The higher this value, the higher the proportion of screen sharing volume, and the lower the proportion of microphone volume. Therefore, it is not recommended to set it too high, as it will suppress the microphone sound.
1293
- | Parameters | Description |
1294
- | --- | --- |
1295
- | volume | Set the mix volume level, ranging from 0 to 100. |
1296
-
1297
- ## addExcludedShareWindow
1298
-
1299
- #### Add the Specified Window to the Exclusion List of Screen Sharing (This Interface Supports Only Desktop Systems)
1300
-
1301
- Windows added to the exclusion list will not be shared. A common use case is to add a window from an application to the exclusion list to avoid privacy issues.
1302
-
1303
- Support setting filter windows before starting screen sharing, and also dynamically adding filter windows during screen sharing.
1304
- | Parameters | Description |
1305
- | --- | --- |
1306
- | windowID | Windows that you do not want to share |
1307
-
1308
- > **Note**
1309
- >
1310
-
1311
- > 1. This interface only takes effect when the type in TRTCScreenCaptureSourceInfo is specified as TRTCScreenCaptureSourceTypeScreen, meaning the exclusion feature only works when sharing the entire screen content.
1312
- >
1313
-
1314
- > 2. Windows added to the exclusion list using this interface will be automatically cleared by the SDK upon exiting the room.
1315
- >
1316
-
1317
- > 3. On Mac platform, please pass in the window ID (i.e., CGWindowID), which can be obtained from the sourceId member in TRTCScreenCaptureSourceInfo.
1318
- >
1319
-
1320
- ## removeExcludedShareWindow
1321
-
1322
- #### Remove the Specified Window from the Exclusion List of Screen Sharing (This Interface Supports Only Desktop Systems)
1323
- | Parameters | Description |
1324
- | --- | --- |
1325
- | windowID | The window ID to be excluded. |
1326
-
1327
- ## removeAllExcludedShareWindow
1328
-
1329
- #### Remove All Windows from the Exclusion List of Screen Sharing (This Interface Supports Only Desktop Systems)
1330
-
1331
- ## addIncludedShareWindow
1332
-
1333
- #### Add the Specified Window to the Contains List of Screen Sharing (This Interface Supports Only Desktop Systems)
1334
-
1335
- This interface only takes effect when the type in TRTCScreenCaptureSourceInfo is specified as TRTCScreenCaptureSourceTypeWindow. This means that the feature of including an additional specified window is only effective when sharing window content.
1336
-
1337
- You can call it both before and after startScreenCapture.
1338
- | Parameters | Description |
1339
- | --- | --- |
1340
- | windowID | Windows desired to be shared (Window Handle: HWND on Windows platform) |
1341
-
1342
- > **Note**
1343
- >
1344
-
1345
- > Windows added to the inclusion list through this method will be automatically cleared by the SDK upon exiting the room.
1346
- >
1347
-
1348
- ## removeIncludedShareWindow
1349
-
1350
- #### Remove the Specified Window from the Contains List of Screen Sharing (This Interface Supports Only Desktop Systems)
1351
-
1352
- This interface only takes effect when the type in TRTCScreenCaptureSourceInfo is specified as TRTCScreenCaptureSourceTypeWindow.
1353
-
1354
- This means that the feature of including an additional specified window is only effective when sharing window content.
1355
- | Parameters | Description |
1356
- | --- | --- |
1357
- | windowID | Windows desired to be shared (Window ID on Mac platform; HWND on Windows platform) |
1358
-
1359
- ## removeAllIncludedShareWindow
1360
-
1361
- #### Remove All Windows from the Contains List of Screen Sharing (This Interface Supports Only Desktop Systems)
1362
-
1363
- This interface only takes effect when the type in TRTCScreenCaptureSourceInfo is specified as TRTCScreenCaptureSourceTypeWindow.
1364
-
1365
- This means that the feature of including an additional specified window is only effective when sharing window content.
1366
-
1367
- ## enableCustomVideoCapture
1368
-
1369
- #### Enable/Disable Custom Video Capturing Mode
1370
-
1371
- After enabling this mode, the SDK will stop running the original video capture process. It will no longer collect data from the camera and apply beauty filters, retaining only video encoding and sending capabilities.
1372
-
1373
- You need to continuously send self-collected video frames to the SDK via sendCustomVideoData.
1374
- | Parameters | Description |
1375
- | --- | --- |
1376
- | enable | Whether to enable, default value: false. |
1377
- | streamType | Used to specify the video stream type, TRTCVideoStreamTypeBig: High-definition main stream; TRTCVideoStreamTypeSub: Auxiliary stream. |
1378
-
1379
- ## sendCustomVideoData
1380
-
1381
- #### Submit Self-collected Video Frames to the SDK
1382
-
1383
- This interface allows you to submit self-collected video frames to the SDK. The SDK will encode the video frames and transmit them through its network module.
1384
-
1385
- Parameter TRTCVideoFrame is recommended to be filled as follows (other fields do not need to be filled):
1386
- - pixelFormat: Windows and Android platforms only support TRTCVideoPixelFormat_I420; iOS and Mac platforms support TRTCVideoPixelFormat_I420 and TRTCVideoPixelFormat_BGRA32.
1387
-
1388
- - bufferType: Recommended choice is TRTCVideoBufferType_Buffer.
1389
-
1390
- - data: Buffer used to carry video frame data.
1391
-
1392
- - length: Video frame data length. If pixelFormat is set to I420 format, length can be calculated as follows: length = width × height × 3 / 2.
1393
-
1394
- - width: Video image width, such as 640 px.
1395
-
1396
- - height: Video image height, such as 480 px.
1397
-
1398
- - timestamp: Timestamp, in milliseconds (ms). Please use the timestamp recorded when the video frame is captured (you can get the timestamp by calling generateCustomPTS after capturing a video frame).
1399
-
1400
- Refer to documentation: [Custom Collection and Rendering](https://cloud.tencent.com/document/product/647/34066).
1401
- | Parameters | Description |
1402
- | --- | --- |
1403
- | frame | Video data, supports I420 format data. |
1404
- | streamType | Used to specify the video stream type,TRTCVideoStreamTypeBig: HD large screen;TRTCVideoStreamTypeSub: Auxiliary stream. |
1405
-
1406
- > **Note**
1407
- >
1408
-
1409
- > 1. It is recommended to call the generateCustomPTS interface to get the timestamp value of the frame after capturing a video frame, to achieve the best audio-video synchronization.
1410
- >
1411
-
1412
- > 2. The final frame rate of the encoded video by the SDK is determined by the FPS you set in setVideoEncoderParam, not by the frequency at which you call this interface.
1413
- >
1414
-
1415
- > 3. Please try to keep the intervals between calls to this interface uniform. Otherwise, it may cause unstable encoder output frame rates or audio-video asynchrony.
1416
- >
1417
-
1418
- > 4. iOS and Mac platforms currently support video frames in TRTCVideoPixelFormat_I420 or TRTCVideoPixelFormat_BGRA32 format.
1419
- >
1420
-
1421
- > 5. Windows and Android platforms currently support video frames in TRTCVideoPixelFormat_I420 format only.
1422
- >
1423
-
1424
- ## enableCustomAudioCapture
1425
-
1426
- #### Enable Custom Audio Capturing Mode
1427
-
1428
- After enabling this mode, the SDK will no longer run the original audio capture process, meaning it will stop capturing audio data from the microphone and only retain audio encoding and sending capabilities.
1429
-
1430
- You need to continuously feed the SDK with your own collected audio data through sendCustomAudioData.
1431
- | Parameters | Description |
1432
- | --- | --- |
1433
- | enable | Whether to enable, default value: false. |
1434
-
1435
- > **Note**
1436
- >
1437
-
1438
- > As Echo Cancellation (AEC) requires strict control over the timing of audio capture and playback, enabling custom audio capture may result in AEC capabilities becoming ineffective.
1439
- >
1440
-
1441
- ## sendCustomAudioData
1442
-
1443
- #### Submit Self-collected Audio Data to the SDK
1444
-
1445
- Parameter TRTCAudioFrame is recommended to be filled as follows (other fields do not need to be filled):
1446
- - audioFormat: Audio data format, only supports TRTCAudioFrameFormatPCM.
1447
-
1448
- - data: Audio frame buffer. Audio frame data only supports PCM format, with frame lengths ranging from [5ms ~ 100ms]. A frame length of 20ms is recommended. Calculation method: [48000 sampling rate, mono channel frame length: 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes].
1449
-
1450
- - sampleRate: Sampling rate, supported values are 16000, 24000, 32000, 44100, 48000.
1451
-
1452
- - channel: Number of channels (if stereo, data is interleaved), mono: 1; stereo: 2.
1453
-
1454
- - timestamp: Timestamp, in milliseconds (ms). Please use the timestamp recorded when the audio frame is captured (you can get the timestamp by calling generateCustomPTS after capturing an audio frame).
1455
-
1456
- Refer to documentation: [Custom Collection and Rendering](https://cloud.tencent.com/document/product/647/74692).
1457
- | Parameters | Description |
1458
- | --- | --- |
1459
- | frame | Audio Data |
1460
-
1461
- > **Note**
1462
- >
1463
-
1464
- > Please call this interface accurately at intervals corresponding to the duration of each frame. Feeding data at uneven intervals is likely to cause audio stutter.
1465
- >
1466
-
1467
- ## enableMixExternalAudioFrame
1468
-
1469
- #### Enable/Disable Custom Audio Track
1470
-
1471
- Once enabled, you can use this interface to mix a Custom Audio Track into the SDK. With two boolean parameters, you can control whether the track should play remotely and locally.
1472
- | Parameters | Description |
1473
- | --- | --- |
1474
- | enablePlayout | Control whether the mixed audio track should be played locally. Default value: false. |
1475
- | enablePublish | Control whether the mixed audio track should be played remotely. Default value: false. |
1476
-
1477
- > **Note**
1478
- >
1479
-
1480
- > If you set both enablePublish and enablePlayout parameters to false, it means you completely disable your custom audio track.
1481
- >
1482
-
1483
- ## mixExternalAudioFrame
1484
-
1485
- #### Mix Custom Audio Track into the SDK
1486
-
1487
- Before calling this interface, you need to enable the Custom Audio Track with enableMixExternalAudioFrame first. After that, you can use this interface to mix your own audio track into the SDK in PCM format.
1488
-
1489
- Ideally, we expect your code to provide track data to the SDK at a very consistent rate. However, we understand that maintaining perfect call intervals is a significant challenge.
1490
-
1491
- Therefore, the SDK will initiate a buffer for audio track data internally. This buffer acts like a "reservoir", capable of temporarily storing the audio track data you input, smoothing out the jitter caused by intervals between interface calls.
1492
-
1493
- The return value of this interface represents the size of this track buffer zone, measured in milliseconds (ms). For example: if this interface returns 50, it means the current track buffer zone has 50ms worth of track data. Therefore, as long as you call this interface again within 50ms, the SDK can ensure the continuity of your mixed track data.
1494
-
1495
- When you call this interface, if you find the return value > 100ms, you can wait for one frame of audio playback time before calling again; if the return value < 100ms, it means the buffer is relatively small, you can mix in some more audio track data to ensure the size of the audio track buffer remains above the "safe level".
1496
-
1497
- Parameter TRTCAudioFrame is recommended to be filled as follows (other fields do not need to be filled):
1498
- - data: Audio frame buffer. Audio frame data only supports PCM format, with frame lengths ranging from [5ms ~ 100ms]. A frame length of 20ms is recommended. Calculation method: [48000 sampling rate, mono channel frame length: 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes].
1499
-
1500
- - sampleRate: Sampling rate, supported values are 16000, 24000, 32000, 44100, 48000.
1501
-
1502
- - channel: Number of channels (if stereo, data is interleaved), mono: 1; stereo: 2.
1503
-
1504
- - timestamp: Timestamp, in milliseconds (ms). Please use the timestamp recorded when the audio frame is captured (you can get the timestamp by calling generateCustomPTS after capturing an audio frame).
1505
-
1506
- | Parameters | Description |
1507
- | --- | --- |
1508
- | frame | Audio Data |
1509
-
1510
- > **Note**
1511
- >
1512
-
1513
- > Please call this interface accurately at intervals corresponding to the duration of each frame. Feeding data at uneven intervals is likely to cause audio stutter.
1514
- >
1515
-
1516
- #### Return value description:
1517
-
1518
- >= 0 Buffered length, unit: ms. < 0 Error (-1 mixExternalAudioFrame not enabled)
1519
-
1520
- ## setMixExternalAudioVolume
1521
-
1522
- #### Set the Streaming Volume and Playback Volume for External Audio Mixed During Streaming
1523
- | Parameters | Description |
1524
- | --- | --- |
1525
- | playoutVolume | Set the playback volume level, ranging from 0 to 100. -1 means no change. |
1526
- | publishVolume | Set the streaming volume level, ranging from 0 to 100. -1 means no change. |
1527
-
1528
- ## generateCustomPTS
1529
-
1530
- #### Generate Timestamp for Custom Capturing
1531
-
1532
- This interface is only applicable to custom capturing mode, used to solve the issue of audio and video out of sync caused by the discrepancy between capture time and delivery time.
1533
-
1534
- When you use interfaces such as sendCustomVideoData or sendCustomAudioData for custom video or audio capturing, please follow these steps to use this interface:
1535
-
1536
- 1. First, when capturing a video or audio frame, call this interface to obtain the PTS timestamp of that moment.
1537
-
1538
- 2. Then, you can send the video or audio frame to the preprocessing module you use (such as third-party beauty components or third-party audio effect components).
1539
-
1540
- 3. When actually calling sendCustomVideoData or sendCustomAudioData for streaming, please assign the PTS timestamp recorded during capture to the timestamp field in TRTCVideoFrame or TRTCAudioFrame.
1541
-
1542
- #### Return value description:
1543
-
1544
- Timestamp (unit: ms)
1545
-
1546
- ## enableLocalVideoCustomProcess
1547
-
1548
- #### .1 Enable third-party beauty filter for video
1549
-
1550
- Once enabled, you can use ITRTCVideoFrameCallback to obtain image frames of specified pixel format and video data structure type.
1551
- | Parameters | Description |
1552
- | --- | --- |
1553
- | bufferType | Specifying video data structure type. |
1554
- | enable | Enable third-party video beautification, disabled by default. |
1555
- | pixelFormat | Specify the pixel format for the callback. |
1556
-
1557
- #### Return value description:
1558
-
1559
- 0: Success; <0: Error
1560
-
1561
- ## setLocalVideoCustomProcessCallback
1562
-
1563
- #### .2 Set video data callback for third-party beauty filter
1564
-
1565
- After setting this callback, the SDK will output the collected video frames through the callback you set for secondary processing by third-party beauty filter components. The SDK will then encode and send the processed video frames.
1566
- | Parameters | Description |
1567
- | --- | --- |
1568
- | callback | Custom beauty filter callback. See ITRTCVideoFrameCallback. |
1569
-
1570
- ## setLocalVideoRenderCallback
1571
-
1572
- #### Set Local Video Custom Rendering Callback
1573
-
1574
- After setting this callback, the SDK will skip the original rendering process and return the captured data. You need to handle the rendering yourself.
1575
- - You can stop the callback by calling setLocalVideoRenderCallback(TRTCVideoPixelFormat_Unknown, TRTCVideoBufferType_Unknown, nullptr).
1576
-
1577
- - iOS, Mac, and Windows platforms currently support video frames in TRTCVideoPixelFormat_I420 or TRTCVideoPixelFormat_BGRA32 pixel formats.
1578
-
1579
- - Android platform currently supports video frames in TRTCVideoPixelFormat_I420, TRTCVideoPixelFormat_RGBA32, or TRTCVideoPixelFormat_Texture_2D pixel formats.
1580
-
1581
- | Parameters | Description |
1582
- | --- | --- |
1583
- | bufferType | Specifying video data structure type |
1584
- | callback | Set Definition Rendering Callback |
1585
- | pixelFormat | Specify the pixel format for callback |
1586
-
1587
- #### Return value description:
1588
-
1589
- 0: Success; <0: Error
1590
-
1591
- ## setRemoteVideoRenderCallback
1592
-
1593
- #### Sets the rendering callback for remote video self-definition
1594
-
1595
- After setting this callback, the SDK will skip the original rendering process and return the captured data. You need to handle the rendering yourself.
1596
- - You can stop the callback by calling setRemoteVideoRenderCallback(TRTCVideoPixelFormat_Unknown, TRTCVideoBufferType_Unknown, nullptr).
1597
-
1598
- - iOS, Mac, and Windows platforms currently support video frames in TRTCVideoPixelFormat_I420 or TRTCVideoPixelFormat_BGRA32 pixel formats.
1599
-
1600
- - Android platform currently supports video frames in TRTCVideoPixelFormat_I420, TRTCVideoPixelFormat_RGBA32, or TRTCVideoPixelFormat_Texture_2D pixel formats.
1601
-
1602
- | Parameters | Description |
1603
- | --- | --- |
1604
- | bufferType | Specifying video data structure type, currently only supports TRTCVideoBufferType_Buffer |
1605
- | callback | Set Definition Rendering Callback |
1606
- | pixelFormat | Specify the pixel format for callback |
1607
- | userId | Remote user ID |
1608
-
1609
- > **Note**
1610
- >
1611
-
1612
- > In actual use, you need to call startRemoteView(userid, nullptr) to get the remote user's video stream (set view to nullptr), otherwise, no data will be called back.
1613
- >
1614
-
1615
- #### Return value description:
1616
-
1617
- 0: Success; <0: Error
1618
-
1619
- ## setAudioFrameCallback
1620
-
1621
- #### Sets the audio data self-definition callback
1622
-
1623
- After setting this callback, the SDK will internally callback the audio data (PCM format), including:
1624
- - onCapturedAudioFrame: Audio data callback captured by the local microphone
1625
-
1626
- - onLocalProcessedAudioFrame: Audio data callback captured locally and preprocessed by the audio module
1627
-
1628
- - onPlayAudioFrame: Audio data of each remote user before mixing
1629
-
1630
- - onMixedPlayAudioFrame: Audio data callback after mixing various audio streams and finally to be played by the system
1631
-
1632
- > **Note**
1633
- >
1634
-
1635
- > Setting the callback to null means stopping the Definition audio callback; vice versa, setting the callback to non-null means starting the Definition audio callback.
1636
- >
1637
-
1638
- ## setCapturedAudioFrameCallbackFormat
1639
-
1640
- #### Sets the callback format for audio frames captured by the local microphone
1641
-
1642
- This interface is used to set the format of the AudioFrame callback for onCapturedAudioFrame:
1643
- - sampleRate: Sampling rate, supported values are 16000, 32000, 44100, 48000.
1644
-
1645
- - channel: Number of channels (if stereo, data is interleaved), mono: 1; stereo: 2.
1646
-
1647
- - samplesPerCall: Number of sampling points, Definition callback data frame length. The frame length must be an integer multiple of 10ms.
1648
-
1649
- If you want to calculate the callback frame length in milliseconds, the formula to convert milliseconds to sampling points is: sampling points = milliseconds * sampling rate / 1000.
1650
-
1651
- Example: For a 48000 sampling rate and a desired callback frame length of 20ms, the number of sampling points should be: 960 = 20 * 48000 / 1000.
1652
- | Parameters | Description |
1653
- | --- | --- |
1654
- | format | Audio Data Callback Format. |
1655
-
1656
- > **Note**
1657
- >
1658
-
1659
- > The final callback frame length is in bytes. The formula to convert sampling points to bytes is: Byte Count = Sampling Points * Channels * 2 (Bit Width). Example: For a 48000 sampling rate, stereo, and 20ms frame length, the number of sampling points is 960, and the byte count is 3840 = 960 * 2 * 2
1660
- >
1661
-
1662
- #### Return value description:
1663
-
1664
- 0: Success; <0: Error
1665
-
1666
- ## setLocalProcessedAudioFrameCallbackFormat
1667
-
1668
- #### Sets the callback format for local audio frames after preprocessing
1669
-
1670
- This interface is used to set the format of the AudioFrame callback for onLocalProcessedAudioFrame:
1671
- - sampleRate: Sampling rate, supported values are 16000, 32000, 44100, 48000.
1672
-
1673
- - channel: Number of channels (if stereo, data is interleaved), mono: 1; stereo: 2.
1674
-
1675
- - samplesPerCall: Number of sampling points, Definition callback data frame length. The frame length must be an integer multiple of 10ms.
1676
-
1677
- If you want to calculate the callback frame length in milliseconds, the formula to convert milliseconds to sampling points is: sampling points = milliseconds * sampling rate / 1000.
1678
-
1679
- Example: For a 48000 sampling rate and a desired callback frame length of 20ms, the number of sampling points should be: 960 = 20 * 48000 / 1000.
1680
- | Parameters | Description |
1681
- | --- | --- |
1682
- | format | Audio Data Callback Format. |
1683
-
1684
- > **Note**
1685
- >
1686
-
1687
- > The final callback frame length is in bytes. The formula to convert sampling points to bytes is: Byte Count = Sampling Points * Channels * 2 (Bit Width). Example: For a 48000 sampling rate, stereo, and 20ms frame length, the number of sampling points is 960, and the byte count is 3840 = 960 * 2 * 2
1688
- >
1689
-
1690
- #### Return value description:
1691
-
1692
- 0: Success; <0: Error
1693
-
1694
- ## setMixedPlayAudioFrameCallbackFormat
1695
-
1696
- #### Sets the callback format for audio frames that will eventually be played by the system
1697
-
1698
- This interface is used to set the format of the AudioFrame callback for onMixedPlayAudioFrame:
1699
- - sampleRate: Sampling rate, supported values are 16000, 32000, 44100, 48000.
1700
-
1701
- - channel: Number of channels (if stereo, data is interleaved), mono: 1; stereo: 2.
1702
-
1703
- - samplesPerCall: Number of sampling points, Definition callback data frame length. The frame length must be an integer multiple of 10ms.
1704
-
1705
- If you want to calculate the callback frame length in milliseconds, the formula to convert milliseconds to sampling points is: sampling points = milliseconds * sampling rate / 1000.
1706
-
1707
- Example: For a 48000 sampling rate and a desired callback frame length of 20ms, the number of sampling points should be: 960 = 20 * 48000 / 1000.
1708
- | Parameters | Description |
1709
- | --- | --- |
1710
- | format | Audio Data Callback Format. |
1711
-
1712
- > **Note**
1713
- >
1714
-
1715
- > The final callback frame length is in bytes. The formula to convert sampling points to bytes is: Byte Count = Sampling Points * Channels * 2 (Bit Width). Example: For a 48000 sampling rate, stereo, and 20ms frame length, the number of sampling points is 960, and the byte count is 3840 = 960 * 2 * 2
1716
- >
1717
-
1718
- #### Return value description:
1719
-
1720
- 0: Success; <0: Error
1721
-
1722
- ## enableCustomAudioRendering
1723
-
1724
- #### Enable self-definition audio playback
1725
-
1726
- If you need to connect specific audio devices or want to control the audio playback logic yourself, you can enable Custom Playback through this interface.
1727
-
1728
- After enabling Custom Playback, the SDK will no longer use the system's audio interface to play data. You need to get the audio frame that the SDK wants to play through getCustomAudioRenderingFrame and play it yourself.
1729
- | Parameters | Description |
1730
- | --- | --- |
1731
- | enable | Whether to enable Custom Playback is off by default. |
1732
-
1733
- > **Note**
1734
- >
1735
-
1736
- > You need to set it before entering the room for it to take effect. It is not supported to set it after entering the room.
1737
- >
1738
-
1739
- ## getCustomAudioRenderingFrame
1740
-
1741
- #### Get playable audio data
1742
-
1743
- Before calling this interface, you need to enable Custom Playback through enableCustomAudioRendering first.
1744
-
1745
- Parameter TRTCAudioFrame is recommended to be filled as follows (other fields do not need to be filled):
1746
- - sampleRate: Sampling rate, required, supported values are 16000, 24000, 32000, 44100, 48000.
1747
-
1748
- - channel: Number of channels, required. Fill in 1 for mono, 2 for stereo. The data is interleaved for stereo.
1749
-
1750
- - data: Buffer for obtaining audio data. You need to allocate the memory size of data according to the frame length of an audio frame. The obtained PCM data supports frame lengths of 10ms or 20ms. It is recommended to use a frame length of 20ms.
1751
-
1752
- Calculation formula: Sampling rate x Playback duration x Number of channels x 2 (bytes per sample). For example, for a frame of audio with a sampling rate of 48000, mono channel, and a playback duration of 20ms, the buffer size is 48000 × 0.02s × 1 × 16bit = 15360bit = 1920 bytes.
1753
- | Parameters | Description |
1754
- | --- | --- |
1755
- | audioFrame | Audio data frame. |
1756
-
1757
- > **Note**
1758
- >
1759
-
1760
- > 1. Parameters sampleRate and channel in audioFrame should be set in advance, and the data space required for the frame length to be read should be allocated.
1761
- >
1762
-
1763
- > 2. The SDK will automatically fill the data according to sampleRate and channel.
1764
- >
1765
-
1766
- > 3. It is recommended to call this function driven by the system's audio playback thread. After playing one frame of audio, call this API to get the next playable frame of audio data.
1767
- >
1768
-
1769
- ## sendCustomCmdMsg
1770
-
1771
- #### Sends a custom message using UDP channel to all users in a room
1772
-
1773
- This interface allows you to use TRTC's UDP Channel to broadcast custom data to other users in the room, achieving the purpose of transmitting signaling.
1774
-
1775
- Other users in the room can receive messages through the onRecvCustomCmdMsg callback in ITRTCCloudCallback.
1776
- | Parameters | Description |
1777
- | --- | --- |
1778
- | cmdID | Message ID, the value range is 1 - 10. |
1779
- | data | Message to be sent, the maximum length of a single message is limited to 1KB. |
1780
- | ordered | Whether orderly sending is enabled, i.e., whether the order of data packets at the receiver matches the order at the sender (this will cause some reception delay). |
1781
- | reliable | Whether reliable transmission is enabled. Reliable transmission offers a higher success rate but will cause higher reception delays compared to unreliable transmission. |
1782
-
1783
- > **Note**
1784
- >
1785
-
1786
- > 1. Sending messages to all users in the room (currently not supporting Web/Mini program end), up to 30 messages per second.
1787
- >
1788
-
1789
- > 2. Each data packet can be up to 1KB. If it exceeds this size, it is very likely to be discarded by intermediate routers or servers.
1790
- >
1791
-
1792
- > 3. Each client can send up to 8 KB of data per second.
1793
- >
1794
-
1795
- > Please set both reliable and ordered to true or both to false. Interleaved settings are not supported.
1796
- >
1797
-
1798
- > 5. It is strongly recommended to set different types of messages with different cmdIDs. This can reduce message latency when ordering is required.
1799
- >
1800
-
1801
- > 6. Currently, only anchor roles are supported.
1802
- >
1803
-
1804
- #### Return value description:
1805
-
1806
- true: Message has been sent; false: Message sending failed.
1807
-
1808
- ## sendSEIMsg
1809
-
1810
- #### Sends a custom message using SEI channel to all users in a room
1811
-
1812
- This interface allows you to broadcast self-defined data to other users in the current room using TRTC's SEI channel to achieve signaling transmission.
1813
-
1814
- There is a header data block called SEI in the video frame header. The principle of this interface is to use this SEI header data block to embed the self-defined signaling you want to send, so it is sent out along with the video frame.
1815
-
1816
- Therefore, compared to sendCustomCmdMsg, signaling transmitted via the SEI channel has better compatibility: the signaling can be transmitted along with the video frame all the way to the live CDN.
1817
-
1818
- However, because the data block in the video frame header cannot be too large, it is recommended to control the signaling size to just a few bytes when using this interface.
1819
-
1820
- The most common usage is to embed a self-defined timestamp (timestamp) into the video frame using this interface to achieve perfect alignment of messages and screen (e.g., in educational scenarios for aligning courseware and video signals).
1821
-
1822
- Other users in the room can receive messages through the onRecvSEIMsg callback in ITRTCCloudCallback.
1823
- | Parameters | Description |
1824
- | --- | --- |
1825
- | data | Data to be sent, which can contain up to 1 KB (1,000 bytes) of data |
1826
- | repeatCount | Number of data sends |
1827
-
1828
- > **Note**
1829
- >
1830
-
1831
- > This interface has the following limitations:
1832
- >
1833
-
1834
- > 1. Data will not be sent immediately after the API invocation, but will be sent along with the next video frame.
1835
- >
1836
-
1837
- > 2. Send messages to all users in the room, up to 30 messages per second (shared limit with sendCustomCmdMsg).
1838
- >
1839
-
1840
- > 3. Each package is a maximum of 1 KB. Sending large amounts of data will increase the video bitrate and possibly cause reduced image quality or lag (shared limit with sendCustomCmdMsg).
1841
- >
1842
-
1843
- > 4. Each client can send up to 8 KB of data per second (shared limit with sendCustomCmdMsg).
1844
- >
1845
-
1846
- > 5. If multiple sends are specified (repeatCount > 1), the data will be sent with the subsequent repeatCount number of video frames, which will also increase the video bitrate.
1847
- >
1848
-
1849
- > 6. If repeatCount > 1 and there are multiple sends, the onRecvSEIMsg callback may receive the same message multiple times, and deduplication is needed.
1850
- >
1851
-
1852
- #### Return value description:
1853
-
1854
- true: Message has passed the restriction, waiting for subsequent video frame to be sent; false: Message is restricted from being sent
1855
-
1856
- ## startSpeedTest
1857
-
1858
- #### Start internet speed test (use before entering the room)
1859
- | Parameters | Description |
1860
- | --- | --- |
1861
- | params | Speed Test Options |
1862
-
1863
- > **Note**
1864
- >
1865
-
1866
- > 1. The speed test process will incur a small basic service fee. For details, refer to [Billing Overview > Basic Service](https://cloud.tencent.com/document/product/647/17157#.E5.9F.BA.E7.A1.80.E6.9C.8D.E5.8A.A1) documentation.
1867
- >
1868
-
1869
- > 2. Please perform the internet speed test before entering the room. Conducting the test in the room will affect normal audio and video transmission and will also be inaccurate due to too much interference.
1870
- >
1871
-
1872
- > 3. Only one internet speed test task is allowed to run at the same time.
1873
- >
1874
-
1875
- #### Return value description:
1876
-
1877
- API Invocation Result, < 0: Failure
1878
-
1879
- ## stopSpeedTest
1880
-
1881
- #### Stops network speed testing
1882
-
1883
- ## getSDKVersion
1884
-
1885
- #### Obtains the SDK version.
1886
-
1887
- ## setLogLevel
1888
-
1889
- #### Sets the log output level.
1890
- | Parameters | Description |
1891
- | --- | --- |
1892
- | level | Refer to TRTCLogLevel, default value: TRTCLogLevelNone |
1893
-
1894
- ## setConsoleEnabled
1895
-
1896
- #### Enables/Disables console log print.
1897
- | Parameters | Description |
1898
- | --- | --- |
1899
- | enabled | Specify whether to enable it. Default: Disabled. |
1900
-
1901
- ## setLogCompressEnabled
1902
-
1903
- #### Enables/Disables local log compression
1904
-
1905
- After enabling compression, the log storage volume is significantly reduced, but you need to use a Python script provided by Tencent Cloud to decompress and read it.
1906
-
1907
- After disabling compression, logs are stored in plaintext, which can be opened and read directly with Notepad but occupy more space.
1908
- | Parameters | Description |
1909
- | --- | --- |
1910
- | enabled | Specify whether to enable it. Default: Enabled |
1911
-
1912
- ## setLogDirPath
1913
-
1914
- #### Sets the save path for local logs
1915
-
1916
- This interface allows you to change the default storage path of SDK local logs. The default local log storage locations are:
1917
- - Windows platform: C:/Users/[system username]/AppData/Roaming/liteav/log, i.e., %appdata%/liteav/log.
1918
-
1919
- - iOS or Mac platform: sandbox Documents/log.
1920
-
1921
- - Android platform: /app private directory/files/log/liteav/.
1922
-
1923
- | Parameters | Description |
1924
- | --- | --- |
1925
- | path | Storage path for logs |
1926
-
1927
- > **Note**
1928
- >
1929
-
1930
- > Make sure to call this before all other interfaces and ensure that the specified directory exists and that your application has read and write permissions for that directory.
1931
- >
1932
-
1933
- ## setLogCallback
1934
-
1935
- #### Log callback
1936
-
1937
- ## showDebugView
1938
-
1939
- #### Show Dashboard
1940
-
1941
- The "Dashboard" is a semi-transparent debug information overlay located above the video rendering control, used to display audio and video information and event information, aiding in integration and debugging.
1942
- | Parameters | Description |
1943
- | --- | --- |
1944
- | showType | 0: Do not display; 1: Display simplified edition (audio and video information only); 2: Display full version (including audio and video information and event information). |
1945
-
1946
- ## callExperimentalAPI
1947
-
1948
- #### Calls an experimental API.
1949
-
1950
- ## enablePayloadPrivateEncryption
1951
-
1952
- #### Enable or disable media stream private encryption
1953
-
1954
- In scenarios with high security requirements, TRTC recommends calling the enablePayloadPrivateEncryption method to enable media stream private encryption before joining a room.
1955
-
1956
- After the user leaves the room, the SDK will automatically disable private encryption. If you need to re-enable private encryption, you must call this method before the user rejoins the room.
1957
- | Parameters | Description |
1958
- | --- | --- |
1959
- | config | For configuring the media stream private encryption algorithm and key, refer to TRTCPayloadPrivateEncryptionConfig. |
1960
- | enabled | Whether to enable media stream private encryption. |
1961
-
1962
- > **Note**
1963
- >
1964
-
1965
- > TRTC already encrypts media streams before transmission. When media stream private encryption is enabled, it will use the key and initialization vector you provided for additional encryption.
1966
- >
1967
-
1968
- #### Return value description:
1969
-
1970
- API invocation results: 0: Method call successful, -1: Invalid input parameter, -2: Feature expired. To unlock: Please visit the Chinese mainland site to activate the [TRTC Enterprise Edition Package](https://buy.cloud.tencent.com/trtc?tab=month&trtcversion=ultimate), and submit an [application](https://cloud.tencent.com/apply/p/diifjcmffhw). You can use it upon approval.