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,4441 +0,0 @@
1
- import './extension/AgoraBaseExtension';
2
- import { RenderModeType, VideoSourceType } from './AgoraMediaBase';
3
- /**
4
- * The channel profile.
5
- */
6
- export declare enum ChannelProfileType {
7
- /**
8
- * 0: Communication. Use this profile when there are only two users in the channel.
9
- */
10
- ChannelProfileCommunication = 0,
11
- /**
12
- * 1: Live streaming. Live streaming. Use this profile when there are more than two users in the channel.
13
- */
14
- ChannelProfileLiveBroadcasting = 1,
15
- /**
16
- * 2: Gaming. This profile is deprecated.
17
- */
18
- ChannelProfileGame = 2,
19
- /**
20
- * Cloud gaming. The scenario is optimized for latency. Use this profile if the use case requires frequent interactions between users.
21
- */
22
- ChannelProfileCloudGaming = 3,
23
- /**
24
- * @ignore
25
- */
26
- ChannelProfileCommunication1v1 = 4
27
- }
28
- /**
29
- * @ignore
30
- */
31
- export declare enum WarnCodeType {
32
- /**
33
- * @ignore
34
- */
35
- WarnInvalidView = 8,
36
- /**
37
- * @ignore
38
- */
39
- WarnInitVideo = 16,
40
- /**
41
- * @ignore
42
- */
43
- WarnPending = 20,
44
- /**
45
- * @ignore
46
- */
47
- WarnNoAvailableChannel = 103,
48
- /**
49
- * @ignore
50
- */
51
- WarnLookupChannelTimeout = 104,
52
- /**
53
- * @ignore
54
- */
55
- WarnLookupChannelRejected = 105,
56
- /**
57
- * @ignore
58
- */
59
- WarnOpenChannelTimeout = 106,
60
- /**
61
- * @ignore
62
- */
63
- WarnOpenChannelRejected = 107,
64
- /**
65
- * @ignore
66
- */
67
- WarnSwitchLiveVideoTimeout = 111,
68
- /**
69
- * @ignore
70
- */
71
- WarnSetClientRoleTimeout = 118,
72
- /**
73
- * @ignore
74
- */
75
- WarnOpenChannelInvalidTicket = 121,
76
- /**
77
- * @ignore
78
- */
79
- WarnOpenChannelTryNextVos = 122,
80
- /**
81
- * @ignore
82
- */
83
- WarnChannelConnectionUnrecoverable = 131,
84
- /**
85
- * @ignore
86
- */
87
- WarnChannelConnectionIpChanged = 132,
88
- /**
89
- * @ignore
90
- */
91
- WarnChannelConnectionPortChanged = 133,
92
- /**
93
- * @ignore
94
- */
95
- WarnChannelSocketError = 134,
96
- /**
97
- * @ignore
98
- */
99
- WarnAudioMixingOpenError = 701,
100
- /**
101
- * @ignore
102
- */
103
- WarnAdmRuntimePlayoutWarning = 1014,
104
- /**
105
- * @ignore
106
- */
107
- WarnAdmRuntimeRecordingWarning = 1016,
108
- /**
109
- * @ignore
110
- */
111
- WarnAdmRecordAudioSilence = 1019,
112
- /**
113
- * @ignore
114
- */
115
- WarnAdmPlayoutMalfunction = 1020,
116
- /**
117
- * @ignore
118
- */
119
- WarnAdmRecordMalfunction = 1021,
120
- /**
121
- * @ignore
122
- */
123
- WarnAdmRecordAudioLowlevel = 1031,
124
- /**
125
- * @ignore
126
- */
127
- WarnAdmPlayoutAudioLowlevel = 1032,
128
- /**
129
- * @ignore
130
- */
131
- WarnAdmWindowsNoDataReadyEvent = 1040,
132
- /**
133
- * @ignore
134
- */
135
- WarnApmHowling = 1051,
136
- /**
137
- * @ignore
138
- */
139
- WarnAdmGlitchState = 1052,
140
- /**
141
- * @ignore
142
- */
143
- WarnAdmImproperSettings = 1053,
144
- /**
145
- * @ignore
146
- */
147
- WarnAdmWinCoreNoRecordingDevice = 1322,
148
- /**
149
- * @ignore
150
- */
151
- WarnAdmWinCoreNoPlayoutDevice = 1323,
152
- /**
153
- * @ignore
154
- */
155
- WarnAdmWinCoreImproperCaptureRelease = 1324
156
- }
157
- /**
158
- * Error codes.
159
- * An error code indicates that the SDK encountered an unrecoverable error that requires application intervention. For example, an error is returned when the camera fails to open, and the app needs to inform the user that the camera cannot be used.
160
- */
161
- export declare enum ErrorCodeType {
162
- /**
163
- * 0: No error.
164
- */
165
- ErrOk = 0,
166
- /**
167
- * 1: General error with no classified reason. Try calling the method again.
168
- */
169
- ErrFailed = 1,
170
- /**
171
- * 2: An invalid parameter is used. For example, the specified channel name includes illegal characters. Reset the parameter.
172
- */
173
- ErrInvalidArgument = 2,
174
- /**
175
- * 3: The SDK is not ready. Possible reasons include the following:The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.No user has joined the channel when the method is called. Check the code logic.The user has not left the channel when the rate or complain method is called. Check the code logic.The audio module is disabled.The program is not complete.
176
- */
177
- ErrNotReady = 3,
178
- /**
179
- * 4: IRtcEngine does not support the request. Possible reasons include the following:The built-in encryption mode is incorrect, or the SDK fails to load the external encryption library. Check the encryption mode setting, or reload the external encryption library.
180
- */
181
- ErrNotSupported = 4,
182
- /**
183
- * 5: The request is rejected. Possible reasons include the following:The IRtcEngine initialization fails. Reinitialize the IRtcEngine.The channel name is set as the empty string "" when joining the channel. Reset the channel name.When the joinChannelEx method is called to join multiple channels, the specified channel name is already in use. Reset the channel name.
184
- */
185
- ErrRefused = 5,
186
- /**
187
- * 6: The buffer size is insufficient to store the returned data.
188
- */
189
- ErrBufferTooSmall = 6,
190
- /**
191
- * 7: A method is called before the initialization of IRtcEngine. Ensure that the IRtcEngine object is initialized before using this method.
192
- */
193
- ErrNotInitialized = 7,
194
- /**
195
- * @ignore
196
- */
197
- ErrInvalidState = 8,
198
- /**
199
- * 9: Permission to access is not granted. Check whether your app has access to the audio and video device.
200
- */
201
- ErrNoPermission = 9,
202
- /**
203
- * 10: A timeout occurs. Some API calls require the SDK to return the execution result. This error occurs if the SDK takes too long (more than 10 seconds) to return the result.
204
- */
205
- ErrTimedout = 10,
206
- /**
207
- * @ignore
208
- */
209
- ErrCanceled = 11,
210
- /**
211
- * @ignore
212
- */
213
- ErrTooOften = 12,
214
- /**
215
- * @ignore
216
- */
217
- ErrBindSocket = 13,
218
- /**
219
- * @ignore
220
- */
221
- ErrNetDown = 14,
222
- /**
223
- * 17: The request to join the channel is rejected. Possible reasons include the following:The user is already in the channel. Agora recommends using the onConnectionStateChanged callback to get whether the user is in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.After calling startEchoTest for the call test, the user tries to join the channel without calling stopEchoTest to end the current test. To join a channel, the call test must be ended by calling stopEchoTest.
224
- */
225
- ErrJoinChannelRejected = 17,
226
- /**
227
- * 18: Fails to leave the channel. Possible reasons include the following:The user has left the channel before calling the leaveChannel [1/2] method. Stop calling this method to clear this error.The user calls the leaveChannel [1/2] method to leave the channel before joining the channel. In this case, no extra operation is needed.
228
- */
229
- ErrLeaveChannelRejected = 18,
230
- /**
231
- * 19: Resources are already in use.
232
- */
233
- ErrAlreadyInUse = 19,
234
- /**
235
- * 20: The request is abandoned by the SDK, possibly because the request has been sent too frequently.
236
- */
237
- ErrAborted = 20,
238
- /**
239
- * 21: The IRtcEngine fails to initialize and has crashed because of specific Windows firewall settings.
240
- */
241
- ErrInitNetEngine = 21,
242
- /**
243
- * 22: The SDK fails to allocate resources because your app uses too many system resources or system resources are insufficient.
244
- */
245
- ErrResourceLimited = 22,
246
- /**
247
- * 101: The specified App ID is invalid. Rejoin the channel with a valid App ID.
248
- */
249
- ErrInvalidAppId = 101,
250
- /**
251
- * 102: The specified channel name is invalid. A possible reason is that the parameter's data type is incorrect. Rejoin the channel with a valid channel name.
252
- */
253
- ErrInvalidChannelName = 102,
254
- /**
255
- * 103: Fails to get server resources in the specified region. Try another region when initializing IRtcEngine.
256
- */
257
- ErrNoServerResources = 103,
258
- /**
259
- * 109: The current token has expired. Apply for a new token on the server and call renewToken .Deprecated:This enumerator is deprecated. Use ConnectionChangedTokenExpired(9) in the onConnectionStateChanged callback instead.
260
- */
261
- ErrTokenExpired = 109,
262
- /**
263
- * 110: Invalid token Typical reasons include the following:App Certificate is enabled in Agora Console, but the code still uses App ID for authentication. Once App Certificate is enabled for a project, you must use token-based authentication.The uid used to generate the token is not the same as the uid used to join the channel.Deprecated:This enumerator is deprecated. Use ConnectionChangedInvalidToken(8) in the onConnectionStateChanged callback instead.
264
- */
265
- ErrInvalidToken = 110,
266
- /**
267
- * 111: The network connection is interrupted. The SDK triggers this callback when it loses connection with the server for more than four seconds after the connection is established.
268
- */
269
- ErrConnectionInterrupted = 111,
270
- /**
271
- * 112: The network connection is lost. Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
272
- */
273
- ErrConnectionLost = 112,
274
- /**
275
- * 113: The user is not in the channel when calling the sendStreamMessage method.
276
- */
277
- ErrNotInChannel = 113,
278
- /**
279
- * 114: The data size exceeds 1 KB when calling the sendStreamMessage method.
280
- */
281
- ErrSizeTooLarge = 114,
282
- /**
283
- * 115: The data bitrate exceeds 6 KB/s when calling the sendStreamMessage method.
284
- */
285
- ErrBitrateLimit = 115,
286
- /**
287
- * 116: More than five data streams are created when calling the createDataStream method.
288
- */
289
- ErrTooManyDataStreams = 116,
290
- /**
291
- * 117: The data stream transmission times out.
292
- */
293
- ErrStreamMessageTimeout = 117,
294
- /**
295
- * 119: Switching roles fails, try rejoining the channel.
296
- */
297
- ErrSetClientRoleNotAuthorized = 119,
298
- /**
299
- * 120: Decryption fails. The user might have entered an incorrect password to join the channel. Check the entered password, or tell the user to try rejoining the channel.
300
- */
301
- ErrDecryptionFailed = 120,
302
- /**
303
- * 121: The user ID is invalid.
304
- */
305
- ErrInvalidUserId = 121,
306
- /**
307
- * 123: The user is banned from the server.
308
- */
309
- ErrClientIsBannedByServer = 123,
310
- /**
311
- * 130: The SDK does not support pushing encrypted streams to CDN.
312
- */
313
- ErrEncryptedStreamNotAllowedPublish = 130,
314
- /**
315
- * @ignore
316
- */
317
- ErrLicenseCredentialInvalid = 131,
318
- /**
319
- * 134: The user account is invalid, possibly because it contains invalid parameters.
320
- */
321
- ErrInvalidUserAccount = 134,
322
- /**
323
- * @ignore
324
- */
325
- ErrModuleNotFound = 157,
326
- /**
327
- * 1001: The SDK fails to load the media engine.
328
- */
329
- ErrCertRaw = 157,
330
- /**
331
- * @ignore
332
- */
333
- ErrCertJsonPart = 158,
334
- /**
335
- * @ignore
336
- */
337
- ErrCertJsonInval = 159,
338
- /**
339
- * @ignore
340
- */
341
- ErrCertJsonNomem = 160,
342
- /**
343
- * @ignore
344
- */
345
- ErrCertCustom = 161,
346
- /**
347
- * @ignore
348
- */
349
- ErrCertCredential = 162,
350
- /**
351
- * @ignore
352
- */
353
- ErrCertSign = 163,
354
- /**
355
- * @ignore
356
- */
357
- ErrCertFail = 164,
358
- /**
359
- * @ignore
360
- */
361
- ErrCertBuf = 165,
362
- /**
363
- * @ignore
364
- */
365
- ErrCertNull = 166,
366
- /**
367
- * @ignore
368
- */
369
- ErrCertDuedate = 167,
370
- /**
371
- * @ignore
372
- */
373
- ErrCertRequest = 168,
374
- /**
375
- * @ignore
376
- */
377
- ErrPcmsendFormat = 200,
378
- /**
379
- * @ignore
380
- */
381
- ErrPcmsendBufferoverflow = 201,
382
- /**
383
- * @ignore
384
- */
385
- ErrLoginAlreadyLogin = 428,
386
- /**
387
- * @ignore
388
- */
389
- ErrLoadMediaEngine = 1001,
390
- /**
391
- * 1005: A general error occurs (no specified reason). Check whether the audio device is already in use by another app, or try rejoining the channel.
392
- */
393
- ErrAdmGeneralError = 1005,
394
- /**
395
- * 1008: An error occurs when initializing the playback device. Check whether the playback device is already in use by another app, or try rejoining the channel.
396
- */
397
- ErrAdmInitPlayout = 1008,
398
- /**
399
- * 1009: An error occurs when starting the playback device. Check the playback device.
400
- */
401
- ErrAdmStartPlayout = 1009,
402
- /**
403
- * 1010: An error occurs when stopping the playback device.
404
- */
405
- ErrAdmStopPlayout = 1010,
406
- /**
407
- * 1011: An error occurs when initializing the recording device. Check the recording device, or try rejoining the channel.
408
- */
409
- ErrAdmInitRecording = 1011,
410
- /**
411
- * 1012: An error occurs when starting the recording device. Check the recording device.
412
- */
413
- ErrAdmStartRecording = 1012,
414
- /**
415
- * 1013: An error occurs when stopping the recording device.
416
- */
417
- ErrAdmStopRecording = 1013,
418
- /**
419
- * 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.
420
- */
421
- ErrVdmCameraNotAuthorized = 1501
422
- }
423
- /**
424
- * @ignore
425
- */
426
- export declare enum LicenseErrorType {
427
- /**
428
- * @ignore
429
- */
430
- LicenseErrInvalid = 1,
431
- /**
432
- * @ignore
433
- */
434
- LicenseErrExpire = 2,
435
- /**
436
- * @ignore
437
- */
438
- LicenseErrMinutesExceed = 3,
439
- /**
440
- * @ignore
441
- */
442
- LicenseErrLimitedPeriod = 4,
443
- /**
444
- * @ignore
445
- */
446
- LicenseErrDiffDevices = 5,
447
- /**
448
- * @ignore
449
- */
450
- LicenseErrInternal = 99
451
- }
452
- /**
453
- * The operation permissions of the SDK on the audio session.
454
- */
455
- export declare enum AudioSessionOperationRestriction {
456
- /**
457
- * No restriction, the SDK can change the audio session.
458
- */
459
- AudioSessionOperationRestrictionNone = 0,
460
- /**
461
- * The SDK cannot change the audio session category.
462
- */
463
- AudioSessionOperationRestrictionSetCategory = 1,
464
- /**
465
- * The SDK cannot change the audio session category, mode, or categoryOptions.
466
- */
467
- AudioSessionOperationRestrictionConfigureSession = 2,
468
- /**
469
- * The SDK keeps the audio session active when the user leaves the channel, for example, to play an audio file in the background.
470
- */
471
- AudioSessionOperationRestrictionDeactivateSession = 4,
472
- /**
473
- * Completely restricts the operation permissions of the SDK on the audio session; the SDK cannot change the audio session.
474
- */
475
- AudioSessionOperationRestrictionAll = 128
476
- }
477
- /**
478
- * Reasons for a user being offline.
479
- */
480
- export declare enum UserOfflineReasonType {
481
- /**
482
- * 0: The user quits the call.
483
- */
484
- UserOfflineQuit = 0,
485
- /**
486
- * 1: The SDK times out and the user drops offline because no data packet is received within a certain period of time.If the user quits the call and the message is not passed to the SDK (due to an unreliable channel), the SDK assumes the user dropped offline.
487
- */
488
- UserOfflineDropped = 1,
489
- /**
490
- * 2: The user switches the client role from the host to the audience.
491
- */
492
- UserOfflineBecomeAudience = 2
493
- }
494
- /**
495
- * The interface class.
496
- */
497
- export declare enum InterfaceIdType {
498
- /**
499
- * The IAudioDeviceManager interface class.
500
- */
501
- AgoraIidAudioDeviceManager = 1,
502
- /**
503
- * The IVideoDeviceManager interface class.
504
- */
505
- AgoraIidVideoDeviceManager = 2,
506
- /**
507
- * @ignore
508
- */
509
- AgoraIidParameterEngine = 3,
510
- /**
511
- * The IMediaEngine interface class.
512
- */
513
- AgoraIidMediaEngine = 4,
514
- /**
515
- * @ignore
516
- */
517
- AgoraIidAudioEngine = 5,
518
- /**
519
- * @ignore
520
- */
521
- AgoraIidVideoEngine = 6,
522
- /**
523
- * @ignore
524
- */
525
- AgoraIidRtcConnection = 7,
526
- /**
527
- * This interface class is deprecated.
528
- */
529
- AgoraIidSignalingEngine = 8,
530
- /**
531
- * @ignore
532
- */
533
- AgoraIidMediaEngineRegulator = 9,
534
- /**
535
- * @ignore
536
- */
537
- AgoraIidCloudSpatialAudio = 10,
538
- /**
539
- * @ignore
540
- */
541
- AgoraIidLocalSpatialAudio = 11,
542
- /**
543
- * @ignore
544
- */
545
- AgoraIidStateSync = 13,
546
- /**
547
- * @ignore
548
- */
549
- AgoraIidMetachatService = 14,
550
- /**
551
- * @ignore
552
- */
553
- AgoraIidMusicContentCenter = 15,
554
- /**
555
- * @ignore
556
- */
557
- AgoraIidH265Transcoder = 16
558
- }
559
- /**
560
- * Network quality types.
561
- */
562
- export declare enum QualityType {
563
- /**
564
- * 0: The network quality is unknown.
565
- */
566
- QualityUnknown = 0,
567
- /**
568
- * 1: The network quality is excellent.
569
- */
570
- QualityExcellent = 1,
571
- /**
572
- * 2: The network quality is quite good, but the bitrate may be slightly lower than excellent.
573
- */
574
- QualityGood = 2,
575
- /**
576
- * 3: Users can feel the communication is slightly impaired.
577
- */
578
- QualityPoor = 3,
579
- /**
580
- * 4: Users cannot communicate smoothly.
581
- */
582
- QualityBad = 4,
583
- /**
584
- * 5: The quality is so bad that users can barely communicate.
585
- */
586
- QualityVbad = 5,
587
- /**
588
- * 6: The network is down and users cannot communicate at all.
589
- */
590
- QualityDown = 6,
591
- /**
592
- * 7: Users cannot detect the network quality. (Not in use.)
593
- */
594
- QualityUnsupported = 7,
595
- /**
596
- * 8: Detecting the network quality.
597
- */
598
- QualityDetecting = 8
599
- }
600
- /**
601
- * @ignore
602
- */
603
- export declare enum FitModeType {
604
- /**
605
- * @ignore
606
- */
607
- ModeCover = 1,
608
- /**
609
- * @ignore
610
- */
611
- ModeContain = 2
612
- }
613
- /**
614
- * The clockwise rotation of the video.
615
- */
616
- export declare enum VideoOrientation {
617
- /**
618
- * 0: (Default) No rotation.
619
- */
620
- VideoOrientation0 = 0,
621
- /**
622
- * 90: 90 degrees.
623
- */
624
- VideoOrientation90 = 90,
625
- /**
626
- * 180: 180 degrees.
627
- */
628
- VideoOrientation180 = 180,
629
- /**
630
- * 270: 270 degrees.
631
- */
632
- VideoOrientation270 = 270
633
- }
634
- /**
635
- * Video frame rate.
636
- */
637
- export declare enum FrameRate {
638
- /**
639
- * 1: 1 fps
640
- */
641
- FrameRateFps1 = 1,
642
- /**
643
- * 7: 7 fps
644
- */
645
- FrameRateFps7 = 7,
646
- /**
647
- * 10: 10 fps
648
- */
649
- FrameRateFps10 = 10,
650
- /**
651
- * 15: 15 fps
652
- */
653
- FrameRateFps15 = 15,
654
- /**
655
- * 24: 24 fps
656
- */
657
- FrameRateFps24 = 24,
658
- /**
659
- * 30: 30 fps
660
- */
661
- FrameRateFps30 = 30,
662
- /**
663
- * 60: 60 fpsFor Windows and macOS only.
664
- */
665
- FrameRateFps60 = 60
666
- }
667
- /**
668
- * @ignore
669
- */
670
- export declare enum FrameWidth {
671
- /**
672
- * @ignore
673
- */
674
- FrameWidth960 = 960
675
- }
676
- /**
677
- * @ignore
678
- */
679
- export declare enum FrameHeight {
680
- /**
681
- * @ignore
682
- */
683
- FrameHeight540 = 540
684
- }
685
- /**
686
- * The video frame type.
687
- */
688
- export declare enum VideoFrameType {
689
- /**
690
- * 0: A black frame.
691
- */
692
- VideoFrameTypeBlankFrame = 0,
693
- /**
694
- * 3: Key frame.
695
- */
696
- VideoFrameTypeKeyFrame = 3,
697
- /**
698
- * 4: Delta frame.
699
- */
700
- VideoFrameTypeDeltaFrame = 4,
701
- /**
702
- * 5: The B frame.
703
- */
704
- VideoFrameTypeBFrame = 5,
705
- /**
706
- * 6: A discarded frame.
707
- */
708
- VideoFrameTypeDroppableFrame = 6,
709
- /**
710
- * Unknown frame.
711
- */
712
- VideoFrameTypeUnknow = 7
713
- }
714
- /**
715
- * Video output orientation mode.
716
- */
717
- export declare enum OrientationMode {
718
- /**
719
- * 0: (Default) The output video always follows the orientation of the captured video. The receiver takes the rotational information passed on from the video encoder. This mode applies to scenarios where video orientation can be adjusted on the receiver.If the captured video is in landscape mode, the output video is in landscape mode.If the captured video is in portrait mode, the output video is in portrait mode.
720
- */
721
- OrientationModeAdaptive = 0,
722
- /**
723
- * @ignore
724
- */
725
- OrientationModeFixedLandscape = 1,
726
- /**
727
- * @ignore
728
- */
729
- OrientationModeFixedPortrait = 2
730
- }
731
- /**
732
- * Video degradation preferences when the bandwidth is a constraint.
733
- */
734
- export declare enum DegradationPreference {
735
- /**
736
- * 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized.
737
- */
738
- MaintainQuality = 0,
739
- /**
740
- * 1: Reduces the video resolution while maintaining the video frame rate during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where smoothness is prioritized and video quality is allowed to be reduced.
741
- */
742
- MaintainFramerate = 1,
743
- /**
744
- * 2: Reduces the video frame rate and video resolution simultaneously during video encoding under limited bandwidth. The MaintainBalanced has a lower reduction than MaintainQuality and MaintainFramerate, and this preference is suitable for scenarios where both smoothness and video quality are a priority.The resolution of the video sent may change, so remote users need to handle this issue. See onVideoSizeChanged .
745
- */
746
- MaintainBalanced = 2,
747
- /**
748
- * 3: Reduces the video frame rate while maintaining the video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized.
749
- */
750
- MaintainResolution = 3,
751
- /**
752
- * @ignore
753
- */
754
- Disabled = 100
755
- }
756
- /**
757
- * The video dimension.
758
- */
759
- export declare class VideoDimensions {
760
- /**
761
- * The width (pixels) of the video.
762
- */
763
- width?: number;
764
- /**
765
- * The height (pixels) of the video.
766
- */
767
- height?: number;
768
- }
769
- /**
770
- * @ignore
771
- */
772
- export declare enum ScreenCaptureFramerateCapability {
773
- /**
774
- * @ignore
775
- */
776
- ScreenCaptureFramerateCapability15Fps = 0,
777
- /**
778
- * @ignore
779
- */
780
- ScreenCaptureFramerateCapability30Fps = 1,
781
- /**
782
- * @ignore
783
- */
784
- ScreenCaptureFramerateCapability60Fps = 2
785
- }
786
- /**
787
- * Video codec types.
788
- */
789
- export declare enum VideoCodecType {
790
- /**
791
- * @ignore
792
- */
793
- VideoCodecNone = 0,
794
- /**
795
- * 1: Standard VP8.
796
- */
797
- VideoCodecVp8 = 1,
798
- /**
799
- * 2: Standard H.264.
800
- */
801
- VideoCodecH264 = 2,
802
- /**
803
- * 3: Standard H.265.
804
- */
805
- VideoCodecH265 = 3,
806
- /**
807
- * 6: Generic.This type is used for transmitting raw video data, such as encrypted video frames. The SDK returns this type of video frames in callbacks, and you need to decode and render the frames yourself.
808
- */
809
- VideoCodecGeneric = 6,
810
- /**
811
- * @ignore
812
- */
813
- VideoCodecGenericH264 = 7,
814
- /**
815
- * @ignore
816
- */
817
- VideoCodecAv1 = 12,
818
- /**
819
- * @ignore
820
- */
821
- VideoCodecVp9 = 13,
822
- /**
823
- * 20: Generic JPEG.This type consumes minimum computing resources and applies to IoT devices.
824
- */
825
- VideoCodecGenericJpeg = 20
826
- }
827
- /**
828
- * @ignore
829
- */
830
- export declare enum TCcMode {
831
- /**
832
- * @ignore
833
- */
834
- CcEnabled = 0,
835
- /**
836
- * @ignore
837
- */
838
- CcDisabled = 1
839
- }
840
- /**
841
- * @ignore
842
- */
843
- export declare class SenderOptions {
844
- /**
845
- * @ignore
846
- */
847
- ccMode?: TCcMode;
848
- /**
849
- * @ignore
850
- */
851
- codecType?: VideoCodecType;
852
- /**
853
- * @ignore
854
- */
855
- targetBitrate?: number;
856
- }
857
- /**
858
- * The codec type of audio.
859
- */
860
- export declare enum AudioCodecType {
861
- /**
862
- * 1: OPUS.
863
- */
864
- AudioCodecOpus = 1,
865
- /**
866
- * @ignore
867
- */
868
- AudioCodecPcma = 3,
869
- /**
870
- * @ignore
871
- */
872
- AudioCodecPcmu = 4,
873
- /**
874
- * @ignore
875
- */
876
- AudioCodecG722 = 5,
877
- /**
878
- * 8: LC-AAC.
879
- */
880
- AudioCodecAaclc = 8,
881
- /**
882
- * 9: HE-AAC.
883
- */
884
- AudioCodecHeaac = 9,
885
- /**
886
- * @ignore
887
- */
888
- AudioCodecJc1 = 10,
889
- /**
890
- * 11: HE-AAC v2.
891
- */
892
- AudioCodecHeaac2 = 11,
893
- /**
894
- * @ignore
895
- */
896
- AudioCodecLpcnet = 12
897
- }
898
- /**
899
- * Audio encoding type.
900
- */
901
- export declare enum AudioEncodingType {
902
- /**
903
- * AAC encoding format, 16000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 1.2 MB after encoding.
904
- */
905
- AudioEncodingTypeAac16000Low = 65793,
906
- /**
907
- * AAC encoding format, 16000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
908
- */
909
- AudioEncodingTypeAac16000Medium = 65794,
910
- /**
911
- * AAC encoding format, 32000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 1.2 MB after encoding.
912
- */
913
- AudioEncodingTypeAac32000Low = 66049,
914
- /**
915
- * AAC encoding format, 32000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
916
- */
917
- AudioEncodingTypeAac32000Medium = 66050,
918
- /**
919
- * AAC encoding format, 32000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
920
- */
921
- AudioEncodingTypeAac32000High = 66051,
922
- /**
923
- * AAC encoding format, 48000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
924
- */
925
- AudioEncodingTypeAac48000Medium = 66306,
926
- /**
927
- * AAC encoding format, 48000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
928
- */
929
- AudioEncodingTypeAac48000High = 66307,
930
- /**
931
- * OPUS encoding format, 16000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
932
- */
933
- AudioEncodingTypeOpus16000Low = 131329,
934
- /**
935
- * OPUS encoding format, 16000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
936
- */
937
- AudioEncodingTypeOpus16000Medium = 131330,
938
- /**
939
- * OPUS encoding format, 48000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
940
- */
941
- AudioEncodingTypeOpus48000Medium = 131842,
942
- /**
943
- * OPUS encoding format, 48000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
944
- */
945
- AudioEncodingTypeOpus48000High = 131843
946
- }
947
- /**
948
- * The adaptation mode of the watermark.
949
- */
950
- export declare enum WatermarkFitMode {
951
- /**
952
- * Use the positionInLandscapeMode and positionInPortraitMode values you set in WatermarkOptions . The settings in WatermarkRatio are invalid.
953
- */
954
- FitModeCoverPosition = 0,
955
- /**
956
- * Use the value you set in WatermarkRatio . The settings in positionInLandscapeMode and positionInPortraitMode in WatermarkOptions are invalid.
957
- */
958
- FitModeUseImageRatio = 1
959
- }
960
- /**
961
- * @ignore
962
- */
963
- export declare class EncodedAudioFrameAdvancedSettings {
964
- /**
965
- * @ignore
966
- */
967
- speech?: boolean;
968
- /**
969
- * @ignore
970
- */
971
- sendEvenIfEmpty?: boolean;
972
- }
973
- /**
974
- * Audio information after encoding.
975
- */
976
- export declare class EncodedAudioFrameInfo {
977
- /**
978
- * Audio Codec type: AudioCodecType
979
- */
980
- codec?: AudioCodecType;
981
- /**
982
- * Audio sample rate (Hz).
983
- */
984
- sampleRateHz?: number;
985
- /**
986
- * The number of audio samples per channel.
987
- */
988
- samplesPerChannel?: number;
989
- /**
990
- * The number of audio channels.
991
- */
992
- numberOfChannels?: number;
993
- /**
994
- * This function is currently not supported.
995
- */
996
- advancedSettings?: EncodedAudioFrameAdvancedSettings;
997
- /**
998
- * The Unix timestamp (ms) for capturing the external encoded video frames.
999
- */
1000
- captureTimeMs?: number;
1001
- }
1002
- /**
1003
- * @ignore
1004
- */
1005
- export declare class AudioPcmDataInfo {
1006
- /**
1007
- * @ignore
1008
- */
1009
- samplesPerChannel?: number;
1010
- /**
1011
- * @ignore
1012
- */
1013
- channelNum?: number;
1014
- /**
1015
- * @ignore
1016
- */
1017
- samplesOut?: number;
1018
- /**
1019
- * @ignore
1020
- */
1021
- elapsedTimeMs?: number;
1022
- /**
1023
- * @ignore
1024
- */
1025
- ntpTimeMs?: number;
1026
- }
1027
- /**
1028
- * @ignore
1029
- */
1030
- export declare enum H264PacketizeMode {
1031
- /**
1032
- * @ignore
1033
- */
1034
- NonInterleaved = 0,
1035
- /**
1036
- * @ignore
1037
- */
1038
- SingleNalUnit = 1
1039
- }
1040
- /**
1041
- * The type of video streams.
1042
- */
1043
- export declare enum VideoStreamType {
1044
- /**
1045
- * 0: High-quality video stream.
1046
- */
1047
- VideoStreamHigh = 0,
1048
- /**
1049
- * 1: Low-quality video stream.
1050
- */
1051
- VideoStreamLow = 1
1052
- }
1053
- /**
1054
- * Video subscription options.
1055
- */
1056
- export declare class VideoSubscriptionOptions {
1057
- /**
1058
- * @ignore
1059
- */
1060
- type?: VideoStreamType;
1061
- /**
1062
- * Whether to subscribe to encoded video frames only:true: Subscribe to the encoded video data (structured data) only; the SDK does not decode or render raw video data.false: (Default) Subscribe to both raw video data and encoded video data.
1063
- */
1064
- encodedFrameOnly?: boolean;
1065
- }
1066
- /**
1067
- * Information about externally encoded video frames.
1068
- */
1069
- export declare class EncodedVideoFrameInfo {
1070
- /**
1071
- * The codec type of the local video stream. See VideoCodecType . The default value is VideoCodecH264 (2).
1072
- */
1073
- codecType?: VideoCodecType;
1074
- /**
1075
- * Width (pixel) of the video frame.
1076
- */
1077
- width?: number;
1078
- /**
1079
- * Height (pixel) of the video frame.
1080
- */
1081
- height?: number;
1082
- /**
1083
- * The number of video frames per second.When this parameter is not 0, you can use it to calculate the Unix timestamp of externally encoded video frames.
1084
- */
1085
- framesPerSecond?: number;
1086
- /**
1087
- * The video frame type. See VideoFrameType .
1088
- */
1089
- frameType?: VideoFrameType;
1090
- /**
1091
- * The rotation information of the video frame. See VideoOrientation .
1092
- */
1093
- rotation?: VideoOrientation;
1094
- /**
1095
- * Reserved for future use.
1096
- */
1097
- trackId?: number;
1098
- /**
1099
- * The Unix timestamp (ms) for capturing the external encoded video frames.
1100
- */
1101
- captureTimeMs?: number;
1102
- /**
1103
- * @ignore
1104
- */
1105
- decodeTimeMs?: number;
1106
- /**
1107
- * The user ID to push the externally encoded video frame.
1108
- */
1109
- uid?: number;
1110
- /**
1111
- * The type of video streams. See VideoStreamType .
1112
- */
1113
- streamType?: VideoStreamType;
1114
- }
1115
- /**
1116
- * Compression preference for video encoding.
1117
- */
1118
- export declare enum CompressionPreference {
1119
- /**
1120
- * 0: Low latency preference. The SDK compresses video frames to reduce latency. This preference is suitable for scenarios where smoothness is prioritized and reduced video quality is acceptable.
1121
- */
1122
- PreferLowLatency = 0,
1123
- /**
1124
- * 1: (Default) High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
1125
- *
1126
- */
1127
- PreferQuality = 1
1128
- }
1129
- /**
1130
- * Video encoder preference.
1131
- */
1132
- export declare enum EncodingPreference {
1133
- /**
1134
- * -1: Adaptive preference. The SDK automatically selects the optimal encoding type for encoding based on factors such as platform and device type.
1135
- */
1136
- PreferAuto = -1,
1137
- /**
1138
- * 0: Software coding preference. The SDK prefers software encoders for video encoding.
1139
- */
1140
- PreferSoftware = 0,
1141
- /**
1142
- * 1: Hardware encoding preference. The SDK prefers a hardware encoder for video encoding. When the device does not support hardware encoding, the SDK automatically uses software encoding and reports the currently used video encoder type through hwEncoderAccelerating in the onLocalVideoStats callback.
1143
- */
1144
- PreferHardware = 1
1145
- }
1146
- /**
1147
- * Advanced options for video encoding.
1148
- */
1149
- export declare class AdvanceOptions {
1150
- /**
1151
- * Video encoder preference. See EncodingPreference .
1152
- */
1153
- encodingPreference?: EncodingPreference;
1154
- /**
1155
- * Compression preference for video encoding. See CompressionPreference .
1156
- */
1157
- compressionPreference?: CompressionPreference;
1158
- }
1159
- /**
1160
- * Video mirror mode.
1161
- */
1162
- export declare enum VideoMirrorModeType {
1163
- /**
1164
- * 0: (Default) The SDK determines the mirror mode.
1165
- */
1166
- VideoMirrorModeAuto = 0,
1167
- /**
1168
- * 1: Enable mirror mode.
1169
- */
1170
- VideoMirrorModeEnabled = 1,
1171
- /**
1172
- * 2: Disable mirror mode.
1173
- */
1174
- VideoMirrorModeDisabled = 2
1175
- }
1176
- /**
1177
- * @ignore
1178
- */
1179
- export declare enum CodecCapMask {
1180
- /**
1181
- * @ignore
1182
- */
1183
- CodecCapMaskNone = 0,
1184
- /**
1185
- * @ignore
1186
- */
1187
- CodecCapMaskHwDec = 1,
1188
- /**
1189
- * @ignore
1190
- */
1191
- CodecCapMaskHwEnc = 2,
1192
- /**
1193
- * @ignore
1194
- */
1195
- CodecCapMaskSwDec = 4,
1196
- /**
1197
- * @ignore
1198
- */
1199
- CodecCapMaskSwEnc = 8
1200
- }
1201
- /**
1202
- * @ignore
1203
- */
1204
- export declare class CodecCapInfo {
1205
- /**
1206
- * @ignore
1207
- */
1208
- codecType?: VideoCodecType;
1209
- /**
1210
- * @ignore
1211
- */
1212
- codecCapMask?: number;
1213
- }
1214
- /**
1215
- * Video encoder configurations.
1216
- */
1217
- export declare class VideoEncoderConfiguration {
1218
- /**
1219
- * The codec type of the local video stream. See VideoCodecType .
1220
- */
1221
- codecType?: VideoCodecType;
1222
- /**
1223
- * The dimensions of the encoded video (px). See VideoDimensions . This parameter measures the video encoding quality in the format of length × width. The default value is 960 × 540. You can set a custom value.
1224
- */
1225
- dimensions?: VideoDimensions;
1226
- /**
1227
- * The frame rate (fps) of the encoding video frame. The default value is 15. See FrameRate .
1228
- */
1229
- frameRate?: number;
1230
- /**
1231
- * The encoding bitrate (Kbps) of the video.
1232
- */
1233
- bitrate?: number;
1234
- /**
1235
- * The minimum encoding bitrate (Kbps) of the video.The SDK automatically adjusts the encoding bitrate to adapt to the network conditions. Using a value greater than the default value forces the video encoder to output high-quality images but may cause more packet loss and sacrifice the smoothness of the video transmission. Unless you have special requirements for image quality, Agora does not recommend changing this value.This parameter only applies to the interactive streaming profile.
1236
- */
1237
- minBitrate?: number;
1238
- /**
1239
- * The orientation mode of the encoded video. See OrientationMode .
1240
- */
1241
- orientationMode?: OrientationMode;
1242
- /**
1243
- * Video degradation preference under limited bandwidth. See DegradationPreference .
1244
- */
1245
- degradationPreference?: DegradationPreference;
1246
- /**
1247
- * By default, the video is not mirrored.
1248
- */
1249
- mirrorMode?: VideoMirrorModeType;
1250
- /**
1251
- * Advanced options for video encoding. See AdvanceOptions .
1252
- */
1253
- advanceOptions?: AdvanceOptions;
1254
- }
1255
- /**
1256
- * The configurations for the data stream.
1257
- * The following table shows the SDK behaviors under different parameter settings:
1258
- */
1259
- export declare class DataStreamConfig {
1260
- /**
1261
- * Whether to synchronize the data packet with the published audio packet.true: Synchronize the data packet with the audio packet.false: Do not synchronize the data packet with the audio packet.When you set the data packet to synchronize with the audio, then if the data packet delay is within the audio delay, the SDK triggers the onStreamMessage callback when the synchronized audio packet is played out. Do not set this parameter as true if you need the receiver to receive the data packet immediately. Agora recommends that you set this parameter to true only when you need to implement specific functions, for example, lyric synchronization.
1262
- */
1263
- syncWithAudio?: boolean;
1264
- /**
1265
- * Whether the SDK guarantees that the receiver receives the data in the sent order.true: Guarantee that the receiver receives the data in the sent order.false: Do not guarantee that the receiver receives the data in the sent order.Do not set this parameter as true if you need the receiver to receive the data packet immediately.
1266
- */
1267
- ordered?: boolean;
1268
- }
1269
- /**
1270
- * The mode in which the video stream is sent.
1271
- */
1272
- export declare enum SimulcastStreamMode {
1273
- /**
1274
- * -1: By default, the low-quality video steam is not sent; the SDK automatically switches to low-quality video stream mode after it receives a request to subscribe to a low-quality video stream.
1275
- */
1276
- AutoSimulcastStream = -1,
1277
- /**
1278
- * 0: Never send low-quality video stream.
1279
- */
1280
- DisableSimulcastStream = 0,
1281
- /**
1282
- * 1: Always send low-quality video stream.
1283
- */
1284
- EnableSimulcastStream = 1
1285
- }
1286
- /**
1287
- * The configuration of the low-quality video stream.
1288
- */
1289
- export declare class SimulcastStreamConfig {
1290
- /**
1291
- * The video dimension. See VideoDimensions . The default value is 160 × 120.
1292
- */
1293
- dimensions?: VideoDimensions;
1294
- /**
1295
- * @ignore
1296
- */
1297
- kBitrate?: number;
1298
- /**
1299
- * The capture frame rate (fps) of the local video. The default value is 5.
1300
- */
1301
- framerate?: number;
1302
- }
1303
- /**
1304
- * The location of the target area relative to the screen or window. If you do not set this parameter, the SDK selects the whole screen or window.
1305
- */
1306
- export declare class Rectangle {
1307
- /**
1308
- * The horizontal offset from the top-left corner.
1309
- */
1310
- x?: number;
1311
- /**
1312
- * The vertical offset from the top-left corner.
1313
- */
1314
- y?: number;
1315
- /**
1316
- * The width of the target area.
1317
- */
1318
- width?: number;
1319
- /**
1320
- * The height of the target area.
1321
- */
1322
- height?: number;
1323
- }
1324
- /**
1325
- * The position and size of the watermark on the screen.
1326
- * The position and size of the watermark on the screen are determined by xRatio, yRatio, and widthRatio:(xRatio, yRatio) refers to the coordinates of the upper left corner of the watermark, which determines the distance from the upper left corner of the watermark to the upper left corner of the screen.The widthRatio determines the width of the watermark.
1327
- */
1328
- export declare class WatermarkRatio {
1329
- /**
1330
- * The x-coordinate of the upper left corner of the watermark. The horizontal position relative to the origin, where the upper left corner of the screen is the origin, and the x-coordinate is the upper left corner of the watermark. The value range is [0.0,1.0], and the default value is 0.
1331
- */
1332
- xRatio?: number;
1333
- /**
1334
- * The y-coordinate of the upper left corner of the watermark. The vertical position relative to the origin, where the upper left corner of the screen is the origin, and the y-coordinate is the upper left corner of the screen. The value range is [0.0,1.0], and the default value is 0.
1335
- */
1336
- yRatio?: number;
1337
- /**
1338
- * The width of the watermark. The SDK calculates the height of the watermark proportionally according to this parameter value to ensure that the enlarged or reduced watermark image is not distorted. The value range is [0,1], and the default value is 0, which means no watermark is displayed.
1339
- */
1340
- widthRatio?: number;
1341
- }
1342
- /**
1343
- * Configurations of the watermark image.
1344
- */
1345
- export declare class WatermarkOptions {
1346
- /**
1347
- * Reserved for future use.
1348
- */
1349
- visibleInPreview?: boolean;
1350
- /**
1351
- * When the adaptation mode of the watermark is FitModeCoverPosition, it is used to set the area of the watermark image in landscape mode. See FitModeCoverPosition for details.
1352
- */
1353
- positionInLandscapeMode?: Rectangle;
1354
- /**
1355
- * When the adaptation mode of the watermark is FitModeCoverPosition, it is used to set the area of the watermark image in portrait mode. See FitModeCoverPosition for details.
1356
- */
1357
- positionInPortraitMode?: Rectangle;
1358
- /**
1359
- * When the watermark adaptation mode is FitModeUseImageRatio, this parameter is used to set the watermark coordinates. See WatermarkRatio .
1360
- */
1361
- watermarkRatio?: WatermarkRatio;
1362
- /**
1363
- * The adaptation mode of the watermark. See WatermarkFitMode .
1364
- */
1365
- mode?: WatermarkFitMode;
1366
- }
1367
- /**
1368
- * Statistics of the channel.
1369
- */
1370
- export declare class RtcStats {
1371
- /**
1372
- * Call duration of the local user in seconds, represented by an aggregate value.
1373
- */
1374
- duration?: number;
1375
- /**
1376
- * Total number of bytes transmitted, represented by an aggregate value.
1377
- */
1378
- txBytes?: number;
1379
- /**
1380
- * Total number of bytes received, represented by an aggregate value.
1381
- */
1382
- rxBytes?: number;
1383
- /**
1384
- * Total number of audio bytes sent, represented by an aggregate value.
1385
- */
1386
- txAudioBytes?: number;
1387
- /**
1388
- * The total number of video bytes sent, represented by an aggregate value.
1389
- */
1390
- txVideoBytes?: number;
1391
- /**
1392
- * The total number of audio bytes received, represented by an aggregate value.
1393
- */
1394
- rxAudioBytes?: number;
1395
- /**
1396
- * The total number of video bytes received, represented by an aggregate value.
1397
- */
1398
- rxVideoBytes?: number;
1399
- /**
1400
- * Video transmission bitrate (Kbps), represented by an instantaneous value.
1401
- */
1402
- txKBitRate?: number;
1403
- /**
1404
- * The receiving bitrate (Kbps), represented by an instantaneous value.
1405
- */
1406
- rxKBitRate?: number;
1407
- /**
1408
- * Audio receive bitrate (Kbps), represented by an instantaneous value.
1409
- */
1410
- rxAudioKBitRate?: number;
1411
- /**
1412
- * The bitrate (Kbps) of sending the audio packet.
1413
- */
1414
- txAudioKBitRate?: number;
1415
- /**
1416
- * Video receive bitrate (Kbps), represented by an instantaneous value.
1417
- */
1418
- rxVideoKBitRate?: number;
1419
- /**
1420
- * The bitrate (Kbps) of sending the video.
1421
- */
1422
- txVideoKBitRate?: number;
1423
- /**
1424
- * The client-to-server delay (ms).
1425
- */
1426
- lastmileDelay?: number;
1427
- /**
1428
- * The number of users in the channel.
1429
- */
1430
- userCount?: number;
1431
- /**
1432
- * Application CPU usage (%).The value of cpuTotalUsage is always reported as 0 in the onLeaveChannel callback.
1433
- */
1434
- cpuAppUsage?: number;
1435
- /**
1436
- * The system CPU usage (%).For Windows, in the multi-kernel environment, this member represents the average CPU usage. The value = (100 - System Idle Progress in Task Manager)/100.The value of cpuTotalUsage is always reported as 0 in the onLeaveChannel callback.
1437
- */
1438
- cpuTotalUsage?: number;
1439
- /**
1440
- * The round-trip time delay (ms) from the client to the local router.
1441
- */
1442
- gatewayRtt?: number;
1443
- /**
1444
- * The memory ratio occupied by the app (%).This value is for reference only. Due to system limitations, you may not get this value.
1445
- */
1446
- memoryAppUsageRatio?: number;
1447
- /**
1448
- * The memory occupied by the system (%).This value is for reference only. Due to system limitations, you may not get this value.
1449
- */
1450
- memoryTotalUsageRatio?: number;
1451
- /**
1452
- * The memory size occupied by the app (KB).This value is for reference only. Due to system limitations, you may not get this value.
1453
- */
1454
- memoryAppUsageInKbytes?: number;
1455
- /**
1456
- * The duration (ms) between the SDK starts connecting and the connection is established. If the value reported is 0, it means invalid.
1457
- */
1458
- connectTimeMs?: number;
1459
- /**
1460
- * @ignore
1461
- */
1462
- firstAudioPacketDuration?: number;
1463
- /**
1464
- * @ignore
1465
- */
1466
- firstVideoPacketDuration?: number;
1467
- /**
1468
- * @ignore
1469
- */
1470
- firstVideoKeyFramePacketDuration?: number;
1471
- /**
1472
- * @ignore
1473
- */
1474
- packetsBeforeFirstKeyFramePacket?: number;
1475
- /**
1476
- * @ignore
1477
- */
1478
- firstAudioPacketDurationAfterUnmute?: number;
1479
- /**
1480
- * @ignore
1481
- */
1482
- firstVideoPacketDurationAfterUnmute?: number;
1483
- /**
1484
- * @ignore
1485
- */
1486
- firstVideoKeyFramePacketDurationAfterUnmute?: number;
1487
- /**
1488
- * @ignore
1489
- */
1490
- firstVideoKeyFrameDecodedDurationAfterUnmute?: number;
1491
- /**
1492
- * @ignore
1493
- */
1494
- firstVideoKeyFrameRenderedDurationAfterUnmute?: number;
1495
- /**
1496
- * The packet loss rate (%) from the client to the Agora server before applying the anti-packet-loss algorithm.
1497
- */
1498
- txPacketLossRate?: number;
1499
- /**
1500
- * The packet loss rate (%) from the Agora server to the client before using the anti-packet-loss method.
1501
- */
1502
- rxPacketLossRate?: number;
1503
- }
1504
- /**
1505
- * The user role in the interactive live streaming.
1506
- */
1507
- export declare enum ClientRoleType {
1508
- /**
1509
- * 1: Host. A host can both send and receive streams.
1510
- */
1511
- ClientRoleBroadcaster = 1,
1512
- /**
1513
- * 2: (Default) Audience. An audience member can only receive streams.
1514
- */
1515
- ClientRoleAudience = 2
1516
- }
1517
- /**
1518
- * Quality change of the local video in terms of target frame rate and target bit rate since last count.
1519
- */
1520
- export declare enum QualityAdaptIndication {
1521
- /**
1522
- * 0: The local video quality stays the same.
1523
- */
1524
- AdaptNone = 0,
1525
- /**
1526
- * 1: The local video quality improves because the network bandwidth increases.
1527
- */
1528
- AdaptUpBandwidth = 1,
1529
- /**
1530
- * 2: The local video quality deteriorates because the network bandwidth decreases.
1531
- */
1532
- AdaptDownBandwidth = 2
1533
- }
1534
- /**
1535
- * The latency level of an audience member in interactive live streaming. This enum takes effect only when the user role is set to ClientRoleAudience .
1536
- */
1537
- export declare enum AudienceLatencyLevelType {
1538
- /**
1539
- * 1: Low latency.
1540
- */
1541
- AudienceLatencyLevelLowLatency = 1,
1542
- /**
1543
- * 2: (Default) Ultra low latency.
1544
- */
1545
- AudienceLatencyLevelUltraLowLatency = 2
1546
- }
1547
- /**
1548
- * The detailed options of a user.
1549
- */
1550
- export declare class ClientRoleOptions {
1551
- /**
1552
- * The latency level of an audience member in interactive live streaming. See AudienceLatencyLevelType .
1553
- */
1554
- audienceLatencyLevel?: AudienceLatencyLevelType;
1555
- }
1556
- /**
1557
- * The Quality of Experience (QoE) of the local user when receiving a remote audio stream.
1558
- */
1559
- export declare enum ExperienceQualityType {
1560
- /**
1561
- * 0: The QoE of the local user is good.
1562
- */
1563
- ExperienceQualityGood = 0,
1564
- /**
1565
- * 1: The QoE of the local user is poor.
1566
- */
1567
- ExperienceQualityBad = 1
1568
- }
1569
- /**
1570
- * Reasons why the QoE of the local user when receiving a remote audio stream is poor.
1571
- */
1572
- export declare enum ExperiencePoorReason {
1573
- /**
1574
- * 0: No reason, indicating a good QoE of the local user.
1575
- */
1576
- ExperienceReasonNone = 0,
1577
- /**
1578
- * 1: The remote user's network quality is poor.
1579
- */
1580
- RemoteNetworkQualityPoor = 1,
1581
- /**
1582
- * 2: The local user's network quality is poor.
1583
- */
1584
- LocalNetworkQualityPoor = 2,
1585
- /**
1586
- * 4: The local user's Wi-Fi or mobile network signal is weak.
1587
- */
1588
- WirelessSignalPoor = 4,
1589
- /**
1590
- * 8: The local user enables both Wi-Fi and bluetooth, and their signals interfere with each other. As a result, audio transmission quality is undermined.
1591
- */
1592
- WifiBluetoothCoexist = 8
1593
- }
1594
- /**
1595
- * @ignore
1596
- */
1597
- export declare enum AudioAinsMode {
1598
- /**
1599
- * @ignore
1600
- */
1601
- AinsModeBalanced = 0,
1602
- /**
1603
- * @ignore
1604
- */
1605
- AinsModeAggressive = 1,
1606
- /**
1607
- * @ignore
1608
- */
1609
- AinsModeUltralowlatency = 2
1610
- }
1611
- /**
1612
- * The audio profile.
1613
- */
1614
- export declare enum AudioProfileType {
1615
- /**
1616
- * 0: The default audio profile.For the interactive streaming profile: A sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 64 Kbps.For the communication profile: Windows: A sample rate of 16 kHz, audio encoding, mono, and a bitrate of up to 16 Kbps.macOS: A sample rate of 32 kHz, audio encoding, mono, and a bitrate of up to 18 Kbps.
1617
- */
1618
- AudioProfileDefault = 0,
1619
- /**
1620
- * 1: A sample rate of 32 kHz, audio encoding, mono, and a bitrate of up to 18 Kbps.
1621
- */
1622
- AudioProfileSpeechStandard = 1,
1623
- /**
1624
- * 2: A sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 64 Kbps.
1625
- */
1626
- AudioProfileMusicStandard = 2,
1627
- /**
1628
- * 3: A sample rate of 48 kHz, music encoding, stereo, and a bitrate of up to 80 Kbps.To implement stereo audio, you also need to call setAdvancedAudioOptions and set audioProcessingChannels to AudioProcessingStereo in AdvancedAudioOptions.
1629
- */
1630
- AudioProfileMusicStandardStereo = 3,
1631
- /**
1632
- * 4: A sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 96 Kbps.
1633
- */
1634
- AudioProfileMusicHighQuality = 4,
1635
- /**
1636
- * 5: A sample rate of 48 kHz, music encoding, stereo, and a bitrate of up to 128 Kbps.To implement stereo audio, you also need to call setAdvancedAudioOptions and set audioProcessingChannels to AudioProcessingStereo in AdvancedAudioOptions.
1637
- */
1638
- AudioProfileMusicHighQualityStereo = 5,
1639
- /**
1640
- * 6: A sample rate of 16 kHz, audio encoding, mono, and Acoustic Echo Cancellation (AES) enabled.
1641
- */
1642
- AudioProfileIot = 6,
1643
- /**
1644
- * Enumerator boundary.
1645
- */
1646
- AudioProfileNum = 7
1647
- }
1648
- /**
1649
- * The audio scenarios.
1650
- */
1651
- export declare enum AudioScenarioType {
1652
- /**
1653
- * 0: (Default) Automatic scenario match, where the SDK chooses the appropriate audio quality according to the user role and audio route.
1654
- */
1655
- AudioScenarioDefault = 0,
1656
- /**
1657
- * 3: High-quality audio scenario, where users mainly play music.
1658
- */
1659
- AudioScenarioGameStreaming = 3,
1660
- /**
1661
- * 5: Chatroom scenario, where users need to frequently switch the user role or mute and unmute the microphone. In this scenario, audience members receive a pop-up window to request permission of using microphones.
1662
- */
1663
- AudioScenarioChatroom = 5,
1664
- /**
1665
- * 7: Real-time chorus scenario, where users have good network conditions and require ultra-low latency.
1666
- */
1667
- AudioScenarioChorus = 7,
1668
- /**
1669
- * 8: Meeting scenario that mainly contains the human voice.
1670
- */
1671
- AudioScenarioMeeting = 8,
1672
- /**
1673
- * The number of enumerations.
1674
- */
1675
- AudioScenarioNum = 9
1676
- }
1677
- /**
1678
- * The format of the video frame.
1679
- */
1680
- export declare class VideoFormat {
1681
- /**
1682
- * The width (px) of the video frame.
1683
- */
1684
- width?: number;
1685
- /**
1686
- * The height (px) of the video frame.
1687
- */
1688
- height?: number;
1689
- /**
1690
- * The video frame rate (fps).
1691
- */
1692
- fps?: number;
1693
- }
1694
- /**
1695
- * The content hint for screen sharing.
1696
- */
1697
- export declare enum VideoContentHint {
1698
- /**
1699
- * (Default) No content hint.
1700
- */
1701
- ContentHintNone = 0,
1702
- /**
1703
- * Motion-intensive content. Choose this option if you prefer smoothness or when you are sharing a video clip, movie, or video game.
1704
- */
1705
- ContentHintMotion = 1,
1706
- /**
1707
- * Motionless content. Choose this option if you prefer sharpness or when you are sharing a picture, PowerPoint slides, or texts.
1708
- */
1709
- ContentHintDetails = 2
1710
- }
1711
- /**
1712
- * The screen sharing scenario.
1713
- */
1714
- export declare enum ScreenScenarioType {
1715
- /**
1716
- * 1: (Default) Document. This scenario prioritizes the video quality of screen sharing and reduces the latency of the shared video for the receiver. If you share documents, slides, and tables, you can set this scenario.
1717
- */
1718
- ScreenScenarioDocument = 1,
1719
- /**
1720
- * 2: Game. This scenario prioritizes the smoothness of screen sharing. If you share games, you can set this scenario.
1721
- */
1722
- ScreenScenarioGaming = 2,
1723
- /**
1724
- * 3: Video. This scenario prioritizes the smoothness of screen sharing. If you share movies or live videos, you can set this scenario.
1725
- */
1726
- ScreenScenarioVideo = 3,
1727
- /**
1728
- * 4: Remote control. This scenario prioritizes the video quality of screen sharing and reduces the latency of the shared video for the receiver. If you share the device desktop being remotely controlled, you can set this scenario.
1729
- */
1730
- ScreenScenarioRdc = 4
1731
- }
1732
- /**
1733
- * @ignore
1734
- */
1735
- export declare enum VideoApplicationScenarioType {
1736
- /**
1737
- * @ignore
1738
- */
1739
- ApplicationScenarioGeneral = 0,
1740
- /**
1741
- * @ignore
1742
- */
1743
- ApplicationScenarioMeeting = 1
1744
- }
1745
- /**
1746
- * The brightness level of the video image captured by the local camera.
1747
- */
1748
- export declare enum CaptureBrightnessLevelType {
1749
- /**
1750
- * @ignore
1751
- */
1752
- CaptureBrightnessLevelInvalid = -1,
1753
- /**
1754
- * @ignore
1755
- */
1756
- CaptureBrightnessLevelNormal = 0,
1757
- /**
1758
- * @ignore
1759
- */
1760
- CaptureBrightnessLevelBright = 1,
1761
- /**
1762
- * @ignore
1763
- */
1764
- CaptureBrightnessLevelDark = 2
1765
- }
1766
- /**
1767
- * The state of the local audio.
1768
- */
1769
- export declare enum LocalAudioStreamState {
1770
- /**
1771
- * 0: The local audio is in the initial state.
1772
- */
1773
- LocalAudioStreamStateStopped = 0,
1774
- /**
1775
- * 1: The local audio capturing device starts successfully.
1776
- */
1777
- LocalAudioStreamStateRecording = 1,
1778
- /**
1779
- * 2: The first audio frame encodes successfully.
1780
- */
1781
- LocalAudioStreamStateEncoding = 2,
1782
- /**
1783
- * 3: The local audio fails to start.
1784
- */
1785
- LocalAudioStreamStateFailed = 3
1786
- }
1787
- /**
1788
- * Local audio state error codes.
1789
- */
1790
- export declare enum LocalAudioStreamError {
1791
- /**
1792
- * 0: The local audio is normal.
1793
- */
1794
- LocalAudioStreamErrorOk = 0,
1795
- /**
1796
- * 1: No specified reason for the local audio failure. Remind your users to try to rejoin the channel.
1797
- */
1798
- LocalAudioStreamErrorFailure = 1,
1799
- /**
1800
- * 2: No permission to use the local audio capturing device. Remind your users to grant permission.Deprecated:This enumerator is deprecated. Please use RecordAudio in the onPermissionError callback instead.
1801
- */
1802
- LocalAudioStreamErrorDeviceNoPermission = 2,
1803
- /**
1804
- * @ignore
1805
- */
1806
- LocalAudioStreamErrorDeviceBusy = 3,
1807
- /**
1808
- * 4: The local audio capture fails.
1809
- */
1810
- LocalAudioStreamErrorRecordFailure = 4,
1811
- /**
1812
- * 5: The local audio encoding fails.
1813
- */
1814
- LocalAudioStreamErrorEncodeFailure = 5,
1815
- /**
1816
- * 6: (Windows only) The application cannot find the local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control plane of the device or if the microphone is working properly.
1817
- */
1818
- LocalAudioStreamErrorNoRecordingDevice = 6,
1819
- /**
1820
- * 7: (Windows only) The application cannot find the local audio playback device. Remind your users to check whether the speaker is connected to the device properly in the control plane of the device or if the speaker is working properly.
1821
- */
1822
- LocalAudioStreamErrorNoPlayoutDevice = 7,
1823
- /**
1824
- * @ignore
1825
- */
1826
- LocalAudioStreamErrorInterrupted = 8,
1827
- /**
1828
- * 9: (Windows only) The ID of the local audio-capture device is invalid. Check the audio capture device ID.
1829
- */
1830
- LocalAudioStreamErrorRecordInvalidId = 9,
1831
- /**
1832
- * 10: (Windows only) The ID of the local audio-playback device is invalid. Check the audio playback device ID.
1833
- */
1834
- LocalAudioStreamErrorPlayoutInvalidId = 10
1835
- }
1836
- /**
1837
- * Local video state types.
1838
- */
1839
- export declare enum LocalVideoStreamState {
1840
- /**
1841
- * 0: The local video is in the initial state.
1842
- */
1843
- LocalVideoStreamStateStopped = 0,
1844
- /**
1845
- * 1: The local video capturing device starts successfully.
1846
- */
1847
- LocalVideoStreamStateCapturing = 1,
1848
- /**
1849
- * 2: The first video frame is successfully encoded.
1850
- */
1851
- LocalVideoStreamStateEncoding = 2,
1852
- /**
1853
- * 3: Fails to start the local video.
1854
- */
1855
- LocalVideoStreamStateFailed = 3
1856
- }
1857
- /**
1858
- * Local video state error codes.
1859
- */
1860
- export declare enum LocalVideoStreamError {
1861
- /**
1862
- * 0: The local video is normal.
1863
- */
1864
- LocalVideoStreamErrorOk = 0,
1865
- /**
1866
- * 1: No specified reason for the local video failure.
1867
- */
1868
- LocalVideoStreamErrorFailure = 1,
1869
- /**
1870
- * 2: No permission to use the local video capturing device. Remind the user to grant permissions and rejoin the channel.Deprecated:This enumerator is deprecated. Please use CAMERA in the onPermissionError callback instead.
1871
- */
1872
- LocalVideoStreamErrorDeviceNoPermission = 2,
1873
- /**
1874
- * 3: The local video capturing device is in use. Remind the user to check whether another application occupies the camera.
1875
- */
1876
- LocalVideoStreamErrorDeviceBusy = 3,
1877
- /**
1878
- * 4: The local video capture fails. Remind your user to check whether the video capture device is working properly, whether the camera is occupied by another application, or try to rejoin the channel.
1879
- */
1880
- LocalVideoStreamErrorCaptureFailure = 4,
1881
- /**
1882
- * @ignore
1883
- */
1884
- LocalVideoStreamErrorCodecNotSupport = 5,
1885
- /**
1886
- * @ignore
1887
- */
1888
- LocalVideoStreamErrorCaptureInbackground = 6,
1889
- /**
1890
- * @ignore
1891
- */
1892
- LocalVideoStreamErrorCaptureMultipleForegroundApps = 7,
1893
- /**
1894
- * 8: Fails to find a local video capture device. Remind the user to check whether the camera is connected to the device properly or the camera is working properly, and then to rejoin the channel.
1895
- */
1896
- LocalVideoStreamErrorDeviceNotFound = 8,
1897
- /**
1898
- * 9: (For macOS only) The video capture device currently in use is disconnected (such as being unplugged).
1899
- */
1900
- LocalVideoStreamErrorDeviceDisconnected = 9,
1901
- /**
1902
- * 10: (For macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid.
1903
- */
1904
- LocalVideoStreamErrorDeviceInvalidId = 10,
1905
- /**
1906
- * 101: The current video capture device is unavailable due to excessive system pressure.
1907
- */
1908
- LocalVideoStreamErrorDeviceSystemPressure = 101,
1909
- /**
1910
- * 11: (For macOS only) The shared window is minimized when you call startScreenCaptureByWindowId to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window.
1911
- */
1912
- LocalVideoStreamErrorScreenCaptureWindowMinimized = 11,
1913
- /**
1914
- * 12: (For macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing.Common scenarios for reporting this error code:When the local user closes the shared window, the SDK reports this error code.The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code.The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code.
1915
- */
1916
- LocalVideoStreamErrorScreenCaptureWindowClosed = 12,
1917
- /**
1918
- * 13: (For Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing.
1919
- */
1920
- LocalVideoStreamErrorScreenCaptureWindowOccluded = 13,
1921
- /**
1922
- * @ignore
1923
- */
1924
- LocalVideoStreamErrorScreenCaptureWindowNotSupported = 20,
1925
- /**
1926
- * @ignore
1927
- */
1928
- LocalVideoStreamErrorScreenCaptureFailure = 21,
1929
- /**
1930
- * @ignore
1931
- */
1932
- LocalVideoStreamErrorScreenCaptureNoPermission = 22
1933
- }
1934
- /**
1935
- * Remote audio states.
1936
- */
1937
- export declare enum RemoteAudioState {
1938
- /**
1939
- * 0: The local audio is in the initial state. The SDK reports this state in the case of RemoteAudioReasonLocalMuted, RemoteAudioReasonRemoteMuted or RemoteAudioReasonRemoteOffline.
1940
- */
1941
- RemoteAudioStateStopped = 0,
1942
- /**
1943
- * 1: The first remote audio packet is received.
1944
- */
1945
- RemoteAudioStateStarting = 1,
1946
- /**
1947
- * 2: The remote audio stream is decoded and plays normally. The SDK reports this state in the case of RemoteAudioReasonNetworkRecovery, RemoteAudioReasonLocalUnmuted or RemoteAudioReasonRemoteUnmuted.
1948
- */
1949
- RemoteAudioStateDecoding = 2,
1950
- /**
1951
- * 3: The remote audio is frozen. The SDK reports this state in the case of RemoteAudioReasonNetworkCongestion.
1952
- */
1953
- RemoteAudioStateFrozen = 3,
1954
- /**
1955
- * 4: The remote audio fails to start. The SDK reports this state in the case of RemoteAudioReasonInternal.
1956
- */
1957
- RemoteAudioStateFailed = 4
1958
- }
1959
- /**
1960
- * The reason for the remote audio state change.
1961
- */
1962
- export declare enum RemoteAudioStateReason {
1963
- /**
1964
- * 0: The SDK reports this reason when the audio state changes.
1965
- */
1966
- RemoteAudioReasonInternal = 0,
1967
- /**
1968
- * 1: Network congestion.
1969
- */
1970
- RemoteAudioReasonNetworkCongestion = 1,
1971
- /**
1972
- * 2: Network recovery.
1973
- */
1974
- RemoteAudioReasonNetworkRecovery = 2,
1975
- /**
1976
- * 3: The local user stops receiving the remote audio stream or disables the audio module.
1977
- */
1978
- RemoteAudioReasonLocalMuted = 3,
1979
- /**
1980
- * 4: The local user resumes receiving the remote audio stream or enables the audio module.
1981
- */
1982
- RemoteAudioReasonLocalUnmuted = 4,
1983
- /**
1984
- * 5: The remote user stops sending the audio stream or disables the audio module.
1985
- */
1986
- RemoteAudioReasonRemoteMuted = 5,
1987
- /**
1988
- * 6: The remote user resumes sending the audio stream or enables the audio module.
1989
- */
1990
- RemoteAudioReasonRemoteUnmuted = 6,
1991
- /**
1992
- * 7: The remote user leaves the channel.
1993
- */
1994
- RemoteAudioReasonRemoteOffline = 7
1995
- }
1996
- /**
1997
- * The state of the remote video.
1998
- */
1999
- export declare enum RemoteVideoState {
2000
- /**
2001
- * 0: The remote video is in the initial state. The SDK reports this state in the case of RemoteVideoStateReasonLocalMuted, RemoteVideoStateReasonRemoteMuted, or RemoteVideoStateReasonRemoteOffline.
2002
- */
2003
- RemoteVideoStateStopped = 0,
2004
- /**
2005
- * 1: The first remote video packet is received.
2006
- */
2007
- RemoteVideoStateStarting = 1,
2008
- /**
2009
- * 2: The remote video stream is decoded and plays normally. The SDK reports this state in the case of RemoteVideoStateReasonNetworkRecovery, RemoteVideoStateReasonLocalUnmuted, or RemoteVideoStateReasonRemoteUnmuted.
2010
- */
2011
- RemoteVideoStateDecoding = 2,
2012
- /**
2013
- * 3: The remote video is frozen. The SDK reports this state in the case of RemoteVideoStateReasonNetworkCongestion.
2014
- */
2015
- RemoteVideoStateFrozen = 3,
2016
- /**
2017
- * 4: The remote video fails to start. The SDK reports this state in the case of RemoteVideoStateReasonInternal.
2018
- */
2019
- RemoteVideoStateFailed = 4
2020
- }
2021
- /**
2022
- * The reason for the remote video state change.
2023
- */
2024
- export declare enum RemoteVideoStateReason {
2025
- /**
2026
- * 0: The SDK reports this reason when the video state changes.
2027
- */
2028
- RemoteVideoStateReasonInternal = 0,
2029
- /**
2030
- * 1: Network congestion.
2031
- */
2032
- RemoteVideoStateReasonNetworkCongestion = 1,
2033
- /**
2034
- * 2: Network recovery.
2035
- */
2036
- RemoteVideoStateReasonNetworkRecovery = 2,
2037
- /**
2038
- * 3: The local user stops receiving the remote video stream or disables the video module.
2039
- */
2040
- RemoteVideoStateReasonLocalMuted = 3,
2041
- /**
2042
- * 4: The local user resumes receiving the remote video stream or enables the video module.
2043
- */
2044
- RemoteVideoStateReasonLocalUnmuted = 4,
2045
- /**
2046
- * 5: The remote user stops sending the video stream or disables the video module.
2047
- */
2048
- RemoteVideoStateReasonRemoteMuted = 5,
2049
- /**
2050
- * 6: The remote user resumes sending the video stream or enables the video module.
2051
- */
2052
- RemoteVideoStateReasonRemoteUnmuted = 6,
2053
- /**
2054
- * 7: The remote user leaves the channel.
2055
- */
2056
- RemoteVideoStateReasonRemoteOffline = 7,
2057
- /**
2058
- * @ignore
2059
- */
2060
- RemoteVideoStateReasonAudioFallback = 8,
2061
- /**
2062
- * @ignore
2063
- */
2064
- RemoteVideoStateReasonAudioFallbackRecovery = 9,
2065
- /**
2066
- * @ignore
2067
- */
2068
- RemoteVideoStateReasonVideoStreamTypeChangeToLow = 10,
2069
- /**
2070
- * @ignore
2071
- */
2072
- RemoteVideoStateReasonVideoStreamTypeChangeToHigh = 11,
2073
- /**
2074
- * @ignore
2075
- */
2076
- RemoteVideoStateReasonSdkInBackground = 12,
2077
- /**
2078
- * @ignore
2079
- */
2080
- RemoteVideoStateReasonCodecNotSupport = 13
2081
- }
2082
- /**
2083
- * @ignore
2084
- */
2085
- export declare enum RemoteUserState {
2086
- /**
2087
- * @ignore
2088
- */
2089
- UserStateMuteAudio = 1,
2090
- /**
2091
- * @ignore
2092
- */
2093
- UserStateMuteVideo = 2,
2094
- /**
2095
- * @ignore
2096
- */
2097
- UserStateEnableVideo = 16,
2098
- /**
2099
- * @ignore
2100
- */
2101
- UserStateEnableLocalVideo = 256
2102
- }
2103
- /**
2104
- * @ignore
2105
- */
2106
- export declare class VideoTrackInfo {
2107
- /**
2108
- * @ignore
2109
- */
2110
- isLocal?: boolean;
2111
- /**
2112
- * @ignore
2113
- */
2114
- ownerUid?: number;
2115
- /**
2116
- * @ignore
2117
- */
2118
- trackId?: number;
2119
- /**
2120
- * @ignore
2121
- */
2122
- channelId?: string;
2123
- /**
2124
- * @ignore
2125
- */
2126
- streamType?: VideoStreamType;
2127
- /**
2128
- * @ignore
2129
- */
2130
- codecType?: VideoCodecType;
2131
- /**
2132
- * @ignore
2133
- */
2134
- encodedFrameOnly?: boolean;
2135
- /**
2136
- * @ignore
2137
- */
2138
- sourceType?: VideoSourceType;
2139
- /**
2140
- * @ignore
2141
- */
2142
- observationPosition?: number;
2143
- }
2144
- /**
2145
- * @ignore
2146
- */
2147
- export declare enum RemoteVideoDownscaleLevel {
2148
- /**
2149
- * @ignore
2150
- */
2151
- RemoteVideoDownscaleLevelNone = 0,
2152
- /**
2153
- * @ignore
2154
- */
2155
- RemoteVideoDownscaleLevel1 = 1,
2156
- /**
2157
- * @ignore
2158
- */
2159
- RemoteVideoDownscaleLevel2 = 2,
2160
- /**
2161
- * @ignore
2162
- */
2163
- RemoteVideoDownscaleLevel3 = 3,
2164
- /**
2165
- * @ignore
2166
- */
2167
- RemoteVideoDownscaleLevel4 = 4
2168
- }
2169
- /**
2170
- * The volume information of users.
2171
- */
2172
- export declare class AudioVolumeInfo {
2173
- /**
2174
- * The user ID.In the local user's callback, uid = 0.In the remote users' callback, uid is the user ID of a remote user whose instantaneous volume is one of the three highest.
2175
- */
2176
- uid?: number;
2177
- /**
2178
- * The volume of the user. The value ranges between 0 (lowest volume) and 255 (highest volume).
2179
- */
2180
- volume?: number;
2181
- /**
2182
- * Voice activity status of the local user.0: The local user is not speaking.1: The local user is speaking.The vad parameter does not report the voice activity status of remote users. In a remote user's callback, the value of vad is always 1.To use this parameter, you must set reportVad to true when calling enableAudioVolumeIndication .
2183
- */
2184
- vad?: number;
2185
- /**
2186
- * The voice pitch of the local user. The value ranges between 0.0 and 4000.0.The voicePitch parameter does not report the voice pitch of remote users. In the remote users' callback, the value of voicePitch is always 0.0.
2187
- */
2188
- voicePitch?: number;
2189
- }
2190
- /**
2191
- * The audio device information.
2192
- */
2193
- export declare class DeviceInfo {
2194
- /**
2195
- * @ignore
2196
- */
2197
- isLowLatencyAudioSupported?: boolean;
2198
- }
2199
- /**
2200
- * @ignore
2201
- */
2202
- export declare class Packet {
2203
- /**
2204
- * @ignore
2205
- */
2206
- buffer?: Uint8Array;
2207
- /**
2208
- * @ignore
2209
- */
2210
- size?: number;
2211
- }
2212
- /**
2213
- * The audio sampling rate of the stream to be pushed to the CDN.
2214
- */
2215
- export declare enum AudioSampleRateType {
2216
- /**
2217
- * 32000: 32 kHz
2218
- */
2219
- AudioSampleRate32000 = 32000,
2220
- /**
2221
- * 44100: 44.1 kHz
2222
- */
2223
- AudioSampleRate44100 = 44100,
2224
- /**
2225
- * 48000: (Default) 48 kHz
2226
- */
2227
- AudioSampleRate48000 = 48000
2228
- }
2229
- /**
2230
- * The codec type of the output video.
2231
- */
2232
- export declare enum VideoCodecTypeForStream {
2233
- /**
2234
- * 1: (Default) H.264.
2235
- */
2236
- VideoCodecH264ForStream = 1,
2237
- /**
2238
- * 2: H.265.
2239
- */
2240
- VideoCodecH265ForStream = 2
2241
- }
2242
- /**
2243
- * Video codec profile types.
2244
- */
2245
- export declare enum VideoCodecProfileType {
2246
- /**
2247
- * 66: Baseline video codec profile; generally used for video calls on mobile phones.
2248
- */
2249
- VideoCodecProfileBaseline = 66,
2250
- /**
2251
- * 77: Main video codec profile; generally used in mainstream electronics such as MP4 players, portable video players, PSP, and iPads.
2252
- */
2253
- VideoCodecProfileMain = 77,
2254
- /**
2255
- * 100: (Default) High video codec profile; generally used in high-resolution live streaming or television.
2256
- */
2257
- VideoCodecProfileHigh = 100
2258
- }
2259
- /**
2260
- * Self-defined audio codec profile.
2261
- */
2262
- export declare enum AudioCodecProfileType {
2263
- /**
2264
- * 0: (Default) LC-AAC.
2265
- */
2266
- AudioCodecProfileLcAac = 0,
2267
- /**
2268
- * 1: HE-AAC.
2269
- */
2270
- AudioCodecProfileHeAac = 1,
2271
- /**
2272
- * 2: HE-AAC v2.
2273
- */
2274
- AudioCodecProfileHeAacV2 = 2
2275
- }
2276
- /**
2277
- * Local audio statistics.
2278
- */
2279
- export declare class LocalAudioStats {
2280
- /**
2281
- * The number of audio channels.
2282
- */
2283
- numChannels?: number;
2284
- /**
2285
- * The sampling rate (Hz) of sending the local user's audio stream.
2286
- */
2287
- sentSampleRate?: number;
2288
- /**
2289
- * The average bitrate (Kbps) of sending the local user's audio stream.
2290
- */
2291
- sentBitrate?: number;
2292
- /**
2293
- * The internal payload codec.
2294
- */
2295
- internalCodec?: number;
2296
- /**
2297
- * The packet loss rate (%) from the local client to the Agora server before applying the anti-packet loss strategies.
2298
- */
2299
- txPacketLossRate?: number;
2300
- /**
2301
- * The delay of the audio device module when playing or recording audio.
2302
- */
2303
- audioDeviceDelay?: number;
2304
- }
2305
- /**
2306
- * States of the Media Push.
2307
- */
2308
- export declare enum RtmpStreamPublishState {
2309
- /**
2310
- * 0: The Media Push has not started or has ended.
2311
- */
2312
- RtmpStreamPublishStateIdle = 0,
2313
- /**
2314
- * 1: The SDK is connecting to Agora's streaming server and the CDN server.
2315
- */
2316
- RtmpStreamPublishStateConnecting = 1,
2317
- /**
2318
- * 2: The RTMP or RTMPS streaming publishes. The SDK successfully publishes the RTMP or RTMPS streaming and returns this state.
2319
- */
2320
- RtmpStreamPublishStateRunning = 2,
2321
- /**
2322
- * 3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.If the SDK successfully resumes the streaming, RtmpStreamPublishStateRunning(2) returns.
2323
- * If the streaming does not resume within 60 seconds or server errors occur, RtmpStreamPublishStateFailure(4) returns. You can also reconnect to the server by calling the stopRtmpStream method.
2324
- */
2325
- RtmpStreamPublishStateRecovering = 3,
2326
- /**
2327
- * 4: The RTMP or RTMPS streaming fails. See the errCode parameter for the detailed error information.
2328
- */
2329
- RtmpStreamPublishStateFailure = 4,
2330
- /**
2331
- * 5: The SDK is disconnecting from the Agora streaming server and CDN. When you call stopRtmpStream to stop the streaming normally, the SDK reports the streaming state as RtmpStreamPublishStateDisconnecting and RtmpStreamPublishStateIdle in sequence.
2332
- */
2333
- RtmpStreamPublishStateDisconnecting = 5
2334
- }
2335
- /**
2336
- * Error codes of the RTMP or RTMPS streaming.
2337
- */
2338
- export declare enum RtmpStreamPublishErrorType {
2339
- /**
2340
- * 0: The RTMP or RTMPS streaming publishes successfully.
2341
- */
2342
- RtmpStreamPublishErrorOk = 0,
2343
- /**
2344
- * 1: Invalid argument used. Check the parameter setting.
2345
- */
2346
- RtmpStreamPublishErrorInvalidArgument = 1,
2347
- /**
2348
- * 2: The RTMP or RTMPS streaming is encrypted and cannot be published.
2349
- */
2350
- RtmpStreamPublishErrorEncryptedStreamNotAllowed = 2,
2351
- /**
2352
- * 3: Timeout for the RTMP or RTMPS streaming. Try to publish the streaming again.
2353
- */
2354
- RtmpStreamPublishErrorConnectionTimeout = 3,
2355
- /**
2356
- * 4: An error occurs in Agora's streaming server. Try to publish the streaming again.
2357
- */
2358
- RtmpStreamPublishErrorInternalServerError = 4,
2359
- /**
2360
- * 5: An error occurs in the CDN server.
2361
- */
2362
- RtmpStreamPublishErrorRtmpServerError = 5,
2363
- /**
2364
- * 6: The RTMP or RTMPS streaming publishing requests are too frequent.
2365
- */
2366
- RtmpStreamPublishErrorTooOften = 6,
2367
- /**
2368
- * 7: The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones.
2369
- */
2370
- RtmpStreamPublishErrorReachLimit = 7,
2371
- /**
2372
- * 8: The host manipulates other hosts' URLs. For example, the host updates or stops other hosts' streams. Check your app logic.
2373
- */
2374
- RtmpStreamPublishErrorNotAuthorized = 8,
2375
- /**
2376
- * 9: Agora's server fails to find the RTMP or RTMPS streaming.
2377
- */
2378
- RtmpStreamPublishErrorStreamNotFound = 9,
2379
- /**
2380
- * 10: The format of the RTMP or RTMPS streaming URL is not supported. Check whether the URL format is correct.
2381
- */
2382
- RtmpStreamPublishErrorFormatNotSupported = 10,
2383
- /**
2384
- * 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your app code logic.
2385
- */
2386
- RtmpStreamPublishErrorNotBroadcaster = 11,
2387
- /**
2388
- * 13: The updateRtmpTranscoding or setLiveTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic.
2389
- */
2390
- RtmpStreamPublishErrorTranscodingNoMixStream = 13,
2391
- /**
2392
- * 14: Errors occurred in the host's network.
2393
- */
2394
- RtmpStreamPublishErrorNetDown = 14,
2395
- /**
2396
- * @ignore
2397
- */
2398
- RtmpStreamPublishErrorInvalidAppid = 15,
2399
- /**
2400
- * @ignore
2401
- */
2402
- RtmpStreamPublishErrorInvalidPrivilege = 16,
2403
- /**
2404
- * 100: The streaming has been stopped normally. After you call stopRtmpStream to stop streaming, the SDK returns this value.
2405
- */
2406
- RtmpStreamUnpublishErrorOk = 100
2407
- }
2408
- /**
2409
- * Events during the media push.
2410
- */
2411
- export declare enum RtmpStreamingEvent {
2412
- /**
2413
- * 1: An error occurs when you add a background image or a watermark image in the media push.
2414
- */
2415
- RtmpStreamingEventFailedLoadImage = 1,
2416
- /**
2417
- * 2: The streaming URL is already being used for CDN live streaming. If you want to start new streaming, use a new streaming URL.
2418
- */
2419
- RtmpStreamingEventUrlAlreadyInUse = 2,
2420
- /**
2421
- * 3: The feature is not supported.
2422
- */
2423
- RtmpStreamingEventAdvancedFeatureNotSupport = 3,
2424
- /**
2425
- * 4: Reserved.
2426
- */
2427
- RtmpStreamingEventRequestTooOften = 4
2428
- }
2429
- /**
2430
- * Image properties.
2431
- * This class sets the properties of the watermark and background images in the live video.
2432
- */
2433
- export declare class RtcImage {
2434
- /**
2435
- * The HTTP/HTTPS URL address of the image in the live video. The maximum length of this parameter is 1024 bytes.
2436
- */
2437
- url?: string;
2438
- /**
2439
- * The x coordinate (pixel) of the image on the video frame (taking the upper left corner of the video frame as the origin).
2440
- */
2441
- x?: number;
2442
- /**
2443
- * The y coordinate (pixel) of the image on the video frame (taking the upper left corner of the video frame as the origin).
2444
- */
2445
- y?: number;
2446
- /**
2447
- * The width (pixel) of the image on the video frame.
2448
- */
2449
- width?: number;
2450
- /**
2451
- * The height (pixel) of the image on the video frame.
2452
- */
2453
- height?: number;
2454
- /**
2455
- * The layer index of the watermark or background image. When you use the watermark array to add a watermark or multiple watermarks, you must pass a value to zOrder in the range [1,255]; otherwise, the SDK reports an error. In other cases, zOrder can optionally be passed in the range [0,255], with 0 being the default value. 0 means the bottom layer and 255 means the top layer.
2456
- */
2457
- zOrder?: number;
2458
- /**
2459
- * The transparency of the watermark or background image. The value ranges between 0.0 and 1.0:0.0: Completely transparent.1.0: (Default) Opaque.
2460
- */
2461
- alpha?: number;
2462
- }
2463
- /**
2464
- * The configuration for advanced features of the RTMP or RTMPS streaming with transcoding.
2465
- * If you want to enable the advanced features of streaming with transcoding, contact .
2466
- */
2467
- export declare class LiveStreamAdvancedFeature {
2468
- /**
2469
- * The feature names, including LBHQ (high-quality video with a lower bitrate) and VEO (optimized video encoder).
2470
- */
2471
- featureName?: string;
2472
- /**
2473
- * Whether to enable the advanced features of streaming with transcoding:true: Enable the advanced features.false: (Default) Do not enable the advanced features.
2474
- */
2475
- opened?: boolean;
2476
- }
2477
- /**
2478
- * Connection states.
2479
- */
2480
- export declare enum ConnectionStateType {
2481
- /**
2482
- * 1: The SDK is disconnected from the Agora edge server. The state indicates the SDK is in one of the following phases:Theinitial state before calling the joinChannel method.The app calls the leaveChannel method.
2483
- */
2484
- ConnectionStateDisconnected = 1,
2485
- /**
2486
- * 2: The SDK is connecting to the Agora edge server. This state indicates that the SDK is establishing a connection with the specified channel after the app calls joinChannel.If the SDK successfully joins the channel, it triggers the onConnectionStateChanged callback and the connection state switches to ConnectionStateConnected.After the connection is established, the SDK also initializes the media and triggers onJoinChannelSuccess when everything is ready.
2487
- */
2488
- ConnectionStateConnecting = 2,
2489
- /**
2490
- * 3: The SDK is connected to the Agora edge server. This state also indicates that the user has joined a channel and can now publish or subscribe to a media stream in the channel. If the connection to the channel is lost because, for example, if the network is down or switched, the SDK automatically tries to reconnect and triggers onConnectionStateChanged callback, notifying that the current network state becomes ConnectionStateReconnecting.
2491
- */
2492
- ConnectionStateConnected = 3,
2493
- /**
2494
- * 4: The SDK keeps reconnecting to the Agora edge server. The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.If the SDK cannot rejoin the channel within 10 seconds, it triggers onConnectionLost , stays in the ConnectionStateReconnecting state, and keeps rejoining the channel.If the SDK fails to rejoin the channel 20 minutes after being disconnected from the Agora edge server, the SDK triggers the onConnectionStateChanged callback, switches to the ConnectionStateFailed state, and stops rejoining the channel.
2495
- */
2496
- ConnectionStateReconnecting = 4,
2497
- /**
2498
- * 5: The SDK fails to connect to the Agora edge server or join the channel. This state indicates that the SDK stops trying to rejoin the channel. You must call leaveChannel to leave the channel.You can call joinChannel to rejoin the channel.If the SDK is banned from joining the channel by the Agora edge server through the RESTful API, the SDK triggers the onConnectionStateChanged callback.
2499
- */
2500
- ConnectionStateFailed = 5
2501
- }
2502
- /**
2503
- * Transcoding configurations of each host.
2504
- */
2505
- export declare class TranscodingUser {
2506
- /**
2507
- * The user ID of the host.
2508
- */
2509
- uid?: number;
2510
- /**
2511
- * The x coordinate (pixel) of the host's video on the output video frame (taking the upper left corner of the video frame as the origin). The value range is [0, width], where width is the width set in LiveTranscoding .
2512
- */
2513
- x?: number;
2514
- /**
2515
- * The y coordinate (pixel) of the host's video on the output video frame (taking the upper left corner of the video frame as the origin). The value range is [0, height], where height is the height set in LiveTranscoding .
2516
- */
2517
- y?: number;
2518
- /**
2519
- * The width (pixel) of the host's video.
2520
- */
2521
- width?: number;
2522
- /**
2523
- * The height (pixel) of the host's video.
2524
- */
2525
- height?: number;
2526
- /**
2527
- * The layer index number of the host's video. The value range is [0, 100].0: (Default) The host's video is the bottom layer.100: The host's video is the top layer.If the value is less than 0 or greater than 100, ErrInvalidArgument error is returned.Setting zOrder to 0 is supported.
2528
- */
2529
- zOrder?: number;
2530
- /**
2531
- * The transparency of the host's video. The value range is [0.0,1.0].0.0: Completely transparent.1.0: (Default) Opaque.
2532
- */
2533
- alpha?: number;
2534
- /**
2535
- * The audio channel used by the host's audio in the output audio. The default value is 0, and the value range is [0, 5].0: (Recommended) The defaut setting, which supports dual channels at most and depends on the upstream of the host.1: The host's audio uses the FL audio channel. If the host's upstream uses multiple audio channels, the Agora server mixes them into mono first.2: The host's audio uses the FC audio channel. If the host's upstream uses multiple audio channels, the Agora server mixes them into mono first.3: The host's audio uses the FR audio channel. If the host's upstream uses multiple audio channels, the Agora server mixes them into mono first.4: The host's audio uses the BL audio channel. If the host's upstream uses multiple audio channels, the Agora server mixes them into mono first.5: The host's audio uses the BR audio channel. If the host's upstream uses multiple audio channels, the Agora server mixes them into mono first.0xFF or a value greater than 5: The host's audio is muted, and the Agora server removes the host's audio.If the value is not 0, a special player is required.
2536
- */
2537
- audioChannel?: number;
2538
- }
2539
- /**
2540
- * Transcoding configurations for Media Push.
2541
- */
2542
- export declare class LiveTranscoding {
2543
- /**
2544
- * The width of the video in pixels. The default value is 360.When pushing video streams to the CDN, the value range of width is [64,1920]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1920, Agora server automatically adjusts it to 1920.When pushing audio streams to the CDN, set width and height as 0.
2545
- */
2546
- width?: number;
2547
- /**
2548
- * The height of the video in pixels. The default value is 640.When pushing video streams to the CDN, the value range of height is [64,1080]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1080, Agora server automatically adjusts it to 1080.When pushing audio streams to the CDN, set width and height as 0.
2549
- */
2550
- height?: number;
2551
- /**
2552
- * Bitrate of the output video stream for Media Push in Kbps. The default value is 400 Kbps.
2553
- */
2554
- videoBitrate?: number;
2555
- /**
2556
- * Frame rate (fps) of the output video stream set for Media Push. The default value is 15. The value range is (0,30].The Agora server adjusts any value over 30 to 30.
2557
- */
2558
- videoFramerate?: number;
2559
- /**
2560
- * DeprecatedThis member is deprecated.Latency mode:true: Low latency with unassured quality.false: (Default) High latency with assured quality.
2561
- */
2562
- lowLatency?: boolean;
2563
- /**
2564
- * GOP (Group of Pictures) in fps of the video frames for Media Push. The default value is 30.
2565
- */
2566
- videoGop?: number;
2567
- /**
2568
- * Video codec profile type for Media Push. Set it as 66, 77, or 100 (default). See VideoCodecProfileType for details.If you set this parameter to any other value, Agora adjusts it to the default value.
2569
- */
2570
- videoCodecProfile?: VideoCodecProfileType;
2571
- /**
2572
- * The background color in RGB hex value. Value only. Do not include a preceeding #. For example, 0xFFB6C1 (light pink). The default value is 0x000000 (black).
2573
- */
2574
- backgroundColor?: number;
2575
- /**
2576
- * Video codec profile types for Media Push. See VideoCodecTypeForStream .
2577
- */
2578
- videoCodecType?: VideoCodecTypeForStream;
2579
- /**
2580
- * The number of users in the Media Push. The value range is [0,17].
2581
- */
2582
- userCount?: number;
2583
- /**
2584
- * Manages the user layout configuration in the Media Push. Agora supports a maximum of 17 transcoding users in a Media Push channel. See TranscodingUser .
2585
- */
2586
- transcodingUsers?: TranscodingUser[];
2587
- /**
2588
- * Reserved property. Extra user-defined information to send SEI for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 bytes. For more information on SEI, see SEI-related questions.
2589
- */
2590
- transcodingExtraInfo?: string;
2591
- /**
2592
- * DeprecatedObsolete and not recommended for use.The metadata sent to the CDN client.
2593
- */
2594
- metadata?: string;
2595
- /**
2596
- * The watermark on the live video. The image format needs to be PNG. See RtcImage .You can add one watermark, or add multiple watermarks using an array. This parameter is used with watermarkCount.
2597
- */
2598
- watermark?: RtcImage[];
2599
- /**
2600
- * The number of watermarks on the live video. The total number of watermarks and background images can range from 0 to 10. This parameter is used with watermark.
2601
- */
2602
- watermarkCount?: number;
2603
- /**
2604
- * The number of background images on the live video. The image format needs to be PNG. See RtcImage .You can add a background image or use an array to add multiple background images. This parameter is used with backgroundImageCount.
2605
- */
2606
- backgroundImage?: RtcImage[];
2607
- /**
2608
- * The number of background images on the live video. The total number of watermarks and background images can range from 0 to 10. This parameter is used with backgroundImage.
2609
- */
2610
- backgroundImageCount?: number;
2611
- /**
2612
- * The audio sampling rate (Hz) of the output media stream. See AudioSampleRateType .
2613
- */
2614
- audioSampleRate?: AudioSampleRateType;
2615
- /**
2616
- * Bitrate (Kbps) of the audio output stream for Media Push. The default value is 48, and the highest value is 128.
2617
- */
2618
- audioBitrate?: number;
2619
- /**
2620
- * The number of audio channels for Media Push. Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.1: (Default) Mono2: Stereo.3: Three audio channels.4: Four audio channels.5: Five audio channels.
2621
- */
2622
- audioChannels?: number;
2623
- /**
2624
- * Audio codec profile type for Media Push. See AudioCodecProfileType .
2625
- */
2626
- audioCodecProfile?: AudioCodecProfileType;
2627
- /**
2628
- * Advanced features of the Media Push with transcoding. See LiveStreamAdvancedFeature .
2629
- */
2630
- advancedFeatures?: LiveStreamAdvancedFeature[];
2631
- /**
2632
- * The number of enabled advanced features. The default value is 0.
2633
- */
2634
- advancedFeatureCount?: number;
2635
- }
2636
- /**
2637
- * The video streams for the video mixing on the local client.
2638
- */
2639
- export declare class TranscodingVideoStream {
2640
- /**
2641
- * The source type of video for the video mixing on the local client. See VideoSourceType .
2642
- */
2643
- sourceType?: VideoSourceType;
2644
- /**
2645
- * The ID of the remote user.Use this parameter only when the source type of the video for the video mixing on the local client is VideoSourceRemote.
2646
- */
2647
- remoteUserUid?: number;
2648
- /**
2649
- * The URL of the image.
2650
- */
2651
- imageUrl?: string;
2652
- /**
2653
- * @ignore
2654
- */
2655
- mediaPlayerId?: number;
2656
- /**
2657
- * The horizontal displacement of the top-left corner of the video for the video mixing on the client relative to the top-left corner (origin) of the canvas for this video mixing.
2658
- */
2659
- x?: number;
2660
- /**
2661
- * The vertical displacement of the top-left corner of the video for the video mixing on the client relative to the top-left corner (origin) of the canvas for this video mixing.
2662
- */
2663
- y?: number;
2664
- /**
2665
- * The width (px) of the video for the video mixing on the local client.
2666
- */
2667
- width?: number;
2668
- /**
2669
- * The height (px) of the video for the video mixing on the local client.
2670
- */
2671
- height?: number;
2672
- /**
2673
- * The number of the layer to which the video for the video mixing on the local client belongs. The value range is [0,100].0: (Default) The layer is at the bottom.100: The layer is at the top.
2674
- */
2675
- zOrder?: number;
2676
- /**
2677
- * The transparency of the video for the video mixing on the local client. The value range is [0.0,1.0]. 0.0 means the transparency is completely transparent. 1.0 means the transparency is opaque.
2678
- */
2679
- alpha?: number;
2680
- /**
2681
- * Whether to mirror the video for the video mixing on the local client.true: Mirror the captured video.false: (Default) Do not mirror the captured video.The paramter only works for videos with the source type
2682
- */
2683
- mirror?: boolean;
2684
- }
2685
- /**
2686
- * The configuration of the video mixing on the local client.
2687
- */
2688
- export declare class LocalTranscoderConfiguration {
2689
- /**
2690
- * The number of the video streams for the video mixing on the local client.
2691
- */
2692
- streamCount?: number;
2693
- /**
2694
- * The video streams for the video mixing on the local client. See TranscodingVideoStream .
2695
- */
2696
- videoInputStreams?: TranscodingVideoStream[];
2697
- /**
2698
- * The encoding configuration of the mixed video stream after the video mixing on the local client. See VideoEncoderConfiguration .
2699
- */
2700
- videoOutputConfiguration?: VideoEncoderConfiguration;
2701
- /**
2702
- * @ignore
2703
- */
2704
- syncWithPrimaryCamera?: boolean;
2705
- }
2706
- /**
2707
- * @ignore
2708
- */
2709
- export declare enum VideoTranscoderError {
2710
- /**
2711
- * @ignore
2712
- */
2713
- VtErrOk = 0,
2714
- /**
2715
- * @ignore
2716
- */
2717
- VtErrVideoSourceNotReady = 1,
2718
- /**
2719
- * @ignore
2720
- */
2721
- VtErrInvalidVideoSourceType = 2,
2722
- /**
2723
- * @ignore
2724
- */
2725
- VtErrInvalidImagePath = 3,
2726
- /**
2727
- * @ignore
2728
- */
2729
- VtErrUnsupportImageFormat = 4,
2730
- /**
2731
- * @ignore
2732
- */
2733
- VtErrInvalidLayout = 5,
2734
- /**
2735
- * @ignore
2736
- */
2737
- VtErrInternal = 20
2738
- }
2739
- /**
2740
- * Configurations of the last-mile network test.
2741
- */
2742
- export declare class LastmileProbeConfig {
2743
- /**
2744
- * Sets whether to test the uplink network. Some users, for example, the audience members in a LIVE_BROADCASTING channel, do not need such a test.true: Test the uplink network.false: Do not test the uplink network.
2745
- */
2746
- probeUplink?: boolean;
2747
- /**
2748
- * Sets whether to test the downlink network:true: Test the downlink network.false: Do not test the downlink network.
2749
- */
2750
- probeDownlink?: boolean;
2751
- /**
2752
- * The expected maximum uplink bitrate (bps) of the local user. The value range is [100000, 5000000]. Agora recommends referring to setVideoEncoderConfiguration to set the value.
2753
- */
2754
- expectedUplinkBitrate?: number;
2755
- /**
2756
- * The expected maximum downlink bitrate (bps) of the local user. The value range is [100000,5000000].
2757
- */
2758
- expectedDownlinkBitrate?: number;
2759
- }
2760
- /**
2761
- * The status of the last-mile probe test.
2762
- */
2763
- export declare enum LastmileProbeResultState {
2764
- /**
2765
- * 1: The last-mile network probe test is complete.
2766
- */
2767
- LastmileProbeResultComplete = 1,
2768
- /**
2769
- * 2: The last-mile network probe test is incomplete because the bandwidth estimation is not available due to limited test resources. One possible reason is that testing resources are temporarily limited.
2770
- */
2771
- LastmileProbeResultIncompleteNoBwe = 2,
2772
- /**
2773
- * 3: The last-mile network probe test is not carried out. Probably due to poor network conditions.
2774
- */
2775
- LastmileProbeResultUnavailable = 3
2776
- }
2777
- /**
2778
- * Results of the uplink or downlink last-mile network test.
2779
- */
2780
- export declare class LastmileProbeOneWayResult {
2781
- /**
2782
- * The packet loss rate (%).
2783
- */
2784
- packetLossRate?: number;
2785
- /**
2786
- * The network jitter (ms).
2787
- */
2788
- jitter?: number;
2789
- /**
2790
- * The estimated available bandwidth (bps).
2791
- */
2792
- availableBandwidth?: number;
2793
- }
2794
- /**
2795
- * Results of the uplink and downlink last-mile network tests.
2796
- */
2797
- export declare class LastmileProbeResult {
2798
- /**
2799
- * The status of the last-mile probe test. See LastmileProbeResultState .
2800
- */
2801
- state?: LastmileProbeResultState;
2802
- /**
2803
- * Results of the uplink last-mile network test. See LastmileProbeOneWayResult .
2804
- */
2805
- uplinkReport?: LastmileProbeOneWayResult;
2806
- /**
2807
- * Results of the downlink last-mile network test. See LastmileProbeOneWayResult .
2808
- */
2809
- downlinkReport?: LastmileProbeOneWayResult;
2810
- /**
2811
- * The round-trip time (ms).
2812
- */
2813
- rtt?: number;
2814
- }
2815
- /**
2816
- * Reasons causing the change of the connection state.
2817
- */
2818
- export declare enum ConnectionChangedReasonType {
2819
- /**
2820
- * 0: The SDK is connecting to the Agora edge server.
2821
- */
2822
- ConnectionChangedConnecting = 0,
2823
- /**
2824
- * 1: The SDK has joined the channel successfully.
2825
- */
2826
- ConnectionChangedJoinSuccess = 1,
2827
- /**
2828
- * 2: The connection between the SDK and the Agora edge server is interrupted.
2829
- */
2830
- ConnectionChangedInterrupted = 2,
2831
- /**
2832
- * 3: The connection between the SDK and the Agora edge server is banned by the Agora edge server. This error occurs when the user is kicked out of the channel by the server.
2833
- */
2834
- ConnectionChangedBannedByServer = 3,
2835
- /**
2836
- * 4: The SDK fails to join the channel. When the SDK fails to join the channel for more than 20 minutes, this error occurs and the SDK stops reconnecting to the channel.
2837
- */
2838
- ConnectionChangedJoinFailed = 4,
2839
- /**
2840
- * 5: The SDK has left the channel.
2841
- */
2842
- ConnectionChangedLeaveChannel = 5,
2843
- /**
2844
- * 6: The connection failed because the App ID is not valid. Please rejoin the channel with a valid App ID.
2845
- */
2846
- ConnectionChangedInvalidAppId = 6,
2847
- /**
2848
- * 7: The connection failed since channel name is not valid. Rejoin the channel with a valid channel name.
2849
- */
2850
- ConnectionChangedInvalidChannelName = 7,
2851
- /**
2852
- * 8: The connection failed because the token is not valid. Possible reasons are as follows:The App Certificate for the project is enabled in Agora Console, but you do not use a token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.The uid specified when calling joinChannel to join the channel is inconsistent with the uid passed in when generating the token.
2853
- */
2854
- ConnectionChangedInvalidToken = 8,
2855
- /**
2856
- * 9: The connection failed since token is expired.
2857
- */
2858
- ConnectionChangedTokenExpired = 9,
2859
- /**
2860
- * 10: The connection is rejected by server. Possible reasons are as follows:The user is already in the channel and still calls a method, for example, joinChannel, to join the channel. Stop calling this method to clear this error.The user tries to join a channel while a test call is in progress. The user needs to join the channel after the call test ends.
2861
- */
2862
- ConnectionChangedRejectedByServer = 10,
2863
- /**
2864
- * 11: The connection state changed to reconnecting because the SDK has set a proxy server.
2865
- */
2866
- ConnectionChangedSettingProxyServer = 11,
2867
- /**
2868
- * 12: The connection state changed because the token is renewed.
2869
- */
2870
- ConnectionChangedRenewToken = 12,
2871
- /**
2872
- * 13: The IP address of the client has changed, possibly because the network type, IP address, or port has been changed.
2873
- */
2874
- ConnectionChangedClientIpAddressChanged = 13,
2875
- /**
2876
- * 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The connection state changes to .
2877
- */
2878
- ConnectionChangedKeepAliveTimeout = 14,
2879
- /**
2880
- * 15: The user has rejoined the channel successfully.
2881
- */
2882
- ConnectionChangedRejoinSuccess = 15,
2883
- /**
2884
- * 16: The connection between the SDK and the server is lost.
2885
- */
2886
- ConnectionChangedLost = 16,
2887
- /**
2888
- * 17: The connection state changes due to the echo test.
2889
- */
2890
- ConnectionChangedEchoTest = 17,
2891
- /**
2892
- * @ignore
2893
- */
2894
- ConnectionChangedClientIpAddressChangedByUser = 18,
2895
- /**
2896
- * @ignore
2897
- */
2898
- ConnectionChangedSameUidLogin = 19,
2899
- /**
2900
- * @ignore
2901
- */
2902
- ConnectionChangedTooManyBroadcasters = 20,
2903
- /**
2904
- * @ignore
2905
- */
2906
- ConnectionChangedLicenseValidationFailure = 21
2907
- }
2908
- /**
2909
- * The reason for a user role switch failure.
2910
- */
2911
- export declare enum ClientRoleChangeFailedReason {
2912
- /**
2913
- * 1: The number of hosts in the channel is already at the upper limit.This enumerator is reported only when the support for 128 users is enabled. The maximum number of hosts is based on the actual number of hosts configured when you enable the 128-user feature.
2914
- */
2915
- ClientRoleChangeFailedTooManyBroadcasters = 1,
2916
- /**
2917
- * 2: The request is rejected by the Agora server. Agora recommends you prompt the user to try to switch their user role again.
2918
- */
2919
- ClientRoleChangeFailedNotAuthorized = 2,
2920
- /**
2921
- * 3: The request is timed out. Agora recommends you prompt the user to check the network connection and try to switch their user role again.
2922
- */
2923
- ClientRoleChangeFailedRequestTimeOut = 3,
2924
- /**
2925
- * 4: The SDK connection fails. You can use reason reported in the onConnectionStateChanged callback to troubleshoot the failure.
2926
- */
2927
- ClientRoleChangeFailedConnectionFailed = 4
2928
- }
2929
- /**
2930
- * @ignore
2931
- */
2932
- export declare enum WlaccMessageReason {
2933
- /**
2934
- * @ignore
2935
- */
2936
- WlaccMessageReasonWeakSignal = 0,
2937
- /**
2938
- * @ignore
2939
- */
2940
- WlaccMessageReasonChannelCongestion = 1
2941
- }
2942
- /**
2943
- * @ignore
2944
- */
2945
- export declare enum WlaccSuggestAction {
2946
- /**
2947
- * @ignore
2948
- */
2949
- WlaccSuggestActionCloseToWifi = 0,
2950
- /**
2951
- * @ignore
2952
- */
2953
- WlaccSuggestActionConnectSsid = 1,
2954
- /**
2955
- * @ignore
2956
- */
2957
- WlaccSuggestActionCheck5g = 2,
2958
- /**
2959
- * @ignore
2960
- */
2961
- WlaccSuggestActionModifySsid = 3
2962
- }
2963
- /**
2964
- * @ignore
2965
- */
2966
- export declare class WlAccStats {
2967
- /**
2968
- * @ignore
2969
- */
2970
- e2eDelayPercent?: number;
2971
- /**
2972
- * @ignore
2973
- */
2974
- frozenRatioPercent?: number;
2975
- /**
2976
- * @ignore
2977
- */
2978
- lossRatePercent?: number;
2979
- }
2980
- /**
2981
- * Network type.
2982
- */
2983
- export declare enum NetworkType {
2984
- /**
2985
- * -1: The network type is unknown.
2986
- */
2987
- NetworkTypeUnknown = -1,
2988
- /**
2989
- * 0: The SDK disconnects from the network.
2990
- */
2991
- NetworkTypeDisconnected = 0,
2992
- /**
2993
- * 1: The network type is LAN.
2994
- */
2995
- NetworkTypeLan = 1,
2996
- /**
2997
- * 2: The network type is Wi-Fi (including hotspots).
2998
- */
2999
- NetworkTypeWifi = 2,
3000
- /**
3001
- * 3: The network type is mobile 2G.
3002
- */
3003
- NetworkTypeMobile2g = 3,
3004
- /**
3005
- * 4: The network type is mobile 3G.
3006
- */
3007
- NetworkTypeMobile3g = 4,
3008
- /**
3009
- * 5: The network type is mobile 4G.
3010
- */
3011
- NetworkTypeMobile4g = 5
3012
- }
3013
- /**
3014
- * Setting mode of the view.
3015
- */
3016
- export declare enum VideoViewSetupMode {
3017
- /**
3018
- * 0: (Default) Replaces a view.
3019
- */
3020
- VideoViewSetupReplace = 0,
3021
- /**
3022
- * 1: Adds a view.
3023
- */
3024
- VideoViewSetupAdd = 1,
3025
- /**
3026
- * 2: Deletes a view.
3027
- */
3028
- VideoViewSetupRemove = 2
3029
- }
3030
- /**
3031
- * Attributes of video canvas object.
3032
- */
3033
- export declare class VideoCanvas {
3034
- /**
3035
- * Video display window.
3036
- */
3037
- view?: any;
3038
- /**
3039
- * The user ID.
3040
- */
3041
- uid?: number;
3042
- /**
3043
- * The rendering mode of the video. See RenderModeType .
3044
- */
3045
- renderMode?: RenderModeType;
3046
- /**
3047
- * The mirror mode of the view. See VideoMirrorModeType .For the mirror mode of the local video view: If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.For the remote user: The mirror mode is disabled by default.
3048
- */
3049
- mirrorMode?: VideoMirrorModeType;
3050
- /**
3051
- * @ignore
3052
- */
3053
- setupMode?: VideoViewSetupMode;
3054
- /**
3055
- * The type of the video frame, see VideoSourceType .
3056
- */
3057
- sourceType?: VideoSourceType;
3058
- /**
3059
- * The ID of the media player. You can get the Device ID by calling getMediaPlayerId .
3060
- */
3061
- mediaPlayerId?: number;
3062
- /**
3063
- * @ignore
3064
- */
3065
- cropArea?: Rectangle;
3066
- /**
3067
- * @ignore
3068
- */
3069
- enableAlphaMask?: boolean;
3070
- }
3071
- /**
3072
- * The contrast level.
3073
- */
3074
- export declare enum LighteningContrastLevel {
3075
- /**
3076
- * @ignore
3077
- */
3078
- LighteningContrastLow = 0,
3079
- /**
3080
- * 1: (Default) Normal contrast level.
3081
- */
3082
- LighteningContrastNormal = 1,
3083
- /**
3084
- * 2: High contrast level.
3085
- */
3086
- LighteningContrastHigh = 2
3087
- }
3088
- /**
3089
- * Image enhancement options.
3090
- */
3091
- export declare class BeautyOptions {
3092
- /**
3093
- * The contrast level, used with the lighteningLevel parameter. The larger the value, the greater the contrast between light and dark.
3094
- */
3095
- lighteningContrastLevel?: LighteningContrastLevel;
3096
- /**
3097
- * The brightening level, in the range [0.0,1.0], where 0.0 means the original brightening. The default value is
3098
- */
3099
- lighteningLevel?: number;
3100
- /**
3101
- * The smoothness level, in the range [0.0,1.0], where 0.0 means the original smoothness. The default value is
3102
- */
3103
- smoothnessLevel?: number;
3104
- /**
3105
- * The redness level, in the range [0.0,1.0], where 0.0 means the original redness. The default value is
3106
- */
3107
- rednessLevel?: number;
3108
- /**
3109
- * The sharpness level, in the range [0.0,1.0], where 0.0 means the original sharpness. The default value is
3110
- */
3111
- sharpnessLevel?: number;
3112
- }
3113
- /**
3114
- * The low-light enhancement mode.
3115
- */
3116
- export declare enum LowLightEnhanceMode {
3117
- /**
3118
- * 0: (Default) Automatic mode. The SDK automatically enables or disables the low-light enhancement feature according to the ambient light to compensate for the lighting level or prevent overexposure, as necessary.
3119
- */
3120
- LowLightEnhanceAuto = 0,
3121
- /**
3122
- * 1: Manual mode. Users need to enable or disable the low-light enhancement feature manually.
3123
- */
3124
- LowLightEnhanceManual = 1
3125
- }
3126
- /**
3127
- * The low-light enhancement level.
3128
- */
3129
- export declare enum LowLightEnhanceLevel {
3130
- /**
3131
- * 0: (Default) Promotes video quality during low-light enhancement. It processes the brightness, details, and noise of the video image. The performance consumption is moderate, the processing speed is moderate, and the overall video quality is optimal.
3132
- */
3133
- LowLightEnhanceLevelHighQuality = 0,
3134
- /**
3135
- * 1: Promotes performance during low-light enhancement. It processes the brightness and details of the video image. The processing speed is faster.
3136
- */
3137
- LowLightEnhanceLevelFast = 1
3138
- }
3139
- /**
3140
- * The low-light enhancement options.
3141
- */
3142
- export declare class LowlightEnhanceOptions {
3143
- /**
3144
- * The low-light enhancement mode. See LowLightEnhanceMode .
3145
- */
3146
- mode?: LowLightEnhanceMode;
3147
- /**
3148
- * The low-light enhancement level. See LowLightEnhanceLevel .
3149
- */
3150
- level?: LowLightEnhanceLevel;
3151
- }
3152
- /**
3153
- * Video noise reduction mode.
3154
- */
3155
- export declare enum VideoDenoiserMode {
3156
- /**
3157
- * 0: (Default) Automatic mode. The SDK automatically enables or disables the video noise reduction feature according to the ambient light.
3158
- */
3159
- VideoDenoiserAuto = 0,
3160
- /**
3161
- * 1: Manual mode. Users need to enable or disable the video noise reduction feature manually.
3162
- */
3163
- VideoDenoiserManual = 1
3164
- }
3165
- /**
3166
- * The video noise reduction level.
3167
- */
3168
- export declare enum VideoDenoiserLevel {
3169
- /**
3170
- * 0: (Default) Promotes video quality during video noise reduction. balances performance consumption and video noise reduction quality. The performance consumption is moderate, the video noise reduction speed is moderate, and the overall video quality is optimal.
3171
- */
3172
- VideoDenoiserLevelHighQuality = 0,
3173
- /**
3174
- * 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed.
3175
- */
3176
- VideoDenoiserLevelFast = 1,
3177
- /**
3178
- * 2: Enhanced video noise reduction. prioritizes video noise reduction quality over reducing performance consumption. The performance consumption is higher, the video noise reduction speed is slower, and the video noise reduction quality is better. If VideoDenoiserLevelHighQuality is not enough for your video noise reduction needs, you can use this enumerator.
3179
- */
3180
- VideoDenoiserLevelStrength = 2
3181
- }
3182
- /**
3183
- * Video noise reduction options.
3184
- */
3185
- export declare class VideoDenoiserOptions {
3186
- /**
3187
- * Video noise reduction mode.
3188
- */
3189
- mode?: VideoDenoiserMode;
3190
- /**
3191
- * Video noise reduction level.
3192
- */
3193
- level?: VideoDenoiserLevel;
3194
- }
3195
- /**
3196
- * The color enhancement options.
3197
- */
3198
- export declare class ColorEnhanceOptions {
3199
- /**
3200
- * The level of color enhancement. The value range is [0.0, 1.0]. 0.0 is the default value, which means no color enhancement is applied to the video. The higher the value, the higher the level of color enhancement. The default value is 0.5.
3201
- */
3202
- strengthLevel?: number;
3203
- /**
3204
- * The level of skin tone protection. The value range is [0.0, 1.0]. 0.0 means no skin tone protection. The higher the value, the higher the level of skin tone protection. The default value is 1.0.When the level of color enhancement is higher, the portrait skin tone can be significantly distorted, so you need to set the level of skin tone protection.When the level of skin tone protection is higher, the color enhancement effect can be slightly reduced.Therefore, to get the best color enhancement effect, Agora recommends that you adjust strengthLevel and skinProtectLevel to get the most appropriate values.
3205
- */
3206
- skinProtectLevel?: number;
3207
- }
3208
- /**
3209
- * The type of the custom background image.
3210
- */
3211
- export declare enum BackgroundSourceType {
3212
- /**
3213
- * @ignore
3214
- */
3215
- BackgroundNone = 0,
3216
- /**
3217
- * 1: (Default) The background image is a solid color.
3218
- */
3219
- BackgroundColor = 1,
3220
- /**
3221
- * The background image is a file in PNG or JPG format.
3222
- */
3223
- BackgroundImg = 2,
3224
- /**
3225
- * The background image is the blurred background.
3226
- */
3227
- BackgroundBlur = 3,
3228
- /**
3229
- * @ignore
3230
- */
3231
- BackgroundVideo = 4
3232
- }
3233
- /**
3234
- * The degree of blurring applied to the custom background image.
3235
- */
3236
- export declare enum BackgroundBlurDegree {
3237
- /**
3238
- * 1: The degree of blurring applied to the custom background image is low. The user can almost see the background clearly.
3239
- */
3240
- BlurDegreeLow = 1,
3241
- /**
3242
- * The degree of blurring applied to the custom background image is medium. It is difficult for the user to recognize details in the background.
3243
- */
3244
- BlurDegreeMedium = 2,
3245
- /**
3246
- * (Default) The degree of blurring applied to the custom background image is high. The user can barely see any distinguishing features in the background.
3247
- */
3248
- BlurDegreeHigh = 3
3249
- }
3250
- /**
3251
- * The custom background image.
3252
- */
3253
- export declare class VirtualBackgroundSource {
3254
- /**
3255
- * @ignore
3256
- */
3257
- background_source_type?: BackgroundSourceType;
3258
- /**
3259
- * The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image.This parameter takes effect only when the type of the custom background image is BackgroundColor.
3260
- */
3261
- color?: number;
3262
- /**
3263
- * The local absolute path of the custom background image. PNG and JPG formats are supported. If the path is invalid, the SDK replaces the original background image with a white background image.This parameter takes effect only when the type of the custom background image is BackgroundImg.
3264
- */
3265
- source?: string;
3266
- /**
3267
- * The degree of blurring applied to the custom background image. This parameter takes effect only when the type of the custom background image is BackgroundBlur.
3268
- */
3269
- blur_degree?: BackgroundBlurDegree;
3270
- }
3271
- /**
3272
- * The type of algorithms to user for background processing.
3273
- */
3274
- export declare enum SegModelType {
3275
- /**
3276
- * 1: (Default) Use the algorithm suitable for all scenarios.
3277
- */
3278
- SegModelAi = 1,
3279
- /**
3280
- * 2: Use the algorithm designed specifically for scenarios with a green screen background.
3281
- */
3282
- SegModelGreen = 2
3283
- }
3284
- /**
3285
- * Processing properties for background images.
3286
- */
3287
- export declare class SegmentationProperty {
3288
- /**
3289
- * The type of algorithms to user for background processing. See SegModelType .
3290
- */
3291
- modelType?: SegModelType;
3292
- /**
3293
- * The range of accuracy for identifying green colors (different shades of green) in the view. The value range is [0,1], and the default value is 0.5. The larger the value, the wider the range of identifiable shades of green. When the value of this parameter is too large, the edge of the portrait and the green color in the portrait range are also detected. Agora recommends that you dynamically adjust the value of this parameter according to the actual effect.This parameter only takes effect when modelType is set to SegModelGreen.
3294
- */
3295
- greenCapacity?: number;
3296
- }
3297
- /**
3298
- * @ignore
3299
- */
3300
- export declare enum AudioTrackType {
3301
- /**
3302
- * @ignore
3303
- */
3304
- AudioTrackInvalid = -1,
3305
- /**
3306
- * @ignore
3307
- */
3308
- AudioTrackMixable = 0,
3309
- /**
3310
- * @ignore
3311
- */
3312
- AudioTrackDirect = 1
3313
- }
3314
- /**
3315
- * @ignore
3316
- */
3317
- export declare class AudioTrackConfig {
3318
- /**
3319
- * @ignore
3320
- */
3321
- enableLocalPlayback?: boolean;
3322
- }
3323
- /**
3324
- * The options for SDK preset voice beautifier effects.
3325
- */
3326
- export declare enum VoiceBeautifierPreset {
3327
- /**
3328
- * Turn off voice beautifier effects and use the original voice.
3329
- */
3330
- VoiceBeautifierOff = 0,
3331
- /**
3332
- * A more magnetic voice.Agora recommends using this enumerator to process a male-sounding voice; otherwise, you may experience vocal distortion.
3333
- */
3334
- ChatBeautifierMagnetic = 16843008,
3335
- /**
3336
- * A fresher voice.Agora recommends using this enumerator to process a female-sounding voice; otherwise, you may experience vocal distortion.
3337
- */
3338
- ChatBeautifierFresh = 16843264,
3339
- /**
3340
- * A more vital voice.Agora recommends using this enumerator to process a female-sounding voice; otherwise, you may experience vocal distortion.
3341
- */
3342
- ChatBeautifierVitality = 16843520,
3343
- /**
3344
- * Singing beautifier effect.If you call setVoiceBeautifierPreset (SingingBeautifier), you can beautify a male-sounding voice and add a reverberation effect that sounds like singing in a small room. Agora recommends using this enumerator to process a male-sounding voice; otherwise, you might experience vocal distortion.If you call setVoiceBeautifierParameters (SingingBeautifier, param1, param2), you can beautify a male or female-sounding voice and add a reverberation effect.
3345
- */
3346
- SingingBeautifier = 16908544,
3347
- /**
3348
- * A more vigorous voice.
3349
- */
3350
- TimbreTransformationVigorous = 16974080,
3351
- /**
3352
- * A deep voice.
3353
- */
3354
- TimbreTransformationDeep = 16974336,
3355
- /**
3356
- * A mellower voice.
3357
- */
3358
- TimbreTransformationMellow = 16974592,
3359
- /**
3360
- * Falsetto.
3361
- */
3362
- TimbreTransformationFalsetto = 16974848,
3363
- /**
3364
- * A fuller voice.
3365
- */
3366
- TimbreTransformationFull = 16975104,
3367
- /**
3368
- * A clearer voice.
3369
- */
3370
- TimbreTransformationClear = 16975360,
3371
- /**
3372
- * A more resounding voice.
3373
- */
3374
- TimbreTransformationResounding = 16975616,
3375
- /**
3376
- * A more ringing voice.
3377
- */
3378
- TimbreTransformationRinging = 16975872,
3379
- /**
3380
- * A ultra-high quality voice, which makes the audio clearer and restores more details.To achieve better audio effect quality, Agora recommends that you set the profile of setAudioProfile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) and scenario to AudioScenarioGameStreaming(3) before calling setVoiceBeautifierPreset .If you have an audio capturing device that can already restore audio details to a high degree, Agora recommends that you do not enable ultra-high quality; otherwise, the SDK may over-restore audio details, and you may not hear the anticipated voice effect.
3381
- */
3382
- UltraHighQualityVoice = 17039616
3383
- }
3384
- /**
3385
- * Preset audio effects.
3386
- * To get better audio effects, Agora recommends calling setAudioProfile and setting the profile parameter as recommended below before using the preset audio effects.
3387
- */
3388
- export declare enum AudioEffectPreset {
3389
- /**
3390
- * Turn off voice effects, that is, use the original voice.
3391
- */
3392
- AudioEffectOff = 0,
3393
- /**
3394
- * The voice effect typical of a KTV venue.
3395
- */
3396
- RoomAcousticsKtv = 33620224,
3397
- /**
3398
- * The voice effect typical of a concert hall.
3399
- */
3400
- RoomAcousticsVocalConcert = 33620480,
3401
- /**
3402
- * The voice effect typical of a recording studio.
3403
- */
3404
- RoomAcousticsStudio = 33620736,
3405
- /**
3406
- * The voice effect typical of a vintage phonograph.
3407
- */
3408
- RoomAcousticsPhonograph = 33620992,
3409
- /**
3410
- * The virtual stereo effect, which renders monophonic audio as stereo audio.
3411
- */
3412
- RoomAcousticsVirtualStereo = 33621248,
3413
- /**
3414
- * A more spatial voice effect.
3415
- */
3416
- RoomAcousticsSpacial = 33621504,
3417
- /**
3418
- * A more ethereal voice effect.
3419
- */
3420
- RoomAcousticsEthereal = 33621760,
3421
- /**
3422
- * A 3D voice effect that makes the voice appear to be moving around the user. The default cycle period is 10 seconds. After setting this effect, you can call setAudioEffectParameters to modify the movement period.If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect.
3423
- */
3424
- RoomAcoustics3dVoice = 33622016,
3425
- /**
3426
- * Virtual surround sound, that is, the SDK generates a simulated surround sound field on the basis of stereo channels, thereby creating a surround sound effect.If the virtual surround sound is enabled, users need to use stereo audio playback devices to hear the anticipated audio effect.
3427
- */
3428
- RoomAcousticsVirtualSurroundSound = 33622272,
3429
- /**
3430
- * A middle-aged man's voice.Agora recommends using this preset to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
3431
- */
3432
- VoiceChangerEffectUncle = 33685760,
3433
- /**
3434
- * An older man's voice.Agora recommends using this preset to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
3435
- */
3436
- VoiceChangerEffectOldman = 33686016,
3437
- /**
3438
- * A boy's voice.Agora recommends using this preset to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
3439
- */
3440
- VoiceChangerEffectBoy = 33686272,
3441
- /**
3442
- * A young woman's voice.Agora recommends using this preset to process a female-sounding voice; otherwise, you may not hear the anticipated voice effect.
3443
- */
3444
- VoiceChangerEffectSister = 33686528,
3445
- /**
3446
- * A girl's voice.Agora recommends using this preset to process a female-sounding voice; otherwise, you may not hear the anticipated voice effect.
3447
- */
3448
- VoiceChangerEffectGirl = 33686784,
3449
- /**
3450
- * The voice of Pig King, a character in Journey to the West who has a voice like a growling bear.
3451
- */
3452
- VoiceChangerEffectPigking = 33687040,
3453
- /**
3454
- * The Hulk's voice.
3455
- */
3456
- VoiceChangerEffectHulk = 33687296,
3457
- /**
3458
- * The voice effect typical of R&B music.
3459
- */
3460
- StyleTransformationRnb = 33751296,
3461
- /**
3462
- * The voice effect typical of popular music.
3463
- */
3464
- StyleTransformationPopular = 33751552,
3465
- /**
3466
- * A pitch correction effect that corrects the user's pitch based on the pitch of the natural C major scale. After setting this voice effect, you can call setAudioEffectParameters to adjust the basic mode of tuning and the pitch of the main tone.
3467
- */
3468
- PitchCorrection = 33816832
3469
- }
3470
- /**
3471
- * The options for SDK preset voice conversion effects.
3472
- */
3473
- export declare enum VoiceConversionPreset {
3474
- /**
3475
- * Turn off voice conversion effects and use the original voice.
3476
- */
3477
- VoiceConversionOff = 0,
3478
- /**
3479
- * A gender-neutral voice. To avoid audio distortion, ensure that you use this enumerator to process a female-sounding voice.
3480
- */
3481
- VoiceChangerNeutral = 50397440,
3482
- /**
3483
- * A sweet voice. To avoid audio distortion, ensure that you use this enumerator to process a female-sounding voice.
3484
- */
3485
- VoiceChangerSweet = 50397696,
3486
- /**
3487
- * A steady voice. To avoid audio distortion, ensure that you use this enumerator to process a male-sounding voice.
3488
- */
3489
- VoiceChangerSolid = 50397952,
3490
- /**
3491
- * A deep voice. To avoid audio distortion, ensure that you use this enumerator to process a male-sounding voice.
3492
- */
3493
- VoiceChangerBass = 50398208,
3494
- /**
3495
- * @ignore
3496
- */
3497
- VoiceChangerCartoon = 50398464,
3498
- /**
3499
- * @ignore
3500
- */
3501
- VoiceChangerChildlike = 50398720,
3502
- /**
3503
- * @ignore
3504
- */
3505
- VoiceChangerPhoneOperator = 50398976,
3506
- /**
3507
- * @ignore
3508
- */
3509
- VoiceChangerMonster = 50399232,
3510
- /**
3511
- * @ignore
3512
- */
3513
- VoiceChangerTransformers = 50399488,
3514
- /**
3515
- * @ignore
3516
- */
3517
- VoiceChangerGroot = 50399744,
3518
- /**
3519
- * @ignore
3520
- */
3521
- VoiceChangerDarthVader = 50400000,
3522
- /**
3523
- * @ignore
3524
- */
3525
- VoiceChangerIronLady = 50400256,
3526
- /**
3527
- * @ignore
3528
- */
3529
- VoiceChangerShinChan = 50400512,
3530
- /**
3531
- * @ignore
3532
- */
3533
- VoiceChangerGirlishMan = 50400768,
3534
- /**
3535
- * @ignore
3536
- */
3537
- VoiceChangerChipmunk = 50401024
3538
- }
3539
- /**
3540
- * Preset headphone equalizer types.
3541
- */
3542
- export declare enum HeadphoneEqualizerPreset {
3543
- /**
3544
- * The headphone equalizer is disabled, and the original audio is heard.
3545
- */
3546
- HeadphoneEqualizerOff = 0,
3547
- /**
3548
- * An equalizer is used for headphones.
3549
- */
3550
- HeadphoneEqualizerOverear = 67108865,
3551
- /**
3552
- * An equalizer is used for in-ear headphones.
3553
- */
3554
- HeadphoneEqualizerInear = 67108866
3555
- }
3556
- /**
3557
- * Screen sharing configurations.
3558
- */
3559
- export declare class ScreenCaptureParameters {
3560
- /**
3561
- * On Windows and macOS, this represents the video encoding resolution of the shared screen stream. See VideoDimensions . The default value is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges.If the screen dimensions are different from the value of this parameter, Agora applies the following strategies for encoding. Suppose If the value of the screen dimensions is lower than that of dimensions, for example, 1000 × 1000 pixels, the SDK uses the screen dimensions, that is, 1000 × 1000 pixels, for encoding.If the value of the screen dimensions is higher than that of dimensions, for example, 2000 × 1500, the SDK uses the maximum value under
3562
- */
3563
- dimensions?: VideoDimensions;
3564
- /**
3565
- * On Windows and macOS, this represents the video encoding frame rate (fps) of the shared screen stream. The frame rate (fps) of the shared region. The default value is 5. Agora does not recommend setting this to a value greater than 15.
3566
- */
3567
- frameRate?: number;
3568
- /**
3569
- * On Windows and macOS, this represents the video encoding bitrate of the shared screen stream. The bitrate (Kbps) of the shared region. The default value is 0 (the SDK works out a bitrate according to the dimensions of the current screen).
3570
- */
3571
- bitrate?: number;
3572
- /**
3573
- * Whether to capture the mouse in screen sharing:true: (Default) Capture the mouse.false: Do not capture the mouse.
3574
- */
3575
- captureMouseCursor?: boolean;
3576
- /**
3577
- * Whether to bring the window to the front when calling the startScreenCaptureByWindowId method to share it:true: Bring the window to the front.false: (Default) Do not bring the window to the front.
3578
- */
3579
- windowFocus?: boolean;
3580
- /**
3581
- * The ID list of the windows to be blocked. When calling startScreenCaptureByDisplayId to start screen sharing, you can use this parameter to block a specified window. When calling updateScreenCaptureParameters to update screen sharing configurations, you can use this parameter to dynamically block a specified window.
3582
- */
3583
- excludeWindowList?: any[];
3584
- /**
3585
- * The number of windows to be excluded.On the Windows platform, the maximum value of this parameter is 24; if this value is exceeded, excluding the window fails.
3586
- */
3587
- excludeWindowCount?: number;
3588
- /**
3589
- * The width (px) of the border. The default value is 5, and the value range is (0, 50].This parameter only takes effect when highLighted is set to true.
3590
- */
3591
- highLightWidth?: number;
3592
- /**
3593
- * On macOS, COLOR_CLASS refers to NSColor.
3594
- */
3595
- highLightColor?: number;
3596
- /**
3597
- * Whether to place a border around the shared window or screen:true: Place a border.false: (Default) Do not place a border.When you share a part of a window or screen, the SDK places a border around the entire window or screen if you set this parameter to true.
3598
- */
3599
- enableHighLight?: boolean;
3600
- }
3601
- /**
3602
- * Recording quality.
3603
- */
3604
- export declare enum AudioRecordingQualityType {
3605
- /**
3606
- * 0: Low quality. The sample rate is 32 kHz, and the file size is around 1.2 MB after 10 minutes of recording.
3607
- */
3608
- AudioRecordingQualityLow = 0,
3609
- /**
3610
- * 1: Medium quality. The sample rate is 32 kHz, and the file size is around 2 MB after 10 minutes of recording.
3611
- */
3612
- AudioRecordingQualityMedium = 1,
3613
- /**
3614
- * 2: High quality. The sample rate is 32 kHz, and the file size is around 3.75 MB after 10 minutes of recording.
3615
- */
3616
- AudioRecordingQualityHigh = 2,
3617
- /**
3618
- * 3: Ultra high quality. The sample rate is 32 kHz, and the file size is around 7.5 MB after 10 minutes of recording.
3619
- */
3620
- AudioRecordingQualityUltraHigh = 3
3621
- }
3622
- /**
3623
- * Recording content. Set in startAudioRecording .
3624
- */
3625
- export declare enum AudioFileRecordingType {
3626
- /**
3627
- * 1: Only records the audio of the local user.
3628
- */
3629
- AudioFileRecordingMic = 1,
3630
- /**
3631
- * 2: Only records the audio of all remote users.
3632
- */
3633
- AudioFileRecordingPlayback = 2,
3634
- /**
3635
- * 3: Records the mixed audio of the local and all remote users.
3636
- */
3637
- AudioFileRecordingMixed = 3
3638
- }
3639
- /**
3640
- * Audio profile.
3641
- */
3642
- export declare enum AudioEncodedFrameObserverPosition {
3643
- /**
3644
- * 1: Only records the audio of the local user.
3645
- */
3646
- AudioEncodedFrameObserverPositionRecord = 1,
3647
- /**
3648
- * 2: Only records the audio of all remote users.
3649
- */
3650
- AudioEncodedFrameObserverPositionPlayback = 2,
3651
- /**
3652
- * 3: Records the mixed audio of the local and all remote users.
3653
- */
3654
- AudioEncodedFrameObserverPositionMixed = 3
3655
- }
3656
- /**
3657
- * Recording configurations.
3658
- */
3659
- export declare class AudioRecordingConfiguration {
3660
- /**
3661
- * The absolute path (including the filename extensions) of the recording file. For example: C:\music\audio.mp4.Ensure that the directory for the log files exists and is writable.
3662
- */
3663
- filePath?: string;
3664
- /**
3665
- * @ignore
3666
- */
3667
- encode?: boolean;
3668
- /**
3669
- * Recording sample rate (Hz).16000(Default) 320004410048000If you set this parameter to 44100 or 48000, Agora recommends recording WAV files, or AAC files with quality set as AudioRecordingQualityMedium or AudioRecordingQualityHigh for better recording quality.
3670
- */
3671
- sampleRate?: number;
3672
- /**
3673
- * The recording content. See AudioFileRecordingType .
3674
- */
3675
- fileRecordingType?: AudioFileRecordingType;
3676
- /**
3677
- * Recording quality. See AudioRecordingQualityType .Note: This parameter applies to AAC files only.
3678
- */
3679
- quality?: AudioRecordingQualityType;
3680
- /**
3681
- * The audio channel of recording: The parameter supports the following values:1: (Default) Mono.2: Stereo.The actual recorded audio channel is related to the audio channel that you capture.If the captured audio is mono and recordingChannel is 2, the recorded audio is the dual-channel data that is copied from mono data, not stereo.If the captured audio is dual channel and recordingChannel is 1, the recorded audio is the mono data that is mixed by dual-channel data.The integration scheme also affects the final recorded audio channel. If you need to record in stereo, contact .
3682
- */
3683
- recordingChannel?: number;
3684
- }
3685
- /**
3686
- * Observer settings for encoded audio.
3687
- */
3688
- export declare class AudioEncodedFrameObserverConfig {
3689
- /**
3690
- * Audio profile. See AudioEncodedFrameObserverPosition .
3691
- */
3692
- postionType?: AudioEncodedFrameObserverPosition;
3693
- /**
3694
- * Audio encoding type. See AudioEncodingType .
3695
- */
3696
- encodingType?: AudioEncodingType;
3697
- }
3698
- /**
3699
- * The encoded audio observer.
3700
- */
3701
- export interface IAudioEncodedFrameObserver {
3702
- /**
3703
- * Gets the encoded audio data of the local user.
3704
- * After calling registerAudioEncodedFrameObserver and setting the encoded audio as AudioEncodedFrameObserverPositionRecord, you can get the encoded audio data of the local user from this callback.
3705
- *
3706
- * @param channels The number of channels.1: Mono.2: Stereo. If the channel uses stereo, the data is interleaved.
3707
- * @param frameBuffer The audio buffer.
3708
- * @param length The data length (byte).
3709
- * @param audioEncodedFrameInfo Audio information after encoding. See EncodedAudioFrameInfo .
3710
- */
3711
- onRecordAudioEncodedFrame?(frameBuffer: Uint8Array, length: number, audioEncodedFrameInfo: EncodedAudioFrameInfo): void;
3712
- /**
3713
- * Gets the encoded audio data of all remote users.
3714
- * After calling registerAudioEncodedFrameObserver and setting the encoded audio as AudioEncodedFrameObserverPositionPlayback, you can get encoded audio data of all remote users through this callback.
3715
- *
3716
- * @param samplesPerSec Recording sample rate (Hz).
3717
- * @param channels The number of channels.
3718
- * 1: Mono.
3719
- * 2: Stereo. If the channel uses stereo, the data is interleaved.
3720
- * @param samplesPerChannel The number of samples per channel in the audio frame.
3721
- * @param frameBuffer The audio buffer.
3722
- * @param length The data length (byte).
3723
- * @param audioEncodedFrameInfo Audio information after encoding. See EncodedAudioFrameInfo .
3724
- */
3725
- onPlaybackAudioEncodedFrame?(frameBuffer: Uint8Array, length: number, audioEncodedFrameInfo: EncodedAudioFrameInfo): void;
3726
- /**
3727
- * Gets the mixed and encoded audio data of the local and all remote users.
3728
- * After calling registerAudioEncodedFrameObserver and setting the audio profile as AudioEncodedFrameObserverPositionMixed, you can get the mixed and encoded audio data of the local and all remote users through this callback.
3729
- *
3730
- * @param samplesPerSec Recording sample rate (Hz).
3731
- * @param channels The number of channels.1: Mono.2: Stereo. If the channel uses stereo, the data is interleaved.
3732
- * @param samplesPerChannel The number of samples per channel in the audio frame.
3733
- * @param frameBuffer The audio buffer.
3734
- * @param length The data length (byte).
3735
- * @param audioEncodedFrameInfo Audio information after encoding. See EncodedAudioFrameInfo .
3736
- */
3737
- onMixedAudioEncodedFrame?(frameBuffer: Uint8Array, length: number, audioEncodedFrameInfo: EncodedAudioFrameInfo): void;
3738
- }
3739
- /**
3740
- * The region for connection, which is the region where the server the SDK connects to is located.
3741
- */
3742
- export declare enum AreaCode {
3743
- /**
3744
- * Mainland China.
3745
- */
3746
- AreaCodeCn = 1,
3747
- /**
3748
- * North America.
3749
- */
3750
- AreaCodeNa = 2,
3751
- /**
3752
- * Europe.
3753
- */
3754
- AreaCodeEu = 4,
3755
- /**
3756
- * Asia, excluding Mainland China.
3757
- */
3758
- AreaCodeAs = 8,
3759
- /**
3760
- * Japan.
3761
- */
3762
- AreaCodeJp = 16,
3763
- /**
3764
- * India.
3765
- */
3766
- AreaCodeIn = 32,
3767
- /**
3768
- * Global.
3769
- */
3770
- AreaCodeGlob = 4294967295
3771
- }
3772
- /**
3773
- * @ignore
3774
- */
3775
- export declare enum AreaCodeEx {
3776
- /**
3777
- * @ignore
3778
- */
3779
- AreaCodeOc = 64,
3780
- /**
3781
- * @ignore
3782
- */
3783
- AreaCodeSa = 128,
3784
- /**
3785
- * @ignore
3786
- */
3787
- AreaCodeAf = 256,
3788
- /**
3789
- * @ignore
3790
- */
3791
- AreaCodeKr = 512,
3792
- /**
3793
- * @ignore
3794
- */
3795
- AreaCodeHkmc = 1024,
3796
- /**
3797
- * @ignore
3798
- */
3799
- AreaCodeUs = 2048,
3800
- /**
3801
- * @ignore
3802
- */
3803
- AreaCodeOvs = 4294967294
3804
- }
3805
- /**
3806
- * The error code of the channel media relay.
3807
- */
3808
- export declare enum ChannelMediaRelayError {
3809
- /**
3810
- * 0: No error.
3811
- */
3812
- RelayOk = 0,
3813
- /**
3814
- * 1: An error occurs in the server response.
3815
- */
3816
- RelayErrorServerErrorResponse = 1,
3817
- /**
3818
- * 2: No server response.You can call leaveChannel to leave the channel.This error can also occur if your project has not enabled co-host token authentication. You can to enable the service for cohosting across channels before starting a channel media relay.
3819
- */
3820
- RelayErrorServerNoResponse = 2,
3821
- /**
3822
- * 3: The SDK fails to access the service, probably due to limited resources of the server.
3823
- */
3824
- RelayErrorNoResourceAvailable = 3,
3825
- /**
3826
- * 4: Fails to send the relay request.
3827
- */
3828
- RelayErrorFailedJoinSrc = 4,
3829
- /**
3830
- * 5: Fails to accept the relay request.
3831
- */
3832
- RelayErrorFailedJoinDest = 5,
3833
- /**
3834
- * 6: The server fails to receive the media stream.
3835
- */
3836
- RelayErrorFailedPacketReceivedFromSrc = 6,
3837
- /**
3838
- * 7: The server fails to send the media stream.
3839
- */
3840
- RelayErrorFailedPacketSentToDest = 7,
3841
- /**
3842
- * 8: The SDK disconnects from the server due to poor network connections. You can call leaveChannel to leave the channel.
3843
- */
3844
- RelayErrorServerConnectionLost = 8,
3845
- /**
3846
- * 9: An internal error occurs in the server.
3847
- */
3848
- RelayErrorInternalError = 9,
3849
- /**
3850
- * 10: The token of the source channel has expired.
3851
- */
3852
- RelayErrorSrcTokenExpired = 10,
3853
- /**
3854
- * 11: The token of the destination channel has expired.
3855
- */
3856
- RelayErrorDestTokenExpired = 11
3857
- }
3858
- /**
3859
- * The event code of channel media relay.
3860
- */
3861
- export declare enum ChannelMediaRelayEvent {
3862
- /**
3863
- * 0: The user disconnects from the server due to a poor network connection.
3864
- */
3865
- RelayEventNetworkDisconnected = 0,
3866
- /**
3867
- * 1: The user is connected to the server.
3868
- */
3869
- RelayEventNetworkConnected = 1,
3870
- /**
3871
- * 2: The user joins the source channel.
3872
- */
3873
- RelayEventPacketJoinedSrcChannel = 2,
3874
- /**
3875
- * 3: The user joins the target channel.
3876
- */
3877
- RelayEventPacketJoinedDestChannel = 3,
3878
- /**
3879
- * 4: The SDK starts relaying the media stream to the target channel.
3880
- */
3881
- RelayEventPacketSentToDestChannel = 4,
3882
- /**
3883
- * 5: The server receives the audio stream from the source channel.
3884
- */
3885
- RelayEventPacketReceivedVideoFromSrc = 5,
3886
- /**
3887
- * 6: The server receives the audio stream from the source channel.
3888
- */
3889
- RelayEventPacketReceivedAudioFromSrc = 6,
3890
- /**
3891
- * 7: The target channel is updated.
3892
- */
3893
- RelayEventPacketUpdateDestChannel = 7,
3894
- /**
3895
- * @ignore
3896
- */
3897
- RelayEventPacketUpdateDestChannelRefused = 8,
3898
- /**
3899
- * 9: The target channel does not change, which means that the target channel fails to be updated.
3900
- */
3901
- RelayEventPacketUpdateDestChannelNotChange = 9,
3902
- /**
3903
- * 10: The target channel name is NULL.
3904
- */
3905
- RelayEventPacketUpdateDestChannelIsNull = 10,
3906
- /**
3907
- * 11: The video profile is sent to the server.
3908
- */
3909
- RelayEventVideoProfileUpdate = 11,
3910
- /**
3911
- * 12: The SDK successfully pauses relaying the media stream to target channels.
3912
- */
3913
- RelayEventPauseSendPacketToDestChannelSuccess = 12,
3914
- /**
3915
- * 13: The SDK fails to pause relaying the media stream to target channels.
3916
- */
3917
- RelayEventPauseSendPacketToDestChannelFailed = 13,
3918
- /**
3919
- * 14: The SDK successfully resumes relaying the media stream to target channels.
3920
- */
3921
- RelayEventResumeSendPacketToDestChannelSuccess = 14,
3922
- /**
3923
- * 15: The SDK fails to resume relaying the media stream to target channels.
3924
- */
3925
- RelayEventResumeSendPacketToDestChannelFailed = 15
3926
- }
3927
- /**
3928
- * The state code of the channel media relay.
3929
- */
3930
- export declare enum ChannelMediaRelayState {
3931
- /**
3932
- * 0: The initial state. After you successfully stop the channel media relay by calling stopChannelMediaRelay , the onChannelMediaRelayStateChanged callback returns this state.
3933
- */
3934
- RelayStateIdle = 0,
3935
- /**
3936
- * 1: The SDK tries to relay the media stream to the destination channel.
3937
- */
3938
- RelayStateConnecting = 1,
3939
- /**
3940
- * 2: The SDK successfully relays the media stream to the destination channel.
3941
- */
3942
- RelayStateRunning = 2,
3943
- /**
3944
- * 3: An error occurs. See code in onChannelMediaRelayStateChanged for the error code.
3945
- */
3946
- RelayStateFailure = 3
3947
- }
3948
- /**
3949
- * Channel media information.
3950
- */
3951
- export declare class ChannelMediaInfo {
3952
- /**
3953
- * The channel name.
3954
- */
3955
- channelName?: string;
3956
- /**
3957
- * The token that enables the user to join the channel.
3958
- */
3959
- token?: string;
3960
- /**
3961
- * The user ID.
3962
- */
3963
- uid?: number;
3964
- }
3965
- /**
3966
- * Configuration of cross channel media relay.
3967
- */
3968
- export declare class ChannelMediaRelayConfiguration {
3969
- /**
3970
- * @ignore
3971
- */
3972
- srcInfo?: ChannelMediaInfo;
3973
- /**
3974
- * @ignore
3975
- */
3976
- destInfos?: ChannelMediaInfo[];
3977
- /**
3978
- * @ignore
3979
- */
3980
- destCount?: number;
3981
- }
3982
- /**
3983
- * The uplink network information.
3984
- */
3985
- export declare class UplinkNetworkInfo {
3986
- /**
3987
- * The target video encoder bitrate (bps).
3988
- */
3989
- video_encoder_target_bitrate_bps?: number;
3990
- }
3991
- /**
3992
- * @ignore
3993
- */
3994
- export declare class PeerDownlinkInfo {
3995
- /**
3996
- * @ignore
3997
- */
3998
- uid?: string;
3999
- /**
4000
- * @ignore
4001
- */
4002
- stream_type?: VideoStreamType;
4003
- /**
4004
- * @ignore
4005
- */
4006
- current_downscale_level?: RemoteVideoDownscaleLevel;
4007
- /**
4008
- * @ignore
4009
- */
4010
- expected_bitrate_bps?: number;
4011
- }
4012
- /**
4013
- * @ignore
4014
- */
4015
- export declare class DownlinkNetworkInfo {
4016
- /**
4017
- * @ignore
4018
- */
4019
- lastmile_buffer_delay_time_ms?: number;
4020
- /**
4021
- * @ignore
4022
- */
4023
- bandwidth_estimation_bps?: number;
4024
- /**
4025
- * @ignore
4026
- */
4027
- total_downscale_level_count?: number;
4028
- /**
4029
- * @ignore
4030
- */
4031
- peer_downlink_info?: PeerDownlinkInfo[];
4032
- /**
4033
- * @ignore
4034
- */
4035
- total_received_video_count?: number;
4036
- }
4037
- /**
4038
- * The built-in encryption mode.
4039
- * Agora recommends using Aes128Gcm2 or Aes256Gcm2 encrypted mode. These two modes support the use of salt for higher security.
4040
- */
4041
- export declare enum EncryptionMode {
4042
- /**
4043
- * 1: 128-bit AES encryption, XTS mode.
4044
- */
4045
- Aes128Xts = 1,
4046
- /**
4047
- * 2: 128-bit AES encryption, ECB mode.
4048
- */
4049
- Aes128Ecb = 2,
4050
- /**
4051
- * 3: 256-bit AES encryption, XTS mode.
4052
- */
4053
- Aes256Xts = 3,
4054
- /**
4055
- * 4: 128-bit SM4 encryption, ECB mode.
4056
- */
4057
- Sm4128Ecb = 4,
4058
- /**
4059
- * 5: 128-bit AES encryption, GCM mode.
4060
- */
4061
- Aes128Gcm = 5,
4062
- /**
4063
- * 6: 256-bit AES encryption, GCM mode.
4064
- */
4065
- Aes256Gcm = 6,
4066
- /**
4067
- * 7: (Default) 128-bit AES encryption, GCM mode. This encryption mode requires the setting of salt (encryptionKdfSalt).
4068
- */
4069
- Aes128Gcm2 = 7,
4070
- /**
4071
- * 8: 256-bit AES encryption, GCM mode. This encryption mode requires the setting of salt (encryptionKdfSalt).
4072
- */
4073
- Aes256Gcm2 = 8,
4074
- /**
4075
- * Enumerator boundary.
4076
- */
4077
- ModeEnd = 9
4078
- }
4079
- /**
4080
- * Built-in encryption configurations.
4081
- */
4082
- export declare class EncryptionConfig {
4083
- /**
4084
- * The built-in encryption mode. See EncryptionMode . Agora recommends using Aes128Gcm2 or Aes256Gcm2 encrypted mode. These two modes support the use of salt for higher security.
4085
- */
4086
- encryptionMode?: EncryptionMode;
4087
- /**
4088
- * Encryption key in string type with unlimited length. Agora recommends using a 32-byte key.If you do not set an encryption key or set it as NULL, you cannot use the built-in encryption, and the SDK returns -2.
4089
- */
4090
- encryptionKey?: string;
4091
- /**
4092
- * Salt, 32 bytes in length. Agora recommends that you use OpenSSL to generate salt on the server side. See Media Stream Encryption for details. This parameter takes effect only in Aes128Gcm2 or Aes256Gcm2 encrypted mode. In this case, ensure that this parameter is not 0.
4093
- */
4094
- encryptionKdfSalt?: number[];
4095
- }
4096
- /**
4097
- * Encryption error type.
4098
- */
4099
- export declare enum EncryptionErrorType {
4100
- /**
4101
- * 0: Internal reason.
4102
- */
4103
- EncryptionErrorInternalFailure = 0,
4104
- /**
4105
- * 1: Decryption errors. Ensure that the receiver and the sender use the same encryption mode and key.
4106
- */
4107
- EncryptionErrorDecryptionFailure = 1,
4108
- /**
4109
- * 2: Encryption errors.
4110
- */
4111
- EncryptionErrorEncryptionFailure = 2
4112
- }
4113
- /**
4114
- * @ignore
4115
- */
4116
- export declare enum UploadErrorReason {
4117
- /**
4118
- * @ignore
4119
- */
4120
- UploadSuccess = 0,
4121
- /**
4122
- * @ignore
4123
- */
4124
- UploadNetError = 1,
4125
- /**
4126
- * @ignore
4127
- */
4128
- UploadServerError = 2
4129
- }
4130
- /**
4131
- * The type of the device permission.
4132
- */
4133
- export declare enum PermissionType {
4134
- /**
4135
- * 0: Permission for the audio capture device.
4136
- */
4137
- RecordAudio = 0,
4138
- /**
4139
- * 1: Permission for the camera.
4140
- */
4141
- Camera = 1,
4142
- /**
4143
- * @ignore
4144
- */
4145
- ScreenCapture = 2
4146
- }
4147
- /**
4148
- * The maximum length of the user account.
4149
- */
4150
- export declare enum MaxUserAccountLengthType {
4151
- /**
4152
- * The maximum length of the user account is 256 bytes.
4153
- */
4154
- MaxUserAccountLength = 256
4155
- }
4156
- /**
4157
- * The subscribing state.
4158
- */
4159
- export declare enum StreamSubscribeState {
4160
- /**
4161
- * 0: The initial publishing state after joining the channel.
4162
- */
4163
- SubStateIdle = 0,
4164
- /**
4165
- * 1: Fails to subscribe to the remote stream. Possible reasons:The remote user:Calls muteLocalAudioStream (true) or muteLocalVideoStream (true) to stop sending local media stream.Calls disableAudio or disableVideo to disable the local audio or video module.Calls enableLocalAudio (false) or enableLocalVideo (false) to disable local audio or video capture.The role of the remote user is audience.The local user calls the following methods to stop receiving remote streams:Call muteRemoteAudioStream (true) or muteAllRemoteAudioStreams (true) to stop receiving the remote audio stream.Call muteRemoteVideoStream (true) or muteAllRemoteVideoStreams (true) to stop receiving the remote video stream.
4166
- */
4167
- SubStateNoSubscribed = 1,
4168
- /**
4169
- * 2: Subscribing.
4170
- */
4171
- SubStateSubscribing = 2,
4172
- /**
4173
- * 3: The remote stream is received, and the subscription is successful.
4174
- */
4175
- SubStateSubscribed = 3
4176
- }
4177
- /**
4178
- * The publishing state.
4179
- */
4180
- export declare enum StreamPublishState {
4181
- /**
4182
- * 0: The initial publishing state after joining the channel.
4183
- */
4184
- PubStateIdle = 0,
4185
- /**
4186
- * 1: Fails to publish the local stream. Possible reasons:The local user calls muteLocalAudioStream (true) or muteLocalVideoStream (true) to stop sending local media streams.The local user calls disableAudio or disableVideo to disable the local audio or video module.The local user calls enableLocalAudio (false) or enableLocalVideo (false) to disable the local audio or video capture.The role of the local user is audience.
4187
- */
4188
- PubStateNoPublished = 1,
4189
- /**
4190
- * 2: Publishing.
4191
- */
4192
- PubStatePublishing = 2,
4193
- /**
4194
- * 3: Publishes successfully.
4195
- */
4196
- PubStatePublished = 3
4197
- }
4198
- /**
4199
- * The configuration of the audio and video call loop test.
4200
- */
4201
- export declare class EchoTestConfiguration {
4202
- /**
4203
- * The view used to render the local user's video. This parameter is only applicable to scenarios testing video devices, that is, when enableVideo is true.
4204
- */
4205
- view?: any;
4206
- /**
4207
- * Whether to enable the audio device for the loop test:true: (Default) Enable the audio device. To test the audio device, set this parameter as true.false: Disable the audio device.
4208
- */
4209
- enableAudio?: boolean;
4210
- /**
4211
- * Whether to enable the video device for the loop test:true: (Default) Enable the video device. To test the video device, set this parameter as true.false: Disable the video device.
4212
- */
4213
- enableVideo?: boolean;
4214
- /**
4215
- * @ignore
4216
- */
4217
- token?: string;
4218
- /**
4219
- * The channel name that identifies each audio and video call loop. To ensure proper loop test functionality, the channel name passed in to identify each loop test cannot be the same when users of the same project (App ID) perform audio and video call loop tests on different devices.
4220
- */
4221
- channelId?: string;
4222
- /**
4223
- * @ignore
4224
- */
4225
- intervalInSeconds?: number;
4226
- }
4227
- /**
4228
- * The information of the user.
4229
- */
4230
- export declare class UserInfo {
4231
- /**
4232
- * The user ID.
4233
- */
4234
- uid?: number;
4235
- /**
4236
- * User account. The maximum data length is MaxUserAccountLengthType .
4237
- */
4238
- userAccount?: string;
4239
- }
4240
- /**
4241
- * The audio filter of in-ear monitoring.
4242
- */
4243
- export declare enum EarMonitoringFilterType {
4244
- /**
4245
- * 1<<0: Do not add an audio filter to the in-ear monitor.
4246
- */
4247
- EarMonitoringFilterNone = 1,
4248
- /**
4249
- * 1<<1: Add an audio filter to the in-ear monitor. If you implement functions such as voice beautifier and audio effect, users can hear the voice after adding these effects.
4250
- */
4251
- EarMonitoringFilterBuiltInAudioFilters = 2,
4252
- /**
4253
- * 1<<2: Enable noise suppression to the in-ear monitor.
4254
- */
4255
- EarMonitoringFilterNoiseSuppression = 4
4256
- }
4257
- /**
4258
- * @ignore
4259
- */
4260
- export declare enum ThreadPriorityType {
4261
- /**
4262
- * @ignore
4263
- */
4264
- Lowest = 0,
4265
- /**
4266
- * @ignore
4267
- */
4268
- Low = 1,
4269
- /**
4270
- * @ignore
4271
- */
4272
- Normal = 2,
4273
- /**
4274
- * @ignore
4275
- */
4276
- High = 3,
4277
- /**
4278
- * @ignore
4279
- */
4280
- Highest = 4,
4281
- /**
4282
- * @ignore
4283
- */
4284
- Critical = 5
4285
- }
4286
- /**
4287
- * The video configuration for the shared screen stream.
4288
- */
4289
- export declare class ScreenVideoParameters {
4290
- /**
4291
- * The video encoding dimension. The default value is 1280 × 720.
4292
- */
4293
- dimensions?: VideoDimensions;
4294
- /**
4295
- * The video encoding frame rate (fps). The default value is 15.
4296
- */
4297
- frameRate?: number;
4298
- /**
4299
- * The video encoding bitrate (Kbps).
4300
- */
4301
- bitrate?: number;
4302
- /**
4303
- * The content hint for screen sharing.
4304
- */
4305
- contentHint?: VideoContentHint;
4306
- }
4307
- /**
4308
- * The audio configuration for the shared screen stream.
4309
- * Only available where captureAudio is true.
4310
- */
4311
- export declare class ScreenAudioParameters {
4312
- /**
4313
- * Audio sample rate (Hz). The default value is 16000.
4314
- */
4315
- sampleRate?: number;
4316
- /**
4317
- * The number of audio channels. The default value is 2, which means stereo.
4318
- */
4319
- channels?: number;
4320
- /**
4321
- * The volume of the captured system audio. The value range is [0, 100]. The default value is 100.
4322
- */
4323
- captureSignalVolume?: number;
4324
- }
4325
- /**
4326
- * @ignore
4327
- */
4328
- export declare class ScreenCaptureParameters2 {
4329
- /**
4330
- * @ignore
4331
- */
4332
- captureAudio?: boolean;
4333
- /**
4334
- * @ignore
4335
- */
4336
- audioParams?: ScreenAudioParameters;
4337
- /**
4338
- * @ignore
4339
- */
4340
- captureVideo?: boolean;
4341
- /**
4342
- * @ignore
4343
- */
4344
- videoParams?: ScreenVideoParameters;
4345
- }
4346
- /**
4347
- * @ignore
4348
- */
4349
- export declare enum MediaTraceEvent {
4350
- /**
4351
- * @ignore
4352
- */
4353
- MediaTraceEventVideoRendered = 0,
4354
- /**
4355
- * @ignore
4356
- */
4357
- MediaTraceEventVideoDecoded = 1
4358
- }
4359
- /**
4360
- * @ignore
4361
- */
4362
- export declare class VideoRenderingTracingInfo {
4363
- /**
4364
- * @ignore
4365
- */
4366
- elapsedTime?: number;
4367
- /**
4368
- * @ignore
4369
- */
4370
- start2JoinChannel?: number;
4371
- /**
4372
- * @ignore
4373
- */
4374
- join2JoinSuccess?: number;
4375
- /**
4376
- * @ignore
4377
- */
4378
- joinSuccess2RemoteJoined?: number;
4379
- /**
4380
- * @ignore
4381
- */
4382
- remoteJoined2SetView?: number;
4383
- /**
4384
- * @ignore
4385
- */
4386
- remoteJoined2UnmuteVideo?: number;
4387
- /**
4388
- * @ignore
4389
- */
4390
- remoteJoined2PacketReceived?: number;
4391
- }
4392
- /**
4393
- * @ignore
4394
- */
4395
- export declare enum ConfigFetchType {
4396
- /**
4397
- * @ignore
4398
- */
4399
- ConfigFetchTypeInitialize = 1,
4400
- /**
4401
- * @ignore
4402
- */
4403
- ConfigFetchTypeJoinChannel = 2
4404
- }
4405
- /**
4406
- * The spatial audio parameters.
4407
- */
4408
- export declare class SpatialAudioParams {
4409
- /**
4410
- * The azimuth angle of the remote user or media player relative to the local user. The value range is [0,360], and the unit is degrees, The values are as follows:0: (Default) 0 degrees, which means directly in front on the horizontal plane.90: 90 degrees, which means directly to the left on the horizontal plane.180: 180 degrees, which means directly behind on the horizontal plane.270: 270 degrees, which means directly to the right on the horizontal plane.360: 360 degrees, which means directly in front on the horizontal plane.
4411
- */
4412
- speaker_azimuth?: number;
4413
- /**
4414
- * The elevation angle of the remote user or media player relative to the local user. The value range is [-90,90], and the unit is degrees, The values are as follows:0: (Default) 0 degrees, which means that the horizontal plane is not rotated.-90: -90 degrees, which means that the horizontal plane is rotated 90 degrees downwards.90: 90 degrees, which means that the horizontal plane is rotated 90 degrees upwards.
4415
- */
4416
- speaker_elevation?: number;
4417
- /**
4418
- * The distance of the remote user or media player relative to the local user. The value range is [1,50], and the unit is meters. The default value is 1 meter.
4419
- */
4420
- speaker_distance?: number;
4421
- /**
4422
- * The orientation of the remote user or media player relative to the local user. The value range is [0,180], and the unit is degrees, The values are as follows:0: (Default) 0 degrees, which means that the sound source and listener face the same direction.180: 180 degrees, which means that the sound source and listener face each other.
4423
- */
4424
- speaker_orientation?: number;
4425
- /**
4426
- * Whether to enable audio blurring:true: Enable audio blurring.false: (Default) Disable audio blurring.
4427
- */
4428
- enable_blur?: boolean;
4429
- /**
4430
- * Whether to enable air absorption, that is, to simulate the sound attenuation effect of sound transmitting in the air; under a certain transmission distance, the attenuation speed of high-frequency sound is fast, and the attenuation speed of low-frequency sound is slow.true: (Default) Enable air absorption. Make sure that the value of speaker_attenuation is not 0; otherwise, this setting does not take effect.false: Disable air absorption.
4431
- */
4432
- enable_air_absorb?: boolean;
4433
- /**
4434
- * The sound attenuation coefficient of the remote user or media player. The value range is [0,1]. The values are as follows:0: Broadcast mode, where the volume and timbre are not attenuated with distance, and the volume and timbre heard by local users do not change regardless of distance.(0,0.5): Weak attenuation mode, where the volume and timbre only have a weak attenuation during the propagation, and the sound can travel farther than that in a real environment. enable_air_absorb needs to be enabled at the same time. 0.5: (Default) Simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the speaker_attenuation parameter.(0.5,1]: Strong attenuation mode, where volume and timbre attenuate rapidly during the propagation. enable_air_absorb needs to be enabled at the same time.
4435
- */
4436
- speaker_attenuation?: number;
4437
- /**
4438
- * Whether to enable the Doppler effect: When there is a relative displacement between the sound source and the receiver of the sound source, the tone heard by the receiver changes.true: Enable the Doppler effect.false: (Default) Disable the Doppler effect.This parameter is suitable for scenarios where the sound source is moving at high speed (for example, racing games). It is not recommended for common audio and video interactive scenarios (for example, voice chat, cohosting, or online KTV).When this parameter is enabled, Agora recommends that you set a regular period (such as 30 ms), and then call the updatePlayerPositionInfo , updateSelfPosition , and updateRemotePosition methods to continuously update the relative distance between the sound source and the receiver. The following factors can cause the Doppler effect to be unpredictable or the sound to be jittery: the period of updating the distance is too long, the updating period is irregular, or the distance information is lost due to network packet loss or delay.
4439
- */
4440
- enable_doppler?: boolean;
4441
- }