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,570 +0,0 @@
1
- import './extension/IAgoraRtcEngineExExtension';
2
- import { IRtcEngine, ChannelMediaOptions, LeaveChannelOptions } from './IAgoraRtcEngine';
3
- import { VideoEncoderConfiguration, VideoCanvas, VideoStreamType, VideoSubscriptionOptions, SpatialAudioParams, VideoMirrorModeType, ConnectionStateType, EncryptionConfig, DataStreamConfig, WatermarkOptions, LiveTranscoding, ChannelMediaRelayConfiguration, UserInfo, SimulcastStreamConfig, SimulcastStreamMode } from './AgoraBase';
4
- import { RenderModeType } from './AgoraMediaBase';
5
- /**
6
- * Contains connection information.
7
- */
8
- export declare class RtcConnection {
9
- /**
10
- * The channel name.
11
- */
12
- channelId?: string;
13
- /**
14
- * The ID of the local user.
15
- */
16
- localUid?: number;
17
- }
18
- /**
19
- * This interface class contains multi-channel methods.
20
- * Inherited from IRtcEngine .
21
- */
22
- export declare abstract class IRtcEngineEx extends IRtcEngine {
23
- /**
24
- * Joins a channel with the connection ID.
25
- * You can call this method multiple times to join more than one channel.If you are already in a channel, you cannot rejoin it with the same user ID.If you want to join the same channel from different devices, ensure that the user IDs are different for all devices.Ensure that the app ID you use to generate the token is the same as the app ID used when creating the IRtcEngine instance.
26
- *
27
- * @param options The channel media options. See ChannelMediaOptions .
28
- *
29
- * @param token The token generated on your server for authentication.
30
- *
31
- * @param connection The connection information. See RtcConnection .
32
- *
33
- * @returns
34
- * 0: Success.
35
- * < 0: Failure.
36
- * -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.
37
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
38
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
39
- * -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.
40
- * -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.
41
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
42
- * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
43
- */
44
- abstract joinChannelEx(token: string, connection: RtcConnection, options: ChannelMediaOptions): number;
45
- /**
46
- * Sets channel options and leaves the channel.
47
- * This method lets the user leave the channel, for example, by hanging up or exiting the call.After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call.This method can be called whether or not a call is currently in progress. 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 you leave the channel, the SDK triggers the onLeaveChannel callback.A successful call of this method triggers the following callbacks: 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.Calling leaveChannel [1/2] will leave the channels when calling joinChannel [2/2] and joinChannelEx at the same time.
48
- *
49
- * @param connection The connection information. See RtcConnection .
50
- *
51
- * @param options The options for leaving the channel. See LeaveChannelOptions .This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect.
52
- *
53
- * @returns
54
- * 0: Success.< 0: Failure.
55
- */
56
- abstract leaveChannelEx(connection: RtcConnection, options?: LeaveChannelOptions): number;
57
- /**
58
- * Updates the channel media options after joining the channel.
59
- *
60
- * @param connection The connection information. See RtcConnection .
61
- *
62
- * @param options The channel media options. See ChannelMediaOptions .
63
- *
64
- * @returns
65
- * 0: Success.
66
- * < 0: Failure.
67
- * -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.
68
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
69
- * -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.
70
- */
71
- abstract updateChannelMediaOptionsEx(options: ChannelMediaOptions, connection: RtcConnection): number;
72
- /**
73
- * Sets the encoder configuration for the local video.
74
- * Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.The config specified in this method is the maximum values under ideal network conditions. If the network condition is not good, the video engine cannot use the config renders local video, which automatically reduces to an appropriate video parameter setting.
75
- *
76
- * @param connection The connection information. See RtcConnection .
77
- *
78
- * @param config Video profile. See VideoEncoderConfiguration .
79
- *
80
- * @returns
81
- * 0: Success.< 0: Failure.
82
- */
83
- abstract setVideoEncoderConfigurationEx(config: VideoEncoderConfiguration, connection: RtcConnection): number;
84
- /**
85
- * Initializes the video view of a remote user.
86
- * 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.The application specifies the uid of the remote video in the VideoCanvas method before the remote user joins the channel.If the remote uid is unknown to the application, set it after the application receives the onUserJoined callback. If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the onUserJoined callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams.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.
87
- *
88
- * @param connection The connection information. See RtcConnection .
89
- *
90
- * @param canvas The remote video view settings. See VideoCanvas .
91
- *
92
- * @returns
93
- * 0: Success.< 0: Failure.
94
- */
95
- abstract setupRemoteVideoEx(canvas: VideoCanvas, connection: RtcConnection): number;
96
- /**
97
- * Stops or resumes receiving the audio stream of a specified user.
98
- *
99
- * @param connection The connection information. See RtcConnection .
100
- *
101
- * @param uid The ID of the specified user.
102
- *
103
- * @param mute Whether to stop receiving the audio stream of the specified user:true: Stop receiving the audio stream of the specified user.false: (Default) Resume receiving the audio stream of the specified user.
104
- *
105
- * @returns
106
- * 0: Success. < 0: Failure.
107
- */
108
- abstract muteRemoteAudioStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
109
- /**
110
- * Stops or resumes receiving the video stream of a specified user.
111
- * This method is used to stops or resumes receiving the video stream of a specified user. You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
112
- *
113
- * @param connection The connection information. See RtcConnection .
114
- *
115
- * @param uid The user ID of the remote user.
116
- *
117
- * @param mute Whether to stop receiving the video stream of the specified user:true: Stop receiving the video stream of the specified user.false: (Default) Resume receiving the video stream of the specified user.
118
- *
119
- * @returns
120
- * 0: Success.< 0: Failure.
121
- */
122
- abstract muteRemoteVideoStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
123
- /**
124
- * Sets the stream type of the remote video.
125
- * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx (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.
126
- *
127
- * @param connection The connection information. See RtcConnection .
128
- *
129
- * @param uid The user ID.
130
- *
131
- * @param streamType The video stream type: VideoStreamType .
132
- *
133
- * @returns
134
- * 0: Success.< 0: Failure.
135
- */
136
- abstract setRemoteVideoStreamTypeEx(uid: number, streamType: VideoStreamType, connection: RtcConnection): number;
137
- /**
138
- * Stops or resumes publishing the local audio stream.
139
- * This method does not affect any ongoing audio recording, because it does not disable the audio capture device.
140
- *
141
- * @param connection The connection information. See RtcConnection .
142
- *
143
- * @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.
144
- *
145
- * @returns
146
- * 0: Success. < 0: Failure.
147
- */
148
- abstract muteLocalAudioStreamEx(mute: boolean, connection: RtcConnection): number;
149
- /**
150
- * Stops or resumes publishing the local video stream.
151
- * A successful call of this method triggers the onUserMuteVideo callback on the remote client.This method does not affect any ongoing video recording, because it does not disable the camera.
152
- *
153
- * @param connection The connection information. See RtcConnection .
154
- *
155
- * @param mute Whether to stop publishing the local video stream.true: Stop publishing the local video stream.false: (Default) Publish the local video stream.
156
- *
157
- * @returns
158
- * 0: Success.< 0: Failure.
159
- */
160
- abstract muteLocalVideoStreamEx(mute: boolean, connection: RtcConnection): number;
161
- /**
162
- * Stops or resumes subscribing to the audio streams of all remote users.
163
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.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 [2/2] .
164
- *
165
- * @param connection The connection information. See RtcConnection .
166
- *
167
- * @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.
168
- *
169
- * @returns
170
- * 0: Success. < 0: Failure.
171
- */
172
- abstract muteAllRemoteAudioStreamsEx(mute: boolean, connection: RtcConnection): number;
173
- /**
174
- * Stops or resumes subscribing to the video streams of all remote users.
175
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
176
- *
177
- * @param connection The connection information. See RtcConnection .
178
- *
179
- * @param mute Whether to stop subscribing to the video streams of all remote users.
180
- * true: Stop subscribing to the video streams of all remote users.
181
- * false: (Default) Subscribe to the audio streams of all remote users by default.
182
- *
183
- * @returns
184
- * 0: Success.< 0: Failure.
185
- */
186
- abstract muteAllRemoteVideoStreamsEx(mute: boolean, connection: RtcConnection): number;
187
- /**
188
- * Set the blocklist of subscriptions for audio streams.
189
- * 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.
190
- *
191
- * @param connection The connection information. See RtcConnection .
192
- *
193
- * @param uidNumber The number of users in the user ID list.
194
- *
195
- * @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.
196
- *
197
- * @returns
198
- * 0: Success.< 0: Failure.
199
- */
200
- abstract setSubscribeAudioBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
201
- /**
202
- * Sets the allowlist of subscriptions for audio streams.
203
- * 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 .
204
- * Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
205
- *
206
- * @param connection The connection information. See RtcConnection .
207
- *
208
- * @param uidNumber The number of users in the user ID list.
209
- *
210
- * @param uidList The user ID list of users that you want to subscribe to.
211
- * 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.
212
- *
213
- * @returns
214
- * 0: Success.< 0: Failure.
215
- */
216
- abstract setSubscribeAudioAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
217
- /**
218
- * Set the blocklist of subscriptions for video streams.
219
- * 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 .
220
- *
221
- * @param connection The connection information. See RtcConnection .
222
- *
223
- * @param uidNumber The number of users in the user ID list.
224
- *
225
- * @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.
226
- *
227
- * @returns
228
- * 0: Success.< 0: Failure.
229
- */
230
- abstract setSubscribeVideoBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
231
- /**
232
- * Set the allowlist of subscriptions for video streams.
233
- * 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.Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
234
- * You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
235
- *
236
- * @param connection The connection information. See RtcConnection .
237
- *
238
- * @param uidNumber The number of users in the user ID list.
239
- *
240
- * @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.
241
- *
242
- * @returns
243
- * 0: Success.< 0: Failure.
244
- */
245
- abstract setSubscribeVideoAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
246
- /**
247
- * Options for subscribing to remote video streams.
248
- * 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.
249
- *
250
- * @param connection The connection information. See RtcConnection .
251
- *
252
- * @param options The video subscription options. See VideoSubscriptionOptions .
253
- *
254
- * @param uid The user ID of the remote user.
255
- *
256
- * @returns
257
- * 0: Success.< 0: Failure.
258
- */
259
- abstract setRemoteVideoSubscriptionOptionsEx(uid: number, options: VideoSubscriptionOptions, connection: RtcConnection): number;
260
- /**
261
- * Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
262
- * This method sets the voice position and volume of a remote user.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 the best voice positioning, Agora recommends using a wired headset.Call this method after joining a channel.
263
- *
264
- * @param connection The connection information. See RtcConnection .
265
- *
266
- * @param uid The user ID of the remote user.
267
- *
268
- * @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:-1.0: The remote voice comes from the left.0.0: (Default) The remote voice comes from the front.1.0: The remote voice comes from the right.
269
- *
270
- * @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.
271
- *
272
- * @returns
273
- * >
274
- * 0: Success.< 0: Failure.
275
- */
276
- abstract setRemoteVoicePositionEx(uid: number, pan: number, gain: number, connection: RtcConnection): number;
277
- /**
278
- * @ignore
279
- */
280
- abstract setRemoteUserSpatialAudioParamsEx(uid: number, params: SpatialAudioParams, connection: RtcConnection): number;
281
- /**
282
- * @ignore
283
- */
284
- abstract setRemoteRenderModeEx(uid: number, renderMode: RenderModeType, mirrorMode: VideoMirrorModeType, connection: RtcConnection): number;
285
- /**
286
- * Enables loopback audio capturing.
287
- * 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.
288
- *
289
- * @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.
290
- * 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.
291
- *
292
- * @param connection The connection information. See RtcConnection .
293
- *
294
- * @param enabled Sets whether to enable loopback audio capture:true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
295
- *
296
- * @returns
297
- * 0: Success.< 0: Failure.
298
- */
299
- abstract enableLoopbackRecordingEx(connection: RtcConnection, enabled: boolean, deviceName?: string): number;
300
- /**
301
- * Adjusts the playback signal volume of a specified remote user.
302
- * 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.
303
- *
304
- * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
305
- *
306
- * @param connection The connection information. See RtcConnection .
307
- *
308
- * @param uid The user ID of the remote user.
309
- *
310
- * @returns
311
- * 0: Success.< 0: Failure.
312
- */
313
- abstract adjustUserPlaybackSignalVolumeEx(uid: number, volume: number, connection: RtcConnection): number;
314
- /**
315
- * Gets the current connection state of the SDK.
316
- * You can call this method either before or after joining a channel.
317
- *
318
- * @param connection The connection information. See RtcConnection .
319
- *
320
- * @returns
321
- * The current connection state.
322
- */
323
- abstract getConnectionStateEx(connection: RtcConnection): ConnectionStateType;
324
- /**
325
- * @ignore
326
- */
327
- abstract enableEncryptionEx(connection: RtcConnection, enabled: boolean, config: EncryptionConfig): number;
328
- /**
329
- * Creates a data stream.
330
- * Creates a data stream. Each user can create up to five data streams in a single channel.Compared with createDataStreamEx , this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data.
331
- *
332
- * @param connection The connection information. See RtcConnection .
333
- *
334
- * @param config The configurations for the data stream. See DataStreamConfig .
335
- *
336
- * @returns
337
- * ID of the created data stream, if the method call succeeds.< 0: Failure.
338
- */
339
- abstract createDataStreamEx(config: DataStreamConfig, connection: RtcConnection): number;
340
- /**
341
- * Sends data stream messages.
342
- * After calling createDataStreamEx , you can call this method to send data stream messages to all users in the channel.The SDK has the following restrictions on this method:Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 kB.Each client can send up to 6 KB of data per second.Each user can have up to five data streams simultaneously.A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message.
343
- * A failed method call triggers the onStreamMessageError callback on the remote client.Ensure that you call createDataStreamEx to create a data channel before calling this method.This method applies only to the COMMUNICATION profile or to the hosts in the LIVE_BROADCASTING profile. If an audience in the LIVE_BROADCASTING profile calls this method, the audience may be switched to a host.
344
- *
345
- * @param connection The connection information. See RtcConnection .
346
- *
347
- * @param streamId The data stream ID. You can get the data stream ID by calling createDataStreamEx.
348
- *
349
- * @param data The data to be sent.
350
- *
351
- * @param length The length of the data.
352
- *
353
- * @returns
354
- * 0: Success.< 0: Failure.
355
- */
356
- abstract sendStreamMessageEx(streamId: number, data: Uint8Array, length: number, connection: RtcConnection): number;
357
- /**
358
- * Adds a watermark image to the local video.
359
- * 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 coordinatesare dependent on the settings in the setVideoEncoderConfigurationEx 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 setVideoEncoderConfigurationEx dimensions set in the method; otherwise, the watermark image will be cropped.Ensure that you have called enableVideo before calling this 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.
360
- *
361
- * @param connection The connection information. See RtcConnection .
362
- *
363
- * @param options The options of the watermark image to be added.
364
- *
365
- * @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.
366
- *
367
- * @returns
368
- * 0: Success.< 0: Failure.
369
- */
370
- abstract addVideoWatermarkEx(watermarkUrl: string, options: WatermarkOptions, connection: RtcConnection): number;
371
- /**
372
- * Removes the watermark image from the video stream.
373
- *
374
- * @param connection The connection information. See RtcConnection .
375
- *
376
- * @returns
377
- * 0: Success.< 0: Failure.
378
- */
379
- abstract clearVideoWatermarkEx(connection: RtcConnection): number;
380
- /**
381
- * Agora supports reporting and analyzing customized messages.
382
- * Agora supports reporting and analyzing customized messages. This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes and each string not exceeding 100 bytes. To try out this function, contact and discuss the format of customized messages with us.
383
- */
384
- abstract sendCustomReportMessageEx(id: string, category: string, event: string, label: string, value: number, connection: RtcConnection): number;
385
- /**
386
- * Enables the reporting of users' volume indication.
387
- * 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.
388
- *
389
- * @param connection The connection information. See RtcConnection .
390
- *
391
- * @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.
392
- * 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.
393
- *
394
- * @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.
395
- *
396
- * @param interval Sets the time interval between two consecutive volume indications:
397
- * ≤ 0: Disables the volume indication.
398
- * > 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.
399
- *
400
- * @returns
401
- * 0: Success.< 0: Failure.
402
- */
403
- abstract enableAudioVolumeIndicationEx(interval: number, smooth: number, reportVad: boolean, connection: RtcConnection): number;
404
- /**
405
- * Starts pushing media streams to a CDN without transcoding.
406
- * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
407
- * Call this method after joining a channel.
408
- * Only hosts in the LIVE_BROADCASTING profile can call this method.
409
- * 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.
410
- * 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.
411
- *
412
- * @param connection The connection information. See RtcConnection .
413
- *
414
- * @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.
415
- *
416
- * @returns
417
- * 0: Success.
418
- * < 0: Failure.
419
- * -2: The URL is null or the string length is 0.
420
- * -7: The SDK is not initialized before calling this method.
421
- * -19: The Media Push URL is already in use, use another URL instead.
422
- */
423
- abstract startRtmpStreamWithoutTranscodingEx(url: string, connection: RtcConnection): number;
424
- /**
425
- * Starts Media Push and sets the transcoding configuration.
426
- * 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. 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 stopRtmpStreamEx first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
427
- *
428
- * @param connection The connection information. See RtcConnection .
429
- *
430
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
431
- *
432
- * @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.
433
- *
434
- * @returns
435
- * 0: Success.< 0: Failure.-2: The URL is null or the string length is 0.-7: The SDK is not initialized before calling this method.-19: The Media Push URL is already in use, use another URL instead.
436
- */
437
- abstract startRtmpStreamWithTranscodingEx(url: string, transcoding: LiveTranscoding, connection: RtcConnection): number;
438
- /**
439
- * Updates the transcoding configuration.
440
- * Agora recommends that you use the server-side Media Push function. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated.
441
- *
442
- * @param connection The connection information. See RtcConnection .
443
- *
444
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
445
- *
446
- * @returns
447
- * 0: Success.< 0: Failure.
448
- */
449
- abstract updateRtmpTranscodingEx(transcoding: LiveTranscoding, connection: RtcConnection): number;
450
- /**
451
- * Stops pushing media streams to a CDN.
452
- * Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing 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.
453
- *
454
- * @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.
455
- *
456
- * @returns
457
- * 0: Success.< 0: Failure.
458
- */
459
- abstract stopRtmpStreamEx(url: string, connection: RtcConnection): number;
460
- /**
461
- * Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
462
- * 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 stopChannelMediaRelayEx 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.
463
- *
464
- * @param connection
465
- *
466
- * @returns
467
- * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host.-8: Internal state error. Probably because the user is not an audience member.
468
- */
469
- abstract startChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
470
- /**
471
- * Updates the channels for media stream relay.
472
- * 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 the updateChannelMediaRelay 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 startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged (RelayStateRunning, RelayOk); otherwise, the method call fails.
473
- *
474
- * @param connection
475
- *
476
- * @returns
477
- * 0: Success.< 0: Failure.
478
- */
479
- abstract updateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
480
- /**
481
- * Stops the media stream relay. Once the relay stops, the host quits all the destination channels.
482
- * 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.
483
- * 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.
484
- *
485
- * @param connection The connection information. See RtcConnection .
486
- *
487
- * @returns
488
- * 0: Success.< 0: Failure.
489
- */
490
- abstract stopChannelMediaRelayEx(connection: RtcConnection): number;
491
- /**
492
- * Pauses the media stream relay to all destination channels.
493
- * 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 startChannelMediaRelayEx .
494
- *
495
- * @param connection The connection information. See RtcConnection .
496
- *
497
- * @returns
498
- * 0: Success.< 0: Failure.
499
- */
500
- abstract pauseAllChannelMediaRelayEx(connection: RtcConnection): number;
501
- /**
502
- * Resumes the media stream relay to all destination channels.
503
- * After calling the pauseAllChannelMediaRelayEx 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 pauseAllChannelMediaRelayEx .
504
- *
505
- * @param connection The connection information. See RtcConnection .
506
- *
507
- * @returns
508
- * 0: Success.< 0: Failure.
509
- */
510
- abstract resumeAllChannelMediaRelayEx(connection: RtcConnection): number;
511
- /**
512
- * @ignore
513
- */
514
- abstract getUserInfoByUserAccountEx(userAccount: string, connection: RtcConnection): UserInfo;
515
- /**
516
- * @ignore
517
- */
518
- abstract getUserInfoByUidEx(uid: number, connection: RtcConnection): UserInfo;
519
- /**
520
- * @ignore
521
- */
522
- abstract setVideoProfileEx(width: number, height: number, frameRate: number, bitrate: number): number;
523
- /**
524
- * Enables or disables dual-stream mode on the sender side.
525
- * 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.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:High-quality video stream: High bitrate, high resolution.Low-quality video stream: Low bitrate, low resolution.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.
526
- *
527
- * @param connection The connection information. See RtcConnection .
528
- *
529
- * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .
530
- *
531
- * @param enabled Whether to enable dual-stream mode:
532
- * true: Enable dual-stream mode.
533
- * false: (Default) Disable dual-stream mode.
534
- *
535
- * @returns
536
- * 0: Success.< 0: Failure.
537
- */
538
- abstract enableDualStreamModeEx(enabled: boolean, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
539
- /**
540
- * @ignore
541
- */
542
- abstract setDualStreamModeEx(mode: SimulcastStreamMode, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
543
- /**
544
- * @ignore
545
- */
546
- abstract enableWirelessAccelerate(enabled: boolean): number;
547
- /**
548
- * Takes a snapshot of a video stream.
549
- * 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.
550
- * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
551
- * Call this method after the joinChannelEx method.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.
552
- *
553
- * @param filePath The local path (including filename extensions) of the snapshot. For example:
554
- * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
555
- * macOS: ~/Library/Logs/example.jpg
556
- * Ensure that the path you specify exists and is writable.
557
- *
558
- * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
559
- *
560
- * @param connection The connection information. See RtcConnection .
561
- *
562
- * @returns
563
- * 0: Success.< 0: Failure.
564
- */
565
- abstract takeSnapshotEx(connection: RtcConnection, uid: number, filePath: string): number;
566
- /**
567
- * @ignore
568
- */
569
- abstract startMediaRenderingTracingEx(connection: RtcConnection): number;
570
- }