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,96 +1,100 @@
1
- import { callIrisApi } from '../internal/IrisApiEngine';
2
- import {
3
- IRtcEngineEventHandler,
4
- IVideoDeviceManager,
5
- VideoDeviceInfo,
6
- IMetadataObserver,
7
- IDirectCdnStreamingEventHandler,
8
- IRtcEngine,
9
- RtcEngineContext,
10
- SDKBuildInfo,
11
- ChannelMediaOptions,
12
- LeaveChannelOptions,
13
- CameraCapturerConfiguration,
14
- AudioEqualizationBandFrequency,
15
- AudioReverbType,
16
- AudioTrackConfig,
17
- StreamFallbackOptions,
18
- Size,
19
- ScreenCaptureSourceInfo,
20
- ScreenCaptureConfiguration,
21
- PriorityType,
22
- MetadataType,
23
- DirectCdnStreamingMediaOptions,
24
- CloudProxyType,
25
- LocalAccessPointConfiguration,
26
- AdvancedAudioOptions,
27
- ImageTrackOptions,
28
- Metadata,
29
- } from '../IAgoraRtcEngine';
30
1
  import {
31
- VideoFormat,
2
+ AudioAinsMode,
3
+ AudioEffectPreset,
4
+ AudioEncodedFrameObserverConfig,
5
+ AudioProfileType,
6
+ AudioRecordingConfiguration,
7
+ AudioScenarioType,
8
+ AudioSessionOperationRestriction,
9
+ BeautyOptions,
10
+ ChannelMediaRelayConfiguration,
32
11
  ChannelProfileType,
33
- ClientRoleType,
34
12
  ClientRoleOptions,
35
- VideoSourceType,
13
+ ClientRoleType,
14
+ CodecCapInfo,
15
+ ColorEnhanceOptions,
16
+ ConnectionStateType,
17
+ DataStreamConfig,
18
+ DeviceInfo,
19
+ EarMonitoringFilterType,
20
+ EchoTestConfiguration,
21
+ EncryptionConfig,
22
+ HeadphoneEqualizerPreset,
23
+ IAudioEncodedFrameObserver,
36
24
  LastmileProbeConfig,
37
- VideoEncoderConfiguration,
38
- BeautyOptions,
25
+ LiveTranscoding,
26
+ LocalTranscoderConfiguration,
39
27
  LowlightEnhanceOptions,
40
- VideoDenoiserOptions,
41
- ColorEnhanceOptions,
42
- VirtualBackgroundSource,
28
+ RecorderStreamInfo,
29
+ Rectangle,
30
+ ScreenCaptureParameters,
31
+ ScreenCaptureParameters2,
32
+ ScreenScenarioType,
43
33
  SegmentationProperty,
34
+ SenderOptions,
35
+ SimulcastStreamConfig,
36
+ SimulcastStreamMode,
37
+ SpatialAudioParams,
38
+ UserInfo,
39
+ VideoApplicationScenarioType,
44
40
  VideoCanvas,
45
- AudioProfileType,
46
- AudioScenarioType,
41
+ VideoContentHint,
42
+ VideoDenoiserOptions,
43
+ VideoEncoderConfiguration,
44
+ VideoFormat,
45
+ VideoMirrorModeType,
46
+ VideoOrientation,
47
47
  VideoStreamType,
48
48
  VideoSubscriptionOptions,
49
- AudioRecordingConfiguration,
50
- AudioEncodedFrameObserverConfig,
51
- IAudioEncodedFrameObserver,
52
- SpatialAudioParams,
49
+ VirtualBackgroundSource,
53
50
  VoiceBeautifierPreset,
54
- AudioEffectPreset,
55
51
  VoiceConversionPreset,
56
- HeadphoneEqualizerPreset,
57
- VideoMirrorModeType,
58
- SimulcastStreamConfig,
59
- SimulcastStreamMode,
60
- EarMonitoringFilterType,
61
- SenderOptions,
62
- AudioSessionOperationRestriction,
63
- Rectangle,
64
- ScreenCaptureParameters,
65
- DeviceInfo,
66
- VideoContentHint,
67
- ScreenScenarioType,
68
- ScreenCaptureParameters2,
69
- LiveTranscoding,
70
- LocalTranscoderConfiguration,
71
- VideoOrientation,
72
- ConnectionStateType,
73
- EncryptionConfig,
74
- DataStreamConfig,
75
52
  WatermarkOptions,
76
- UserInfo,
77
- ChannelMediaRelayConfiguration,
78
53
  } from '../AgoraBase';
79
54
  import {
55
+ ContentInspectConfig,
56
+ IAudioSpectrumObserver,
80
57
  MediaSourceType,
81
- RenderModeType,
82
58
  RawAudioFrameOpModeType,
83
- IAudioSpectrumObserver,
84
- ContentInspectConfig,
59
+ RenderModeType,
60
+ VideoSourceType,
85
61
  } from '../AgoraMediaBase';
86
- import { IMediaPlayer } from '../IAgoraMediaPlayer';
87
- import { AudioMixingDualMonoMode, IMediaEngine } from '../IAgoraMediaEngine';
88
62
  import { LogFilterType, LogLevel } from '../IAgoraLog';
89
- import { AgoraRhythmPlayerConfig } from '../IAgoraRhythmPlayer';
90
- import { IAudioDeviceManager } from '../IAudioDeviceManager';
91
- import { IMusicContentCenter } from '../IAgoraMusicContentCenter';
63
+ import { AudioMixingDualMonoMode, IMediaEngine } from '../IAgoraMediaEngine';
64
+ import { IMediaPlayer } from '../IAgoraMediaPlayer';
92
65
  import { IMediaRecorder } from '../IAgoraMediaRecorder';
66
+ import { IMusicContentCenter } from '../IAgoraMusicContentCenter';
67
+ import { AgoraRhythmPlayerConfig } from '../IAgoraRhythmPlayer';
68
+ import {
69
+ AdvancedAudioOptions,
70
+ AudioEqualizationBandFrequency,
71
+ AudioReverbType,
72
+ CameraCapturerConfiguration,
73
+ ChannelMediaOptions,
74
+ CloudProxyType,
75
+ DirectCdnStreamingMediaOptions,
76
+ IDirectCdnStreamingEventHandler,
77
+ IMetadataObserver,
78
+ IRtcEngine,
79
+ IRtcEngineEventHandler,
80
+ IVideoDeviceManager,
81
+ ImageTrackOptions,
82
+ LeaveChannelOptions,
83
+ LocalAccessPointConfiguration,
84
+ Metadata,
85
+ MetadataType,
86
+ PriorityType,
87
+ RtcEngineContext,
88
+ SDKBuildInfo,
89
+ ScreenCaptureConfiguration,
90
+ ScreenCaptureSourceInfo,
91
+ Size,
92
+ StreamFallbackOptions,
93
+ VideoDeviceInfo,
94
+ } from '../IAgoraRtcEngine';
93
95
  import { ILocalSpatialAudioEngine } from '../IAgoraSpatialAudio';
96
+ import { IAudioDeviceManager } from '../IAudioDeviceManager';
97
+
94
98
  export function processIRtcEngineEventHandler(
95
99
  handler: IRtcEngineEventHandler,
96
100
  event: string,
@@ -247,7 +251,7 @@ export function processIRtcEngineEventHandler(
247
251
  case 'onFirstLocalVideoFrame':
248
252
  if (handler.onFirstLocalVideoFrame !== undefined) {
249
253
  handler.onFirstLocalVideoFrame(
250
- jsonParams.connection,
254
+ jsonParams.source,
251
255
  jsonParams.width,
252
256
  jsonParams.height,
253
257
  jsonParams.elapsed
@@ -393,16 +397,6 @@ export function processIRtcEngineEventHandler(
393
397
  }
394
398
  break;
395
399
 
396
- case 'onApiCallExecuted':
397
- if (handler.onApiCallExecuted !== undefined) {
398
- handler.onApiCallExecuted(
399
- jsonParams.err,
400
- jsonParams.api,
401
- jsonParams.result
402
- );
403
- }
404
- break;
405
-
406
400
  case 'onLocalAudioStats':
407
401
  if (handler.onLocalAudioStats !== undefined) {
408
402
  handler.onLocalAudioStats(jsonParams.connection, jsonParams.stats);
@@ -910,6 +904,15 @@ export function processIRtcEngineEventHandler(
910
904
  }
911
905
  break;
912
906
 
907
+ case 'onLocalVideoTranscoderError':
908
+ if (handler.onLocalVideoTranscoderError !== undefined) {
909
+ handler.onLocalVideoTranscoderError(
910
+ jsonParams.stream,
911
+ jsonParams.error
912
+ );
913
+ }
914
+ break;
915
+
913
916
  case 'onVideoRenderingTracingResult':
914
917
  if (handler.onVideoRenderingTracingResult !== undefined) {
915
918
  handler.onVideoRenderingTracingResult(
@@ -998,6 +1001,7 @@ export class IVideoDeviceManagerImpl implements IVideoDeviceManager {
998
1001
  toJSON: () => {
999
1002
  return {
1000
1003
  deviceIdUTF8: deviceIdUTF8,
1004
+ deviceCapabilityNumber: deviceCapabilityNumber,
1001
1005
  };
1002
1006
  },
1003
1007
  };
@@ -1093,7 +1097,7 @@ export function processIDirectCdnStreamingEventHandler(
1093
1097
 
1094
1098
  // @ts-ignore
1095
1099
  export class IRtcEngineImpl implements IRtcEngine {
1096
- release(sync = false): void {
1100
+ release(sync: boolean = false): void {
1097
1101
  const apiType = this.getApiTypeFromRelease(sync);
1098
1102
  const jsonParams = {
1099
1103
  sync: sync,
@@ -1106,7 +1110,7 @@ export class IRtcEngineImpl implements IRtcEngine {
1106
1110
  callIrisApi.call(this, apiType, jsonParams);
1107
1111
  }
1108
1112
 
1109
- protected getApiTypeFromRelease(sync = false): string {
1113
+ protected getApiTypeFromRelease(sync: boolean = false): string {
1110
1114
  return 'RtcEngine_release';
1111
1115
  }
1112
1116
 
@@ -1157,6 +1161,22 @@ export class IRtcEngineImpl implements IRtcEngine {
1157
1161
  return 'RtcEngine_getErrorDescription';
1158
1162
  }
1159
1163
 
1164
+ queryCodecCapability(): { codecInfo: CodecCapInfo[]; size: number } {
1165
+ const apiType = this.getApiTypeFromQueryCodecCapability();
1166
+ const jsonParams = {};
1167
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1168
+ const codecInfo = jsonResults.codecInfo;
1169
+ const size = jsonResults.size;
1170
+ return {
1171
+ codecInfo,
1172
+ size,
1173
+ };
1174
+ }
1175
+
1176
+ protected getApiTypeFromQueryCodecCapability(): string {
1177
+ return 'RtcEngine_queryCodecCapability';
1178
+ }
1179
+
1160
1180
  joinChannel(
1161
1181
  token: string,
1162
1182
  channelId: string,
@@ -1295,13 +1315,13 @@ export class IRtcEngineImpl implements IRtcEngine {
1295
1315
  return 'RtcEngine_setClientRole';
1296
1316
  }
1297
1317
 
1298
- startEchoTest(intervalInSeconds = 10): number {
1299
- const apiType = this.getApiTypeFromStartEchoTest(intervalInSeconds);
1318
+ startEchoTest(config: EchoTestConfiguration): number {
1319
+ const apiType = this.getApiTypeFromStartEchoTest(config);
1300
1320
  const jsonParams = {
1301
- intervalInSeconds: intervalInSeconds,
1321
+ config: config,
1302
1322
  toJSON: () => {
1303
1323
  return {
1304
- intervalInSeconds: intervalInSeconds,
1324
+ config: config,
1305
1325
  };
1306
1326
  },
1307
1327
  };
@@ -1309,7 +1329,7 @@ export class IRtcEngineImpl implements IRtcEngine {
1309
1329
  return jsonResults.result;
1310
1330
  }
1311
1331
 
1312
- protected getApiTypeFromStartEchoTest(intervalInSeconds = 10): string {
1332
+ protected getApiTypeFromStartEchoTest(config: EchoTestConfiguration): string {
1313
1333
  return 'RtcEngine_startEchoTest';
1314
1334
  }
1315
1335
 
@@ -1678,6 +1698,26 @@ export class IRtcEngineImpl implements IRtcEngine {
1678
1698
  return 'RtcEngine_setupLocalVideo';
1679
1699
  }
1680
1700
 
1701
+ setVideoScenario(scenarioType: VideoApplicationScenarioType): number {
1702
+ const apiType = this.getApiTypeFromSetVideoScenario(scenarioType);
1703
+ const jsonParams = {
1704
+ scenarioType: scenarioType,
1705
+ toJSON: () => {
1706
+ return {
1707
+ scenarioType: scenarioType,
1708
+ };
1709
+ },
1710
+ };
1711
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1712
+ return jsonResults.result;
1713
+ }
1714
+
1715
+ protected getApiTypeFromSetVideoScenario(
1716
+ scenarioType: VideoApplicationScenarioType
1717
+ ): string {
1718
+ return 'RtcEngine_setVideoScenario';
1719
+ }
1720
+
1681
1721
  enableAudio(): number {
1682
1722
  const apiType = this.getApiTypeFromEnableAudio();
1683
1723
  const jsonParams = {};
@@ -2244,11 +2284,49 @@ export class IRtcEngineImpl implements IRtcEngine {
2244
2284
  return 'RtcEngine_destroyMediaPlayer';
2245
2285
  }
2246
2286
 
2287
+ createMediaRecorder(info: RecorderStreamInfo): IMediaRecorder {
2288
+ const apiType = this.getApiTypeFromCreateMediaRecorder(info);
2289
+ const jsonParams = {
2290
+ info: info,
2291
+ toJSON: () => {
2292
+ return {
2293
+ info: info,
2294
+ };
2295
+ },
2296
+ };
2297
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
2298
+ return jsonResults.result;
2299
+ }
2300
+
2301
+ protected getApiTypeFromCreateMediaRecorder(
2302
+ info: RecorderStreamInfo
2303
+ ): string {
2304
+ return 'RtcEngine_createMediaRecorder';
2305
+ }
2306
+
2307
+ destroyMediaRecorder(mediaRecorder: IMediaRecorder): number {
2308
+ const apiType = this.getApiTypeFromDestroyMediaRecorder(mediaRecorder);
2309
+ const jsonParams = {
2310
+ mediaRecorder: mediaRecorder,
2311
+ toJSON: () => {
2312
+ return {};
2313
+ },
2314
+ };
2315
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
2316
+ return jsonResults.result;
2317
+ }
2318
+
2319
+ protected getApiTypeFromDestroyMediaRecorder(
2320
+ mediaRecorder: IMediaRecorder
2321
+ ): string {
2322
+ return 'RtcEngine_destroyMediaRecorder';
2323
+ }
2324
+
2247
2325
  startAudioMixing(
2248
2326
  filePath: string,
2249
2327
  loopback: boolean,
2250
2328
  cycle: number,
2251
- startPos = 0
2329
+ startPos: number = 0
2252
2330
  ): number {
2253
2331
  const apiType = this.getApiTypeFromStartAudioMixing(
2254
2332
  filePath,
@@ -2278,7 +2356,7 @@ export class IRtcEngineImpl implements IRtcEngine {
2278
2356
  filePath: string,
2279
2357
  loopback: boolean,
2280
2358
  cycle: number,
2281
- startPos = 0
2359
+ startPos: number = 0
2282
2360
  ): string {
2283
2361
  return 'RtcEngine_startAudioMixing';
2284
2362
  }
@@ -2532,7 +2610,11 @@ export class IRtcEngineImpl implements IRtcEngine {
2532
2610
  return 'RtcEngine_setEffectsVolume';
2533
2611
  }
2534
2612
 
2535
- preloadEffect(soundId: number, filePath: string, startPos = 0): number {
2613
+ preloadEffect(
2614
+ soundId: number,
2615
+ filePath: string,
2616
+ startPos: number = 0
2617
+ ): number {
2536
2618
  const apiType = this.getApiTypeFromPreloadEffect(
2537
2619
  soundId,
2538
2620
  filePath,
@@ -2557,7 +2639,7 @@ export class IRtcEngineImpl implements IRtcEngine {
2557
2639
  protected getApiTypeFromPreloadEffect(
2558
2640
  soundId: number,
2559
2641
  filePath: string,
2560
- startPos = 0
2642
+ startPos: number = 0
2561
2643
  ): string {
2562
2644
  return 'RtcEngine_preloadEffect';
2563
2645
  }
@@ -2569,8 +2651,8 @@ export class IRtcEngineImpl implements IRtcEngine {
2569
2651
  pitch: number,
2570
2652
  pan: number,
2571
2653
  gain: number,
2572
- publish = false,
2573
- startPos = 0
2654
+ publish: boolean = false,
2655
+ startPos: number = 0
2574
2656
  ): number {
2575
2657
  const apiType = this.getApiTypeFromPlayEffect(
2576
2658
  soundId,
@@ -2615,8 +2697,8 @@ export class IRtcEngineImpl implements IRtcEngine {
2615
2697
  pitch: number,
2616
2698
  pan: number,
2617
2699
  gain: number,
2618
- publish = false,
2619
- startPos = 0
2700
+ publish: boolean = false,
2701
+ startPos: number = 0
2620
2702
  ): string {
2621
2703
  return 'RtcEngine_playEffect';
2622
2704
  }
@@ -2626,7 +2708,7 @@ export class IRtcEngineImpl implements IRtcEngine {
2626
2708
  pitch: number,
2627
2709
  pan: number,
2628
2710
  gain: number,
2629
- publish = false
2711
+ publish: boolean = false
2630
2712
  ): number {
2631
2713
  const apiType = this.getApiTypeFromPlayAllEffects(
2632
2714
  loopCount,
@@ -2660,7 +2742,7 @@ export class IRtcEngineImpl implements IRtcEngine {
2660
2742
  pitch: number,
2661
2743
  pan: number,
2662
2744
  gain: number,
2663
- publish = false
2745
+ publish: boolean = false
2664
2746
  ): string {
2665
2747
  return 'RtcEngine_playAllEffects';
2666
2748
  }
@@ -3154,6 +3236,24 @@ export class IRtcEngineImpl implements IRtcEngine {
3154
3236
  return 'RtcEngine_setLocalVoicePitch';
3155
3237
  }
3156
3238
 
3239
+ setLocalVoiceFormant(formantRatio: number): number {
3240
+ const apiType = this.getApiTypeFromSetLocalVoiceFormant(formantRatio);
3241
+ const jsonParams = {
3242
+ formantRatio: formantRatio,
3243
+ toJSON: () => {
3244
+ return {
3245
+ formantRatio: formantRatio,
3246
+ };
3247
+ },
3248
+ };
3249
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3250
+ return jsonResults.result;
3251
+ }
3252
+
3253
+ protected getApiTypeFromSetLocalVoiceFormant(formantRatio: number): string {
3254
+ return 'RtcEngine_setLocalVoiceFormant';
3255
+ }
3256
+
3157
3257
  setLocalVoiceEqualization(
3158
3258
  bandFrequency: AudioEqualizationBandFrequency,
3159
3259
  bandGain: number
@@ -3480,21 +3580,18 @@ export class IRtcEngineImpl implements IRtcEngine {
3480
3580
  return 'RtcEngine_setDualStreamMode';
3481
3581
  }
3482
3582
 
3483
- enableEchoCancellationExternal(
3484
- enabled: boolean,
3485
- audioSourceDelay: number
3486
- ): number {
3487
- const apiType = this.getApiTypeFromEnableEchoCancellationExternal(
3488
- enabled,
3489
- audioSourceDelay
3583
+ enableCustomAudioLocalPlayback(trackId: number, enabled: boolean): number {
3584
+ const apiType = this.getApiTypeFromEnableCustomAudioLocalPlayback(
3585
+ trackId,
3586
+ enabled
3490
3587
  );
3491
3588
  const jsonParams = {
3589
+ trackId: trackId,
3492
3590
  enabled: enabled,
3493
- audioSourceDelay: audioSourceDelay,
3494
3591
  toJSON: () => {
3495
3592
  return {
3593
+ trackId: trackId,
3496
3594
  enabled: enabled,
3497
- audioSourceDelay: audioSourceDelay,
3498
3595
  };
3499
3596
  },
3500
3597
  };
@@ -3502,25 +3599,36 @@ export class IRtcEngineImpl implements IRtcEngine {
3502
3599
  return jsonResults.result;
3503
3600
  }
3504
3601
 
3505
- protected getApiTypeFromEnableEchoCancellationExternal(
3506
- enabled: boolean,
3507
- audioSourceDelay: number
3602
+ protected getApiTypeFromEnableCustomAudioLocalPlayback(
3603
+ trackId: number,
3604
+ enabled: boolean
3508
3605
  ): string {
3509
- return 'RtcEngine_enableEchoCancellationExternal';
3606
+ return 'RtcEngine_enableCustomAudioLocalPlayback';
3510
3607
  }
3511
3608
 
3512
- enableCustomAudioLocalPlayback(sourceId: number, enabled: boolean): number {
3513
- const apiType = this.getApiTypeFromEnableCustomAudioLocalPlayback(
3514
- sourceId,
3515
- enabled
3609
+ setRecordingAudioFrameParameters(
3610
+ sampleRate: number,
3611
+ channel: number,
3612
+ mode: RawAudioFrameOpModeType,
3613
+ samplesPerCall: number
3614
+ ): number {
3615
+ const apiType = this.getApiTypeFromSetRecordingAudioFrameParameters(
3616
+ sampleRate,
3617
+ channel,
3618
+ mode,
3619
+ samplesPerCall
3516
3620
  );
3517
3621
  const jsonParams = {
3518
- sourceId: sourceId,
3519
- enabled: enabled,
3622
+ sampleRate: sampleRate,
3623
+ channel: channel,
3624
+ mode: mode,
3625
+ samplesPerCall: samplesPerCall,
3520
3626
  toJSON: () => {
3521
3627
  return {
3522
- sourceId: sourceId,
3523
- enabled: enabled,
3628
+ sampleRate: sampleRate,
3629
+ channel: channel,
3630
+ mode: mode,
3631
+ samplesPerCall: samplesPerCall,
3524
3632
  };
3525
3633
  },
3526
3634
  };
@@ -3528,110 +3636,11 @@ export class IRtcEngineImpl implements IRtcEngine {
3528
3636
  return jsonResults.result;
3529
3637
  }
3530
3638
 
3531
- protected getApiTypeFromEnableCustomAudioLocalPlayback(
3532
- sourceId: number,
3533
- enabled: boolean
3534
- ): string {
3535
- return 'RtcEngine_enableCustomAudioLocalPlayback';
3536
- }
3537
-
3538
- startPrimaryCustomAudioTrack(config: AudioTrackConfig): number {
3539
- const apiType = this.getApiTypeFromStartPrimaryCustomAudioTrack(config);
3540
- const jsonParams = {
3541
- config: config,
3542
- toJSON: () => {
3543
- return {
3544
- config: config,
3545
- };
3546
- },
3547
- };
3548
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3549
- return jsonResults.result;
3550
- }
3551
-
3552
- protected getApiTypeFromStartPrimaryCustomAudioTrack(
3553
- config: AudioTrackConfig
3554
- ): string {
3555
- return 'RtcEngine_startPrimaryCustomAudioTrack';
3556
- }
3557
-
3558
- stopPrimaryCustomAudioTrack(): number {
3559
- const apiType = this.getApiTypeFromStopPrimaryCustomAudioTrack();
3560
- const jsonParams = {};
3561
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3562
- return jsonResults.result;
3563
- }
3564
-
3565
- protected getApiTypeFromStopPrimaryCustomAudioTrack(): string {
3566
- return 'RtcEngine_stopPrimaryCustomAudioTrack';
3567
- }
3568
-
3569
- startSecondaryCustomAudioTrack(config: AudioTrackConfig): number {
3570
- const apiType = this.getApiTypeFromStartSecondaryCustomAudioTrack(config);
3571
- const jsonParams = {
3572
- config: config,
3573
- toJSON: () => {
3574
- return {
3575
- config: config,
3576
- };
3577
- },
3578
- };
3579
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3580
- return jsonResults.result;
3581
- }
3582
-
3583
- protected getApiTypeFromStartSecondaryCustomAudioTrack(
3584
- config: AudioTrackConfig
3585
- ): string {
3586
- return 'RtcEngine_startSecondaryCustomAudioTrack';
3587
- }
3588
-
3589
- stopSecondaryCustomAudioTrack(): number {
3590
- const apiType = this.getApiTypeFromStopSecondaryCustomAudioTrack();
3591
- const jsonParams = {};
3592
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3593
- return jsonResults.result;
3594
- }
3595
-
3596
- protected getApiTypeFromStopSecondaryCustomAudioTrack(): string {
3597
- return 'RtcEngine_stopSecondaryCustomAudioTrack';
3598
- }
3599
-
3600
- setRecordingAudioFrameParameters(
3601
- sampleRate: number,
3602
- channel: number,
3603
- mode: RawAudioFrameOpModeType,
3604
- samplesPerCall: number
3605
- ): number {
3606
- const apiType = this.getApiTypeFromSetRecordingAudioFrameParameters(
3607
- sampleRate,
3608
- channel,
3609
- mode,
3610
- samplesPerCall
3611
- );
3612
- const jsonParams = {
3613
- sampleRate: sampleRate,
3614
- channel: channel,
3615
- mode: mode,
3616
- samplesPerCall: samplesPerCall,
3617
- toJSON: () => {
3618
- return {
3619
- sampleRate: sampleRate,
3620
- channel: channel,
3621
- mode: mode,
3622
- samplesPerCall: samplesPerCall,
3623
- };
3624
- },
3625
- };
3626
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3627
- return jsonResults.result;
3628
- }
3629
-
3630
- protected getApiTypeFromSetRecordingAudioFrameParameters(
3631
- sampleRate: number,
3632
- channel: number,
3633
- mode: RawAudioFrameOpModeType,
3634
- samplesPerCall: number
3639
+ protected getApiTypeFromSetRecordingAudioFrameParameters(
3640
+ sampleRate: number,
3641
+ channel: number,
3642
+ mode: RawAudioFrameOpModeType,
3643
+ samplesPerCall: number
3635
3644
  ): string {
3636
3645
  return 'RtcEngine_setRecordingAudioFrameParameters';
3637
3646
  }
@@ -3778,7 +3787,7 @@ export class IRtcEngineImpl implements IRtcEngine {
3778
3787
  return 'RtcEngine_setPlaybackAudioFrameBeforeMixingParameters';
3779
3788
  }
3780
3789
 
3781
- enableAudioSpectrumMonitor(intervalInMS = 100): number {
3790
+ enableAudioSpectrumMonitor(intervalInMS: number = 100): number {
3782
3791
  const apiType = this.getApiTypeFromEnableAudioSpectrumMonitor(intervalInMS);
3783
3792
  const jsonParams = {
3784
3793
  intervalInMS: intervalInMS,
@@ -3793,7 +3802,7 @@ export class IRtcEngineImpl implements IRtcEngine {
3793
3802
  }
3794
3803
 
3795
3804
  protected getApiTypeFromEnableAudioSpectrumMonitor(
3796
- intervalInMS = 100
3805
+ intervalInMS: number = 100
3797
3806
  ): string {
3798
3807
  return 'RtcEngine_enableAudioSpectrumMonitor';
3799
3808
  }
@@ -3966,6 +3975,40 @@ export class IRtcEngineImpl implements IRtcEngine {
3966
3975
  return 'RtcEngine_setRemoteSubscribeFallbackOption';
3967
3976
  }
3968
3977
 
3978
+ setHighPriorityUserList(
3979
+ uidList: number[],
3980
+ uidNum: number,
3981
+ option: StreamFallbackOptions
3982
+ ): number {
3983
+ const apiType = this.getApiTypeFromSetHighPriorityUserList(
3984
+ uidList,
3985
+ uidNum,
3986
+ option
3987
+ );
3988
+ const jsonParams = {
3989
+ uidList: uidList,
3990
+ uidNum: uidNum,
3991
+ option: option,
3992
+ toJSON: () => {
3993
+ return {
3994
+ uidList: uidList,
3995
+ uidNum: uidNum,
3996
+ option: option,
3997
+ };
3998
+ },
3999
+ };
4000
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
4001
+ return jsonResults.result;
4002
+ }
4003
+
4004
+ protected getApiTypeFromSetHighPriorityUserList(
4005
+ uidList: number[],
4006
+ uidNum: number,
4007
+ option: StreamFallbackOptions
4008
+ ): string {
4009
+ return 'RtcEngine_setHighPriorityUserList';
4010
+ }
4011
+
3969
4012
  enableLoopbackRecording(enabled: boolean, deviceName?: string): number {
3970
4013
  const apiType = this.getApiTypeFromEnableLoopbackRecording(
3971
4014
  enabled,
@@ -4068,7 +4111,7 @@ export class IRtcEngineImpl implements IRtcEngine {
4068
4111
  return 'RtcEngine_setInEarMonitoringVolume';
4069
4112
  }
4070
4113
 
4071
- loadExtensionProvider(path: string, unloadAfterUse = false): number {
4114
+ loadExtensionProvider(path: string, unloadAfterUse: boolean = false): number {
4072
4115
  const apiType = this.getApiTypeFromLoadExtensionProvider(
4073
4116
  path,
4074
4117
  unloadAfterUse
@@ -4089,7 +4132,7 @@ export class IRtcEngineImpl implements IRtcEngine {
4089
4132
 
4090
4133
  protected getApiTypeFromLoadExtensionProvider(
4091
4134
  path: string,
4092
- unloadAfterUse = false
4135
+ unloadAfterUse: boolean = false
4093
4136
  ): string {
4094
4137
  return 'RtcEngine_loadExtensionProvider';
4095
4138
  }
@@ -4165,7 +4208,7 @@ export class IRtcEngineImpl implements IRtcEngine {
4165
4208
  enableExtension(
4166
4209
  provider: string,
4167
4210
  extension: string,
4168
- enable = true,
4211
+ enable: boolean = true,
4169
4212
  type: MediaSourceType = MediaSourceType.UnknownMediaSource
4170
4213
  ): number {
4171
4214
  const apiType = this.getApiTypeFromEnableExtension(
@@ -4195,7 +4238,7 @@ export class IRtcEngineImpl implements IRtcEngine {
4195
4238
  protected getApiTypeFromEnableExtension(
4196
4239
  provider: string,
4197
4240
  extension: string,
4198
- enable = true,
4241
+ enable: boolean = true,
4199
4242
  type: MediaSourceType = MediaSourceType.UnknownMediaSource
4200
4243
  ): string {
4201
4244
  return 'RtcEngine_enableExtension';
@@ -4877,26 +4920,6 @@ export class IRtcEngineImpl implements IRtcEngine {
4877
4920
  return 'RtcEngine_setScreenCaptureContentHint';
4878
4921
  }
4879
4922
 
4880
- setScreenCaptureScenario(screenScenario: ScreenScenarioType): number {
4881
- const apiType = this.getApiTypeFromSetScreenCaptureScenario(screenScenario);
4882
- const jsonParams = {
4883
- screenScenario: screenScenario,
4884
- toJSON: () => {
4885
- return {
4886
- screenScenario: screenScenario,
4887
- };
4888
- },
4889
- };
4890
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
4891
- return jsonResults.result;
4892
- }
4893
-
4894
- protected getApiTypeFromSetScreenCaptureScenario(
4895
- screenScenario: ScreenScenarioType
4896
- ): string {
4897
- return 'RtcEngine_setScreenCaptureScenario';
4898
- }
4899
-
4900
4923
  updateScreenCaptureRegion(regionRect: Rectangle): number {
4901
4924
  const apiType = this.getApiTypeFromUpdateScreenCaptureRegion(regionRect);
4902
4925
  const jsonParams = {
@@ -4960,6 +4983,35 @@ export class IRtcEngineImpl implements IRtcEngine {
4960
4983
  return 'RtcEngine_startScreenCapture';
4961
4984
  }
4962
4985
 
4986
+ startScreenCaptureBySourceType(
4987
+ sourceType: VideoSourceType,
4988
+ config: ScreenCaptureConfiguration
4989
+ ): number {
4990
+ const apiType = this.getApiTypeFromStartScreenCaptureBySourceType(
4991
+ sourceType,
4992
+ config
4993
+ );
4994
+ const jsonParams = {
4995
+ sourceType: sourceType,
4996
+ config: config,
4997
+ toJSON: () => {
4998
+ return {
4999
+ sourceType: sourceType,
5000
+ config: config,
5001
+ };
5002
+ },
5003
+ };
5004
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5005
+ return jsonResults.result;
5006
+ }
5007
+
5008
+ protected getApiTypeFromStartScreenCaptureBySourceType(
5009
+ sourceType: VideoSourceType,
5010
+ config: ScreenCaptureConfiguration
5011
+ ): string {
5012
+ return 'RtcEngine_startScreenCaptureBySourceType';
5013
+ }
5014
+
4963
5015
  updateScreenCapture(captureParams: ScreenCaptureParameters2): number {
4964
5016
  const apiType = this.getApiTypeFromUpdateScreenCapture(captureParams);
4965
5017
  const jsonParams = {
@@ -4980,6 +5032,37 @@ export class IRtcEngineImpl implements IRtcEngine {
4980
5032
  return 'RtcEngine_updateScreenCapture';
4981
5033
  }
4982
5034
 
5035
+ queryScreenCaptureCapability(): number {
5036
+ const apiType = this.getApiTypeFromQueryScreenCaptureCapability();
5037
+ const jsonParams = {};
5038
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5039
+ return jsonResults.result;
5040
+ }
5041
+
5042
+ protected getApiTypeFromQueryScreenCaptureCapability(): string {
5043
+ return 'RtcEngine_queryScreenCaptureCapability';
5044
+ }
5045
+
5046
+ setScreenCaptureScenario(screenScenario: ScreenScenarioType): number {
5047
+ const apiType = this.getApiTypeFromSetScreenCaptureScenario(screenScenario);
5048
+ const jsonParams = {
5049
+ screenScenario: screenScenario,
5050
+ toJSON: () => {
5051
+ return {
5052
+ screenScenario: screenScenario,
5053
+ };
5054
+ },
5055
+ };
5056
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5057
+ return jsonResults.result;
5058
+ }
5059
+
5060
+ protected getApiTypeFromSetScreenCaptureScenario(
5061
+ screenScenario: ScreenScenarioType
5062
+ ): string {
5063
+ return 'RtcEngine_setScreenCaptureScenario';
5064
+ }
5065
+
4983
5066
  stopScreenCapture(): number {
4984
5067
  const apiType = this.getApiTypeFromStopScreenCapture();
4985
5068
  const jsonParams = {};
@@ -4991,6 +5074,27 @@ export class IRtcEngineImpl implements IRtcEngine {
4991
5074
  return 'RtcEngine_stopScreenCapture';
4992
5075
  }
4993
5076
 
5077
+ stopScreenCaptureBySourceType(sourceType: VideoSourceType): number {
5078
+ const apiType =
5079
+ this.getApiTypeFromStopScreenCaptureBySourceType(sourceType);
5080
+ const jsonParams = {
5081
+ sourceType: sourceType,
5082
+ toJSON: () => {
5083
+ return {
5084
+ sourceType: sourceType,
5085
+ };
5086
+ },
5087
+ };
5088
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5089
+ return jsonResults.result;
5090
+ }
5091
+
5092
+ protected getApiTypeFromStopScreenCaptureBySourceType(
5093
+ sourceType: VideoSourceType
5094
+ ): string {
5095
+ return 'RtcEngine_stopScreenCaptureBySourceType';
5096
+ }
5097
+
4994
5098
  getCallId(): string {
4995
5099
  const apiType = this.getApiTypeFromGetCallId();
4996
5100
  const jsonParams = {};
@@ -5193,12 +5297,17 @@ export class IRtcEngineImpl implements IRtcEngine {
5193
5297
  return 'RtcEngine_stopLocalVideoTranscoder';
5194
5298
  }
5195
5299
 
5196
- startPrimaryCameraCapture(config: CameraCapturerConfiguration): number {
5197
- const apiType = this.getApiTypeFromStartPrimaryCameraCapture(config);
5300
+ startCameraCapture(
5301
+ sourceType: VideoSourceType,
5302
+ config: CameraCapturerConfiguration
5303
+ ): number {
5304
+ const apiType = this.getApiTypeFromStartCameraCapture(sourceType, config);
5198
5305
  const jsonParams = {
5306
+ sourceType: sourceType,
5199
5307
  config: config,
5200
5308
  toJSON: () => {
5201
5309
  return {
5310
+ sourceType: sourceType,
5202
5311
  config: config,
5203
5312
  };
5204
5313
  },
@@ -5207,19 +5316,20 @@ export class IRtcEngineImpl implements IRtcEngine {
5207
5316
  return jsonResults.result;
5208
5317
  }
5209
5318
 
5210
- protected getApiTypeFromStartPrimaryCameraCapture(
5319
+ protected getApiTypeFromStartCameraCapture(
5320
+ sourceType: VideoSourceType,
5211
5321
  config: CameraCapturerConfiguration
5212
5322
  ): string {
5213
- return 'RtcEngine_startPrimaryCameraCapture';
5323
+ return 'RtcEngine_startCameraCapture';
5214
5324
  }
5215
5325
 
5216
- startSecondaryCameraCapture(config: CameraCapturerConfiguration): number {
5217
- const apiType = this.getApiTypeFromStartSecondaryCameraCapture(config);
5326
+ stopCameraCapture(sourceType: VideoSourceType): number {
5327
+ const apiType = this.getApiTypeFromStopCameraCapture(sourceType);
5218
5328
  const jsonParams = {
5219
- config: config,
5329
+ sourceType: sourceType,
5220
5330
  toJSON: () => {
5221
5331
  return {
5222
- config: config,
5332
+ sourceType: sourceType,
5223
5333
  };
5224
5334
  },
5225
5335
  };
@@ -5227,32 +5337,10 @@ export class IRtcEngineImpl implements IRtcEngine {
5227
5337
  return jsonResults.result;
5228
5338
  }
5229
5339
 
5230
- protected getApiTypeFromStartSecondaryCameraCapture(
5231
- config: CameraCapturerConfiguration
5340
+ protected getApiTypeFromStopCameraCapture(
5341
+ sourceType: VideoSourceType
5232
5342
  ): string {
5233
- return 'RtcEngine_startSecondaryCameraCapture';
5234
- }
5235
-
5236
- stopPrimaryCameraCapture(): number {
5237
- const apiType = this.getApiTypeFromStopPrimaryCameraCapture();
5238
- const jsonParams = {};
5239
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5240
- return jsonResults.result;
5241
- }
5242
-
5243
- protected getApiTypeFromStopPrimaryCameraCapture(): string {
5244
- return 'RtcEngine_stopPrimaryCameraCapture';
5245
- }
5246
-
5247
- stopSecondaryCameraCapture(): number {
5248
- const apiType = this.getApiTypeFromStopSecondaryCameraCapture();
5249
- const jsonParams = {};
5250
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5251
- return jsonResults.result;
5252
- }
5253
-
5254
- protected getApiTypeFromStopSecondaryCameraCapture(): string {
5255
- return 'RtcEngine_stopSecondaryCameraCapture';
5343
+ return 'RtcEngine_stopCameraCapture';
5256
5344
  }
5257
5345
 
5258
5346
  setCameraDeviceOrientation(
@@ -5313,68 +5401,6 @@ export class IRtcEngineImpl implements IRtcEngine {
5313
5401
  return 'RtcEngine_setScreenCaptureOrientation';
5314
5402
  }
5315
5403
 
5316
- startPrimaryScreenCapture(config: ScreenCaptureConfiguration): number {
5317
- const apiType = this.getApiTypeFromStartPrimaryScreenCapture(config);
5318
- const jsonParams = {
5319
- config: config,
5320
- toJSON: () => {
5321
- return {
5322
- config: config,
5323
- };
5324
- },
5325
- };
5326
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5327
- return jsonResults.result;
5328
- }
5329
-
5330
- protected getApiTypeFromStartPrimaryScreenCapture(
5331
- config: ScreenCaptureConfiguration
5332
- ): string {
5333
- return 'RtcEngine_startPrimaryScreenCapture';
5334
- }
5335
-
5336
- startSecondaryScreenCapture(config: ScreenCaptureConfiguration): number {
5337
- const apiType = this.getApiTypeFromStartSecondaryScreenCapture(config);
5338
- const jsonParams = {
5339
- config: config,
5340
- toJSON: () => {
5341
- return {
5342
- config: config,
5343
- };
5344
- },
5345
- };
5346
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5347
- return jsonResults.result;
5348
- }
5349
-
5350
- protected getApiTypeFromStartSecondaryScreenCapture(
5351
- config: ScreenCaptureConfiguration
5352
- ): string {
5353
- return 'RtcEngine_startSecondaryScreenCapture';
5354
- }
5355
-
5356
- stopPrimaryScreenCapture(): number {
5357
- const apiType = this.getApiTypeFromStopPrimaryScreenCapture();
5358
- const jsonParams = {};
5359
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5360
- return jsonResults.result;
5361
- }
5362
-
5363
- protected getApiTypeFromStopPrimaryScreenCapture(): string {
5364
- return 'RtcEngine_stopPrimaryScreenCapture';
5365
- }
5366
-
5367
- stopSecondaryScreenCapture(): number {
5368
- const apiType = this.getApiTypeFromStopSecondaryScreenCapture();
5369
- const jsonParams = {};
5370
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5371
- return jsonResults.result;
5372
- }
5373
-
5374
- protected getApiTypeFromStopSecondaryScreenCapture(): string {
5375
- return 'RtcEngine_stopSecondaryScreenCapture';
5376
- }
5377
-
5378
5404
  getConnectionState(): ConnectionStateType {
5379
5405
  const apiType = this.getApiTypeFromGetConnectionState();
5380
5406
  const jsonParams = {};
@@ -5820,6 +5846,29 @@ export class IRtcEngineImpl implements IRtcEngine {
5820
5846
  return 'RtcEngine_stopAudioFrameDump';
5821
5847
  }
5822
5848
 
5849
+ setAINSMode(enabled: boolean, mode: AudioAinsMode): number {
5850
+ const apiType = this.getApiTypeFromSetAINSMode(enabled, mode);
5851
+ const jsonParams = {
5852
+ enabled: enabled,
5853
+ mode: mode,
5854
+ toJSON: () => {
5855
+ return {
5856
+ enabled: enabled,
5857
+ mode: mode,
5858
+ };
5859
+ },
5860
+ };
5861
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5862
+ return jsonResults.result;
5863
+ }
5864
+
5865
+ protected getApiTypeFromSetAINSMode(
5866
+ enabled: boolean,
5867
+ mode: AudioAinsMode
5868
+ ): string {
5869
+ return 'RtcEngine_setAINSMode';
5870
+ }
5871
+
5823
5872
  registerLocalUserAccount(appId: string, userAccount: string): number {
5824
5873
  const apiType = this.getApiTypeFromRegisterLocalUserAccount(
5825
5874
  appId,
@@ -5964,6 +6013,29 @@ export class IRtcEngineImpl implements IRtcEngine {
5964
6013
  return 'RtcEngine_getUserInfoByUid';
5965
6014
  }
5966
6015
 
6016
+ startOrUpdateChannelMediaRelay(
6017
+ configuration: ChannelMediaRelayConfiguration
6018
+ ): number {
6019
+ const apiType =
6020
+ this.getApiTypeFromStartOrUpdateChannelMediaRelay(configuration);
6021
+ const jsonParams = {
6022
+ configuration: configuration,
6023
+ toJSON: () => {
6024
+ return {
6025
+ configuration: configuration,
6026
+ };
6027
+ },
6028
+ };
6029
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
6030
+ return jsonResults.result;
6031
+ }
6032
+
6033
+ protected getApiTypeFromStartOrUpdateChannelMediaRelay(
6034
+ configuration: ChannelMediaRelayConfiguration
6035
+ ): string {
6036
+ return 'RtcEngine_startOrUpdateChannelMediaRelay';
6037
+ }
6038
+
5967
6039
  startChannelMediaRelay(
5968
6040
  configuration: ChannelMediaRelayConfiguration
5969
6041
  ): number {
@@ -6260,17 +6332,17 @@ export class IRtcEngineImpl implements IRtcEngine {
6260
6332
  return 'RtcEngine_enableContentInspect';
6261
6333
  }
6262
6334
 
6263
- adjustCustomAudioPublishVolume(sourceId: number, volume: number): number {
6335
+ adjustCustomAudioPublishVolume(trackId: number, volume: number): number {
6264
6336
  const apiType = this.getApiTypeFromAdjustCustomAudioPublishVolume(
6265
- sourceId,
6337
+ trackId,
6266
6338
  volume
6267
6339
  );
6268
6340
  const jsonParams = {
6269
- sourceId: sourceId,
6341
+ trackId: trackId,
6270
6342
  volume: volume,
6271
6343
  toJSON: () => {
6272
6344
  return {
6273
- sourceId: sourceId,
6345
+ trackId: trackId,
6274
6346
  volume: volume,
6275
6347
  };
6276
6348
  },
@@ -6280,23 +6352,23 @@ export class IRtcEngineImpl implements IRtcEngine {
6280
6352
  }
6281
6353
 
6282
6354
  protected getApiTypeFromAdjustCustomAudioPublishVolume(
6283
- sourceId: number,
6355
+ trackId: number,
6284
6356
  volume: number
6285
6357
  ): string {
6286
6358
  return 'RtcEngine_adjustCustomAudioPublishVolume';
6287
6359
  }
6288
6360
 
6289
- adjustCustomAudioPlayoutVolume(sourceId: number, volume: number): number {
6361
+ adjustCustomAudioPlayoutVolume(trackId: number, volume: number): number {
6290
6362
  const apiType = this.getApiTypeFromAdjustCustomAudioPlayoutVolume(
6291
- sourceId,
6363
+ trackId,
6292
6364
  volume
6293
6365
  );
6294
6366
  const jsonParams = {
6295
- sourceId: sourceId,
6367
+ trackId: trackId,
6296
6368
  volume: volume,
6297
6369
  toJSON: () => {
6298
6370
  return {
6299
- sourceId: sourceId,
6371
+ trackId: trackId,
6300
6372
  volume: volume,
6301
6373
  };
6302
6374
  },
@@ -6306,7 +6378,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6306
6378
  }
6307
6379
 
6308
6380
  protected getApiTypeFromAdjustCustomAudioPlayoutVolume(
6309
- sourceId: number,
6381
+ trackId: number,
6310
6382
  volume: number
6311
6383
  ): string {
6312
6384
  return 'RtcEngine_adjustCustomAudioPlayoutVolume';
@@ -6352,7 +6424,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6352
6424
 
6353
6425
  setAdvancedAudioOptions(
6354
6426
  options: AdvancedAudioOptions,
6355
- sourceType = 0
6427
+ sourceType: number = 0
6356
6428
  ): number {
6357
6429
  const apiType = this.getApiTypeFromSetAdvancedAudioOptions(
6358
6430
  options,
@@ -6374,7 +6446,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6374
6446
 
6375
6447
  protected getApiTypeFromSetAdvancedAudioOptions(
6376
6448
  options: AdvancedAudioOptions,
6377
- sourceType = 0
6449
+ sourceType: number = 0
6378
6450
  ): string {
6379
6451
  return 'RtcEngine_setAdvancedAudioOptions';
6380
6452
  }
@@ -6505,54 +6577,15 @@ export class IRtcEngineImpl implements IRtcEngine {
6505
6577
  return 'RtcEngine_enableInstantMediaRendering';
6506
6578
  }
6507
6579
 
6508
- destroyRendererByView(view: any): void {
6509
- const apiType = this.getApiTypeFromDestroyRendererByView(view);
6510
- const jsonParams = {
6511
- view: view,
6512
- toJSON: () => {
6513
- return {
6514
- view: view,
6515
- };
6516
- },
6517
- };
6518
- callIrisApi.call(this, apiType, jsonParams);
6519
- }
6520
-
6521
- protected getApiTypeFromDestroyRendererByView(view: any): string {
6522
- return 'RtcEngine_destroyRendererByView';
6523
- }
6524
-
6525
- destroyRendererByConfig(
6526
- sourceType: VideoSourceType,
6527
- channelId?: string,
6528
- uid = 0
6529
- ): void {
6530
- const apiType = this.getApiTypeFromDestroyRendererByConfig(
6531
- sourceType,
6532
- channelId,
6533
- uid
6534
- );
6535
- const jsonParams = {
6536
- sourceType: sourceType,
6537
- channelId: channelId,
6538
- uid: uid,
6539
- toJSON: () => {
6540
- return {
6541
- sourceType: sourceType,
6542
- channelId: channelId,
6543
- uid: uid,
6544
- };
6545
- },
6546
- };
6547
- callIrisApi.call(this, apiType, jsonParams);
6580
+ getNtpWallTimeInMs(): number {
6581
+ const apiType = this.getApiTypeFromGetNtpWallTimeInMs();
6582
+ const jsonParams = {};
6583
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
6584
+ return jsonResults.result;
6548
6585
  }
6549
6586
 
6550
- protected getApiTypeFromDestroyRendererByConfig(
6551
- sourceType: VideoSourceType,
6552
- channelId?: string,
6553
- uid = 0
6554
- ): string {
6555
- return 'RtcEngine_destroyRendererByConfig';
6587
+ protected getApiTypeFromGetNtpWallTimeInMs(): string {
6588
+ return 'RtcEngine_getNtpWallTimeInMs';
6556
6589
  }
6557
6590
 
6558
6591
  getAudioDeviceManager(): IAudioDeviceManager {
@@ -6599,17 +6632,6 @@ export class IRtcEngineImpl implements IRtcEngine {
6599
6632
  return 'RtcEngine_getMediaEngine';
6600
6633
  }
6601
6634
 
6602
- getMediaRecorder(): IMediaRecorder {
6603
- const apiType = this.getApiTypeFromGetMediaRecorder();
6604
- const jsonParams = {};
6605
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
6606
- return jsonResults.result;
6607
- }
6608
-
6609
- protected getApiTypeFromGetMediaRecorder(): string {
6610
- return 'RtcEngine_getMediaRecorder';
6611
- }
6612
-
6613
6635
  getLocalSpatialAudioEngine(): ILocalSpatialAudioEngine {
6614
6636
  const apiType = this.getApiTypeFromGetLocalSpatialAudioEngine();
6615
6637
  const jsonParams = {};
@@ -6662,6 +6684,56 @@ export class IRtcEngineImpl implements IRtcEngine {
6662
6684
  return 'RtcEngine_setMaxMetadataSize';
6663
6685
  }
6664
6686
 
6687
+ destroyRendererByView(view: any): void {
6688
+ const apiType = this.getApiTypeFromDestroyRendererByView(view);
6689
+ const jsonParams = {
6690
+ view: view,
6691
+ toJSON: () => {
6692
+ return {
6693
+ view: view,
6694
+ };
6695
+ },
6696
+ };
6697
+ callIrisApi.call(this, apiType, jsonParams);
6698
+ }
6699
+
6700
+ protected getApiTypeFromDestroyRendererByView(view: any): string {
6701
+ return 'RtcEngine_destroyRendererByView';
6702
+ }
6703
+
6704
+ destroyRendererByConfig(
6705
+ sourceType: VideoSourceType,
6706
+ channelId?: string,
6707
+ uid: number = 0
6708
+ ): void {
6709
+ const apiType = this.getApiTypeFromDestroyRendererByConfig(
6710
+ sourceType,
6711
+ channelId,
6712
+ uid
6713
+ );
6714
+ const jsonParams = {
6715
+ sourceType: sourceType,
6716
+ channelId: channelId,
6717
+ uid: uid,
6718
+ toJSON: () => {
6719
+ return {
6720
+ sourceType: sourceType,
6721
+ channelId: channelId,
6722
+ uid: uid,
6723
+ };
6724
+ },
6725
+ };
6726
+ callIrisApi.call(this, apiType, jsonParams);
6727
+ }
6728
+
6729
+ protected getApiTypeFromDestroyRendererByConfig(
6730
+ sourceType: VideoSourceType,
6731
+ channelId?: string,
6732
+ uid: number = 0
6733
+ ): string {
6734
+ return 'RtcEngine_destroyRendererByConfig';
6735
+ }
6736
+
6665
6737
  unregisterAudioEncodedFrameObserver(
6666
6738
  observer: IAudioEncodedFrameObserver
6667
6739
  ): number {
@@ -6694,3 +6766,5 @@ export class IRtcEngineImpl implements IRtcEngine {
6694
6766
  return 'RtcEngine_getNativeHandle';
6695
6767
  }
6696
6768
  }
6769
+
6770
+ import { callIrisApi } from '../internal/IrisApiEngine';