agora-electron-sdk 4.2.0-dev.4 → 4.2.0-dev.8

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 (270) hide show
  1. package/js/AgoraSdk.js +4 -2
  2. package/js/Private/AgoraBase.js +1154 -6
  3. package/js/Private/AgoraMediaBase.js +308 -0
  4. package/js/Private/AgoraMediaPlayerTypes.js +112 -0
  5. package/js/Private/IAgoraLog.js +12 -0
  6. package/js/Private/IAgoraMediaStreamingSource.js +10 -0
  7. package/js/Private/IAgoraMusicContentCenter.js +104 -0
  8. package/js/Private/IAgoraRhythmPlayer.js +8 -0
  9. package/js/Private/IAgoraRtcEngine.js +843 -0
  10. package/js/Private/IAgoraRtcEngineEx.js +8 -0
  11. package/js/Private/IAgoraSpatialAudio.js +44 -0
  12. package/js/Private/impl/IAgoraMediaPlayerImpl.js +59 -59
  13. package/js/Private/impl/IAgoraRtcEngineImpl.js +55 -46
  14. package/js/Private/internal/IrisApiEngine.js +7 -12
  15. package/js/Private/internal/MediaEngineInternal.js +7 -11
  16. package/js/Private/internal/MediaPlayerInternal.js +22 -20
  17. package/js/Private/internal/MediaRecorderInternal.js +4 -4
  18. package/js/Private/internal/MusicContentCenterInternal.js +7 -9
  19. package/js/Private/internal/RtcEngineExInternal.js +52 -62
  20. package/js/Renderer/AgoraView.js +21 -24
  21. package/js/Renderer/IRenderer.js +6 -13
  22. package/js/Renderer/IRendererManager.js +9 -0
  23. package/js/Renderer/RendererManager.js +49 -33
  24. package/js/Renderer/{GlRenderer → WebGLRenderer}/index.js +39 -45
  25. package/js/Renderer/YUVCanvasRenderer/index.js +8 -7
  26. package/js/Renderer/index.js +18 -0
  27. package/js/Utils.js +6 -8
  28. package/package.json +5 -4
  29. package/scripts/buildJS.js +1 -2
  30. package/scripts/getConfig.js +0 -1
  31. package/ts/AgoraSdk.ts +5 -2
  32. package/ts/Private/IAgoraMediaPlayer.ts +45 -45
  33. package/ts/Private/IAgoraRtcEngine.ts +33 -25
  34. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +84 -84
  35. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +75 -65
  36. package/ts/Private/internal/IrisApiEngine.ts +0 -2
  37. package/ts/Private/internal/RtcEngineExInternal.ts +23 -12
  38. package/ts/Renderer/AgoraView.ts +1 -0
  39. package/ts/Renderer/IRenderer.ts +8 -14
  40. package/ts/Renderer/IRendererManager.ts +35 -0
  41. package/ts/Renderer/RendererManager.ts +9 -9
  42. package/ts/Renderer/{GlRenderer → WebGLRenderer}/index.ts +26 -45
  43. package/ts/Renderer/YUVCanvasRenderer/index.ts +8 -10
  44. package/ts/Renderer/index.ts +2 -0
  45. package/ts/Types.ts +15 -9
  46. package/ts/Utils.ts +4 -6
  47. package/types/AgoraSdk.d.ts +4 -2
  48. package/types/AgoraSdk.d.ts.map +1 -0
  49. package/types/Private/AgoraBase.d.ts +1 -0
  50. package/types/Private/AgoraBase.d.ts.map +1 -0
  51. package/types/Private/AgoraMediaBase.d.ts +1 -0
  52. package/types/Private/AgoraMediaBase.d.ts.map +1 -0
  53. package/types/Private/AgoraMediaPlayerTypes.d.ts +1 -0
  54. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
  55. package/types/Private/IAgoraLog.d.ts +1 -0
  56. package/types/Private/IAgoraLog.d.ts.map +1 -0
  57. package/types/Private/IAgoraMediaEngine.d.ts +1 -0
  58. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
  59. package/types/Private/IAgoraMediaPlayer.d.ts +35 -34
  60. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
  61. package/types/Private/IAgoraMediaPlayerSource.d.ts +1 -0
  62. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
  63. package/types/Private/IAgoraMediaRecorder.d.ts +1 -0
  64. package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
  65. package/types/Private/IAgoraMediaStreamingSource.d.ts +1 -0
  66. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
  67. package/types/Private/IAgoraMusicContentCenter.d.ts +1 -0
  68. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
  69. package/types/Private/IAgoraRhythmPlayer.d.ts +1 -0
  70. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
  71. package/types/Private/IAgoraRtcEngine.d.ts +27 -19
  72. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
  73. package/types/Private/IAgoraRtcEngineEx.d.ts +1 -0
  74. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
  75. package/types/Private/IAgoraSpatialAudio.d.ts +1 -0
  76. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
  77. package/types/Private/IAudioDeviceManager.d.ts +1 -0
  78. package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
  79. package/types/Private/extension/AgoraBaseExtension.d.ts +1 -0
  80. package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
  81. package/types/Private/extension/AgoraMediaBaseExtension.d.ts +1 -0
  82. package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  83. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +1 -0
  84. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  85. package/types/Private/extension/IAgoraLogExtension.d.ts +1 -0
  86. package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
  87. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +1 -0
  88. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  89. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +1 -0
  90. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  91. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +1 -0
  92. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  93. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +1 -0
  94. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  95. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +1 -0
  96. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  97. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +1 -0
  98. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  99. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +1 -0
  100. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  101. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +1 -0
  102. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  103. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +1 -0
  104. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  105. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +1 -0
  106. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  107. package/types/Private/impl/AgoraBaseImpl.d.ts +1 -0
  108. package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
  109. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +1 -0
  110. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  111. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +1 -0
  112. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  113. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +9 -8
  114. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  115. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +1 -0
  116. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  117. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +1 -0
  118. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  119. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +1 -0
  120. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  121. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +1 -0
  122. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  123. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +13 -10
  124. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  125. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +1 -0
  126. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  127. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +1 -0
  128. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  129. package/types/Private/internal/AudioDeviceManagerInternal.d.ts +1 -0
  130. package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
  131. package/types/Private/internal/IrisApiEngine.d.ts +8 -7
  132. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
  133. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +1 -0
  134. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  135. package/types/Private/internal/MediaEngineInternal.d.ts +1 -0
  136. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
  137. package/types/Private/internal/MediaPlayerInternal.d.ts +1 -0
  138. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
  139. package/types/Private/internal/MediaRecorderInternal.d.ts +1 -0
  140. package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
  141. package/types/Private/internal/MusicContentCenterInternal.d.ts +1 -0
  142. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
  143. package/types/Private/internal/RtcEngineExInternal.d.ts +3 -2
  144. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
  145. package/{js → types}/Private/internal/emitter/EventEmitter.d.ts +1 -0
  146. package/types/Private/internal/emitter/EventEmitter.d.ts.map +1 -0
  147. package/types/Private/ti/AgoraBase-ti.d.ts +1 -0
  148. package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
  149. package/types/Private/ti/AgoraMediaBase-ti.d.ts +1 -0
  150. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  151. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +1 -0
  152. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  153. package/types/Private/ti/IAgoraLog-ti.d.ts +1 -0
  154. package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
  155. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +1 -0
  156. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  157. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +1 -0
  158. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  159. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +1 -0
  160. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  161. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +1 -0
  162. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  163. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts +1 -0
  164. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  165. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +1 -0
  166. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  167. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +1 -0
  168. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  169. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +1 -0
  170. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  171. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +1 -0
  172. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  173. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +1 -0
  174. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  175. package/types/Private/ti/IAudioDeviceManager-ti.d.ts +1 -0
  176. package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  177. package/types/Renderer/AgoraView.d.ts +1 -0
  178. package/types/Renderer/AgoraView.d.ts.map +1 -0
  179. package/types/Renderer/IRenderer.d.ts +6 -5
  180. package/types/Renderer/IRenderer.d.ts.map +1 -0
  181. package/types/Renderer/IRendererManager.d.ts +18 -0
  182. package/types/Renderer/IRendererManager.d.ts.map +1 -0
  183. package/types/Renderer/RendererManager.d.ts +5 -3
  184. package/types/Renderer/RendererManager.d.ts.map +1 -0
  185. package/types/Renderer/{GlRenderer → WebGLRenderer}/index.d.ts +9 -19
  186. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -0
  187. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts +1 -0
  188. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
  189. package/types/Renderer/YUVCanvasRenderer/index.d.ts +4 -4
  190. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
  191. package/types/Renderer/index.d.ts +3 -0
  192. package/types/Renderer/index.d.ts.map +1 -0
  193. package/types/Types.d.ts +15 -9
  194. package/types/Types.d.ts.map +1 -0
  195. package/types/Utils.d.ts +1 -0
  196. package/types/Utils.d.ts.map +1 -0
  197. package/js/AgoraSdk.d.ts +0 -36
  198. package/js/Private/AgoraBase.d.ts +0 -4441
  199. package/js/Private/AgoraMediaBase.d.ts +0 -1124
  200. package/js/Private/AgoraMediaPlayerTypes.d.ts +0 -408
  201. package/js/Private/IAgoraLog.d.ts +0 -80
  202. package/js/Private/IAgoraMediaEngine.d.ts +0 -183
  203. package/js/Private/IAgoraMediaPlayer.d.ts +0 -532
  204. package/js/Private/IAgoraMediaPlayerSource.d.ts +0 -82
  205. package/js/Private/IAgoraMediaRecorder.d.ts +0 -28
  206. package/js/Private/IAgoraMediaStreamingSource.d.ts +0 -41
  207. package/js/Private/IAgoraMusicContentCenter.d.ts +0 -335
  208. package/js/Private/IAgoraRhythmPlayer.d.ts +0 -64
  209. package/js/Private/IAgoraRtcEngine.d.ts +0 -4947
  210. package/js/Private/IAgoraRtcEngineEx.d.ts +0 -553
  211. package/js/Private/IAgoraSpatialAudio.d.ts +0 -265
  212. package/js/Private/IAudioDeviceManager.d.ts +0 -254
  213. package/js/Private/extension/AgoraBaseExtension.d.ts +0 -1
  214. package/js/Private/extension/AgoraMediaBaseExtension.d.ts +0 -1
  215. package/js/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -1
  216. package/js/Private/extension/IAgoraLogExtension.d.ts +0 -1
  217. package/js/Private/extension/IAgoraMediaEngineExtension.d.ts +0 -40
  218. package/js/Private/extension/IAgoraMediaPlayerExtension.d.ts +0 -46
  219. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -1
  220. package/js/Private/extension/IAgoraMediaRecorderExtension.d.ts +0 -44
  221. package/js/Private/extension/IAgoraMusicContentCenterExtension.d.ts +0 -20
  222. package/js/Private/extension/IAgoraRhythmPlayerExtension.d.ts +0 -1
  223. package/js/Private/extension/IAgoraRtcEngineExExtension.d.ts +0 -1
  224. package/js/Private/extension/IAgoraRtcEngineExtension.d.ts +0 -42
  225. package/js/Private/extension/IAgoraSpatialAudioExtension.d.ts +0 -1
  226. package/js/Private/extension/IAudioDeviceManagerExtension.d.ts +0 -1
  227. package/js/Private/impl/AgoraBaseImpl.d.ts +0 -2
  228. package/js/Private/impl/AgoraMediaBaseImpl.d.ts +0 -8
  229. package/js/Private/impl/IAgoraMediaEngineImpl.d.ts +0 -39
  230. package/js/Private/impl/IAgoraMediaPlayerImpl.d.ts +0 -140
  231. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -2
  232. package/js/Private/impl/IAgoraMediaRecorderImpl.d.ts +0 -10
  233. package/js/Private/impl/IAgoraMusicContentCenterImpl.d.ts +0 -58
  234. package/js/Private/impl/IAgoraRtcEngineExImpl.d.ts +0 -105
  235. package/js/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -570
  236. package/js/Private/impl/IAgoraSpatialAudioImpl.d.ts +0 -48
  237. package/js/Private/impl/IAudioDeviceManagerImpl.d.ts +0 -64
  238. package/js/Private/internal/AudioDeviceManagerInternal.d.ts +0 -8
  239. package/js/Private/internal/IrisApiEngine.d.ts +0 -147
  240. package/js/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -18
  241. package/js/Private/internal/MediaEngineInternal.d.ts +0 -21
  242. package/js/Private/internal/MediaPlayerInternal.d.ts +0 -33
  243. package/js/Private/internal/MediaRecorderInternal.d.ts +0 -17
  244. package/js/Private/internal/MusicContentCenterInternal.d.ts +0 -39
  245. package/js/Private/internal/RtcEngineExInternal.d.ts +0 -80
  246. package/js/Private/ti/AgoraBase-ti.d.ts +0 -7
  247. package/js/Private/ti/AgoraMediaBase-ti.d.ts +0 -13
  248. package/js/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +0 -6
  249. package/js/Private/ti/IAgoraLog-ti.d.ts +0 -6
  250. package/js/Private/ti/IAgoraMediaEngine-ti.d.ts +0 -6
  251. package/js/Private/ti/IAgoraMediaPlayer-ti.d.ts +0 -7
  252. package/js/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -7
  253. package/js/Private/ti/IAgoraMediaRecorder-ti.d.ts +0 -6
  254. package/js/Private/ti/IAgoraMediaStreamingSource-ti.d.ts +0 -6
  255. package/js/Private/ti/IAgoraMusicContentCenter-ti.d.ts +0 -7
  256. package/js/Private/ti/IAgoraRhythmPlayer-ti.d.ts +0 -6
  257. package/js/Private/ti/IAgoraRtcEngine-ti.d.ts +0 -9
  258. package/js/Private/ti/IAgoraRtcEngineEx-ti.d.ts +0 -6
  259. package/js/Private/ti/IAgoraSpatialAudio-ti.d.ts +0 -6
  260. package/js/Private/ti/IAudioDeviceManager-ti.d.ts +0 -6
  261. package/js/Renderer/AgoraView.d.ts +0 -69
  262. package/js/Renderer/GlRenderer/index.d.ts +0 -59
  263. package/js/Renderer/GlRenderer/webgl-utils.d.ts +0 -0
  264. package/js/Renderer/IRenderer.d.ts +0 -21
  265. package/js/Renderer/RendererManager.d.ts +0 -152
  266. package/js/Renderer/YUVCanvasRenderer/index.d.ts +0 -16
  267. package/js/Types.d.ts +0 -271
  268. package/js/Utils.d.ts +0 -58
  269. /package/js/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
  270. /package/ts/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
@@ -1,553 +0,0 @@
1
- import './extension/IAgoraRtcEngineExExtension';
2
- import { ChannelMediaRelayConfiguration, ConnectionStateType, DataStreamConfig, EncryptionConfig, LiveTranscoding, SimulcastStreamConfig, SimulcastStreamMode, SpatialAudioParams, UserInfo, VideoCanvas, VideoEncoderConfiguration, VideoMirrorModeType, VideoStreamType, VideoSubscriptionOptions, WatermarkOptions } from './AgoraBase';
3
- import { RenderModeType } from './AgoraMediaBase';
4
- import { ChannelMediaOptions, IRtcEngine, LeaveChannelOptions, StreamFallbackOptions } from './IAgoraRtcEngine';
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 token The token generated on your server for authentication.
28
- * @param connection The connection information. See RtcConnection .
29
- * @param options The channel media options. See ChannelMediaOptions .
30
- *
31
- * @returns
32
- * 0: Success.
33
- * < 0: Failure.
34
- * -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.
35
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
36
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
37
- * -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.
38
- * -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.
39
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
40
- * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
41
- */
42
- abstract joinChannelEx(token: string, connection: RtcConnection, options: ChannelMediaOptions): number;
43
- /**
44
- * Sets channel options and leaves the channel.
45
- * 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.After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback.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 and joinChannelEx at the same time.
46
- *
47
- * @param connection The connection information. See RtcConnection .
48
- * @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.
49
- *
50
- * @returns
51
- * 0: Success.< 0: Failure.
52
- */
53
- abstract leaveChannelEx(connection: RtcConnection, options?: LeaveChannelOptions): number;
54
- /**
55
- * Updates the channel media options after joining the channel.
56
- *
57
- * @param options The channel media options. See ChannelMediaOptions .
58
- * @param connection The connection information. See RtcConnection .
59
- *
60
- * @returns
61
- * 0: Success.< 0: Failure.-2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
62
- */
63
- abstract updateChannelMediaOptionsEx(options: ChannelMediaOptions, connection: RtcConnection): number;
64
- /**
65
- * Creates a data stream.
66
- * 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.
67
- *
68
- * @param config The configurations for the data stream. See DataStreamConfig .
69
- * @param connection The connection information. See RtcConnection .
70
- *
71
- * @returns
72
- * ID of the created data stream, if the method call succeeds.< 0: Failure.
73
- */
74
- abstract setVideoEncoderConfigurationEx(config: VideoEncoderConfiguration, connection: RtcConnection): number;
75
- /**
76
- * Initializes the video view of a remote user.
77
- * 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.
78
- *
79
- * @param canvas The remote video view settings. See VideoCanvas .
80
- * @param connection The connection information. See RtcConnection .
81
- *
82
- * @returns
83
- * 0: Success.< 0: Failure.
84
- */
85
- abstract setupRemoteVideoEx(canvas: VideoCanvas, connection: RtcConnection): number;
86
- /**
87
- * Stops or resumes receiving the audio stream of a specified user.
88
- *
89
- * @param uid The ID of the specified user.
90
- * @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.
91
- * @param connection The connection information. See RtcConnection .
92
- *
93
- * @returns
94
- * 0: Success. < 0: Failure.
95
- */
96
- abstract muteRemoteAudioStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
97
- /**
98
- * Stops or resumes receiving the audio stream of a specified user.
99
- *
100
- * @param uid The ID of the specified user.
101
- * @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.
102
- * @param connection The connection information. See RtcConnection .
103
- *
104
- * @returns
105
- * 0: Success. < 0: Failure.
106
- */
107
- abstract muteRemoteVideoStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
108
- /**
109
- * Sets the stream type of the remote video.
110
- * 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.
111
- *
112
- * @param uid The user ID.
113
- * @param streamType The video stream type: VideoStreamType .
114
- * @param connection The connection information. See RtcConnection .
115
- *
116
- * @returns
117
- * 0: Success.< 0: Failure.
118
- */
119
- abstract setRemoteVideoStreamTypeEx(uid: number, streamType: VideoStreamType, connection: RtcConnection): number;
120
- /**
121
- * Stops or resumes subscribing to the video streams of all remote users.
122
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
123
- *
124
- * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
125
- * @param connection The connection information. See RtcConnection .
126
- *
127
- * @returns
128
- * 0: Success.< 0: Failure.
129
- */
130
- abstract muteLocalAudioStreamEx(mute: boolean, connection: RtcConnection): number;
131
- /**
132
- * Stops or resumes subscribing to the video streams of all remote users.
133
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
134
- *
135
- * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
136
- * @param connection The connection information. See RtcConnection .
137
- *
138
- * @returns
139
- * 0: Success.< 0: Failure.
140
- */
141
- abstract muteLocalVideoStreamEx(mute: boolean, connection: RtcConnection): number;
142
- /**
143
- * Stops or resumes subscribing to the video streams of all remote users.
144
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
145
- *
146
- * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
147
- * @param connection The connection information. See RtcConnection .
148
- *
149
- * @returns
150
- * 0: Success.< 0: Failure.
151
- */
152
- abstract muteAllRemoteAudioStreamsEx(mute: boolean, connection: RtcConnection): number;
153
- /**
154
- * Stops or resumes subscribing to the video streams of all remote users.
155
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
156
- *
157
- * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
158
- * @param connection The connection information. See RtcConnection .
159
- *
160
- * @returns
161
- * 0: Success.< 0: Failure.
162
- */
163
- abstract muteAllRemoteVideoStreamsEx(mute: boolean, connection: RtcConnection): number;
164
- /**
165
- * Set the allowlist of subscriptions for video streams.
166
- * 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.
167
- * 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 .
168
- *
169
- * @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.
170
- * @param uidNumber The number of users in the user ID list.
171
- * @param connection The connection information. See RtcConnection .
172
- *
173
- * @returns
174
- * 0: Success.< 0: Failure.
175
- */
176
- abstract setSubscribeAudioBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
177
- /**
178
- * Set the allowlist of subscriptions for video streams.
179
- * 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.
180
- * 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 .
181
- *
182
- * @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.
183
- * @param uidNumber The number of users in the user ID list.
184
- * @param connection The connection information. See RtcConnection .
185
- *
186
- * @returns
187
- * 0: Success.< 0: Failure.
188
- */
189
- abstract setSubscribeAudioAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
190
- /**
191
- * Set the allowlist of subscriptions for video streams.
192
- * 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.
193
- * 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 .
194
- *
195
- * @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.
196
- * @param uidNumber The number of users in the user ID list.
197
- * @param connection The connection information. See RtcConnection .
198
- *
199
- * @returns
200
- * 0: Success.< 0: Failure.
201
- */
202
- abstract setSubscribeVideoBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
203
- /**
204
- * Set the allowlist of subscriptions for video streams.
205
- * 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.
206
- * 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 .
207
- *
208
- * @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.
209
- * @param uidNumber The number of users in the user ID list.
210
- * @param connection The connection information. See RtcConnection .
211
- *
212
- * @returns
213
- * 0: Success.< 0: Failure.
214
- */
215
- abstract setSubscribeVideoAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
216
- /**
217
- * Options for subscribing to remote video streams.
218
- * 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.
219
- *
220
- * @param uid The user ID of the remote user.
221
- * @param options The video subscription options. See VideoSubscriptionOptions .
222
- * @param connection The connection information. See RtcConnection .
223
- *
224
- * @returns
225
- * 0: Success.< 0: Failure.
226
- */
227
- abstract setRemoteVideoSubscriptionOptionsEx(uid: number, options: VideoSubscriptionOptions, connection: RtcConnection): number;
228
- /**
229
- * Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
230
- * 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.
231
- *
232
- * @param uid The user ID of the remote user.
233
- * @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.
234
- * @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.
235
- * @param connection The connection information. See RtcConnection .
236
- *
237
- * @returns
238
- * 0: Success.< 0: Failure.
239
- */
240
- abstract setRemoteVoicePositionEx(uid: number, pan: number, gain: number, connection: RtcConnection): number;
241
- /**
242
- * @ignore
243
- */
244
- abstract setRemoteUserSpatialAudioParamsEx(uid: number, params: SpatialAudioParams, connection: RtcConnection): number;
245
- /**
246
- * @ignore
247
- */
248
- abstract setRemoteRenderModeEx(uid: number, renderMode: RenderModeType, mirrorMode: VideoMirrorModeType, connection: RtcConnection): number;
249
- /**
250
- * Enables loopback audio capturing.
251
- * 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.This method only supports using one sound card for audio capturing.
252
- *
253
- * @param connection The connection information. See RtcConnection .
254
- * @param enabled Sets whether to enable loopback audio capture:true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
255
- * @param deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing.Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing.
256
- *
257
- * @returns
258
- * 0: Success.< 0: Failure.
259
- */
260
- abstract enableLoopbackRecordingEx(connection: RtcConnection, enabled: boolean, deviceName?: string): number;
261
- /**
262
- * @ignore
263
- */
264
- abstract adjustRecordingSignalVolumeEx(volume: number, connection: RtcConnection): number;
265
- /**
266
- * Stops or resumes subscribing to the video streams of all remote users.
267
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
268
- *
269
- * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
270
- * @param connection The connection information. See RtcConnection .
271
- *
272
- * @returns
273
- * 0: Success.< 0: Failure.
274
- */
275
- abstract muteRecordingSignalEx(mute: boolean, connection: RtcConnection): number;
276
- /**
277
- * Adjusts the playback signal volume of a specified remote user.
278
- * 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.
279
- *
280
- * @param uid The user ID of the remote user.
281
- * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
282
- * @param connection The connection information. See RtcConnection .
283
- *
284
- * @returns
285
- * 0: Success.< 0: Failure.
286
- */
287
- abstract adjustUserPlaybackSignalVolumeEx(uid: number, volume: number, connection: RtcConnection): number;
288
- /**
289
- * Gets the current connection state of the SDK.
290
- * You can call this method either before or after joining a channel.
291
- *
292
- * @param connection The connection information. See RtcConnection .
293
- *
294
- * @returns
295
- * The current connection state.
296
- */
297
- abstract getConnectionStateEx(connection: RtcConnection): ConnectionStateType;
298
- /**
299
- * @ignore
300
- */
301
- abstract enableEncryptionEx(connection: RtcConnection, enabled: boolean, config: EncryptionConfig): number;
302
- /**
303
- * Creates a data stream.
304
- * 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.
305
- *
306
- * @param config The configurations for the data stream. See DataStreamConfig .
307
- * @param connection The connection information. See RtcConnection .
308
- *
309
- * @returns
310
- * ID of the created data stream, if the method call succeeds.< 0: Failure.
311
- */
312
- abstract createDataStreamEx(config: DataStreamConfig, connection: RtcConnection): number;
313
- /**
314
- * Sends data stream messages.
315
- * 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 60 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 30 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.
316
- * 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.
317
- *
318
- * @param streamId The data stream ID. You can get the data stream ID by calling createDataStreamEx.
319
- * @param data The message to be sent.
320
- * @param length The length of the data.
321
- * @param connection The connection information. See RtcConnection .
322
- *
323
- * @returns
324
- * 0: Success.< 0: Failure.
325
- */
326
- abstract sendStreamMessageEx(streamId: number, data: Uint8Array, length: number, connection: RtcConnection): number;
327
- /**
328
- * Adds a watermark image to the local video.
329
- * This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one.The watermark coordinates are dependent on the settings in the 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 dimensions set in the setVideoEncoderConfigurationEx 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.
330
- *
331
- * @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.
332
- * @param options The options of the watermark image to be added. See WatermarkOptions .
333
- * @param connection The connection information. See RtcConnection .
334
- *
335
- * @returns
336
- * 0: Success.< 0: Failure.
337
- */
338
- abstract addVideoWatermarkEx(watermarkUrl: string, options: WatermarkOptions, connection: RtcConnection): number;
339
- /**
340
- * Removes the watermark image from the video stream.
341
- *
342
- * @param connection The connection information. See RtcConnection .
343
- *
344
- * @returns
345
- * 0: Success.< 0: Failure.
346
- */
347
- abstract clearVideoWatermarkEx(connection: RtcConnection): number;
348
- /**
349
- * Agora supports reporting and analyzing customized messages.
350
- * 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.
351
- */
352
- abstract sendCustomReportMessageEx(id: string, category: string, event: string, label: string, value: number, connection: RtcConnection): number;
353
- /**
354
- * Enables the reporting of users' volume indication.
355
- * 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.
356
- *
357
- * @param interval Sets the time interval between two consecutive volume indications:
358
- * ≤ 0: Disables the volume indication.
359
- * > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
360
- *
361
- * @param smooth The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator.
362
- * @param reportVad true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.
363
- * false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
364
- *
365
- * @param connection The connection information. See RtcConnection .
366
- *
367
- * @returns
368
- * 0: Success.< 0: Failure.
369
- */
370
- abstract enableAudioVolumeIndicationEx(interval: number, smooth: number, reportVad: boolean, connection: RtcConnection): number;
371
- /**
372
- * Starts pushing media streams to a CDN without transcoding.
373
- * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
374
- * Call this method after joining a channel.
375
- * Only hosts in the LIVE_BROADCASTING profile can call this method.
376
- * 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.
377
- * 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.
378
- *
379
- * @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.
380
- * @param connection The connection information. See RtcConnection .
381
- *
382
- * @returns
383
- * 0: Success.
384
- * < 0: Failure.
385
- * -2: The URL is null or the string length is 0.
386
- * -7: The SDK is not initialized before calling this method.
387
- * -19: The Media Push URL is already in use, use another URL instead.
388
- */
389
- abstract startRtmpStreamWithoutTranscodingEx(url: string, connection: RtcConnection): number;
390
- /**
391
- * Starts Media Push and sets the transcoding configuration.
392
- * 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.
393
- *
394
- * @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.
395
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
396
- *
397
- * @param connection The connection information. See RtcConnection .
398
- *
399
- * @returns
400
- * 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.
401
- */
402
- abstract startRtmpStreamWithTranscodingEx(url: string, transcoding: LiveTranscoding, connection: RtcConnection): number;
403
- /**
404
- * Updates the transcoding configuration.
405
- * 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.
406
- *
407
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
408
- *
409
- * @param connection The connection information. See RtcConnection .
410
- *
411
- * @returns
412
- * 0: Success.< 0: Failure.
413
- */
414
- abstract updateRtmpTranscodingEx(transcoding: LiveTranscoding, connection: RtcConnection): number;
415
- /**
416
- * Starts pushing media streams to a CDN without transcoding.
417
- * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
418
- * Call this method after joining a channel.
419
- * Only hosts in the LIVE_BROADCASTING profile can call this method.
420
- * 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.
421
- * 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.
422
- *
423
- * @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.
424
- * @param connection The connection information. See RtcConnection .
425
- *
426
- * @returns
427
- * 0: Success.
428
- * < 0: Failure.
429
- * -2: The URL is null or the string length is 0.
430
- * -7: The SDK is not initialized before calling this method.
431
- * -19: The Media Push URL is already in use, use another URL instead.
432
- */
433
- abstract stopRtmpStreamEx(url: string, connection: RtcConnection): number;
434
- /**
435
- * @ignore
436
- */
437
- abstract startOrUpdateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
438
- /**
439
- * Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
440
- * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel.If the onChannelMediaRelayStateChanged callback returnsRelayStateFailure (3), an exception occurs during the media stream relay.Call this method after joining the channel.This method takes effect only when you are a host in a live streaming channel.After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelayEx method to quit the current relay.The relaying media streams across channels function needs to be enabled by contacting .We do not support string user accounts in this API.
441
- *
442
- * @returns
443
- * 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.
444
- */
445
- abstract startChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
446
- /**
447
- * Updates the channels for media stream relay.
448
- * After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method.After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code.Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged (RelayStateRunning, RelayOk); otherwise, the method call fails.
449
- *
450
- * @returns
451
- * 0: Success.< 0: Failure.
452
- */
453
- abstract updateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
454
- /**
455
- * Stops the media stream relay. Once the relay stops, the host quits all the target channels.
456
- * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports RelayStateIdle (0) and RelayOk (0), the host successfully stops the relay.If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the RelayErrorServerNoResponse (2) or RelayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops.
457
- *
458
- * @param connection The connection information. See RtcConnection .
459
- *
460
- * @returns
461
- * 0: Success.< 0: Failure.
462
- */
463
- abstract stopChannelMediaRelayEx(connection: RtcConnection): number;
464
- /**
465
- * Pauses the media stream relay to all target channels.
466
- * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay .After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback to report whether the media stream relay is successfully paused.Call this method after startChannelMediaRelayEx .
467
- *
468
- * @param connection The connection information. See RtcConnection .
469
- *
470
- * @returns
471
- * 0: Success.< 0: Failure.
472
- */
473
- abstract pauseAllChannelMediaRelayEx(connection: RtcConnection): number;
474
- /**
475
- * Resumes the media stream relay to all target channels.
476
- * 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 .
477
- *
478
- * @param connection The connection information. See RtcConnection .
479
- *
480
- * @returns
481
- * 0: Success.< 0: Failure.
482
- */
483
- abstract resumeAllChannelMediaRelayEx(connection: RtcConnection): number;
484
- /**
485
- * @ignore
486
- */
487
- abstract getUserInfoByUserAccountEx(userAccount: string, connection: RtcConnection): UserInfo;
488
- /**
489
- * Occurs when the most active remote speaker is detected.
490
- * After a successful call of enableAudioVolumeIndication , the SDK continuously detects which remote user has the loudest volume. During the current period, the remote user, who is detected as the loudest for the most times, is the most active user.When the number of users is no less than two and an active remote speaker exists, the SDK triggers this callback and reports the uid of the most active remote speaker.If the most active remote speaker is always the same user, the SDK triggers the onActiveSpeaker callback only once.If the most active remote speaker changes to another user, the SDK triggers this callback again and reports the uid of the new active remote speaker.
491
- *
492
- * @param uid The user ID of the most active remote speaker.
493
- * @param connection The connection information. See RtcConnection .
494
- */
495
- abstract getUserInfoByUidEx(uid: number, connection: RtcConnection): UserInfo;
496
- /**
497
- * Enables or disables dual-stream mode on the sender side.
498
- * 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.
499
- *
500
- * @param enabled Whether to enable dual-stream mode:true: Enable dual-stream mode.false: (Default) Disable dual-stream mode.
501
- * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .
502
- * @param connection The connection information. See RtcConnection .
503
- *
504
- * @returns
505
- * 0: Success.< 0: Failure.
506
- */
507
- abstract enableDualStreamModeEx(enabled: boolean, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
508
- /**
509
- * Sets dual-stream mode on the sender side.
510
- * The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream(never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).The difference and connection between this method and enableDualStreamModeEx is as follows:When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamModeEx(false).When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamModeEx(true).Both methods can be called before and after joining a channel. If they are used at the same time, the settings in the method called later shall prevail.
511
- *
512
- * @param mode The mode in which the video stream is sent. See SimulcastStreamMode .
513
- * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .
514
- *
515
- * @param connection The connection information. See RtcConnection .
516
- *
517
- * @returns
518
- * 0: Success.< 0: Failure.
519
- */
520
- abstract setDualStreamModeEx(mode: SimulcastStreamMode, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
521
- /**
522
- * @ignore
523
- */
524
- abstract setHighPriorityUserListEx(uidList: number[], uidNum: number, option: StreamFallbackOptions, connection: RtcConnection): number;
525
- /**
526
- * Takes a snapshot of a video stream.
527
- * 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.
528
- * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
529
- * 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.
530
- *
531
- * @param connection The connection information. See RtcConnection .
532
- * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
533
- * @param filePath The local path (including filename extensions) of the snapshot. For example:
534
- * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
535
- * macOS: ~/Library/Logs/example.jpg
536
- * Ensure that the path you specify exists and is writable.
537
- *
538
- *
539
- * @returns
540
- * 0: Success.< 0: Failure.
541
- */
542
- abstract takeSnapshotEx(connection: RtcConnection, uid: number, filePath: string): number;
543
- /**
544
- * Stops recording the local audio and video.
545
- * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable.
546
- *
547
- * @param connection The connection information. See RtcConnection .
548
- *
549
- * @returns
550
- * 0: Success.< 0: Failure.-7: The method is called before IRtcEngine is initialized.
551
- */
552
- abstract startMediaRenderingTracingEx(connection: RtcConnection): number;
553
- }