agora-electron-sdk 0.0.0-dev.1

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 (369) hide show
  1. package/CHANGELOG.md +315 -0
  2. package/LICENSE +21 -0
  3. package/README.md +143 -0
  4. package/gulpfile.js +52 -0
  5. package/js/AgoraSdk.js +64 -0
  6. package/js/Decoder/gpu-utils.js +74 -0
  7. package/js/Decoder/index.js +172 -0
  8. package/js/Private/AgoraBase.js +3985 -0
  9. package/js/Private/AgoraMediaBase.js +1014 -0
  10. package/js/Private/AgoraMediaPlayerTypes.js +316 -0
  11. package/js/Private/IAgoraH265Transcoder.js +36 -0
  12. package/js/Private/IAgoraLog.js +78 -0
  13. package/js/Private/IAgoraMediaEngine.js +32 -0
  14. package/js/Private/IAgoraMediaPlayer.js +16 -0
  15. package/js/Private/IAgoraMediaPlayerSource.js +3 -0
  16. package/js/Private/IAgoraMediaRecorder.js +10 -0
  17. package/js/Private/IAgoraMediaStreamingSource.js +74 -0
  18. package/js/Private/IAgoraMusicContentCenter.js +157 -0
  19. package/js/Private/IAgoraRhythmPlayer.js +62 -0
  20. package/js/Private/IAgoraRtcEngine.js +982 -0
  21. package/js/Private/IAgoraRtcEngineEx.js +19 -0
  22. package/js/Private/IAgoraSpatialAudio.js +24 -0
  23. package/js/Private/IAudioDeviceManager.js +20 -0
  24. package/js/Private/extension/AgoraBaseExtension.js +3 -0
  25. package/js/Private/extension/AgoraMediaBaseExtension.js +2 -0
  26. package/js/Private/extension/AgoraMediaPlayerTypesExtension.js +2 -0
  27. package/js/Private/extension/IAgoraH265TranscoderExtension.js +2 -0
  28. package/js/Private/extension/IAgoraLogExtension.js +2 -0
  29. package/js/Private/extension/IAgoraMediaEngineExtension.js +2 -0
  30. package/js/Private/extension/IAgoraMediaPlayerExtension.js +2 -0
  31. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.js +2 -0
  32. package/js/Private/extension/IAgoraMediaRecorderExtension.js +2 -0
  33. package/js/Private/extension/IAgoraMusicContentCenterExtension.js +2 -0
  34. package/js/Private/extension/IAgoraRhythmPlayerExtension.js +2 -0
  35. package/js/Private/extension/IAgoraRtcEngineExExtension.js +2 -0
  36. package/js/Private/extension/IAgoraRtcEngineExtension.js +2 -0
  37. package/js/Private/extension/IAgoraSpatialAudioExtension.js +2 -0
  38. package/js/Private/extension/IAudioDeviceManagerExtension.js +2 -0
  39. package/js/Private/impl/AgoraBaseImpl.js +23 -0
  40. package/js/Private/impl/AgoraMediaBaseImpl.js +149 -0
  41. package/js/Private/impl/IAgoraH265TranscoderImpl.js +116 -0
  42. package/js/Private/impl/IAgoraMediaEngineImpl.js +337 -0
  43. package/js/Private/impl/IAgoraMediaPlayerImpl.js +950 -0
  44. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +73 -0
  45. package/js/Private/impl/IAgoraMediaRecorderImpl.js +47 -0
  46. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +422 -0
  47. package/js/Private/impl/IAgoraRtcEngineExImpl.js +1042 -0
  48. package/js/Private/impl/IAgoraRtcEngineImpl.js +5167 -0
  49. package/js/Private/impl/IAgoraSpatialAudioImpl.js +358 -0
  50. package/js/Private/impl/IAudioDeviceManagerImpl.js +375 -0
  51. package/js/Private/internal/AgoraH265TranscoderInternal.js +62 -0
  52. package/js/Private/internal/AgoraMediaBaseInternal.js +15 -0
  53. package/js/Private/internal/AudioDeviceManagerInternal.js +44 -0
  54. package/js/Private/internal/IrisApiEngine.js +424 -0
  55. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +7 -0
  56. package/js/Private/internal/MediaEngineInternal.js +122 -0
  57. package/js/Private/internal/MediaPlayerInternal.js +194 -0
  58. package/js/Private/internal/MediaRecorderInternal.js +70 -0
  59. package/js/Private/internal/MusicContentCenterInternal.js +139 -0
  60. package/js/Private/internal/RtcEngineExInternal.js +430 -0
  61. package/js/Private/ipc/main.js +21 -0
  62. package/js/Private/ipc/renderer.js +21 -0
  63. package/js/Private/ti/AgoraBase-ti.js +40 -0
  64. package/js/Private/ti/AgoraMediaBase-ti.js +75 -0
  65. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +5 -0
  66. package/js/Private/ti/IAgoraH265Transcoder-ti.js +40 -0
  67. package/js/Private/ti/IAgoraLog-ti.js +5 -0
  68. package/js/Private/ti/IAgoraMediaEngine-ti.js +5 -0
  69. package/js/Private/ti/IAgoraMediaPlayer-ti.js +38 -0
  70. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +50 -0
  71. package/js/Private/ti/IAgoraMediaRecorder-ti.js +5 -0
  72. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +5 -0
  73. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +42 -0
  74. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +5 -0
  75. package/js/Private/ti/IAgoraRtcEngine-ti.js +141 -0
  76. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +5 -0
  77. package/js/Private/ti/IAgoraSpatialAudio-ti.js +5 -0
  78. package/js/Private/ti/IAudioDeviceManager-ti.js +5 -0
  79. package/js/Renderer/AgoraView.js +161 -0
  80. package/js/Renderer/CapabilityManager.js +99 -0
  81. package/js/Renderer/IRenderer.js +136 -0
  82. package/js/Renderer/IRendererCache.js +75 -0
  83. package/js/Renderer/RendererCache.js +100 -0
  84. package/js/Renderer/RendererManager.js +301 -0
  85. package/js/Renderer/WebCodecsRenderer/index.js +109 -0
  86. package/js/Renderer/WebCodecsRendererCache.js +115 -0
  87. package/js/Renderer/WebGLRenderer/index.js +314 -0
  88. package/js/Renderer/WebGLRenderer/webgl-utils.js +1337 -0
  89. package/js/Renderer/YUVCanvasRenderer/index.js +46 -0
  90. package/js/Renderer/index.js +17 -0
  91. package/js/Types.js +67 -0
  92. package/js/Utils.js +187 -0
  93. package/package.json +167 -0
  94. package/scripts/bootstrap.js +29 -0
  95. package/scripts/build.js +37 -0
  96. package/scripts/buildJS.js +14 -0
  97. package/scripts/checkElectron.js +43 -0
  98. package/scripts/clean.js +16 -0
  99. package/scripts/download.js +105 -0
  100. package/scripts/downloadPrebuild.js +199 -0
  101. package/scripts/getConfig.js +73 -0
  102. package/scripts/logger.js +32 -0
  103. package/scripts/synclib.js +69 -0
  104. package/scripts/util.js +47 -0
  105. package/scripts/zipBuild.js +40 -0
  106. package/ts/AgoraSdk.ts +54 -0
  107. package/ts/Decoder/gpu-utils.ts +92 -0
  108. package/ts/Decoder/index.ts +206 -0
  109. package/ts/Private/AgoraBase.ts +5511 -0
  110. package/ts/Private/AgoraMediaBase.ts +1764 -0
  111. package/ts/Private/AgoraMediaPlayerTypes.ts +464 -0
  112. package/ts/Private/IAgoraH265Transcoder.ts +73 -0
  113. package/ts/Private/IAgoraLog.ts +91 -0
  114. package/ts/Private/IAgoraMediaEngine.ts +316 -0
  115. package/ts/Private/IAgoraMediaPlayer.ts +744 -0
  116. package/ts/Private/IAgoraMediaPlayerSource.ts +137 -0
  117. package/ts/Private/IAgoraMediaRecorder.ts +25 -0
  118. package/ts/Private/IAgoraMediaStreamingSource.ts +81 -0
  119. package/ts/Private/IAgoraMusicContentCenter.ts +455 -0
  120. package/ts/Private/IAgoraRhythmPlayer.ts +67 -0
  121. package/ts/Private/IAgoraRtcEngine.ts +7306 -0
  122. package/ts/Private/IAgoraRtcEngineEx.ts +992 -0
  123. package/ts/Private/IAgoraSpatialAudio.ts +250 -0
  124. package/ts/Private/IAudioDeviceManager.ts +342 -0
  125. package/ts/Private/extension/AgoraBaseExtension.ts +14 -0
  126. package/ts/Private/extension/AgoraMediaBaseExtension.ts +1 -0
  127. package/ts/Private/extension/AgoraMediaPlayerTypesExtension.ts +1 -0
  128. package/ts/Private/extension/IAgoraH265TranscoderExtension.ts +39 -0
  129. package/ts/Private/extension/IAgoraLogExtension.ts +1 -0
  130. package/ts/Private/extension/IAgoraMediaEngineExtension.ts +62 -0
  131. package/ts/Private/extension/IAgoraMediaPlayerExtension.ts +64 -0
  132. package/ts/Private/extension/IAgoraMediaPlayerSourceExtension.ts +1 -0
  133. package/ts/Private/extension/IAgoraMediaRecorderExtension.ts +59 -0
  134. package/ts/Private/extension/IAgoraMusicContentCenterExtension.ts +34 -0
  135. package/ts/Private/extension/IAgoraRhythmPlayerExtension.ts +1 -0
  136. package/ts/Private/extension/IAgoraRtcEngineExExtension.ts +1 -0
  137. package/ts/Private/extension/IAgoraRtcEngineExtension.ts +64 -0
  138. package/ts/Private/extension/IAgoraSpatialAudioExtension.ts +1 -0
  139. package/ts/Private/extension/IAudioDeviceManagerExtension.ts +1 -0
  140. package/ts/Private/impl/AgoraBaseImpl.ts +39 -0
  141. package/ts/Private/impl/AgoraMediaBaseImpl.ts +237 -0
  142. package/ts/Private/impl/IAgoraH265TranscoderImpl.ts +152 -0
  143. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +491 -0
  144. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +1169 -0
  145. package/ts/Private/impl/IAgoraMediaPlayerSourceImpl.ts +94 -0
  146. package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +59 -0
  147. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +562 -0
  148. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +1672 -0
  149. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +7352 -0
  150. package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +495 -0
  151. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +443 -0
  152. package/ts/Private/internal/AgoraH265TranscoderInternal.ts +97 -0
  153. package/ts/Private/internal/AgoraMediaBaseInternal.ts +15 -0
  154. package/ts/Private/internal/AudioDeviceManagerInternal.ts +46 -0
  155. package/ts/Private/internal/IrisApiEngine.ts +598 -0
  156. package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +3 -0
  157. package/ts/Private/internal/MediaEngineInternal.ts +190 -0
  158. package/ts/Private/internal/MediaPlayerInternal.ts +311 -0
  159. package/ts/Private/internal/MediaRecorderInternal.ts +100 -0
  160. package/ts/Private/internal/MusicContentCenterInternal.ts +208 -0
  161. package/ts/Private/internal/RtcEngineExInternal.ts +647 -0
  162. package/ts/Private/ipc/main.ts +22 -0
  163. package/ts/Private/ipc/renderer.ts +21 -0
  164. package/ts/Private/ti/AgoraBase-ti.ts +16 -0
  165. package/ts/Private/ti/AgoraMediaBase-ti.ts +58 -0
  166. package/ts/Private/ti/AgoraMediaPlayerTypes-ti.ts +11 -0
  167. package/ts/Private/ti/IAgoraH265Transcoder-ti.ts +16 -0
  168. package/ts/Private/ti/IAgoraLog-ti.ts +11 -0
  169. package/ts/Private/ti/IAgoraMediaEngine-ti.ts +11 -0
  170. package/ts/Private/ti/IAgoraMediaPlayer-ti.ts +14 -0
  171. package/ts/Private/ti/IAgoraMediaPlayerSource-ti.ts +26 -0
  172. package/ts/Private/ti/IAgoraMediaRecorder-ti.ts +11 -0
  173. package/ts/Private/ti/IAgoraMediaStreamingSource-ti.ts +11 -0
  174. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +18 -0
  175. package/ts/Private/ti/IAgoraRhythmPlayer-ti.ts +11 -0
  176. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +119 -0
  177. package/ts/Private/ti/IAgoraRtcEngineEx-ti.ts +11 -0
  178. package/ts/Private/ti/IAgoraSpatialAudio-ti.ts +11 -0
  179. package/ts/Private/ti/IAudioDeviceManager-ti.ts +11 -0
  180. package/ts/Renderer/AgoraView.ts +235 -0
  181. package/ts/Renderer/CapabilityManager.ts +126 -0
  182. package/ts/Renderer/IRenderer.ts +158 -0
  183. package/ts/Renderer/IRendererCache.ts +96 -0
  184. package/ts/Renderer/RendererCache.ts +124 -0
  185. package/ts/Renderer/RendererManager.ts +400 -0
  186. package/ts/Renderer/WebCodecsRenderer/index.ts +145 -0
  187. package/ts/Renderer/WebCodecsRendererCache.ts +137 -0
  188. package/ts/Renderer/WebGLRenderer/index.ts +489 -0
  189. package/ts/Renderer/WebGLRenderer/webgl-utils.js +1510 -0
  190. package/ts/Renderer/YUVCanvasRenderer/index.ts +67 -0
  191. package/ts/Renderer/index.ts +1 -0
  192. package/ts/Types.ts +249 -0
  193. package/ts/Utils.ts +197 -0
  194. package/types/AgoraSdk.d.ts +40 -0
  195. package/types/AgoraSdk.d.ts.map +1 -0
  196. package/types/Decoder/gpu-utils.d.ts +21 -0
  197. package/types/Decoder/gpu-utils.d.ts.map +1 -0
  198. package/types/Decoder/index.d.ts +26 -0
  199. package/types/Decoder/index.d.ts.map +1 -0
  200. package/types/Private/AgoraBase.d.ts +5310 -0
  201. package/types/Private/AgoraBase.d.ts.map +1 -0
  202. package/types/Private/AgoraMediaBase.d.ts +1668 -0
  203. package/types/Private/AgoraMediaBase.d.ts.map +1 -0
  204. package/types/Private/AgoraMediaPlayerTypes.d.ts +453 -0
  205. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
  206. package/types/Private/IAgoraH265Transcoder.d.ts +28 -0
  207. package/types/Private/IAgoraH265Transcoder.d.ts.map +1 -0
  208. package/types/Private/IAgoraLog.d.ts +89 -0
  209. package/types/Private/IAgoraLog.d.ts.map +1 -0
  210. package/types/Private/IAgoraMediaEngine.d.ts +250 -0
  211. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
  212. package/types/Private/IAgoraMediaPlayer.d.ts +648 -0
  213. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
  214. package/types/Private/IAgoraMediaPlayerSource.d.ts +109 -0
  215. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
  216. package/types/Private/IAgoraMediaRecorder.d.ts +20 -0
  217. package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
  218. package/types/Private/IAgoraMediaStreamingSource.d.ts +42 -0
  219. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
  220. package/types/Private/IAgoraMusicContentCenter.d.ts +381 -0
  221. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
  222. package/types/Private/IAgoraRhythmPlayer.d.ts +65 -0
  223. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
  224. package/types/Private/IAgoraRtcEngine.d.ts +6103 -0
  225. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
  226. package/types/Private/IAgoraRtcEngineEx.d.ts +741 -0
  227. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
  228. package/types/Private/IAgoraSpatialAudio.d.ts +196 -0
  229. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
  230. package/types/Private/IAudioDeviceManager.d.ts +312 -0
  231. package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
  232. package/types/Private/extension/AgoraBaseExtension.d.ts +14 -0
  233. package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
  234. package/types/Private/extension/AgoraMediaBaseExtension.d.ts +2 -0
  235. package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  236. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -0
  237. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  238. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
  239. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
  240. package/types/Private/extension/IAgoraLogExtension.d.ts +2 -0
  241. package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
  242. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +40 -0
  243. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  244. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +46 -0
  245. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  246. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -0
  247. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  248. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +44 -0
  249. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  250. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +20 -0
  251. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  252. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +2 -0
  253. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  254. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +2 -0
  255. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  256. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +42 -0
  257. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  258. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +2 -0
  259. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  260. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +2 -0
  261. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  262. package/types/Private/impl/AgoraBaseImpl.d.ts +3 -0
  263. package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
  264. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +14 -0
  265. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  266. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
  267. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
  268. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +46 -0
  269. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  270. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +143 -0
  271. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  272. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -0
  273. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  274. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +11 -0
  275. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  276. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +67 -0
  277. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  278. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +116 -0
  279. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  280. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +628 -0
  281. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  282. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +47 -0
  283. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  284. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +65 -0
  285. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  286. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts +14 -0
  287. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
  288. package/types/Private/internal/AgoraMediaBaseInternal.d.ts +8 -0
  289. package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
  290. package/types/Private/internal/AudioDeviceManagerInternal.d.ts +9 -0
  291. package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
  292. package/types/Private/internal/IrisApiEngine.d.ts +69 -0
  293. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
  294. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +4 -0
  295. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  296. package/types/Private/internal/MediaEngineInternal.d.ts +23 -0
  297. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
  298. package/types/Private/internal/MediaPlayerInternal.d.ts +30 -0
  299. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
  300. package/types/Private/internal/MediaRecorderInternal.d.ts +16 -0
  301. package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
  302. package/types/Private/internal/MusicContentCenterInternal.d.ts +31 -0
  303. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
  304. package/types/Private/internal/RtcEngineExInternal.d.ts +73 -0
  305. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
  306. package/types/Private/ipc/main.d.ts +2 -0
  307. package/types/Private/ipc/main.d.ts.map +1 -0
  308. package/types/Private/ipc/renderer.d.ts +3 -0
  309. package/types/Private/ipc/renderer.d.ts.map +1 -0
  310. package/types/Private/ti/AgoraBase-ti.d.ts +8 -0
  311. package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
  312. package/types/Private/ti/AgoraMediaBase-ti.d.ts +15 -0
  313. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  314. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -0
  315. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  316. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
  317. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
  318. package/types/Private/ti/IAgoraLog-ti.d.ts +7 -0
  319. package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
  320. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +7 -0
  321. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  322. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +8 -0
  323. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  324. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -0
  325. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  326. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +7 -0
  327. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  328. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts +7 -0
  329. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  330. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +8 -0
  331. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  332. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +7 -0
  333. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  334. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +10 -0
  335. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  336. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +7 -0
  337. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  338. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +7 -0
  339. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  340. package/types/Private/ti/IAudioDeviceManager-ti.d.ts +7 -0
  341. package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  342. package/types/Renderer/AgoraView.d.ts +76 -0
  343. package/types/Renderer/AgoraView.d.ts.map +1 -0
  344. package/types/Renderer/CapabilityManager.d.ts +20 -0
  345. package/types/Renderer/CapabilityManager.d.ts.map +1 -0
  346. package/types/Renderer/IRenderer.d.ts +20 -0
  347. package/types/Renderer/IRenderer.d.ts.map +1 -0
  348. package/types/Renderer/IRendererCache.d.ts +26 -0
  349. package/types/Renderer/IRendererCache.d.ts.map +1 -0
  350. package/types/Renderer/RendererCache.d.ts +24 -0
  351. package/types/Renderer/RendererCache.d.ts.map +1 -0
  352. package/types/Renderer/RendererManager.d.ts +66 -0
  353. package/types/Renderer/RendererManager.d.ts.map +1 -0
  354. package/types/Renderer/WebCodecsRenderer/index.d.ts +14 -0
  355. package/types/Renderer/WebCodecsRenderer/index.d.ts.map +1 -0
  356. package/types/Renderer/WebCodecsRendererCache.d.ts +15 -0
  357. package/types/Renderer/WebCodecsRendererCache.d.ts.map +1 -0
  358. package/types/Renderer/WebGLRenderer/index.d.ts +27 -0
  359. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -0
  360. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts +1 -0
  361. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
  362. package/types/Renderer/YUVCanvasRenderer/index.d.ts +9 -0
  363. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
  364. package/types/Renderer/index.d.ts +2 -0
  365. package/types/Renderer/index.d.ts.map +1 -0
  366. package/types/Types.d.ts +177 -0
  367. package/types/Types.d.ts.map +1 -0
  368. package/types/Utils.d.ts +50 -0
  369. package/types/Utils.d.ts.map +1 -0
@@ -0,0 +1,1668 @@
1
+ import './extension/AgoraMediaBaseExtension';
2
+ import { EncodedVideoFrameInfo } from './AgoraBase';
3
+ /**
4
+ * The context information of the extension.
5
+ */
6
+ export declare class ExtensionContext {
7
+ /**
8
+ * Whether the uid in ExtensionContext is valid: true : The uid is valid. false : The uid is invalid.
9
+ */
10
+ isValid?: boolean;
11
+ /**
12
+ * The user ID. 0 represents a local user, while greater than 0 represents a remote user.
13
+ */
14
+ uid?: number;
15
+ /**
16
+ * The name of the extension provider.
17
+ */
18
+ providerName?: string;
19
+ /**
20
+ * The name of the extension.
21
+ */
22
+ extensionName?: string;
23
+ }
24
+ /**
25
+ * The type of the video source.
26
+ */
27
+ export declare enum VideoSourceType {
28
+ /**
29
+ * 0: (Default) The primary camera.
30
+ */
31
+ VideoSourceCameraPrimary = 0,
32
+ /**
33
+ * 0: (Default) The primary camera.
34
+ */
35
+ VideoSourceCamera = 0,
36
+ /**
37
+ * 1: The secondary camera.
38
+ */
39
+ VideoSourceCameraSecondary = 1,
40
+ /**
41
+ * 2: The primary screen.
42
+ */
43
+ VideoSourceScreenPrimary = 2,
44
+ /**
45
+ * 2: The primary screen.
46
+ */
47
+ VideoSourceScreen = 2,
48
+ /**
49
+ * 3: The secondary screen.
50
+ */
51
+ VideoSourceScreenSecondary = 3,
52
+ /**
53
+ * 4: A custom video source.
54
+ */
55
+ VideoSourceCustom = 4,
56
+ /**
57
+ * 5: The media player.
58
+ */
59
+ VideoSourceMediaPlayer = 5,
60
+ /**
61
+ * 6: One PNG image.
62
+ */
63
+ VideoSourceRtcImagePng = 6,
64
+ /**
65
+ * 7: One JPEG image.
66
+ */
67
+ VideoSourceRtcImageJpeg = 7,
68
+ /**
69
+ * 8: One GIF image.
70
+ */
71
+ VideoSourceRtcImageGif = 8,
72
+ /**
73
+ * 9: One remote video acquired by the network.
74
+ */
75
+ VideoSourceRemote = 9,
76
+ /**
77
+ * 10: One transcoded video source.
78
+ */
79
+ VideoSourceTranscoded = 10,
80
+ /**
81
+ * 11: The third camera.
82
+ */
83
+ VideoSourceCameraThird = 11,
84
+ /**
85
+ * 12: The fourth camera.
86
+ */
87
+ VideoSourceCameraFourth = 12,
88
+ /**
89
+ * 13: The third screen.
90
+ */
91
+ VideoSourceScreenThird = 13,
92
+ /**
93
+ * 14: The fourth screen.
94
+ */
95
+ VideoSourceScreenFourth = 14,
96
+ /**
97
+ * @ignore
98
+ */
99
+ VideoSourceSpeechDriven = 15,
100
+ /**
101
+ * 100: An unknown video source.
102
+ */
103
+ VideoSourceUnknown = 100
104
+ }
105
+ /**
106
+ * The audio source type.
107
+ */
108
+ export declare enum AudioSourceType {
109
+ /**
110
+ * 0: (Default) Microphone.
111
+ */
112
+ AudioSourceMicrophone = 0,
113
+ /**
114
+ * 1: Custom audio stream.
115
+ */
116
+ AudioSourceCustom = 1,
117
+ /**
118
+ * 2: Media player.
119
+ */
120
+ AudioSourceMediaPlayer = 2,
121
+ /**
122
+ * 3: System audio stream captured during screen sharing.
123
+ */
124
+ AudioSourceLoopbackRecording = 3,
125
+ /**
126
+ * @ignore
127
+ */
128
+ AudioSourceMixedStream = 4,
129
+ /**
130
+ * 5: Audio stream from a specified remote user.
131
+ */
132
+ AudioSourceRemoteUser = 5,
133
+ /**
134
+ * 6: Mixed audio streams from all users in the current channel.
135
+ */
136
+ AudioSourceRemoteChannel = 6,
137
+ /**
138
+ * 100: An unknown audio source.
139
+ */
140
+ AudioSourceUnknown = 100
141
+ }
142
+ /**
143
+ * The type of the audio route.
144
+ */
145
+ export declare enum AudioRoute {
146
+ /**
147
+ * -1: The default audio route.
148
+ */
149
+ RouteDefault = -1,
150
+ /**
151
+ * 0: Audio output routing is a headset with microphone.
152
+ */
153
+ RouteHeadset = 0,
154
+ /**
155
+ * 1: The audio route is an earpiece.
156
+ */
157
+ RouteEarpiece = 1,
158
+ /**
159
+ * 2: The audio route is a headset without a microphone.
160
+ */
161
+ RouteHeadsetnomic = 2,
162
+ /**
163
+ * 3: The audio route is the speaker that comes with the device.
164
+ */
165
+ RouteSpeakerphone = 3,
166
+ /**
167
+ * 4: The audio route is an external speaker. (macOS only)
168
+ */
169
+ RouteLoudspeaker = 4,
170
+ /**
171
+ * 5: The audio route is a Bluetooth device using the HFP protocol.
172
+ */
173
+ RouteBluetoothDeviceHfp = 5,
174
+ /**
175
+ * 6: The audio route is a USB peripheral device. (For macOS only)
176
+ */
177
+ RouteUsb = 6,
178
+ /**
179
+ * 7: The audio route is an HDMI peripheral device. (For macOS only)
180
+ */
181
+ RouteHdmi = 7,
182
+ /**
183
+ * 8: The audio route is a DisplayPort peripheral device. (For macOS only)
184
+ */
185
+ RouteDisplayport = 8,
186
+ /**
187
+ * 9: The audio route is Apple AirPlay. (For macOS only)
188
+ */
189
+ RouteAirplay = 9,
190
+ /**
191
+ * 10: The audio route is a Bluetooth device using the A2DP protocol.
192
+ */
193
+ RouteBluetoothDeviceA2dp = 10
194
+ }
195
+ /**
196
+ * @ignore
197
+ */
198
+ export declare enum BytesPerSample {
199
+ /**
200
+ * @ignore
201
+ */
202
+ TwoBytesPerSample = 2
203
+ }
204
+ /**
205
+ * @ignore
206
+ */
207
+ export declare class AudioParameters {
208
+ /**
209
+ * @ignore
210
+ */
211
+ sample_rate?: number;
212
+ /**
213
+ * @ignore
214
+ */
215
+ channels?: number;
216
+ /**
217
+ * @ignore
218
+ */
219
+ frames_per_buffer?: number;
220
+ }
221
+ /**
222
+ * The use mode of the audio data.
223
+ */
224
+ export declare enum RawAudioFrameOpModeType {
225
+ /**
226
+ * 0: Read-only mode, Users only read the data returned by the SDK without modifying anything. For example, when users acquire the data with the Agora SDK, then start the media push.
227
+ */
228
+ RawAudioFrameOpModeReadOnly = 0,
229
+ /**
230
+ * 2: Read and write mode, Users read the data returned by the SDK, modify it, and then play it. For example, when users have their own audio-effect processing module and perform some voice preprocessing, such as a voice change.
231
+ */
232
+ RawAudioFrameOpModeReadWrite = 2
233
+ }
234
+ /**
235
+ * Media source type.
236
+ */
237
+ export declare enum MediaSourceType {
238
+ /**
239
+ * 0: Audio playback device.
240
+ */
241
+ AudioPlayoutSource = 0,
242
+ /**
243
+ * 1: Audio capturing device.
244
+ */
245
+ AudioRecordingSource = 1,
246
+ /**
247
+ * 2: The primary camera.
248
+ */
249
+ PrimaryCameraSource = 2,
250
+ /**
251
+ * 3: A secondary camera.
252
+ */
253
+ SecondaryCameraSource = 3,
254
+ /**
255
+ * @ignore
256
+ */
257
+ PrimaryScreenSource = 4,
258
+ /**
259
+ * @ignore
260
+ */
261
+ SecondaryScreenSource = 5,
262
+ /**
263
+ * 6: Custom video source.
264
+ */
265
+ CustomVideoSource = 6,
266
+ /**
267
+ * @ignore
268
+ */
269
+ MediaPlayerSource = 7,
270
+ /**
271
+ * @ignore
272
+ */
273
+ RtcImagePngSource = 8,
274
+ /**
275
+ * @ignore
276
+ */
277
+ RtcImageJpegSource = 9,
278
+ /**
279
+ * @ignore
280
+ */
281
+ RtcImageGifSource = 10,
282
+ /**
283
+ * @ignore
284
+ */
285
+ RemoteVideoSource = 11,
286
+ /**
287
+ * @ignore
288
+ */
289
+ TranscodedVideoSource = 12,
290
+ /**
291
+ * @ignore
292
+ */
293
+ SpeechDrivenVideoSource = 13,
294
+ /**
295
+ * 100: Unknown media source.
296
+ */
297
+ UnknownMediaSource = 100
298
+ }
299
+ /**
300
+ * @ignore
301
+ */
302
+ export declare enum ContentInspectResult {
303
+ /**
304
+ * @ignore
305
+ */
306
+ ContentInspectNeutral = 1,
307
+ /**
308
+ * @ignore
309
+ */
310
+ ContentInspectSexy = 2,
311
+ /**
312
+ * @ignore
313
+ */
314
+ ContentInspectPorn = 3
315
+ }
316
+ /**
317
+ * The type of video content moderation module.
318
+ */
319
+ export declare enum ContentInspectType {
320
+ /**
321
+ * 0: (Default) This module has no actual function. Do not set type to this value.
322
+ */
323
+ ContentInspectInvalid = 0,
324
+ /**
325
+ * @ignore
326
+ */
327
+ ContentInspectModeration = 1,
328
+ /**
329
+ * 2: Video screenshot and upload via Agora self-developed extension. SDK takes screenshots of the video stream in the channel and uploads them.
330
+ */
331
+ ContentInspectSupervision = 2,
332
+ /**
333
+ * 3: Video screenshot and upload via extensions from Agora Extensions Marketplace. SDK uses video moderation extensions from Agora Extensions Marketplace to take screenshots of the video stream in the channel and uploads them.
334
+ */
335
+ ContentInspectImageModeration = 3
336
+ }
337
+ /**
338
+ * ContentInspectModule A structure used to configure the frequency of video screenshot and upload.
339
+ */
340
+ export declare class ContentInspectModule {
341
+ /**
342
+ * Types of functional module. See ContentInspectType.
343
+ */
344
+ type?: ContentInspectType;
345
+ /**
346
+ * The frequency (s) of video screenshot and upload. The value should be set as larger than 0. The default value is 0, the SDK does not take screenshots. Agora recommends that you set the value as 10; you can also adjust it according to your business needs.
347
+ */
348
+ interval?: number;
349
+ }
350
+ /**
351
+ * Screenshot and upload configuration.
352
+ */
353
+ export declare class ContentInspectConfig {
354
+ /**
355
+ * Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server.
356
+ */
357
+ extraInfo?: string;
358
+ /**
359
+ * @ignore
360
+ */
361
+ serverConfig?: string;
362
+ /**
363
+ * Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported.
364
+ */
365
+ modules?: ContentInspectModule[];
366
+ /**
367
+ * The number of functional modules, that is,the number of configured ContentInspectModule instances, must be the same as the number of instances configured in modules. The maximum number is 32.
368
+ */
369
+ moduleCount?: number;
370
+ }
371
+ /**
372
+ * @ignore
373
+ */
374
+ export declare class PacketOptions {
375
+ /**
376
+ * @ignore
377
+ */
378
+ timestamp?: number;
379
+ /**
380
+ * @ignore
381
+ */
382
+ audioLevelIndication?: number;
383
+ }
384
+ /**
385
+ * @ignore
386
+ */
387
+ export declare class AudioEncodedFrameInfo {
388
+ /**
389
+ * @ignore
390
+ */
391
+ sendTs?: number;
392
+ /**
393
+ * @ignore
394
+ */
395
+ codec?: number;
396
+ }
397
+ /**
398
+ * The parameters of the audio frame in PCM format.
399
+ */
400
+ export declare class AudioPcmFrame {
401
+ /**
402
+ * The timestamp (ms) of the audio frame.
403
+ */
404
+ capture_timestamp?: number;
405
+ /**
406
+ * The number of samples per channel in the audio frame.
407
+ */
408
+ samples_per_channel_?: number;
409
+ /**
410
+ * Audio sample rate (Hz).
411
+ */
412
+ sample_rate_hz_?: number;
413
+ /**
414
+ * The number of audio channels.
415
+ */
416
+ num_channels_?: number;
417
+ /**
418
+ * The number of bytes per sample.
419
+ */
420
+ bytes_per_sample?: BytesPerSample;
421
+ /**
422
+ * The audio frame.
423
+ */
424
+ data_?: number[];
425
+ /**
426
+ * @ignore
427
+ */
428
+ is_stereo_?: boolean;
429
+ }
430
+ /**
431
+ * The channel mode.
432
+ */
433
+ export declare enum AudioDualMonoMode {
434
+ /**
435
+ * 0: Original mode.
436
+ */
437
+ AudioDualMonoStereo = 0,
438
+ /**
439
+ * 1: Left channel mode. This mode replaces the audio of the right channel with the audio of the left channel, which means the user can only hear the audio of the left channel.
440
+ */
441
+ AudioDualMonoL = 1,
442
+ /**
443
+ * 2: Right channel mode. This mode replaces the audio of the left channel with the audio of the right channel, which means the user can only hear the audio of the right channel.
444
+ */
445
+ AudioDualMonoR = 2,
446
+ /**
447
+ * 3: Mixed channel mode. This mode mixes the audio of the left channel and the right channel, which means the user can hear the audio of the left channel and the right channel at the same time.
448
+ */
449
+ AudioDualMonoMix = 3
450
+ }
451
+ /**
452
+ * The video pixel format.
453
+ */
454
+ export declare enum VideoPixelFormat {
455
+ /**
456
+ * 0: Raw video pixel format.
457
+ */
458
+ VideoPixelDefault = 0,
459
+ /**
460
+ * 1: The format is I420.
461
+ */
462
+ VideoPixelI420 = 1,
463
+ /**
464
+ * @ignore
465
+ */
466
+ VideoPixelBgra = 2,
467
+ /**
468
+ * @ignore
469
+ */
470
+ VideoPixelNv21 = 3,
471
+ /**
472
+ * 4: The format is RGBA.
473
+ */
474
+ VideoPixelRgba = 4,
475
+ /**
476
+ * @ignore
477
+ */
478
+ VideoPixelNv12 = 8,
479
+ /**
480
+ * @ignore
481
+ */
482
+ VideoTexture2d = 10,
483
+ /**
484
+ * @ignore
485
+ */
486
+ VideoTextureOes = 11,
487
+ /**
488
+ * @ignore
489
+ */
490
+ VideoCvpixelNv12 = 12,
491
+ /**
492
+ * @ignore
493
+ */
494
+ VideoCvpixelI420 = 13,
495
+ /**
496
+ * @ignore
497
+ */
498
+ VideoCvpixelBgra = 14,
499
+ /**
500
+ * @ignore
501
+ */
502
+ VideoCvpixelP010 = 15,
503
+ /**
504
+ * 16: The format is I422.
505
+ */
506
+ VideoPixelI422 = 16,
507
+ /**
508
+ * @ignore
509
+ */
510
+ VideoTextureId3d11texture2d = 17,
511
+ /**
512
+ * @ignore
513
+ */
514
+ VideoPixelI010 = 18
515
+ }
516
+ /**
517
+ * Video display modes.
518
+ */
519
+ export declare enum RenderModeType {
520
+ /**
521
+ * 1: Hidden mode. The priority is to fill the window. Any excess video that does not match the window size will be cropped.
522
+ */
523
+ RenderModeHidden = 1,
524
+ /**
525
+ * 2: Fit mode. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black.
526
+ */
527
+ RenderModeFit = 2,
528
+ /**
529
+ * @ignore
530
+ */
531
+ RenderModeAdaptive = 3
532
+ }
533
+ /**
534
+ * @ignore
535
+ */
536
+ export declare enum CameraVideoSourceType {
537
+ /**
538
+ * @ignore
539
+ */
540
+ CameraSourceFront = 0,
541
+ /**
542
+ * @ignore
543
+ */
544
+ CameraSourceBack = 1,
545
+ /**
546
+ * @ignore
547
+ */
548
+ VideoSourceUnspecified = 2
549
+ }
550
+ /**
551
+ * @ignore
552
+ */
553
+ export declare enum MetaInfoKey {
554
+ /**
555
+ * @ignore
556
+ */
557
+ KeyFaceCapture = 0
558
+ }
559
+ /**
560
+ * @ignore
561
+ */
562
+ export declare abstract class IVideoFrameMetaInfo {
563
+ /**
564
+ * @ignore
565
+ */
566
+ abstract getMetaInfoStr(key: MetaInfoKey): string;
567
+ }
568
+ /**
569
+ * @ignore
570
+ */
571
+ export declare enum PrimaryID {
572
+ /**
573
+ * @ignore
574
+ */
575
+ PrimaryidBt709 = 1,
576
+ /**
577
+ * @ignore
578
+ */
579
+ PrimaryidUnspecified = 2,
580
+ /**
581
+ * @ignore
582
+ */
583
+ PrimaryidBt470m = 4,
584
+ /**
585
+ * @ignore
586
+ */
587
+ PrimaryidBt470bg = 5,
588
+ /**
589
+ * @ignore
590
+ */
591
+ PrimaryidSmpte170m = 6,
592
+ /**
593
+ * @ignore
594
+ */
595
+ PrimaryidSmpte240m = 7,
596
+ /**
597
+ * @ignore
598
+ */
599
+ PrimaryidFilm = 8,
600
+ /**
601
+ * @ignore
602
+ */
603
+ PrimaryidBt2020 = 9,
604
+ /**
605
+ * @ignore
606
+ */
607
+ PrimaryidSmptest428 = 10,
608
+ /**
609
+ * @ignore
610
+ */
611
+ PrimaryidSmptest431 = 11,
612
+ /**
613
+ * @ignore
614
+ */
615
+ PrimaryidSmptest432 = 12,
616
+ /**
617
+ * @ignore
618
+ */
619
+ PrimaryidJedecp22 = 22
620
+ }
621
+ /**
622
+ * @ignore
623
+ */
624
+ export declare enum RangeID {
625
+ /**
626
+ * @ignore
627
+ */
628
+ RangeidInvalid = 0,
629
+ /**
630
+ * @ignore
631
+ */
632
+ RangeidLimited = 1,
633
+ /**
634
+ * @ignore
635
+ */
636
+ RangeidFull = 2,
637
+ /**
638
+ * @ignore
639
+ */
640
+ RangeidDerived = 3
641
+ }
642
+ /**
643
+ * @ignore
644
+ */
645
+ export declare enum MatrixID {
646
+ /**
647
+ * @ignore
648
+ */
649
+ MatrixidRgb = 0,
650
+ /**
651
+ * @ignore
652
+ */
653
+ MatrixidBt709 = 1,
654
+ /**
655
+ * @ignore
656
+ */
657
+ MatrixidUnspecified = 2,
658
+ /**
659
+ * @ignore
660
+ */
661
+ MatrixidFcc = 4,
662
+ /**
663
+ * @ignore
664
+ */
665
+ MatrixidBt470bg = 5,
666
+ /**
667
+ * @ignore
668
+ */
669
+ MatrixidSmpte170m = 6,
670
+ /**
671
+ * @ignore
672
+ */
673
+ MatrixidSmpte240m = 7,
674
+ /**
675
+ * @ignore
676
+ */
677
+ MatrixidYcocg = 8,
678
+ /**
679
+ * @ignore
680
+ */
681
+ MatrixidBt2020Ncl = 9,
682
+ /**
683
+ * @ignore
684
+ */
685
+ MatrixidBt2020Cl = 10,
686
+ /**
687
+ * @ignore
688
+ */
689
+ MatrixidSmpte2085 = 11,
690
+ /**
691
+ * @ignore
692
+ */
693
+ MatrixidCdncls = 12,
694
+ /**
695
+ * @ignore
696
+ */
697
+ MatrixidCdcls = 13,
698
+ /**
699
+ * @ignore
700
+ */
701
+ MatrixidBt2100Ictcp = 14
702
+ }
703
+ /**
704
+ * @ignore
705
+ */
706
+ export declare enum TransferID {
707
+ /**
708
+ * @ignore
709
+ */
710
+ TransferidBt709 = 1,
711
+ /**
712
+ * @ignore
713
+ */
714
+ TransferidUnspecified = 2,
715
+ /**
716
+ * @ignore
717
+ */
718
+ TransferidGamma22 = 4,
719
+ /**
720
+ * @ignore
721
+ */
722
+ TransferidGamma28 = 5,
723
+ /**
724
+ * @ignore
725
+ */
726
+ TransferidSmpte170m = 6,
727
+ /**
728
+ * @ignore
729
+ */
730
+ TransferidSmpte240m = 7,
731
+ /**
732
+ * @ignore
733
+ */
734
+ TransferidLinear = 8,
735
+ /**
736
+ * @ignore
737
+ */
738
+ TransferidLog = 9,
739
+ /**
740
+ * @ignore
741
+ */
742
+ TransferidLogSqrt = 10,
743
+ /**
744
+ * @ignore
745
+ */
746
+ TransferidIec6196624 = 11,
747
+ /**
748
+ * @ignore
749
+ */
750
+ TransferidBt1361Ecg = 12,
751
+ /**
752
+ * @ignore
753
+ */
754
+ TransferidIec6196621 = 13,
755
+ /**
756
+ * @ignore
757
+ */
758
+ TransferidBt202010 = 14,
759
+ /**
760
+ * @ignore
761
+ */
762
+ TransferidBt202012 = 15,
763
+ /**
764
+ * @ignore
765
+ */
766
+ TransferidSmptest2084 = 16,
767
+ /**
768
+ * @ignore
769
+ */
770
+ TransferidSmptest428 = 17,
771
+ /**
772
+ * @ignore
773
+ */
774
+ TransferidAribStdB67 = 18
775
+ }
776
+ /**
777
+ * @ignore
778
+ */
779
+ export declare class ColorSpace {
780
+ /**
781
+ * @ignore
782
+ */
783
+ primaries?: PrimaryID;
784
+ /**
785
+ * @ignore
786
+ */
787
+ transfer?: TransferID;
788
+ /**
789
+ * @ignore
790
+ */
791
+ matrix?: MatrixID;
792
+ /**
793
+ * @ignore
794
+ */
795
+ range?: RangeID;
796
+ }
797
+ /**
798
+ * @ignore
799
+ */
800
+ export declare class Hdr10MetadataInfo {
801
+ /**
802
+ * @ignore
803
+ */
804
+ redPrimaryX?: number;
805
+ /**
806
+ * @ignore
807
+ */
808
+ redPrimaryY?: number;
809
+ /**
810
+ * @ignore
811
+ */
812
+ greenPrimaryX?: number;
813
+ /**
814
+ * @ignore
815
+ */
816
+ greenPrimaryY?: number;
817
+ /**
818
+ * @ignore
819
+ */
820
+ bluePrimaryX?: number;
821
+ /**
822
+ * @ignore
823
+ */
824
+ bluePrimaryY?: number;
825
+ /**
826
+ * @ignore
827
+ */
828
+ whitePointX?: number;
829
+ /**
830
+ * @ignore
831
+ */
832
+ whitePointY?: number;
833
+ /**
834
+ * @ignore
835
+ */
836
+ maxMasteringLuminance?: number;
837
+ /**
838
+ * @ignore
839
+ */
840
+ minMasteringLuminance?: number;
841
+ /**
842
+ * @ignore
843
+ */
844
+ maxContentLightLevel?: number;
845
+ /**
846
+ * @ignore
847
+ */
848
+ maxFrameAverageLightLevel?: number;
849
+ }
850
+ /**
851
+ * The relative position of alphaBuffer and video frames.
852
+ */
853
+ export declare enum AlphaStitchMode {
854
+ /**
855
+ * 0: (Default) Only video frame, that is, alphaBuffer is not stitched with the video frame.
856
+ */
857
+ NoAlphaStitch = 0,
858
+ /**
859
+ * 1: alphaBuffer is above the video frame.
860
+ */
861
+ AlphaStitchUp = 1,
862
+ /**
863
+ * 2: alphaBuffer is below the video frame.
864
+ */
865
+ AlphaStitchBelow = 2,
866
+ /**
867
+ * 3: alphaBuffer is to the left of the video frame.
868
+ */
869
+ AlphaStitchLeft = 3,
870
+ /**
871
+ * 4: alphaBuffer is to the right of the video frame.
872
+ */
873
+ AlphaStitchRight = 4
874
+ }
875
+ /**
876
+ * @ignore
877
+ */
878
+ export declare enum EglContextType {
879
+ /**
880
+ * @ignore
881
+ */
882
+ EglContext10 = 0,
883
+ /**
884
+ * @ignore
885
+ */
886
+ EglContext14 = 1
887
+ }
888
+ /**
889
+ * The video buffer type.
890
+ */
891
+ export declare enum VideoBufferType {
892
+ /**
893
+ * 1: The video buffer in the format of raw data.
894
+ */
895
+ VideoBufferRawData = 1,
896
+ /**
897
+ * 2: The video buffer in the format of raw data.
898
+ */
899
+ VideoBufferArray = 2,
900
+ /**
901
+ * 3: The video buffer in the format of Texture.
902
+ */
903
+ VideoBufferTexture = 3
904
+ }
905
+ /**
906
+ * The external video frame.
907
+ */
908
+ export declare class ExternalVideoFrame {
909
+ /**
910
+ * The video type. See VideoBufferType.
911
+ */
912
+ type?: VideoBufferType;
913
+ /**
914
+ * The pixel format. See VideoPixelFormat.
915
+ */
916
+ format?: VideoPixelFormat;
917
+ /**
918
+ * Video frame buffer.
919
+ */
920
+ buffer?: Uint8Array;
921
+ /**
922
+ * Line spacing of the incoming video frame, which must be in pixels instead of bytes. For textures, it is the width of the texture.
923
+ */
924
+ stride?: number;
925
+ /**
926
+ * Height of the incoming video frame.
927
+ */
928
+ height?: number;
929
+ /**
930
+ * Raw data related parameter. The number of pixels trimmed from the left. The default value is 0.
931
+ */
932
+ cropLeft?: number;
933
+ /**
934
+ * Raw data related parameter. The number of pixels trimmed from the top. The default value is 0.
935
+ */
936
+ cropTop?: number;
937
+ /**
938
+ * Raw data related parameter. The number of pixels trimmed from the right. The default value is 0.
939
+ */
940
+ cropRight?: number;
941
+ /**
942
+ * Raw data related parameter. The number of pixels trimmed from the bottom. The default value is 0.
943
+ */
944
+ cropBottom?: number;
945
+ /**
946
+ * Raw data related parameter. The clockwise rotation of the video frame. You can set the rotation angle as 0, 90, 180, or 270. The default value is 0.
947
+ */
948
+ rotation?: number;
949
+ /**
950
+ * Timestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video.
951
+ */
952
+ timestamp?: number;
953
+ /**
954
+ * This parameter only applies to video data in Texture format. Texture ID of the video frame.
955
+ */
956
+ eglType?: EglContextType;
957
+ /**
958
+ * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
959
+ */
960
+ textureId?: number;
961
+ /**
962
+ * @ignore
963
+ */
964
+ fenceObject?: number;
965
+ /**
966
+ * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
967
+ */
968
+ matrix?: number[];
969
+ /**
970
+ * This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
971
+ */
972
+ metadataBuffer?: Uint8Array;
973
+ /**
974
+ * This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
975
+ */
976
+ metadataSize?: number;
977
+ /**
978
+ * The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from [0,255], where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering.
979
+ */
980
+ alphaBuffer?: Uint8Array;
981
+ /**
982
+ * This parameter only applies to video data in BGRA or RGBA format. Whether to extract the alpha channel data from the video frame and automatically fill it into alphaBuffer : true :Extract and fill the alpha channel data. false : (Default) Do not extract and fill the Alpha channel data. For video data in BGRA or RGBA format, you can set the Alpha channel data in either of the following ways:
983
+ * Automatically by setting this parameter to true.
984
+ * Manually through the alphaBuffer parameter.
985
+ */
986
+ fillAlphaBuffer?: boolean;
987
+ /**
988
+ * When the video frame contains alpha channel data, it represents the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
989
+ */
990
+ alphaStitchMode?: AlphaStitchMode;
991
+ /**
992
+ * This parameter only applies to video data in Windows Texture format. It represents a pointer to an object of type ID3D11Texture2D, which is used by a video frame.
993
+ */
994
+ d3d11Texture2d?: any;
995
+ /**
996
+ * This parameter only applies to video data in Windows Texture format. It represents an index of an ID3D11Texture2D texture object used by the video frame in the ID3D11Texture2D array.
997
+ */
998
+ textureSliceIndex?: number;
999
+ /**
1000
+ * @ignore
1001
+ */
1002
+ hdr10MetadataInfo?: Hdr10MetadataInfo;
1003
+ /**
1004
+ * By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
1005
+ */
1006
+ colorSpace?: ColorSpace;
1007
+ }
1008
+ /**
1009
+ * Configurations of the video frame.
1010
+ *
1011
+ * Note that the buffer provides a pointer to a pointer. This interface cannot modify the pointer of the buffer, but it can modify the content of the buffer.
1012
+ */
1013
+ export declare class VideoFrame {
1014
+ /**
1015
+ * The pixel format. See VideoPixelFormat.
1016
+ */
1017
+ type?: VideoPixelFormat;
1018
+ /**
1019
+ * The width of the video, in pixels.
1020
+ */
1021
+ width?: number;
1022
+ /**
1023
+ * The height of the video, in pixels.
1024
+ */
1025
+ height?: number;
1026
+ /**
1027
+ * For YUV data, the line span of the Y buffer; for RGBA data, the total data length. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
1028
+ */
1029
+ yStride?: number;
1030
+ /**
1031
+ * For YUV data, the line span of the U buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
1032
+ */
1033
+ uStride?: number;
1034
+ /**
1035
+ * For YUV data, the line span of the V buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
1036
+ */
1037
+ vStride?: number;
1038
+ /**
1039
+ * For YUV data, the pointer to the Y buffer; for RGBA data, the data buffer.
1040
+ */
1041
+ yBuffer?: Uint8Array;
1042
+ /**
1043
+ * For YUV data, the pointer to the U buffer; for RGBA data, the value is 0.
1044
+ */
1045
+ uBuffer?: Uint8Array;
1046
+ /**
1047
+ * For YUV data, the pointer to the V buffer; for RGBA data, the value is 0.
1048
+ */
1049
+ vBuffer?: Uint8Array;
1050
+ /**
1051
+ * The clockwise rotation of the video frame before rendering. Supported values include 0, 90, 180, and 270 degrees.
1052
+ */
1053
+ rotation?: number;
1054
+ /**
1055
+ * The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. This parameter is required.
1056
+ */
1057
+ renderTimeMs?: number;
1058
+ /**
1059
+ * Reserved for future use.
1060
+ */
1061
+ avsync_type?: number;
1062
+ /**
1063
+ * This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
1064
+ */
1065
+ metadata_buffer?: Uint8Array;
1066
+ /**
1067
+ * This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
1068
+ */
1069
+ metadata_size?: number;
1070
+ /**
1071
+ * This parameter only applies to video data in Texture format. Texture ID.
1072
+ */
1073
+ textureId?: number;
1074
+ /**
1075
+ * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
1076
+ */
1077
+ matrix?: number[];
1078
+ /**
1079
+ * The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from [0,255], where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc.
1080
+ * In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering.
1081
+ * Make sure that alphaBuffer is exactly the same size as the video frame (width × height), otherwise it may cause the app to crash.
1082
+ */
1083
+ alphaBuffer?: Uint8Array;
1084
+ /**
1085
+ * When the video frame contains alpha channel data, it represents the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
1086
+ */
1087
+ alphaStitchMode?: AlphaStitchMode;
1088
+ /**
1089
+ * @ignore
1090
+ */
1091
+ pixelBuffer?: Uint8Array;
1092
+ /**
1093
+ * The meta information in the video frame. To use this parameter, contact.
1094
+ */
1095
+ metaInfo?: IVideoFrameMetaInfo;
1096
+ /**
1097
+ * @ignore
1098
+ */
1099
+ hdr10MetadataInfo?: Hdr10MetadataInfo;
1100
+ /**
1101
+ * By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
1102
+ */
1103
+ colorSpace?: ColorSpace;
1104
+ }
1105
+ /**
1106
+ * @ignore
1107
+ */
1108
+ export declare enum MediaPlayerSourceType {
1109
+ /**
1110
+ * @ignore
1111
+ */
1112
+ MediaPlayerSourceDefault = 0,
1113
+ /**
1114
+ * @ignore
1115
+ */
1116
+ MediaPlayerSourceFullFeatured = 1,
1117
+ /**
1118
+ * @ignore
1119
+ */
1120
+ MediaPlayerSourceSimple = 2
1121
+ }
1122
+ /**
1123
+ * The frame position of the video observer.
1124
+ */
1125
+ export declare enum VideoModulePosition {
1126
+ /**
1127
+ * 1: The location of the locally collected video data after preprocessing corresponds to the onCaptureVideoFrame callback. The observed video here has the effect of video pre-processing, which can be verified by enabling image enhancement, virtual background, or watermark.
1128
+ */
1129
+ PositionPostCapturer = 1,
1130
+ /**
1131
+ * 2: The pre-renderer position, which corresponds to the video data in the onRenderVideoFrame callback.
1132
+ */
1133
+ PositionPreRenderer = 2,
1134
+ /**
1135
+ * 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. The observed video here has the effects of video pre-processing and encoding pre-processing.
1136
+ * To verify the pre-processing effects of the video, you can enable image enhancement, virtual background, or watermark.
1137
+ * To verify the pre-encoding processing effect, you can set a lower frame rate (for example, 5 fps).
1138
+ */
1139
+ PositionPreEncoder = 4,
1140
+ /**
1141
+ * 8: The position after local video capture and before pre-processing. The observed video here does not have pre-processing effects, which can be verified by enabling image enhancement, virtual background, or watermarks.
1142
+ */
1143
+ PositionPostCapturerOrigin = 8
1144
+ }
1145
+ /**
1146
+ * The snapshot configuration.
1147
+ */
1148
+ export declare class SnapshotConfig {
1149
+ /**
1150
+ * The local path (including filename extensions) of the snapshot. For example:
1151
+ * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
1152
+ * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
1153
+ */
1154
+ filePath?: string;
1155
+ /**
1156
+ * The position of the snapshot video frame in the video pipeline. See VideoModulePosition.
1157
+ */
1158
+ position?: VideoModulePosition;
1159
+ }
1160
+ /**
1161
+ * This class is used to get raw PCM audio.
1162
+ *
1163
+ * You can inherit this class and implement the onFrame callback to get raw PCM audio.
1164
+ */
1165
+ export interface IAudioPcmFrameSink {
1166
+ /**
1167
+ * Occurs each time the player receives an audio frame.
1168
+ *
1169
+ * After registering the audio frame observer, the callback occurs every time the player receives an audio frame, reporting the detailed information of the audio frame.
1170
+ *
1171
+ * @param frame The audio frame information. See AudioPcmFrame.
1172
+ */
1173
+ onFrame?(frame: AudioPcmFrame): void;
1174
+ }
1175
+ /**
1176
+ * Audio frame type.
1177
+ */
1178
+ export declare enum AudioFrameType {
1179
+ /**
1180
+ * 0: PCM 16
1181
+ */
1182
+ FrameTypePcm16 = 0
1183
+ }
1184
+ /**
1185
+ * Raw audio data.
1186
+ */
1187
+ export declare class AudioFrame {
1188
+ /**
1189
+ * The type of the audio frame. See AudioFrameType.
1190
+ */
1191
+ type?: AudioFrameType;
1192
+ /**
1193
+ * The number of samples per channel in the audio frame.
1194
+ */
1195
+ samplesPerChannel?: number;
1196
+ /**
1197
+ * The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).
1198
+ */
1199
+ bytesPerSample?: BytesPerSample;
1200
+ /**
1201
+ * The number of audio channels (the data are interleaved if it is stereo).
1202
+ * 1: Mono.
1203
+ * 2: Stereo.
1204
+ */
1205
+ channels?: number;
1206
+ /**
1207
+ * The number of samples per channel in the audio frame.
1208
+ */
1209
+ samplesPerSec?: number;
1210
+ /**
1211
+ * The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved. The size of the data buffer is as follows: buffer = samples × channels × bytesPerSample.
1212
+ */
1213
+ buffer?: Uint8Array;
1214
+ /**
1215
+ * The timestamp (ms) of the external audio frame. You can use this timestamp to restore the order of the captured audio frame, and synchronize audio and video frames in video scenarios, including scenarios where external video sources are used.
1216
+ */
1217
+ renderTimeMs?: number;
1218
+ /**
1219
+ * Reserved for future use.
1220
+ */
1221
+ avsync_type?: number;
1222
+ /**
1223
+ * @ignore
1224
+ */
1225
+ presentationMs?: number;
1226
+ /**
1227
+ * @ignore
1228
+ */
1229
+ audioTrackNumber?: number;
1230
+ /**
1231
+ * @ignore
1232
+ */
1233
+ rtpTimestamp?: number;
1234
+ }
1235
+ /**
1236
+ * @ignore
1237
+ */
1238
+ export declare enum AudioFramePosition {
1239
+ /**
1240
+ * @ignore
1241
+ */
1242
+ AudioFramePositionNone = 0,
1243
+ /**
1244
+ * @ignore
1245
+ */
1246
+ AudioFramePositionPlayback = 1,
1247
+ /**
1248
+ * @ignore
1249
+ */
1250
+ AudioFramePositionRecord = 2,
1251
+ /**
1252
+ * @ignore
1253
+ */
1254
+ AudioFramePositionMixed = 4,
1255
+ /**
1256
+ * @ignore
1257
+ */
1258
+ AudioFramePositionBeforeMixing = 8,
1259
+ /**
1260
+ * @ignore
1261
+ */
1262
+ AudioFramePositionEarMonitoring = 16
1263
+ }
1264
+ /**
1265
+ * Audio data format.
1266
+ *
1267
+ * The SDK sets the audio data format in the following callbacks according to AudioParams. onRecordAudioFrame onPlaybackAudioFrame onMixedAudioFrame
1268
+ * The SDK calculates the sampling interval through the samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks according to the sampling interval. Sample interval (sec) = samplePerCall /(sampleRate × channel).
1269
+ * Ensure that the sample interval ≥ 0.01 (s).
1270
+ */
1271
+ export declare class AudioParams {
1272
+ /**
1273
+ * The audio sample rate (Hz), which can be set as one of the following values:
1274
+ * 8000.
1275
+ * (Default) 16000.
1276
+ * 32000.
1277
+ * 44100
1278
+ * 48000
1279
+ */
1280
+ sample_rate?: number;
1281
+ /**
1282
+ * The number of audio channels, which can be set as either of the following values:
1283
+ * 1: (Default) Mono.
1284
+ * 2: Stereo.
1285
+ */
1286
+ channels?: number;
1287
+ /**
1288
+ * The use mode of the audio data. See RawAudioFrameOpModeType.
1289
+ */
1290
+ mode?: RawAudioFrameOpModeType;
1291
+ /**
1292
+ * The number of samples, such as 1024 for the media push.
1293
+ */
1294
+ samples_per_call?: number;
1295
+ }
1296
+ /**
1297
+ * The audio frame observer.
1298
+ */
1299
+ export interface IAudioFrameObserverBase {
1300
+ /**
1301
+ * Gets the captured audio frame.
1302
+ *
1303
+ * To ensure that the data format of captured audio frame is as expected, Agora recommends that you set the audio data format as follows: After calling setRecordingAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object, the SDK will calculate the sampling interval according to the parameters set in this method, and triggers the onRecordAudioFrame callback according to the sampling interval.
1304
+ *
1305
+ * @param channelId The channel ID.
1306
+ * @param audioFrame The raw audio data. See AudioFrame.
1307
+ */
1308
+ onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1309
+ /**
1310
+ * Gets the raw audio frame for playback.
1311
+ *
1312
+ * To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.
1313
+ *
1314
+ * @param channelId The channel ID.
1315
+ * @param audioFrame The raw audio data. See AudioFrame.
1316
+ */
1317
+ onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1318
+ /**
1319
+ * Retrieves the mixed captured and playback audio frame.
1320
+ *
1321
+ * To ensure that the data format of mixed captured and playback audio frame meets the expectations, Agora recommends that you set the data format as follows: After calling setMixedAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onMixedAudioFrame callback according to the sampling interval.
1322
+ *
1323
+ * @param channelId The channel ID.
1324
+ * @param audioFrame The raw audio data. See AudioFrame.
1325
+ */
1326
+ onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1327
+ /**
1328
+ * Gets the in-ear monitoring audio frame.
1329
+ *
1330
+ * In order to ensure that the obtained in-ear audio data meets the expectations, Agora recommends that you set the in-ear monitoring-ear audio data format as follows: After calling setEarMonitoringAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
1331
+ *
1332
+ * @param audioFrame The raw audio data. See AudioFrame.
1333
+ */
1334
+ onEarMonitoringAudioFrame?(audioFrame: AudioFrame): void;
1335
+ }
1336
+ /**
1337
+ * The audio frame observer.
1338
+ */
1339
+ export interface IAudioFrameObserver extends IAudioFrameObserverBase {
1340
+ /**
1341
+ * Retrieves the audio frame before mixing of subscribed remote users.
1342
+ *
1343
+ * Due to framework limitations, this callback does not support sending processed audio data back to the SDK.
1344
+ *
1345
+ * @param channelId The channel ID.
1346
+ * @param uid The ID of subscribed remote users.
1347
+ * @param audioFrame The raw audio data. See AudioFrame.
1348
+ */
1349
+ onPlaybackAudioFrameBeforeMixing?(channelId: string, uid: number, audioFrame: AudioFrame): void;
1350
+ }
1351
+ /**
1352
+ * The audio spectrum data.
1353
+ */
1354
+ export declare class AudioSpectrumData {
1355
+ /**
1356
+ * The audio spectrum data. Agora divides the audio frequency into 256 frequency domains, and reports the energy value of each frequency domain through this parameter. The value range of each energy type is [-300, 1] and the unit is dBFS.
1357
+ */
1358
+ audioSpectrumData?: number[];
1359
+ /**
1360
+ * The audio spectrum data length is 256.
1361
+ */
1362
+ dataLength?: number;
1363
+ }
1364
+ /**
1365
+ * Audio spectrum information of the remote user.
1366
+ */
1367
+ export declare class UserAudioSpectrumInfo {
1368
+ /**
1369
+ * The user ID of the remote user.
1370
+ */
1371
+ uid?: number;
1372
+ /**
1373
+ * Audio spectrum information of the remote user. See AudioSpectrumData.
1374
+ */
1375
+ spectrumData?: AudioSpectrumData;
1376
+ }
1377
+ /**
1378
+ * The audio spectrum observer.
1379
+ */
1380
+ export interface IAudioSpectrumObserver {
1381
+ /**
1382
+ * Gets the statistics of a local audio spectrum.
1383
+ *
1384
+ * After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback as the time interval you set to report the received remote audio data spectrum before encoding.
1385
+ *
1386
+ * @param data The audio spectrum data of the local user. See AudioSpectrumData.
1387
+ */
1388
+ onLocalAudioSpectrum?(data: AudioSpectrumData): void;
1389
+ /**
1390
+ * Gets the remote audio spectrum.
1391
+ *
1392
+ * After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in the IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
1393
+ *
1394
+ * @param spectrums The audio spectrum information of the remote user. See UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected.
1395
+ * @param spectrumNumber The number of remote users.
1396
+ */
1397
+ onRemoteAudioSpectrum?(spectrums: UserAudioSpectrumInfo[], spectrumNumber: number): void;
1398
+ }
1399
+ /**
1400
+ * Receives encoded video images.
1401
+ */
1402
+ export interface IVideoEncodedFrameObserver {
1403
+ /**
1404
+ * Reports that the receiver has received the to-be-decoded video frame sent by the remote end.
1405
+ *
1406
+ * If you call the setRemoteVideoSubscriptionOptions method and set encodedFrameOnly to true, the SDK triggers this callback locally to report the received encoded video frame information.
1407
+ *
1408
+ * @param uid The user ID of the remote user.
1409
+ * @param imageBuffer The encoded video image buffer.
1410
+ * @param length The data length of the video image.
1411
+ * @param videoEncodedFrameInfo For the information of the encoded video frame, see EncodedVideoFrameInfo.
1412
+ */
1413
+ onEncodedVideoFrameReceived?(uid: number, imageBuffer: Uint8Array, length: number, videoEncodedFrameInfo: EncodedVideoFrameInfo): void;
1414
+ }
1415
+ /**
1416
+ * The process mode of the video frame:
1417
+ */
1418
+ export declare enum VideoFrameProcessMode {
1419
+ /**
1420
+ * Read-only mode. In this mode, you do not modify the video frame. The video frame observer is a renderer.
1421
+ */
1422
+ ProcessModeReadOnly = 0,
1423
+ /**
1424
+ * Read and write mode. In this mode, you modify the video frame. The video frame observer is a video filter.
1425
+ */
1426
+ ProcessModeReadWrite = 1
1427
+ }
1428
+ /**
1429
+ * The IVideoFrameObserver class.
1430
+ */
1431
+ export interface IVideoFrameObserver {
1432
+ /**
1433
+ * Occurs each time the SDK receives a video frame captured by local devices.
1434
+ *
1435
+ * You can get raw video data collected by the local device through this callback.
1436
+ *
1437
+ * @param sourceType Video source types, including cameras, screens, or media player. See VideoSourceType.
1438
+ * @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
1439
+ * macOS: I420
1440
+ * Windows: YUV420
1441
+ */
1442
+ onCaptureVideoFrame?(sourceType: VideoSourceType, videoFrame: VideoFrame): void;
1443
+ /**
1444
+ * Occurs each time the SDK receives a video frame before encoding.
1445
+ *
1446
+ * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios. After processing, you can send the processed video data back to the SDK in this callback.
1447
+ * It is recommended that you ensure the modified parameters in videoFrame are consistent with the actual situation of the video frames in the video frame buffer. Otherwise, it may cause unexpected rotation, distortion, and other issues in the local preview and remote video display.
1448
+ * It's recommended that you implement this callback through the C++ API.
1449
+ * Due to framework limitations, this callback does not support sending processed video data back to the SDK.
1450
+ * The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
1451
+ *
1452
+ * @param sourceType The type of the video source. See VideoSourceType.
1453
+ * @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
1454
+ * macOS: I420
1455
+ * Windows: YUV420
1456
+ */
1457
+ onPreEncodeVideoFrame?(sourceType: VideoSourceType, videoFrame: VideoFrame): void;
1458
+ /**
1459
+ * @ignore
1460
+ */
1461
+ onMediaPlayerVideoFrame?(videoFrame: VideoFrame, mediaPlayerId: number): void;
1462
+ /**
1463
+ * Occurs each time the SDK receives a video frame sent by the remote user.
1464
+ *
1465
+ * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data sent from the remote end before rendering, and then process it according to the particular scenarios.
1466
+ * It is recommended that you ensure the modified parameters in videoFrame are consistent with the actual situation of the video frames in the video frame buffer. Otherwise, it may cause unexpected rotation, distortion, and other issues in the local preview and remote video display.
1467
+ * If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
1468
+ * It's recommended that you implement this callback through the C++ API.
1469
+ * Due to framework limitations, this callback does not support sending processed video data back to the SDK.
1470
+ *
1471
+ * @param channelId The channel ID.
1472
+ * @param remoteUid The user ID of the remote user who sends the current video frame.
1473
+ * @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
1474
+ * macOS: I420
1475
+ * Windows: YUV420
1476
+ */
1477
+ onRenderVideoFrame?(channelId: string, remoteUid: number, videoFrame: VideoFrame): void;
1478
+ /**
1479
+ * @ignore
1480
+ */
1481
+ onTranscodedVideoFrame?(videoFrame: VideoFrame): void;
1482
+ }
1483
+ /**
1484
+ * The external video frame encoding type.
1485
+ */
1486
+ export declare enum ExternalVideoSourceType {
1487
+ /**
1488
+ * 0: The video frame is not encoded.
1489
+ */
1490
+ VideoFrame = 0,
1491
+ /**
1492
+ * 1: The video frame is encoded.
1493
+ */
1494
+ EncodedVideoFrame = 1
1495
+ }
1496
+ /**
1497
+ * @ignore
1498
+ */
1499
+ export declare enum MediaRecorderContainerFormat {
1500
+ /**
1501
+ * @ignore
1502
+ */
1503
+ FormatMp4 = 1
1504
+ }
1505
+ /**
1506
+ * The recording content.
1507
+ */
1508
+ export declare enum MediaRecorderStreamType {
1509
+ /**
1510
+ * Only audio.
1511
+ */
1512
+ StreamTypeAudio = 1,
1513
+ /**
1514
+ * Only video.
1515
+ */
1516
+ StreamTypeVideo = 2,
1517
+ /**
1518
+ * (Default) Audio and video.
1519
+ */
1520
+ StreamTypeBoth = 3
1521
+ }
1522
+ /**
1523
+ * The current recording state.
1524
+ */
1525
+ export declare enum RecorderState {
1526
+ /**
1527
+ * -1: An error occurs during the recording. See RecorderReasonCode for the reason.
1528
+ */
1529
+ RecorderStateError = -1,
1530
+ /**
1531
+ * 2: The audio and video recording starts.
1532
+ */
1533
+ RecorderStateStart = 2,
1534
+ /**
1535
+ * 3: The audio and video recording stops.
1536
+ */
1537
+ RecorderStateStop = 3
1538
+ }
1539
+ /**
1540
+ * The reason for the state change.
1541
+ */
1542
+ export declare enum RecorderReasonCode {
1543
+ /**
1544
+ * 0: No error.
1545
+ */
1546
+ RecorderReasonNone = 0,
1547
+ /**
1548
+ * @ignore
1549
+ */
1550
+ RecorderReasonWriteFailed = 1,
1551
+ /**
1552
+ * @ignore
1553
+ */
1554
+ RecorderReasonNoStream = 2,
1555
+ /**
1556
+ * @ignore
1557
+ */
1558
+ RecorderReasonOverMaxDuration = 3,
1559
+ /**
1560
+ * @ignore
1561
+ */
1562
+ RecorderReasonConfigChanged = 4
1563
+ }
1564
+ /**
1565
+ * @ignore
1566
+ */
1567
+ export declare class MediaRecorderConfiguration {
1568
+ /**
1569
+ * @ignore
1570
+ */
1571
+ storagePath?: string;
1572
+ /**
1573
+ * @ignore
1574
+ */
1575
+ containerFormat?: MediaRecorderContainerFormat;
1576
+ /**
1577
+ * @ignore
1578
+ */
1579
+ streamType?: MediaRecorderStreamType;
1580
+ /**
1581
+ * @ignore
1582
+ */
1583
+ maxDurationMs?: number;
1584
+ /**
1585
+ * @ignore
1586
+ */
1587
+ recorderInfoUpdateInterval?: number;
1588
+ /**
1589
+ * @ignore
1590
+ */
1591
+ width?: number;
1592
+ /**
1593
+ * @ignore
1594
+ */
1595
+ height?: number;
1596
+ /**
1597
+ * @ignore
1598
+ */
1599
+ fps?: number;
1600
+ /**
1601
+ * @ignore
1602
+ */
1603
+ sample_rate?: number;
1604
+ /**
1605
+ * @ignore
1606
+ */
1607
+ channel_num?: number;
1608
+ /**
1609
+ * @ignore
1610
+ */
1611
+ videoSourceType?: VideoSourceType;
1612
+ }
1613
+ /**
1614
+ * Facial information observer.
1615
+ *
1616
+ * You can call registerFaceInfoObserver to register one IFaceInfoObserver observer.
1617
+ */
1618
+ export interface IFaceInfoObserver {
1619
+ /**
1620
+ * Occurs when the facial information processed by speech driven extension is received.
1621
+ *
1622
+ * @param outFaceInfo Output parameter, the JSON string of the facial information processed by the voice driver plugin, including the following fields:
1623
+ * faces: Object sequence. The collection of facial information, with each face corresponding to an object.
1624
+ * blendshapes: Object. The collection of face capture coefficients, named according to ARkit standards, with each key-value pair representing a blendshape coefficient. The blendshape coefficient is a floating point number with a range of [0.0, 1.0].
1625
+ * rotation: Object sequence. The rotation of the head, which includes the following three key-value pairs, with values as floating point numbers ranging from -180.0 to 180.0:
1626
+ * pitch: Head pitch angle. A positve value means looking down, while a negative value means looking up.
1627
+ * yaw: Head yaw angle. A positve value means turning left, while a negative value means turning right.
1628
+ * roll: Head roll angle. A positve value means tilting to the right, while a negative value means tilting to the left.
1629
+ * timestamp: String. The timestamp of the output result, in milliseconds. Here is an example of JSON:
1630
+ * { "faces":[{ "blendshapes":{ "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0, "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0, "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0, "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0, "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0, "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0, "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0, "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0, "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0, "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0, "tongueOut":0.0 }, "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5},
1631
+ * }], "timestamp":"654879876546" }
1632
+ *
1633
+ * @returns
1634
+ * true : Facial information JSON parsing successful. false : Facial information JSON parsing failed.
1635
+ */
1636
+ onFaceInfo?(outFaceInfo: string): void;
1637
+ }
1638
+ /**
1639
+ * @ignore
1640
+ */
1641
+ export declare class RecorderInfo {
1642
+ /**
1643
+ * @ignore
1644
+ */
1645
+ fileName?: string;
1646
+ /**
1647
+ * @ignore
1648
+ */
1649
+ durationMs?: number;
1650
+ /**
1651
+ * @ignore
1652
+ */
1653
+ fileSize?: number;
1654
+ }
1655
+ /**
1656
+ * @ignore
1657
+ */
1658
+ export interface IMediaRecorderObserver {
1659
+ /**
1660
+ * @ignore
1661
+ */
1662
+ onRecorderStateChanged?(channelId: string, uid: number, state: RecorderState, reason: RecorderReasonCode): void;
1663
+ /**
1664
+ * @ignore
1665
+ */
1666
+ onRecorderInfoUpdated?(channelId: string, uid: number, info: RecorderInfo): void;
1667
+ }
1668
+ //# sourceMappingURL=AgoraMediaBase.d.ts.map