agora-electron-sdk 4.1.1-rc.1 → 4.2.0-dev.13

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 (358) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +143 -143
  3. package/gulpfile.js +5 -4
  4. package/js/AgoraSdk.js +62 -60
  5. package/js/Private/AgoraBase.js +4575 -3269
  6. package/js/Private/AgoraMediaBase.js +968 -564
  7. package/js/Private/AgoraMediaPlayerTypes.js +422 -310
  8. package/js/Private/IAgoraLog.js +86 -74
  9. package/js/Private/IAgoraMediaEngine.js +32 -32
  10. package/js/Private/IAgoraMediaPlayer.js +16 -16
  11. package/js/Private/IAgoraMediaPlayerSource.js +3 -3
  12. package/js/Private/IAgoraMediaRecorder.js +12 -12
  13. package/js/Private/IAgoraMediaStreamingSource.js +84 -0
  14. package/js/Private/IAgoraMusicContentCenter.js +239 -81
  15. package/js/Private/IAgoraRhythmPlayer.js +70 -62
  16. package/js/Private/IAgoraRtcEngine.js +1807 -948
  17. package/js/Private/IAgoraRtcEngineEx.js +26 -18
  18. package/js/Private/IAgoraSpatialAudio.js +74 -30
  19. package/js/Private/IAudioDeviceManager.js +20 -20
  20. package/js/Private/extension/AgoraBaseExtension.js +2 -2
  21. package/js/Private/extension/AgoraMediaBaseExtension.js +2 -2
  22. package/js/Private/extension/AgoraMediaPlayerTypesExtension.js +2 -2
  23. package/js/Private/extension/IAgoraLogExtension.js +2 -2
  24. package/js/Private/extension/IAgoraMediaEngineExtension.js +2 -2
  25. package/js/Private/extension/IAgoraMediaPlayerExtension.js +2 -2
  26. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.js +2 -2
  27. package/js/Private/extension/IAgoraMediaRecorderExtension.js +2 -2
  28. package/js/Private/extension/IAgoraMusicContentCenterExtension.js +2 -2
  29. package/js/Private/extension/IAgoraRhythmPlayerExtension.js +2 -2
  30. package/js/Private/extension/IAgoraRtcEngineExExtension.js +2 -2
  31. package/js/Private/extension/IAgoraRtcEngineExtension.js +2 -2
  32. package/js/Private/extension/IAgoraSpatialAudioExtension.js +2 -2
  33. package/js/Private/extension/IAudioDeviceManagerExtension.js +2 -2
  34. package/js/Private/impl/AgoraBaseImpl.js +23 -23
  35. package/js/Private/impl/AgoraMediaBaseImpl.js +118 -138
  36. package/js/Private/impl/IAgoraMediaEngineImpl.js +287 -325
  37. package/js/Private/impl/IAgoraMediaPlayerImpl.js +932 -938
  38. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +63 -63
  39. package/js/Private/impl/IAgoraMediaRecorderImpl.js +47 -67
  40. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +353 -323
  41. package/js/Private/impl/IAgoraRtcEngineExImpl.js +945 -907
  42. package/js/Private/impl/IAgoraRtcEngineImpl.js +4742 -4702
  43. package/js/Private/impl/IAgoraSpatialAudioImpl.js +362 -362
  44. package/js/Private/impl/IAudioDeviceManagerImpl.js +375 -375
  45. package/js/Private/internal/AudioDeviceManagerInternal.js +44 -44
  46. package/js/Private/internal/IrisApiEngine.js +391 -382
  47. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +46 -46
  48. package/js/Private/internal/MediaEngineInternal.js +119 -123
  49. package/js/Private/internal/MediaPlayerInternal.js +215 -213
  50. package/js/Private/internal/MediaRecorderInternal.js +82 -81
  51. package/js/Private/internal/MusicContentCenterInternal.js +128 -130
  52. package/js/Private/internal/RtcEngineExInternal.js +422 -363
  53. package/js/Private/internal/emitter/EventEmitter.js +111 -111
  54. package/js/Private/ti/AgoraBase-ti.js +40 -40
  55. package/js/Private/ti/AgoraMediaBase-ti.js +71 -73
  56. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +5 -5
  57. package/js/Private/ti/IAgoraLog-ti.js +5 -5
  58. package/js/Private/ti/IAgoraMediaEngine-ti.js +5 -5
  59. package/js/Private/ti/IAgoraMediaPlayer-ti.js +38 -42
  60. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +48 -48
  61. package/js/Private/ti/IAgoraMediaRecorder-ti.js +5 -5
  62. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +5 -0
  63. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +41 -41
  64. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +5 -5
  65. package/js/Private/ti/IAgoraRtcEngine-ti.js +139 -139
  66. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +5 -5
  67. package/js/Private/ti/IAgoraSpatialAudio-ti.js +5 -5
  68. package/js/Private/ti/IAudioDeviceManager-ti.js +5 -5
  69. package/js/Renderer/AgoraView.js +128 -131
  70. package/js/Renderer/IRenderer.js +40 -48
  71. package/js/Renderer/IRendererManager.js +9 -0
  72. package/js/Renderer/RendererManager.js +479 -392
  73. package/js/Renderer/{GlRenderer → WebGLRenderer}/index.js +469 -473
  74. package/js/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +1337 -1337
  75. package/js/Renderer/YUVCanvasRenderer/index.js +195 -185
  76. package/js/Renderer/index.js +18 -0
  77. package/js/Types.js +17 -29
  78. package/js/Utils.js +168 -173
  79. package/package.json +61 -103
  80. package/scripts/bootstrap.js +1 -1
  81. package/scripts/build.js +1 -0
  82. package/scripts/buildJS.js +3 -3
  83. package/scripts/clean.js +2 -1
  84. package/scripts/downloadPrebuild.js +5 -5
  85. package/scripts/getConfig.js +3 -2
  86. package/scripts/synclib.js +8 -5
  87. package/scripts/util.js +3 -2
  88. package/scripts/zipBuild.js +2 -1
  89. package/ts/AgoraSdk.ts +9 -6
  90. package/ts/Private/AgoraBase.ts +278 -173
  91. package/ts/Private/AgoraMediaBase.ts +167 -100
  92. package/ts/Private/AgoraMediaPlayerTypes.ts +1 -1
  93. package/ts/Private/IAgoraMediaEngine.ts +43 -56
  94. package/ts/Private/IAgoraMediaPlayer.ts +90 -104
  95. package/ts/Private/IAgoraMediaPlayerSource.ts +3 -8
  96. package/ts/Private/IAgoraMediaRecorder.ts +8 -35
  97. package/ts/Private/IAgoraMediaStreamingSource.ts +80 -0
  98. package/ts/Private/IAgoraMusicContentCenter.ts +93 -12
  99. package/ts/Private/IAgoraRtcEngine.ts +807 -910
  100. package/ts/Private/IAgoraRtcEngineEx.ts +187 -191
  101. package/ts/Private/IAgoraSpatialAudio.ts +40 -22
  102. package/ts/Private/IAudioDeviceManager.ts +35 -13
  103. package/ts/Private/extension/IAgoraMediaEngineExtension.ts +1 -1
  104. package/ts/Private/extension/IAgoraMediaPlayerExtension.ts +4 -7
  105. package/ts/Private/extension/IAgoraMediaRecorderExtension.ts +6 -1
  106. package/ts/Private/extension/IAgoraMusicContentCenterExtension.ts +1 -1
  107. package/ts/Private/extension/IAgoraRtcEngineExtension.ts +4 -4
  108. package/ts/Private/impl/AgoraBaseImpl.ts +3 -3
  109. package/ts/Private/impl/AgoraMediaBaseImpl.ts +36 -42
  110. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +79 -127
  111. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +106 -106
  112. package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +13 -45
  113. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +61 -16
  114. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +129 -59
  115. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +490 -416
  116. package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +5 -3
  117. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +4 -2
  118. package/ts/Private/internal/AudioDeviceManagerInternal.ts +6 -5
  119. package/ts/Private/internal/IrisApiEngine.ts +41 -32
  120. package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +17 -13
  121. package/ts/Private/internal/MediaEngineInternal.ts +9 -11
  122. package/ts/Private/internal/MediaPlayerInternal.ts +42 -31
  123. package/ts/Private/internal/MediaRecorderInternal.ts +24 -22
  124. package/ts/Private/internal/MusicContentCenterInternal.ts +16 -18
  125. package/ts/Private/internal/RtcEngineExInternal.ts +189 -66
  126. package/ts/Private/ti/AgoraMediaBase-ti.ts +9 -10
  127. package/ts/Private/ti/IAgoraMediaPlayer-ti.ts +0 -5
  128. package/{js/Private/ti/AgoraMediaPlayerTypes-ti.d.ts → ts/Private/ti/IAgoraMediaStreamingSource-ti.ts} +11 -6
  129. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +4 -4
  130. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +4 -4
  131. package/ts/Renderer/AgoraView.ts +12 -7
  132. package/ts/Renderer/IRenderer.ts +11 -16
  133. package/ts/Renderer/IRendererManager.ts +35 -0
  134. package/ts/Renderer/RendererManager.ts +146 -82
  135. package/ts/Renderer/{GlRenderer → WebGLRenderer}/index.ts +36 -51
  136. package/ts/Renderer/YUVCanvasRenderer/index.ts +41 -25
  137. package/ts/Renderer/index.ts +2 -0
  138. package/ts/Types.ts +43 -23
  139. package/ts/Utils.ts +7 -12
  140. package/types/AgoraSdk.d.ts +38 -36
  141. package/types/AgoraSdk.d.ts.map +1 -0
  142. package/types/Private/AgoraBase.d.ts +4455 -4358
  143. package/types/Private/AgoraBase.d.ts.map +1 -0
  144. package/types/Private/AgoraMediaBase.d.ts +1125 -1070
  145. package/types/Private/AgoraMediaBase.d.ts.map +1 -0
  146. package/types/Private/AgoraMediaPlayerTypes.d.ts +409 -408
  147. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
  148. package/types/Private/IAgoraLog.d.ts +81 -80
  149. package/types/Private/IAgoraLog.d.ts.map +1 -0
  150. package/types/Private/IAgoraMediaEngine.d.ts +184 -193
  151. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
  152. package/types/Private/IAgoraMediaPlayer.d.ts +533 -546
  153. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
  154. package/types/Private/IAgoraMediaPlayerSource.d.ts +83 -88
  155. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
  156. package/types/Private/IAgoraMediaRecorder.d.ts +29 -49
  157. package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
  158. package/types/Private/IAgoraMediaStreamingSource.d.ts +42 -0
  159. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
  160. package/types/Private/IAgoraMusicContentCenter.d.ts +336 -255
  161. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
  162. package/types/Private/IAgoraRhythmPlayer.d.ts +65 -64
  163. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
  164. package/types/Private/IAgoraRtcEngine.d.ts +4948 -5058
  165. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
  166. package/types/Private/IAgoraRtcEngineEx.d.ts +554 -570
  167. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
  168. package/types/Private/IAgoraSpatialAudio.d.ts +266 -248
  169. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
  170. package/types/Private/IAudioDeviceManager.d.ts +255 -233
  171. package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
  172. package/types/Private/extension/AgoraBaseExtension.d.ts +2 -1
  173. package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
  174. package/types/Private/extension/AgoraMediaBaseExtension.d.ts +2 -1
  175. package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  176. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -1
  177. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  178. package/types/Private/extension/IAgoraLogExtension.d.ts +2 -1
  179. package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
  180. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +41 -40
  181. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  182. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +47 -46
  183. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  184. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -1
  185. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  186. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +45 -40
  187. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  188. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +21 -20
  189. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  190. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +2 -1
  191. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  192. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +2 -1
  193. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  194. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +43 -42
  195. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  196. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +2 -1
  197. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  198. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +2 -1
  199. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  200. package/types/Private/impl/AgoraBaseImpl.d.ts +3 -2
  201. package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
  202. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +9 -7
  203. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  204. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +40 -43
  205. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  206. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +141 -141
  207. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  208. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -2
  209. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  210. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +11 -13
  211. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  212. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +59 -51
  213. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  214. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +106 -101
  215. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  216. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +570 -566
  217. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  218. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +49 -48
  219. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  220. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +65 -64
  221. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  222. package/types/Private/internal/AudioDeviceManagerInternal.d.ts +9 -8
  223. package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
  224. package/types/Private/internal/IrisApiEngine.d.ts +148 -146
  225. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
  226. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +19 -18
  227. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  228. package/types/Private/internal/MediaEngineInternal.d.ts +22 -21
  229. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
  230. package/types/Private/internal/MediaPlayerInternal.d.ts +34 -33
  231. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
  232. package/types/Private/internal/MediaRecorderInternal.d.ts +18 -15
  233. package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
  234. package/types/Private/internal/MusicContentCenterInternal.d.ts +40 -39
  235. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
  236. package/types/Private/internal/RtcEngineExInternal.d.ts +80 -73
  237. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
  238. package/{js → types}/Private/internal/emitter/EventEmitter.d.ts +60 -59
  239. package/types/Private/internal/emitter/EventEmitter.d.ts.map +1 -0
  240. package/types/Private/ti/AgoraBase-ti.d.ts +8 -7
  241. package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
  242. package/types/Private/ti/AgoraMediaBase-ti.d.ts +14 -12
  243. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  244. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -6
  245. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  246. package/types/Private/ti/IAgoraLog-ti.d.ts +7 -6
  247. package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
  248. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +7 -6
  249. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  250. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +8 -8
  251. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  252. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -7
  253. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  254. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +7 -6
  255. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  256. package/{js/Private/ti/IAgoraMediaRecorder-ti.d.ts → types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts} +7 -6
  257. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  258. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +8 -7
  259. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  260. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +7 -6
  261. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  262. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +10 -9
  263. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  264. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +7 -6
  265. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  266. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +7 -6
  267. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  268. package/types/Private/ti/IAudioDeviceManager-ti.d.ts +7 -6
  269. package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  270. package/types/Renderer/AgoraView.d.ts +70 -70
  271. package/types/Renderer/AgoraView.d.ts.map +1 -0
  272. package/types/Renderer/IRenderer.d.ts +22 -21
  273. package/types/Renderer/IRenderer.d.ts.map +1 -0
  274. package/types/Renderer/IRendererManager.d.ts +18 -0
  275. package/types/Renderer/IRendererManager.d.ts.map +1 -0
  276. package/types/Renderer/RendererManager.d.ts +154 -71
  277. package/types/Renderer/RendererManager.d.ts.map +1 -0
  278. package/types/Renderer/{GlRenderer → WebGLRenderer}/index.d.ts +49 -59
  279. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -0
  280. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts +1 -0
  281. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
  282. package/types/Renderer/YUVCanvasRenderer/index.d.ts +16 -16
  283. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
  284. package/types/Renderer/index.d.ts +3 -0
  285. package/types/Renderer/index.d.ts.map +1 -0
  286. package/types/Types.d.ts +280 -260
  287. package/types/Types.d.ts.map +1 -0
  288. package/types/Utils.d.ts +59 -58
  289. package/types/Utils.d.ts.map +1 -0
  290. package/js/AgoraSdk.d.ts +0 -36
  291. package/js/Private/AgoraBase.d.ts +0 -4358
  292. package/js/Private/AgoraMediaBase.d.ts +0 -1070
  293. package/js/Private/AgoraMediaPlayerTypes.d.ts +0 -408
  294. package/js/Private/IAgoraLog.d.ts +0 -80
  295. package/js/Private/IAgoraMediaEngine.d.ts +0 -193
  296. package/js/Private/IAgoraMediaPlayer.d.ts +0 -546
  297. package/js/Private/IAgoraMediaPlayerSource.d.ts +0 -88
  298. package/js/Private/IAgoraMediaRecorder.d.ts +0 -49
  299. package/js/Private/IAgoraMusicContentCenter.d.ts +0 -255
  300. package/js/Private/IAgoraRhythmPlayer.d.ts +0 -64
  301. package/js/Private/IAgoraRtcEngine.d.ts +0 -5058
  302. package/js/Private/IAgoraRtcEngineEx.d.ts +0 -570
  303. package/js/Private/IAgoraSpatialAudio.d.ts +0 -248
  304. package/js/Private/IAudioDeviceManager.d.ts +0 -233
  305. package/js/Private/extension/AgoraBaseExtension.d.ts +0 -1
  306. package/js/Private/extension/AgoraMediaBaseExtension.d.ts +0 -1
  307. package/js/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -1
  308. package/js/Private/extension/IAgoraLogExtension.d.ts +0 -1
  309. package/js/Private/extension/IAgoraMediaEngineExtension.d.ts +0 -40
  310. package/js/Private/extension/IAgoraMediaPlayerExtension.d.ts +0 -46
  311. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -1
  312. package/js/Private/extension/IAgoraMediaRecorderExtension.d.ts +0 -40
  313. package/js/Private/extension/IAgoraMusicContentCenterExtension.d.ts +0 -20
  314. package/js/Private/extension/IAgoraRhythmPlayerExtension.d.ts +0 -1
  315. package/js/Private/extension/IAgoraRtcEngineExExtension.d.ts +0 -1
  316. package/js/Private/extension/IAgoraRtcEngineExtension.d.ts +0 -42
  317. package/js/Private/extension/IAgoraSpatialAudioExtension.d.ts +0 -1
  318. package/js/Private/extension/IAudioDeviceManagerExtension.d.ts +0 -1
  319. package/js/Private/impl/AgoraBaseImpl.d.ts +0 -2
  320. package/js/Private/impl/AgoraMediaBaseImpl.d.ts +0 -7
  321. package/js/Private/impl/IAgoraMediaEngineImpl.d.ts +0 -43
  322. package/js/Private/impl/IAgoraMediaPlayerImpl.d.ts +0 -141
  323. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -2
  324. package/js/Private/impl/IAgoraMediaRecorderImpl.d.ts +0 -13
  325. package/js/Private/impl/IAgoraMusicContentCenterImpl.d.ts +0 -51
  326. package/js/Private/impl/IAgoraRtcEngineExImpl.d.ts +0 -101
  327. package/js/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -566
  328. package/js/Private/impl/IAgoraSpatialAudioImpl.d.ts +0 -48
  329. package/js/Private/impl/IAudioDeviceManagerImpl.d.ts +0 -64
  330. package/js/Private/internal/AudioDeviceManagerInternal.d.ts +0 -8
  331. package/js/Private/internal/IrisApiEngine.d.ts +0 -146
  332. package/js/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -18
  333. package/js/Private/internal/MediaEngineInternal.d.ts +0 -21
  334. package/js/Private/internal/MediaPlayerInternal.d.ts +0 -33
  335. package/js/Private/internal/MediaRecorderInternal.d.ts +0 -15
  336. package/js/Private/internal/MusicContentCenterInternal.d.ts +0 -39
  337. package/js/Private/internal/RtcEngineExInternal.d.ts +0 -73
  338. package/js/Private/ti/AgoraBase-ti.d.ts +0 -7
  339. package/js/Private/ti/AgoraMediaBase-ti.d.ts +0 -12
  340. package/js/Private/ti/IAgoraLog-ti.d.ts +0 -6
  341. package/js/Private/ti/IAgoraMediaEngine-ti.d.ts +0 -6
  342. package/js/Private/ti/IAgoraMediaPlayer-ti.d.ts +0 -8
  343. package/js/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -7
  344. package/js/Private/ti/IAgoraMusicContentCenter-ti.d.ts +0 -7
  345. package/js/Private/ti/IAgoraRhythmPlayer-ti.d.ts +0 -6
  346. package/js/Private/ti/IAgoraRtcEngine-ti.d.ts +0 -9
  347. package/js/Private/ti/IAgoraRtcEngineEx-ti.d.ts +0 -6
  348. package/js/Private/ti/IAgoraSpatialAudio-ti.d.ts +0 -6
  349. package/js/Private/ti/IAudioDeviceManager-ti.d.ts +0 -6
  350. package/js/Renderer/AgoraView.d.ts +0 -70
  351. package/js/Renderer/GlRenderer/index.d.ts +0 -59
  352. package/js/Renderer/GlRenderer/webgl-utils.d.ts +0 -0
  353. package/js/Renderer/IRenderer.d.ts +0 -21
  354. package/js/Renderer/RendererManager.d.ts +0 -71
  355. package/js/Renderer/YUVCanvasRenderer/index.d.ts +0 -16
  356. package/js/Types.d.ts +0 -260
  357. package/js/Utils.d.ts +0 -58
  358. /package/ts/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
@@ -1,118 +1,125 @@
1
1
  import './extension/IAgoraRtcEngineExtension';
2
2
  import {
3
- QualityAdaptIndication,
4
- VideoCodecType,
5
- CaptureBrightnessLevelType,
6
- VideoStreamType,
7
- AudioSampleRateType,
8
- VideoFormat,
9
- Rectangle,
10
- ScreenCaptureParameters,
11
- VideoMirrorModeType,
12
- ClientRoleType,
13
3
  AudienceLatencyLevelType,
4
+ AudioAinsMode,
5
+ AudioEffectPreset,
6
+ AudioEncodedFrameObserverConfig,
7
+ AudioProfileType,
8
+ AudioRecordingConfiguration,
9
+ AudioSampleRateType,
10
+ AudioScenarioType,
11
+ AudioSessionOperationRestriction,
12
+ AudioVolumeInfo,
13
+ BeautyOptions,
14
+ CaptureBrightnessLevelType,
15
+ ChannelMediaRelayConfiguration,
16
+ ChannelMediaRelayError,
17
+ ChannelMediaRelayEvent,
18
+ ChannelMediaRelayState,
14
19
  ChannelProfileType,
20
+ ClientRoleChangeFailedReason,
21
+ ClientRoleOptions,
22
+ ClientRoleType,
23
+ CodecCapInfo,
24
+ ColorEnhanceOptions,
25
+ ConnectionChangedReasonType,
26
+ ConnectionStateType,
27
+ DataStreamConfig,
28
+ DeviceInfo,
29
+ DownlinkNetworkInfo,
30
+ EarMonitoringFilterType,
31
+ EchoTestConfiguration,
32
+ EncryptionConfig,
33
+ EncryptionErrorType,
15
34
  ErrorCodeType,
16
- QualityType,
35
+ HeadphoneEqualizerPreset,
36
+ IAudioEncodedFrameObserver,
37
+ LastmileProbeConfig,
17
38
  LastmileProbeResult,
18
- AudioVolumeInfo,
19
- RtcStats,
20
- UplinkNetworkInfo,
21
- DownlinkNetworkInfo,
22
- VideoSourceType,
23
- LocalVideoStreamState,
24
- LocalVideoStreamError,
25
- RemoteVideoState,
26
- RemoteVideoStateReason,
27
- UserOfflineReasonType,
28
- LocalAudioStats,
29
- RemoteAudioStats,
30
39
  LicenseErrorType,
31
- LocalAudioStreamState,
40
+ LiveTranscoding,
41
+ LocalAudioStats,
32
42
  LocalAudioStreamError,
43
+ LocalAudioStreamState,
44
+ LocalTranscoderConfiguration,
45
+ LocalVideoStreamError,
46
+ LocalVideoStreamState,
47
+ LowlightEnhanceOptions,
48
+ MediaTraceEvent,
49
+ NetworkType,
50
+ PermissionType,
51
+ QualityAdaptIndication,
52
+ QualityType,
53
+ RecorderStreamInfo,
54
+ Rectangle,
33
55
  RemoteAudioState,
34
56
  RemoteAudioStateReason,
35
- ClientRoleOptions,
36
- ClientRoleChangeFailedReason,
37
- RtmpStreamPublishState,
57
+ RemoteVideoState,
58
+ RemoteVideoStateReason,
59
+ RtcStats,
38
60
  RtmpStreamPublishErrorType,
61
+ RtmpStreamPublishState,
39
62
  RtmpStreamingEvent,
40
- ChannelMediaRelayState,
41
- ChannelMediaRelayError,
42
- ChannelMediaRelayEvent,
43
- ConnectionStateType,
44
- ConnectionChangedReasonType,
45
- WlaccMessageReason,
46
- WlaccSuggestAction,
47
- WlAccStats,
48
- NetworkType,
49
- EncryptionErrorType,
50
- PermissionType,
51
- UserInfo,
52
- UploadErrorReason,
53
- StreamSubscribeState,
63
+ ScreenCaptureParameters,
64
+ ScreenCaptureParameters2,
65
+ ScreenScenarioType,
66
+ SegmentationProperty,
67
+ SenderOptions,
68
+ SimulcastStreamConfig,
69
+ SimulcastStreamMode,
70
+ SpatialAudioParams,
54
71
  StreamPublishState,
55
- MediaTraceEvent,
56
- VideoRenderingTracingInfo,
57
- AudioScenarioType,
72
+ StreamSubscribeState,
58
73
  ThreadPriorityType,
59
- LastmileProbeConfig,
60
- VideoEncoderConfiguration,
61
- BeautyOptions,
62
- LowlightEnhanceOptions,
63
- VideoDenoiserOptions,
64
- ColorEnhanceOptions,
65
- VirtualBackgroundSource,
66
- SegmentationProperty,
74
+ TranscodingVideoStream,
75
+ UplinkNetworkInfo,
76
+ UploadErrorReason,
77
+ UserInfo,
78
+ UserOfflineReasonType,
79
+ VideoApplicationScenarioType,
67
80
  VideoCanvas,
68
- AudioProfileType,
81
+ VideoCodecType,
82
+ VideoContentHint,
83
+ VideoDenoiserOptions,
84
+ VideoEncoderConfiguration,
85
+ VideoFormat,
86
+ VideoMirrorModeType,
87
+ VideoOrientation,
88
+ VideoRenderingTracingInfo,
89
+ VideoStreamType,
69
90
  VideoSubscriptionOptions,
70
- AudioRecordingConfiguration,
71
- AudioEncodedFrameObserverConfig,
72
- IAudioEncodedFrameObserver,
73
- SpatialAudioParams,
91
+ VideoTranscoderError,
92
+ VirtualBackgroundSource,
74
93
  VoiceBeautifierPreset,
75
- AudioEffectPreset,
76
94
  VoiceConversionPreset,
77
- HeadphoneEqualizerPreset,
78
- SimulcastStreamConfig,
79
- SimulcastStreamMode,
80
- EarMonitoringFilterType,
81
- SenderOptions,
82
- AudioSessionOperationRestriction,
83
- DeviceInfo,
84
- VideoContentHint,
85
- ScreenScenarioType,
86
- ScreenCaptureParameters2,
87
- LiveTranscoding,
88
- LocalTranscoderConfiguration,
89
- VideoOrientation,
90
- EncryptionConfig,
91
- DataStreamConfig,
92
95
  WatermarkOptions,
93
- ChannelMediaRelayConfiguration,
96
+ WlAccStats,
97
+ WlaccMessageReason,
98
+ WlaccSuggestAction,
94
99
  } from './AgoraBase';
95
100
  import {
96
- RenderModeType,
101
+ ContentInspectConfig,
97
102
  ContentInspectResult,
103
+ IAudioSpectrumObserver,
98
104
  MediaSourceType,
99
105
  RawAudioFrameOpModeType,
100
- IAudioSpectrumObserver,
101
- ContentInspectConfig,
106
+ RenderModeType,
107
+ VideoSourceType,
102
108
  } from './AgoraMediaBase';
103
- import { RtcConnection } from './IAgoraRtcEngineEx';
104
- import {
105
- RhythmPlayerStateType,
106
- RhythmPlayerErrorType,
107
- AgoraRhythmPlayerConfig,
108
- } from './IAgoraRhythmPlayer';
109
109
  import { LogConfig, LogFilterType, LogLevel } from './IAgoraLog';
110
- import { IMediaPlayer } from './IAgoraMediaPlayer';
111
110
  import { AudioMixingDualMonoMode, IMediaEngine } from './IAgoraMediaEngine';
112
- import { IAudioDeviceManager } from './IAudioDeviceManager';
113
- import { IMusicContentCenter } from './IAgoraMusicContentCenter';
111
+ import { IMediaPlayer } from './IAgoraMediaPlayer';
114
112
  import { IMediaRecorder } from './IAgoraMediaRecorder';
113
+ import { IMusicContentCenter } from './IAgoraMusicContentCenter';
114
+ import {
115
+ AgoraRhythmPlayerConfig,
116
+ RhythmPlayerErrorType,
117
+ RhythmPlayerStateType,
118
+ } from './IAgoraRhythmPlayer';
119
+ import { RtcConnection } from './IAgoraRtcEngineEx';
115
120
  import { ILocalSpatialAudioEngine } from './IAgoraSpatialAudio';
121
+ import { IAudioDeviceManager } from './IAudioDeviceManager';
122
+
116
123
  /**
117
124
  * Media device types.
118
125
  */
@@ -141,6 +148,14 @@ export enum MediaDeviceType {
141
148
  * @ignore
142
149
  */
143
150
  AudioApplicationPlayoutDevice = 4,
151
+ /**
152
+ * @ignore
153
+ */
154
+ AudioVirtualPlayoutDevice = 5,
155
+ /**
156
+ * @ignore
157
+ */
158
+ AudioVirtualRecordingDevice = 6,
144
159
  }
145
160
 
146
161
  /**
@@ -451,6 +466,84 @@ export class LocalVideoStats {
451
466
  hwEncoderAccelerating?: number;
452
467
  }
453
468
 
469
+ /**
470
+ * Audio statistics of the remote user.
471
+ */
472
+ export class RemoteAudioStats {
473
+ /**
474
+ * The user ID of the remote user.
475
+ */
476
+ uid?: number;
477
+ /**
478
+ * The quality of the audio stream sent by the user. See QualityType .
479
+ */
480
+ quality?: number;
481
+ /**
482
+ * The network delay (ms) from the sender to the receiver.
483
+ */
484
+ networkTransportDelay?: number;
485
+ /**
486
+ * The network delay (ms) from the audio receiver to the jitter buffer.When the receiving end is an audience member and audienceLatencyLevel of ClientRoleOptions is 1, this parameter does not take effect.
487
+ */
488
+ jitterBufferDelay?: number;
489
+ /**
490
+ * The frame loss rate (%) of the remote audio stream in the reported interval.
491
+ */
492
+ audioLossRate?: number;
493
+ /**
494
+ * The number of audio channels.
495
+ */
496
+ numChannels?: number;
497
+ /**
498
+ * The sampling rate of the received audio stream in the reported interval.
499
+ */
500
+ receivedSampleRate?: number;
501
+ /**
502
+ * The average bitrate (Kbps) of the received audio stream in the reported interval.
503
+ */
504
+ receivedBitrate?: number;
505
+ /**
506
+ * The total freeze time (ms) of the remote audio stream after the remote user joins the channel. In a session, audio freeze occurs when the audio frame loss rate reaches 4%.
507
+ */
508
+ totalFrozenTime?: number;
509
+ /**
510
+ * The total audio freeze time as a percentage (%) of the total time when the audio is available. The audio is considered available when the remote user neither stops sending the audio stream nor disables the audio module after joining the channel.
511
+ */
512
+ frozenRate?: number;
513
+ /**
514
+ * The quality of the remote audio stream in the reported interval. The quality is determined by the Agora real-time audio MOS (Mean Opinion Score) measurement method. The return value range is [0, 500]. Dividing the return value by 100 gets the MOS score, which ranges from 0 to 5. The higher the score, the better the audio quality.The subjective perception of audio quality corresponding to the Agora real-time audio MOS scores is as follows:MOS scorePerception of audio qualityGreater than 4Excellent. The audio sounds clear and smooth.From 3.5 to 4Good. The audio has some perceptible impairment but still sounds clear.From 3 to 3.5Fair. The audio freezes occasionally and requires attentive listening.From 2.5 to 3Poor. The audio sounds choppy and requires considerable effort to understand.From 2 to 2.5Bad. The audio has occasional noise. Consecutive audio dropouts occur, resulting in some information loss. The users can communicate only with difficulty.Less than 2Very bad. The audio has persistent noise. Consecutive audio dropouts are frequent, resulting in severe information loss. Communication is nearly impossible.
515
+ */
516
+ mosValue?: number;
517
+ /**
518
+ * @ignore
519
+ */
520
+ frozenRateByCustomPlcCount?: number;
521
+ /**
522
+ * @ignore
523
+ */
524
+ plcCount?: number;
525
+ /**
526
+ * The total active time (ms) between the start of the audio call and the callback of the remote user.The active time refers to the total duration of the remote user without the mute state.
527
+ */
528
+ totalActiveTime?: number;
529
+ /**
530
+ * The total duration (ms) of the remote audio stream.
531
+ */
532
+ publishDuration?: number;
533
+ /**
534
+ * The Quality of Experience (QoE) of the local user when receiving a remote audio stream. See ExperienceQualityType .
535
+ */
536
+ qoeQuality?: number;
537
+ /**
538
+ * Reasons why the QoE of the local user when receiving a remote audio stream is poor. See ExperiencePoorReason .
539
+ */
540
+ qualityChangedReason?: number;
541
+ /**
542
+ * @ignore
543
+ */
544
+ rxAudioBytes?: number;
545
+ }
546
+
454
547
  /**
455
548
  * Statistics of the remote video stream.
456
549
  */
@@ -463,6 +556,10 @@ export class RemoteVideoStats {
463
556
  * Deprecated:In scenarios where audio and video are synchronized, you can get the video delay data from networkTransportDelay and jitterBufferDelay in RemoteAudioStats .The video delay (ms).
464
557
  */
465
558
  delay?: number;
559
+ /**
560
+ * @ignore
561
+ */
562
+ e2eDelay?: number;
466
563
  /**
467
564
  * The width (pixels) of the video.
468
565
  */
@@ -519,6 +616,10 @@ export class RemoteVideoStats {
519
616
  * @ignore
520
617
  */
521
618
  mosValue?: number;
619
+ /**
620
+ * @ignore
621
+ */
622
+ rxVideoBytes?: number;
522
623
  }
523
624
 
524
625
  /**
@@ -704,16 +805,6 @@ export class PublisherConfiguration {
704
805
  extraInfo?: string;
705
806
  }
706
807
 
707
- /**
708
- * @ignore
709
- */
710
- export class AudioTrackConfig {
711
- /**
712
- * @ignore
713
- */
714
- enableLocalPlayback?: boolean;
715
- }
716
-
717
808
  /**
718
809
  * The camera direction.
719
810
  */
@@ -763,7 +854,7 @@ export class CameraCapturerConfiguration {
763
854
  */
764
855
  format?: VideoFormat;
765
856
  /**
766
- * Whether to follow the video aspect ratio set in setVideoEncoderConfiguration :true: (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame .false: Do not follow the set video aspect ratio. The SDK does not change the aspect ratio of the captured video frame.
857
+ * Whether to follow the video aspect ratio set in setVideoEncoderConfiguration :true: (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame .false: Do not follow the system default audio playback device. The SDK does not change the aspect ratio of the captured video frame.
767
858
  */
768
859
  followEncodeDimensionRatio?: boolean;
769
860
  }
@@ -897,10 +988,18 @@ export class ScreenCaptureSourceInfo {
897
988
  * @ignore
898
989
  */
899
990
  isOccluded?: boolean;
991
+ /**
992
+ * @ignore
993
+ */
994
+ position?: Rectangle;
900
995
  /**
901
996
  * (For Windows only) Whether the window is minimized:true: The window is minimized.false: The window is not minimized.
902
997
  */
903
998
  minimizeWindow?: boolean;
999
+ /**
1000
+ * @ignore
1001
+ */
1002
+ sourceDisplayId?: any;
904
1003
  }
905
1004
 
906
1005
  /**
@@ -941,7 +1040,7 @@ export class ChannelMediaOptions {
941
1040
  */
942
1041
  publishCameraTrack?: boolean;
943
1042
  /**
944
- *
1043
+ * @ignore
945
1044
  */
946
1045
  publishSecondaryCameraTrack?: boolean;
947
1046
  /**
@@ -968,22 +1067,10 @@ export class ChannelMediaOptions {
968
1067
  * Whether to publish the audio captured from a custom source:true: Publish the audio captured from the custom source.false: (Default) Do not publish the audio captured from the custom source.
969
1068
  */
970
1069
  publishCustomAudioTrack?: boolean;
971
- /**
972
- * The ID of the custom audio source to publish. The default value is 0.If you have set sourceNumber in setExternalAudioSource to a value greater than 1, the SDK creates the corresponding number of custom audio tracks and assigns an ID to each audio track, starting from 0.
973
- */
974
- publishCustomAudioSourceId?: number;
975
- /**
976
- * Whether to enable AEC when publishing the audio captured from a custom source:true: Enable AEC when publishing the audio captured from the custom source.false: (Default) Do not enable AEC when publishing the audio captured from the custom source.
977
- */
978
- publishCustomAudioTrackEnableAec?: boolean;
979
- /**
980
- * @ignore
981
- */
982
- publishDirectCustomAudioTrack?: boolean;
983
1070
  /**
984
1071
  * @ignore
985
1072
  */
986
- publishCustomAudioTrackAec?: boolean;
1073
+ publishCustomAudioTrackId?: number;
987
1074
  /**
988
1075
  * Whether to publish the video captured from a custom source:true: Publish the video captured from the custom source.false: (Default) Do not publish the video captured from the custom source.
989
1076
  */
@@ -1001,9 +1088,9 @@ export class ChannelMediaOptions {
1001
1088
  */
1002
1089
  publishMediaPlayerVideoTrack?: boolean;
1003
1090
  /**
1004
- * Whether to publish the local transcoded video:true: Publish the local transcoded video.false: (Default) Do not publish the local transcoded video.
1091
+ * @ignore
1005
1092
  */
1006
- publishTrancodedVideoTrack?: boolean;
1093
+ publishTranscodedVideoTrack?: boolean;
1007
1094
  /**
1008
1095
  * Whether to automatically subscribe to all remote audio streams when the user joins a channel:true: (Default) Automatically subscribe to all remote audio streams.false: Do not automatically subscribe to any remote audio streams.
1009
1096
  */
@@ -1026,10 +1113,12 @@ export class ChannelMediaOptions {
1026
1113
  clientRoleType?: ClientRoleType;
1027
1114
  /**
1028
1115
  * The latency level of an audience member in interactive live streaming. See AudienceLatencyLevelType .
1116
+ *
1029
1117
  */
1030
1118
  audienceLatencyLevel?: AudienceLatencyLevelType;
1031
1119
  /**
1032
1120
  * The default video-stream type. See VideoStreamType .
1121
+ *
1033
1122
  */
1034
1123
  defaultVideoStreamType?: VideoStreamType;
1035
1124
  /**
@@ -1045,7 +1134,7 @@ export class ChannelMediaOptions {
1045
1134
  */
1046
1135
  mediaPlayerAudioDelayMs?: number;
1047
1136
  /**
1048
- * (Optional) The token generated on your server for authentication. See This parameter takes effect only when calling updateChannelMediaOptions or updateChannelMediaOptionsEx .Ensure that the App ID, channel name, and user name used for creating the token are the same as those used by the initialize method for initializing the RTC engine, and those used by the joinChannel [2/2] and joinChannelEx methods for joining the channel.
1137
+ * (Optional) The token generated on your server for authentication. See This parameter takes effect only when calling updateChannelMediaOptions or updateChannelMediaOptionsEx .Ensure that the App ID, channel name, and user name used for creating the token are the same as those used by the initialize method for initializing the RTC engine, and those used by the joinChannel and joinChannelEx methods for joining the channel.
1049
1138
  */
1050
1139
  token?: string;
1051
1140
  /**
@@ -1108,6 +1197,14 @@ export enum ProxyType {
1108
1197
  * 4: Automatic mode. In this mode, the SDK attempts a direct connection to SD-RTN™ and automatically switches to TCP/TLS 443 if the attempt fails.
1109
1198
  */
1110
1199
  TcpProxyAutoFallbackType = 4,
1200
+ /**
1201
+ * @ignore
1202
+ */
1203
+ HttpProxyType = 5,
1204
+ /**
1205
+ * @ignore
1206
+ */
1207
+ HttpsProxyType = 6,
1111
1208
  }
1112
1209
 
1113
1210
  /**
@@ -1203,36 +1300,28 @@ export interface IRtcEngineEventHandler {
1203
1300
  * This callback notifies the application that a user joins a specified channel.
1204
1301
  *
1205
1302
  * @param connection The connection information. See RtcConnection .
1206
- *
1207
- * @param elapsed The time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback.
1303
+ * @param elapsed The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1208
1304
  */
1209
1305
  onJoinChannelSuccess?(connection: RtcConnection, elapsed: number): void;
1210
1306
 
1211
1307
  /**
1212
- * Occurs when a user rejoins the channel.
1213
- * When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
1214
- *
1215
- * @param channel The channel name.
1216
- *
1217
- * @param uid The ID of the user who rejoins the channel.
1308
+ * Occurs when a user joins a channel.
1309
+ * This callback notifies the application that a user joins a specified channel.
1218
1310
  *
1219
- * @param elapsed Time elapsed (ms) from the local user calling the joinChannel [1/2] or joinChannel [2/2] method until this callback is triggered.
1311
+ * @param connection The connection information. See RtcConnection .
1312
+ * @param elapsed The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1220
1313
  */
1221
1314
  onRejoinChannelSuccess?(connection: RtcConnection, elapsed: number): void;
1222
1315
 
1223
1316
  /**
1224
1317
  * Reports the proxy connection state.
1225
- * You can use this callback to listen for the state of the SDK connecting to a proxy. For example, when a user calls setCloudProxy and joins a channel successfully, the SDK triggers this callback to report the user ID, the proxy type connected, and the time elapsed fromthe user calling joinChannel [1/2] until this callback is triggered.
1318
+ * You can use this callback to listen for the state of the SDK connecting to a proxy. For example, when a user calls setCloudProxy and joins a channel successfully, the SDK triggers this callback to report the user ID, the proxy type connected, and the time elapsed fromthe user calling joinChannel until this callback is triggered.
1226
1319
  *
1227
1320
  * @param channel The channel name.
1228
- *
1229
1321
  * @param uid The user ID.
1230
- *
1231
1322
  * @param proxyType The proxy type connected. See CloudProxyType .
1232
- *
1233
1323
  * @param localProxyIp Reserved for future use.
1234
- *
1235
- * @param elapsed The time elapsed (ms) from the user calling joinChannel [1/2] until this callback is triggered.
1324
+ * @param elapsed The time elapsed (ms) from the user calling joinChannel until this callback is triggered.
1236
1325
  */
1237
1326
  onProxyConnected?(
1238
1327
  channel: string,
@@ -1247,7 +1336,6 @@ export interface IRtcEngineEventHandler {
1247
1336
  * This callback indicates that an error (concerning network or media) occurs during SDK runtime. In most cases, the SDK cannot fix the issue and resume running. The SDK requires the application to take action or informs the user about the issue.
1248
1337
  *
1249
1338
  * @param err Error code. See ErrorCodeType .
1250
- *
1251
1339
  * @param msg The error message.
1252
1340
  */
1253
1341
  onError?(err: ErrorCodeType, msg: string): void;
@@ -1257,21 +1345,9 @@ export interface IRtcEngineEventHandler {
1257
1345
  * Deprecated:Please use onRemoteAudioStats instead.The SDK triggers this callback once every two seconds to report the audio quality of each remote user/host sending an audio stream. If a channel has multiple users/hosts sending audio streams, the SDK triggers this callback as many times.
1258
1346
  *
1259
1347
  * @param connection The connection information. See RtcConnection .
1260
- *
1261
1348
  * @param remoteUid The user ID of the remote user sending the audio stream.
1262
- *
1263
- * @param quality Audio quality of the user.
1264
- * QualityUnknown(0): The quality is unknown.
1265
- * QualityExcellent(1): The quality is excellent.
1266
- * QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent.
1267
- * QualityPoor(3): Users can feel the communication is slightly impaired.
1268
- * QualityBad(4): Users cannot communicate smoothly.
1269
- * QualityVbad(5): The quality is so bad that users can barely communicate.
1270
- * QualityDown(6): The network is down, and users cannot communicate at all.
1271
- * See QualityType .
1272
- *
1349
+ * @param quality Audio quality of the user. QualityUnknown(0): The quality is unknown.QualityExcellent(1): The quality is excellent.QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent.QualityPoor(3): Users can feel the communication is slightly impaired.QualityBad(4): Users cannot communicate smoothly.QualityVbad(5): The quality is so bad that users can barely communicate.QualityDown(6): The network is down, and users cannot communicate at all.See QualityType .
1273
1350
  * @param delay The network delay (ms) from the sender to the receiver, including the delay caused by audio sampling pre-processing, network transmission, and network jitter buffering.
1274
- *
1275
1351
  * @param lost The packet loss rate (%) of the audio packet sent from the remote user.
1276
1352
  */
1277
1353
  onAudioQuality?(
@@ -1292,15 +1368,12 @@ export interface IRtcEngineEventHandler {
1292
1368
 
1293
1369
  /**
1294
1370
  * Reports the volume information of users.
1295
- * By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.Once this callback is enabled, if the local user calls the muteLocalAudioStream method for mute, the SDK continues to report the volume indication of the local user.20 seconds after a remote user whose volume is one of the three highest in the channel stops publishing the audio stream, the callback excludes this user's information; 20 seconds after all remote users stop publishing audio streams, the SDK stops triggering the callback for remote users.
1371
+ * By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.Once this callback is enabled, if the local user calls the muteLocalAudioStream method for muting, the SDK continues to report the volume indication of the local user. In the callbacks triggered, the volume information about the local user is 0 If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users.
1296
1372
  *
1297
1373
  * @param connection The connection information. See RtcConnection .
1298
- *
1299
- * @param speakers The volume information of the users. See AudioVolumeInfo . An empty speakers array in the callback indicates that no remote user is in the channel or sending a stream at the moment.
1300
- *
1374
+ * @param speakers The volume information of the users, see AudioVolumeInfo . An empty speakers array in the callback indicates that no remote user is in the channel or is sending a stream.
1301
1375
  * @param speakerNumber The total number of users.In the callback for the local user, if the local user is sending streams, the value of speakerNumber is 1.In the callback for remote users, the value range of speakerNumber is [0,3]. If the number of remote users who send streams is greater than or equal to three, the value of speakerNumber is 3.
1302
- *
1303
- * @param totalVolume The volume of the speaker. The value ranges between 0 (lowest volume) and 255 (highest volume).In the callback for the local user, totalVolume is the volume of the local user who sends a stream.In the callback for remote users, totalVolume is the sum of the volume of the remote users (up to three) whose instantaneous volume are the highest.
1376
+ * @param totalVolume The volume of the speaker. The value range is [0,255].In the callback for the local user, totalVolume is the volume of the local user who sends a stream.In the callback for remote users, totalVolume is the sum of the volume of all remote users (up to three) whose instantaneous volume is the highest.
1304
1377
  */
1305
1378
  onAudioVolumeIndication?(
1306
1379
  connection: RtcConnection,
@@ -1314,7 +1387,6 @@ export interface IRtcEngineEventHandler {
1314
1387
  * This callback notifies the app that the user leaves the channel by calling leaveChannel . From this callback, the app can get information such as the call duration and quality statistics.
1315
1388
  *
1316
1389
  * @param connection The connection information. See RtcConnection .
1317
- *
1318
1390
  * @param stats The statistics of the call. See RtcStats .
1319
1391
  */
1320
1392
  onLeaveChannel?(connection: RtcConnection, stats: RtcStats): void;
@@ -1324,29 +1396,30 @@ export interface IRtcEngineEventHandler {
1324
1396
  * The SDK triggers this callback once every two seconds after the user joins the channel.
1325
1397
  *
1326
1398
  * @param connection The connection information. See RtcConnection .
1327
- *
1328
1399
  * @param stats Statistics of the RTC engine. See RtcStats .
1400
+ *
1329
1401
  */
1330
1402
  onRtcStats?(connection: RtcConnection, stats: RtcStats): void;
1331
1403
 
1332
1404
  /**
1333
- * Occurs when the audio device state changes.
1334
- * This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device.This method is for Windows and macOS only.
1335
- *
1336
- * @param deviceState Media device states.
1405
+ * Occurs when the video device state changes.
1406
+ * This callback reports the change of system video devices, such as being unplugged or removed. On a Windows device with an external camera for video capturing, the video disables once the external camera is unplugged.This callback is for Windows and macOS only.
1337
1407
  *
1338
1408
  * @param deviceId The device ID.
1339
- *
1340
- * @param deviceType The device type. See MediaDeviceType .
1409
+ * @param deviceType Media device types. See MediaDeviceType .
1410
+ * @param deviceState Media device states.
1341
1411
  */
1342
1412
  onAudioDeviceStateChanged?(
1343
1413
  deviceId: string,
1344
1414
  deviceType: MediaDeviceType,
1345
- deviceState: number
1415
+ deviceState: MediaDeviceStateType
1346
1416
  ): void;
1347
1417
 
1348
1418
  /**
1349
- * @ignore
1419
+ * Reports current playback progress.
1420
+ * When playing media files, the SDK triggers this callback every one second to report current playback progress.
1421
+ *
1422
+ * @param position The playback position (ms) of media files.
1350
1423
  */
1351
1424
  onAudioMixingPositionChanged?(position: number): void;
1352
1425
 
@@ -1369,15 +1442,13 @@ export interface IRtcEngineEventHandler {
1369
1442
  * This callback reports the change of system video devices, such as being unplugged or removed. On a Windows device with an external camera for video capturing, the video disables once the external camera is unplugged.This callback is for Windows and macOS only.
1370
1443
  *
1371
1444
  * @param deviceId The device ID.
1372
- *
1373
1445
  * @param deviceType Media device types. See MediaDeviceType .
1374
- *
1375
1446
  * @param deviceState Media device states.
1376
1447
  */
1377
1448
  onVideoDeviceStateChanged?(
1378
1449
  deviceId: string,
1379
1450
  deviceType: MediaDeviceType,
1380
- deviceState: number
1451
+ deviceState: MediaDeviceStateType
1381
1452
  ): void;
1382
1453
 
1383
1454
  /**
@@ -1385,11 +1456,8 @@ export interface IRtcEngineEventHandler {
1385
1456
  * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server.The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times.txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream.
1386
1457
  *
1387
1458
  * @param connection The connection information. See RtcConnection .
1388
- *
1389
1459
  * @param remoteUid The user ID. The network quality of the user with this user ID is reported.
1390
- *
1391
1460
  * @param txQuality Uplink network quality rating of the user in terms of the transmission bit rate, packet loss rate, average RTT (Round-Trip Time) and jitter of the uplink network. This parameter is a quality rating helping you understand how well the current uplink network conditions can support the selected video encoder configuration. For example, a 1000 Kbps uplink network may be adequate for video frames with a resolution of 640 × 480 and a frame rate of 15 fps in the LIVE_BROADCASTING profile, but may be inadequate for resolutions higher than 1280 × 720. QualityUnknown(0): The quality is unknown.QualityExcellent(1): The quality is excellent.QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent.QualityPoor(3): Users can feel the communication is slightly impaired.QualityBad(4): Users cannot communicate smoothly.QualityVbad(5): The quality is so bad that users can barely communicate.QualityDown(6): The network is down, and users cannot communicate at all.See QualityType .
1392
- *
1393
1461
  * @param rxQuality Downlink network quality rating of the user in terms of packet loss rate, average RTT, and jitter of the downlink network. QualityUnknown(0): The quality is unknown.QualityExcellent(1): The quality is excellent.QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent.QualityPoor(3): Users can feel the communication is slightly impaired.QualityBad(4): Users cannot communicate smoothly.QualityVbad(5): The quality is so bad that users can barely communicate.QualityDown(6): The network is down, and users cannot communicate at all.See QualityType .
1394
1462
  */
1395
1463
  onNetworkQuality?(
@@ -1400,7 +1468,13 @@ export interface IRtcEngineEventHandler {
1400
1468
  ): void;
1401
1469
 
1402
1470
  /**
1403
- * @ignore
1471
+ * Stops recording the local audio and video.
1472
+ * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable.
1473
+ *
1474
+ * @param connection The connection information. See RtcConnection .
1475
+ *
1476
+ * @returns
1477
+ * 0: Success.< 0: Failure.-7: The method is called before IRtcEngine is initialized.
1404
1478
  */
1405
1479
  onIntraRequestReceived?(connection: RtcConnection): void;
1406
1480
 
@@ -1413,7 +1487,10 @@ export interface IRtcEngineEventHandler {
1413
1487
  onUplinkNetworkInfoUpdated?(info: UplinkNetworkInfo): void;
1414
1488
 
1415
1489
  /**
1416
- * @ignore
1490
+ * Occurs when the uplink network information changes.
1491
+ * The SDK triggers this callback when the uplink network information changes.This callback only applies to scenarios where you push externally encoded video data in H.264 format to the SDK.
1492
+ *
1493
+ * @param info The uplink network information. See UplinkNetworkInfo .
1417
1494
  */
1418
1495
  onDownlinkNetworkInfoUpdated?(info: DownlinkNetworkInfo): void;
1419
1496
 
@@ -1430,31 +1507,24 @@ export interface IRtcEngineEventHandler {
1430
1507
  * The SDK triggers this callback when the first local video frame is displayed on the local video view.
1431
1508
  *
1432
1509
  * @param source The capture type of the custom video source. See VideoSourceType .
1433
- *
1434
1510
  * @param connection The connection information. See RtcConnection .
1435
- *
1436
1511
  * @param width The width (px) of the first local video frame.
1437
- *
1438
1512
  * @param height The height (px) of the first local video frame.
1439
- *
1440
- * @param elapsed Time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback. If you call startPreview before calling joinChannel [2/2], then this parameter is the time elapsed from calling the startPreview method until the SDK triggers this callback.
1513
+ * @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback. If you call startPreview before calling joinChannel, then this parameter is the time elapsed from calling the startPreview method until the SDK triggers this callback.
1441
1514
  */
1442
1515
  onFirstLocalVideoFrame?(
1443
- connection: RtcConnection,
1516
+ source: VideoSourceType,
1444
1517
  width: number,
1445
1518
  height: number,
1446
1519
  elapsed: number
1447
1520
  ): void;
1448
1521
 
1449
1522
  /**
1450
- * Occurs when the first video frame is published.
1451
- * The SDK triggers this callback under one of the following circumstances:The local client enables the video module and calls joinChannel [2/2] successfully.The local client calls muteLocalVideoStream (true) and muteLocalVideoStream(false) in sequence.The local client calls disableVideo and enableVideo in sequence.
1452
- *
1453
- * @param source The capture type of the custom video source. See VideoSourceType .
1523
+ * Occurs when a user joins a channel.
1524
+ * This callback notifies the application that a user joins a specified channel.
1454
1525
  *
1455
1526
  * @param connection The connection information. See RtcConnection .
1456
- *
1457
- * @param elapsed Time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback.
1527
+ * @param elapsed The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1458
1528
  */
1459
1529
  onFirstLocalVideoFramePublished?(
1460
1530
  connection: RtcConnection,
@@ -1466,14 +1536,10 @@ export interface IRtcEngineEventHandler {
1466
1536
  * The SDK triggers this callback under one of the following circumstances:The remote user joins the channel and sends the video stream.The remote user stops sending the video stream and re-sends it after 15 seconds. Reasons for such an interruption include:The remote user leaves the channel.The remote user drops offline.The remote user calls muteLocalVideoStream to stop sending the video stream.The remote user calls disableVideo to disable video.
1467
1537
  *
1468
1538
  * @param connection The connection information. See RtcConnection .
1469
- *
1470
1539
  * @param remoteUid The ID of the remote user sending the video stream.
1471
- *
1472
1540
  * @param width The width (px) of the video stream.
1473
- *
1474
1541
  * @param height The height (px) of the video stream.
1475
- *
1476
- * @param elapsed The time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback.
1542
+ * @param elapsed The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1477
1543
  */
1478
1544
  onFirstRemoteVideoDecoded?(
1479
1545
  connection: RtcConnection,
@@ -1487,15 +1553,10 @@ export interface IRtcEngineEventHandler {
1487
1553
  * Occurs when the video size or rotation of a specified user changes.
1488
1554
  *
1489
1555
  * @param connection The connection information. See RtcConnection .
1490
- *
1491
1556
  * @param sourceType The capture type of the custom video source. See VideoSourceType .
1492
- *
1493
1557
  * @param uid The ID of the user whose video size or rotation changes. (The uid for the local user is 0. The video is the local user's video preview).
1494
- *
1495
1558
  * @param width The width (pixels) of the video stream.
1496
- *
1497
1559
  * @param height The height (pixels) of the video stream.
1498
- *
1499
1560
  * @param rotation The rotation information. The value range is [0,360).
1500
1561
  */
1501
1562
  onVideoSizeChanged?(
@@ -1512,9 +1573,7 @@ export interface IRtcEngineEventHandler {
1512
1573
  * When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur.The SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateFailed and error code of LocalVideoStreamErrorCaptureFailure in the following situations:The camera starts normally, but does not output video frames for four consecutive seconds.When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateCapturing and error code of LocalVideoStreamErrorCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps.For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment.
1513
1574
  *
1514
1575
  * @param source The capture type of the custom video source. See VideoSourceType .
1515
- *
1516
1576
  * @param state The state of the local video, see LocalVideoStreamState .
1517
- *
1518
1577
  * @param error The detailed error information, see LocalVideoStreamError .
1519
1578
  */
1520
1579
  onLocalVideoStateChanged?(
@@ -1528,14 +1587,10 @@ export interface IRtcEngineEventHandler {
1528
1587
  * This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 17.
1529
1588
  *
1530
1589
  * @param connection The connection information. See RtcConnection .
1531
- *
1532
1590
  * @param remoteUid The ID of the remote user whose video state changes.
1533
- *
1534
1591
  * @param state The state of the remote video, see RemoteVideoState .
1535
- *
1536
1592
  * @param reason The reason for the remote video state change, see RemoteVideoStateReason .
1537
- *
1538
- * @param elapsed Time elapsed (ms) from the local user calling the joinChannel [2/2] method until the SDK triggers this callback.
1593
+ * @param elapsed Time elapsed (ms) from the local user calling the joinChannel method until the SDK triggers this callback.
1539
1594
  */
1540
1595
  onRemoteVideoStateChanged?(
1541
1596
  connection: RtcConnection,
@@ -1546,17 +1601,14 @@ export interface IRtcEngineEventHandler {
1546
1601
  ): void;
1547
1602
 
1548
1603
  /**
1549
- * Occurs when the renderer receives the first frame of the remote video.
1550
- *
1551
- * @param remoteUid The ID of the remote user sending the video stream.
1604
+ * Occurs when the first remote video frame is received and decoded.
1605
+ * The SDK triggers this callback under one of the following circumstances:The remote user joins the channel and sends the video stream.The remote user stops sending the video stream and re-sends it after 15 seconds. Reasons for such an interruption include:The remote user leaves the channel.The remote user drops offline.The remote user calls muteLocalVideoStream to stop sending the video stream.The remote user calls disableVideo to disable video.
1552
1606
  *
1553
1607
  * @param connection The connection information. See RtcConnection .
1554
- *
1608
+ * @param remoteUid The ID of the remote user sending the video stream.
1555
1609
  * @param width The width (px) of the video stream.
1556
- *
1557
1610
  * @param height The height (px) of the video stream.
1558
- *
1559
- * @param elapsed The time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback.
1611
+ * @param elapsed The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1560
1612
  */
1561
1613
  onFirstRemoteVideoFrame?(
1562
1614
  connection: RtcConnection,
@@ -1568,13 +1620,11 @@ export interface IRtcEngineEventHandler {
1568
1620
 
1569
1621
  /**
1570
1622
  * Occurs when a remote user (COMMUNICATION)/ host (LIVE_BROADCASTING) joins the channel.
1571
- * In a communication channel, this callback indicates that a remote user joins the channel. The SDK also triggers this callback to report the existing users in the channel when a user joins the channel.In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17.The SDK triggers this callback under one of the following circumstances:A remote user/host joins the channel by calling the joinChannel [2/2] method.A remote user switches the user role to the host after joining the channel.A remote user/host rejoins the channel after a network interruption.
1623
+ * In a communication channel, this callback indicates that a remote user joins the channel. The SDK also triggers this callback to report the existing users in the channel when a user joins the channel.In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17.The SDK triggers this callback under one of the following circumstances:A remote user/host joins the channel by calling the joinChannel method.A remote user switches the user role to the host after joining the channel.A remote user/host rejoins the channel after a network interruption.
1572
1624
  *
1573
1625
  * @param connection The connection information. See RtcConnection .
1574
- *
1575
1626
  * @param remoteUid The ID of the user or host who joins the channel.
1576
- *
1577
- * @param elapsed Time delay (ms) from the local user calling joinChannel [2/2] until this callback is triggered.
1627
+ * @param elapsed Time delay (ms) from the local user calling joinChannel until this callback is triggered.
1578
1628
  */
1579
1629
  onUserJoined?(
1580
1630
  connection: RtcConnection,
@@ -1587,9 +1637,7 @@ export interface IRtcEngineEventHandler {
1587
1637
  * There are two reasons for users to become offline:Leave the channel: When a user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel.Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections. It's recommended to use the Agora RTM SDK for reliable offline detection.
1588
1638
  *
1589
1639
  * @param connection The connection information. See RtcConnection .
1590
- *
1591
1640
  * @param remoteUid The ID of the user who leaves the channel or goes offline.
1592
- *
1593
1641
  * @param reason Reasons why the user goes offline: UserOfflineReasonType .
1594
1642
  */
1595
1643
  onUserOffline?(
@@ -1603,9 +1651,7 @@ export interface IRtcEngineEventHandler {
1603
1651
  * The SDK triggers this callback when the remote user stops or resumes sending the audio stream by calling the muteLocalAudioStream method.This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 17.
1604
1652
  *
1605
1653
  * @param connection The connection information. See RtcConnection .
1606
- *
1607
1654
  * @param remoteUid The user ID.
1608
- *
1609
1655
  * @param muted Whether the remote user's audio stream is muted:true: User's audio stream is muted.false: User's audio stream is unmuted.
1610
1656
  */
1611
1657
  onUserMuteAudio?(
@@ -1619,9 +1665,7 @@ export interface IRtcEngineEventHandler {
1619
1665
  * When a remote user calls muteLocalVideoStream to stop or resume publishing the video stream, the SDK triggers this callback to report to the local user the state of the streams published by the remote user.This callback can be inaccurate when the number of users (in the communication profile) or hosts (in the live streaming profile) in a channel exceeds 17.
1620
1666
  *
1621
1667
  * @param connection The connection information. See RtcConnection .
1622
- *
1623
1668
  * @param remoteUid The user ID of the remote user.
1624
- *
1625
1669
  * @param muted Whether the remote user stops publishing the video stream:true: The remote user stops publishing the video stream.false: The remote user resumes publishing the video stream.
1626
1670
  */
1627
1671
  onUserMuteVideo?(
@@ -1635,9 +1679,7 @@ export interface IRtcEngineEventHandler {
1635
1679
  * Once the video module is disabled, the user can only use a voice call. The user cannot send or receive any video.The SDK triggers this callback when a remote user enables or disables the video module by calling the enableVideo or disableVideo method.
1636
1680
  *
1637
1681
  * @param connection The connection information. See RtcConnection .
1638
- *
1639
1682
  * @param remoteUid The user ID of the remote user.
1640
- *
1641
1683
  * @param enabled true: The video module is enabled.false: The video module is disabled.
1642
1684
  */
1643
1685
  onUserEnableVideo?(
@@ -1660,9 +1702,7 @@ export interface IRtcEngineEventHandler {
1660
1702
  * The SDK triggers this callback when the remote user resumes or stops capturing the video stream by calling the enableLocalVideo method.
1661
1703
  *
1662
1704
  * @param connection The connection information. See RtcConnection .
1663
- *
1664
1705
  * @param remoteUid The user ID of the remote user.
1665
- *
1666
1706
  * @param enabled Whether the specified remote user enables/disables the local video capturing function:true: Enable. Other users in the channel can see the video of this remote user.false: Disable. Other users in the channel can no longer receive the video stream from this remote user, while this remote user can still receive the video streams from other users.
1667
1707
  */
1668
1708
  onUserEnableLocalVideo?(
@@ -1671,24 +1711,11 @@ export interface IRtcEngineEventHandler {
1671
1711
  enabled: boolean
1672
1712
  ): void;
1673
1713
 
1674
- /**
1675
- * Occurs when a method is executed by the SDK.
1676
- * Deprecated:Deprecated as of v4.1.0. This method can neither accurately characterize the specific API method nor represent the execution result of the API.Agora recommends getting the results of the API implementation through relevant channels and media callbacks. For example, after calling the enableLocalAudio method to enable the microphone, the status of the microphone is returned in the onLocalAudioStateChanged callback.
1677
- *
1678
- * @param err The error code returned by the SDK when the method call fails. If the SDK returns 0, then the method call is successful.
1679
- *
1680
- * @param api The method executed by the SDK.
1681
- *
1682
- * @param result The result of the method call.
1683
- */
1684
- onApiCallExecuted?(err: ErrorCodeType, api: string, result: string): void;
1685
-
1686
1714
  /**
1687
1715
  * Reports the statistics of the local audio stream.
1688
1716
  * The SDK triggers this callback once every two seconds.
1689
1717
  *
1690
1718
  * @param connection The connection information. See RtcConnection .
1691
- *
1692
1719
  * @param stats Local audio statistics. See LocalAudioStats .
1693
1720
  */
1694
1721
  onLocalAudioStats?(connection: RtcConnection, stats: LocalAudioStats): void;
@@ -1698,20 +1725,16 @@ export interface IRtcEngineEventHandler {
1698
1725
  * The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times.
1699
1726
  *
1700
1727
  * @param connection The connection information. See RtcConnection .
1701
- *
1702
1728
  * @param stats Statistics of the received remote audio stream. See RemoteAudioStats .
1703
1729
  */
1704
1730
  onRemoteAudioStats?(connection: RtcConnection, stats: RemoteAudioStats): void;
1705
1731
 
1706
1732
  /**
1707
- * Reports the statistics of the local video stream.
1708
- * The SDK triggers this callback once every two seconds to report the statistics of the local video stream.
1709
- *
1710
- * @param source The capture type of the custom video source. See VideoSourceType .
1733
+ * Reports the statistics of the video stream sent by each remote users.
1734
+ * Reports the statistics of the video stream from the remote users. The SDK triggers this callback once every two seconds for each remote user. If a channel has multiple users/hosts sending video streams, the SDK triggers this callback as many times.
1711
1735
  *
1712
1736
  * @param connection The connection information. See RtcConnection .
1713
- *
1714
- * @param stats The statistics of the local video stream. See LocalVideoStats .
1737
+ * @param stats Statistics of the remote video stream.
1715
1738
  */
1716
1739
  onLocalVideoStats?(connection: RtcConnection, stats: LocalVideoStats): void;
1717
1740
 
@@ -1720,7 +1743,6 @@ export interface IRtcEngineEventHandler {
1720
1743
  * Reports the statistics of the video stream from the remote users. The SDK triggers this callback once every two seconds for each remote user. If a channel has multiple users/hosts sending video streams, the SDK triggers this callback as many times.
1721
1744
  *
1722
1745
  * @param connection The connection information. See RtcConnection .
1723
- *
1724
1746
  * @param stats Statistics of the remote video stream.
1725
1747
  */
1726
1748
  onRemoteVideoStats?(connection: RtcConnection, stats: RemoteVideoStats): void;
@@ -1773,7 +1795,6 @@ export interface IRtcEngineEventHandler {
1773
1795
  * This callback occurs when the playback state of the music file changes, and reports the current state and error code.
1774
1796
  *
1775
1797
  * @param state The playback state of the music file. See AudioMixingStateType .
1776
- *
1777
1798
  * @param reason Error code. See AudioMixingReasonType .
1778
1799
  */
1779
1800
  onAudioMixingStateChanged?(
@@ -1791,7 +1812,7 @@ export interface IRtcEngineEventHandler {
1791
1812
 
1792
1813
  /**
1793
1814
  * Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
1794
- * The SDK triggers this callback when it cannot connect to the server 10 seconds after calling the joinChannel [2/2] method, regardless of whether it is in the channel. If the SDK fails to rejoin the channel within 20 minutes after disconnecting, the SDK will stop trying to reconnect.
1815
+ * The SDK triggers this callback when it cannot connect to the server 10 seconds after calling the joinChannel method, regardless of whether it is in the channel. If the SDK fails to rejoin the channel within 20 minutes after disconnecting, the SDK will stop trying to reconnect.
1795
1816
  *
1796
1817
  * @param connection The connection information. See RtcConnection .
1797
1818
  */
@@ -1818,15 +1839,10 @@ export interface IRtcEngineEventHandler {
1818
1839
  * The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the sendStreamMessage method.
1819
1840
  *
1820
1841
  * @param connection The connection information. See RtcConnection .
1821
- *
1822
1842
  * @param remoteUid The ID of the remote user sending the message.
1823
- *
1824
1843
  * @param streamId The stream ID of the received message.
1825
- *
1826
1844
  * @param data received data.
1827
- *
1828
1845
  * @param length The data length (byte).
1829
- *
1830
1846
  * @param sentTs The time when the data stream is sent.
1831
1847
  */
1832
1848
  onStreamMessage?(
@@ -1843,15 +1859,10 @@ export interface IRtcEngineEventHandler {
1843
1859
  * The SDK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the sendStreamMessage method.
1844
1860
  *
1845
1861
  * @param connection The connection information. See RtcConnection .
1846
- *
1847
1862
  * @param uid The ID of the remote user sending the message.
1848
- *
1849
1863
  * @param streamId The stream ID of the received message.
1850
- *
1851
1864
  * @param code The error code.
1852
- *
1853
1865
  * @param missed The number of lost messages.
1854
- *
1855
1866
  * @param cached Number of incoming cached messages when the data stream is interrupted.
1856
1867
  */
1857
1868
  onStreamMessageError?(
@@ -1865,7 +1876,7 @@ export interface IRtcEngineEventHandler {
1865
1876
 
1866
1877
  /**
1867
1878
  * Occurs when the token expires.
1868
- * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token.Once you receive this callback, generate a new token on your app server, and call joinChannel [2/2] to rejoin the channel.
1879
+ * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token.Once you receive this callback, generate a new token on your app server, and call joinChannel to rejoin the channel.
1869
1880
  *
1870
1881
  * @param connection The connection information. See RtcConnection .
1871
1882
  */
@@ -1876,7 +1887,6 @@ export interface IRtcEngineEventHandler {
1876
1887
  * When the token is about to expire in 30 seconds, the SDK triggers this callback to remind the app to renew the token.Upon receiving this callback, generate a new token on your server, and call renewToken to pass the new token to the SDK.
1877
1888
  *
1878
1889
  * @param connection The connection information. See RtcConnection .
1879
- *
1880
1890
  * @param token The token that expires in 30 seconds.
1881
1891
  */
1882
1892
  onTokenPrivilegeWillExpire?(connection: RtcConnection, token: string): void;
@@ -1891,11 +1901,10 @@ export interface IRtcEngineEventHandler {
1891
1901
 
1892
1902
  /**
1893
1903
  * Occurs when the first audio frame is published.
1894
- * The SDK triggers this callback under one of the following circumstances:The local client enables the audio module and calls joinChannel [2/2] successfully.The local client calls muteLocalAudioStream (true) and muteLocalAudioStream(false) in sequence.The local client calls disableAudio and enableAudio in sequence.
1904
+ * The SDK triggers this callback under one of the following circumstances:The local client enables the audio module and calls joinChannel successfully.The local client calls muteLocalAudioStream (true) and muteLocalAudioStream(false) in sequence.The local client calls disableAudio and enableAudio in sequence.
1895
1905
  *
1896
1906
  * @param connection The connection information. See RtcConnection .
1897
- *
1898
- * @param elapsed Time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback.
1907
+ * @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1899
1908
  */
1900
1909
  onFirstLocalAudioFramePublished?(
1901
1910
  connection: RtcConnection,
@@ -1907,10 +1916,8 @@ export interface IRtcEngineEventHandler {
1907
1916
  * Deprecated:Use onRemoteAudioStateChanged instead.
1908
1917
  *
1909
1918
  * @param connection The connection information. See RtcConnection .
1910
- *
1911
1919
  * @param userId The ID of the remote user sending the audio frames.
1912
- *
1913
- * @param elapsed The time elapsed (ms) from the local user calling the joinChannel [2/2] method until the SDK triggers this callback.
1920
+ * @param elapsed The time elapsed (ms) from the local user calling the joinChannel method until the SDK triggers this callback.
1914
1921
  */
1915
1922
  onFirstRemoteAudioFrame?(
1916
1923
  connection: RtcConnection,
@@ -1923,10 +1930,8 @@ export interface IRtcEngineEventHandler {
1923
1930
  * Deprecated:Use onRemoteAudioStateChanged instead.The SDK triggers this callback under one of the following circumstances:The remote user joins the channel and sends the audio stream.The remote user stops sending the audio stream and re-sends it after 15 seconds, and the possible reasons include:The remote user leaves the channel.The remote user is offline.The remote user calls muteLocalAudioStream to stop sending the video stream.The remote user calls disableAudio to disable video.
1924
1931
  *
1925
1932
  * @param connection The connection information. See RtcConnection .
1926
- *
1927
1933
  * @param uid The user ID of the remote user.
1928
- *
1929
- * @param elapsed The time elapsed (ms) from the local user calling the joinChannel [2/2] method until the SDK triggers this callback.
1934
+ * @param elapsed The time elapsed (ms) from the local user calling the joinChannel method until the SDK triggers this callback.
1930
1935
  */
1931
1936
  onFirstRemoteAudioDecoded?(
1932
1937
  connection: RtcConnection,
@@ -1939,9 +1944,7 @@ export interface IRtcEngineEventHandler {
1939
1944
  * When the state of the local audio stream changes (including the state of the audio capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local audio stream, and allows you to troubleshoot issues when audio exceptions occur.When the state is LocalAudioStreamStateFailed (3), you can view the error information in the error parameter.
1940
1945
  *
1941
1946
  * @param connection The connection information. See RtcConnection .
1942
- *
1943
1947
  * @param state The state of the local audio. See LocalAudioStreamState .
1944
- *
1945
1948
  * @param error Local audio state error codes. See LocalAudioStreamError .
1946
1949
  */
1947
1950
  onLocalAudioStateChanged?(
@@ -1955,14 +1958,10 @@ export interface IRtcEngineEventHandler {
1955
1958
  * When the audio state of a remote user (in a voice/video call channel) or host (in a live streaming channel) changes, the SDK triggers this callback to report the current state of the remote audio stream.This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 17.
1956
1959
  *
1957
1960
  * @param connection The connection information. See RtcConnection .
1958
- *
1959
1961
  * @param remoteUid The ID of the remote user whose audio state changes.
1960
- *
1961
1962
  * @param state The state of the remote audio. See RemoteAudioState .
1962
- *
1963
1963
  * @param reason The reason of the remote audio state change. See RemoteAudioStateReason .
1964
- *
1965
- * @param elapsed Time elapsed (ms) from the local user calling the joinChannel [2/2] method until the SDK triggers this callback.
1964
+ * @param elapsed Time elapsed (ms) from the local user calling the joinChannel method until the SDK triggers this callback.
1966
1965
  */
1967
1966
  onRemoteAudioStateChanged?(
1968
1967
  connection: RtcConnection,
@@ -1977,7 +1976,6 @@ export interface IRtcEngineEventHandler {
1977
1976
  * After a successful call of enableAudioVolumeIndication , the SDK continuously detects which remote user has the loudest volume. During the current period, the remote user, who is detected as the loudest for the most times, is the most active user.When the number of users is no less than two and an active remote speaker exists, the SDK triggers this callback and reports the uid of the most active remote speaker.If the most active remote speaker is always the same user, the SDK triggers the onActiveSpeaker callback only once.If the most active remote speaker changes to another user, the SDK triggers this callback again and reports the uid of the new active remote speaker.
1978
1977
  *
1979
1978
  * @param connection The connection information. See RtcConnection .
1980
- *
1981
1979
  * @param uid The user ID of the most active remote speaker.
1982
1980
  */
1983
1981
  onActiveSpeaker?(connection: RtcConnection, uid: number): void;
@@ -1992,15 +1990,10 @@ export interface IRtcEngineEventHandler {
1992
1990
  * After a successful takeSnapshot method call, the SDK triggers this callback to report whether the snapshot is successfully taken as well as the details for the snapshot taken.
1993
1991
  *
1994
1992
  * @param connection The connection information. See RtcConnection .
1995
- *
1996
1993
  * @param uid The user ID. One uid of 0 indicates the local user.
1997
- *
1998
1994
  * @param filePath The local path of the snapshot.
1999
- *
2000
1995
  * @param width The width (px) of the snapshot.
2001
- *
2002
1996
  * @param height The height (px) of the snapshot.
2003
- *
2004
1997
  * @param errCode The message that confirms success or gives the reason why the snapshot is not successfully taken:0: Success.< 0: Failure:-1: The SDK fails to write data to a file or encode a JPEG image.-2: The SDK does not find the video stream of the specified user within one second after the takeSnapshot method call succeeds. The possible reasons are: local capture stops, remote end stops publishing, or video data processing is blocked.-3: Calling the takeSnapshot method too frequently.
2005
1998
  */
2006
1999
  onSnapshotTaken?(
@@ -2017,11 +2010,8 @@ export interface IRtcEngineEventHandler {
2017
2010
  * The SDK triggers this callback when the local user switches their user role by calling setClientRole after joining the channel.
2018
2011
  *
2019
2012
  * @param connection The connection information. See RtcConnection .
2020
- *
2021
2013
  * @param oldRole Role that the user switches from: ClientRoleType .
2022
- *
2023
2014
  * @param newRole Role that the user switches to: ClientRoleType .
2024
- *
2025
2015
  * @param newRoleOptions Properties of the role that the user switches to. See ClientRoleOptions .
2026
2016
  */
2027
2017
  onClientRoleChanged?(
@@ -2036,9 +2026,7 @@ export interface IRtcEngineEventHandler {
2036
2026
  * In the live broadcasting channel profile, when the local user calls setClientRole [1/2] to switch their user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role.
2037
2027
  *
2038
2028
  * @param connection The connection information. See RtcConnection .
2039
- *
2040
2029
  * @param reason The reason for a user role switch failure. See ClientRoleChangeFailedReason .
2041
- *
2042
2030
  * @param currentRole Current user role. See ClientRoleType .
2043
2031
  */
2044
2032
  onClientRoleChangeFailed?(
@@ -2052,9 +2040,7 @@ export interface IRtcEngineEventHandler {
2052
2040
  * Occurs when the volume on the playback device, audio capture device, or the volume in the application changes.This callback is for Windows and macOS only.
2053
2041
  *
2054
2042
  * @param deviceType The device type. See MediaDeviceType .
2055
- *
2056
2043
  * @param volume The volume value. The range is [0, 255].
2057
- *
2058
2044
  * @param muted Whether the audio device is muted:true: The audio device is muted.false: The audio device is not muted.
2059
2045
  */
2060
2046
  onAudioDeviceVolumeChanged?(
@@ -2068,9 +2054,7 @@ export interface IRtcEngineEventHandler {
2068
2054
  * When the media push state changes, the SDK triggers this callback and reports the URL address and the current state of the media push. This callback indicates the state of the media push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter.
2069
2055
  *
2070
2056
  * @param url The URL address where the state of the media push changes.
2071
- *
2072
2057
  * @param state The current state of the media push. See RtmpStreamPublishState .
2073
- *
2074
2058
  * @param errCode The detailed error information for the media push. See RtmpStreamPublishErrorType .
2075
2059
  */
2076
2060
  onRtmpStreamingStateChanged?(
@@ -2083,7 +2067,6 @@ export interface IRtcEngineEventHandler {
2083
2067
  * Reports events during the media push.
2084
2068
  *
2085
2069
  * @param url The URL of media push.
2086
- *
2087
2070
  * @param eventCode The event code of media push. See RtmpStreamingEvent .
2088
2071
  */
2089
2072
  onRtmpStreamingEvent?(url: string, eventCode: RtmpStreamingEvent): void;
@@ -2108,7 +2091,6 @@ export interface IRtcEngineEventHandler {
2108
2091
  * The SDK returns the state of the current media relay with any error message.
2109
2092
  *
2110
2093
  * @param state The state code. See ChannelMediaRelayState .
2111
- *
2112
2094
  * @param code The error code of the channel media relay. See ChannelMediaRelayError .
2113
2095
  */
2114
2096
  onChannelMediaRelayStateChanged?(
@@ -2138,16 +2120,12 @@ export interface IRtcEngineEventHandler {
2138
2120
 
2139
2121
  /**
2140
2122
  * Reports the transport-layer statistics of each remote audio stream.
2141
- * Deprecated:Please use onRemoteAudioStats instead.This callback reports the transport-layer statistics, such as the packet loss rate and network time delay after the local user receives an audio packet from a remote user. During a call, when the user receives the audio packet sent by the remote user, the callback is triggered every 2 seconds.
2123
+ * Deprecated:Use onRemoteAudioStats instead.This callback reports the transport-layer statistics, such as the packet loss rate and network time delay after the local user receives an audio packet from a remote user. During a call, when the user receives the audio packet sent by the remote user, the callback is triggered every 2 seconds.
2142
2124
  *
2143
2125
  * @param connection The connection information. See RtcConnection .
2144
- *
2145
2126
  * @param remoteUid The ID of the remote user sending the audio streams.
2146
- *
2147
2127
  * @param delay The network delay (ms) from the remote user to the receiver.
2148
- *
2149
2128
  * @param lost The packet loss rate (%) of the audio packet sent from the remote user to the receiver.
2150
- *
2151
2129
  * @param rxKBitrate The bitrate of the received audio (Kbps).
2152
2130
  */
2153
2131
  onRemoteAudioTransportStats?(
@@ -2163,13 +2141,9 @@ export interface IRtcEngineEventHandler {
2163
2141
  * Deprecated:This callback is deprecated; use onRemoteVideoStats instead.This callback reports the transport-layer statistics, such as the packet loss rate and network time delay, once every two seconds after the local user receives a video packet from a remote user.During a call, when the user receives the video packet sent by the remote user/host, the callback is triggered every 2 seconds.
2164
2142
  *
2165
2143
  * @param connection The connection information. See RtcConnection .
2166
- *
2167
2144
  * @param remoteUid The ID of the remote user sending the video packets.
2168
- *
2169
2145
  * @param delay The network delay (ms) from the sender to the receiver.
2170
- *
2171
2146
  * @param lost The packet loss rate (%) of the video packet sent from the remote user.
2172
- *
2173
2147
  * @param rxKBitRate The bitrate of the received video (Kbps).
2174
2148
  */
2175
2149
  onRemoteVideoTransportStats?(
@@ -2185,7 +2159,6 @@ export interface IRtcEngineEventHandler {
2185
2159
  * When the network connection state changes, the SDK triggers this callback and reports the current connection state and the reason for the change.
2186
2160
  *
2187
2161
  * @param state The current connection state.
2188
- *
2189
2162
  * @param reason The reason for a connection state change.
2190
2163
  */
2191
2164
  onConnectionStateChanged?(
@@ -2218,7 +2191,6 @@ export interface IRtcEngineEventHandler {
2218
2191
  * This callback occurs when the connection state of the local user changes. You can get the connection state and reason for the state change in this callback. When the network connection is interrupted, this callback indicates whether the interruption is caused by a network type change or poor network conditions.
2219
2192
  *
2220
2193
  * @param connection The connection information. See RtcConnection .
2221
- *
2222
2194
  * @param type The type of the local network connection. See NetworkType .
2223
2195
  */
2224
2196
  onNetworkTypeChanged?(connection: RtcConnection, type: NetworkType): void;
@@ -2229,7 +2201,6 @@ export interface IRtcEngineEventHandler {
2229
2201
  *
2230
2202
  * @param connection The connection information. See RtcConnection .
2231
2203
  *
2232
- * @param errorType
2233
2204
  */
2234
2205
  onEncryptionError?(
2235
2206
  connection: RtcConnection,
@@ -2249,7 +2220,6 @@ export interface IRtcEngineEventHandler {
2249
2220
  * After the local user successfully calls registerLocalUserAccount to register the user account or calls joinChannelWithUserAccount to join a channel, the SDK triggers the callback and informs the local user's UID and User Account.
2250
2221
  *
2251
2222
  * @param uid The ID of the local user.
2252
- *
2253
2223
  * @param userAccount The user account of the local user.
2254
2224
  */
2255
2225
  onLocalUserRegistered?(uid: number, userAccount: string): void;
@@ -2259,7 +2229,6 @@ export interface IRtcEngineEventHandler {
2259
2229
  * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers this callback on the local client.
2260
2230
  *
2261
2231
  * @param uid The user ID of the remote user.
2262
- *
2263
2232
  * @param info The UserInfo object that contains the user ID and user account of the remote user. See UserInfo for details.
2264
2233
  */
2265
2234
  onUserInfoUpdated?(uid: number, info: UserInfo): void;
@@ -2278,13 +2247,9 @@ export interface IRtcEngineEventHandler {
2278
2247
  * Occurs when the audio subscribing state changes.
2279
2248
  *
2280
2249
  * @param channel The channel name.
2281
- *
2282
2250
  * @param uid The user ID of the remote user.
2283
- *
2284
2251
  * @param oldState The previous subscribing status, see StreamSubscribeState for details.
2285
- *
2286
2252
  * @param newState The current subscribing status, see StreamSubscribeState for details.
2287
- *
2288
2253
  * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
2289
2254
  */
2290
2255
  onAudioSubscribeStateChanged?(
@@ -2299,13 +2264,9 @@ export interface IRtcEngineEventHandler {
2299
2264
  * Occurs when the video subscribing state changes.
2300
2265
  *
2301
2266
  * @param channel The channel name.
2302
- *
2303
2267
  * @param uid The ID of the remote user.
2304
- *
2305
2268
  * @param oldState The previous subscribing status, see StreamSubscribeState for details.
2306
- *
2307
2269
  * @param newState The current subscribing status, see StreamSubscribeState for details.
2308
- *
2309
2270
  * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
2310
2271
  */
2311
2272
  onVideoSubscribeStateChanged?(
@@ -2320,11 +2281,8 @@ export interface IRtcEngineEventHandler {
2320
2281
  * Occurs when the audio publishing state changes.
2321
2282
  *
2322
2283
  * @param channel The channel name.
2323
- *
2324
2284
  * @param oldState The previous subscribing status. See StreamPublishState .
2325
- *
2326
2285
  * @param newState The current subscribing status. See StreamPublishState.
2327
- *
2328
2286
  * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
2329
2287
  */
2330
2288
  onAudioPublishStateChanged?(
@@ -2337,14 +2295,10 @@ export interface IRtcEngineEventHandler {
2337
2295
  /**
2338
2296
  * Occurs when the video publishing state changes.
2339
2297
  *
2340
- * @param channel The channel name.
2341
- *
2342
2298
  * @param source The capture type of the custom video source. See VideoSourceType .
2343
- *
2299
+ * @param channel The channel name.
2344
2300
  * @param oldState For the previous publishing state, see StreamPublishState .
2345
- *
2346
2301
  * @param newState For the current publishing state, see StreamPublishState.
2347
- *
2348
2302
  * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
2349
2303
  */
2350
2304
  onVideoPublishStateChanged?(
@@ -2359,13 +2313,10 @@ export interface IRtcEngineEventHandler {
2359
2313
  * The event callback of the extension.
2360
2314
  * To listen for events while the extension is running, you need to register this callback.
2361
2315
  *
2362
- * @param value The value of the extension key.
2363
- *
2364
- * @param key The key of the extension.
2365
- *
2366
2316
  * @param provider The name of the extension provider.
2367
- *
2368
2317
  * @param extension The name of the extension.
2318
+ * @param key The key of the extension.
2319
+ * @param value The value of the extension key.
2369
2320
  */
2370
2321
  onExtensionEvent?(
2371
2322
  provider: string,
@@ -2379,7 +2330,6 @@ export interface IRtcEngineEventHandler {
2379
2330
  * After a successful call of enableExtension (true), the extension triggers this callback.
2380
2331
  *
2381
2332
  * @param provider The name of the extension provider.
2382
- *
2383
2333
  * @param extension The name of the extension.
2384
2334
  */
2385
2335
  onExtensionStarted?(provider: string, extension: string): void;
@@ -2388,9 +2338,8 @@ export interface IRtcEngineEventHandler {
2388
2338
  * Occurs when the extension is disabled.
2389
2339
  * After a successful call of enableExtension (false), this callback is triggered.
2390
2340
  *
2391
- * @param extension The name of the extension.
2392
- *
2393
2341
  * @param provider The name of the extension provider.
2342
+ * @param extension The name of the extension.
2394
2343
  */
2395
2344
  onExtensionStopped?(provider: string, extension: string): void;
2396
2345
 
@@ -2399,11 +2348,8 @@ export interface IRtcEngineEventHandler {
2399
2348
  * When calling enableExtension (true) fails or the extension runs in error, the extension triggers this callback and reports the error code and reason.
2400
2349
  *
2401
2350
  * @param provider The name of the extension provider.
2402
- *
2403
2351
  * @param extension The name of the extension.
2404
- *
2405
2352
  * @param error Error code. For details, see the extension documentation provided by the extension provider.
2406
- *
2407
2353
  * @param message Reason. For details, see the extension documentation provided by the extension provider.
2408
2354
  */
2409
2355
  onExtensionError?(
@@ -2422,6 +2368,14 @@ export interface IRtcEngineEventHandler {
2422
2368
  userAccount: string
2423
2369
  ): void;
2424
2370
 
2371
+ /**
2372
+ * @ignore
2373
+ */
2374
+ onLocalVideoTranscoderError?(
2375
+ stream: TranscodingVideoStream,
2376
+ error: VideoTranscoderError
2377
+ ): void;
2378
+
2425
2379
  /**
2426
2380
  * @ignore
2427
2381
  */
@@ -2471,7 +2425,7 @@ export abstract class IVideoDeviceManager {
2471
2425
  * @param deviceIdUTF8 The ID of the video capture device.
2472
2426
  *
2473
2427
  * @returns
2474
- * 0: Success. Returns the number of video formats supported by this device. For example: If the specified camera supports 10 different video formats, the return value is 10.< 0: Failure.
2428
+ * > 0: Success. Returns the number of video formats supported by this device. For example: If the specified camera supports 10 different video formats, the return value is 10.≤ 0: Failure.
2475
2429
  */
2476
2430
  abstract numberOfCapabilities(deviceIdUTF8: string): number;
2477
2431
 
@@ -2480,7 +2434,6 @@ export abstract class IVideoDeviceManager {
2480
2434
  * After calling numberOfCapabilities to get the number of video formats supported by the video capture device, you can call this method to get the specific video frame information supported by the specified index number.
2481
2435
  *
2482
2436
  * @param deviceIdUTF8 The ID of the video capture device.
2483
- *
2484
2437
  * @param deviceCapabilityNumber The index number of the video format. If the return value of numberOfCapabilities is i, the value range of this parameter is [0,i).
2485
2438
  *
2486
2439
  * @returns
@@ -2502,7 +2455,7 @@ export abstract class IVideoDeviceManager {
2502
2455
  abstract stopDeviceTest(): number;
2503
2456
 
2504
2457
  /**
2505
- * Releases all the resources occupied by the IVideoDeviceManager object.
2458
+ * @ignore
2506
2459
  */
2507
2460
  abstract release(): void;
2508
2461
  }
@@ -2533,15 +2486,15 @@ export class RtcEngineContext {
2533
2486
  areaCode?: number;
2534
2487
  /**
2535
2488
  * The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log.
2536
- * The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log.
2537
- * The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8.
2538
- * The SDK writes the latest logs in agorasdk.log or agoraapi.log.
2539
- * When agorasdk.log is full, the SDK processes the log files in the following order:
2540
- * Delete the agorasdk.4.log file (if any).
2541
- * Rename agorasdk.3.log to agorasdk.4.log.
2542
- * Rename agorasdk.2.log to agorasdk.3.log.
2543
- * Rename agorasdk.1.log to agorasdk.2.log.
2544
- * Create a new agorasdk.log file. The overwrite rules for the agoraapi.log file are the same as for agorasdk.log. Sets the log file size. See LogConfig .By default, the SDK generates five SDK log files and five API call log files with the following rules:
2489
+ * The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log.
2490
+ * The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8.
2491
+ * The SDK writes the latest logs in agorasdk.log or agoraapi.log.
2492
+ * When agorasdk.log is full, the SDK processes the log files in the following order:
2493
+ * Delete the agorasdk.4.log file (if any).
2494
+ * Rename agorasdk.3.log to agorasdk.4.log.
2495
+ * Rename agorasdk.2.log to agorasdk.3.log.
2496
+ * Rename agorasdk.1.log to agorasdk.2.log.
2497
+ * Create a new agorasdk.log file. The overwrite rules for the agoraapi.log file are the same as for agorasdk.log. Sets the log file size. See LogConfig .By default, the SDK generates five SDK log files and five API call log files with the following rules:
2545
2498
  */
2546
2499
  logConfig?: LogConfig;
2547
2500
  /**
@@ -2556,6 +2509,10 @@ export class RtcEngineContext {
2556
2509
  * Whether to enable domain name restriction:true: Enables the domain name restriction. This value is suitable for scenarios where IoT devices use IoT cards for network access. The SDK will only connect to servers in the domain name or IP whitelist that has been reported to the operator.false: (Default) Disables the domain name restriction. This value is suitable for most common scenarios.
2557
2510
  */
2558
2511
  domainLimit?: boolean;
2512
+ /**
2513
+ * @ignore
2514
+ */
2515
+ autoRegisterAgoraExtensions?: boolean;
2559
2516
  }
2560
2517
 
2561
2518
  /**
@@ -2625,89 +2582,89 @@ export interface IMetadataObserver {
2625
2582
  }
2626
2583
 
2627
2584
  /**
2628
- * @ignore
2585
+ * The CDN streaming error.
2629
2586
  */
2630
2587
  export enum DirectCdnStreamingError {
2631
2588
  /**
2632
- * @ignore
2589
+ * 0: No error.
2633
2590
  */
2634
2591
  DirectCdnStreamingErrorOk = 0,
2635
2592
  /**
2636
- * @ignore
2593
+ * 1: A general error; no specific reason. You can try to push the media stream again.
2637
2594
  */
2638
2595
  DirectCdnStreamingErrorFailed = 1,
2639
2596
  /**
2640
- * @ignore
2597
+ * 2: An error occurs when pushing audio streams. For example, the local audio capture device is not working properly, is occupied by another process, or does not get the permission required.
2641
2598
  */
2642
2599
  DirectCdnStreamingErrorAudioPublication = 2,
2643
2600
  /**
2644
- * @ignore
2601
+ * 3: An error occurs when pushing video streams. For example, the local video capture device is not working properly, is occupied by another process, or does not get the permission required.
2645
2602
  */
2646
2603
  DirectCdnStreamingErrorVideoPublication = 3,
2647
2604
  /**
2648
- * @ignore
2605
+ * 4: Fails to connect to the CDN.
2649
2606
  */
2650
2607
  DirectCdnStreamingErrorNetConnect = 4,
2651
2608
  /**
2652
- * @ignore
2609
+ * 5: The URL is already being used. Use a new URL for streaming.
2653
2610
  */
2654
2611
  DirectCdnStreamingErrorBadName = 5,
2655
2612
  }
2656
2613
 
2657
2614
  /**
2658
- * @ignore
2615
+ * The current CDN streaming state.
2659
2616
  */
2660
2617
  export enum DirectCdnStreamingState {
2661
2618
  /**
2662
- * @ignore
2619
+ * 0: The initial state before the CDN streaming starts.
2663
2620
  */
2664
2621
  DirectCdnStreamingStateIdle = 0,
2665
2622
  /**
2666
- * @ignore
2623
+ * 1: Streams are being pushed to the CDN. The SDK returns this value when you call the startDirectCdnStreaming method to push streams to the CDN.
2667
2624
  */
2668
2625
  DirectCdnStreamingStateRunning = 1,
2669
2626
  /**
2670
- * @ignore
2627
+ * 2: Stops pushing streams to the CDN. The SDK returns this value when you call the stopDirectCdnStreaming method to stop pushing streams to the CDN.
2671
2628
  */
2672
2629
  DirectCdnStreamingStateStopped = 2,
2673
2630
  /**
2674
- * @ignore
2631
+ * 3: Fails to push streams to the CDN. You can troubleshoot the issue with the information reported by the onDirectCdnStreamingStateChanged callback, and then push streams to the CDN again.
2675
2632
  */
2676
2633
  DirectCdnStreamingStateFailed = 3,
2677
2634
  /**
2678
- * @ignore
2635
+ * 4: Tries to reconnect the Agora server to the CDN. The SDK attempts to reconnect a maximum of 10 times; if the connection is not restored, the streaming state becomes DirectCdnStreamingStateFailed.
2679
2636
  */
2680
2637
  DirectCdnStreamingStateRecovering = 4,
2681
2638
  }
2682
2639
 
2683
2640
  /**
2684
- * @ignore
2641
+ * The statistics of the current CDN streaming.
2685
2642
  */
2686
2643
  export class DirectCdnStreamingStats {
2687
2644
  /**
2688
- * @ignore
2645
+ * The width (px) of the video frame.
2689
2646
  */
2690
2647
  videoWidth?: number;
2691
2648
  /**
2692
- * @ignore
2649
+ * The height (px) of the video frame.
2693
2650
  */
2694
2651
  videoHeight?: number;
2695
2652
  /**
2696
- * @ignore
2653
+ * The frame rate (fps) of the current video frame.
2697
2654
  */
2698
2655
  fps?: number;
2699
2656
  /**
2700
- * @ignore
2657
+ * The bitrate (bps) of the current video frame.
2701
2658
  */
2702
2659
  videoBitrate?: number;
2703
2660
  /**
2704
- * @ignore
2661
+ * The bitrate (bps) of the current audio frame.
2705
2662
  */
2706
2663
  audioBitrate?: number;
2707
2664
  }
2708
2665
 
2709
2666
  /**
2710
- * @ignore
2667
+ * The IDirectCdnStreamingEventHandler interface class is used by the SDK to send event notifications of CDN streaming to your app. Your app can get those notifications through methods that inherit this interface class.
2711
2668
  */
2712
2669
  export interface IDirectCdnStreamingEventHandler {
2713
2670
  /**
@@ -2726,23 +2683,23 @@ export interface IDirectCdnStreamingEventHandler {
2726
2683
  }
2727
2684
 
2728
2685
  /**
2729
- * @ignore
2686
+ * The media setting options for the host.
2730
2687
  */
2731
2688
  export class DirectCdnStreamingMediaOptions {
2732
2689
  /**
2733
- * @ignore
2690
+ * Sets whether to publish the video captured by the camera:true: Publish the video captured by the camera.false: (Default) Do not publish the video captured by the camera.
2734
2691
  */
2735
2692
  publishCameraTrack?: boolean;
2736
2693
  /**
2737
- * @ignore
2694
+ * Sets whether to publish the audio captured by the microphone:true: Publish the audio captured by the microphone.false: (Default) Do not publish the audio captured by the microphone.
2738
2695
  */
2739
2696
  publishMicrophoneTrack?: boolean;
2740
2697
  /**
2741
- * @ignore
2698
+ * Sets whether to publish the captured audio from a custom source:true: Publish the captured audio from a custom source.false: (Default) Do not publish the captured audio from the custom source.
2742
2699
  */
2743
2700
  publishCustomAudioTrack?: boolean;
2744
2701
  /**
2745
- * @ignore
2702
+ * Sets whether to publish the captured video from a custom source:true: Publish the captured video from a custom source.false: (Default) Do not publish the captured video from the custom source.
2746
2703
  */
2747
2704
  publishCustomVideoTrack?: boolean;
2748
2705
  /**
@@ -2754,7 +2711,7 @@ export class DirectCdnStreamingMediaOptions {
2754
2711
  */
2755
2712
  publishMediaPlayerId?: number;
2756
2713
  /**
2757
- * @ignore
2714
+ * The video track ID returned by calling the createCustomVideoTrack method. The default value is 0.
2758
2715
  */
2759
2716
  customVideoTrackId?: number;
2760
2717
  }
@@ -2824,36 +2781,21 @@ export abstract class IRtcEngine {
2824
2781
  abstract getErrorDescription(code: number): string;
2825
2782
 
2826
2783
  /**
2827
- * Joins a channel.
2828
- * When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client.
2829
- * A successful call of this method triggers the following callbacks:
2830
- * The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks.
2831
- * The remote client: onUserJoined , if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile. This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other.
2832
- * Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods.
2833
- *
2834
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
2835
- * All lowercase English letters: a to z.
2836
- * All uppercase English letters: A to Z.
2837
- * All numeric characters: 0 to 9.
2838
- * Space
2839
- * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2784
+ * @ignore
2785
+ */
2786
+ abstract queryCodecCapability(): { codecInfo: CodecCapInfo[]; size: number };
2787
+
2788
+ /**
2789
+ * Joins a channel with media options.
2790
+ * This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other.A successful call of this method triggers the following callbacks:The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks.The remote client: onUserJoined , if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile.When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client.This method allows users to join only one channel at a time.Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token.
2840
2791
  *
2841
2792
  * @param token The token generated on your server for authentication.
2842
- *
2843
- * @param info (Optional) Reserved for future use.
2844
- *
2793
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2845
2794
  * @param uid The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 232-1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2795
+ * @param options The channel media options. See ChannelMediaOptions .
2846
2796
  *
2847
2797
  * @returns
2848
- * 0: Success.
2849
- * < 0: Failure.
2850
- * -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
2851
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
2852
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2853
- * -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
2854
- * -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.
2855
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
2856
- * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
2798
+ * 0: Success.< 0: Failure.-2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.-3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.-17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.-102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.-121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
2857
2799
  */
2858
2800
  abstract joinChannel(
2859
2801
  token: string,
@@ -2868,21 +2810,25 @@ export abstract class IRtcEngine {
2868
2810
  * @param options The channel media options. See ChannelMediaOptions .
2869
2811
  *
2870
2812
  * @returns
2871
- * 0: Success.< 0: Failure.-2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends using the onConnectionStateChanged callback to get whether the user is in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel [2/2] to join a channel before calling this method.
2813
+ * 0: Success.< 0: Failure.-2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
2872
2814
  */
2873
2815
  abstract updateChannelMediaOptions(options: ChannelMediaOptions): number;
2874
2816
 
2875
2817
  /**
2876
- * Leaves a channel.
2877
- * This method releases all resources related to the session.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel.After joining the channel, you must call this method or leaveChannel to end the call, otherwise, the next call cannot be started.If you successfully call this method and leave the channel, the following callbacks are triggered:The local client: onLeaveChannel .The remote client: onUserOffline , if the user joining the channel is in the Communication profile, or is a host in the Live-broadcasting profile.If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel [2/2] and joinChannelEx at the same time.
2818
+ * Sets channel options and leaves the channel.
2819
+ * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
2820
+ * If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time.
2821
+ * This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress.After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback.
2822
+ *
2823
+ * @param options The options for leaving the channel. See LeaveChannelOptions .
2878
2824
  *
2879
2825
  * @returns
2880
- * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-7: The SDK is not initialized.
2826
+ * 0: Success.< 0: Failure.
2881
2827
  */
2882
2828
  abstract leaveChannel(options?: LeaveChannelOptions): number;
2883
2829
 
2884
2830
  /**
2885
- * Gets a new token when the current token expires after a period of time.
2831
+ * Renews the token.
2886
2832
  * The SDK triggers the onTokenPrivilegeWillExpire callback.The onConnectionStateChanged callback reports ConnectionChangedTokenExpired(9).
2887
2833
  *
2888
2834
  * @param token The new token.
@@ -2894,23 +2840,24 @@ export abstract class IRtcEngine {
2894
2840
 
2895
2841
  /**
2896
2842
  * Sets the channel profile.
2897
- * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of Agora channel. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming.To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile.This method must be called and set before joinChannel [2/2], and cannot be set again after joining the channel.The default video encoding bitrate are different in different channel profiles.
2843
+ * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of the channel. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for the interactive live video streaming.To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile.This method must be called and set before joinChannel, and cannot be set again after joining the channel.The default video encoding bitrate are different in different channel profiles.
2898
2844
  *
2899
2845
  * @param profile The channel profile. See ChannelProfileType .
2900
2846
  *
2901
2847
  * @returns
2902
- * 0(ERR_OK): Success.< 0: Failure.-2(ERR_INVALID_ARGUMENT): The parameter is invalid.-7(ERR_NOT_INITIALIZED): The SDK is not initialized.
2848
+ * 0(ERR_OK): Success.< 0: Failure.-2: The parameter is invalid.-7: The SDK is not initialized.
2903
2849
  */
2904
2850
  abstract setChannelProfile(profile: ChannelProfileType): number;
2905
2851
 
2906
2852
  /**
2907
- * Sets the client role.
2908
- * If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel.You can call this method either before or after joining the channel to set the user role as audience or host.If you call this method to switch the user role after joining the channel, the SDK triggers the following callbacks:The local client: onClientRoleChanged .The remote client: onUserJoined or onUserOffline (UserOfflineBecomeAudience).
2853
+ * Sets the user role and level in an interactive live streaming channel.
2854
+ * In the interactive live streaming profile, the SDK sets the user role as audience by default. You can call this method to set the user role as host.You can call this method either before or after joining a channel.If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel.If you call this method to switch the user role after joining a channel, the SDK automatically does the following:Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state.Triggers onClientRoleChanged on the local client.Triggers onUserJoined or onUserOffline on the remote client.This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is ChannelProfileLiveBroadcasting) only.
2909
2855
  *
2910
- * @param role The user role. See ClientRoleType .
2856
+ * @param role The user role in the interactive live streaming. See ClientRoleType .
2857
+ * @param options The detailed options of a user, including the user level. See ClientRoleOptions .
2911
2858
  *
2912
2859
  * @returns
2913
- * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-7: The SDK is not initialized.
2860
+ * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-5: The request is rejected.-7: The SDK is not initialized.
2914
2861
  */
2915
2862
  abstract setClientRole(
2916
2863
  role: ClientRoleType,
@@ -2918,22 +2865,22 @@ export abstract class IRtcEngine {
2918
2865
  ): number;
2919
2866
 
2920
2867
  /**
2921
- * Starts an audio call test.
2922
- * This method starts an audio call test to determine whether the audio devices (for example, headset and speaker) and the network connection are working properly. To conduct the test, let the user speak for a while, and the recording is played back within the set interval. If the user can hear the recording within the interval, the audio devices and network connection are working properly.Call this method before joining a channel.After calling startEchoTest, you must call stopEchoTest to end the test. Otherwise, the app cannot perform the next echo test, and you cannot join the channel.In the live streaming channels, only a host can call this method.
2868
+ * Starts an audio and video call loop test.
2869
+ * Before joining a channel, to test whether the user's local sending and receiving streams are normal, you can call this method to perform an audio and video call loop test, which tests whether the audio and video devices and the user's upstream and downstream networks are working properly.After starting the test, the user needs to make a sound or face the camera. The audio or video is output after about two seconds. If the audio playback is normal, the audio device and the user's upstream and downstream networks are working properly; if the video playback is normal, the video device and the user's upstream and downstream networks are working properly.Call this method before joining a channel.After calling this method, call stopEchoTest to end the test; otherwise, the user cannot perform the next audio and video call loop test and cannot join the channel.In live streaming scenarios, this method only applies to hosts.
2923
2870
  *
2924
- * @param intervalInSeconds The time interval (s) between when you speak and when the recording plays back. The value range is [2, 10], and the default value is 10.
2871
+ * @param config The configuration of the audio and video call loop test. See EchoTestConfiguration .
2925
2872
  *
2926
2873
  * @returns
2927
2874
  * 0: Success.< 0: Failure.
2928
2875
  */
2929
- abstract startEchoTest(intervalInSeconds?: number): number;
2876
+ abstract startEchoTest(config: EchoTestConfiguration): number;
2930
2877
 
2931
2878
  /**
2932
2879
  * Stops the audio call test.
2933
2880
  *
2934
2881
  * @returns
2935
2882
  * 0: Success.
2936
- * < 0: Failure.-5(ERR_REFUSED): Failed to stop the echo test. The echo test may not be running.
2883
+ * < 0: Failure.-5(ERR_REFUSED): Failed to stop the echo test. The echo test may not be running.
2937
2884
  */
2938
2885
  abstract stopEchoTest(): number;
2939
2886
 
@@ -2942,7 +2889,6 @@ export abstract class IRtcEngine {
2942
2889
  * In scenarios where there are existing cameras to capture video, Agora recommends that you use the following steps to capture and publish video with multiple cameras:Call this method to enable multi-channel camera capture.Call startPreview [1/2] to start the local video preview.Call startSecondaryCameraCapture to start video capture with the second camera.Call joinChannelEx , and set publishSecondaryCameraTrack to true to publish the video stream captured by the second camera in the channel.If you want to disable multi-channel camera capture, use the following steps:Call stopSecondaryCameraCapture .Call this method with enabled set to false.You can call this method before and after startPreview [1/2] to enable multi-camera capture:If it is enabled before startPreview [1/2], the local video preview shows the image captured by the two cameras at the same time.If it is enabled after startPreview [1/2], the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal.When using this function, ensure that the system version is 13.0 or later.The minimum iOS device types that support multi-camera capture are as follows:iPhone XRiPhone XSiPhone XS MaxiPad Pro 3rd generation and later
2943
2890
  *
2944
2891
  * @param enabled Whether to enable multi-camera video capture mode:true: Enable multi-camera capture mode; the SDK uses multiple cameras to capture video.false: Disable multi-camera capture mode; the SDK uses a single camera to capture video.
2945
- *
2946
2892
  * @param config Capture configuration for the second camera. See CameraCapturerConfiguration .
2947
2893
  *
2948
2894
  * @returns
@@ -2955,7 +2901,7 @@ export abstract class IRtcEngine {
2955
2901
 
2956
2902
  /**
2957
2903
  * Enables the video module.
2958
- * Call this method either before joining a channel or during a call. If this method is called before joining a channel, the call starts in the video mode. Call disableVideo to disable the video mode.A successful call of this method triggers the onRemoteVideoStateChanged callback on the remote client.This method enables the internal engine and is valid after leaving the channel.This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the video engine modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2904
+ * Call this method either before joining a channel or during a call. If this method is called before joining a channel, the call starts in the video mode; if called during a call, the audio call switches to a video call. Call disableVideo to disable the video mode.A successful call of this method triggers the onRemoteVideoStateChanged callback on the remote client.This method enables the internal engine and is valid after leaving the channel.This method resets the internal engine and thus might takes some time to take effect. Agora recommends using the following APIs to control the video modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2959
2905
  *
2960
2906
  * @returns
2961
2907
  * 0: Success.< 0: Failure.
@@ -2964,7 +2910,7 @@ export abstract class IRtcEngine {
2964
2910
 
2965
2911
  /**
2966
2912
  * Disables the video module.
2967
- * This method disables video. You can call this method either before or after joining a channel. If you call it before joining a channel, an audio call starts when you join the channel. If you call it after joining a channel, a video call switches to an audio call. Call enableVideo to enable video.A successful call of this method triggers the onUserEnableVideo (false) callback on the remote client.This method affects the internal engine and can be called after leaving the channel.This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the video engine modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2913
+ * This method can be called before joining a channel or during a call to disable the video module. If it is called before joining a channel, an audio call starts when you join the channel; if called during a call, a video call switches to an audio call. Call enableVideo to enable the video module.A successful call of this method triggers the onUserEnableVideo (false) callback on the remote client.This method affects the internal engine and can be called after leaving the channel.This method resets the internal engine and thus might takes some time to take effect. Agora recommends using the following APIs to control the video modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2968
2914
  *
2969
2915
  * @returns
2970
2916
  * 0: Success.< 0: Failure.
@@ -2972,8 +2918,10 @@ export abstract class IRtcEngine {
2972
2918
  abstract disableVideo(): number;
2973
2919
 
2974
2920
  /**
2975
- * Enables the local video preview.
2976
- * This method starts the local video preview before joining the channel. Before calling this method, ensure that you do the following:Call setView to set the local preview window.Call enableVideo to enable the video.The local preview enables the mirror mode by default.After the local video preview is enabled, if you call leaveChannel [1/2] to exit the channel, the local preview remains until you call stopPreview [1/2] to disable it.
2921
+ * Enables the local video preview and specifies the video source for the preview.
2922
+ * This method starts the local video preview before joining the channel. Before calling this method, ensure that you do the following:Call setView to set the local preview window.Call enableVideo to enable the video.The local preview enables the mirror mode by default.After the local video preview is enabled, if you call leaveChannel to exit the channel, the local preview remains until you call stopPreview to disable it.The video source type set in this method needs to be consistent with the video source type of VideoCanvas you set in setupLocalVideo .
2923
+ *
2924
+ * @param sourceType The type of the video frame, see VideoSourceType .
2977
2925
  *
2978
2926
  * @returns
2979
2927
  * 0: Success.< 0: Failure.
@@ -2982,10 +2930,12 @@ export abstract class IRtcEngine {
2982
2930
 
2983
2931
  /**
2984
2932
  * Stops the local video preview.
2985
- * After calling startPreview [1/2] to start the preview, if you want to close the local video preview, please call this method.Please call this method before joining a channel or after leaving a channel.
2933
+ * After calling startPreview to start the preview, if you want to close the local video preview, call this method.Call this method before joining a channel or after leaving a channel.
2934
+ *
2935
+ * @param sourceType The type of the video frame, see VideoSourceType .
2986
2936
  *
2987
2937
  * @returns
2988
- * 0: Success.< 0: Failure.
2938
+ * < 0: Failure.
2989
2939
  */
2990
2940
  abstract stopPreview(sourceType?: VideoSourceType): number;
2991
2941
 
@@ -3025,11 +2975,9 @@ export abstract class IRtcEngine {
3025
2975
  * Sets the image enhancement options.
3026
2976
  * Enables or disables image enhancement, and sets the options.Call this method before calling enableVideo or startPreview [1/2] .This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3027
2977
  *
3028
- * @param type The type of the video source. See MediaSourceType .
3029
- *
3030
2978
  * @param enabled Whether to enable the image enhancement function:true: Enable the image enhancement function.false: (Default) Disable the image enhancement function.
3031
- *
3032
2979
  * @param options The image enhancement options. See BeautyOptions .
2980
+ * @param type The type of the video source, see MediaSourceType .
3033
2981
  *
3034
2982
  * @returns
3035
2983
  * 0: Success.< 0: Failure.
@@ -3045,9 +2993,7 @@ export abstract class IRtcEngine {
3045
2993
  * The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video.You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.Call this method after calling enableVideo .Dark light enhancement has certain requirements for equipment performance. The low-light enhancement feature has certain performance requirements on devices. If your device overheats after you enable low-light enhancement, Agora recommends modifying the low-light enhancement options to a less performance-consuming level or disabling low-light enhancement entirely.Both this method and setExtensionProperty can turn on low-light enhancement:When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK).When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty.This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3046
2994
  *
3047
2995
  * @param enabled Whether to enable low-light enhancement function:true: Enable low-light enhancement function.false: (Default) Disable low-light enhancement function.
3048
- *
3049
2996
  * @param options The low-light enhancement options. See LowlightEnhanceOptions .
3050
- *
3051
2997
  * @param type The type of the video source. See MediaSourceType .
3052
2998
  *
3053
2999
  * @returns
@@ -3060,14 +3006,12 @@ export abstract class IRtcEngine {
3060
3006
  ): number;
3061
3007
 
3062
3008
  /**
3063
- * Sets video noise reduction.
3064
- * Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding.You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect.Call this method after calling enableVideo .Video noise reduction has certain requirements for equipment performance. If your device overheats after you enable video noise reduction, Agora recommends modifying the video noise reduction options to a less performance-consuming level or disabling video noise reduction entirely.Both this method and setExtensionProperty can turn on video noise reduction function:When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK).When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty.This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3065
- *
3066
- * @param type The type of the video source. See MediaSourceType .
3067
- *
3068
- * @param enabled Whether to enable video noise reduction:true: Enable video noise reduction.false: (Default) Disable video noise reduction.
3009
+ * Sets the image enhancement options.
3010
+ * Enables or disables image enhancement, and sets the options.Call this method before calling enableVideo or startPreview [1/2] .This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3069
3011
  *
3070
- * @param options The video noise reduction options. See VideoDenoiserOptions .
3012
+ * @param enabled Whether to enable the image enhancement function:true: Enable the image enhancement function.false: (Default) Disable the image enhancement function.
3013
+ * @param options The image enhancement options. See BeautyOptions .
3014
+ * @param type The type of the video source, see MediaSourceType .
3071
3015
  *
3072
3016
  * @returns
3073
3017
  * 0: Success.< 0: Failure.
@@ -3079,14 +3023,12 @@ export abstract class IRtcEngine {
3079
3023
  ): number;
3080
3024
 
3081
3025
  /**
3082
- * Sets color enhancement.
3083
- * The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid.You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.Call this method after calling enableVideo .The color enhancement feature has certain performance requirements on devices. With color enhancement turned on, Agora recommends that you change the color enhancement level to one that consumes less performance or turn off color enhancement if your device is experiencing severe heat problems.Both this method and setExtensionProperty can enable color enhancement:When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK).When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty.This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3084
- *
3085
- * @param type The type of the video source. See MediaSourceType .
3086
- *
3087
- * @param enabled Whether to enable color enhancement:true Enable color enhancement.false: (Default) Disable color enhancement.
3026
+ * Sets the image enhancement options.
3027
+ * Enables or disables image enhancement, and sets the options.Call this method before calling enableVideo or startPreview [1/2] .This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3088
3028
  *
3089
- * @param options The color enhancement options. See ColorEnhanceOptions .
3029
+ * @param enabled Whether to enable the image enhancement function:true: Enable the image enhancement function.false: (Default) Disable the image enhancement function.
3030
+ * @param options The image enhancement options. See BeautyOptions .
3031
+ * @param type The type of the video source, see MediaSourceType .
3090
3032
  *
3091
3033
  * @returns
3092
3034
  * 0: Success.< 0: Failure.
@@ -3102,11 +3044,8 @@ export abstract class IRtcEngine {
3102
3044
  * The virtual background function allows you to replace the original background image of the local user or to blur the background. After successfully enabling the virtual background function, all users in the channel can see the customized background.Call this method before calling enableVideo or startPreview [1/2] .This feature requires high performance devices. Agora recommends that you implement it on devices equipped with the following chips:Devices with an i5 CPU and betterAgora recommends that you use this feature in scenarios that meet the following conditions:A high-definition camera device is used, and the environment is uniformly lit.There are few objects in the captured video. Portraits are half-length and unobstructed. Ensure that the background is a solid color that is different from the color of the user's clothing.This method relies on the virtual background dynamic library libagora_segmentation_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3103
3045
  *
3104
3046
  * @param enabled Whether to enable virtual background:true: Enable virtual background.false: Disable virtual background.
3105
- *
3106
3047
  * @param backgroundSource The custom background image. See VirtualBackgroundSource . To adapt the resolution of the custom background image to that of the video captured by the SDK, the SDK scales and crops the custom background image while ensuring that the content of the custom background image is not distorted.
3107
- *
3108
3048
  * @param segproperty Processing properties for background images. See SegmentationProperty .
3109
- *
3110
3049
  * @param type The type of the video source. See MediaSourceType .In this method, this parameter supports only the following two settings:The default value is PrimaryCameraSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
3111
3050
  *
3112
3051
  * @returns
@@ -3121,7 +3060,7 @@ export abstract class IRtcEngine {
3121
3060
 
3122
3061
  /**
3123
3062
  * Initializes the video view of a remote user.
3124
- * This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view.You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback.To unbind the remote user from the view, set the view parameter to NULL.Once the remote user leaves the channel, the SDK unbinds the remote user.To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderMode method.If you use the Agora recording function, the recording client joins the channel as a placeholder client, triggering the onUserJoined callback. Do not bind the placeholder client to the app view because the placeholder client does not send any video streams. If your app does not recognize the placeholder client, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback.
3063
+ * This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view.You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback.To unbind the remote user from the view, set the view parameter to NULL.Once the remote user leaves the channel, the SDK unbinds the remote user.If you use the Agora recording function, the recording client joins the channel as a placeholder client, triggering the onUserJoined callback. Do not bind the placeholder client to the app view because the placeholder client does not send any video streams. If your app does not recognize the placeholder client, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback.
3125
3064
  *
3126
3065
  * @param canvas The remote video view and settings. See VideoCanvas .
3127
3066
  *
@@ -3132,7 +3071,7 @@ export abstract class IRtcEngine {
3132
3071
 
3133
3072
  /**
3134
3073
  * Initializes the local video view.
3135
- * This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view and to set the rendering and mirror modes of the video view.After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL.You can call this method either before or after joining a channel.To update the rendering or mirror mode of the local video view during a call, use the setLocalRenderMode method.
3074
+ * This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view and to set the rendering and mirror modes of the video view.After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL.You can call this method either before or after joining a channel.
3136
3075
  *
3137
3076
  * @param canvas The local video view and settings. See VideoCanvas .
3138
3077
  *
@@ -3141,9 +3080,14 @@ export abstract class IRtcEngine {
3141
3080
  */
3142
3081
  abstract setupLocalVideo(canvas: VideoCanvas): number;
3143
3082
 
3083
+ /**
3084
+ * @ignore
3085
+ */
3086
+ abstract setVideoScenario(scenarioType: VideoApplicationScenarioType): number;
3087
+
3144
3088
  /**
3145
3089
  * Enables the audio module.
3146
- * The audio mode is enabled by default.This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.This method enables the audio module and takes some time to take effect. Agora recommends using the following API methods to control the audio module separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams.
3090
+ * The audio mode is enabled by default.This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.This method enables the whole audio module and thus might take a while to take effect. Agora recommends using the following APIs to control the audio module separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams.
3147
3091
  *
3148
3092
  * @returns
3149
3093
  * 0: Success.< 0: Failure.
@@ -3164,7 +3108,6 @@ export abstract class IRtcEngine {
3164
3108
  * You can call this method either before or after joining a channel.In scenarios requiring high-quality audio, such as online music tutoring, Agora recommends you set profile as AudioProfileMusicHighQuality(4)and scenario as AudioScenarioGameStreaming(3).
3165
3109
  *
3166
3110
  * @param profile The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType .
3167
- *
3168
3111
  * @param scenario The audio scenarios. See AudioScenarioType . Under different audio scenarios, the device uses different volume types.
3169
3112
  *
3170
3113
  * @returns
@@ -3185,8 +3128,8 @@ export abstract class IRtcEngine {
3185
3128
  abstract setAudioScenario(scenario: AudioScenarioType): number;
3186
3129
 
3187
3130
  /**
3188
- * Enables/Disables the local audio capture.
3189
- * The audio function is enabled by default. This method disables or re-enables the local audio function to stop or restart local audio capturing.This method does not affect receiving or playing the remote audio streams, and enableLocalAudio (false) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel.Once the local audio function is disabled or re-enabled, the SDK triggers the onLocalAudioStateChanged callback, which reports LocalAudioStreamStateStopped (0) or LocalAudioStreamStateRecording (1).This method is different from the muteLocalAudioStream method:enableLocalAudio: Disables/Re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback.muteLocalAudioStream: Sends/Stops sending the local audio streams.You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel.
3131
+ * Enables or disables the local audio capture.
3132
+ * The audio function is enabled by default when users joining a channel. This method disables or re-enables the local audio function to stop or restart local audio capturing.This method does not affect receiving or playing the remote audio streams, and enableLocalAudio (false) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel.Once the local audio function is disabled or re-enabled, the SDK triggers the onLocalAudioStateChanged callback, which reports LocalAudioStreamStateStopped(0) or LocalAudioStreamStateRecording(1).The difference between this method and muteLocalAudioStream are as follow:enableLocalAudio: Disables or re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback.muteLocalAudioStream: Sends or stops sending the local audio streams.You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel.
3190
3133
  *
3191
3134
  * @param enabled true: (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone).false: Disable the local audio function, that is, to stop local audio capturing.
3192
3135
  *
@@ -3199,7 +3142,7 @@ export abstract class IRtcEngine {
3199
3142
  * Stops or resumes publishing the local audio stream.
3200
3143
  * This method does not affect any ongoing audio recording, because it does not disable the audio capture device.
3201
3144
  *
3202
- * @param mute Whether to stop publishing the local audio stream.true: Stop publishing the local audio stream.false: (Default) Resumes publishing the local audio stream.
3145
+ * @param mute Whether to stop publishing the local audio stream:true: Stops publishing the local audio stream.false: (Default) Resumes publishing the local audio stream.
3203
3146
  *
3204
3147
  * @returns
3205
3148
  * 0: Success. < 0: Failure.
@@ -3208,9 +3151,9 @@ export abstract class IRtcEngine {
3208
3151
 
3209
3152
  /**
3210
3153
  * Stops or resumes subscribing to the audio streams of all remote users.
3211
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can call joinChannel [2/2] and set autoSubscribeAudio as false.
3154
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel .
3212
3155
  *
3213
- * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
3156
+ * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default.
3214
3157
  *
3215
3158
  * @returns
3216
3159
  * 0: Success. < 0: Failure.
@@ -3218,18 +3161,22 @@ export abstract class IRtcEngine {
3218
3161
  abstract muteAllRemoteAudioStreams(mute: boolean): number;
3219
3162
 
3220
3163
  /**
3221
- * @ignore
3164
+ * Stops or resumes subscribing to the audio streams of all remote users.
3165
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joinChannel .When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in IRtcEngine .After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect.
3166
+ *
3167
+ * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: Subscribe to the audio streams of all remote users.
3168
+ *
3169
+ * @returns
3170
+ * 0: Success.< 0: Failure.
3222
3171
  */
3223
3172
  abstract setDefaultMuteAllRemoteAudioStreams(mute: boolean): number;
3224
3173
 
3225
3174
  /**
3226
- * Cancels or resumes subscribing to the specified remote user's audio stream.
3175
+ * Stops or resumes subscribing to the audio stream of a specified user.
3227
3176
  * Call this method after joining a channel.
3228
3177
  *
3229
3178
  * @param uid The user ID of the specified user.
3230
- *
3231
- * @param mute Whether to stop subscribing to the audio stream of the specified user.
3232
- * true: Unsubscribe from the specified user's audio stream.false: (Default) Subscribes to the specified user's audio stream.
3179
+ * @param mute Whether to subscribe to the specified remote user's audio stream.true: Stop subscribing to the audio stream of the specified user.false: (Default) Subscribe to the audio stream of the specified user.
3233
3180
  *
3234
3181
  * @returns
3235
3182
  * 0: Success. < 0: Failure.
@@ -3249,9 +3196,9 @@ export abstract class IRtcEngine {
3249
3196
 
3250
3197
  /**
3251
3198
  * Enables/Disables the local video capture.
3252
- * This method disables or re-enables the local video capturer, and does not affect receiving the remote video stream.After calling enableVideo , the local video capturer is enabled by default. You can call enableLocalVideo (false) to disable the local video capturer. If you want to re-enable the local video, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
3199
+ * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
3253
3200
  *
3254
- * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disables the local video capture. Once the local video is disabled, the remote users can no longer receive the video stream of this user, while this user can still receive the video streams of the other remote users. When set to false, this method does not require a local camera.
3201
+ * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
3255
3202
  *
3256
3203
  * @returns
3257
3204
  * 0: Success.< 0: Failure.
@@ -3260,7 +3207,7 @@ export abstract class IRtcEngine {
3260
3207
 
3261
3208
  /**
3262
3209
  * Stops or resumes subscribing to the video streams of all remote users.
3263
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel [2/2] and set autoSubscribeVideo as false.
3210
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false.
3264
3211
  *
3265
3212
  * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
3266
3213
  *
@@ -3270,17 +3217,22 @@ export abstract class IRtcEngine {
3270
3217
  abstract muteAllRemoteVideoStreams(mute: boolean): number;
3271
3218
 
3272
3219
  /**
3273
- * @ignore
3220
+ * Stops or resumes subscribing to the audio streams of all remote users.
3221
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joinChannel .When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in IRtcEngine .After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect.
3222
+ *
3223
+ * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: Subscribe to the audio streams of all remote users.
3224
+ *
3225
+ * @returns
3226
+ * 0: Success.< 0: Failure.
3274
3227
  */
3275
3228
  abstract setDefaultMuteAllRemoteVideoStreams(mute: boolean): number;
3276
3229
 
3277
3230
  /**
3278
- * Cancels or resumes subscribing to the specified remote user's video stream.
3231
+ * Stops or resumes subscribing to the video stream of a specified user.
3279
3232
  * Call this method after joining a channel.
3280
3233
  *
3281
3234
  * @param uid The user ID of the specified user.
3282
- *
3283
- * @param mute Whether to subscribe to the specified remote user's video stream.true: Unsubscribe from the specified user's video stream.false: (Default) Subscribes to the specified user's video stream.
3235
+ * @param mute Whether to subscribe to the specified remote user's video stream.true: Stop subscribing to the video streams of the specified user.false: (Default) Subscribe to the video stream of the specified user.
3284
3236
  *
3285
3237
  * @returns
3286
3238
  * 0: Success.< 0: Failure.
@@ -3292,7 +3244,6 @@ export abstract class IRtcEngine {
3292
3244
  * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate.By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request.The result of this method returns in the onApiCallExecuted callback.You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType , the setting of setRemoteVideoStreamType takes effect.
3293
3245
  *
3294
3246
  * @param uid The user ID.
3295
- *
3296
3247
  * @param streamType The video stream type: VideoStreamType .
3297
3248
  *
3298
3249
  * @returns
@@ -3305,10 +3256,9 @@ export abstract class IRtcEngine {
3305
3256
 
3306
3257
  /**
3307
3258
  * Options for subscribing to remote video streams.
3308
- * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user.If you only register one IVideoFrameObserver object, the SDK subscribes to the raw video data and encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false).If you only register one IVideoEncodedFrameObserver object, the SDK only subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to true).If you register one IVideoFrameObserver object and one IVideoEncodedFrameObserver object successively, the SDK subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false).If you call this method first with the options parameter set, and then register one IVideoFrameObserver or IVideoEncodedFrameObserver object, you need to call this method again and set the options parameter as described in the above two items to get the desired results.Agora recommends the following steps:Set autoSubscribeVideo to false when calling joinChannel [2/2] to join a channel.Call this method after receiving the onUserJoined callback to set the subscription options for the specified remote user's video stream.Call the muteRemoteVideoStream method to resume subscribing to the video stream of the specified remote user. If you set encodedFrameOnly to true in the previous step, the SDK triggers the onEncodedVideoFrameReceived callback locally to report the received encoded video frame information.
3259
+ * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user.If you only register one IVideoFrameObserver object, the SDK subscribes to the raw video data and encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false).If you only register one IVideoEncodedFrameObserver object, the SDK only subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to true).If you register one IVideoFrameObserver object and one IVideoEncodedFrameObserver object successively, the SDK subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false).If you call this method first with the options parameter set, and then register one IVideoFrameObserver or IVideoEncodedFrameObserver object, you need to call this method again and set the options parameter as described in the above two items to get the desired results.Agora recommends the following steps:Set autoSubscribeVideo to false when calling joinChannel to join a channel.Call this method after receiving the onUserJoined callback to set the subscription options for the specified remote user's video stream.Call the muteRemoteVideoStream method to resume subscribing to the video stream of the specified remote user. If you set encodedFrameOnly to true in the previous step, the SDK triggers the onEncodedVideoFrameReceived callback locally to report the received encoded video frame information.
3309
3260
  *
3310
3261
  * @param uid The user ID of the remote user.
3311
- *
3312
3262
  * @param options The video subscription options. See VideoSubscriptionOptions .
3313
3263
  *
3314
3264
  * @returns
@@ -3321,8 +3271,7 @@ export abstract class IRtcEngine {
3321
3271
 
3322
3272
  /**
3323
3273
  * Sets the default stream type of subscrption for remote video streams.
3324
- * The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request.
3325
- * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate.By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.The result of this method returns in the onApiCallExecuted callback.Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel.If you call both this method and setRemoteVideoStreamType , the SDK applies the settings in the setRemoteVideoStreamType method.
3274
+ * The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request.Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate.By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.The result of this method returns in the onApiCallExecuted callback.Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel.If you call both this method and setRemoteVideoStreamType , the SDK applies the settings in the setRemoteVideoStreamType method.
3326
3275
  *
3327
3276
  * @param streamType The default video-stream type. See VideoStreamType .
3328
3277
  *
@@ -3336,7 +3285,6 @@ export abstract class IRtcEngine {
3336
3285
  * You can call this method to specify the audio streams of a user that you do not want to subscribe to.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions .Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3337
3286
  *
3338
3287
  * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
3339
- *
3340
3288
  * @param uidNumber The number of users in the user ID list.
3341
3289
  *
3342
3290
  * @returns
@@ -3352,7 +3300,6 @@ export abstract class IRtcEngine {
3352
3300
  * You can call this method to specify the audio streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions .Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
3353
3301
  *
3354
3302
  * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
3355
- *
3356
3303
  * @param uidNumber The number of users in the user ID list.
3357
3304
  *
3358
3305
  * @returns
@@ -3364,13 +3311,12 @@ export abstract class IRtcEngine {
3364
3311
  ): number;
3365
3312
 
3366
3313
  /**
3367
- * Set the blocklist of subscriptions for video streams.
3368
- * You can call this method to specify the video streams of a user that you do not want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
3314
+ * Set the blocklist of subscriptions for audio streams.
3315
+ * You can call this method to specify the audio streams of a user that you do not want to subscribe to.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions .Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3369
3316
  *
3317
+ * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
3370
3318
  * @param uidNumber The number of users in the user ID list.
3371
3319
  *
3372
- * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
3373
- *
3374
3320
  * @returns
3375
3321
  * 0: Success.< 0: Failure.
3376
3322
  */
@@ -3380,16 +3326,12 @@ export abstract class IRtcEngine {
3380
3326
  ): number;
3381
3327
 
3382
3328
  /**
3383
- * Set the allowlist of subscriptions for video streams.
3384
- * You can call this method to specify the video streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3385
- * Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
3386
- * You can call this method either before or after joining a channel.
3387
- * The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
3329
+ * Set the blocklist of subscriptions for audio streams.
3330
+ * You can call this method to specify the audio streams of a user that you do not want to subscribe to.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions .Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3388
3331
  *
3332
+ * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
3389
3333
  * @param uidNumber The number of users in the user ID list.
3390
3334
  *
3391
- * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
3392
- *
3393
3335
  * @returns
3394
3336
  * 0: Success.< 0: Failure.
3395
3337
  */
@@ -3400,13 +3342,11 @@ export abstract class IRtcEngine {
3400
3342
 
3401
3343
  /**
3402
3344
  * Enables the reporting of users' volume indication.
3403
- * This method enables the SDK to regularly report the volume information of the local user who sends a stream and remote users (up to three) whose instantaneous volumes are the highest to the app. Once you call this method and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method.You can call this method either before or after joining a channel.
3404
- *
3405
- * @param interval Sets the time interval between two consecutive volume indications:≤ 0: Disables the volume indication.> 0: Time interval (ms) between two consecutive volume indications. You need to set this parameter to an integer multiple of 200. If the value is lower than 200, the SDK automatically adjusts the value to 200.
3406
- *
3407
- * @param smooth The smoothing factor sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator.
3345
+ * This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. Once you call this method and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method.You can call this method either before or after joining a channel.
3408
3346
  *
3409
- * @param reportVad true: Enable the voice activity detection of the local user. Once it is enabled,the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.false: (Default) Disable the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
3347
+ * @param interval Sets the time interval between two consecutive volume indications:≤ 0: Disables the volume indication.> 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
3348
+ * @param smooth The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator.
3349
+ * @param reportVad true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
3410
3350
  *
3411
3351
  * @returns
3412
3352
  * 0: Success.< 0: Failure.
@@ -3418,10 +3358,10 @@ export abstract class IRtcEngine {
3418
3358
  ): number;
3419
3359
 
3420
3360
  /**
3421
- * Starts the audio recording on the client.
3422
- * The Agora SDK allows recording during a call. After successfully calling this method, you can record the audio of all the users in the channel and get an audio recording file. Supported formats of the recording file are as follows:WAV: High-fidelity files with typically larger file sizes. For example, the size of a WAV file with a sample rate of 32,000 Hz and a recording duration of 10 minutes is around 73 MB.AAC: Low-fidelity files with typically smaller file sizes. For example, if the sample rate is 32,000 Hz and the recording quality is AudioRecordingQualityMedium, the file size for a 10-minute recording is approximately 2 MB.Once the user leaves the channel, the recording automatically stops.Call this method after joining a channel.
3361
+ * Starts audio recording on the client and sets recording configurations.
3362
+ * The Agora SDK allows recording during a call. After successfully calling this method, you can record the audio of users in the channel and get an audio recording file. Supported formats of the recording file are as follows:WAV: High-fidelity files with typically larger file sizes. For example, if the sample rate is 32,000 Hz, the file size for 10-minute recording is approximately 73 MB.AAC: Low-fidelity files with typically smaller file sizes. For example, if the sample rate is 32,000 Hz and the recording quality is AudioRecordingQualityMedium, the file size for 10-minute recording is approximately 2 MB.Once the user leaves the channel, the recording automatically stops.Call this method after joining a channel.
3423
3363
  *
3424
- * @param config Recording configuration. See AudioRecordingConfiguration .
3364
+ * @param config Recording configurations. See AudioRecordingConfiguration .
3425
3365
  *
3426
3366
  * @returns
3427
3367
  * 0: Success.< 0: Failure.
@@ -3430,9 +3370,7 @@ export abstract class IRtcEngine {
3430
3370
 
3431
3371
  /**
3432
3372
  * Registers an encoded audio observer.
3433
- * Call this method after joining a channel.You can call this method or the startAudioRecording method to set the audio content and audio quality. Agora does not recommend using this method and startAudioRecording at the same time; otherwise, only the method called later takes effect.
3434
- *
3435
- * @param config
3373
+ * Call this method after joining a channel.You can call this method or startAudioRecording to set the recording type and quality of audio files, but Agora does not recommend using this method and startAudioRecording at the same time. Only the method called later will take effect.
3436
3374
  *
3437
3375
  * @returns
3438
3376
  * One IAudioEncodedFrameObserver object.
@@ -3461,27 +3399,41 @@ export abstract class IRtcEngine {
3461
3399
  /**
3462
3400
  * Destroys the media player instance.
3463
3401
  *
3464
- * @param mediaPlayer IMediaPlayer object.
3402
+ * @param mediaPlayer One IMediaPlayer object.
3465
3403
  *
3466
3404
  * @returns
3467
- * ≥ 0: Success. Returns the ID of the media player instance.< 0: Failure.
3405
+ * ≥ 0: Success. Returns the ID of media player instance.< 0: Failure.
3468
3406
  */
3469
3407
  abstract destroyMediaPlayer(mediaPlayer: IMediaPlayer): number;
3470
3408
 
3409
+ /**
3410
+ * Occurs when the uplink network information changes.
3411
+ * The SDK triggers this callback when the uplink network information changes.This callback only applies to scenarios where you push externally encoded video data in H.264 format to the SDK.
3412
+ *
3413
+ * @param info The uplink network information. See UplinkNetworkInfo .
3414
+ */
3415
+ abstract createMediaRecorder(info: RecorderStreamInfo): IMediaRecorder;
3416
+
3417
+ /**
3418
+ * @ignore
3419
+ */
3420
+ abstract destroyMediaRecorder(mediaRecorder: IMediaRecorder): number;
3421
+
3471
3422
  /**
3472
3423
  * Starts playing the music file.
3473
- * This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged (AudioMixingStatePlaying) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged(AudioMixingStateStopped) callback on the local client.For the audio file formats supported by this method, see What formats of audio files the Agora RTC SDK support.You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms.If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports the warn code 701.
3424
+ * This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged (AudioMixingStatePlaying) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged(AudioMixingStateStopped) callback on the local client.For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
3425
+ * You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms.If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports 701.
3474
3426
  *
3475
- * @param filePath File path:Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3427
+ * @param filePath File path:
3428
+ * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.
3429
+ * macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3476
3430
  *
3477
3431
  * @param loopback Whether to only play music files on the local client:true: Only play music files on the local client so that only the local user can hear the music.false: Publish music files to remote clients so that both the local user and remote users can hear the music.
3478
- *
3479
3432
  * @param cycle The number of times the music file plays.≥ 0: The number of playback times. For example, 0 means that the SDK does not play the music file while 1 means that the SDK plays once.-1: Play the audio file in an infinite loop.
3480
- *
3481
3433
  * @param startPos The playback position (ms) of the music file.
3482
3434
  *
3483
3435
  * @returns
3484
- * 0: Success.< 0: Failure.
3436
+ * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-3: The SDK is not ready.The audio module is disabled.The program is not complete.The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.
3485
3437
  */
3486
3438
  abstract startAudioMixing(
3487
3439
  filePath: string,
@@ -3500,7 +3452,7 @@ export abstract class IRtcEngine {
3500
3452
  abstract stopAudioMixing(): number;
3501
3453
 
3502
3454
  /**
3503
- * Pauses playing the music file.
3455
+ * Pauses playing and mixing the music file.
3504
3456
  * Call this method after joining a channel.
3505
3457
  *
3506
3458
  * @returns
@@ -3518,13 +3470,7 @@ export abstract class IRtcEngine {
3518
3470
  abstract resumeAudioMixing(): number;
3519
3471
 
3520
3472
  /**
3521
- * Selects the audio track used during playback.
3522
- * After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language.For the supported formats of audio files, see .You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
3523
- *
3524
- * @param index The audio track you want to specify. The value range is [0, getAudioTrackCount ()].
3525
- *
3526
- * @returns
3527
- * 0: Success.< 0: Failure.
3473
+ * @ignore
3528
3474
  */
3529
3475
  abstract selectAudioTrack(index: number): number;
3530
3476
 
@@ -3539,7 +3485,7 @@ export abstract class IRtcEngine {
3539
3485
 
3540
3486
  /**
3541
3487
  * Adjusts the volume during audio mixing.
3542
- * This method adjusts the audio mixing volume on both the local client and remote clients.Call this method after the startAudioMixing method.
3488
+ * This method adjusts the audio mixing volume on both the local client and remote clients.Call this method after startAudioMixing .
3543
3489
  *
3544
3490
  * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
3545
3491
  *
@@ -3550,7 +3496,7 @@ export abstract class IRtcEngine {
3550
3496
 
3551
3497
  /**
3552
3498
  * Adjusts the volume of audio mixing for publishing.
3553
- * This method adjusts the audio mixing volume on the remote clients.Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged(AudioMixingStatePlaying) callback.
3499
+ * This method adjusts the volume of audio mixing for publishing (sending to other users).Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged(AudioMixingStatePlaying) callback.
3554
3500
  *
3555
3501
  * @param volume The volume of audio mixing for local playback. The value ranges between 0 and 100 (default). 100 represents the original volume.
3556
3502
  *
@@ -3608,7 +3554,7 @@ export abstract class IRtcEngine {
3608
3554
 
3609
3555
  /**
3610
3556
  * Sets the audio mixing position.
3611
- * Call this method to set the playback position of the music file to a different starting position, rather than playing the file from the beginning.You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged(AudioMixingStatePlaying) callback.
3557
+ * Call this method to set the playback position of the music file to a different starting position (the default plays from the beginning).You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged(AudioMixingStatePlaying) callback.
3612
3558
  *
3613
3559
  * @param pos Integer. The playback position (ms).
3614
3560
  *
@@ -3641,7 +3587,7 @@ export abstract class IRtcEngine {
3641
3587
 
3642
3588
  /**
3643
3589
  * Retrieves the volume of the audio effects.
3644
- * The volume range is [0,100]. The default value is 100, the original volume.Call this method after the playEffect method.
3590
+ * The volume is an integer ranging from 0 to 100. The default value is 100, which means the original volume.Call this method after playEffect .
3645
3591
  *
3646
3592
  * @returns
3647
3593
  * Volume of the audio effects, if this method call succeeds.< 0: Failure.
@@ -3650,7 +3596,7 @@ export abstract class IRtcEngine {
3650
3596
 
3651
3597
  /**
3652
3598
  * Sets the volume of the audio effects.
3653
- * Call this method after the playEffect method.
3599
+ * Call this method after playEffect .
3654
3600
  *
3655
3601
  * @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume.
3656
3602
  *
@@ -3661,12 +3607,10 @@ export abstract class IRtcEngine {
3661
3607
 
3662
3608
  /**
3663
3609
  * Preloads a specified audio effect file into the memory.
3664
- * To ensure smooth communication, limit the size of the audio effect file. Agora recommends using this method to preload the audio effect before calling joinChannel [2/2].This method does not support online audio effect files.For the audio file formats supported by this method, see What formats of audio files the Agora RTC SDK support.
3610
+ * To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel.This method does not support online audio effect files.For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
3665
3611
  *
3666
3612
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3667
- *
3668
3613
  * @param filePath File path:Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3669
- *
3670
3614
  * @param startPos The playback position (ms) of the audio effect file.
3671
3615
  *
3672
3616
  * @returns
@@ -3683,19 +3627,12 @@ export abstract class IRtcEngine {
3683
3627
  * If you use this method to play an online audio effect file, Agora recommends that you cache the online audio effect file to your local device, call preloadEffect to preload the cached audio effect file into memory, and then call this method to play the audio effect. Otherwise, you might encounter playback failures or no sound during playback due to loading timeouts or failures.To play multiple audio effect files at the same time, call this method multiple times with different soundId and filePath. To achieve the optimal user experience, Agora recommends that do not playing more than three audio files at the same time. After the playback of an audio effect file completes, the SDK triggers the onAudioEffectFinished callback.
3684
3628
  *
3685
3629
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.If you have preloaded an audio effect into memory by calling preloadEffect , ensure that the value of this parameter is the same as that of soundId in preloadEffect.
3686
- *
3687
3630
  * @param filePath The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example, C:\music\audio.mp4. Supported audio formats include MP3, AAC, M4A, MP4, WAV, and 3GP. See supported audio formats.If you have preloaded an audio effect into memory by calling preloadEffect , ensure that the value of this parameter is the same as that of filePath in preloadEffect.
3688
- *
3689
- * @param loopCount The number of times the audio effect loops.≥ 0: The number of playback times. For example, 1 means looping one time, which means playing the audio effect two times in total.-1: Play the audio effect in an infinite loop.
3690
- *
3631
+ * @param loopCount The number of times the audio effect loops.≥ 0: The number of playback times. For example, 1 means looping one time, which means playing the audio effect two times in total.-1: Play the audio file in an infinite loop.
3691
3632
  * @param pitch The pitch of the audio effect. The value range is 0.5 to 2.0. The default value is 1.0, which means the original pitch. The lower the value, the lower the pitch.
3692
- *
3693
3633
  * @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:-1.0: The audio effect is heard on the left of the user.0.0: The audio effect is heard in front of the user.1.0: The audio effect is heard on the right of the user.
3694
- *
3695
3634
  * @param gain The volume of the audio effect. The value range is 0.0 to 100.0. The default value is 100.0, which means the original volume. The smaller the value, the lower the volume.
3696
- *
3697
3635
  * @param publish Whether to publish the audio effect to the remote users:true: Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect.false: Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3698
- *
3699
3636
  * @param startPos The playback position (ms) of the audio effect file.
3700
3637
  *
3701
3638
  * @returns
@@ -3713,18 +3650,17 @@ export abstract class IRtcEngine {
3713
3650
  ): number;
3714
3651
 
3715
3652
  /**
3716
- * Plays all audio effects.
3653
+ * Plays all audio effect files.
3717
3654
  * After calling preloadEffect multiple times to preload multiple audio effects into the memory, you can call this method to play all the specified audio effects for all users in the channel.
3718
3655
  *
3719
- * @param loopCount The number of times the audio effect loops:-1: Play the audio effect in an indefinite loop until you call stopEffect or stopAllEffects .0: Play the audio effect once.1: Play the audio effect twice.
3720
- *
3656
+ * @param loopCount The number of times the audio effect loops:-1: Play the audio effect files in an indefinite loop until you call stopEffect or stopAllEffects .0: Play the audio effect once.1: Play the audio effect twice.
3721
3657
  * @param pitch The pitch of the audio effect. The value ranges between 0.5 and 2.0. The default value is 1.0 (original pitch). The lower the value, the lower the pitch.
3722
- *
3723
3658
  * @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:-1.0: The audio effect shows on the left.0: The audio effect shows ahead.1.0: The audio effect shows on the right.
3724
- *
3725
3659
  * @param gain The volume of the audio effect. The value range is [0, 100]. The default value is 100 (original volume). The smaller the value, the lower the volume.
3660
+ * @param publish Whether to publish the audio effect to the remote users:true: Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect.false: (Default) Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3726
3661
  *
3727
- * @param publish Whether to publish the audio effect to the remote users:true: Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect.false: Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3662
+ * @returns
3663
+ * 0: Success.< 0: Failure.
3728
3664
  */
3729
3665
  abstract playAllEffects(
3730
3666
  loopCount: number,
@@ -3735,20 +3671,19 @@ export abstract class IRtcEngine {
3735
3671
  ): number;
3736
3672
 
3737
3673
  /**
3738
- * Gets the volume of a specified audio effect.
3674
+ * Gets the volume of a specified audio effect file.
3739
3675
  *
3740
- * @param soundId The ID of the audio effect.
3676
+ * @param soundId The ID of the audio effect file.
3741
3677
  *
3742
3678
  * @returns
3743
- * The volume of the specified audio effect, if the method call succeeds. The value range is [0,100]. 100 represents the original volume. < 0: Failure.
3679
+ * 0: Returns the volume of the specified audio effect, if the method call is successful. The value ranges between 0 and 100. 100 represents the original volume. < 0: Failure.
3744
3680
  */
3745
3681
  abstract getVolumeOfEffect(soundId: number): number;
3746
3682
 
3747
3683
  /**
3748
3684
  * Sets the volume of a specified audio effect.
3749
3685
  *
3750
- * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3751
- *
3686
+ * @param soundId The ID of the audio effect. The ID of each audio effect file is unique.
3752
3687
  * @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume.
3753
3688
  *
3754
3689
  * @returns
@@ -3757,7 +3692,7 @@ export abstract class IRtcEngine {
3757
3692
  abstract setVolumeOfEffect(soundId: number, volume: number): number;
3758
3693
 
3759
3694
  /**
3760
- * Pauses playing a specified audio effect file.
3695
+ * Pauses a specified audio effect file.
3761
3696
  *
3762
3697
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3763
3698
  *
@@ -3767,7 +3702,7 @@ export abstract class IRtcEngine {
3767
3702
  abstract pauseEffect(soundId: number): number;
3768
3703
 
3769
3704
  /**
3770
- * Pauses playing all audio effect files.
3705
+ * Pauses all audio effects.
3771
3706
  *
3772
3707
  * @returns
3773
3708
  * 0: Success.< 0: Failure.
@@ -3785,7 +3720,7 @@ export abstract class IRtcEngine {
3785
3720
  abstract resumeEffect(soundId: number): number;
3786
3721
 
3787
3722
  /**
3788
- * Resumes playing all audio effects.
3723
+ * Resumes playing all audio effect files.
3789
3724
  *
3790
3725
  * @returns
3791
3726
  * 0: Success.< 0: Failure.
@@ -3813,7 +3748,7 @@ export abstract class IRtcEngine {
3813
3748
  /**
3814
3749
  * Releases a specified preloaded audio effect from the memory.
3815
3750
  *
3816
- * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3751
+ * @param soundId The ID of the audio effect. Each audio effect has a unique ID.
3817
3752
  *
3818
3753
  * @returns
3819
3754
  * 0: Success.< 0: Failure.
@@ -3844,7 +3779,6 @@ export abstract class IRtcEngine {
3844
3779
  * After a successful setting, the local audio effect file starts playing at the specified position.Call this method after playEffect.
3845
3780
  *
3846
3781
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3847
- *
3848
3782
  * @param pos The playback position (ms) of the audio effect file.
3849
3783
  *
3850
3784
  * @returns
@@ -3864,7 +3798,7 @@ export abstract class IRtcEngine {
3864
3798
  abstract getEffectCurrentPosition(soundId: number): number;
3865
3799
 
3866
3800
  /**
3867
- * Enables/Disables stereo panning for remote users.
3801
+ * Enables or disables stereo panning for remote users.
3868
3802
  * Ensure that you call this method before joining a channel to enable stereo panning for remote users so that the local user can track the position of a remote user by calling setRemoteVoicePosition.
3869
3803
  *
3870
3804
  * @param enabled Whether to enable stereo panning for remote users:true: Enable stereo panning.false: Disable stereo panning.
@@ -3879,9 +3813,7 @@ export abstract class IRtcEngine {
3879
3813
  * This method sets the 2D position and volume of a remote user, so that the local user can easily hear and identify the remote user's position.When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games.For this method to work, enable stereo panning for remote users by calling the enableSoundPositionIndication method before joining a channel.For the best voice positioning, Agora recommends using a wired headset.Call this method after joining a channel.
3880
3814
  *
3881
3815
  * @param uid The user ID of the remote user.
3882
- *
3883
3816
  * @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:0.0: (Default) The remote voice comes from the front.-1.0: The remote voice comes from the left.1.0: The remote voice comes from the right.
3884
- *
3885
3817
  * @param gain The volume of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original volume of the remote user). The smaller the value, the lower the volume.
3886
3818
  *
3887
3819
  * @returns
@@ -3908,9 +3840,7 @@ export abstract class IRtcEngine {
3908
3840
  * Sets the spatial audio effect parameters of the remote user.
3909
3841
  * Call this method after enableSpatialAudio . After successfully setting the spatial audio effect parameters of the remote user, the local user can hear the remote user with a sense of space.
3910
3842
  *
3911
- * @param uid The user ID. This parameter must be the same as the user ID passed in when the user joined the channel.
3912
- *
3913
- * @param params The spatial audio parameters. See SpatialAudioParams for details.
3843
+ * @param uid The user ID.
3914
3844
  *
3915
3845
  * @returns
3916
3846
  * 0: Success.< 0: Failure.
@@ -3955,13 +3885,11 @@ export abstract class IRtcEngine {
3955
3885
 
3956
3886
  /**
3957
3887
  * Sets parameters for SDK preset audio effects.
3958
- * Call this method to set the following parameters for the local user who sends an audio stream:3D voice effect: Sets the cycle period of the 3D voice effect.Pitch correction effect: Sets the basic mode and tonic pitch of the pitch correction effect. Different songs have different modes and tonic pitches. Agora recommends bounding this method with interface elements to enable users to adjust the pitch correction interactively.After setting the audio parameters, all users in the channel can hear the effect.You can call this method either before or after joining a channel.To get better audio effect quality, Agora recommends calling and setting scenario in setAudioProfile as AudioScenarioGameStreaming(3) before calling this method.Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard(1) or AudioProfileIot(6), or the method does not take effect.This method works best with the human voice. Agora does not recommend using this method for audio containing music.After calling setAudioEffectParameters, Agora recommends not calling the following methods, or the settings in setAudioEffectParameters are overridden: setAudioEffectPreset setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
3959
- *
3960
- * @param preset The options for SDK preset audio effects:RoomAcoustics3dVoice, 3D voice effect:You need to set the profile parameter in setAudioProfile to AudioProfileMusicStandardStereo(3) or AudioProfileMusicHighQualityStereo(5) before setting this enumerator; otherwise, the enumerator setting does not take effect.If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect.PitchCorrection; pitch correction effect: To achieve better audio effect quality, Agora recommends setting the profile parameter in setAudioProfile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) before setting this enumerator.
3888
+ * Call this method to set the following parameters for the local user who sends an audio stream:3D voice effect: Sets the cycle period of the 3D voice effect.Pitch correction effect: Sets the basic mode and tonic pitch of the pitch correction effect. Different songs have different modes and tonic pitches. Agora recommends bounding this method with interface elements to enable users to adjust the pitch correction interactively.After setting the audio parameters, all users in the channel can hear the effect.You can call this method either before or after joining a channel.To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming(3) before calling this method.Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard(1) or AudioProfileIot(6), or the method does not take effect.This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.After calling setAudioEffectParameters, Agora does not recommend you to call the following methods, otherwise the effect set by setAudioEffectParameters will be overwritten: setAudioEffectPreset setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
3961
3889
  *
3962
- * @param param1 If you set preset to RoomAcoustics3dVoice, param1 indicates the cycle period of the 3D voice effect. The value range is [1,60], in seconds. The default value is 10, indicating that the voice moves around you every 10 seconds. If you set preset to PitchCorrection, param1 indicates the basic mode of the pitch correction effect:1: (Default) Natural major scale.2: Natural minor scale.3: Japanese pentatonic scale.
3963
- *
3964
- * @param param2 If you set preset to RoomAcoustics3dVoice, you need to set param2 to 0. If you set preset to PitchCorrection, param2 indicates the tonic pitch of the pitch correction effect:1: A2: A#3: B4: (Default) C5: C#6: D7: D#8: E9: F10: F#11: G12: G#
3890
+ * @param preset The options for SDK preset audio effects:RoomAcoustics3dVoice, 3D voice effect:Call setAudioProfile and set the profile parameter in to AudioProfileMusicStandardStereo(3) or AudioProfileMusicHighQualityStereo(5) before setting this enumerator; otherwise, the enumerator setting does not take effect.If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect.PitchCorrection, Pitch correction effect: To achieve better audio effect quality, Agora recommends setting the profile parameter in setAudioProfile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) before setting this enumerator.
3891
+ * @param param1 If you set preset to RoomAcoustics3dVoice, param1 sets the cycle period of the 3D voice effect. The value range is [1,60] and the unit is seconds. The default value is 10, indicating that the voice moves around you every 10 seconds.If you set preset to PitchCorrection, param1 indicates the basic mode of the pitch correction effect:1: (Default) Natural major scale.2: Natural minor scale.3: Japanese pentatonic scale.
3892
+ * @param param2 If you set preset to RoomAcoustics3dVoice , you need to set param2 to 0.If you set preset to PitchCorrection, param2 indicates the tonic pitch of the pitch correction effect:1: A2: A#3: B4: (Default) C5: C#6: D7: D#8: E9: F10: F#11: G12: G#
3965
3893
  *
3966
3894
  * @returns
3967
3895
  * 0: Success.< 0: Failure.
@@ -3974,12 +3902,10 @@ export abstract class IRtcEngine {
3974
3902
 
3975
3903
  /**
3976
3904
  * Sets parameters for the preset voice beautifier effects.
3977
- * Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream. After setting the audio parameters, all users in the channel can hear the effect.For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming(3) and profile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) before calling this method.You can call this method either before or after joining a channel.Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard(1)This method works best with the human voice. Agora does not recommend using this method for audio containing music.After calling setVoiceBeautifierParameters, Agora recommends not calling the following methods, because they can override settings in setVoiceBeautifierParameters: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceConversionPreset
3905
+ * Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream. After setting the audio parameters, all users in the channel can hear the effect.For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming(3) and profile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) before calling this method.You can call this method either before or after joining a channel.Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard(1) or AudioProfileIot(6), or the method does not take effect.This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.After calling setVoiceBeautifierParameters, Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierParameters will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceConversionPreset
3978
3906
  *
3979
3907
  * @param preset The option for the preset audio effect:SINGING_BEAUTIFIER: The singing beautifier effect.
3980
- *
3981
3908
  * @param param1 The gender characteristics options for the singing voice:1: A male-sounding voice.2: A female-sounding voice.
3982
- *
3983
3909
  * @param param2 The reverberation effect options for the singing voice:1: The reverberation effect sounds like singing in a small room.2: The reverberation effect sounds like singing in a large room.3: The reverberation effect sounds like singing in a hall.
3984
3910
  *
3985
3911
  * @returns
@@ -3992,7 +3918,15 @@ export abstract class IRtcEngine {
3992
3918
  ): number;
3993
3919
 
3994
3920
  /**
3995
- * @ignore
3921
+ * Sets parameters for the preset voice beautifier effects.
3922
+ * Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream. After setting the audio parameters, all users in the channel can hear the effect.For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming(3) and profile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) before calling this method.You can call this method either before or after joining a channel.Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard(1) or AudioProfileIot(6), or the method does not take effect.This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.After calling setVoiceBeautifierParameters, Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierParameters will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceConversionPreset
3923
+ *
3924
+ * @param preset The option for the preset audio effect:SINGING_BEAUTIFIER: The singing beautifier effect.
3925
+ * @param param1 The gender characteristics options for the singing voice:1: A male-sounding voice.2: A female-sounding voice.
3926
+ * @param param2 The reverberation effect options for the singing voice:1: The reverberation effect sounds like singing in a small room.2: The reverberation effect sounds like singing in a large room.3: The reverberation effect sounds like singing in a hall.
3927
+ *
3928
+ * @returns
3929
+ * 0: Success.< 0: Failure.
3996
3930
  */
3997
3931
  abstract setVoiceConversionParameters(
3998
3932
  preset: VoiceConversionPreset,
@@ -4004,19 +3938,23 @@ export abstract class IRtcEngine {
4004
3938
  * Changes the voice pitch of the local speaker.
4005
3939
  * You can call this method either before or after joining a channel.
4006
3940
  *
4007
- * @param pitch The local voice pitch. The value range is [0.5,2.0]. The lower the value, the lower the pitch. The default value is 1 (no change to the pitch).
3941
+ * @param pitch The local voice pitch. The value range is [0.5,2.0]. The lower the value, the lower the pitch. The default value is 1.0 (no change to the pitch).
4008
3942
  *
4009
3943
  * @returns
4010
3944
  * 0: Success.< 0: Failure.
4011
3945
  */
4012
3946
  abstract setLocalVoicePitch(pitch: number): number;
4013
3947
 
3948
+ /**
3949
+ * @ignore
3950
+ */
3951
+ abstract setLocalVoiceFormant(formantRatio: number): number;
3952
+
4014
3953
  /**
4015
3954
  * Sets the local voice equalization effect.
4016
3955
  * You can call this method either before or after joining a channel.
4017
3956
  *
4018
- * @param bandFrequency The band frequency. The value ranges between 0 and 9; representing the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 250, 500, 1k, 2k, 4k, 8k, and 16k Hz.
4019
- *
3957
+ * @param bandFrequency The band frequency. The value ranges between 0 and 9; representing the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 250, 500, 1k, 2k, 4k, 8k, and 16k Hz. See AudioEqualizationBandFrequency .
4020
3958
  * @param bandGain The gain of each band in dB. The value ranges between -15 and 15. The default value is 0.
4021
3959
  *
4022
3960
  * @returns
@@ -4029,10 +3967,9 @@ export abstract class IRtcEngine {
4029
3967
 
4030
3968
  /**
4031
3969
  * Sets the local voice reverberation.
4032
- * The SDK also provides the setAudioEffectPreset method, which allows you to directly implement preset reverb effects for such as pop, R&B, and KTV.You can call this method either before or after joining a channel.
4033
- *
4034
- * @param reverbKey The reverberation key. Agora provides five reverberation keys; see AudioReverbType for details.
3970
+ * The SDK provides an easier-to-use method, setAudioEffectPreset , to directly implement preset reverb effects for such as pop, R&B, and KTV.You can call this method either before or after joining a channel.
4035
3971
  *
3972
+ * @param reverbKey The reverberation key. Agora provides five reverberation keys, see AudioReverbType .
4036
3973
  * @param value The value of the reverberation key.
4037
3974
  *
4038
3975
  * @returns
@@ -4059,7 +3996,6 @@ export abstract class IRtcEngine {
4059
3996
  * In a spatial audio effect scenario, if the preset headphone equalization effect is not achieved after calling the setHeadphoneEQPreset method, you can further adjust the headphone equalization effect by calling this method.
4060
3997
  *
4061
3998
  * @param lowGain The low-frequency parameters of the headphone equalizer. The value range is [-10,10]. The larger the value, the deeper the sound.
4062
- *
4063
3999
  * @param highGain The high-frequency parameters of the headphone equalizer. The value range is [-10,10]. The larger the value, the sharper the sound.
4064
4000
  *
4065
4001
  * @returns
@@ -4069,7 +4005,7 @@ export abstract class IRtcEngine {
4069
4005
 
4070
4006
  /**
4071
4007
  * Sets the log file.
4072
- * Deprecated:Use the mLogConfig parameter in initialize method instead.Specifies an SDK output log file. The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable.Ensure that you call this method immediately after calling the initialize method to initialize the IRtcEngine , or the output log may not be complete.
4008
+ * Deprecated:Use the mLogConfig parameter in initialize method instead.Specifies an SDK output log file. The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable.Ensure that you call initialize immediately after calling the IRtcEngine method, or the output log may not be complete.
4073
4009
  *
4074
4010
  * @param filePath The complete path of the log files. These log files are encoded in UTF-8.
4075
4011
  *
@@ -4080,7 +4016,7 @@ export abstract class IRtcEngine {
4080
4016
 
4081
4017
  /**
4082
4018
  * Sets the log output level of the SDK.
4083
- * Deprecated:Use logConfig in initialize instead.This method sets the output log level of the SDK. You can use one or a combination of the log filter levels. The log level follows the sequence of LogFilterOff, LogFilterCritical, LogFilterError, LogFilterWarn, LogFilterInfo, and LogFilterDebug. Choose a level to see the logs preceding that level.If, for example, you set the log level to LogFilterWarn, you see the logs within levels LogFilterCritical, LogFilterError, and LogFilterWarn.
4019
+ * Deprecated:Use logConfig in initialize instead.This method sets the output log level of the SDK. You can use one or a combination of the log filter levels. The log level follows the sequence of LogFilterOff, LogFilterCritical, LogFilterError, LogFilterWarn, LogFilterInfo, and LogFilterDebug. Choose a level to see the logs preceding that level.If, for example, you set the log level to LogFilterWarn, you see the logs within levels LogFilterCritical, LogFilterError and LogFilterWarn.
4084
4020
  *
4085
4021
  * @param filter The output log level of the SDK. See LogFilterType .
4086
4022
  *
@@ -4117,15 +4053,7 @@ export abstract class IRtcEngine {
4117
4053
  abstract uploadLogFile(requestId: string): number;
4118
4054
 
4119
4055
  /**
4120
- * Updates the display mode of the local video view.
4121
- * After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream.Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method.During a call, you can call this method as many times as necessary to update the display mode of the local video view.
4122
- *
4123
- * @param renderMode The local video display mode. See RenderModeType .
4124
- *
4125
- * @param mirrorMode The mirror mode of the local video view. See VideoMirrorModeType .If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
4126
- *
4127
- * @returns
4128
- * 0: Success. < 0: Failure.
4056
+ * @ignore
4129
4057
  */
4130
4058
  abstract setLocalRenderMode(
4131
4059
  renderMode: RenderModeType,
@@ -4133,14 +4061,7 @@ export abstract class IRtcEngine {
4133
4061
  ): number;
4134
4062
 
4135
4063
  /**
4136
- * Updates the display mode of the video view of a remote user.
4137
- * After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.Please call this method after initializing the remote view by calling the setupRemoteVideo method.During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
4138
- *
4139
- * @param uid The user ID of the remote user.
4140
- *
4141
- * @param renderMode The rendering mode of the remote user view.
4142
- *
4143
- * @param mirrorMode The mirror mode of the remote user view.
4064
+ * @ignore
4144
4065
  */
4145
4066
  abstract setRemoteRenderMode(
4146
4067
  uid: number,
@@ -4149,21 +4070,20 @@ export abstract class IRtcEngine {
4149
4070
  ): number;
4150
4071
 
4151
4072
  /**
4152
- * Sets the local video mirror mode.
4153
- * Deprecated:This method is deprecated.Use setupLocalVideo or setLocalRenderMode instead.
4154
- *
4155
- * @param mirrorMode The local video mirror mode. See VideoMirrorModeType .
4156
- *
4157
- * @returns
4158
- * 0: Success.< 0: Failure.
4073
+ * @ignore
4159
4074
  */
4160
4075
  abstract setLocalVideoMirrorMode(mirrorMode: VideoMirrorModeType): number;
4161
4076
 
4162
4077
  /**
4163
- * Enables or disables dual-stream mode on the sender side.
4164
- * This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.If you need to enable dual video streams in a multi-channel scenario, you can call the enableDualStreamModeEx method.You can call this method either before or after joining a channel.Dual streams are a pairing of a high-quality video stream and a low-quality video stream:High-quality video stream: High bitrate, high resolution.Low-quality video stream: Low bitrate, low resolution.After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.
4078
+ * Enables or disables the dual-stream mode on the sender and sets the low-quality video stream.
4079
+ * You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:
4080
+ * High-quality video stream: High bitrate, high resolution.
4081
+ * Low-quality video stream: Low bitrate, low resolution. After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
4082
+ * If you need to enable dual video streams in a multi-channel scenario, you can call the enableDualStreamModeEx method.
4083
+ * You can call this method either before or after joining a channel.
4165
4084
  *
4166
- * @param enabled Whether to enable dual-stream mode.true: Enable dual-stream mode.false: (Default) Disable dual-stream mode.
4085
+ * @param enabled Whether to enable dual-stream mode:true: Enable dual-stream mode.false: (Default) Disable dual-stream mode.
4086
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .
4167
4087
  *
4168
4088
  * @returns
4169
4089
  * 0: Success.< 0: Failure.
@@ -4174,10 +4094,14 @@ export abstract class IRtcEngine {
4174
4094
  ): number;
4175
4095
 
4176
4096
  /**
4177
- * Sets dual-stream mode on the sender side.
4178
- * The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream(always never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).The difference and connection between this method and enableDualStreamMode [1/3] is as follows:When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamMode [1/3](false).When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamMode [1/3](true).Both methods can be called before and after joining a channel. If they are used at the same time, the settings in the method called later shall prevail.
4097
+ * Sets dual-stream mode configuration on the sender, and sets the low-quality video stream.
4098
+ * The difference and connection between this method and enableDualStreamMode [1/3] is as follows:
4099
+ * When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamMode [1/3](false).
4100
+ * When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamMode [1/3](true).
4101
+ * Both methods can be called before and after joining a channel. If they are used at the same time, the settings in the method called later shall prevail. The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream(never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).
4179
4102
  *
4180
4103
  * @param mode The mode in which the video stream is sent. See SimulcastStreamMode .
4104
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .When setting mode to DisableSimulcastStream, setting streamConfig will not take effect.
4181
4105
  *
4182
4106
  * @returns
4183
4107
  * 0: Success.< 0: Failure.
@@ -4187,52 +4111,21 @@ export abstract class IRtcEngine {
4187
4111
  streamConfig?: SimulcastStreamConfig
4188
4112
  ): number;
4189
4113
 
4190
- /**
4191
- * @ignore
4192
- */
4193
- abstract enableEchoCancellationExternal(
4194
- enabled: boolean,
4195
- audioSourceDelay: number
4196
- ): number;
4197
-
4198
4114
  /**
4199
4115
  * @ignore
4200
4116
  */
4201
4117
  abstract enableCustomAudioLocalPlayback(
4202
- sourceId: number,
4118
+ trackId: number,
4203
4119
  enabled: boolean
4204
4120
  ): number;
4205
4121
 
4206
- /**
4207
- * @ignore
4208
- */
4209
- abstract startPrimaryCustomAudioTrack(config: AudioTrackConfig): number;
4210
-
4211
- /**
4212
- * @ignore
4213
- */
4214
- abstract stopPrimaryCustomAudioTrack(): number;
4215
-
4216
- /**
4217
- * @ignore
4218
- */
4219
- abstract startSecondaryCustomAudioTrack(config: AudioTrackConfig): number;
4220
-
4221
- /**
4222
- * @ignore
4223
- */
4224
- abstract stopSecondaryCustomAudioTrack(): number;
4225
-
4226
4122
  /**
4227
4123
  * Sets the format of the captured raw audio data.
4228
- * Sets the audio format for the onRecordAudioFrame callback.Ensure that you call this method before joining a channel.The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method.Sample interval = samplePerCall/(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s).
4124
+ * Sets the audio format for the onRecordAudioFrame callback.Ensure that you call this method before joining a channel.The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method.Sample interval (sec) = samplePerCall/(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s).
4229
4125
  *
4230
4126
  * @param sampleRate The sample rate returned in the SDK, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4231
- *
4232
4127
  * @param channel The number of channels returned by the SDK. You can set the value as 1 or 2:1: Mono.2: Stereo.
4233
- *
4234
4128
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType .
4235
- *
4236
4129
  * @param samplesPerCall The number of data samples returned in the SDK, such as 1024 for the Media Push.
4237
4130
  *
4238
4131
  * @returns
@@ -4247,14 +4140,11 @@ export abstract class IRtcEngine {
4247
4140
 
4248
4141
  /**
4249
4142
  * Sets the audio data format for playback.
4250
- * Sets the data format for the onPlaybackAudioFrame callback.Ensure that you call this method before joining a channel.The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method.Sample interval = samplePerCall/(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onPlaybackAudioFrame callback according to the sampling interval.
4143
+ * Sets the data format for the onPlaybackAudioFrame callback.Ensure that you call this method before joining a channel.The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method.Sample interval (sec) = samplePerCall/(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the callback according to the sampling interval.onPlaybackAudioFrame
4251
4144
  *
4252
4145
  * @param sampleRate The sample rate returned in the onPlaybackAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4253
- *
4254
4146
  * @param channel The number of channels returned in the onPlaybackAudioFrame callback:1: Mono.2: Stereo.
4255
- *
4256
4147
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType .
4257
- *
4258
4148
  * @param samplesPerCall The number of data samples returned in the onPlaybackAudioFrame callback, such as 1024 for the Media Push.
4259
4149
  *
4260
4150
  * @returns
@@ -4271,9 +4161,7 @@ export abstract class IRtcEngine {
4271
4161
  * Sets the audio data format reported by onMixedAudioFrame .
4272
4162
  *
4273
4163
  * @param sampleRate The sample rate (Hz) of the audio data, which can be set as 8000, 16000, 32000, 44100, or 48000.
4274
- *
4275
- * @param channel The number of channels of the audio data, which can be set as 1 (Mono) or 2 (Stereo).
4276
- *
4164
+ * @param channel The number of channels of the audio data, which can be set as 1(Mono) or 2(Stereo).
4277
4165
  * @param samplesPerCall Sets the number of samples. In Media Push scenarios, set it as 1024.
4278
4166
  *
4279
4167
  * @returns
@@ -4290,11 +4178,8 @@ export abstract class IRtcEngine {
4290
4178
  * This method is used to set the in-ear monitoring audio data format reported by the onEarMonitoringAudioFrame callback.Before calling this method, you need to call enableInEarMonitoring , and set includeAudioFilters to EarMonitoringFilterBuiltInAudioFilters or EarMonitoringFilterNoiseSuppression.The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method.Sample interval (sec) = samplePerCall/(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
4291
4179
  *
4292
4180
  * @param sampleRate The sample rate of the audio data reported in the onEarMonitoringAudioFrame callback, which can be set as 8,000, 16,000, 32,000, 44,100, or 48,000 Hz.
4293
- *
4294
4181
  * @param channel The number of audio channels reported in the onEarMonitoringAudioFrame callback.1: Mono.2: Stereo.
4295
- *
4296
4182
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType .
4297
- *
4298
4183
  * @param samplesPerCall The number of data samples reported in the onEarMonitoringAudioFrame callback, such as 1,024 for the Media Push.
4299
4184
  *
4300
4185
  * @returns
@@ -4311,7 +4196,6 @@ export abstract class IRtcEngine {
4311
4196
  * Sets the audio data format reported by onPlaybackAudioFrameBeforeMixing .
4312
4197
  *
4313
4198
  * @param sampleRate The sample rate (Hz) of the audio data, which can be set as 8000, 16000, 32000, 44100, or 48000.
4314
- *
4315
4199
  * @param channel The number of channels of the external audio source, which can be set as 1(Mono) or 2(Stereo).
4316
4200
  *
4317
4201
  * @returns
@@ -4326,7 +4210,7 @@ export abstract class IRtcEngine {
4326
4210
  * Turns on audio spectrum monitoring.
4327
4211
  * If you want to obtain the audio spectrum data of local or remote users, you can register the audio spectrum observer and enable audio spectrum monitoring.You can call this method either before or after joining a channel.
4328
4212
  *
4329
- * @param intervalInMS The interval (in milliseconds) at which the SDK triggers the onLocalAudioSpectrum and onRemoteAudioSpectrum callbacks. The default value is 100. Do not set this parameter to less than 10 milliseconds, otherwise the calling of this method fails.
4213
+ * @param intervalInMS The interval (in milliseconds) at which the SDK triggers the onLocalAudioSpectrum and onRemoteAudioSpectrum callbacks. The default value is 100. Do not set this parameter to a value less than 10, otherwise calling this method would fail.
4330
4214
  *
4331
4215
  * @returns
4332
4216
  * 0: Success.< 0: Failure.-2: Invalid parameters.
@@ -4343,9 +4227,9 @@ export abstract class IRtcEngine {
4343
4227
  abstract disableAudioSpectrumMonitor(): number;
4344
4228
 
4345
4229
  /**
4346
- * Registers an audio spectrum observer.
4230
+ * Register an audio spectrum observer.
4347
4231
  * After successfully registering the audio spectrum observer and calling
4348
- * enableAudioSpectrumMonitor to enable the audio spectrum monitoring, the SDK reports the callback that you implement in the IAudioSpectrumObserver class at the time interval you set.You can call this method either before or after joining a channel.
4232
+ * enableAudioSpectrumMonitor to enable the audio spectrum monitoring, the SDK reports the callback that you implement in the IAudioSpectrumObserver class according to the time interval you set.You can call this method either before or after joining a channel.
4349
4233
  *
4350
4234
  * @param observer The audio spectrum observer. See IAudioSpectrumObserver .
4351
4235
  *
@@ -4357,8 +4241,9 @@ export abstract class IRtcEngine {
4357
4241
  ): number;
4358
4242
 
4359
4243
  /**
4360
- * Unregisters the audio spectrum observer.
4361
- * After calling registerAudioSpectrumObserver , if you want to disable audio spectrum monitoring, you can call this method.You can call this method either before or after joining a channel.
4244
+ * Unregisters the encoded audio frame observer.
4245
+ *
4246
+ * @param observer The encoded audio observer. See IAudioEncodedFrameObserver .
4362
4247
  *
4363
4248
  * @returns
4364
4249
  * 0: Success.< 0: Failure.
@@ -4381,7 +4266,7 @@ export abstract class IRtcEngine {
4381
4266
  /**
4382
4267
  * Whether to mute the recording signal.
4383
4268
  *
4384
- * @param mute true: Mute the recording signal.false: (Default) Do not mute the recording signal.
4269
+ * @param mute true: Mute the recording signal.false: (Default) Unmute the recording signal.
4385
4270
  *
4386
4271
  * @returns
4387
4272
  * 0: Success.< 0: Failure.
@@ -4392,10 +4277,7 @@ export abstract class IRtcEngine {
4392
4277
  * Adjusts the playback signal volume of all remote users.
4393
4278
  * This method adjusts the playback volume that is the mixed volume of all remote users.You can call this method either before or after joining a channel.
4394
4279
  *
4395
- * @param volume The volume of the user. The value range is [0,400].
4396
- * 0: Mute.
4397
- * 100: (Default) The original volume.
4398
- * 400: Four times the original volume (amplifying the audio signals by four times).
4280
+ * @param volume The volume of the user. The value range is [0,400].0: Mute.100: (Default) The original volume.400: Four times the original volume (amplifying the audio signals by four times).
4399
4281
  *
4400
4282
  * @returns
4401
4283
  * 0: Success. < 0: Failure.
@@ -4406,9 +4288,8 @@ export abstract class IRtcEngine {
4406
4288
  * Adjusts the playback signal volume of a specified remote user.
4407
4289
  * You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user.Call this method after joining a channel.The playback volume here refers to the mixed volume of a specified remote user.
4408
4290
  *
4409
- * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
4410
- *
4411
4291
  * @param uid The user ID of the remote user.
4292
+ * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
4412
4293
  *
4413
4294
  * @returns
4414
4295
  * 0: Success.< 0: Failure.
@@ -4427,13 +4308,24 @@ export abstract class IRtcEngine {
4427
4308
  option: StreamFallbackOptions
4428
4309
  ): number;
4429
4310
 
4311
+ /**
4312
+ * @ignore
4313
+ */
4314
+ abstract setHighPriorityUserList(
4315
+ uidList: number[],
4316
+ uidNum: number,
4317
+ option: StreamFallbackOptions
4318
+ ): number;
4319
+
4430
4320
  /**
4431
4321
  * Enables loopback audio capturing.
4432
4322
  * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.This method applies to the macOS and Windows platforms only.macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing.You can call this method either before or after joining a channel.
4433
4323
  *
4434
4324
  * @param enabled Whether to enable loopback audio capturing.true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
4325
+ * @param deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing.Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing.
4435
4326
  *
4436
- * @param deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing.Windows: The device name of the sound card. The default is set to null, which means the SDK uses the sound card of your device for loopback audio capturing.
4327
+ * @returns
4328
+ * 0: Success.< 0: Failure.
4437
4329
  */
4438
4330
  abstract enableLoopbackRecording(
4439
4331
  enabled: boolean,
@@ -4461,7 +4353,6 @@ export abstract class IRtcEngine {
4461
4353
  * This method enables or disables in-ear monitoring.Users must use earphones (wired or Bluetooth) to hear the in-ear monitoring effect.You can call this method either before or after joining a channel.
4462
4354
  *
4463
4355
  * @param enabled Enables or disables in-ear monitoring.true: Enables in-ear monitoring.false: (Default) Disables in-ear monitoring.
4464
- *
4465
4356
  * @param includeAudioFilters The audio filter of in-ear monitoring: See EarMonitoringFilterType .
4466
4357
  *
4467
4358
  * @returns
@@ -4477,6 +4368,9 @@ export abstract class IRtcEngine {
4477
4368
  * Users must use wired earphones to hear their own voices.You can call this method either before or after joining a channel.
4478
4369
  *
4479
4370
  * @param volume The volume of the in-ear monitor. The value ranges between 0 and 100. The default value is 100.
4371
+ *
4372
+ * @returns
4373
+ * < 0: Failure.
4480
4374
  */
4481
4375
  abstract setInEarMonitoringVolume(volume: number): number;
4482
4376
 
@@ -4484,7 +4378,6 @@ export abstract class IRtcEngine {
4484
4378
  * Adds an extension to the SDK.
4485
4379
  *
4486
4380
  * @param path The extension library path and name. For example: /library/libagora_segmentation_extension.dll.
4487
- *
4488
4381
  * @param unloadAfterUse Whether to uninstall the current extension when you no longer using it:true: Uninstall the extension when the IRtcEngine is destroyed.false: (Rcommended) Do not uninstall the extension until the process terminates.
4489
4382
  *
4490
4383
  * @returns
@@ -4499,11 +4392,12 @@ export abstract class IRtcEngine {
4499
4392
  * Sets the properties of the extension provider.
4500
4393
  * You can call this method to set the attributes of the extension provider and initialize the relevant parameters according to the type of the provider.Call this method after enableExtension , and before enabling the audio ( enableAudio / enableLocalAudio ) or the video ( enableVideo / enableLocalVideo ).
4501
4394
  *
4502
- * @param value The value of the extension key.
4503
- *
4395
+ * @param provider The name of the extension provider.
4504
4396
  * @param key The key of the extension.
4397
+ * @param value The value of the extension key.
4505
4398
  *
4506
- * @param provider The name of the extension provider.
4399
+ * @returns
4400
+ * 0: Success.< 0: Failure.
4507
4401
  */
4508
4402
  abstract setExtensionProviderProperty(
4509
4403
  provider: string,
@@ -4515,11 +4409,9 @@ export abstract class IRtcEngine {
4515
4409
  * Registers an extension.
4516
4410
  * After the extension is loaded, you can call this method to register the extension.This method applies to Windows only.
4517
4411
  *
4518
- * @param type Type of media source. See MediaSourceType .In this method, this parameter supports only the following two settings:The default value is UnknownMediaSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
4519
- *
4520
- * @param extension The name of the extension.
4521
- *
4522
4412
  * @param provider The name of the extension provider.
4413
+ * @param extension The name of the extension.
4414
+ * @param type Type of media source. See MediaSourceType .In this method, this parameter supports only the following two settings:The default value is UnknownMediaSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
4523
4415
  *
4524
4416
  * @returns
4525
4417
  * 0: Success.< 0: Failure.
@@ -4531,19 +4423,16 @@ export abstract class IRtcEngine {
4531
4423
  ): number;
4532
4424
 
4533
4425
  /**
4534
- * Enables/Disables an extension.
4426
+ * Enables or disables extensions.
4535
4427
  * To call this method, call it immediately after initializing the IRtcEngine object.If you want to enable multiple extensions, you need to call this method multiple times.The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first.
4536
4428
  *
4537
- * @param extension The name of the extension.
4538
- *
4539
4429
  * @param provider The name of the extension provider.
4540
- *
4430
+ * @param extension The name of the extension.
4541
4431
  * @param enable Whether to enable the extension:true: Enable the extension.false: Disable the extension.
4542
- *
4543
4432
  * @param type Type of media source. See MediaSourceType .In this method, this parameter supports only the following two settings:The default value is UnknownMediaSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
4544
4433
  *
4545
4434
  * @returns
4546
- * 0: Success.< 0: Failure.
4435
+ * 0: Success.< 0: Failure.-3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library.
4547
4436
  */
4548
4437
  abstract enableExtension(
4549
4438
  provider: string,
@@ -4557,14 +4446,13 @@ export abstract class IRtcEngine {
4557
4446
  * After enabling the extension, you can call this method to set the properties of the extension.
4558
4447
  *
4559
4448
  * @param provider The name of the extension provider.
4560
- *
4561
4449
  * @param extension The name of the extension.
4562
- *
4563
4450
  * @param key The key of the extension.
4564
- *
4565
4451
  * @param value The value of the extension key.
4452
+ * @param type The type of the video source, see MediaSourceType .
4566
4453
  *
4567
- * @param type The type of the video source. See MediaSourceType .
4454
+ * @returns
4455
+ * 0: Success.< 0: Failure.
4568
4456
  */
4569
4457
  abstract setExtensionProperty(
4570
4458
  provider: string,
@@ -4578,14 +4466,10 @@ export abstract class IRtcEngine {
4578
4466
  * Gets detailed information on the extensions.
4579
4467
  *
4580
4468
  * @param provider The name of the extension provider.
4581
- *
4582
4469
  * @param extension The name of the extension.
4583
- *
4584
4470
  * @param key The key of the extension.
4585
- *
4586
- * @param type Source type of the extension. See MediaSourceType .
4587
- *
4588
4471
  * @param bufLen Maximum length of the JSON string indicating the extension property. The maximum value is 512 bytes.
4472
+ * @param type Source type of the extension. See MediaSourceType .
4589
4473
  *
4590
4474
  * @returns
4591
4475
  * The extension information, if the method call succeeds.An empty string, if the method call fails.
@@ -4630,7 +4514,12 @@ export abstract class IRtcEngine {
4630
4514
  abstract destroyCustomVideoTrack(videoTrackId: number): number;
4631
4515
 
4632
4516
  /**
4633
- * @ignore
4517
+ * Destroys the specified video track.
4518
+ *
4519
+ * @param videoTrackId The video track ID returned by calling the createCustomVideoTrack method.
4520
+ *
4521
+ * @returns
4522
+ * 0: Success.< 0: Failure.
4634
4523
  */
4635
4524
  abstract destroyCustomEncodedVideoTrack(videoTrackId: number): number;
4636
4525
 
@@ -4670,7 +4559,13 @@ export abstract class IRtcEngine {
4670
4559
  abstract setCameraZoomFactor(factor: number): number;
4671
4560
 
4672
4561
  /**
4673
- * @ignore
4562
+ * Enables/Disables the local video capture.
4563
+ * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
4564
+ *
4565
+ * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
4566
+ *
4567
+ * @returns
4568
+ * 0: Success.< 0: Failure.
4674
4569
  */
4675
4570
  abstract enableFaceDetection(enabled: boolean): number;
4676
4571
 
@@ -4693,7 +4588,13 @@ export abstract class IRtcEngine {
4693
4588
  abstract setCameraTorchOn(isOn: boolean): number;
4694
4589
 
4695
4590
  /**
4696
- * @ignore
4591
+ * Enables/Disables the local video capture.
4592
+ * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
4593
+ *
4594
+ * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
4595
+ *
4596
+ * @returns
4597
+ * 0: Success.< 0: Failure.
4697
4598
  */
4698
4599
  abstract setCameraAutoFocusFaceModeEnabled(enabled: boolean): number;
4699
4600
 
@@ -4716,7 +4617,13 @@ export abstract class IRtcEngine {
4716
4617
  abstract isCameraAutoExposureFaceModeSupported(): boolean;
4717
4618
 
4718
4619
  /**
4719
- * @ignore
4620
+ * Enables/Disables the local video capture.
4621
+ * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
4622
+ *
4623
+ * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
4624
+ *
4625
+ * @returns
4626
+ * 0: Success.< 0: Failure.
4720
4627
  */
4721
4628
  abstract setCameraAutoExposureFaceModeEnabled(enabled: boolean): number;
4722
4629
 
@@ -4739,13 +4646,11 @@ export abstract class IRtcEngine {
4739
4646
 
4740
4647
  /**
4741
4648
  * Gets a list of shareable screens and windows.
4742
- * You can call this method before sharing a screen or window to get a list of shareable screens and windows, which enables a user to use thumbnails in the list to choose a particular screen or window to share. This list also contains important information such as window ID and screen ID, with which you can call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start the sharing.
4649
+ * You can call this method before sharing a screen or window to get a list of shareable screens and windows, which enables a user to use thumbnails in the list to easily choose a particular screen or window to share. This list also contains important information such as window ID and screen ID, with which you can call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start the sharing.
4743
4650
  *
4744
4651
  * @param thumbSize The target size of the screen or window thumbnail (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and thumbSize is 100 × 100, the actual size of the thumbnail is 100 × 75. If the target size is larger than the original size, the thumbnail is the original image and the SDK does not scale it.
4745
- *
4746
4652
  * @param iconSize The target size of the icon corresponding to the application program (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and iconSize is 100 × 100, the actual size of the icon is 100 × 75. If the target size is larger than the original size, the icon is the original image and the SDK does not scale it.
4747
- *
4748
- * @param includeScreen Whether the SDK returns the screen information in addition to the window information:true: The SDK returns screen and window information.false: The SDK returns the window information only.
4653
+ * @param includeScreen Whether the SDK returns the screen information in addition to the window information:true: The SDK returns screen and window information.false: The SDK returns window information only.
4749
4654
  *
4750
4655
  * @returns
4751
4656
  * The ScreenCaptureSourceInfo array.
@@ -4765,16 +4670,14 @@ export abstract class IRtcEngine {
4765
4670
 
4766
4671
  /**
4767
4672
  * Shares the screen by specifying the display ID.
4768
- * This method shares a screen or part of the screen.There are two ways to start screen sharing, you can choose one according to the actual needs:Call this method before joining a channel, and then call joinChannel [2/2] to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4673
+ * This method shares a screen or part of the screen.There are two ways to start screen sharing, you can choose one according to your needs:Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4769
4674
  *
4770
4675
  * @param displayId The display ID of the screen to be shared.
4771
- *
4772
- * @param regionRect (Optional) Sets the relative location of the region to the screen. If you do not set this parameter, the SDK shares the whole screen. See Rectangle . If the specified region overruns the screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen.
4773
- *
4676
+ * @param regionRect (Optional) Sets the relative location of the region to the screen. If you do not set this parameter, the SDK shares the whole screen.
4774
4677
  * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters .
4775
4678
  *
4776
4679
  * @returns
4777
- * 0: Success.< 0: Failure.ERR_INVALID_STATE: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.ERR_INVALID_ARGUMENT: The parameter is invalid.
4680
+ * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4778
4681
  */
4779
4682
  abstract startScreenCaptureByDisplayId(
4780
4683
  displayId: number,
@@ -4784,20 +4687,14 @@ export abstract class IRtcEngine {
4784
4687
 
4785
4688
  /**
4786
4689
  * Shares the whole or part of a screen by specifying the screen rect.
4787
- * There are two ways to start screen sharing, you can choose one according to the actual needs:
4788
- * Call this method before joining a channel, and then call joinChannel [2/2] to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4789
- * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Deprecated:This method is deprecated. Use startScreenCaptureByDisplayId instead. Agora strongly recommends using startScreenCaptureByDisplayId if you need to start screen sharing on a device connected to another display.This method shares a screen or part of the screen. You need to specify the area of the screen to be shared.This method applies to Windows only.
4690
+ * There are two ways to start screen sharing, you can choose one according to your needs:Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.Deprecated:This method is deprecated. Use startScreenCaptureByDisplayId instead. Agora strongly recommends using startScreenCaptureByDisplayId if you need to start screen sharing on a device connected to another display.This method shares a screen or part of the screen. You need to specify the area of the screen to be shared.This method applies to Windows only.
4790
4691
  *
4791
4692
  * @param screenRect Sets the relative location of the screen to the virtual screen.
4792
- *
4793
4693
  * @param regionRect Rectangle . If the specified region overruns the screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen.
4794
- *
4795
- * @param captureParams The screen sharing encoding parameters. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters .
4694
+ * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters .
4796
4695
  *
4797
4696
  * @returns
4798
- * 0: Success.< 0: Failure.
4799
- * ERR_INVALID_STATE: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4800
- * ERR_INVALID_ARGUMENT: The parameter is invalid.
4697
+ * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4801
4698
  */
4802
4699
  abstract startScreenCaptureByScreenRect(
4803
4700
  screenRect: Rectangle,
@@ -4813,16 +4710,18 @@ export abstract class IRtcEngine {
4813
4710
 
4814
4711
  /**
4815
4712
  * Shares the whole or part of a window by specifying the window ID.
4816
- * There are two ways to start screen sharing, you can choose one according to the actual needs:Call this method before joining a channel, and then call joinChannel [2/2] to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.This method shares a window or part of the window. You need to specify the ID of the window to be shared.Applies to the macOS and Windows platforms only.The window sharing feature of the Agora SDK relies on WGC (Windows Graphics Capture) or GDI (Graphics Device Interface) capture, and WGC cannot be set to disable mouse capture on systems earlier than Windows 10 2004. Therefore, captureMouseCursor(false) might not work when you start window sharing on a device with a system earlier than Windows 10 2004. See ScreenCaptureParameters .This method supports window sharing of UWP (Universal Windows Platform) applications. Agora tests the mainstream UWP applications by using the lastest SDK, see details as follows:
4713
+ * There are two ways to start screen sharing, you can choose one according to your needs:
4714
+ * Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4715
+ * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. This method shares a window or part of the window. You need to specify the ID of the window to be shared.This method applies to the macOS and Windows platforms only.The window sharing feature of the Agora SDK relies on WGC (Windows Graphics Capture) or GDI (Graphics Device Interface) capture, and WGC cannot be set to disable mouse capture on systems earlier than Windows 10 2004. Therefore, captureMouseCursor(false) might not work when you start window sharing on a device with a system earlier than Windows 10 2004. See ScreenCaptureParameters .This method supports window sharing of UWP (Universal Windows Platform) applications. Agora tests the mainstream UWP applications by using the lastest SDK, see details as follows:
4817
4716
  *
4818
4717
  * @param windowId The ID of the window to be shared.
4819
- *
4820
4718
  * @param regionRect (Optional) Sets the relative location of the region to the screen. If you do not set this parameter, the SDK shares the whole screen. See Rectangle . If the specified region overruns the window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole window.
4821
- *
4822
- * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters .
4719
+ * @param captureParams Screen sharing configurations. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters .
4823
4720
  *
4824
4721
  * @returns
4825
- * 0: Success.< 0: Failure.ERR_INVALID_STATE: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.ERR_INVALID_ARGUMENT: The parameter is invalid.
4722
+ * 0: Success.< 0: Failure.
4723
+ * -2: The parameter is invalid.
4724
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4826
4725
  */
4827
4726
  abstract startScreenCaptureByWindowId(
4828
4727
  windowId: any,
@@ -4837,20 +4736,11 @@ export abstract class IRtcEngine {
4837
4736
  * @param contentHint The content hint for screen sharing. See VideoContentHint .
4838
4737
  *
4839
4738
  * @returns
4840
- * 0: Success.< 0: Failure.ERR_INVALID_STATE: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.ERR_INVALID_ARGUMENT: The parameter is invalid.
4841
- */
4842
- abstract setScreenCaptureContentHint(contentHint: VideoContentHint): number;
4843
-
4844
- /**
4845
- * Sets the screen sharing scenario.
4846
- * When you start screen sharing or window sharing, you can call this method to set the screen sharing scenario. The SDK adjusts the video quality and experience of the sharing according to the scenario.This method applies to macOS and Windows only.
4847
- *
4848
- * @param screenScenario The screen sharing scenario. See ScreenScenarioType .
4849
- *
4850
- * @returns
4851
4739
  * 0: Success.< 0: Failure.
4740
+ * -2: The parameter is invalid.
4741
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4852
4742
  */
4853
- abstract setScreenCaptureScenario(screenScenario: ScreenScenarioType): number;
4743
+ abstract setScreenCaptureContentHint(contentHint: VideoContentHint): number;
4854
4744
 
4855
4745
  /**
4856
4746
  * Updates the screen sharing region.
@@ -4859,7 +4749,9 @@ export abstract class IRtcEngine {
4859
4749
  * @param regionRect The relative location of the screen-share area to the screen or window. If you do not set this parameter, the SDK shares the whole screen or window. See Rectangle . If the specified region overruns the screen or window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen or window.
4860
4750
  *
4861
4751
  * @returns
4862
- * 0: Success.< 0: Failure.ERR_INVALID_STATE: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.ERR_INVALID_ARGUMENT: The parameter is invalid.
4752
+ * 0: Success.< 0: Failure.
4753
+ * -2: The parameter is invalid.
4754
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4863
4755
  */
4864
4756
  abstract updateScreenCaptureRegion(regionRect: Rectangle): number;
4865
4757
 
@@ -4867,25 +4759,67 @@ export abstract class IRtcEngine {
4867
4759
  * Updates the screen sharing parameters.
4868
4760
  * This method is for Windows and macOS only.Call this method after starting screen sharing or window sharing.
4869
4761
  *
4870
- * @param captureParams The screen sharing encoding parameters. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters
4762
+ * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters
4871
4763
  *
4872
4764
  * @returns
4873
4765
  * 0: Success.< 0: Failure.
4766
+ * -2: The parameter is invalid.
4767
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4874
4768
  */
4875
4769
  abstract updateScreenCaptureParameters(
4876
4770
  captureParams: ScreenCaptureParameters
4877
4771
  ): number;
4878
4772
 
4879
4773
  /**
4880
- * @ignore
4774
+ * Updates the screen sharing parameters.
4775
+ * This method is for Windows and macOS only.Call this method after starting screen sharing or window sharing.
4776
+ *
4777
+ * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters
4778
+ *
4779
+ * @returns
4780
+ * 0: Success.< 0: Failure.
4781
+ * -2: The parameter is invalid.
4782
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4881
4783
  */
4882
4784
  abstract startScreenCapture(captureParams: ScreenCaptureParameters2): number;
4883
4785
 
4884
4786
  /**
4885
4787
  * @ignore
4886
4788
  */
4789
+ abstract startScreenCaptureBySourceType(
4790
+ sourceType: VideoSourceType,
4791
+ config: ScreenCaptureConfiguration
4792
+ ): number;
4793
+
4794
+ /**
4795
+ * Updates the screen sharing parameters.
4796
+ * This method is for Windows and macOS only.Call this method after starting screen sharing or window sharing.
4797
+ *
4798
+ * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters
4799
+ *
4800
+ * @returns
4801
+ * 0: Success.< 0: Failure.
4802
+ * -2: The parameter is invalid.
4803
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4804
+ */
4887
4805
  abstract updateScreenCapture(captureParams: ScreenCaptureParameters2): number;
4888
4806
 
4807
+ /**
4808
+ * @ignore
4809
+ */
4810
+ abstract queryScreenCaptureCapability(): number;
4811
+
4812
+ /**
4813
+ * Sets the screen sharing scenario.
4814
+ * When you start screen sharing or window sharing, you can call this method to set the screen sharing scenario. The SDK adjusts the video quality and experience of the sharing according to the scenario.This method applies to macOS and Windows only.
4815
+ *
4816
+ * @param screenScenario The screen sharing scenario. See ScreenScenarioType .
4817
+ *
4818
+ * @returns
4819
+ * 0: Success.< 0: Failure.
4820
+ */
4821
+ abstract setScreenCaptureScenario(screenScenario: ScreenScenarioType): number;
4822
+
4889
4823
  /**
4890
4824
  * Stops screen sharing.
4891
4825
  *
@@ -4894,6 +4828,17 @@ export abstract class IRtcEngine {
4894
4828
  */
4895
4829
  abstract stopScreenCapture(): number;
4896
4830
 
4831
+ /**
4832
+ * Stops the local video preview.
4833
+ * After calling startPreview to start the preview, if you want to close the local video preview, call this method.Call this method before joining a channel or after leaving a channel.
4834
+ *
4835
+ * @param sourceType The type of the video frame, see VideoSourceType .
4836
+ *
4837
+ * @returns
4838
+ * < 0: Failure.
4839
+ */
4840
+ abstract stopScreenCaptureBySourceType(sourceType: VideoSourceType): number;
4841
+
4897
4842
  /**
4898
4843
  * Retrieves the call ID.
4899
4844
  * When a user joins a channel on a client, a callId is generated to identify the call from the client. Some methods, such as rate and complain , must be called after the call ends to submit feedback to the SDK. These methods require the callId parameter.Call this method after joining a channel.
@@ -4908,9 +4853,7 @@ export abstract class IRtcEngine {
4908
4853
  * Ensure that you call this method after leaving a channel.
4909
4854
  *
4910
4855
  * @param callId The current call ID. You can get the call ID by calling getCallId .
4911
- *
4912
- * @param rating The rating of the call. The value is between 1 (lowest score) and 5 (highest score). If you set a value out of this range, the SDK returns the -2 (ERR_INVALID_ARGUMENT) error.
4913
- *
4856
+ * @param rating The rating of the call. The value is between 1 (the lowest score) and 5 (the highest score). If you set a value out of this range, the SDK returns the -2 (ERR_INVALID_ARGUMENT) error.
4914
4857
  * @param description A description of the call. The string length should be less than 800 bytes.
4915
4858
  *
4916
4859
  * @returns
@@ -4923,30 +4866,29 @@ export abstract class IRtcEngine {
4923
4866
  * This method allows users to complain about the quality of the call. Call this method after the user leaves the channel.
4924
4867
  *
4925
4868
  * @param callId The current call ID. You can get the call ID by calling getCallId .
4926
- *
4927
4869
  * @param description A description of the call. The string length should be less than 800 bytes.
4928
4870
  *
4929
4871
  * @returns
4930
- * 0: Success.< 0: Failure.-2: The parameter is invalid.3: The SDK is not ready. Possible reasons include the following:The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.No user has joined the channel when the method is called. Please check your code logic.The user has not left the channel when the rate or complain method is called. Please check your code logic.The audio module is disabled. The program is not complete.
4872
+ * 0: Success.< 0: Failure.-2: The parameter is invalid.- 3: The SDK is not ready. Possible reasons include the following:The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.No user has joined the channel when the method is called. Please check your code logic.The user has not left the channel when the rate or complain method is called. Please check your code logic.The audio module is disabled. The program is not complete.
4931
4873
  */
4932
4874
  abstract complain(callId: string, description: string): number;
4933
4875
 
4934
4876
  /**
4935
4877
  * Starts pushing media streams to a CDN without transcoding.
4936
4878
  * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
4937
- * Call this method after joining a channel.
4938
- * Only hosts in the LIVE_BROADCASTING profile can call this method.
4939
- * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
4940
- * Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4879
+ * Call this method after joining a channel.
4880
+ * Only hosts in the LIVE_BROADCASTING profile can call this method.
4881
+ * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
4882
+ * Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4941
4883
  *
4942
4884
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
4943
4885
  *
4944
4886
  * @returns
4945
4887
  * 0: Success.
4946
- * < 0: Failure.
4947
- * -2: The URL is null or the string length is 0.
4948
- * -7: The SDK is not initialized before calling this method.
4949
- * -19: The Media Push URL is already in use, use another URL instead.
4888
+ * < 0: Failure.
4889
+ * -2: The URL is null or the string length is 0.
4890
+ * -7: The SDK is not initialized before calling this method.
4891
+ * -19: The Media Push URL is already in use, use another URL instead.
4950
4892
  */
4951
4893
  abstract startRtmpStreamWithoutTranscoding(url: string): number;
4952
4894
 
@@ -4955,7 +4897,6 @@ export abstract class IRtcEngine {
4955
4897
  * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.Ensure that you enable the Media Push service before using this function. See Enable Media Push.Call this method after joining a channel.Only hosts in the LIVE_BROADCASTING profile can call this method.If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
4956
4898
  *
4957
4899
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
4958
- *
4959
4900
  * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
4960
4901
  *
4961
4902
  * @returns
@@ -5002,7 +4943,7 @@ export abstract class IRtcEngine {
5002
4943
  ): number;
5003
4944
 
5004
4945
  /**
5005
- * Update the local video mixing configuration.
4946
+ * Updates the local video mixing configuration.
5006
4947
  * After calling startLocalVideoTranscoder , call this method if you want to update the local video mixing configuration.
5007
4948
  *
5008
4949
  * @param config Configuration of the local video mixing, see LocalTranscoderConfiguration .
@@ -5017,57 +4958,33 @@ export abstract class IRtcEngine {
5017
4958
  /**
5018
4959
  * Stops the local video mixing.
5019
4960
  * After calling startLocalVideoTranscoder , call this method if you want to stop the local video mixing.
5020
- *
5021
- * @returns
5022
- * 0: Success.< 0: Failure.
5023
4961
  */
5024
4962
  abstract stopLocalVideoTranscoder(): number;
5025
4963
 
5026
4964
  /**
5027
- * Starts video capture with a primary camera.
5028
- *
5029
- * @param config The configuration of the video capture with a primary camera. See CameraCapturerConfiguration .
5030
- *
5031
- * @returns
5032
- * 0: Success.< 0: Failure.
5033
- */
5034
- abstract startPrimaryCameraCapture(
5035
- config: CameraCapturerConfiguration
5036
- ): number;
5037
-
5038
- /**
5039
- * Starts video capture with a secondary camera.
5040
- *
5041
- * @param config The configuration of the video capture with a primary camera. See CameraCapturerConfiguration .
4965
+ * @ignore
5042
4966
  */
5043
- abstract startSecondaryCameraCapture(
4967
+ abstract startCameraCapture(
4968
+ sourceType: VideoSourceType,
5044
4969
  config: CameraCapturerConfiguration
5045
4970
  ): number;
5046
4971
 
5047
4972
  /**
5048
- * Stops capturing video through the primary camera.
5049
- * You can call this method to stop capturing video through the first camera after calling the startPrimaryCameraCapture method.If you are using the local video mixing function, calling this method can cause the local video mixing to be interrupted.
4973
+ * Stops the local video preview.
4974
+ * After calling startPreview to start the preview, if you want to close the local video preview, call this method.Call this method before joining a channel or after leaving a channel.
5050
4975
  *
5051
- * @returns
5052
- * 0: Success.< 0: Failure.
5053
- */
5054
- abstract stopPrimaryCameraCapture(): number;
5055
-
5056
- /**
5057
- * Stops capturing video through the second camera.
5058
- * startSecondaryCameraCapture You can call this method to stop capturing video through the second camera after calling the .
4976
+ * @param sourceType The type of the video frame, see VideoSourceType .
5059
4977
  *
5060
4978
  * @returns
5061
- * 0: Success.< 0: Failure.
4979
+ * < 0: Failure.
5062
4980
  */
5063
- abstract stopSecondaryCameraCapture(): number;
4981
+ abstract stopCameraCapture(sourceType: VideoSourceType): number;
5064
4982
 
5065
4983
  /**
5066
4984
  * Sets the rotation angle of the captured video.
5067
4985
  * When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video.
5068
4986
  *
5069
4987
  * @param type The video source type. See VideoSourceType .
5070
- *
5071
4988
  * @param orientation The clockwise rotation angle. See VideoOrientation .
5072
4989
  *
5073
4990
  * @returns
@@ -5079,48 +4996,19 @@ export abstract class IRtcEngine {
5079
4996
  ): number;
5080
4997
 
5081
4998
  /**
5082
- * @ignore
5083
- */
5084
- abstract setScreenCaptureOrientation(
5085
- type: VideoSourceType,
5086
- orientation: VideoOrientation
5087
- ): number;
5088
-
5089
- /**
5090
- * Starts sharing the primary screen.
5091
- *
5092
- * @param config The configuration of the captured screen. See ScreenCaptureConfiguration .
5093
- */
5094
- abstract startPrimaryScreenCapture(
5095
- config: ScreenCaptureConfiguration
5096
- ): number;
5097
-
5098
- /**
5099
- * Starts sharing a secondary screen.
5100
- *
5101
- * @param config The configuration of the captured screen. See ScreenCaptureConfiguration .
5102
- */
5103
- abstract startSecondaryScreenCapture(
5104
- config: ScreenCaptureConfiguration
5105
- ): number;
5106
-
5107
- /**
5108
- * Stop sharing the first screen.
5109
- * After calling startPrimaryScreenCapture , you can call this method to stop sharing the first screen.
4999
+ * Sets the rotation angle of the captured video.
5000
+ * When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video.
5110
5001
  *
5111
- * @returns
5112
- * 0: Success.< 0: Failure.
5113
- */
5114
- abstract stopPrimaryScreenCapture(): number;
5115
-
5116
- /**
5117
- * Stops sharing the secondary screen.
5118
- * After calling startSecondaryScreenCapture , you can call this method to stop sharing the secondary screen.
5002
+ * @param type The video source type. See VideoSourceType .
5003
+ * @param orientation The clockwise rotation angle. See VideoOrientation .
5119
5004
  *
5120
5005
  * @returns
5121
5006
  * 0: Success.< 0: Failure.
5122
5007
  */
5123
- abstract stopSecondaryScreenCapture(): number;
5008
+ abstract setScreenCaptureOrientation(
5009
+ type: VideoSourceType,
5010
+ orientation: VideoOrientation
5011
+ ): number;
5124
5012
 
5125
5013
  /**
5126
5014
  * Gets the current connection state of the SDK.
@@ -5132,19 +5020,25 @@ export abstract class IRtcEngine {
5132
5020
  abstract getConnectionState(): ConnectionStateType;
5133
5021
 
5134
5022
  /**
5135
- * Adds event handlers.
5023
+ * Adds event handlers
5136
5024
  * The SDK uses the IRtcEngineEventHandler class to send callbacks to the app. The app inherits the methods of this class to receive these callbacks. All methods in this class have default (empty) implementations. Therefore, apps only need to inherits callbacks according to the scenarios. In the callbacks, avoid time-consuming tasks or calling APIs that can block the thread, such as the sendStreamMessage method.
5137
5025
  * Otherwise, the SDK may not work properly.
5138
5026
  *
5139
5027
  * @param eventHandler Callback events to be added. See IRtcEngineEventHandler .
5028
+ *
5029
+ * @returns
5030
+ * true: Success.false: Failure.
5140
5031
  */
5141
5032
  abstract registerEventHandler(eventHandler: IRtcEngineEventHandler): boolean;
5142
5033
 
5143
5034
  /**
5144
- * Removes the specified IRtcEngineEventHandler instance.
5035
+ * Removes the specified callback handler.
5145
5036
  * This method removes the specified callback handler. For callback events that you want to listen for only once, call this method to remove the relevant callback handler after you have received them.
5146
5037
  *
5147
5038
  * @param eventHandler The callback handler to be deleted. See IRtcEngineEventHandler .
5039
+ *
5040
+ * @returns
5041
+ * true: Success.false: Failure.
5148
5042
  */
5149
5043
  abstract unregisterEventHandler(
5150
5044
  eventHandler: IRtcEngineEventHandler
@@ -5160,7 +5054,7 @@ export abstract class IRtcEngine {
5160
5054
 
5161
5055
  /**
5162
5056
  * Sets the built-in encryption mode.
5163
- * Deprecated:Use enableEncryption instead.The Agora SDK supports built-in encryption, which is set to the AES-128-GCM mode by default. Call this method to use other encryption modes. All users in the same channel must use the same encryption mode and secret. Refer to the information related to the AES encryption algorithm on the differences between the encryption modes.Before calling this method, please call setEncryptionSecret to enable the built-in encryption function.
5057
+ * Deprecated:Use enableEncryption instead.The SDK supports built-in encryption schemes, AES-128-GCM is supported by default. Call this method to use other encryption modes. All users in the same channel must use the same encryption mode and secret. Refer to the information related to the AES encryption algorithm on the differences between the encryption modes.Before calling this method, please call setEncryptionSecret to enable the built-in encryption function.
5164
5058
  *
5165
5059
  * @param encryptionMode The following encryption modes:"aes-128-xts": 128-bit AES encryption, XTS mode."aes-128-ecb": 128-bit AES encryption, ECB mode."aes-256-xts": 256-bit AES encryption, XTS mode."sm4-128-ecb": 128-bit SM4 encryption, ECB mode."aes-128-gcm": 128-bit AES encryption, GCM mode."aes-256-gcm": 256-bit AES encryption, GCM mode."": When this parameter is set as null, the encryption mode is set as "aes-128-gcm" by default.
5166
5060
  *
@@ -5171,7 +5065,7 @@ export abstract class IRtcEngine {
5171
5065
 
5172
5066
  /**
5173
5067
  * Enables built-in encryption with an encryption password before users join a channel.
5174
- * Deprecated:This method is deprecated. Use enableEncryption instead.Before joining the channel, you need to call this method to set the secret parameter to enable the built-in encryption. All users in the same channel should use the same secret. The secret is automatically cleared once a user leaves the channel. If you do not specify the secret or secret is set as null, the built-in encryption is disabled.Do not use this method for CDN live streaming.For optimal transmission, ensure that the encrypted data size does not exceed the original data size + 16 bytes. 16 bytes is the maximum padding size for AES encryption.
5068
+ * Deprecated:Use enableEncryption instead.Before joining the channel, you need to call this method to set the secret parameter to enable the built-in encryption. All users in the same channel should use the same secret. The secret is automatically cleared once a user leaves the channel. If you do not specify the secret or secret is set as null, the built-in encryption is disabled.Do not use this method for Media Push.For optimal transmission, ensure that the encrypted data size does not exceed the original data size + 16 bytes. 16 bytes is the maximum padding size for AES encryption.
5175
5069
  *
5176
5070
  * @param secret The encryption password.
5177
5071
  *
@@ -5181,11 +5075,10 @@ export abstract class IRtcEngine {
5181
5075
  abstract setEncryptionSecret(secret: string): number;
5182
5076
 
5183
5077
  /**
5184
- * Enables/Disables the built-in encryption.
5078
+ * Enables or disables the built-in encryption.
5185
5079
  * In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel.All users in the same channel must use the same encryption mode and encryption key. After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again.If you enable the built-in encryption, you cannot use the Media Push function.
5186
5080
  *
5187
5081
  * @param enabled Whether to enable built-in encryption:true: Enable the built-in encryption.false: Disable the built-in encryption.
5188
- *
5189
5082
  * @param config Built-in encryption configurations. See EncryptionConfig .
5190
5083
  *
5191
5084
  * @returns
@@ -5210,9 +5103,7 @@ export abstract class IRtcEngine {
5210
5103
  * A failed method call triggers the onStreamMessageError callback on the remote client.Ensure that you call createDataStream to create a data channel before calling this method.In live streaming scenarios, this method only applies to hosts.
5211
5104
  *
5212
5105
  * @param streamId The data stream ID. You can get the data stream ID by calling createDataStream.
5213
- *
5214
- * @param data The data to be sent.
5215
- *
5106
+ * @param data The message to be sent.
5216
5107
  * @param length The length of the data.
5217
5108
  *
5218
5109
  * @returns
@@ -5229,8 +5120,7 @@ export abstract class IRtcEngine {
5229
5120
  * This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one.The watermark coordinates are dependent on the settings in the setVideoEncoderConfiguration method:If the orientation mode of the encoding video ( OrientationMode ) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.If the orientation mode of the encoding video (OrientationMode) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfiguration method; otherwise, the watermark image will be cropped.Ensure that calling this method after enableVideo .If you only want to add a watermark to the media push, you can call this method or the setLiveTranscoding method.This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray.If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings.If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview.If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
5230
5121
  *
5231
5122
  * @param watermarkUrl The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path.
5232
- *
5233
- * @param options The options of the watermark image to be added.
5123
+ * @param options The options of the watermark image to be added. See WatermarkOptions .
5234
5124
  *
5235
5125
  * @returns
5236
5126
  * 0: Success.< 0: Failure.
@@ -5260,9 +5150,9 @@ export abstract class IRtcEngine {
5260
5150
 
5261
5151
  /**
5262
5152
  * Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios).
5263
- * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.This method enables or disables interoperability with the Agora Web SDK. If the channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios.
5153
+ * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios.
5264
5154
  *
5265
- * @param enabled Whether to enable interoperability with the Agora Web SDK.true: Enable interoperability.false: (Default) Disable interoperability.
5155
+ * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability.
5266
5156
  *
5267
5157
  * @returns
5268
5158
  * 0: Success.< 0: Failure.
@@ -5284,10 +5174,9 @@ export abstract class IRtcEngine {
5284
5174
  /**
5285
5175
  * Registers the metadata observer.
5286
5176
  * You need to implement the IMetadataObserver class and specify the metadata type in this method. This method enables you to add synchronized metadata in the video stream for more diversified
5287
- * live interactive streaming, such as sending shopping links, digital coupons, and online quizzes.Call this method before joinChannel [2/2].
5177
+ * live interactive streaming, such as sending shopping links, digital coupons, and online quizzes.Call this method before joinChannel.
5288
5178
  *
5289
5179
  * @param observer The metadata observer. See IMetadataObserver .
5290
- *
5291
5180
  * @param type The metadata type. The SDK currently only supports VideoMetadata. See MetadataType .
5292
5181
  *
5293
5182
  * @returns
@@ -5299,11 +5188,12 @@ export abstract class IRtcEngine {
5299
5188
  ): number;
5300
5189
 
5301
5190
  /**
5302
- * Unregisters the specified metadata observer.
5303
- *
5304
- * @param type The metadata type. The SDK currently only supports VideoMetadata. See MetadataType .
5191
+ * Registers the metadata observer.
5192
+ * You need to implement the IMetadataObserver class and specify the metadata type in this method. This method enables you to add synchronized metadata in the video stream for more diversified
5193
+ * live interactive streaming, such as sending shopping links, digital coupons, and online quizzes.Call this method before joinChannel.
5305
5194
  *
5306
5195
  * @param observer The metadata observer. See IMetadataObserver .
5196
+ * @param type The metadata type. The SDK currently only supports VideoMetadata. See MetadataType .
5307
5197
  *
5308
5198
  * @returns
5309
5199
  * 0: Success.< 0: Failure.
@@ -5335,13 +5225,17 @@ export abstract class IRtcEngine {
5335
5225
  location: string
5336
5226
  ): number;
5337
5227
 
5228
+ /**
5229
+ * @ignore
5230
+ */
5231
+ abstract setAINSMode(enabled: boolean, mode: AudioAinsMode): number;
5232
+
5338
5233
  /**
5339
5234
  * Registers a user account.
5340
- * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel.After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and user account of the local user.This method is optional. To join a channel with a user account, you can choose either of the following ways:Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel.Call the joinChannelWithUserAccount method to join the channel.The difference between the two ways is that the time elapsed between calling the registerLocalUserAccount method and joining the channel is shorter than directly calling joinChannelWithUserAccount.Ensure that you set the userAccount parameter; otherwise, this method does not take effect.Ensure that the userAccount is unique in the channel.To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5235
+ * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel.After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and account of the local user.This method is optional. To join a channel with a user account, you can choose either of the following ways:Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel.Call the joinChannelWithUserAccount method to join the channel.The difference between the two ways is that the time elapsed between calling the registerLocalUserAccount method and joining the channel is shorter than directly calling joinChannelWithUserAccount.Ensure that you set the userAccount parameter; otherwise, this method does not take effect.Ensure that the userAccount is unique in the channel.To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5341
5236
  *
5342
5237
  * @param appId The App ID of your project on Agora Console.
5343
- *
5344
- * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as NULL. Supported characters are (89 in total):The 26 lowercase English letters: a to z.The 26 uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&amp;", "(", ")", "+", "-", ":", ";", "&lt;", "= ", ".", "&gt;", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5238
+ * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as NULL. Supported characters are as follow(89 in total):The 26 lowercase English letters: a to z.The 26 uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5345
5239
  *
5346
5240
  * @returns
5347
5241
  * 0: Success.< 0: Failure.
@@ -5350,31 +5244,15 @@ export abstract class IRtcEngine {
5350
5244
 
5351
5245
  /**
5352
5246
  * Joins the channel with a user account, and configures whether to automatically subscribe to audio or video streams after joining the channel.
5353
- * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:The local client: onLocalUserRegistered , onJoinChannelSuccess and onConnectionStateChanged callbacks.The remote client: onUserJoined and onUserInfoUpdated , if the user is in the COMMUNICATION profile, or if the user is a host in the LIVE_BROADCASTING profile.Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods.To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5354
- *
5355
- * @param options The channel media options. See ChannelMediaOptions .
5247
+ * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:The local client: onLocalUserRegistered , onJoinChannelSuccess and onConnectionStateChanged callbacks.The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile.Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods.To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5356
5248
  *
5357
5249
  * @param token The token generated on your server for authentication.
5358
- *
5359
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
5360
- * All lowercase English letters: a to z.
5361
- * All uppercase English letters: A to Z.
5362
- * All numeric characters: 0 to 9.
5363
- * Space
5364
- * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5365
- *
5250
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5366
5251
  * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as NULL. Supported characters are (89 in total):The 26 lowercase English letters: a to z.The 26 uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5252
+ * @param options The channel media options. See ChannelMediaOptions .
5367
5253
  *
5368
5254
  * @returns
5369
- * 0: Success.
5370
- * < 0: Failure.
5371
- * -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
5372
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
5373
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
5374
- * -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
5375
- * -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.
5376
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
5377
- * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
5255
+ * 0: Success.< 0: Failure.-2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.-3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.-17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.-102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.-121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
5378
5256
  */
5379
5257
  abstract joinChannelWithUserAccount(
5380
5258
  token: string,
@@ -5385,23 +5263,15 @@ export abstract class IRtcEngine {
5385
5263
 
5386
5264
  /**
5387
5265
  * Joins the channel with a user account, and configures whether to automatically subscribe to audio or video streams after joining the channel.
5388
- * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:The local client: onLocalUserRegistered , onJoinChannelSuccess and onConnectionStateChanged callbacks.The remote client: The onUserJoined callback if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile.Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods.To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5266
+ * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:The local client: onLocalUserRegistered , onJoinChannelSuccess and onConnectionStateChanged callbacks.The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile.Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods.To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5389
5267
  *
5390
5268
  * @param token The token generated on your server for authentication.
5391
- *
5392
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
5393
- * All lowercase English letters: a to z.
5394
- * All uppercase English letters: A to Z.
5395
- * All numeric characters: 0 to 9.
5396
- * Space
5397
- * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5398
- *
5269
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5399
5270
  * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as NULL. Supported characters are (89 in total):The 26 lowercase English letters: a to z.The 26 uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5400
- *
5401
5271
  * @param options The channel media options. See ChannelMediaOptions .
5402
5272
  *
5403
5273
  * @returns
5404
- * 0: Success.< 0: Failure.
5274
+ * 0: Success.< 0: Failure.-2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.-3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.-17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.-102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.-121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
5405
5275
  */
5406
5276
  abstract joinChannelWithUserAccountEx(
5407
5277
  token: string,
@@ -5412,30 +5282,36 @@ export abstract class IRtcEngine {
5412
5282
 
5413
5283
  /**
5414
5284
  * Gets the user information by passing in the User Account.
5415
- * After a remote user joins the channel, the SDK gets the UID and User Account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
5285
+ * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
5416
5286
  *
5417
5287
  * @param userAccount The user account.
5418
5288
  *
5419
5289
  * @returns
5420
- * The UserInfo object that identifies the user information. A pointer to the UserInfo instance, if the method call succeeds.
5421
- * If the call fails, returns NULL.
5290
+ * A pointer to the UserInfo instance, if the method call succeeds.If the call fails, returns NULL.
5422
5291
  */
5423
5292
  abstract getUserInfoByUserAccount(userAccount: string): UserInfo;
5424
5293
 
5425
5294
  /**
5426
5295
  * Gets the user information by passing in the user ID.
5427
- * After a remote user joins the channel, the SDK gets the UID and User Account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
5296
+ * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
5428
5297
  *
5429
5298
  * @param uid The user ID.
5430
5299
  *
5431
5300
  * @returns
5432
- * The UserInfo object that identifies the user information.A pointer to the UserInfo instance, if the method call succeeds.If the call fails, returns NULL.
5301
+ * A pointer to the UserInfo instance, if the method call succeeds.If the call fails, returns NULL.
5433
5302
  */
5434
5303
  abstract getUserInfoByUid(uid: number): UserInfo;
5435
5304
 
5305
+ /**
5306
+ * @ignore
5307
+ */
5308
+ abstract startOrUpdateChannelMediaRelay(
5309
+ configuration: ChannelMediaRelayConfiguration
5310
+ ): number;
5311
+
5436
5312
  /**
5437
5313
  * Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
5438
- * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the destination channel.If the onChannelMediaRelayStateChanged callback returnsRelayStateFailure (3), an exception occurs during the media stream relay.Call this method after joining the channel.This method takes effect only when you are a host in a live streaming channel.After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelay method to quit the current relay.The relaying media streams across channels function needs to be enabled.We do not support string user accounts in this API.
5314
+ * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel.If the onChannelMediaRelayStateChanged callback returnsRelayStateFailure (3), an exception occurs during the media stream relay.Call this method after joining the channel.This method takes effect only when you are a host in a live streaming channel.After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelay method to quit the current relay.The relaying media streams across channels function needs to be enabled by contacting .We do not support string user accounts in this API.
5439
5315
  *
5440
5316
  * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
5441
5317
  *
@@ -5450,7 +5326,7 @@ export abstract class IRtcEngine {
5450
5326
  * Updates the channels for media stream relay.
5451
5327
  * After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method.After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code.Call the method after successfully calling the startChannelMediaRelay method and receiving onChannelMediaRelayStateChanged (RelayStateRunning, RelayOk); otherwise, the method call fails.
5452
5328
  *
5453
- * @param configuration The configuration of the media stream relay.
5329
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
5454
5330
  *
5455
5331
  * @returns
5456
5332
  * 0: Success.< 0: Failure.
@@ -5460,7 +5336,7 @@ export abstract class IRtcEngine {
5460
5336
  ): number;
5461
5337
 
5462
5338
  /**
5463
- * Stops the media stream relay. Once the relay stops, the host quits all the destination channels.
5339
+ * Stops the media stream relay. Once the relay stops, the host quits all the target channels.
5464
5340
  * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports RelayStateIdle (0) and RelayOk (0), the host successfully stops the relay.If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the RelayErrorServerNoResponse (2) or RelayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops.
5465
5341
  *
5466
5342
  * @returns
@@ -5469,8 +5345,8 @@ export abstract class IRtcEngine {
5469
5345
  abstract stopChannelMediaRelay(): number;
5470
5346
 
5471
5347
  /**
5472
- * Pauses the media stream relay to all destination channels.
5473
- * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all destination channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay .After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback to report whether the media stream relay is successfully paused.Call this method after the startChannelMediaRelay method.
5348
+ * Pauses the media stream relay to all target channels.
5349
+ * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay .After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback to report whether the media stream relay is successfully paused.Call this method after startChannelMediaRelay .
5474
5350
  *
5475
5351
  * @returns
5476
5352
  * 0: Success.< 0: Failure.
@@ -5478,12 +5354,21 @@ export abstract class IRtcEngine {
5478
5354
  abstract pauseAllChannelMediaRelay(): number;
5479
5355
 
5480
5356
  /**
5481
- * @ignore
5357
+ * Resumes the media stream relay to all target channels.
5358
+ * After calling the pauseAllChannelMediaRelay method, you can call this method to resume relaying media streams to all destination channels.After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback to report whether the media stream relay is successfully resumed.Call this method after pauseAllChannelMediaRelay .
5359
+ *
5360
+ * @returns
5361
+ * 0: Success.< 0: Failure.
5482
5362
  */
5483
5363
  abstract resumeAllChannelMediaRelay(): number;
5484
5364
 
5485
5365
  /**
5486
- * @ignore
5366
+ * Sets the audio profile of the audio streams directly pushed to the CDN by the host.
5367
+ *
5368
+ * @param profile The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType .
5369
+ *
5370
+ * @returns
5371
+ * < 0: Failure.
5487
5372
  */
5488
5373
  abstract setDirectCdnStreamingAudioConfiguration(
5489
5374
  profile: AudioProfileType
@@ -5497,7 +5382,15 @@ export abstract class IRtcEngine {
5497
5382
  ): number;
5498
5383
 
5499
5384
  /**
5500
- * @ignore
5385
+ * Starts pushing media streams to the CDN directly.
5386
+ * Aogra does not support pushing media streams to one URL repeatedly.Media optionsAgora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options ( DirectCdnStreamingMediaOptions ), you can refer to the following examples:If you want to push audio and video streams published by the host to the CDN, the media setting options should be set as follows:publishCustomAudioTrack is set as true and call the pushAudioFrame methodpublishCustomVideoTrack is set as true and call the pushVideoFrame methodpublishCameraTrack is set as false (the default value)publishMicrophoneTrack is set as false (the default value)
5387
+ *
5388
+ * @param eventHandler See onDirectCdnStreamingStateChanged and onDirectCdnStreamingStats .
5389
+ * @param publishUrl The CDN live streaming URL.
5390
+ * @param options The media setting options for the host. See DirectCdnStreamingMediaOptions .
5391
+ *
5392
+ * @returns
5393
+ * 0: Success.< 0: Failure.
5501
5394
  */
5502
5395
  abstract startDirectCdnStreaming(
5503
5396
  eventHandler: IDirectCdnStreamingEventHandler,
@@ -5506,12 +5399,23 @@ export abstract class IRtcEngine {
5506
5399
  ): number;
5507
5400
 
5508
5401
  /**
5509
- * @ignore
5402
+ * Stops pushing media streams to the CDN directly.
5403
+ *
5404
+ * @returns
5405
+ * 0: Success.< 0: Failure.
5510
5406
  */
5511
5407
  abstract stopDirectCdnStreaming(): number;
5512
5408
 
5513
5409
  /**
5514
- * @ignore
5410
+ * Sets channel options and leaves the channel.
5411
+ * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
5412
+ * If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time.
5413
+ * This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress.After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback.
5414
+ *
5415
+ * @param options The options for leaving the channel. See LeaveChannelOptions .
5416
+ *
5417
+ * @returns
5418
+ * 0: Success.< 0: Failure.
5515
5419
  */
5516
5420
  abstract updateDirectCdnStreamingMediaOptions(
5517
5421
  options: DirectCdnStreamingMediaOptions
@@ -5541,7 +5445,6 @@ export abstract class IRtcEngine {
5541
5445
  * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.Call this method after joining a channel.This method takes a snapshot of the published video stream specified in ChannelMediaOptions .If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
5542
5446
  *
5543
5447
  * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
5544
- *
5545
5448
  * @param filePath The local path (including filename extensions) of the snapshot. For example:Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpgmacOS: ~/Library/Logs/example.jpgEnsure that the path you specify exists and is writable.
5546
5449
  *
5547
5450
  * @returns
@@ -5554,7 +5457,6 @@ export abstract class IRtcEngine {
5554
5457
  * When video screenshot and upload function is enabled, the SDK takes screenshots and upload videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig . After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service.Before calling this method, ensure that the video screenshot upload service has been activated. This method relies on the video screenshot and upload dynamic library libagora_content_inspect_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
5555
5458
  *
5556
5459
  * @param enabled Whether to enable video screenshot and uploadtrue: Enables video screenshot and upload. false: Disables video screenshot and upload.
5557
- *
5558
5460
  * @param config Configuration of video screenshot and upload. See ContentInspectConfig .
5559
5461
  *
5560
5462
  * @returns
@@ -5570,14 +5472,13 @@ export abstract class IRtcEngine {
5570
5472
  * Ensure you have called the setExternalAudioSource method to create an external audio track before calling this method.If you want to change the volume of the audio to be published, you need to call this method again.
5571
5473
  *
5572
5474
  * @param sourceId The ID of external audio source. If you want to publish a custom external audio source, set this parameter to the ID of the corresponding custom audio track you want to publish.
5573
- *
5574
5475
  * @param volume The volume of the audio source. The value can range from 0 to 100. 0 means mute; 100 means the original volume.
5575
5476
  *
5576
5477
  * @returns
5577
5478
  * 0: Success.< 0: Failure.
5578
5479
  */
5579
5480
  abstract adjustCustomAudioPublishVolume(
5580
- sourceId: number,
5481
+ trackId: number,
5581
5482
  volume: number
5582
5483
  ): number;
5583
5484
 
@@ -5585,13 +5486,13 @@ export abstract class IRtcEngine {
5585
5486
  * @ignore
5586
5487
  */
5587
5488
  abstract adjustCustomAudioPlayoutVolume(
5588
- sourceId: number,
5489
+ trackId: number,
5589
5490
  volume: number
5590
5491
  ): number;
5591
5492
 
5592
5493
  /**
5593
- * Sets the Agora cloud proxy service.
5594
- * When users' network access is restricted by a firewall, configure the firewall to allow specific IP addresses and ports provided by Agora; then, call this method to enable the cloud proxy and set the cloud proxy type with the proxyType parameter.After successfully connecting to the cloud proxy, the SDK triggers the onConnectionStateChanged (ConnectionStateConnecting, ConnectionChangedSettingProxyServer) callback.To disable the cloud proxy that has been set, call the setCloudProxy (NoneProxy).To change the cloud proxy type that has been set, call the setCloudProxy (NoneProxy) first, and then call the setCloudProxy to set the proxyType you want.Agora recommends that you call this method before joining the channel or after leaving the channel.When a user is behind a firewall and uses the Force UDP cloud proxy, the services for the Media Push and cohosting across channels are not available.When you use the Force TCP cloud proxy, note that an error would occur when calling the startAudioMixing method to play online music files in the HTTP protocol. The services for the Media Push and cohosting across channels use the cloud proxy with the TCP protocol.
5494
+ * Sets up cloud proxy service.
5495
+ * When users' network access is restricted by a firewall, configure the firewall to allow specific IP addresses and ports provided by Agora; then, call this method to enable the cloud proxyType and set the cloud proxy type with the proxyType parameter.After successfully connecting to the cloud proxy, the SDK triggers the onConnectionStateChanged (ConnectionStateConnecting, ConnectionChangedSettingProxyServer) callback.To disable the cloud proxy that has been set, call the setCloudProxy (NoneProxy).To change the cloud proxy type that has been set, call the setCloudProxy (NoneProxy) first, and then call the setCloudProxy to set the proxyType you want.Agora recommends that you call this method after joining a channel.When a user is behind a firewall and uses the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available.When you use the Force TCP cloud proxy, note that an error would occur when calling the startAudioMixing method to play online music files in the HTTP protocol. The services for Media Push and cohosting across channels use the cloud proxy with the TCP protocol.
5595
5496
  *
5596
5497
  * @param proxyType The type of the cloud proxy. See CloudProxyType .This parameter is mandatory. The SDK reports an error if you do not pass in a value.
5597
5498
  *
@@ -5607,9 +5508,12 @@ export abstract class IRtcEngine {
5607
5508
 
5608
5509
  /**
5609
5510
  * Sets audio advanced options.
5610
- * If you have advanced audio processing requirements, such as capturing and sending stereo audio, you can call this method to set advanced audio options.Call this method after calling joinChannel [2/2] , enableAudio and enableLocalAudio .
5511
+ * If you have advanced audio processing requirements, such as capturing and sending stereo audio, you can call this method to set advanced audio options.Call this method after calling joinChannel , enableAudio and enableLocalAudio .
5611
5512
  *
5612
5513
  * @param options The advanced options for audio. See AdvancedAudioOptions .
5514
+ *
5515
+ * @returns
5516
+ * 0: Success.< 0: Failure.
5613
5517
  */
5614
5518
  abstract setAdvancedAudioOptions(
5615
5519
  options: AdvancedAudioOptions,
@@ -5626,7 +5530,6 @@ export abstract class IRtcEngine {
5626
5530
  * Agora recommends that you call this method after joining a channel.When publishing video streams, you can call this method to replace the current video feeds with custom images.Once you enable this function, you can select images to replace the video feeds through the ImageTrackOptions parameter. If you disable this function, the remote users see the video feeds that you publish.
5627
5531
  *
5628
5532
  * @param enable Whether to replace the current video feeds with custom images:true: Replace the current video feeds with custom images.false: (Default) Do not replace the current video feeds with custom images.
5629
- *
5630
5533
  * @param options Image configurations. See ImageTrackOptions .
5631
5534
  *
5632
5535
  * @returns
@@ -5643,7 +5546,13 @@ export abstract class IRtcEngine {
5643
5546
  abstract getCurrentMonotonicTimeInMs(): number;
5644
5547
 
5645
5548
  /**
5646
- * @ignore
5549
+ * Enables/Disables the local video capture.
5550
+ * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
5551
+ *
5552
+ * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
5553
+ *
5554
+ * @returns
5555
+ * 0: Success.< 0: Failure.
5647
5556
  */
5648
5557
  abstract enableWirelessAccelerate(enabled: boolean): number;
5649
5558
 
@@ -5677,31 +5586,9 @@ export abstract class IRtcEngine {
5677
5586
  abstract enableInstantMediaRendering(): number;
5678
5587
 
5679
5588
  /**
5680
- * Destroys a video renderer object.
5681
- *
5682
- * @param view The HTMLElement object to be destroyed.
5683
- */
5684
- abstract destroyRendererByView(view: any): void;
5685
-
5686
- /**
5687
- * Destroys multiple video renderer objects at one time.
5688
- *
5689
- * @param sourceType The type of the video frame, see VideoSourceType .
5690
- *
5691
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
5692
- * All lowercase English letters: a to z.
5693
- * All uppercase English letters: A to Z.
5694
- * All numeric characters: 0 to 9.
5695
- * Space
5696
- * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5697
- *
5698
- * @param uid The user ID of the remote user.
5589
+ * @ignore
5699
5590
  */
5700
- abstract destroyRendererByConfig(
5701
- sourceType: VideoSourceType,
5702
- channelId?: string,
5703
- uid?: number
5704
- ): void;
5591
+ abstract getNtpWallTimeInMs(): number;
5705
5592
 
5706
5593
  /**
5707
5594
  * Gets the IAudioDeviceManager object to manage audio devices.
@@ -5736,15 +5623,6 @@ export abstract class IRtcEngine {
5736
5623
  */
5737
5624
  abstract getMediaEngine(): IMediaEngine;
5738
5625
 
5739
- /**
5740
- * Gets one IMediaRecorder object.
5741
- * Make sure the IRtcEngine is initialized before you call this method.
5742
- *
5743
- * @returns
5744
- * One IMediaRecorder object.
5745
- */
5746
- abstract getMediaRecorder(): IMediaRecorder;
5747
-
5748
5626
  /**
5749
5627
  * Gets one ILocalSpatialAudioEngine object.
5750
5628
  * Make sure the IRtcEngine is initialized before you call this method.
@@ -5755,13 +5633,12 @@ export abstract class IRtcEngine {
5755
5633
  abstract getLocalSpatialAudioEngine(): ILocalSpatialAudioEngine;
5756
5634
 
5757
5635
  /**
5758
- * Sends media affiliate information.
5759
- * If the media attachment information is successfully sent, the receiver will receive the onMetadataReceived callback.
5636
+ * Sends media metadata.
5637
+ * If the metadata is sent successfully, the SDK triggers the onMetadataReceived callback on the receiver.
5760
5638
  *
5639
+ * @param metadata Media metadata See Metadata .
5761
5640
  * @param sourceType The type of the video frame, see VideoSourceType .
5762
5641
  *
5763
- * @param metadata Media metadata. See Metadata .
5764
- *
5765
5642
  * @returns
5766
5643
  * 0: Success.< 0: Failure.
5767
5644
  */
@@ -5771,16 +5648,36 @@ export abstract class IRtcEngine {
5771
5648
  ): number;
5772
5649
 
5773
5650
  /**
5774
- * Sets the maximum size of media metadata information.
5775
- * After calling registerMediaMetadataObserver , you can call this method to set the maximum size of media metadata information.
5651
+ * Sets the maximum size of the media metadata.
5652
+ * After calling registerMediaMetadataObserver , you can call this method to set the maximum size of the media metadata.
5776
5653
  *
5777
- * @param size Sets the maximum size of media metadata information.
5654
+ * @param size The maximum size of media metadata.
5778
5655
  *
5779
5656
  * @returns
5780
5657
  * 0: Success.< 0: Failure.
5781
5658
  */
5782
5659
  abstract setMaxMetadataSize(size: number): number;
5783
5660
 
5661
+ /**
5662
+ * Destroys a video renderer object.
5663
+ *
5664
+ * @param view The HTMLElement object to be destroyed.
5665
+ */
5666
+ abstract destroyRendererByView(view: any): void;
5667
+
5668
+ /**
5669
+ * Destroys multiple video renderer objects at one time.
5670
+ *
5671
+ * @param sourceType The type of the video frame, see VideoSourceType .
5672
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5673
+ * @param uid The user ID of the remote user.
5674
+ */
5675
+ abstract destroyRendererByConfig(
5676
+ sourceType: VideoSourceType,
5677
+ channelId?: string,
5678
+ uid?: number
5679
+ ): void;
5680
+
5784
5681
  /**
5785
5682
  * Unregisters the encoded audio frame observer.
5786
5683
  *