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,250 @@
1
+ import './extension/IAgoraSpatialAudioExtension';
2
+ import { RtcConnection } from './IAgoraRtcEngineEx';
3
+
4
+ /**
5
+ * The spatial position of the remote user or the media player.
6
+ */
7
+ export class RemoteVoicePositionInfo {
8
+ /**
9
+ * The coordinates in the world coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn.
10
+ */
11
+ position?: number[];
12
+ /**
13
+ * The unit vector of the x axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn.
14
+ */
15
+ forward?: number[];
16
+ }
17
+
18
+ /**
19
+ * Sound insulation area settings.
20
+ */
21
+ export class SpatialAudioZone {
22
+ /**
23
+ * The ID of the sound insulation area.
24
+ */
25
+ zoneSetId?: number;
26
+ /**
27
+ * The spatial center point of the sound insulation area. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn.
28
+ */
29
+ position?: number[];
30
+ /**
31
+ * Starting at position, the forward unit vector. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn.
32
+ */
33
+ forward?: number[];
34
+ /**
35
+ * Starting at position, the right unit vector. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn.
36
+ */
37
+ right?: number[];
38
+ /**
39
+ * Starting at position, the up unit vector. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn.
40
+ */
41
+ up?: number[];
42
+ /**
43
+ * The entire sound insulation area is regarded as a cube; this represents the length of the forward side in the unit length of the game engine.
44
+ */
45
+ forwardLength?: number;
46
+ /**
47
+ * The entire sound insulation area is regarded as a cube; this represents the length of the right side in the unit length of the game engine.
48
+ */
49
+ rightLength?: number;
50
+ /**
51
+ * The entire sound insulation area is regarded as a cube; this represents the length of the up side in the unit length of the game engine.
52
+ */
53
+ upLength?: number;
54
+ /**
55
+ * The sound attenuation coefficient when users within the sound insulation area communicate with external users. The value range is [0,1]. The values are as follows:
56
+ * 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.
57
+ * (0,0.5): Weak attenuation mode, that is, the volume and timbre are only weakly attenuated during the propagation process, and the sound can travel farther than the real environment.
58
+ * 0.5: (Default) simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the audioAttenuation parameter.
59
+ * (0.5,1]: Strong attenuation mode (default value is 1), that is, the volume and timbre attenuate rapidly during propagation.
60
+ */
61
+ audioAttenuation?: number;
62
+ }
63
+
64
+ /**
65
+ * This class calculates user positions through the SDK to implement the spatial audio effect.
66
+ *
67
+ * This class inherits from IBaseSpatialAudioEngine. Before calling other APIs in this class, you need to call the initialize method to initialize this class.
68
+ */
69
+ export abstract class ILocalSpatialAudioEngine {
70
+ /**
71
+ * @ignore
72
+ */
73
+ abstract release(): void;
74
+
75
+ /**
76
+ * Initializes ILocalSpatialAudioEngine.
77
+ *
78
+ * Before calling other methods of the ILocalSpatialAudioEngine class, you need to call this method to initialize ILocalSpatialAudioEngine.
79
+ * The SDK supports creating only one ILocalSpatialAudioEngine instance for an app.
80
+ *
81
+ * @returns
82
+ * 0: Success.
83
+ * < 0: Failure.
84
+ */
85
+ abstract initialize(): number;
86
+
87
+ /**
88
+ * Updates the spatial position of the specified remote user.
89
+ *
90
+ * After successfully calling this method, the SDK calculates the spatial audio parameters based on the relative position of the local and remote user. Call this method after the or joinChannel method.
91
+ *
92
+ * @param uid The user ID. This parameter must be the same as the user ID passed in when the user joined the channel.
93
+ * @param posInfo The spatial position of the remote user. See RemoteVoicePositionInfo.
94
+ *
95
+ * @returns
96
+ * 0: Success.
97
+ * < 0: Failure.
98
+ */
99
+ abstract updateRemotePosition(
100
+ uid: number,
101
+ posInfo: RemoteVoicePositionInfo
102
+ ): number;
103
+
104
+ /**
105
+ * @ignore
106
+ */
107
+ abstract updateRemotePositionEx(
108
+ uid: number,
109
+ posInfo: RemoteVoicePositionInfo,
110
+ connection: RtcConnection
111
+ ): number;
112
+
113
+ /**
114
+ * Removes the spatial position of the specified remote user.
115
+ *
116
+ * After successfully calling this method, the local user no longer hears the specified remote user. After leaving the channel, to avoid wasting computing resources, call this method to delete the spatial position information of the specified remote user. Otherwise, the user's spatial position information will be saved continuously. When the number of remote users exceeds the number of audio streams that can be received as set in setMaxAudioRecvCount, the system automatically unsubscribes from the audio stream of the user who is furthest away based on relative distance.
117
+ *
118
+ * @param uid The user ID. This parameter must be the same as the user ID passed in when the user joined the channel.
119
+ *
120
+ * @returns
121
+ * 0: Success.
122
+ * < 0: Failure.
123
+ */
124
+ abstract removeRemotePosition(uid: number): number;
125
+
126
+ /**
127
+ * @ignore
128
+ */
129
+ abstract removeRemotePositionEx(
130
+ uid: number,
131
+ connection: RtcConnection
132
+ ): number;
133
+
134
+ /**
135
+ * @ignore
136
+ */
137
+ abstract clearRemotePositionsEx(connection: RtcConnection): number;
138
+
139
+ /**
140
+ * @ignore
141
+ */
142
+ abstract updateSelfPositionEx(
143
+ position: number[],
144
+ axisForward: number[],
145
+ axisRight: number[],
146
+ axisUp: number[],
147
+ connection: RtcConnection
148
+ ): number;
149
+
150
+ /**
151
+ * @ignore
152
+ */
153
+ abstract setMaxAudioRecvCount(maxCount: number): number;
154
+
155
+ /**
156
+ * @ignore
157
+ */
158
+ abstract setAudioRecvRange(range: number): number;
159
+
160
+ /**
161
+ * @ignore
162
+ */
163
+ abstract setDistanceUnit(unit: number): number;
164
+
165
+ /**
166
+ * @ignore
167
+ */
168
+ abstract updateSelfPosition(
169
+ position: number[],
170
+ axisForward: number[],
171
+ axisRight: number[],
172
+ axisUp: number[]
173
+ ): number;
174
+
175
+ /**
176
+ * @ignore
177
+ */
178
+ abstract updatePlayerPositionInfo(
179
+ playerId: number,
180
+ positionInfo: RemoteVoicePositionInfo
181
+ ): number;
182
+
183
+ /**
184
+ * @ignore
185
+ */
186
+ abstract setParameters(params: string): number;
187
+
188
+ /**
189
+ * @ignore
190
+ */
191
+ abstract muteLocalAudioStream(mute: boolean): number;
192
+
193
+ /**
194
+ * @ignore
195
+ */
196
+ abstract muteAllRemoteAudioStreams(mute: boolean): number;
197
+
198
+ /**
199
+ * @ignore
200
+ */
201
+ abstract muteRemoteAudioStream(uid: number, mute: boolean): number;
202
+
203
+ /**
204
+ * Sets the sound attenuation effect for the specified user.
205
+ *
206
+ * @param uid The user ID. This parameter must be the same as the user ID passed in when the user joined the channel.
207
+ * @param attenuation For the user's sound attenuation coefficient, the value range is [0,1]. The values are as follows:
208
+ * 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.
209
+ * (0,0.5): Weak attenuation mode, that is, the volume and timbre are only weakly attenuated during the propagation process, and the sound can travel farther than the real environment.
210
+ * 0.5: (Default) simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the speaker_attenuation parameter.
211
+ * (0.5,1]: Strong attenuation mode, that is, the volume and timbre attenuate rapidly during the propagation process.
212
+ * @param forceSet Whether to force the user's sound attenuation effect: true : Force attenuation to set the sound attenuation of the user. At this time, the attenuation coefficient of the sound insulation area set in the audioAttenuation of the SpatialAudioZone does not take effect for the user.
213
+ * If the sound source and listener are inside and outside the sound isolation area, the sound attenuation effect is determined by the audioAttenuation in SpatialAudioZone.
214
+ * If the sound source and the listener are in the same sound insulation area or outside the same sound insulation area, the sound attenuation effect is determined by attenuation in this method. false : Do not force attenuation to set the user's sound attenuation effect, as shown in the following two cases.
215
+ *
216
+ * @returns
217
+ * 0: Success.
218
+ * < 0: Failure.
219
+ */
220
+ abstract setRemoteAudioAttenuation(
221
+ uid: number,
222
+ attenuation: number,
223
+ forceSet: boolean
224
+ ): number;
225
+
226
+ /**
227
+ * @ignore
228
+ */
229
+ abstract setZones(zones: SpatialAudioZone[], zoneCount: number): number;
230
+
231
+ /**
232
+ * @ignore
233
+ */
234
+ abstract setPlayerAttenuation(
235
+ playerId: number,
236
+ attenuation: number,
237
+ forceSet: boolean
238
+ ): number;
239
+
240
+ /**
241
+ * Removes the spatial positions of all remote users.
242
+ *
243
+ * After successfully calling this method, the local user no longer hears any remote users. After leaving the channel, to avoid wasting resources, you can also call this method to delete the spatial positions of all remote users.
244
+ *
245
+ * @returns
246
+ * 0: Success.
247
+ * < 0: Failure.
248
+ */
249
+ abstract clearRemotePositions(): number;
250
+ }
@@ -0,0 +1,342 @@
1
+ import './extension/IAudioDeviceManagerExtension';
2
+ import { AudioDeviceInfo } from './IAgoraRtcEngine';
3
+
4
+ /**
5
+ * The maximum length of the device ID.
6
+ */
7
+ export enum MaxDeviceIdLengthType {
8
+ /**
9
+ * The maximum length of the device ID is 512 bytes.
10
+ */
11
+ MaxDeviceIdLength = 512,
12
+ }
13
+
14
+ /**
15
+ * Audio device management methods.
16
+ */
17
+ export abstract class IAudioDeviceManager {
18
+ /**
19
+ * Enumerates the audio playback devices.
20
+ *
21
+ * @returns
22
+ * Success: Returns an AudioDeviceInfo array, which includes all the audio playback devices.
23
+ * Failure: An empty array.
24
+ */
25
+ abstract enumeratePlaybackDevices(): AudioDeviceInfo[];
26
+
27
+ /**
28
+ * Enumerates the audio capture devices.
29
+ *
30
+ * @returns
31
+ * Success: An AudioDeviceInfo array, which includes all the audio capture devices.
32
+ * Failure: An empty array.
33
+ */
34
+ abstract enumerateRecordingDevices(): AudioDeviceInfo[];
35
+
36
+ /**
37
+ * Sets the audio playback device.
38
+ *
39
+ * You can call this method to change the audio route currently being used, but this does not change the default audio route. For example, if the default audio route is speaker 1, you call this method to set the audio route as speaker 2 before joinging a channel and then start a device test, the SDK conducts device test on speaker 2. After the device test is completed and you join a channel, the SDK still uses speaker 1, the default audio route.
40
+ *
41
+ * @param deviceId The ID of the specified audio playback device. You can get the device ID by calling enumeratePlaybackDevices. Connecting or disconnecting the audio device does not change the value of deviceId. The maximum length is MaxDeviceIdLengthType.
42
+ *
43
+ * @returns
44
+ * 0: Success.
45
+ * < 0: Failure.
46
+ */
47
+ abstract setPlaybackDevice(deviceId: string): number;
48
+
49
+ /**
50
+ * Retrieves the audio playback device associated with the device ID.
51
+ *
52
+ * @returns
53
+ * The current audio playback device.
54
+ */
55
+ abstract getPlaybackDevice(): string;
56
+
57
+ /**
58
+ * Retrieves the information of the audio playback device.
59
+ *
60
+ * @returns
61
+ * An AudioDeviceInfo object, which contains the ID and device name of the audio devices.
62
+ */
63
+ abstract getPlaybackDeviceInfo(): AudioDeviceInfo;
64
+
65
+ /**
66
+ * Sets the volume of the audio playback device.
67
+ *
68
+ * This method applies to Windows only.
69
+ *
70
+ * @param volume The volume of the audio playback device. The value range is [0,255].
71
+ *
72
+ * @returns
73
+ * 0: Success.
74
+ * < 0: Failure.
75
+ */
76
+ abstract setPlaybackDeviceVolume(volume: number): number;
77
+
78
+ /**
79
+ * Retrieves the volume of the audio playback device.
80
+ *
81
+ * @returns
82
+ * The volume of the audio playback device. The value range is [0,255].
83
+ */
84
+ abstract getPlaybackDeviceVolume(): number;
85
+
86
+ /**
87
+ * Sets the audio capture device.
88
+ *
89
+ * You can call this method to change the audio route currently being used, but this does not change the default audio route. For example, if the default audio route is microphone, you call this method to set the audio route as bluetooth earphones before joinging a channel and then start a device test, the SDK conducts device test on the bluetooth earphones. After the device test is completed and you join a channel, the SDK still uses the microphone for audio capturing.
90
+ *
91
+ * @param deviceId The ID of the audio capture device. You can get the Device ID by calling enumerateRecordingDevices. Connecting or disconnecting the audio device does not change the value of deviceId. The maximum length is MaxDeviceIdLengthType.
92
+ *
93
+ * @returns
94
+ * 0: Success.
95
+ * < 0: Failure.
96
+ */
97
+ abstract setRecordingDevice(deviceId: string): number;
98
+
99
+ /**
100
+ * Gets the current audio recording device.
101
+ *
102
+ * @returns
103
+ * The current audio recording device.
104
+ */
105
+ abstract getRecordingDevice(): string;
106
+
107
+ /**
108
+ * Retrieves the information of the audio recording device.
109
+ *
110
+ * @returns
111
+ * An AudioDeviceInfo object, which includes the device ID and device name.
112
+ */
113
+ abstract getRecordingDeviceInfo(): AudioDeviceInfo;
114
+
115
+ /**
116
+ * Sets the volume of the audio capture device.
117
+ *
118
+ * This method is for Windows and macOS only.
119
+ *
120
+ * @param volume The volume of the audio recording device. The value range is [0,255]. 0 means no sound, 255 means maximum volume.
121
+ *
122
+ * @returns
123
+ * 0: Success.
124
+ * < 0: Failure.
125
+ */
126
+ abstract setRecordingDeviceVolume(volume: number): number;
127
+
128
+ /**
129
+ * Retrieves the volume of the audio recording device.
130
+ *
131
+ * This method applies to Windows only.
132
+ *
133
+ * @returns
134
+ * The volume of the audio recording device. The value range is [0,255].
135
+ */
136
+ abstract getRecordingDeviceVolume(): number;
137
+
138
+ /**
139
+ * Sets the loopback device.
140
+ *
141
+ * The SDK uses the current playback device as the loopback device by default. If you want to specify another audio device as the loopback device, call this method, and set deviceId to the loopback device you want to specify. You can call this method to change the audio route currently being used, but this does not change the default audio route. For example, if the default audio route is microphone, you call this method to set the audio route as a sound card before joinging a channel and then start a device test, the SDK conducts device test on the sound card. After the device test is completed and you join a channel, the SDK still uses the microphone for audio capturing. This method is for Windows and macOS only. The scenarios where this method is applicable are as follows: Use app A to play music through a Bluetooth headset; when using app B for a video conference, play through the speakers.
142
+ * If the loopback device is set as the Bluetooth headset, the SDK publishes the music in app A to the remote end.
143
+ * If the loopback device is set as the speaker, the SDK does not publish the music in app A to the remote end.
144
+ * If you set the loopback device as the Bluetooth headset, and then use a wired headset to play the music in app A, you need to call this method again, set the loopback device as the wired headset, and the SDK continues to publish the music in app A to remote end.
145
+ *
146
+ * @param deviceId Specifies the loopback device of the SDK. You can get the device ID by calling enumeratePlaybackDevices. Connecting or disconnecting the audio device does not change the value of deviceId. The maximum length is MaxDeviceIdLengthType.
147
+ *
148
+ * @returns
149
+ * 0: Success.
150
+ * < 0: Failure.
151
+ */
152
+ abstract setLoopbackDevice(deviceId: string): number;
153
+
154
+ /**
155
+ * Gets the current loopback device.
156
+ *
157
+ * This method is for Windows and macOS only.
158
+ *
159
+ * @returns
160
+ * The ID of the current loopback device.
161
+ */
162
+ abstract getLoopbackDevice(): string;
163
+
164
+ /**
165
+ * Mutes the audio playback device.
166
+ *
167
+ * @param mute Whether to mute the audio playback device: true : Mute the audio playback device. false : Unmute the audio playback device.
168
+ *
169
+ * @returns
170
+ * 0: Success.
171
+ * < 0: Failure.
172
+ */
173
+ abstract setPlaybackDeviceMute(mute: boolean): number;
174
+
175
+ /**
176
+ * Retrieves whether the audio playback device is muted.
177
+ *
178
+ * @returns
179
+ * true : The audio playback device is muted. false : The audio playback device is unmuted.
180
+ */
181
+ abstract getPlaybackDeviceMute(): boolean;
182
+
183
+ /**
184
+ * Sets the mute status of the audio capture device.
185
+ *
186
+ * @param mute Whether to mute the audio recording device: true : Mute the audio capture device. false : Unmute the audio capture device.
187
+ *
188
+ * @returns
189
+ * 0: Success.
190
+ * < 0: Failure.
191
+ */
192
+ abstract setRecordingDeviceMute(mute: boolean): number;
193
+
194
+ /**
195
+ * Gets whether the audio capture device is muted.
196
+ *
197
+ * @returns
198
+ * true : The microphone is muted. false : The microphone is unmuted.
199
+ */
200
+ abstract getRecordingDeviceMute(): boolean;
201
+
202
+ /**
203
+ * Starts the audio playback device test.
204
+ *
205
+ * This method tests whether the audio device for local playback works properly. Once a user starts the test, the SDK plays an audio file specified by the user. If the user can hear the audio, the playback device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback every 100 ms, reporting uid = 1 and the volume information of the playback device. The difference between this method and the startEchoTest method is that the former checks if the local audio playback device is working properly, while the latter can check the audio and video devices and network conditions. Call this method before joining a channel. After the test is completed, call stopPlaybackDeviceTest to stop the test before joining a channel.
206
+ *
207
+ * @param testAudioFilePath The path of the audio file. The data format is string in UTF-8.
208
+ * Supported file formats: wav, mp3, m4a, and aac.
209
+ * Supported file sample rates: 8000, 16000, 32000, 44100, and 48000 Hz.
210
+ *
211
+ * @returns
212
+ * 0: Success.
213
+ * < 0: Failure.
214
+ */
215
+ abstract startPlaybackDeviceTest(testAudioFilePath: string): number;
216
+
217
+ /**
218
+ * Stops the audio playback device test.
219
+ *
220
+ * This method stops the audio playback device test. You must call this method to stop the test after calling the startPlaybackDeviceTest method. Call this method before joining a channel.
221
+ *
222
+ * @returns
223
+ * 0: Success.
224
+ * < 0: Failure.
225
+ */
226
+ abstract stopPlaybackDeviceTest(): number;
227
+
228
+ /**
229
+ * Starts the audio capturing device test.
230
+ *
231
+ * This method tests whether the audio capturing device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method, which reports uid = 0 and the volume information of the capturing device. The difference between this method and the startEchoTest method is that the former checks if the local audio capturing device is working properly, while the latter can check the audio and video devices and network conditions. Call this method before joining a channel. After the test is completed, call stopRecordingDeviceTest to stop the test before joining a channel.
232
+ *
233
+ * @param indicationInterval The interval (ms) for triggering the onAudioVolumeIndication callback. This value should be set to greater than 10, otherwise, you will not receive the onAudioVolumeIndication callback and the SDK returns the error code -2. Agora recommends that you set this value to 100.
234
+ *
235
+ * @returns
236
+ * 0: Success.
237
+ * < 0: Failure.
238
+ * -2: Invalid parameters. Check your parameter settings.
239
+ */
240
+ abstract startRecordingDeviceTest(indicationInterval: number): number;
241
+
242
+ /**
243
+ * Stops the audio capturing device test.
244
+ *
245
+ * This method stops the audio capturing device test. You must call this method to stop the test after calling the startRecordingDeviceTest method. Call this method before joining a channel.
246
+ *
247
+ * @returns
248
+ * 0: Success.
249
+ * < 0: Failure.
250
+ */
251
+ abstract stopRecordingDeviceTest(): number;
252
+
253
+ /**
254
+ * Starts an audio device loopback test.
255
+ *
256
+ * This method tests whether the local audio capture device and playback device are working properly. After starting the test, the audio capture device records the local audio, and the audio playback device plays the captured audio. The SDK triggers two independent onAudioVolumeIndication callbacks at the time interval set in this method, which reports the volume information of the capture device (uid = 0) and the volume information of the playback device (uid = 1) respectively.
257
+ * You can call this method either before or after joining a channel.
258
+ * This method only takes effect when called by the host.
259
+ * This method tests local audio devices and does not report the network conditions.
260
+ * When you finished testing, call stopAudioDeviceLoopbackTest to stop the audio device loopback test.
261
+ *
262
+ * @param indicationInterval The time interval (ms) at which the SDK triggers the onAudioVolumeIndication callback. Agora recommends setting a value greater than 200 ms. This value must not be less than 10 ms; otherwise, you can not receive the onAudioVolumeIndication callback.
263
+ *
264
+ * @returns
265
+ * 0: Success.
266
+ * < 0: Failure.
267
+ */
268
+ abstract startAudioDeviceLoopbackTest(indicationInterval: number): number;
269
+
270
+ /**
271
+ * Stops the audio device loopback test.
272
+ *
273
+ * You can call this method either before or after joining a channel.
274
+ * This method only takes effect when called by the host.
275
+ * Ensure that you call this method to stop the loopback test after calling the startAudioDeviceLoopbackTest method.
276
+ *
277
+ * @returns
278
+ * 0: Success.
279
+ * < 0: Failure.
280
+ */
281
+ abstract stopAudioDeviceLoopbackTest(): number;
282
+
283
+ /**
284
+ * Sets the audio playback device used by the SDK to follow the system default audio playback device.
285
+ *
286
+ * @param enable Whether to follow the system default audio playback device: true : Follow the system default audio playback device. The SDK immediately switches the audio playback device when the system default audio playback device changes. false : Do not follow the system default audio playback device. The SDK switches the audio playback device to the system default audio playback device only when the currently used audio playback device is disconnected.
287
+ *
288
+ * @returns
289
+ * 0: Success.
290
+ * < 0: Failure.
291
+ */
292
+ abstract followSystemPlaybackDevice(enable: boolean): number;
293
+
294
+ /**
295
+ * Sets the audio recording device used by the SDK to follow the system default audio recording device.
296
+ *
297
+ * @param enable Whether to follow the system default audio recording device: true : Follow the system default audio playback device. The SDK immediately switches the audio recording device when the system default audio recording device changes. false : Do not follow the system default audio playback device. The SDK switches the audio recording device to the system default audio recording device only when the currently used audio recording device is disconnected.
298
+ *
299
+ * @returns
300
+ * 0: Success.
301
+ * < 0: Failure.
302
+ */
303
+ abstract followSystemRecordingDevice(enable: boolean): number;
304
+
305
+ /**
306
+ * Sets whether the loopback device follows the system default playback device.
307
+ *
308
+ * This method is for Windows and macOS only.
309
+ *
310
+ * @param enable Whether to follow the system default audio playback device: true : Follow the system default audio playback device. When the default playback device of the system is changed, the SDK immediately switches to the loopback device. false : Do not follow the system default audio playback device. The SDK switches the audio loopback device to the system default audio playback device only when the current audio playback device is disconnected.
311
+ *
312
+ * @returns
313
+ * 0: Success.
314
+ * < 0: Failure.
315
+ */
316
+ abstract followSystemLoopbackDevice(enable: boolean): number;
317
+
318
+ /**
319
+ * Releases all the resources occupied by the IAudioDeviceManager object.
320
+ */
321
+ abstract release(): void;
322
+
323
+ /**
324
+ * Gets the default audio playback device.
325
+ *
326
+ * This method is for Windows and macOS only.
327
+ *
328
+ * @returns
329
+ * The details about the default audio playback device. See AudioDeviceInfo.
330
+ */
331
+ abstract getPlaybackDefaultDevice(): AudioDeviceInfo;
332
+
333
+ /**
334
+ * Gets the default audio capture device.
335
+ *
336
+ * This method is for Windows and macOS only.
337
+ *
338
+ * @returns
339
+ * The details about the default audio capture device. See AudioDeviceInfo.
340
+ */
341
+ abstract getRecordingDefaultDevice(): AudioDeviceInfo;
342
+ }
@@ -0,0 +1,14 @@
1
+ import '../AgoraBase';
2
+
3
+ declare module '../AgoraBase' {
4
+ interface VideoCanvas {
5
+ /**
6
+ * @ignore
7
+ */
8
+ useWebCodecsDecoder?: boolean;
9
+ /**
10
+ * @ignore
11
+ */
12
+ enableFps?: boolean;
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import { IH265TranscoderObserver } from '../IAgoraH265Transcoder';
2
+
3
+ export type IH265TranscoderEvent = IH265TranscoderObserver;
4
+
5
+ declare module '../IAgoraH265Transcoder' {
6
+ interface IH265Transcoder {
7
+ _addListenerPreCheck<EventType extends keyof IH265TranscoderEvent>(
8
+ eventType: EventType
9
+ ): boolean;
10
+
11
+ /**
12
+ * @ignore
13
+ */
14
+ addListener<EventType extends keyof IH265TranscoderEvent>(
15
+ eventType: EventType,
16
+ listener: IH265TranscoderEvent[EventType]
17
+ ): void;
18
+
19
+ /**
20
+ * @ignore
21
+ */
22
+ removeListener<EventType extends keyof IH265TranscoderEvent>(
23
+ eventType: EventType,
24
+ listener?: IH265TranscoderEvent[EventType]
25
+ ): void;
26
+
27
+ /**
28
+ * @ignore
29
+ */
30
+ removeAllListeners<EventType extends keyof IH265TranscoderEvent>(
31
+ eventType?: EventType
32
+ ): void;
33
+
34
+ /**
35
+ * @ignore
36
+ */
37
+ release(): void;
38
+ }
39
+ }
@@ -0,0 +1 @@
1
+ export {};