@tencent-rtc/mcp 1.6.4 → 1.6.6

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 (251) hide show
  1. package/knowledge/chunker.js +83 -54
  2. package/knowledge/path-meta.js +179 -26
  3. package/knowledge/search/exact-lookup.js +168 -10
  4. package/knowledge/search/filter-pool.js +73 -19
  5. package/knowledge/search/product-scope-intent.js +2 -2
  6. package/knowledge/search/requires-framework.js +2 -2
  7. package/knowledge/search/search-knowledge.js +247 -61
  8. package/package.json +1 -1
  9. package/resource/index/manifest.json +1 -1
  10. package/resource/integration/callkit/preset/android/integration.md +2 -4
  11. package/resource/integration/callkit/preset/flutter/integration.md +4 -5
  12. package/resource/integration/callkit/preset/ios/integration.md +1 -4
  13. package/resource/integration/callkit/preset/react/integration.md +13 -20
  14. package/resource/integration/callkit/preset/vue/integration.md +14 -21
  15. package/resource/integration/chat/preset/android/integration.md +6 -9
  16. package/resource/integration/chat/preset/flutter/integration.md +9 -12
  17. package/resource/integration/chat/preset/ios/integration.md +2 -4
  18. package/resource/integration/chat/preset/react/integration.md +0 -10
  19. package/resource/integration/livekit/preset/live/android/live-audience-integration.md +129 -0
  20. package/resource/integration/livekit/preset/live/android/live-host-integration.md +219 -0
  21. package/resource/integration/livekit/preset/live/android/live-list-integration.md +261 -0
  22. package/resource/integration/livekit/preset/live/android/prepare-integration.md +254 -0
  23. package/resource/integration/livekit/preset/live/ios/live-audience-integration.md +202 -0
  24. package/resource/integration/livekit/preset/live/ios/live-host-integration.md +369 -0
  25. package/resource/integration/livekit/preset/live/ios/live-list-integration.md +229 -0
  26. package/resource/integration/livekit/preset/live/ios/prepare-integration.md +204 -0
  27. package/resource/integration/livekit/preset/live/vue/live-list-integration.md +0 -3
  28. package/resource/integration/livekit/preset/live/vue/live-player-desk-integration.md +0 -5
  29. package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +0 -6
  30. package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +5 -10
  31. package/resource/integration/roomkit/preset/vue/integration.md +0 -4
  32. package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +80 -0
  33. package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +24 -0
  34. package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +116 -0
  35. package/resource/knowledge/callkit/core-sdk/android/answer-call.md +7 -8
  36. package/resource/knowledge/callkit/core-sdk/android/make-call.md +5 -7
  37. package/resource/knowledge/callkit/core-sdk/android/offline-push.md +3 -5
  38. package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +2 -6
  39. package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +2 -6
  40. package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +4 -9
  41. package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1 -4
  42. package/resource/knowledge/callkit/core-sdk/ios/make-call.md +8 -11
  43. package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +17 -23
  44. package/resource/knowledge/callkit/core-sdk/web/call-engine.md +33 -0
  45. package/resource/knowledge/callkit/core-sdk/web/call-event.md +327 -0
  46. package/resource/knowledge/callkit/core-sdk/web/callengine-api-overview.md +33 -0
  47. package/resource/knowledge/callkit/faq/android.md +0 -2
  48. package/resource/knowledge/callkit/faq/error-code.md +0 -2
  49. package/resource/knowledge/callkit/faq/flutter.md +2 -2
  50. package/resource/knowledge/callkit/faq/ios.md +3 -5
  51. package/resource/knowledge/callkit/faq/web.md +2 -3
  52. package/resource/knowledge/callkit/preset/android/api.md +2 -5
  53. package/resource/knowledge/callkit/preset/ios/api.md +0 -2
  54. package/resource/knowledge/callkit/preset/react/api.md +445 -0
  55. package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +445 -0
  56. package/resource/knowledge/callkit/preset/vue/api.md +465 -0
  57. package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +465 -0
  58. package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +16 -0
  59. package/resource/knowledge/chat/preset/android/features/chat-setting.md +1 -1
  60. package/resource/knowledge/chat/preset/android/features/conversation-list.md +1 -1
  61. package/resource/knowledge/chat/preset/android/features/language.md +0 -1
  62. package/resource/knowledge/chat/preset/android/features/message-input.md +1 -1
  63. package/resource/knowledge/chat/preset/android/features/message-list.md +2 -3
  64. package/resource/knowledge/chat/preset/android/features/search.md +0 -1
  65. package/resource/knowledge/chat/preset/android/features/theme.md +1 -1
  66. package/resource/knowledge/chat/preset/android-view/integration.md +3 -11
  67. package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +0 -1
  68. package/resource/knowledge/chat/preset/flutter/features/message-list.md +1 -2
  69. package/resource/knowledge/chat/preset/flutter/features/search.md +5 -6
  70. package/resource/knowledge/chat/preset/flutter/features/theme.md +2 -2
  71. package/resource/knowledge/chat/preset/ios/features/chat-setting.md +1 -1
  72. package/resource/knowledge/chat/preset/ios/features/conversation-list.md +1 -2
  73. package/resource/knowledge/chat/preset/ios/features/message-list.md +1 -2
  74. package/resource/knowledge/chat/preset/ios/features/search.md +0 -1
  75. package/resource/knowledge/chat/preset/ios-uikit/integration.md +13 -15
  76. package/resource/knowledge/chat/preset/react/features/conversation-list.md +5 -5
  77. package/resource/knowledge/chat/preset/react/features/message-input.md +2 -3
  78. package/resource/knowledge/chat/preset/react/features/search.md +0 -1
  79. package/resource/knowledge/chat/preset/react/features/theme.md +0 -1
  80. package/resource/knowledge/chat/urls/sdk/android.md +3 -3
  81. package/resource/knowledge/chat/urls/sdk/flutter.md +3 -3
  82. package/resource/knowledge/chat/urls/sdk/ios.md +3 -3
  83. package/resource/knowledge/chat/urls/sdk/web.md +3 -3
  84. package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +7 -14
  85. package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +5 -8
  86. package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +15 -18
  87. package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +1 -2
  88. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +15 -20
  89. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +10 -13
  90. package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +2 -4
  91. package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +4 -6
  92. package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +2 -4
  93. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +2 -4
  94. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +1 -2
  95. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +8 -10
  96. package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +5 -7
  97. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +7 -14
  98. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +6 -9
  99. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +1 -2
  100. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +15 -18
  101. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +15 -20
  102. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +10 -13
  103. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +2 -4
  104. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +4 -6
  105. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +2 -4
  106. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +2 -4
  107. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +1 -2
  108. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +8 -10
  109. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +3 -5
  110. package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +7 -14
  111. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +5 -8
  112. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +1 -2
  113. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +6 -9
  114. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +5 -10
  115. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +3 -6
  116. package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +2 -4
  117. package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +4 -6
  118. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +2 -4
  119. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +2 -4
  120. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +1 -2
  121. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +4 -6
  122. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +3 -5
  123. package/resource/knowledge/livekit/core-sdk/api-reference/{web → vue}/index.md +24 -24
  124. package/resource/knowledge/livekit/core-sdk/{voice/android/voice-audio-effect.md → features/android/audio-effect.md} +1 -2
  125. package/resource/knowledge/livekit/core-sdk/{live/android/live-gift.md → features/android/gift.md} +2 -3
  126. package/resource/knowledge/livekit/core-sdk/{voice/android/voice-room-list.md → features/android/live-list.md} +2 -4
  127. package/resource/knowledge/livekit/core-sdk/{live/flutter/live-audio-effect.md → features/flutter/audio-effect.md} +0 -2
  128. package/resource/knowledge/livekit/core-sdk/{voice/flutter/voice-barrage.md → features/flutter/barrage.md} +2 -2
  129. package/resource/knowledge/livekit/core-sdk/{live/flutter/live-gift.md → features/flutter/gift.md} +2 -3
  130. package/resource/knowledge/livekit/core-sdk/{voice/flutter/voice-room-list.md → features/flutter/live-list.md} +1 -1
  131. package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-audience-list.md → features/ios/audience-list.md} +1 -2
  132. package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-audio-effect.md → features/ios/audio-effect.md} +1 -3
  133. package/resource/knowledge/livekit/core-sdk/{live/ios/live-base-beauty.md → features/ios/base-beauty.md} +2 -2
  134. package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-gift.md → features/ios/gift.md} +2 -3
  135. package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-room-list.md → features/ios/live-list.md} +2 -4
  136. package/resource/knowledge/livekit/core-sdk/live/android/{live-co-guest-interaction.md → co-guest-interaction.md} +0 -1
  137. package/resource/knowledge/livekit/core-sdk/live/android/{live-host-interaction.md → host-interaction.md} +5 -7
  138. package/resource/knowledge/livekit/core-sdk/live/android/{live-integration.md → integration.md} +3 -6
  139. package/resource/knowledge/livekit/core-sdk/live/flutter/{live-co-guest-interaction.md → co-guest-interaction.md} +1 -1
  140. package/resource/knowledge/livekit/core-sdk/live/flutter/{live-host-interaction.md → host-interaction.md} +0 -2
  141. package/resource/knowledge/livekit/core-sdk/live/flutter/{live-integration.md → integration.md} +1 -4
  142. package/resource/knowledge/livekit/core-sdk/live/ios/{live-co-guest-interaction.md → co-guest-interaction.md} +0 -1
  143. package/resource/knowledge/livekit/core-sdk/live/ios/{live-host-interaction.md → host-interaction.md} +2 -4
  144. package/resource/knowledge/livekit/core-sdk/live/ios/{live-integration.md → integration.md} +2 -5
  145. package/resource/knowledge/livekit/core-sdk/voice/android/{voice-host-interaction.md → host-interaction.md} +3 -5
  146. package/resource/knowledge/livekit/core-sdk/voice/android/{voice-integration.md → integration.md} +3 -6
  147. package/resource/knowledge/livekit/core-sdk/voice/flutter/{voice-co-guest-interaction.md → co-guest-interaction.md} +1 -2
  148. package/resource/knowledge/livekit/core-sdk/voice/flutter/{voice-integration.md → integration.md} +6 -9
  149. package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-co-guest-interaction.md → co-guest-interaction.md} +2 -2
  150. package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-host-interaction.md → host-interaction.md} +4 -6
  151. package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-integration.md → integration.md} +1 -4
  152. package/resource/knowledge/livekit/preset/live/vue/features/barrage.md +0 -2
  153. package/resource/knowledge/push/api-reference/android.md +123 -0
  154. package/resource/knowledge/push/api-reference/flutter.md +176 -0
  155. package/resource/knowledge/push/api-reference/harmonyos.md +138 -0
  156. package/resource/knowledge/push/api-reference/ios.md +176 -0
  157. package/resource/knowledge/push/api-reference/react-native.md +147 -0
  158. package/resource/knowledge/push/api-reference/uni-app.md +147 -0
  159. package/resource/knowledge/push/api-reference/unity.md +119 -0
  160. package/resource/knowledge/push/api-reference/unreal-engine.md +123 -0
  161. package/resource/knowledge/push/config/android.md +4 -7
  162. package/resource/knowledge/push/config/harmonyos.md +0 -3
  163. package/resource/knowledge/push/config/ios.md +12 -20
  164. package/resource/knowledge/push/config/react-native.md +18 -26
  165. package/resource/knowledge/push/config/unity.md +20 -28
  166. package/resource/knowledge/push/config/unreal-engine.md +21 -29
  167. package/resource/knowledge/push/integration/android.md +6 -8
  168. package/resource/knowledge/push/integration/flutter.md +6 -9
  169. package/resource/knowledge/push/integration/harmonyos.md +1 -0
  170. package/resource/knowledge/push/integration/ios.md +7 -9
  171. package/resource/knowledge/push/integration/react-native.md +9 -13
  172. package/resource/knowledge/push/integration/uni-app.md +7 -7
  173. package/resource/knowledge/push/integration/unity.md +10 -13
  174. package/resource/knowledge/push/integration/unreal-engine.md +6 -9
  175. package/resource/knowledge/push/overview/prepare.md +2 -2
  176. package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +3 -3
  177. package/resource/knowledge/roomkit/core-sdk/android/capability-matrix.md +46 -0
  178. package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +1 -1
  179. package/resource/knowledge/roomkit/core-sdk/android/room-state.md +2 -2
  180. package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +6 -6
  181. package/resource/knowledge/roomkit/core-sdk/android/unsupported-features.md +79 -0
  182. package/resource/knowledge/roomkit/core-sdk/flutter/capability-matrix.md +46 -0
  183. package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +1 -1
  184. package/resource/knowledge/roomkit/core-sdk/flutter/unsupported-features.md +79 -0
  185. package/resource/knowledge/roomkit/core-sdk/ios/capability-matrix.md +46 -0
  186. package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +1 -1
  187. package/resource/knowledge/roomkit/core-sdk/ios/unsupported-features.md +79 -0
  188. package/resource/knowledge/roomkit/preset/android/integration.md +5 -7
  189. package/resource/knowledge/roomkit/preset/flutter/integration.md +2 -7
  190. package/resource/knowledge/roomkit/preset/ios/integration.md +3 -9
  191. package/resource/knowledge/roomkit/preset/react/integration.md +12 -16
  192. package/resource/knowledge/trtc/android/TRTCCloud.md +154 -238
  193. package/resource/knowledge/trtc/android/TRTCCloudDef.md +133 -134
  194. package/resource/knowledge/trtc/android/TRTCCloudListener.md +86 -120
  195. package/resource/knowledge/trtc/android/TRTCStatistics.md +10 -10
  196. package/resource/knowledge/trtc/android/TXAudioEffectManager.md +10 -30
  197. package/resource/knowledge/trtc/android/TXBeautyManager.md +25 -25
  198. package/resource/knowledge/trtc/android/TXDeviceManager.md +2 -2
  199. package/resource/knowledge/trtc/android/TXLiteAVCode.md +12 -12
  200. package/resource/knowledge/trtc/c++/ITRTCCloud.md +166 -261
  201. package/resource/knowledge/trtc/c++/ITRTCStatistics.md +12 -12
  202. package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +10 -30
  203. package/resource/knowledge/trtc/c++/ITXDeviceManager.md +9 -11
  204. package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +96 -130
  205. package/resource/knowledge/trtc/c++/TRTCTypeDef.md +122 -123
  206. package/resource/knowledge/trtc/c++/TXLiteAVCode.md +12 -12
  207. package/resource/knowledge/trtc/ios/TRTCCloud.md +168 -255
  208. package/resource/knowledge/trtc/ios/TRTCCloudDef.md +124 -125
  209. package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +89 -124
  210. package/resource/knowledge/trtc/ios/TRTCStatistics.md +10 -10
  211. package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +9 -28
  212. package/resource/knowledge/trtc/ios/TXBeautyManager.md +25 -25
  213. package/resource/knowledge/trtc/ios/TXDeviceManager.md +9 -11
  214. package/resource/knowledge/trtc/ios/TXLiteAVCode.md +12 -12
  215. package/server.js +21 -21
  216. package/tools/common/finalize_answer.js +1 -1
  217. package/tools/common/present_framework_choice.js +2 -2
  218. package/tools/common/search_trtc_knowledge.js +3 -3
  219. package/tools/common/submit_feedback.js +1 -1
  220. package/tools/definitions/get_native_live_uikit_integration_def.js +61 -0
  221. package/tools/definitions/get_native_livekit_core_integration_def.js +3 -3
  222. package/tools/definitions/present_framework_choice_def.js +2 -2
  223. package/tools/definitions/search_trtc_knowledge_def.js +5 -5
  224. package/tools/index.js +2 -0
  225. package/tools/live/get_native_live_uikit_integration.js +69 -0
  226. package/tools/live/get_native_livekit_core_integration.js +6 -6
  227. package/utils/report-cls-client.js +1 -1
  228. package/utils/report-es-client.js +1 -1
  229. package/resource/knowledge/callkit/preset/web/api.md +0 -83
  230. package/resource/knowledge/livekit/core-sdk/live/android/live-audio-effect.md +0 -226
  231. package/resource/knowledge/livekit/core-sdk/live/android/live-live-list.md +0 -438
  232. package/resource/knowledge/livekit/core-sdk/live/flutter/live-barrage.md +0 -490
  233. package/resource/knowledge/livekit/core-sdk/live/flutter/live-live-list.md +0 -726
  234. package/resource/knowledge/livekit/core-sdk/live/ios/live-audience-list.md +0 -264
  235. package/resource/knowledge/livekit/core-sdk/live/ios/live-audio-effect.md +0 -216
  236. package/resource/knowledge/livekit/core-sdk/live/ios/live-gift.md +0 -407
  237. package/resource/knowledge/livekit/core-sdk/live/ios/live-live-list.md +0 -349
  238. package/resource/knowledge/livekit/core-sdk/voice/android/voice-audience-list.md +0 -269
  239. package/resource/knowledge/livekit/core-sdk/voice/android/voice-barrage.md +0 -456
  240. package/resource/knowledge/livekit/core-sdk/voice/android/voice-gift.md +0 -455
  241. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +0 -260
  242. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +0 -598
  243. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +0 -424
  244. package/resource/knowledge/livekit/core-sdk/voice/ios/voice-barrage.md +0 -408
  245. /package/resource/knowledge/livekit/core-sdk/{live/android/live-audience-list.md → features/android/audience-list.md} +0 -0
  246. /package/resource/knowledge/livekit/core-sdk/{live/android/live-barrage.md → features/android/barrage.md} +0 -0
  247. /package/resource/knowledge/livekit/core-sdk/{live/android/live-base-beauty.md → features/android/base-beauty.md} +0 -0
  248. /package/resource/knowledge/livekit/core-sdk/{live/flutter/live-audience-list.md → features/flutter/audience-list.md} +0 -0
  249. /package/resource/knowledge/livekit/core-sdk/{live/flutter/live-base-beauty.md → features/flutter/base-beauty.md} +0 -0
  250. /package/resource/knowledge/livekit/core-sdk/{live/ios/live-barrage.md → features/ios/barrage.md} +0 -0
  251. /package/resource/knowledge/livekit/core-sdk/voice/android/{voice-co-guest-interaction.md → co-guest-interaction.md} +0 -0
@@ -78,7 +78,7 @@
78
78
 
79
79
  **Video resolution.**
80
80
 
81
- Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, ` Portrait ` must be selected for TRTCVideoResolutionMode.
81
+ Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, `Portrait` must be selected for TRTCVideoResolutionMode.
82
82
 
83
83
  |Enum|Value|DESC|
84
84
  |---------|---------|---------|
@@ -107,12 +107,12 @@ Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait
107
107
 
108
108
  **Video aspect ratio mode.**
109
109
 
110
- Only the landscape resolution (e.g., 640x360) is defined in ` TRTCVideoResolution `. If the portrait resolution (e.g., 360x640) needs to be used, ` Portrait ` must be selected for ` TRTCVideoResolutionMode `.
110
+ Only the landscape resolution (e.g., 640x360) is defined in `TRTCVideoResolution` . If the portrait resolution (e.g., 360x640) needs to be used, `Portrait` must be selected for `TRTCVideoResolutionMode` .
111
111
 
112
112
  |Enum|Value|DESC|
113
113
  |---------|---------|---------|
114
- |TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE|0|Landscape resolution, such as ` TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360 `.|
115
- |TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT|1|Portrait resolution, such as ` TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640 `.|
114
+ |TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE|0|Landscape resolution, such as `TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360` .|
115
+ |TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT|1|Portrait resolution, such as `TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640` .|
116
116
 
117
117
  ## TRTCVideoStreamType
118
118
 
@@ -127,7 +127,6 @@ TRTC provides three different video streams, including:
127
127
 
128
128
  > **Note**
129
129
  >
130
-
131
130
  > The SDK does not support enabling the smooth small image alone, which must be enabled together with the big image. It will automatically set the resolution and bitrate of the small image.
132
131
  >
133
132
 
@@ -204,8 +203,8 @@ For custom capturing and rendering features, you need to use the following enume
204
203
  | Enum | Value | DESC |
205
204
  | --- | --- | --- |
206
205
  | TRTC_VIDEO_BUFFER_TYPE_UNKNOWN | 0 | Undefined transfer method |
207
- | TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER | 1 | Use memory buffer to transfer video data. iOS: <code> PixelBuffer </code>; Android: <code> Direct Buffer </code> for JNI layer; Windows: memory data block. |
208
- | TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY | 2 | Use memory buffer to transfer video data. iOS: more compact memory block in <code> NSData </code> type after additional processing; Android: <code> byte[] </code> for Java layer.<br>This transfer method has a lower efficiency than other methods. |
206
+ | TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER | 1 | Use memory buffer to transfer video data. iOS: <code>PixelBuffer</code> ; Android: <code>Direct Buffer</code> for JNI layer; Windows: memory data block. |
207
+ | TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY | 2 | Use memory buffer to transfer video data. iOS: more compact memory block in <code>NSData</code> type after additional processing; Android: <code>byte[]</code> for Java layer.<br>This transfer method has a lower efficiency than other methods. |
209
208
  | TRTC_VIDEO_BUFFER_TYPE_TEXTURE | 3 | Use OpenGL texture to transfer video data |
210
209
 
211
210
  ## TRTCVideoMirrorType
@@ -240,24 +239,24 @@ The SDK can take screenshots from the following two data sources and save them a
240
239
  **Use cases.**
241
240
 
242
241
  TRTC features targeted optimizations for common audio/video application scenarios to meet the differentiated requirements in various verticals. The main scenarios can be divided into the following two categories:
243
- - Live streaming scenario (LIVE): including ` LIVE ` (audio + video) and ` VoiceChatRoom ` (pure audio).
242
+ - Live streaming scenario (LIVE): including `LIVE` (audio + video) and `VoiceChatRoom` (pure audio).
244
243
 
245
244
  In the live streaming scenario, users are divided into two roles: "anchor" and "audience". A single room can sustain up to 100,000 concurrent online users. This is suitable for live streaming to a large audience.
246
- - Real-Time scenario (RTC): including ` VideoCall ` (audio + video) and ` AudioCall ` (pure audio).
245
+ - Real-Time scenario (RTC): including `VideoCall` (audio + video) and `AudioCall` (pure audio).
247
246
 
248
247
  In the real-time scenario, there is no role difference between users, but a single room can sustain only up to 300 concurrent online users. This is suitable for small-scale real-time communication.
249
248
  | Enum | Value | DESC |
250
249
  | --- | --- | --- |
251
250
  | TRTC_APP_SCENE_VIDEOCALL | 0 | In the video call scenario, 720p and 1080p HD image quality is supported. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously.<br>Use cases: [one-to-one video call], [video conferencing with up to 300 participants], [online medical diagnosis], [small class], [video interview], etc. |
252
- | TRTC_APP_SCENE_LIVE | 1 | In the interactive video live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [low-latency interactive live streaming], [big class], [anchor competition], [video dating room], [online interactive classroom], [remote training], [large-scale conferencing], etc.<br><strong>Note</strong><br>In this scenario, you must use the <code> role </code> field in <code> TRTCParams </code> to specify the role of the current user. |
253
- | TRTC_APP_SCENE_AUDIOCALL | 2 | Audio call scenario, where the <code> SPEECH </code> sound quality is used by default. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously.<br>Use cases: [one-to-one audio call], [audio conferencing with up to 300 participants], [audio chat], [online Werewolf], etc. |
254
- | TRTC_APP_SCENE_VOICE_CHATROOM | 3 | In the interactive audio live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [audio club], [online karaoke room], [music live room], [FM radio], etc.<br><strong>Note</strong><br>In this scenario, you must use the <code> role </code> field in <code> TRTCParams </code> to specify the role of the current user. |
251
+ | TRTC_APP_SCENE_LIVE | 1 | In the interactive video live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [low-latency interactive live streaming], [big class], [anchor competition], [video dating room], [online interactive classroom], [remote training], [large-scale conferencing], etc.<br><strong>Note</strong><br>In this scenario, you must use the <code>role</code> field in <code>TRTCParams</code> to specify the role of the current user. |
252
+ | TRTC_APP_SCENE_AUDIOCALL | 2 | Audio call scenario, where the <code>SPEECH</code> sound quality is used by default. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously.<br>Use cases: [one-to-one audio call], [audio conferencing with up to 300 participants], [audio chat], [online Werewolf], etc. |
253
+ | TRTC_APP_SCENE_VOICE_CHATROOM | 3 | In the interactive audio live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [audio club], [online karaoke room], [music live room], [FM radio], etc.<br><strong>Note</strong><br>In this scenario, you must use the <code>role</code> field in <code>TRTCParams</code> to specify the role of the current user. |
255
254
 
256
255
  ## TRTCRoleType
257
256
 
258
257
  **Role.**
259
258
 
260
- Role is applicable only to live streaming scenarios (` TRTCAppSceneLIVE ` and ` TRTCAppSceneVoiceChatRoom `). Users are divided into two roles:
259
+ Role is applicable only to live streaming scenarios ( `TRTCAppSceneLIVE` and `TRTCAppSceneVoiceChatRoom` ). Users are divided into two roles:
261
260
  - Anchor, who can publish their audio/video streams. There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room.
262
261
 
263
262
  - Audience, who can only listen to or watch audio/video streams of anchors in the room. If they want to publish their streams, they need to switch to the "anchor" role first through switchRole. One room can sustain up to 100,000 concurrent online users in the audience role.
@@ -291,7 +290,7 @@ TRTC has two control modes in weak network environments: "ensuring clarity" and
291
290
 
292
291
  **Network quality.**
293
292
 
294
- TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: ` Excellent ` indicates the best, and ` Down ` indicates the worst.
293
+ TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: `Excellent` indicates the best, and `Down` indicates the worst.
295
294
 
296
295
  |Enum|Value|DESC|
297
296
  |---------|---------|---------|
@@ -324,18 +323,18 @@ This enumerated type is used in the audio status changed API onRemoteAudioStatus
324
323
  |Enum|Value|DESC|
325
324
  |---------|---------|---------|
326
325
  |TRTCAVStatusChangeReasonInternal|0|Default value|
327
- |TRTCAVStatusChangeReasonBufferingBegin|1|The stream enters the ` Loading ` state due to network congestion|
328
- |TRTCAVStatusChangeReasonBufferingEnd|2|The stream enters the ` Playing ` state after network recovery|
329
- |TRTCAVStatusChangeReasonLocalStarted|3|As a start-related API was directly called locally, the stream enters the ` Playing ` state|
330
- |TRTCAVStatusChangeReasonLocalStopped|4|As a stop-related API was directly called locally, the stream enters the ` Stopped ` state|
331
- |TRTCAVStatusChangeReasonRemoteStarted|5|As the remote user started (or resumed) publishing the audio or video stream, the stream enters the ` Loading ` or ` Playing ` state|
326
+ |TRTCAVStatusChangeReasonBufferingBegin|1|The stream enters the `Loading` state due to network congestion|
327
+ |TRTCAVStatusChangeReasonBufferingEnd|2|The stream enters the `Playing` state after network recovery|
328
+ |TRTCAVStatusChangeReasonLocalStarted|3|As a start-related API was directly called locally, the stream enters the `Playing` state|
329
+ |TRTCAVStatusChangeReasonLocalStopped|4|As a stop-related API was directly called locally, the stream enters the `Stopped` state|
330
+ |TRTCAVStatusChangeReasonRemoteStarted|5|As the remote user started (or resumed) publishing the audio or video stream, the stream enters the `Loading` or `Playing` state|
332
331
  |TRTCAVStatusChangeReasonRemoteStopped|6|As the remote user stopped (or paused) publishing the audio or video stream, the stream enters the "Stopped" state|
333
332
 
334
333
  ## TRTCAudioSampleRate
335
334
 
336
335
  **Audio sample rate.**
337
336
 
338
- The audio sample rate is used to measure the audio fidelity. A higher sample rate indicates higher fidelity. If there is music in the use case, ` TRTCAudioSampleRate48000 ` is recommended.
337
+ The audio sample rate is used to measure the audio fidelity. A higher sample rate indicates higher fidelity. If there is music in the use case, `TRTCAudioSampleRate48000` is recommended.
339
338
 
340
339
  |Enum|Value|DESC|
341
340
  |---------|---------|---------|
@@ -353,7 +352,7 @@ TRTC provides three well-tuned modes to meet the differentiated requirements for
353
352
 
354
353
  - Music mode (Music): it is suitable for scenarios with demanding requirements for music. In this mode, the amount of transferred audio data is very large, and TRTC uses various technologies to ensure that the high-fidelity details of music signals can be restored in each frequency band.
355
354
 
356
- - Default mode (Default): it is between ` Speech ` and ` Music `. In this mode, the reproduction of music is better than that in ` Speech ` mode, and the amount of transferred data is much lower than that in ` Music ` mode; therefore, this mode has good adaptability to various scenarios.
355
+ - Default mode (Default): it is between `Speech` and `Music` . In this mode, the reproduction of music is better than that in `Speech` mode, and the amount of transferred data is much lower than that in `Music` mode; therefore, this mode has good adaptability to various scenarios.
357
356
 
358
357
  |Enum|Value|DESC|
359
358
  |---------|---------|---------|
@@ -434,9 +433,9 @@ If you are able to mute your phone using the volume buttons, then your phone is
434
433
  The SDK offers three system volume control modes: auto, call volume, and media volume.
435
434
  | Enum | Value | DESC |
436
435
  | --- | --- | --- |
437
- | TRTCSystemVolumeTypeAuto | 0 | Auto:<br>In the auto mode, call volume is used for anchors, and media volume for audience. This mode is suitable for live streaming scenarios.<br>If the scenario you select during <code> enterRoom </code> is <code> TRTCAppSceneLIVE </code> or <code> TRTCAppSceneVoiceChatRoom </code>, the SDK will automatically use this mode. |
436
+ | TRTCSystemVolumeTypeAuto | 0 | Auto:<br>In the auto mode, call volume is used for anchors, and media volume for audience. This mode is suitable for live streaming scenarios.<br>If the scenario you select during <code>enterRoom</code> is <code>TRTCAppSceneLIVE</code> or <code>TRTCAppSceneVoiceChatRoom</code> , the SDK will automatically use this mode. |
438
437
  | TRTCSystemVolumeTypeMedia | 1 | Media volume:<br>In this mode, media volume is used in all scenarios. It is rarely used, mainly suitable for music scenarios with demanding requirements on audio quality.<br>Use this mode if most of your users use peripheral devices such as audio cards. Otherwise, it is not recommended. |
439
- | TRTCSystemVolumeTypeVOIP | 2 | Call volume:<br>In this mode, the audio module does not change its work mode when users switch between anchors and audience, enabling seamless mic on/off. This mode is suitable for scenarios where users need to switch frequently between anchors and audience.<br>If the scenario you select during <code> enterRoom </code> is <code> TRTCAppSceneVideoCall </code> or <code> TRTCAppSceneAudioCall </code>, the SDK will automatically use this mode. |
438
+ | TRTCSystemVolumeTypeVOIP | 2 | Call volume:<br>In this mode, the audio module does not change its work mode when users switch between anchors and audience, enabling seamless mic on/off. This mode is suitable for scenarios where users need to switch frequently between anchors and audience.<br>If the scenario you select during <code>enterRoom</code> is <code>TRTCAppSceneVideoCall</code> or <code>TRTCAppSceneAudioCall</code> , the SDK will automatically use this mode. |
440
439
 
441
440
  ## TRTCAudioFrameFormat
442
441
 
@@ -475,7 +474,7 @@ TRTC provides two modes of operation for audio callback data.
475
474
 
476
475
  **Log level.**
477
476
 
478
- Different log levels indicate different levels of details and number of logs. We recommend you set the log level to ` TRTCLogLevelInfo ` generally.
477
+ Different log levels indicate different levels of details and number of logs. We recommend you set the log level to `TRTCLogLevelInfo` generally.
479
478
 
480
479
  |Enum|Value|DESC|
481
480
  |---------|---------|---------|
@@ -495,8 +494,8 @@ Different log levels indicate different levels of details and number of logs. We
495
494
  | Enum | Value | DESC |
496
495
  | --- | --- | --- |
497
496
  | TRTC_GSENSOR_MODE_DISABLE | 0 | Do not adapt to G-sensor orientation<br>This mode is the default value for desktop platforms. In this mode, the video image published by the current user is not affected by the change of the G-sensor orientation. |
498
- | TRTC_GSENSOR_MODE_UIAUTOLAYOUT | 1 | Adapt to G-sensor orientation<br>This mode is the default value on mobile platforms. In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, while the orientation of the local preview image remains unchanged.<br>One of the adaptation modes currently supported by the SDK is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application has enabled G-sensor adaption, we recommend you use the <code> UIFixLayout </code> mode. |
499
- | TRTC_GSENSOR_MODE_UIFIXLAYOUT | 2 | Adapt to G-sensor orientation<br>In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, and the local preview image will also be rotated accordingly.<br>One of the features currently supported is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application doesn't support G-sensor adaption, but you want the video image in the SDK to adapt to the G-sensor orientation, we recommend you use the <code> UIFixLayout </code> mode.<br>@deprecated Begin from v11.5 version, it no longer supports TRTCGSensorMode_UIFixLayout and only supports the above two modes. |
497
+ | TRTC_GSENSOR_MODE_UIAUTOLAYOUT | 1 | Adapt to G-sensor orientation<br>This mode is the default value on mobile platforms. In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, while the orientation of the local preview image remains unchanged.<br>One of the adaptation modes currently supported by the SDK is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application has enabled G-sensor adaption, we recommend you use the <code>UIFixLayout</code> mode. |
498
+ | TRTC_GSENSOR_MODE_UIFIXLAYOUT | 2 | Adapt to G-sensor orientation<br>In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, and the local preview image will also be rotated accordingly.<br>One of the features currently supported is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application doesn't support G-sensor adaption, but you want the video image in the SDK to adapt to the G-sensor orientation, we recommend you use the <code>UIFixLayout</code> mode.<br>@deprecated Begin from v11.5 version, it no longer supports TRTCGSensorMode_UIFixLayout and only supports the above two modes. |
500
499
 
501
500
  ## TRTCTranscodingConfigMode
502
501
 
@@ -506,10 +505,10 @@ TRTC's On-Cloud MixTranscoding service can mix multiple audio/video streams in t
506
505
  | Enum | Value | DESC |
507
506
  | --- | --- | --- |
508
507
  | TRTC_TranscodingConfigMode_Unknown | 0 | Undefined |
509
- | TRTC_TranscodingConfigMode_Manual | 1 | Manual layout mode<br>In this mode, you need to specify the precise position of each video image. This mode has the highest degree of freedom, but its ease of use is the worst:<br>- You need to enter all the parameters in TRTCTranscodingConfig, including the position coordinates of each video image (TRTCMixUser).<br>- You need to listen on the onUserVideoAvailable and onUserAudioAvailable event callbacks in TRTCCloudListener and constantly adjust the <code> mixUsers </code> parameter according to the audio/video status of each user with mic on in the current room. |
510
- | TRTC_TranscodingConfigMode_Template_PureAudio | 2 | Pure audio mode<br>This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).<br>- You only need to set it once through the setMixTranscodingConfig API after room entry, and then the SDK will automatically mix the audio of all mic-on users in the room into the current user's live stream.<br>- You don't need to set the <code> mixUsers </code> parameter in TRTCTranscodingConfig; instead, you only need to set the <code> audioSampleRate </code>, <code> audioBitrate </code> and <code> audioChannels </code> parameters. |
511
- | TRTC_TranscodingConfigMode_Template_PresetLayout | 3 | Preset layout mode<br>This is the most popular layout mode, because it allows you to set the position of each video image in advance through placeholders, and then the SDK automatically adjusts it dynamically according to the number of video images in the room.<br>In this mode, you still need to set the <code> mixUsers </code> parameter, but you can set <code> userId </code> as a "placeholder". Placeholder values include:<br>- "$PLACE_HOLDER_REMOTE$": image of remote user. Multiple images can be set.<br>- "$PLACE_HOLDER_LOCAL_MAIN$": local camera image. Only one image can be set.<br>- "$PLACE_HOLDER_LOCAL_SUB$": local screen sharing image. Only one image can be set.<br>In this mode, you don't need to listen on the onUserVideoAvailable and onUserAudioAvailable callbacks in TRTCCloudListener to make real-time adjustments.<br>Instead, you only need to call setMixTranscodingConfig once after successful room entry. Then, the SDK will automatically populate the placeholders you set with real <code> userId </code> values. |
512
- | TRTC_TranscodingConfigMode_Template_ScreenSharing | 4 | Screen sharing mode<br>This mode is suitable for screen sharing-based use cases such as online education and supported only by the SDKs for Windows and macOS.<br>In this mode, the SDK will first build a canvas according to the target resolution you set (through the <code> videoWidth </code> and <code> videoHeight </code> parameters).<br>- Before the teacher enables screen sharing, the SDK will scale up the teacher's camera image and draw it onto the canvas.<br>- After the teacher enables screen sharing, the SDK will draw the video image shared on the screen onto the same canvas.<br>The purpose of this layout mode is to ensure consistency in the output resolution of the mixtranscoding module and avoid problems with blurred screen during course replay and webpage playback (web players don't support adjustable resolution).<br>Meanwhile, the audio of mic-on students will be mixed into the teacher's audio/video stream by default.<br>Video content is primarily the shared screen in teaching mode, and it is a waste of bandwidth to transfer camera image and screen image at the same time.<br>Therefore, the recommended practice is to directly draw the camera image onto the current screen through the setLocalVideoRenderCallback API.<br>In this mode, you don't need to set the <code> mixUsers </code> parameter in TRTCTranscodingConfig, and the SDK will not mix students' images so as not to interfere with the screen sharing effect.<br>You can set width x height in TRTCTranscodingConfig to 0 px x 0 px, and the SDK will automatically calculate a suitable resolution based on the aspect ratio of the user's current screen.<br>- If the teacher's current screen width is less than or equal to 1920 px, the SDK will use the actual resolution of the teacher's current screen.<br>- If the teacher's current screen width is greater than 1920 px, the SDK will select one of the three resolutions of 1920x1080 (16:9), 1920x1200 (16:10), and 1920x1440 (4:3) according to the current screen aspect ratio. |
508
+ | TRTC_TranscodingConfigMode_Manual | 1 | Manual layout mode<br>In this mode, you need to specify the precise position of each video image. This mode has the highest degree of freedom, but its ease of use is the worst:<br>- You need to enter all the parameters in TRTCTranscodingConfig, including the position coordinates of each video image (TRTCMixUser).<br>- You need to listen on the onUserVideoAvailable and onUserAudioAvailable event callbacks in TRTCCloudListener and constantly adjust the <code>mixUsers</code> parameter according to the audio/video status of each user with mic on in the current room. |
509
+ | TRTC_TranscodingConfigMode_Template_PureAudio | 2 | Pure audio mode<br>This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).<br>- You only need to set it once through the setMixTranscodingConfig API after room entry, and then the SDK will automatically mix the audio of all mic-on users in the room into the current user's live stream.<br>- You don't need to set the <code>mixUsers</code> parameter in TRTCTranscodingConfig; instead, you only need to set the <code>audioSampleRate</code> , <code>audioBitrate</code> and <code>audioChannels</code> parameters. |
510
+ | TRTC_TranscodingConfigMode_Template_PresetLayout | 3 | Preset layout mode<br>This is the most popular layout mode, because it allows you to set the position of each video image in advance through placeholders, and then the SDK automatically adjusts it dynamically according to the number of video images in the room.<br>In this mode, you still need to set the <code>mixUsers</code> parameter, but you can set <code>userId</code> as a "placeholder". Placeholder values include:<br>- "$PLACE_HOLDER_REMOTE$": image of remote user. Multiple images can be set.<br>- "$PLACE_HOLDER_LOCAL_MAIN$": local camera image. Only one image can be set.<br>- "$PLACE_HOLDER_LOCAL_SUB$": local screen sharing image. Only one image can be set.<br>In this mode, you don't need to listen on the onUserVideoAvailable and onUserAudioAvailable callbacks in TRTCCloudListener to make real-time adjustments.<br>Instead, you only need to call setMixTranscodingConfig once after successful room entry. Then, the SDK will automatically populate the placeholders you set with real <code>userId</code> values. |
511
+ | TRTC_TranscodingConfigMode_Template_ScreenSharing | 4 | Screen sharing mode<br>This mode is suitable for screen sharing-based use cases such as online education and supported only by the SDKs for Windows and macOS.<br>In this mode, the SDK will first build a canvas according to the target resolution you set (through the <code>videoWidth</code> and <code>videoHeight</code> parameters).<br>- Before the teacher enables screen sharing, the SDK will scale up the teacher's camera image and draw it onto the canvas.<br>- After the teacher enables screen sharing, the SDK will draw the video image shared on the screen onto the same canvas.<br>The purpose of this layout mode is to ensure consistency in the output resolution of the mixtranscoding module and avoid problems with blurred screen during course replay and webpage playback (web players don't support adjustable resolution).<br>Meanwhile, the audio of mic-on students will be mixed into the teacher's audio/video stream by default.<br>Video content is primarily the shared screen in teaching mode, and it is a waste of bandwidth to transfer camera image and screen image at the same time.<br>Therefore, the recommended practice is to directly draw the camera image onto the current screen through the setLocalVideoRenderCallback API.<br>In this mode, you don't need to set the <code>mixUsers</code> parameter in TRTCTranscodingConfig, and the SDK will not mix students' images so as not to interfere with the screen sharing effect.<br>You can set width x height in TRTCTranscodingConfig to 0 px x 0 px, and the SDK will automatically calculate a suitable resolution based on the aspect ratio of the user's current screen.<br>- If the teacher's current screen width is less than or equal to 1920 px, the SDK will use the actual resolution of the teacher's current screen.<br>- If the teacher's current screen width is greater than 1920 px, the SDK will select one of the three resolutions of 1920x1080 (16:9), 1920x1200 (16:10), and 1920x1440 (4:3) according to the current screen aspect ratio. |
513
512
 
514
513
  ## TRTCRecordType
515
514
 
@@ -528,11 +527,11 @@ This enumerated type is used in the local media recording API startLocalRecordin
528
527
  **Stream mix input type.**
529
528
  | Enum | Value | DESC |
530
529
  | --- | --- | --- |
531
- | TRTC_MixInputType_Undefined | 0 | Default.<br>Considering the compatibility with older versions, if you specify the inputType as Undefined, the SDK will determine the stream mix input type according to the value of the <code> pureAudio </code> parameter |
530
+ | TRTC_MixInputType_Undefined | 0 | Default.<br>Considering the compatibility with older versions, if you specify the inputType as Undefined, the SDK will determine the stream mix input type according to the value of the <code>pureAudio</code> parameter |
532
531
  | TRTC_MixInputType_AudioVideo | 1 | Mix both audio and video |
533
532
  | TRTC_MixInputType_PureVideo | 2 | Mix video only |
534
533
  | TRTC_MixInputType_PureAudio | 3 | Mix audio only |
535
- | TRTC_MixInputType_Watermark | 4 | Mix watermark<br>In this case, you don't need to specify the <code> userId </code> parameter, but you need to specify the <code> image </code> parameter. It is recommended to use png format. |
534
+ | TRTC_MixInputType_Watermark | 4 | Mix watermark<br>In this case, you don't need to specify the <code>userId</code> parameter, but you need to specify the <code>image</code> parameter. It is recommended to use png format. |
536
535
 
537
536
  ## TRTCDebugViewLevel
538
537
 
@@ -571,7 +570,7 @@ You can specify one of the following publishing modes to use:
571
570
  | TRTC_PublishBigStream_ToCdn | 1 | Use this parameter to publish the primary stream (TRTC_VIDEO_STREAM_TYPE_BIG) in the room to Tencent Cloud or a third-party CDN (only RTMP is supported). |
572
571
  | TRTC_PublishSubStream_ToCdn | 2 | Use this parameter to publish the substream (TRTC_VIDEO_STREAM_TYPE_SUB) in the room to Tencent Cloud or a third-party CDN (only RTMP is supported). |
573
572
  | TRTC_PublishMixStream_ToCdn | 3 | Use this parameter together with the encoding parameter TRTCStreamEncoderParam and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to Tencent Cloud or a third-party CDN (only RTMP is supported). |
574
- | TRTC_PublishMixStream_ToRoom | 4 | Use this parameter together with the encoding parameter TRTCStreamEncoderParam and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to the room you specify.<br>- Use <code> TRTCUser </code> in TRTCPublishTarget to specify the robot that publishes the transcoded stream to a TRTC room. |
573
+ | TRTC_PublishMixStream_ToRoom | 4 | Use this parameter together with the encoding parameter TRTCStreamEncoderParam and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to the room you specify.<br>- Use <code>TRTCUser</code> in TRTCPublishTarget to specify the robot that publishes the transcoded stream to a TRTC room. |
575
574
 
576
575
  ## TRTCEncryptionAlgorithm
577
576
 
@@ -612,23 +611,23 @@ Begin from v11.7 version,It only takes effect when the camera capture scene in
612
611
 
613
612
  **Room entry parameters.**
614
613
 
615
- As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by ` roomId ` or ` strRoomId `.
614
+ As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by `roomId` or `strRoomId` .
616
615
 
617
- For historical reasons, TRTC supports two types of room IDs: ` roomId ` and ` strRoomId `.
616
+ For historical reasons, TRTC supports two types of room IDs: `roomId` and `strRoomId` .
618
617
 
619
- Note: do not mix ` roomId ` and ` strRoomId `, because they are not interchangeable. For example, the number ` 123 ` and the string ` 123 ` are two completely different rooms in TRTC.
618
+ Note: do not mix `roomId` and `strRoomId` , because they are not interchangeable. For example, the number `123` and the string `123` are two completely different rooms in TRTC.
620
619
  | EnumType | DESC |
621
620
  | --- | --- |
622
621
  | businessInfo | Field description: business data, which is optional. This field is needed only by some advanced features.<br>Recommended value: do not set this field on your own. |
623
- | privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified <code> userId </code> values to enter a room, you need to use <code> privateMapKey </code> to restrict the permission.<br>Recommended value: we recommend you use this parameter only if you have high security requirements. For more information, please see <a href="https://www.tencentcloud.com/document/product/647/35157">Enabling Advanced Permission Control</a>. |
622
+ | privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified <code>userId</code> values to enter a room, you need to use <code>privateMapKey</code> to restrict the permission.<br>Recommended value: we recommend you use this parameter only if you have high security requirements. For more information, please see <a href="https://www.tencentcloud.com/document/product/647/35157">Enabling Advanced Permission Control</a>. |
624
623
  | role | Field description: role in the live streaming scenario, which is applicable only to the live streaming scenario (TRTC_APP_SCENE_LIVE or TRTC_APP_SCENE_VOICE_CHATROOM) but doesn't take effect in the call scenario.<br>Recommended value: default value: anchor (TRTCRoleAnchor). |
625
- | roomId | Field description: numeric room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br>@note <code> roomId </code> and <code> strRoomId </code> are mutually exclusive. If you decide to use <code> strRoomId </code>, then <code> roomId </code> should be entered as 0. If both are entered, <code> roomId </code> will be used.<br><strong>Note</strong><br>do not mix <code> roomId </code> and <code> strRoomId </code>, because they are not interchangeable. For example, the number <code> 123 </code> and the string <code> 123 </code> are two completely different rooms in TRTC. |
626
- | sdkAppId | Field description: application ID, which is required. Tencent Cloud generates bills based on <code> sdkAppId </code>.<br>Recommended value: the ID can be obtained on the account information page in the <a href="https://console.cloud.tencent.com/rav/">TRTC console</a> after the corresponding application is created. |
627
- | strRoomId | Field description: string-type room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>@note <code> roomId </code> and <code> strRoomId </code> are mutually exclusive. If you decide to use <code> strRoomId </code>, then <code> roomId </code> should be entered as 0. If both are entered, <code> roomId </code> will be used.<br><strong>Note</strong><br>do not mix <code> roomId </code> and <code> strRoomId </code>, because they are not interchangeable. For example, the number <code> 123 </code> and the string <code> 123 </code> are two completely different rooms in TRTC.<br>Recommended value: the length limit is 64 bytes. The following 89 characters are supported:<br>- Uppercase and lowercase letters (a–z and A–Z)<br>- Digits (0–9)<br>- Space, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", and ",". |
628
- | streamId | Field description: specified <code> streamId </code> in Tencent Cloud CSS, which is optional. After setting this field, you can play back the user's audio/video stream on Tencent Cloud CSS CDN through a standard pull scheme (FLV or HLS).<br>Recommended value: this parameter can contain up to 64 bytes and can be left empty. We recommend you use <code> sdkappid_roomid_userid_main </code> as the <code> streamid </code>, which is easier to identify and will not cause conflicts in your multiple applications.<br><strong>Note</strong><br>to use Tencent Cloud CSS CDN, you need to enable the auto-relayed live streaming feature on the "Function Configuration" page in the <a href="https://console.cloud.tencent.com/trtc/">console</a> first.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/47858">Relay to CDN</a>. |
629
- | userDefineRecordId | Field description: on-cloud recording field, which is optional and used to specify whether to record the user's audio/video stream in the cloud.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/45169">On-Cloud Recording</a>.<br>Recommended value: it can contain up to 64 bytes. Letters (a–z and A–Z), digits (0–9), underscores, and hyphens are allowed.<br>Scheme 1. Manual recording<br>1. Enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Manual Recording".<br>3. After manual recording is set, in a TRTC room, only users with the <code> userDefineRecordId </code> parameter set will have video recording files in the cloud, while users without this parameter set will not.<br>4. The recording file will be named in the format of "userDefineRecordId_start time_end time" in the cloud.<br>Scheme 2. Auto-recording<br>1. You need to enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Auto-recording".<br>3. After auto-recording is set, any user who upstreams audio/video in a TRTC room will have a video recording file in the cloud.<br>4. The file will be named in the format of "userDefineRecordId_start time_end time". If <code> userDefineRecordId </code> is not specified, the file will be named in the format of "streamId_start time_end time". |
630
- | userId | Field description: user ID, which is required. It is the <code> userId </code> of the local user in UTF-8 encoding and acts as the username.<br>Recommended value: if the ID of a user in your account system is "mike", <code> userId </code> can be set to "mike". |
631
- | userSig | Field description: user signature, which is required. It is the authentication signature corresponding to the current <code> userId </code> and acts as the login password for Tencent Cloud services.<br>Recommended value: for the calculation method, please see <a href="https://www.tencentcloud.com/document/product/647/35166">UserSig</a>. |
624
+ | roomId | Field description: numeric room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br>@note <code>roomId</code> and <code>strRoomId</code> are mutually exclusive. If you decide to use <code>strRoomId</code> , then <code>roomId</code> should be entered as 0. If both are entered, <code>roomId</code> will be used.<br><strong>Note</strong><br>do not mix <code>roomId</code> and <code>strRoomId</code> , because they are not interchangeable. For example, the number <code>123</code> and the string <code>123</code> are two completely different rooms in TRTC. |
625
+ | sdkAppId | Field description: application ID, which is required. Tencent Cloud generates bills based on <code>sdkAppId</code> .<br>Recommended value: the ID can be obtained on the account information page in the <a href="https://console.cloud.tencent.com/rav/">TRTC console</a> after the corresponding application is created. |
626
+ | strRoomId | Field description: string-type room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>@note <code>roomId</code> and <code>strRoomId</code> are mutually exclusive. If you decide to use <code>strRoomId</code> , then <code>roomId</code> should be entered as 0. If both are entered, <code>roomId</code> will be used.<br><strong>Note</strong><br>do not mix <code>roomId</code> and <code>strRoomId</code> , because they are not interchangeable. For example, the number <code>123</code> and the string <code>123</code> are two completely different rooms in TRTC.<br>Recommended value: the length limit is 64 bytes. The following 89 characters are supported:<br>- Uppercase and lowercase letters (a–z and A–Z)<br>- Digits (0–9)<br>- Space, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", and ",". |
627
+ | streamId | Field description: specified <code>streamId</code> in Tencent Cloud CSS, which is optional. After setting this field, you can play back the user's audio/video stream on Tencent Cloud CSS CDN through a standard pull scheme (FLV or HLS).<br>Recommended value: this parameter can contain up to 64 bytes and can be left empty. We recommend you use <code>sdkappid_roomid_userid_main</code> as the <code>streamid</code> , which is easier to identify and will not cause conflicts in your multiple applications.<br><strong>Note</strong><br>to use Tencent Cloud CSS CDN, you need to enable the auto-relayed live streaming feature on the "Function Configuration" page in the <a href="https://console.cloud.tencent.com/trtc/">console</a> first.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/47858">Relay to CDN</a>. |
628
+ | userDefineRecordId | Field description: on-cloud recording field, which is optional and used to specify whether to record the user's audio/video stream in the cloud.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/45169">On-Cloud Recording</a>.<br>Recommended value: it can contain up to 64 bytes. Letters (a–z and A–Z), digits (0–9), underscores, and hyphens are allowed.<br>Scheme 1. Manual recording<br>1. Enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Manual Recording".<br>3. After manual recording is set, in a TRTC room, only users with the <code>userDefineRecordId</code> parameter set will have video recording files in the cloud, while users without this parameter set will not.<br>4. The recording file will be named in the format of "userDefineRecordId_start time_end time" in the cloud.<br>Scheme 2. Auto-recording<br>1. You need to enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Auto-recording".<br>3. After auto-recording is set, any user who upstreams audio/video in a TRTC room will have a video recording file in the cloud.<br>4. The file will be named in the format of "userDefineRecordId_start time_end time". If <code>userDefineRecordId</code> is not specified, the file will be named in the format of "streamId_start time_end time". |
629
+ | userId | Field description: user ID, which is required. It is the <code>userId</code> of the local user in UTF-8 encoding and acts as the username.<br>Recommended value: if the ID of a user in your account system is "mike", <code>userId</code> can be set to "mike". |
630
+ | userSig | Field description: user signature, which is required. It is the authentication signature corresponding to the current <code>userId</code> and acts as the login password for Tencent Cloud services.<br>Recommended value: for the calculation method, please see <a href="https://www.tencentcloud.com/document/product/647/35166">UserSig</a>. |
632
631
 
633
632
  ## TRTCVideoEncParam
634
633
 
@@ -638,11 +637,11 @@ These settings determine the quality of image viewed by remote users as well as
638
637
  | EnumType | DESC |
639
638
  | --- | --- |
640
639
  | enableAdjustRes | Field description: whether to allow dynamic resolution adjustment. Once enabled, this field will affect on-cloud recording.<br>Recommended value: this feature is suitable for scenarios that don't require on-cloud recording. After it is enabled, the SDK will intelligently select a suitable resolution according to the current network conditions to avoid the inefficient encoding mode of "large resolution + small bitrate".<br><strong>Note</strong><br>default value: false. If you need on-cloud recording, please do not enable this feature, because if the video resolution changes, the MP4 file recorded in the cloud cannot be played back normally by common players. |
641
- | minVideoBitrate | Field description: minimum video bitrate. The SDK will reduce the bitrate to as low as the value specified by <code> minVideoBitrate </code> to ensure the smoothness only if the network conditions are poor.<br>Note: default value: 0, indicating that a reasonable value of the lowest bitrate will be automatically calculated by the SDK according to the resolution you specify.<br>Recommended value: you can set the <code> videoBitrate </code> and <code> minVideoBitrate </code> parameters at the same time to restrict the SDK's adjustment range of the video bitrate:<br>- If you want to "ensure clarity while allowing lag in weak network environments", you can set <code> minVideoBitrate </code> to 60% of <code> videoBitrate </code>.<br>- If you want to "ensure smoothness while allowing blur in weak network environments", you can set <code> minVideoBitrate </code> to a low value, for example, 100 Kbps.<br>- If you set <code> videoBitrate </code> and <code> minVideoBitrate </code> to the same value, it is equivalent to disabling the adaptive adjustment capability of the SDK for the video bitrate. |
642
- | videoBitrate | Field description: target video bitrate. The SDK encodes streams at the target video bitrate and will actively reduce the bitrate only in weak network environments.<br>Recommended value: please see the optimal bitrate for each specification in <code> TRTCVideoResolution </code>. You can also slightly increase the optimal bitrate.<br>For example, <code> TRTCVideoResolution_1280_720 </code> corresponds to the target bitrate of 1,200 Kbps. You can also set the bitrate to 1,500 Kbps for higher definition.<br><strong>Note</strong><br>you can set the <code> videoBitrate </code> and <code> minVideoBitrate </code> parameters at the same time to restrict the SDK's adjustment range of the video bitrate:<br>- If you want to "ensure clarity while allowing lag in weak network environments", you can set <code> minVideoBitrate </code> to 60% of <code> videoBitrate </code>.<br>- If you want to "ensure smoothness while allowing blur in weak network environments", you can set <code> minVideoBitrate </code> to a low value, for example, 100 Kbps.<br>- If you set <code> videoBitrate </code> and <code> minVideoBitrate </code> to the same value, it is equivalent to disabling the adaptive adjustment capability of the SDK for the video bitrate. |
640
+ | minVideoBitrate | Field description: minimum video bitrate. The SDK will reduce the bitrate to as low as the value specified by <code>minVideoBitrate</code> to ensure the smoothness only if the network conditions are poor.<br>Note: default value: 0, indicating that a reasonable value of the lowest bitrate will be automatically calculated by the SDK according to the resolution you specify.<br>Recommended value: you can set the <code>videoBitrate</code> and <code>minVideoBitrate</code> parameters at the same time to restrict the SDK's adjustment range of the video bitrate:<br>- If you want to "ensure clarity while allowing lag in weak network environments", you can set <code>minVideoBitrate</code> to 60% of <code>videoBitrate</code> .<br>- If you want to "ensure smoothness while allowing blur in weak network environments", you can set <code>minVideoBitrate</code> to a low value, for example, 100 Kbps.<br>- If you set <code>videoBitrate</code> and <code>minVideoBitrate</code> to the same value, it is equivalent to disabling the adaptive adjustment capability of the SDK for the video bitrate. |
641
+ | videoBitrate | Field description: target video bitrate. The SDK encodes streams at the target video bitrate and will actively reduce the bitrate only in weak network environments.<br>Recommended value: please see the optimal bitrate for each specification in <code>TRTCVideoResolution</code> . You can also slightly increase the optimal bitrate.<br>For example, <code>TRTCVideoResolution_1280_720</code> corresponds to the target bitrate of 1,200 Kbps. You can also set the bitrate to 1,500 Kbps for higher definition.<br><strong>Note</strong><br>you can set the <code>videoBitrate</code> and <code>minVideoBitrate</code> parameters at the same time to restrict the SDK's adjustment range of the video bitrate:<br>- If you want to "ensure clarity while allowing lag in weak network environments", you can set <code>minVideoBitrate</code> to 60% of <code>videoBitrate</code> .<br>- If you want to "ensure smoothness while allowing blur in weak network environments", you can set <code>minVideoBitrate</code> to a low value, for example, 100 Kbps.<br>- If you set <code>videoBitrate</code> and <code>minVideoBitrate</code> to the same value, it is equivalent to disabling the adaptive adjustment capability of the SDK for the video bitrate. |
643
642
  | videoFps | Field description: video capturing frame rate<br>Recommended value: 15 or 20 fps. If the frame rate is lower than 5 fps, there will be obvious lagging; if lower than 10 fps but higher than 5 fps, there will be slight lagging; if higher than 20 fps, the bandwidth will be wasted (the frame rate of movies is generally 24 fps).<br><strong>Note</strong><br>the front cameras on certain Android phones do not support a capturing frame rate higher than 15 fps. For some Android phones that focus on beautification features, the capturing frame rate of the front cameras may be lower than 10 fps. |
644
- | videoResolution | Field description: video resolution<br>Recommended value<br>- For mobile video call, we recommend you select a resolution of 360x640 or below and select <code> Portrait </code> (portrait resolution) for <code> resMode </code>.<br>- For mobile live streaming, we recommend you select a resolution of 540x960 and select <code> Portrait </code> (portrait resolution) for <code> resMode </code>.<br>- For desktop platforms (Windows and macOS), we recommend you select a resolution of 640x360 or above and select <code> Landscape </code> (landscape resolution) for <code> resMode </code>.<br><strong>Note</strong><br>to use a portrait resolution, please specify <code> resMode </code> as <code> Portrait </code>; for example, when used together with <code> Portrait </code>, 640x360 represents 360x640. |
645
- | videoResolutionMode | Field description: resolution mode (landscape/portrait)<br>Recommended value: for mobile platforms (iOS and Android), <code> Portrait </code> is recommended; for desktop platforms (Windows and macOS), <code> Landscape </code> is recommended.<br><strong>Note</strong><br>to use a portrait resolution, please specify <code> resMode </code> as <code> Portrait </code>; for example, when used together with <code> Portrait </code>, 640x360 represents 360x640. |
643
+ | videoResolution | Field description: video resolution<br>Recommended value<br>- For mobile video call, we recommend you select a resolution of 360x640 or below and select <code>Portrait</code> (portrait resolution) for <code>resMode</code> .<br>- For mobile live streaming, we recommend you select a resolution of 540x960 and select <code>Portrait</code> (portrait resolution) for <code>resMode</code> .<br>- For desktop platforms (Windows and macOS), we recommend you select a resolution of 640x360 or above and select <code>Landscape</code> (landscape resolution) for <code>resMode</code> .<br><strong>Note</strong><br>to use a portrait resolution, please specify <code>resMode</code> as <code>Portrait</code> ; for example, when used together with <code>Portrait</code> , 640x360 represents 360x640. |
644
+ | videoResolutionMode | Field description: resolution mode (landscape/portrait)<br>Recommended value: for mobile platforms (iOS and Android), <code>Portrait</code> is recommended; for desktop platforms (Windows and macOS), <code>Landscape</code> is recommended.<br><strong>Note</strong><br>to use a portrait resolution, please specify <code>resMode</code> as <code>Portrait</code> ; for example, when used together with <code>Portrait</code> , 640x360 represents 360x640. |
646
645
 
647
646
  ## TRTCNetworkQosParam
648
647
 
@@ -685,7 +684,7 @@ This indicates the audio volume value. You can use it to display the volume of e
685
684
  | --- | --- |
686
685
  | pitch | The local user's vocal frequency (unit: Hz), the value range is [0 - 4000]. For remote users, this value is always 0. |
687
686
  | spectrumData | Audio spectrum data, which divides the sound frequency into 256 frequency domains, spectrumData records the energy value of each frequency domain,<br>The value range of each energy value is [-300, 0] in dBFS.<br><strong>Note</strong><br>The local spectrum is calculated using the audio data before encoding, which will be affected by the capture volume, BGM, etc.; the remote spectrum is calculated using the received audio data, and operations such as adjusting the remote playback volume locally will not affect it. |
688
- | userId | <code> userId </code> of the speaker. An empty value indicates the local user. |
687
+ | userId | <code>userId</code> of the speaker. An empty value indicates the local user. |
689
688
  | vad | Vad result of the local user. 0: not speech 1: speech. |
690
689
  | volume | Volume of the speaker. Value range: 0–100. |
691
690
 
@@ -696,8 +695,8 @@ This indicates the audio volume value. You can use it to display the volume of e
696
695
  You can test the network speed through the startSpeedTest: interface before the user enters the room (this API cannot be called during a call).
697
696
  | EnumType | DESC |
698
697
  | --- | --- |
699
- | expectedDownBandwidth | Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter <code> scene </code> is set to TRTC_SpeedTestScene_Online_Chorus_Testing, in order to obtain more accurate information such as <code> rtt / jitter </code>, the value range is limited to [10, 1000]. |
700
- | expectedUpBandwidth | Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter <code> scene </code> is set to TRTC_SpeedTestScene_Online_Chorus_Testing, in order to obtain more accurate information such as <code> rtt / jitter </code>, the value range is limited to [10, 1000]. |
698
+ | expectedDownBandwidth | Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter <code>scene</code> is set to TRTC_SpeedTestScene_Online_Chorus_Testing, in order to obtain more accurate information such as <code>rtt / jitter</code> , the value range is limited to [10, 1000]. |
699
+ | expectedUpBandwidth | Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter <code>scene</code> is set to TRTC_SpeedTestScene_Online_Chorus_Testing, in order to obtain more accurate information such as <code>rtt / jitter</code> , the value range is limited to [10, 1000]. |
701
700
  | scene | Speed test scene. |
702
701
  | sdkAppId | Application identification, please refer to the relevant instructions in TRTCParams. |
703
702
  | userId | User identification, please refer to the relevant instructions in TRTCParams. |
@@ -729,25 +728,25 @@ The startSpeedTest: API can be used to test the network speed before a user ente
729
728
 
730
729
  |EnumType|DESC|
731
730
  |---------|---------|
732
- |eglContext10|Field description: OpenGL context defined by ` (javax.microedition.khronos.egl.*) `|
733
- |eglContext14|Field description: OpenGL context defined by ` (android.opengl.*) `|
731
+ |eglContext10|Field description: OpenGL context defined by `(javax.microedition.khronos.egl.*)` |
732
+ |eglContext14|Field description: OpenGL context defined by `(android.opengl.*)` |
734
733
  |textureId|Field description: video texture ID|
735
734
 
736
735
  ## TRTCVideoFrame
737
736
 
738
737
  **Video frame information.**
739
738
 
740
- ` TRTCVideoFrame ` is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.
739
+ `TRTCVideoFrame` is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.
741
740
  | EnumType | DESC |
742
741
  | --- | --- |
743
- | buffer | Field description: video data when <code> bufferType </code> is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER, which carries the <code> Direct Buffer </code> used for the JNI layer. |
742
+ | buffer | Field description: video data when <code>bufferType</code> is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER, which carries the <code>Direct Buffer</code> used for the JNI layer. |
744
743
  | bufferType | Field description: video data structure type |
745
- | data | Field description: video data when <code> bufferType </code> is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY, which carries the byte array used for the Java layer. |
744
+ | data | Field description: video data when <code>bufferType</code> is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY, which carries the byte array used for the Java layer. |
746
745
  | height | Field description: video height<br>Recommended value: please enter the height of the video data passed in. |
747
746
  | pixelFormat | Field description: video pixel format |
748
747
  | rotation | Field description: clockwise rotation angle of video pixels |
749
- | texture | Field description: video data when <code> bufferType </code> is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_TEXTURE, which carries the texture data used for OpenGL rendering. |
750
- | timestamp | Field description: video frame timestamp in milliseconds<br>Recommended value: this parameter can be set to 0 for custom video capturing. In this case, the SDK will automatically set the <code> timestamp </code> field. However, please "evenly" set the calling interval of sendCustomVideoData. |
748
+ | texture | Field description: video data when <code>bufferType</code> is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_TEXTURE, which carries the texture data used for OpenGL rendering. |
749
+ | timestamp | Field description: video frame timestamp in milliseconds<br>Recommended value: this parameter can be set to 0 for custom video capturing. In this case, the SDK will automatically set the <code>timestamp</code> field. However, please "evenly" set the calling interval of sendCustomVideoData. |
751
750
  | width | Field description: video width<br>Recommended value: please enter the width of the video data passed in. |
752
751
 
753
752
  ## TRTCAudioFrame
@@ -766,14 +765,14 @@ The startSpeedTest: API can be used to test the network speed before a user ente
766
765
 
767
766
  **Description information of each video image in On-Cloud MixTranscoding.**
768
767
 
769
- ` TRTCMixUser ` is used to specify the location, size, layer, and stream type of each video image in On-Cloud MixTranscoding.
768
+ `TRTCMixUser` is used to specify the location, size, layer, and stream type of each video image in On-Cloud MixTranscoding.
770
769
  | EnumType | DESC |
771
770
  | --- | --- |
772
771
  | height | Field description: specify the height of this video image in px |
773
- | image | Field description: specify the placeholder or watermark image. The placeholder image will be displayed when there is no upstream video.A watermark image is a semi-transparent image posted in the mixed image, and this image will always be overlaid on the mixed image.<br>- When the <code> inputType </code> field is set to TRTC_MixInputType_PureAudio, the image is a placeholder image, and you need to specify <code> userId </code>.<br>- When the <code> inputType </code> field is set to TRTC_MixInputType_Watermark, the image is a watermark image, and you don't need to specify <code> userId </code>.<br>Recommended value: default value: null, indicating not to set the placeholder or watermark image.<br><strong>Note</strong><br>TRTC's backend service will mix the image specified by the URL address into the final stream.URL link length is limited to 512 bytes. The image size is limited to 10MB.Support png, jpg, jpeg, bmp format. Take effects iff the <code> inputType </code> field is set to TRTCMixInputTypePureAudio or TRTC_MixInputType_Watermark. |
774
- | inputType | Field description: specify the mixed content of this stream (audio only, video only, audio and video, or watermark).<br>Recommended value: default value: TRTC_MixInputType_Undefined.<br><strong>Note</strong><br>- When specifying <code> inputType </code> as TRTC_MixInputType_Undefined and specifying <code> pureAudio </code> to YES, it is equivalent to setting <code> inputType </code> to <code> TRTCMixInputTypePureAudio </code>.<br>- When specifying <code> inputType </code> as TRTC_MixInputType_Undefined and specifying <code> pureAudio </code> to NO, it is equivalent to setting <code> inputType </code> to <code> TRTCMixInputTypeAudioVideo </code>.<br>- When specifying <code> inputType </code> as TRTC_MixInputType_Watermark, you don't need to specify the <code> userId </code> field, but you need to specify the <code> image </code> field. |
775
- | pureAudio | Field description: specify whether this stream mixes audio only<br>Recommended value: default value: false<br><strong>Note</strong><br>this field has been disused. We recommend you use the new field <code> inputType </code> introduced in v8.5. |
776
- | renderMode | Field description: specify the display mode of this stream.<br>Recommended value: default value: 0. 0 is cropping, 1 is zooming, 2 is zooming and displaying black background.<br><strong>Note</strong><br>image doesn't support setting <code> renderMode </code> temporarily, the default display mode is forced stretch. |
772
+ | image | Field description: specify the placeholder or watermark image. The placeholder image will be displayed when there is no upstream video.A watermark image is a semi-transparent image posted in the mixed image, and this image will always be overlaid on the mixed image.<br>- When the <code>inputType</code> field is set to TRTC_MixInputType_PureAudio, the image is a placeholder image, and you need to specify <code>userId</code> .<br>- When the <code>inputType</code> field is set to TRTC_MixInputType_Watermark, the image is a watermark image, and you don't need to specify <code>userId</code> .<br>Recommended value: default value: null, indicating not to set the placeholder or watermark image.<br><strong>Note</strong><br>TRTC's backend service will mix the image specified by the URL address into the final stream.URL link length is limited to 512 bytes. The image size is limited to 10MB.Support png, jpg, jpeg, bmp format. Take effects iff the <code>inputType</code> field is set to TRTCMixInputTypePureAudio or TRTC_MixInputType_Watermark. |
773
+ | inputType | Field description: specify the mixed content of this stream (audio only, video only, audio and video, or watermark).<br>Recommended value: default value: TRTC_MixInputType_Undefined.<br><strong>Note</strong><br>- When specifying <code>inputType</code> as TRTC_MixInputType_Undefined and specifying <code>pureAudio</code> to YES, it is equivalent to setting <code>inputType</code> to <code>TRTCMixInputTypePureAudio</code> .<br>- When specifying <code>inputType</code> as TRTC_MixInputType_Undefined and specifying <code>pureAudio</code> to NO, it is equivalent to setting <code>inputType</code> to <code>TRTCMixInputTypeAudioVideo</code> .<br>- When specifying <code>inputType</code> as TRTC_MixInputType_Watermark, you don't need to specify the <code>userId</code> field, but you need to specify the <code>image</code> field. |
774
+ | pureAudio | Field description: specify whether this stream mixes audio only<br>Recommended value: default value: false<br><strong>Note</strong><br>this field has been disused. We recommend you use the new field <code>inputType</code> introduced in v8.5. |
775
+ | renderMode | Field description: specify the display mode of this stream.<br>Recommended value: default value: 0. 0 is cropping, 1 is zooming, 2 is zooming and displaying black background.<br><strong>Note</strong><br>image doesn't support setting <code>renderMode</code> temporarily, the default display mode is forced stretch. |
777
776
  | roomId | Field description: ID of the room where this audio/video stream is located (an empty value indicates the local room ID) |
778
777
  | soundLevel | Field description: specify the target volumn level of On-Cloud MixTranscoding. (value range: 0-100)<br>Recommended value: default value: 100. |
779
778
  | streamType | Field description: specify whether this video image is the primary stream image (TRTC_VIDEO_STREAM_TYPE_BIG) or substream image (TRTC_VIDEO_STREAM_TYPE_SUB). |
@@ -790,23 +789,23 @@ The startSpeedTest: API can be used to test the network speed before a user ente
790
789
  These parameters are used to specify the layout position information of each video image and the encoding parameters of mixtranscoding during On-Cloud MixTranscoding.
791
790
  | EnumType | DESC |
792
791
  | --- | --- |
793
- | appId | Field description: <code> appId </code> of Tencent Cloud CSS<br>Recommended value: please click <code> Application Management </code> > <code> Application Information </code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code> appId </code> in <code> Relayed Live Streaming Info </code>.<br><strong>Note</strong><br>applications created on or after January 9, 2020 do not need to fill in this field. |
792
+ | appId | Field description: <code>appId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>appId</code> in <code>Relayed Live Streaming Info</code> .<br><strong>Note</strong><br>applications created on or after January 9, 2020 do not need to fill in this field. |
794
793
  | audioBitrate | Field description: specify the target audio bitrate of On-Cloud MixTranscoding<br>Recommended value: default value: 64 Kbps. Value range: [32,192]. |
795
794
  | audioChannels | Field description: specify the number of sound channels of On-Cloud MixTranscoding<br>Recommended value: default value: 1, which means mono channel. Valid values: 1: mono channel; 2: dual channel. |
796
795
  | audioCodec | Field description: specify the audio encoding type of On-Cloud MixTranscoding<br>Recommended value: default value: 0, which means LC-AAC. Valid values: 0: LC-AAC; 1: HE-AAC; 2: HE-AACv2.<br><strong>Note</strong><br>- HE-AAC and HE-AACv2 only support [48000, 44100, 32000, 24000, 16000] sample rate.<br>- HE-AACv2 only support dual channel.<br>- HE-AAC and HE-AACv2 take effects iff the output streamId is specified. |
797
796
  | audioSampleRate | Field description: specify the target audio sample rate of On-Cloud MixTranscoding<br>Recommended value: default value: 48000 Hz. Valid values: 12000 Hz, 16000 Hz, 22050 Hz, 24000 Hz, 32000 Hz, 44100 Hz, 48000 Hz. |
798
797
  | backgroundColor | Field description: specify the background color of the mixed video image.<br>Recommended value: default value: 0x000000, which means black and is in the format of hex number; for example: "0x61B9F1" represents the RGB color (97,158,241). |
799
798
  | backgroundImage | Field description: specify the background image of the mixed video image.<br>**Recommended value: default value: null, indicating not to set the background image.<br><strong>Note</strong><br>TRTC's backend service will mix the image specified by the URL address into the final stream.URL link length is limited to 512 bytes. The image size is limited to 10MB.Support png, jpg, jpeg, bmp format. |
800
- | bizId | Field description: <code> bizId </code> of Tencent Cloud CSS<br>Recommended value: please click <code> Application Management </code> > <code> Application Information </code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code> bizId </code> in <code> Relayed Live Streaming Info </code>.<br><strong>Note</strong><br>applications created on or after January 9, 2020 do not need to fill in this field. |
801
- | mixUsers | Field description: specify the position, size, layer, and stream type of each video image in On-Cloud MixTranscoding<br>Recommended value: this field is an array in <code> TRTCMixUser </code> type, where each element represents the information of a video image. |
799
+ | bizId | Field description: <code>bizId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>bizId</code> in <code>Relayed Live Streaming Info</code> .<br><strong>Note</strong><br>applications created on or after January 9, 2020 do not need to fill in this field. |
800
+ | mixUsers | Field description: specify the position, size, layer, and stream type of each video image in On-Cloud MixTranscoding<br>Recommended value: this field is an array in <code>TRTCMixUser</code> type, where each element represents the information of a video image. |
802
801
  | mode | Field description: layout mode<br>Recommended value: please choose a value according to your business needs. The preset mode has better applicability. |
803
- | streamId | Field description: ID of the live stream output to CDN<br>Recommended value: default value: null, that is, the audio/video streams in the room will be mixed into the audio/video stream of the caller of this API.<br>- If you don't set this parameter, the SDK will execute the default logic, that is, it will mix the multiple audio/video streams in the room into the audio/video stream of the caller of this API, i.e., A + B => A.<br>- If you set this parameter, the SDK will mix the audio/video streams in the room into the live stream you specify, i.e., A + B => C (C is the <code> streamId </code> you specify). |
804
- | videoBitrate | Field description: specify the target video bitrate (Kbps) of On-Cloud MixTranscoding<br>Recommended value: if you enter 0, TRTC will estimate a reasonable bitrate value based on <code> videoWidth </code> and <code> videoHeight </code>. You can also refer to the recommended bitrate value in the video resolution enumeration definition (in the comment section). |
802
+ | streamId | Field description: ID of the live stream output to CDN<br>Recommended value: default value: null, that is, the audio/video streams in the room will be mixed into the audio/video stream of the caller of this API.<br>- If you don't set this parameter, the SDK will execute the default logic, that is, it will mix the multiple audio/video streams in the room into the audio/video stream of the caller of this API, i.e., A + B => A.<br>- If you set this parameter, the SDK will mix the audio/video streams in the room into the live stream you specify, i.e., A + B => C (C is the <code>streamId</code> you specify). |
803
+ | videoBitrate | Field description: specify the target video bitrate (Kbps) of On-Cloud MixTranscoding<br>Recommended value: if you enter 0, TRTC will estimate a reasonable bitrate value based on <code>videoWidth</code> and <code>videoHeight</code> . You can also refer to the recommended bitrate value in the video resolution enumeration definition (in the comment section). |
805
804
  | videoFramerate | Field description: specify the target video frame rate (fps) of On-Cloud MixTranscoding<br>Recommended value: default value: 15 fps. Value range: (0,30]. |
806
805
  | videoGOP | Field description: specify the target video keyframe interval (GOP) of On-Cloud MixTranscoding<br>Recommended value: default value: 2 (in seconds). Value range: [1,8]. |
807
- | videoHeight | Field description: specify the target resolution (height) of On-Cloud MixTranscoding<br>Recommended value: 640 px. If you only mix audio streams, please set both <code> width </code> and <code> height </code> to 0; otherwise, there will be a black background in the live stream after mixtranscoding. |
806
+ | videoHeight | Field description: specify the target resolution (height) of On-Cloud MixTranscoding<br>Recommended value: 640 px. If you only mix audio streams, please set both <code>width</code> and <code>height</code> to 0; otherwise, there will be a black background in the live stream after mixtranscoding. |
808
807
  | videoSeiParams | Field description: SEI parameters. default value: null<br><strong>Note</strong><br>the parameter is passed in the form of a JSON string. Here is an example to use it:<br>The currently supported fields and their meanings are as follows:<br>- payloadContent: Required. The payload content of the passthrough SEI, which cannot be empty.<br>- payloadType: Required. The type of the SEI message, with a value range of 5 or an integer within the range of [100, 254] (excluding 244, which is an internally defined timestamp SEI).<br>- payloadUuid: Required when payloadType is 5, and ignored in other cases. The value must be a 32-digit hexadecimal number.<br>- interval: Optional, default is 1000. The sending interval of the SEI, in milliseconds.<br>- followIdr: Optional, default is false. When this value is true, the SEI will be ensured to be carried when sending a key frame, otherwise it is not guaranteed. |
809
- | videoWidth | Field description: specify the target resolution (width) of On-Cloud MixTranscoding<br>Recommended value: 360 px. If you only mix audio streams, please set both <code> width </code> and <code> height </code> to 0; otherwise, there will be a black background in the live stream after mixtranscoding. |
808
+ | videoWidth | Field description: specify the target resolution (width) of On-Cloud MixTranscoding<br>Recommended value: 360 px. If you only mix audio streams, please set both <code>width</code> and <code>height</code> to 0; otherwise, there will be a black background in the live stream after mixtranscoding. |
810
809
 
811
810
  ## TRTCPublishCDNParam
812
811
 
@@ -817,8 +816,8 @@ TRTC's backend service supports publishing audio/video streams to third-party li
817
816
  If you use the Tencent Cloud CSS CDN service, you don't need to care about this parameter; instead, just use the startPublish API.
818
817
  | EnumType | DESC |
819
818
  | --- | --- |
820
- | appId | Field description: <code> appId </code> of Tencent Cloud CSS<br>Recommended value: please click <code> Application Management </code> > <code> Application Information </code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code> appId </code> in <code> Relayed Live Streaming Info </code>. |
821
- | bizId | Field description: <code> bizId </code> of Tencent Cloud CSS<br>Recommended value: please click <code> Application Management </code> > <code> Application Information </code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code> bizId </code> in <code> Relayed Live Streaming Info </code>. |
819
+ | appId | Field description: <code>appId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>appId</code> in <code>Relayed Live Streaming Info</code> . |
820
+ | bizId | Field description: <code>bizId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>bizId</code> in <code>Relayed Live Streaming Info</code> . |
822
821
  | streamId | Field description: specify the push address (in RTMP format) of this audio/video stream at the third-party live streaming service provider<br>Recommended value: default value: null,that is, the audio/video streams in the room will be pushed to the target service provider of the caller of this API. |
823
822
  | url | Field description: specify the push address (in RTMP format) of this audio/video stream at the third-party live streaming service provider<br>Recommended value: the push URL rules vary greatly by service provider. Please enter a valid push URL according to the requirements of the target service provider. TRTC's backend server will push audio/video streams in the standard format to the third-party service provider according to the URL you enter.<br><strong>Note</strong><br>the push URL must be in RTMP format and meet the specifications of your target live streaming service provider; otherwise, the target service provider will reject the push requests from TRTC's backend service. |
824
823
 
@@ -829,8 +828,8 @@ If you use the Tencent Cloud CSS CDN service, you don't need to care about this
829
828
  This parameter is used to specify the recording parameters in the audio recording API startAudioRecording.
830
829
  | EnumType | DESC |
831
830
  | --- | --- |
832
- | filePath | Field description: storage path of the audio recording file, which is required.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the audio recording file. Currently, supported formats include PCM, WAV, and AAC.<br>For example, if you specify the path as <code> mypath/record/audio.aac </code>, it means that you want the SDK to generate an audio recording file in AAC format.Please specify a valid path with read/write permissions; otherwise, the audio recording file cannot be generated. |
833
- | maxDurationPerFile | Field description: <code> maxDurationPerFile </code> is the max duration of each recorded file segments, in milliseconds, with a minimum value of 10000. The default value is 0, indicating no segmentation. |
831
+ | filePath | Field description: storage path of the audio recording file, which is required.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the audio recording file. Currently, supported formats include PCM, WAV, and AAC.<br>For example, if you specify the path as <code>mypath/record/audio.aac</code> , it means that you want the SDK to generate an audio recording file in AAC format.Please specify a valid path with read/write permissions; otherwise, the audio recording file cannot be generated. |
832
+ | maxDurationPerFile | Field description: <code>maxDurationPerFile</code> is the max duration of each recorded file segments, in milliseconds, with a minimum value of 10000. The default value is 0, indicating no segmentation. |
834
833
  | recordingContent | Field description: Audio recording content type.<br>Note: Record all local and remote audio by default. |
835
834
 
836
835
  ## TRTCLocalRecordingParams
@@ -842,10 +841,10 @@ This parameter is used to specify the recording parameters in the local media fi
842
841
  The startLocalRecording API is an enhanced version of the startAudioRecording API. The former can record video files, while the latter can only record audio files.
843
842
  | EnumType | DESC |
844
843
  | --- | --- |
845
- | filePath | Field description: address of the recording file, which is required. Please ensure that the path is valid with read/write permissions; otherwise, the recording file cannot be generated.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the recording file. Currently, only the MP4 format is supported.<br>For example, if you specify the path as <code> mypath/record/test.mp4 </code>, it means that you want the SDK to generate a local video file in MP4 format.<br>Please specify a valid path with read/write permissions; otherwise, the recording file cannot be generated. |
846
- | interval | Field description: <code> interval </code> is the update frequency of the recording information in milliseconds. Value range: [1000, 10000]. Default value: -1, indicating not to call back |
847
- | maxDurationPerFile | Field description: <code> maxDurationPerFile </code> is the max duration of each recorded file segments, in milliseconds, with a minimum value of 10000. The default value is 0, indicating no segmentation. |
848
- | recordType | Field description: media recording type, which is <code> TRTCRecordTypeBoth </code> by default, indicating to record both audio and video. |
844
+ | filePath | Field description: address of the recording file, which is required. Please ensure that the path is valid with read/write permissions; otherwise, the recording file cannot be generated.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the recording file. Currently, only the MP4 format is supported.<br>For example, if you specify the path as <code>mypath/record/test.mp4</code> , it means that you want the SDK to generate a local video file in MP4 format.<br>Please specify a valid path with read/write permissions; otherwise, the recording file cannot be generated. |
845
+ | interval | Field description: <code>interval</code> is the update frequency of the recording information in milliseconds. Value range: [1000, 10000]. Default value: -1, indicating not to call back |
846
+ | maxDurationPerFile | Field description: <code>maxDurationPerFile</code> is the max duration of each recorded file segments, in milliseconds, with a minimum value of 10000. The default value is 0, indicating no segmentation. |
847
+ | recordType | Field description: media recording type, which is <code>TRTCRecordTypeBoth</code> by default, indicating to record both audio and video. |
849
848
 
850
849
  ## TRTCAudioEffectParam(Deprecated)
851
850
 
@@ -857,7 +856,7 @@ This parameter is used to specify the path and number of playback times of a sou
857
856
 
858
857
  After v7.3, the sound effect API has been replaced by a new TXAudioEffectManager#startPlayMusic API.
859
858
 
860
- When you specify the TXAudioMusicParam parameter of ` startPlayMusic `, if ` isShortFile ` is set to ` true `, the file is a "sound effect" file.
859
+ When you specify the TXAudioMusicParam parameter of `startPlayMusic` , if `isShortFile` is set to `true` , the file is a "sound effect" file.
861
860
  | EnumType | DESC |
862
861
  | --- | --- |
863
862
  | effectId | Field description: sound effect ID<br>Note: the SDK supports playing multiple sound effects. IDs are used to distinguish different sound effects and control their start, end, volume, etc. |
@@ -873,10 +872,10 @@ When you specify the TXAudioMusicParam parameter of ` startPlayMusic `, if ` isS
873
872
  This parameter is used for the room switch API switchRoom, which can quickly switch a user from one room to another.
874
873
  | EnumType | DESC |
875
874
  | --- | --- |
876
- | privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified <code> userId </code> values to enter a room, you need to use <code> privateMapKey </code> to restrict the permission.<br>Recommended value: we recommend you use this parameter only if you have high security requirements. For more information, please see <a href="https://www.tencentcloud.com/document/product/647/35157">Enabling Advanced Permission Control</a>. |
877
- | roomId | Field description: numeric room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br><strong>Note</strong><br>either <code> roomId </code> or <code> strRoomId </code> must be entered. If both are entered, <code> roomId </code> will be used. |
878
- | strRoomId | Field description: string-type room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br><strong>Note</strong><br>either <code> roomId </code> or <code> strRoomId </code> must be entered. If both are entered, <code> roomId </code> will be used. |
879
- | userSig | Field description: user signature, which is optional. It is the authentication signature corresponding to the current <code> userId </code> and acts as the login password.<br>If you don't specify the newly calculated <code> userSig </code> during room switch, the SDK will continue to use the <code> userSig </code> you specified during room entry (enterRoom).<br>This requires you to ensure that the old <code> userSig </code> is still within the validity period allowed by the signature at the moment of room switch; otherwise, room switch will fail.<br>Recommended value: for the calculation method, please see <a href="https://www.tencentcloud.com/document/product/647/35166">UserSig</a>. |
875
+ | privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified <code>userId</code> values to enter a room, you need to use <code>privateMapKey</code> to restrict the permission.<br>Recommended value: we recommend you use this parameter only if you have high security requirements. For more information, please see <a href="https://www.tencentcloud.com/document/product/647/35157">Enabling Advanced Permission Control</a>. |
876
+ | roomId | Field description: numeric room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br><strong>Note</strong><br>either <code>roomId</code> or <code>strRoomId</code> must be entered. If both are entered, <code>roomId</code> will be used. |
877
+ | strRoomId | Field description: string-type room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br><strong>Note</strong><br>either <code>roomId</code> or <code>strRoomId</code> must be entered. If both are entered, <code>roomId</code> will be used. |
878
+ | userSig | Field description: user signature, which is optional. It is the authentication signature corresponding to the current <code>userId</code> and acts as the login password.<br>If you don't specify the newly calculated <code>userSig</code> during room switch, the SDK will continue to use the <code>userSig</code> you specified during room entry (enterRoom).<br>This requires you to ensure that the old <code>userSig</code> is still within the validity period allowed by the signature at the moment of room switch; otherwise, room switch will fail.<br>Recommended value: for the calculation method, please see <a href="https://www.tencentcloud.com/document/product/647/35166">UserSig</a>. |
880
879
 
881
880
  ## TRTCAudioFrameDelegateFormat
882
881
 
@@ -888,7 +887,7 @@ This parameter is used to set the relevant format (including sample rate and num
888
887
  | channel | Field description: number of sound channels<br>Recommended value: default value: 1, which means mono channel. Valid values: 1: mono channel; 2: dual channel. |
889
888
  | mode | Field description: audio callback data operation mode<br>Recommended value: TRTC_AUDIO_FRAME_OPERATION_MODE_READONLY, get audio data from callback only. The modes that can be set are TRTC_AUDIO_FRAME_OPERATION_MODE_READONLY, TRTC_AUDIO_FRAME_OPERATION_MODE_READWRITE. |
890
889
  | sampleRate | Field description: sample rate<br>Recommended value: default value: 48000 Hz. Valid values: 16000, 32000, 44100, 48000. |
891
- | samplesPerCall | Field description: number of sample points<br>Recommended value: the value must be an integer multiple of <code> sampleRate/100 </code>. |
890
+ | samplesPerCall | Field description: number of sample points<br>Recommended value: the value must be an integer multiple of <code>sampleRate/100</code> . |
892
891
 
893
892
  ## TRTCScreenShareParams
894
893
 
@@ -898,7 +897,7 @@ This parameter is used to specify the floating window and other related informat
898
897
  | EnumType | DESC |
899
898
  | --- | --- |
900
899
  | enableForegroundService | @deprecated Begin from v11.8 version, in order to adapt to targetSdkVersion 34 and above, screen sharing will default to launching a built-in foreground service. This value setting will be invalid. |
901
- | floatingView | Field description: you can set a floating view through this parameter.<br>Recommended value: starting from Android 7.0, applications running in the background with no session keep-alive configured will be force stopped by the Android system very soon.<br>However, when an application is sharing the screen, it will inevitably be switched to the system background. In this case, if a floating window can pop up, it can prevent the application from being force stopped by the system.<br>In addition, the pop-up floating window also informs the user of the ongoing screen sharing, helping remind the user to avoid the leakage of confidential information.<br><strong>Note</strong><br>you can also use the <code> WindowsManager </code> API of Android to achieve the same effect. |
900
+ | floatingView | Field description: you can set a floating view through this parameter.<br>Recommended value: starting from Android 7.0, applications running in the background with no session keep-alive configured will be force stopped by the Android system very soon.<br>However, when an application is sharing the screen, it will inevitably be switched to the system background. In this case, if a floating window can pop up, it can prevent the application from being force stopped by the system.<br>In addition, the pop-up floating window also informs the user of the ongoing screen sharing, helping remind the user to avoid the leakage of confidential information.<br><strong>Note</strong><br>you can also use the <code>WindowsManager</code> API of Android to achieve the same effect. |
902
901
  | mediaProjection | Field description: you can set a MediaProjection to SDK through this parameter.<br>Recommended value: this parameter can be set as null normally. |
903
902
 
904
903
  ## TRTCUser
@@ -908,9 +907,9 @@ This parameter is used to specify the floating window and other related informat
908
907
  You can use this parameter together with the publishing destination parameter TRTCPublishTarget and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to the destination you specify.
909
908
  | EnumType | DESC |
910
909
  | --- | --- |
911
- | intRoomId | <strong>Description:</strong> Numeric room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Value:</strong> Value range: 1-4294967294<br><strong>Note:</strong> You cannot use both <code> intRoomId </code> and <code> strRoomId </code>. If you specify <code> strRoomId </code>, you need to set <code> intRoomId </code> to <code> 0 </code>. If you set both, only <code> intRoomId </code> will be used. |
912
- | strRoomId | <strong>Description:</strong> String-type room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Note:</strong> You cannot use both <code> intRoomId </code> and <code> strRoomId </code>. If you specify <code> roomId </code>, you need to leave <code> strRoomId </code> empty. If you set both, only <code> intRoomId </code> will be used.<br><strong>Value:</strong> 64 bytes or shorter; supports the following character set (89 characters):<br>- Uppercase and lowercase letters (a-z and A-Z)<br>- Numbers (0-9)<br>- Space, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", "," |
913
- | userId | /<strong>Description</strong>: UTF-8-encoded user ID (required)<br><strong>Value:</strong> For example, if the ID of a user in your account system is "mike", set it to <code> mike </code>. |
910
+ | intRoomId | <strong>Description:</strong> Numeric room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Value:</strong> Value range: 1-4294967294<br><strong>Note:</strong> You cannot use both <code>intRoomId</code> and <code>strRoomId</code> . If you specify <code>strRoomId</code> , you need to set <code>intRoomId</code> to <code>0</code> . If you set both, only <code>intRoomId</code> will be used. |
911
+ | strRoomId | <strong>Description:</strong> String-type room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Note:</strong> You cannot use both <code>intRoomId</code> and <code>strRoomId</code> . If you specify <code>roomId</code> , you need to leave <code>strRoomId</code> empty. If you set both, only <code>intRoomId</code> will be used.<br><strong>Value:</strong> 64 bytes or shorter; supports the following character set (89 characters):<br>- Uppercase and lowercase letters (a-z and A-Z)<br>- Numbers (0-9)<br>- Space, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", "," |
912
+ | userId | /<strong>Description</strong>: UTF-8-encoded user ID (required)<br><strong>Value:</strong> For example, if the ID of a user in your account system is "mike", set it to <code>mike</code> . |
914
913
 
915
914
  ## TRTCPublishCdnUrl
916
915
 
@@ -919,7 +918,7 @@ You can use this parameter together with the publishing destination parameter TR
919
918
  This enum type is used by the publishing destination parameter TRTCPublishTarget of the publishing API startPublishMediaStream.
920
919
  | EnumType | DESC |
921
920
  | --- | --- |
922
- | isInternalLine | <strong>Description:</strong> Whether to publish to Tencent Cloud<br><strong>Value:</strong> The default value is <code> true </code>.<br><strong>Note:</strong> If the destination URL you set is provided by Tencent Cloud, set this parameter to <code> true </code>, and you will not be charged relaying fees. |
921
+ | isInternalLine | <strong>Description:</strong> Whether to publish to Tencent Cloud<br><strong>Value:</strong> The default value is <code>true</code> .<br><strong>Note:</strong> If the destination URL you set is provided by Tencent Cloud, set this parameter to <code>true</code> , and you will not be charged relaying fees. |
923
922
  | rtmpUrl | <strong>Description:</strong> The destination URL (RTMP) when you publish to Tencent Cloud or a third-party CDN.<br><strong>Value:</strong> The URLs of different CDN providers may vary greatly in format. Please enter a valid URL as required by your service provider. TRTC's backend server will push audio/video streams in the standard format to the URL you provide.<br><strong>Note:</strong> The URL must be in RTMP format. It must also meet the requirements of your service provider, or your service provider may reject push requests from the TRTC backend. |
924
923
 
925
924
  ## TRTCPublishTarget
@@ -929,9 +928,9 @@ This enum type is used by the publishing destination parameter TRTCPublishTarget
929
928
  This enum type is used by the publishing API startPublishMediaStream.
930
929
  | EnumType | DESC |
931
930
  | --- | --- |
932
- | cdnUrlList | <code> Description: </code> The destination URLs (RTMP) when you publish to Tencent Cloud or third-party CDNs.<br><code> Note: </code> You don’t need to set this parameter if you set the publishing mode to TRTC_PublishMixStream_ToRoom. |
933
- | mixStreamIdentity | <code> Description: </code> The information of the robot that publishes the transcoded stream to a TRTC room.<br><code> Note: </code> You need to set this parameter only if you set the publishing mode to TRTC_PublishMixStream_ToRoom`.<br><code> Note: </code> After you set this parameter, the stream will be pushed to the room you specify. We recommend you set it to a special user ID to distinguish the robot from the anchor who enters the room via the TRTC SDK.<br><code> Note: </code> Users whose streams are transcoded cannot subscribe to the transcoded stream.<br><code> Note: </code> If you set the subscription mode (setDefaultStreamRecvMode) to manual before room entry, you need to manage the streams to receive by yourself (normally, if you receive the transcoded stream, you need to unsubscribe from the streams that are transcoded).<br><code> Note: </code> If you set the subscription mode (setDefaultStreamRecvMode) to auto before room entry, users whose streams are not transcoded will receive the transcoded stream automatically and will unsubscribe from the users whose streams are transcoded. You call muteRemoteVideoStream and muteRemoteAudio to unsubscribe from the transcoded stream. |
934
- | mode | <code> Description: </code> The publishing mode.<br><code> Value: </code> You can relay streams to a CDN, transcode streams, or publish streams to an RTC room. Select the mode that fits your needs.<br><strong>Note</strong><br>If you need to use more than one publishing mode, you can call startPublishMediaStream multiple times and set <code> TRTCPublishTarget </code> to a different value each time.You can use one mode each time you call the startPublishMediaStream) API. To modify the configuration, call updatePublishCDNStream. |
931
+ | cdnUrlList | <code>Description:</code> The destination URLs (RTMP) when you publish to Tencent Cloud or third-party CDNs.<br><code>Note:</code> You don’t need to set this parameter if you set the publishing mode to TRTC_PublishMixStream_ToRoom. |
932
+ | mixStreamIdentity | <code>Description:</code> The information of the robot that publishes the transcoded stream to a TRTC room.<br><code>Note:</code> You need to set this parameter only if you set the publishing mode to TRTC_PublishMixStream_ToRoom`.<br><code>Note:</code> After you set this parameter, the stream will be pushed to the room you specify. We recommend you set it to a special user ID to distinguish the robot from the anchor who enters the room via the TRTC SDK.<br><code>Note:</code> Users whose streams are transcoded cannot subscribe to the transcoded stream.<br><code>Note:</code> If you set the subscription mode (setDefaultStreamRecvMode) to manual before room entry, you need to manage the streams to receive by yourself (normally, if you receive the transcoded stream, you need to unsubscribe from the streams that are transcoded).<br><code>Note:</code> If you set the subscription mode (setDefaultStreamRecvMode) to auto before room entry, users whose streams are not transcoded will receive the transcoded stream automatically and will unsubscribe from the users whose streams are transcoded. You call muteRemoteVideoStream and muteRemoteAudio to unsubscribe from the transcoded stream. |
933
+ | mode | <code>Description:</code> The publishing mode.<br><code>Value:</code> You can relay streams to a CDN, transcode streams, or publish streams to an RTC room. Select the mode that fits your needs.<br><strong>Note</strong><br>If you need to use more than one publishing mode, you can call startPublishMediaStream multiple times and set <code>TRTCPublishTarget</code> to a different value each time.You can use one mode each time you call the startPublishMediaStream) API. To modify the configuration, call updatePublishCDNStream. |
935
934
 
936
935
  ## TRTCVideoLayout
937
936
 
@@ -942,16 +941,16 @@ This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixing
942
941
  You can use this parameter to specify the position, size, layer, and stream type of each video in the transcoded stream.
943
942
  | EnumType | DESC |
944
943
  | --- | --- |
945
- | backgroundColor | <code> Description: </code> The background color of the mixed stream.<br><code> Value: </code> The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black). |
946
- | fillMode | <code> Description: </code> The rendering mode.<br><code> Value: </code> The rendering mode may be fill (the image may be stretched or cropped) or fit (there may be black bars). Default value: TRTC_VIDEO_RENDER_MODE_FILL. |
947
- | fixedVideoStreamType | <code> Description: </code> Whether the video is the primary stream (TRTC_VIDEO_STREAM_TYPE_BIG) or substream (TRTC_VIDEO_STREAM_TYPE_SUB). |
948
- | fixedVideoUser | <code> Description: </code> The users whose streams are transcoded.<br><strong>Note</strong><br>If you do not specify TRTCUser (<code> userId </code>, <code> intRoomId </code>, <code> strRoomId </code>), the TRTC backend will automatically mix the streams of anchors who are sending audio/video in the room according to the video layout you specify. |
949
- | height | <code> Description: </code> The height (in pixels) of the video. |
950
- | placeHolderImage | <code> Description: </code> The URL of the placeholder image. If a user sends only audio, the image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><code> Value: </code> This parameter is left empty by default, which means no placeholder image will be used.<br><strong>Note</strong><br>- You need to specify the <code> userId </code> parameter in <code> fixedVideoUser </code>.<br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
951
- | width | <code> Description: </code> The width (in pixels) of the video. |
952
- | x | <code> Description: </code> The X coordinate (in pixels) of the video. |
953
- | y | <code> Description: </code> The Y coordinate (in pixels) of the video. |
954
- | zOrder | <code> Description: </code> The layer of the video, which must be unique. Value range: 0-15. |
944
+ | backgroundColor | <code>Description:</code> The background color of the mixed stream.<br><code>Value:</code> The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black). |
945
+ | fillMode | <code>Description:</code> The rendering mode.<br><code>Value:</code> The rendering mode may be fill (the image may be stretched or cropped) or fit (there may be black bars). Default value: TRTC_VIDEO_RENDER_MODE_FILL. |
946
+ | fixedVideoStreamType | <code>Description:</code> Whether the video is the primary stream (TRTC_VIDEO_STREAM_TYPE_BIG) or substream (TRTC_VIDEO_STREAM_TYPE_SUB). |
947
+ | fixedVideoUser | <code>Description:</code> The users whose streams are transcoded.<br><strong>Note</strong><br>If you do not specify TRTCUser ( <code>userId</code> , <code>intRoomId</code> , <code>strRoomId</code> ), the TRTC backend will automatically mix the streams of anchors who are sending audio/video in the room according to the video layout you specify. |
948
+ | height | <code>Description:</code> The height (in pixels) of the video. |
949
+ | placeHolderImage | <code>Description:</code> The URL of the placeholder image. If a user sends only audio, the image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is left empty by default, which means no placeholder image will be used.<br><strong>Note</strong><br>- You need to specify the <code>userId</code> parameter in <code>fixedVideoUser</code> .<br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
950
+ | width | <code>Description:</code> The width (in pixels) of the video. |
951
+ | x | <code>Description:</code> The X coordinate (in pixels) of the video. |
952
+ | y | <code>Description:</code> The Y coordinate (in pixels) of the video. |
953
+ | zOrder | <code>Description:</code> The layer of the video, which must be unique. Value range: 0-15. |
955
954
 
956
955
  ## TRTCWatermark
957
956
 
@@ -960,35 +959,35 @@ You can use this parameter to specify the position, size, layer, and stream type
960
959
  This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixingConfig of the publishing API startPublishMediaStream.
961
960
  | EnumType | DESC |
962
961
  | --- | --- |
963
- | height | <code> Description: </code> The height (in pixels) of the watermark. |
964
- | watermarkUrl | <code> Description: </code> The URL of the watermark image. The image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><strong>Note</strong><br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
965
- | width | <code> Description: </code> The width (in pixels) of the watermark. |
966
- | x | <code> Description: </code> The X coordinate (in pixels) of the watermark. |
967
- | y | <code> Description: </code> The Y coordinate (in pixels) of the watermark. |
968
- | zOrder | <code> Description: </code> The layer of the watermark, which must be unique. Value range: 0-15. |
962
+ | height | <code>Description:</code> The height (in pixels) of the watermark. |
963
+ | watermarkUrl | <code>Description:</code> The URL of the watermark image. The image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><strong>Note</strong><br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
964
+ | width | <code>Description:</code> The width (in pixels) of the watermark. |
965
+ | x | <code>Description:</code> The X coordinate (in pixels) of the watermark. |
966
+ | y | <code>Description:</code> The Y coordinate (in pixels) of the watermark. |
967
+ | zOrder | <code>Description:</code> The layer of the watermark, which must be unique. Value range: 0-15. |
969
968
 
970
969
  ## TRTCStreamEncoderParam
971
970
 
972
971
  **The encoding parameters.**
973
972
 
974
- ` Description: ` This enum type is used by the publishing API startPublishMediaStream.
973
+ `Description:` This enum type is used by the publishing API startPublishMediaStream.
975
974
 
976
- ` Note: ` This parameter is required if you set the publishing mode to ` TRTCPublish_MixStream_ToCdn ` or ` TRTCPublish_MixStream_ToRoom ` in TRTCPublishTarget.
975
+ `Note:` This parameter is required if you set the publishing mode to `TRTCPublish_MixStream_ToCdn` or `TRTCPublish_MixStream_ToRoom` in TRTCPublishTarget.
977
976
 
978
- ` Note: ` If you use the relay to CDN feature (the publishing mode set to ` RTCPublish_BigStream_ToCdn ` or ` TRTCPublish_SubStream_ToCdn `), to improve the relaying stability and playback compatibility, we also recommend you set this parameter.
977
+ `Note:` If you use the relay to CDN feature (the publishing mode set to `RTCPublish_BigStream_ToCdn` or `TRTCPublish_SubStream_ToCdn` ), to improve the relaying stability and playback compatibility, we also recommend you set this parameter.
979
978
  | EnumType | DESC |
980
979
  | --- | --- |
981
- | audioEncodedChannelNum | <code> Description: </code> The sound channels of the stream to publish.<br><code> Value: </code> Valid values: 1 (mono channel); 2 (dual-channel). Default: 1. |
982
- | audioEncodedCodecType | <code> Description: </code> The audio codec of the stream to publish.<br><code> Value: </code> Valid values: 0 (LC-AAC); 1 (HE-AAC); 2 (HE-AACv2). Default: 0.<br><strong>Note</strong><br>- The audio sample rates supported by HE-AAC and HE-AACv2 are 48000, 44100, 32000, 24000, and 16000.<br>- When HE-AACv2 is used, the output stream can only be dual-channel. |
983
- | audioEncodedKbps | <code> Description: </code> The audio bitrate (Kbps) of the stream to publish.<br><code> Value: </code> Value range: [32,192]. Default: 50. |
984
- | audioEncodedSampleRate | <code> Description: </code> The audio sample rate of the stream to publish.<br><code> Value: </code> Valid values: [48000, 44100, 32000, 24000, 16000, 8000]. Default: 48000 (Hz). |
985
- | videoEncodedCodecType | <code> Description: </code> The video codec of the stream to publish.<br><code> Value: </code> Valid values: 0 (H264); 1 (H265). Default: 0. |
986
- | videoEncodedFPS | <code> Description: </code> The frame rate (fps) of the stream to publish.<br><code> Value: </code> Value range: (0,30]. Default: 20. |
987
- | videoEncodedGOP | <code> Description: </code> The keyframe interval (GOP) of the stream to publish.<br><code> Value: </code> Value range: [1,5]. Default: 3 (seconds). |
988
- | videoEncodedHeight | <code> Description: </code> The resolution (height) of the stream to publish.<br><code> Value: </code> Recommended value: 640. If you mix only audio streams, to avoid displaying a black video in the transcoded stream, set both <code> width </code> and <code> height </code> to <code> 0 </code>. |
989
- | videoEncodedKbps | <code> Description: </code> The video bitrate (Kbps) of the stream to publish.<br><code> Value: </code> If you set this parameter to <code> 0 </code>, TRTC will work out a bitrate based on <code> videoWidth </code> and <code> videoHeight </code>. For details, refer to the recommended bitrates for the constants of the resolution enum type (see comment). |
990
- | videoEncodedWidth | <code> Description: </code> The resolution (width) of the stream to publish.<br><code> Value: </code> Recommended value: 368. If you mix only audio streams, to avoid displaying a black video in the transcoded stream, set both <code> width </code> and <code> height </code> to <code> 0 </code>. |
991
- | videoSeiParams | <code> Description: </code> SEI parameters. Default: null<br><code> Note: </code> the parameter is passed in the form of a JSON string. Here is an example to use it:<br>`{`<br>` "payLoadContent":"xxx",`<br>` "payloadType":5,`<br>` "payloadUuid":"1234567890abcdef1234567890abcdef",`<br>` "interval":1000,`<br>` "followIdr":false`<br>`}`<br>The currently supported fields and their meanings are as follows:<br>- payloadContent: Required. The payload content of the passthrough SEI, which cannot be empty.<br>- payloadType: Required. The type of the SEI message, with a value range of 5 or an integer within the range of [100, 254] (excluding 244, which is an internally defined timestamp SEI).<br>- payloadUuid: Required when payloadType is 5, and ignored in other cases. The value must be a 32-digit hexadecimal number.<br>- interval: Optional, default is 1000. The sending interval of the SEI, in milliseconds.<br>- followIdr: Optional, default is false. When this value is true, the SEI will be ensured to be carried when sending a key frame, otherwise it is not guaranteed. |
980
+ | audioEncodedChannelNum | <code>Description:</code> The sound channels of the stream to publish.<br><code>Value:</code> Valid values: 1 (mono channel); 2 (dual-channel). Default: 1. |
981
+ | audioEncodedCodecType | <code>Description:</code> The audio codec of the stream to publish.<br><code>Value:</code> Valid values: 0 (LC-AAC); 1 (HE-AAC); 2 (HE-AACv2). Default: 0.<br><strong>Note</strong><br>- The audio sample rates supported by HE-AAC and HE-AACv2 are 48000, 44100, 32000, 24000, and 16000.<br>- When HE-AACv2 is used, the output stream can only be dual-channel. |
982
+ | audioEncodedKbps | <code>Description:</code> The audio bitrate (Kbps) of the stream to publish.<br><code>Value:</code> Value range: [32,192]. Default: 50. |
983
+ | audioEncodedSampleRate | <code>Description:</code> The audio sample rate of the stream to publish.<br><code>Value:</code> Valid values: [48000, 44100, 32000, 24000, 16000, 8000]. Default: 48000 (Hz). |
984
+ | videoEncodedCodecType | <code>Description:</code> The video codec of the stream to publish.<br><code>Value:</code> Valid values: 0 (H264); 1 (H265). Default: 0. |
985
+ | videoEncodedFPS | <code>Description:</code> The frame rate (fps) of the stream to publish.<br><code>Value:</code> Value range: (0,30]. Default: 20. |
986
+ | videoEncodedGOP | <code>Description:</code> The keyframe interval (GOP) of the stream to publish.<br><code>Value:</code> Value range: [1,5]. Default: 3 (seconds). |
987
+ | videoEncodedHeight | <code>Description:</code> The resolution (height) of the stream to publish.<br><code>Value:</code> Recommended value: 640. If you mix only audio streams, to avoid displaying a black video in the transcoded stream, set both <code>width</code> and <code>height</code> to <code>0</code> . |
988
+ | videoEncodedKbps | <code>Description:</code> The video bitrate (Kbps) of the stream to publish.<br><code>Value:</code> If you set this parameter to <code>0</code> , TRTC will work out a bitrate based on <code>videoWidth</code> and <code>videoHeight</code> . For details, refer to the recommended bitrates for the constants of the resolution enum type (see comment). |
989
+ | videoEncodedWidth | <code>Description:</code> The resolution (width) of the stream to publish.<br><code>Value:</code> Recommended value: 368. If you mix only audio streams, to avoid displaying a black video in the transcoded stream, set both <code>width</code> and <code>height</code> to <code>0</code> . |
990
+ | videoSeiParams | <code>Description:</code> SEI parameters. Default: null<br><code>Note:</code> the parameter is passed in the form of a JSON string. Here is an example to use it:<br>`{`<br>` "payLoadContent":"xxx",`<br>` "payloadType":5,`<br>` "payloadUuid":"1234567890abcdef1234567890abcdef",`<br>` "interval":1000,`<br>` "followIdr":false`<br>`}`<br>The currently supported fields and their meanings are as follows:<br>- payloadContent: Required. The payload content of the passthrough SEI, which cannot be empty.<br>- payloadType: Required. The type of the SEI message, with a value range of 5 or an integer within the range of [100, 254] (excluding 244, which is an internally defined timestamp SEI).<br>- payloadUuid: Required when payloadType is 5, and ignored in other cases. The value must be a 32-digit hexadecimal number.<br>- interval: Optional, default is 1000. The sending interval of the SEI, in milliseconds.<br>- followIdr: Optional, default is false. When this value is true, the SEI will be ensured to be carried when sending a key frame, otherwise it is not guaranteed. |
992
991
 
993
992
  ## TRTCStreamMixingConfig
994
993
 
@@ -999,11 +998,11 @@ This enum type is used by the publishing API startPublishMediaStream.
999
998
  You can use this parameter to specify the video layout and input audio information for On-Cloud MixTranscoding.
1000
999
  | EnumType | DESC |
1001
1000
  | --- | --- |
1002
- | audioMixUserList | <code> Description: </code> The information of each audio stream to mix.<br><code> Value: </code> This parameter is an array. Each <code> TRTCUser </code> element in the array indicates the information of an audio stream.<br><strong>Note</strong><br>If you do not specify this array, the TRTC backend will automatically mix all streams of the anchors who are sending audio in the room according to the audio encode param TRTCStreamEncoderParam you specify (currently only supports up to 16 audio and video inputs). |
1003
- | backgroundColor | <code> Description: </code> The background color of the mixed stream.<br><code> Value: </code> The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black). |
1004
- | backgroundImage | <code> Description: </code> The URL of the background image of the mixed stream. The image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><code> Value: </code> This parameter is left empty by default, which means no background image will be used.<br><strong>Note</strong><br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
1005
- | videoLayoutList | <code> Description: </code> The position, size, layer, and stream type of each video in On-Cloud MixTranscoding.<br><code> Value: </code> This parameter is an array. Each <code> TRTCVideoLayout </code> element in the array indicates the information of a video in On-Cloud MixTranscoding. |
1006
- | watermarkList | <code> Description: </code> The position, size, and layer of each watermark image in On-Cloud MixTranscoding.<br><code> Value: </code> This parameter is an array. Each <code> TRTCWatermark </code> element in the array indicates the information of a watermark. |
1001
+ | audioMixUserList | <code>Description:</code> The information of each audio stream to mix.<br><code>Value:</code> This parameter is an array. Each <code>TRTCUser</code> element in the array indicates the information of an audio stream.<br><strong>Note</strong><br>If you do not specify this array, the TRTC backend will automatically mix all streams of the anchors who are sending audio in the room according to the audio encode param TRTCStreamEncoderParam you specify (currently only supports up to 16 audio and video inputs). |
1002
+ | backgroundColor | <code>Description:</code> The background color of the mixed stream.<br><code>Value:</code> The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black). |
1003
+ | backgroundImage | <code>Description:</code> The URL of the background image of the mixed stream. The image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is left empty by default, which means no background image will be used.<br><strong>Note</strong><br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
1004
+ | videoLayoutList | <code>Description:</code> The position, size, layer, and stream type of each video in On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is an array. Each <code>TRTCVideoLayout</code> element in the array indicates the information of a video in On-Cloud MixTranscoding. |
1005
+ | watermarkList | <code>Description:</code> The position, size, and layer of each watermark image in On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is an array. Each <code>TRTCWatermark</code> element in the array indicates the information of a watermark. |
1007
1006
 
1008
1007
  ## TRTCPayloadPrivateEncryptionConfig
1009
1008
 
@@ -1012,9 +1011,9 @@ You can use this parameter to specify the video layout and input audio informati
1012
1011
  This configuration is used to set the algorithm and key for media stream private encryption.
1013
1012
  | EnumType | DESC |
1014
1013
  | --- | --- |
1015
- | encryptionAlgorithm | <code> Description: </code> Encryption algorithm, the default is TRTC_EncryptionAlgorithm_Aes_128_Gcm. |
1016
- | encryptionKey | <code> Description: </code> encryption key, string type.<br><code> Value: </code> If the encryption algorithm is TRTC_EncryptionAlgorithm_Aes_128_Gcm, the key length must be 16 bytes;<br>if the encryption algorithm is TRTC_EncryptionAlgorithm_Aes_256_Gcm, the key length must be 32 bytes. |
1017
- | encryptionSalt | <code> Description: </code> Salt, initialization vector for encryption.<br><code> Value: </code> It is necessary to ensure that the array filled in this parameter is not empty, not all 0 and the data length is 32 bytes. |
1014
+ | encryptionAlgorithm | <code>Description:</code> Encryption algorithm, the default is TRTC_EncryptionAlgorithm_Aes_128_Gcm. |
1015
+ | encryptionKey | <code>Description:</code> encryption key, string type.<br><code>Value:</code> If the encryption algorithm is TRTC_EncryptionAlgorithm_Aes_128_Gcm, the key length must be 16 bytes;<br>if the encryption algorithm is TRTC_EncryptionAlgorithm_Aes_256_Gcm, the key length must be 32 bytes. |
1016
+ | encryptionSalt | <code>Description:</code> Salt, initialization vector for encryption.<br><code>Value:</code> It is necessary to ensure that the array filled in this parameter is not empty, not all 0 and the data length is 32 bytes. |
1018
1017
 
1019
1018
  ## TRTCAudioVolumeEvaluateParams
1020
1019
 
@@ -1023,7 +1022,7 @@ This configuration is used to set the algorithm and key for media stream private
1023
1022
  This setting is used to enable vocal detection and sound spectrum calculation.
1024
1023
  | EnumType | DESC |
1025
1024
  | --- | --- |
1026
- | enablePitchCalculation | <code> Description: </code> Whether to enable local vocal frequency calculation. |
1027
- | enableSpectrumCalculation | <code> Description: </code> Whether to enable sound spectrum calculation. |
1028
- | enableVadDetection | <code> Description: </code> Whether to enable local voice detection.<br><strong>Note</strong><br>Call before startLocalAudio. |
1029
- | interval | <code> Description: </code> Set the trigger interval of the onUserVoiceVolume callback, the unit is milliseconds, the minimum interval is 100ms, if it is less than or equal to 0, the callback will be closed.<br><code> Value: </code> Recommended value: 300, in milliseconds.<br><strong>Note</strong><br>When the interval is greater than 0, the volume prompt will be enabled by default, no additional setting is required. |
1025
+ | enablePitchCalculation | <code>Description:</code> Whether to enable local vocal frequency calculation. |
1026
+ | enableSpectrumCalculation | <code>Description:</code> Whether to enable sound spectrum calculation. |
1027
+ | enableVadDetection | <code>Description:</code> Whether to enable local voice detection.<br><strong>Note</strong><br>Call before startLocalAudio. |
1028
+ | interval | <code>Description:</code> Set the trigger interval of the onUserVoiceVolume callback, the unit is milliseconds, the minimum interval is 100ms, if it is less than or equal to 0, the callback will be closed.<br><code>Value:</code> Recommended value: 300, in milliseconds.<br><strong>Note</strong><br>When the interval is greater than 0, the volume prompt will be enabled by default, no additional setting is required. |