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,648 @@
1
+ import './extension/IAgoraMediaPlayerExtension';
2
+ import { SpatialAudioParams } from './AgoraBase';
3
+ import { AudioDualMonoMode, IAudioPcmFrameSink, IAudioSpectrumObserver, RawAudioFrameOpModeType, RenderModeType, VideoFrame } from './AgoraMediaBase';
4
+ import { MediaPlayerState, MediaSource, PlayerStreamInfo } from './AgoraMediaPlayerTypes';
5
+ import { IMediaPlayerSourceObserver } from './IAgoraMediaPlayerSource';
6
+ /**
7
+ * This class provides media player functions and supports multiple instances.
8
+ */
9
+ export declare abstract class IMediaPlayer {
10
+ /**
11
+ * Gets the ID of the media player.
12
+ *
13
+ * @returns
14
+ * Success. The ID of the media player.
15
+ * < 0: Failure.
16
+ */
17
+ abstract getMediaPlayerId(): number;
18
+ /**
19
+ * Opens the media resource.
20
+ *
21
+ * This method is called asynchronously.
22
+ *
23
+ * @param url The path of the media file. Both local path and online path are supported.
24
+ * @param startPos The starting position (ms) for playback. Default value is 0.
25
+ *
26
+ * @returns
27
+ * 0: Success.
28
+ * < 0: Failure.
29
+ */
30
+ abstract open(url: string, startPos: number): number;
31
+ /**
32
+ * Opens a media file and configures the playback scenarios.
33
+ *
34
+ * This method supports opening media files of different sources, including a custom media source, and allows you to configure the playback scenarios.
35
+ *
36
+ * @param source Media resources. See MediaSource.
37
+ *
38
+ * @returns
39
+ * 0: Success.
40
+ * < 0: Failure.
41
+ */
42
+ abstract openWithMediaSource(source: MediaSource): number;
43
+ /**
44
+ * Plays the media file.
45
+ *
46
+ * @returns
47
+ * 0: Success.
48
+ * < 0: Failure.
49
+ */
50
+ abstract play(): number;
51
+ /**
52
+ * Pauses the playback.
53
+ *
54
+ * @returns
55
+ * 0: Success.
56
+ * < 0: Failure.
57
+ */
58
+ abstract pause(): number;
59
+ /**
60
+ * Stops playing the media track.
61
+ *
62
+ * After calling this method to stop playback, if you want to play again, you need to call open or openWithMediaSource to open the media resource.
63
+ *
64
+ * @returns
65
+ * 0: Success.
66
+ * < 0: Failure.
67
+ */
68
+ abstract stop(): number;
69
+ /**
70
+ * Resumes playing the media file.
71
+ *
72
+ * @returns
73
+ * 0: Success.
74
+ * < 0: Failure.
75
+ */
76
+ abstract resume(): number;
77
+ /**
78
+ * Seeks to a new playback position.
79
+ *
80
+ * If you call seek after the playback has completed (upon receiving callback onPlayerSourceStateChanged reporting playback status as PlayerStatePlaybackCompleted or PlayerStatePlaybackAllLoopsCompleted), the SDK will play the media file from the specified position. At this point, you will receive callback onPlayerSourceStateChanged reporting playback status as PlayerStatePlaying.
81
+ * If you call seek while the playback is paused, upon successful call of this method, the SDK will seek to the specified position. To resume playback, call resume or play .
82
+ *
83
+ * @param newPos The new playback position (ms).
84
+ *
85
+ * @returns
86
+ * 0: Success.
87
+ * < 0: Failure.
88
+ */
89
+ abstract seek(newPos: number): number;
90
+ /**
91
+ * Sets the pitch of the current media resource.
92
+ *
93
+ * Call this method after calling open.
94
+ *
95
+ * @param pitch Sets the pitch of the local music file by the chromatic scale. The default value is 0, which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value between consecutive values is a chromatic value. The greater the absolute value of this parameter, the higher or lower the pitch of the local music file.
96
+ *
97
+ * @returns
98
+ * 0: Success.
99
+ * < 0: Failure.
100
+ */
101
+ abstract setAudioPitch(pitch: number): number;
102
+ /**
103
+ * Gets the duration of the media resource.
104
+ *
105
+ * @returns
106
+ * The total duration (ms) of the media file.
107
+ */
108
+ abstract getDuration(): number;
109
+ /**
110
+ * Gets current local playback progress.
111
+ *
112
+ * @returns
113
+ * Returns the current playback progress (ms) if the call succeeds.
114
+ * < 0: Failure. See MediaPlayerReason.
115
+ */
116
+ abstract getPlayPosition(): number;
117
+ /**
118
+ * Gets the number of the media streams in the media resource.
119
+ *
120
+ * Call this method after you call open and receive the onPlayerSourceStateChanged callback reporting the state PlayerStateOpenCompleted.
121
+ *
122
+ * @returns
123
+ * The number of the media streams in the media resource if the method call succeeds.
124
+ * < 0: Failure. See MediaPlayerReason.
125
+ */
126
+ abstract getStreamCount(): number;
127
+ /**
128
+ * Gets the detailed information of the media stream.
129
+ *
130
+ * @param index The index of the media stream. This parameter must be less than the return value of getStreamCount.
131
+ *
132
+ * @returns
133
+ * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. null, if the method call fails.
134
+ */
135
+ abstract getStreamInfo(index: number): PlayerStreamInfo;
136
+ /**
137
+ * Sets the loop playback.
138
+ *
139
+ * If you want to loop, call this method and set the number of the loops. When the loop finishes, the SDK triggers onPlayerSourceStateChanged and reports the playback state as PlayerStatePlaybackAllLoopsCompleted.
140
+ *
141
+ * @param loopCount The number of times the audio effect loops:
142
+ * ≥0: Number of times for playing. For example, setting it to 0 means no loop playback, playing only once; setting it to 1 means loop playback once, playing a total of twice.
143
+ * -1: Play the audio file in an infinite loop.
144
+ *
145
+ * @returns
146
+ * 0: Success.
147
+ * < 0: Failure.
148
+ */
149
+ abstract setLoopCount(loopCount: number): number;
150
+ /**
151
+ * Sets the channel mode of the current audio file.
152
+ *
153
+ * Call this method after calling open.
154
+ *
155
+ * @param speed The playback speed. Agora recommends that you set this to a value between 30 and 400, defined as follows:
156
+ * 30: 0.3 times the original speed.
157
+ * 100: The original speed.
158
+ * 400: 4 times the original speed.
159
+ *
160
+ * @returns
161
+ * 0: Success.
162
+ * < 0: Failure.
163
+ */
164
+ abstract setPlaybackSpeed(speed: number): number;
165
+ /**
166
+ * Selects the audio track used during playback.
167
+ *
168
+ * After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language. You need to call this method after calling getStreamInfo to get the audio stream index value.
169
+ *
170
+ * @param index The index of the audio track.
171
+ *
172
+ * @returns
173
+ * 0: Success.
174
+ * < 0: Failure.
175
+ */
176
+ abstract selectAudioTrack(index: number): number;
177
+ /**
178
+ * Selects the audio tracks that you want to play on your local device and publish to the channel respectively.
179
+ *
180
+ * You can call this method to determine the audio track to be played on your local device and published to the channel. Before calling this method, you need to open the media file with the openWithMediaSource method and set enableMultiAudioTrack in MediaSource as true.
181
+ *
182
+ * @param playoutTrackIndex The index of audio tracks for local playback. You can obtain the index through getStreamInfo.
183
+ * @param publishTrackIndex The index of audio tracks to be published in the channel. You can obtain the index through getStreamInfo.
184
+ *
185
+ * @returns
186
+ * 0: Success.
187
+ * < 0: Failure.
188
+ */
189
+ abstract selectMultiAudioTrack(playoutTrackIndex: number, publishTrackIndex: number): number;
190
+ /**
191
+ * @ignore
192
+ */
193
+ abstract takeScreenshot(filename: string): number;
194
+ /**
195
+ * @ignore
196
+ */
197
+ abstract selectInternalSubtitle(index: number): number;
198
+ /**
199
+ * @ignore
200
+ */
201
+ abstract setExternalSubtitle(url: string): number;
202
+ /**
203
+ * Gets current playback state.
204
+ *
205
+ * @returns
206
+ * The current playback state. See MediaPlayerState.
207
+ */
208
+ abstract getState(): MediaPlayerState;
209
+ /**
210
+ * Sets whether to mute the media file.
211
+ *
212
+ * @param muted Whether to mute the media file: true : Mute the media file. false : (Default) Unmute the media file.
213
+ *
214
+ * @returns
215
+ * 0: Success.
216
+ * < 0: Failure.
217
+ */
218
+ abstract mute(muted: boolean): number;
219
+ /**
220
+ * Reports whether the media resource is muted.
221
+ *
222
+ * @returns
223
+ * true : Reports whether the media resource is muted. false : Reports whether the media resource is muted.
224
+ */
225
+ abstract getMute(): boolean;
226
+ /**
227
+ * Adjusts the local playback volume.
228
+ *
229
+ * @param volume The local playback volume, which ranges from 0 to 100:
230
+ * 0: Mute.
231
+ * 100: (Default) The original volume.
232
+ *
233
+ * @returns
234
+ * 0: Success.
235
+ * < 0: Failure.
236
+ */
237
+ abstract adjustPlayoutVolume(volume: number): number;
238
+ /**
239
+ * Gets the local playback volume.
240
+ *
241
+ * @returns
242
+ * The local playback volume, which ranges from 0 to 100.
243
+ * 0: Mute.
244
+ * 100: (Default) The original volume.
245
+ */
246
+ abstract getPlayoutVolume(): number;
247
+ /**
248
+ * Adjusts the volume of the media file for publishing.
249
+ *
250
+ * After connected to the Agora server, you can call this method to adjust the volume of the media file heard by the remote user.
251
+ *
252
+ * @param volume The volume, which ranges from 0 to 400:
253
+ * 0: Mute.
254
+ * 100: (Default) The original volume.
255
+ * 400: Four times the original volume (amplifying the audio signals by four times).
256
+ *
257
+ * @returns
258
+ * 0: Success.
259
+ * < 0: Failure.
260
+ */
261
+ abstract adjustPublishSignalVolume(volume: number): number;
262
+ /**
263
+ * Gets the volume of the media file for publishing.
264
+ *
265
+ * @returns
266
+ * ≥ 0: The remote playback volume.
267
+ * < 0: Failure.
268
+ */
269
+ abstract getPublishSignalVolume(): number;
270
+ /**
271
+ * Sets the view.
272
+ *
273
+ * @param view The render view. On Windows, this parameter sets the window handle (HWND).
274
+ *
275
+ * @returns
276
+ * 0: Success.
277
+ * < 0: Failure.
278
+ */
279
+ abstract setView(view: any): number;
280
+ /**
281
+ * Sets the render mode of the media player.
282
+ *
283
+ * @param renderMode Sets the render mode of the view. See RenderModeType.
284
+ *
285
+ * @returns
286
+ * 0: Success.
287
+ * < 0: Failure.
288
+ */
289
+ abstract setRenderMode(renderMode: RenderModeType): number;
290
+ /**
291
+ * Registers a media player observer.
292
+ *
293
+ * @param observer The player observer, listening for events during the playback. See IMediaPlayerSourceObserver.
294
+ *
295
+ * @returns
296
+ * 0: Success.
297
+ * < 0: Failure.
298
+ */
299
+ abstract registerPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number;
300
+ /**
301
+ * Releases a media player observer.
302
+ *
303
+ * @param observer The player observer, listening for events during the playback. See IMediaPlayerSourceObserver.
304
+ *
305
+ * @returns
306
+ * 0: Success.
307
+ * < 0: Failure.
308
+ */
309
+ abstract unregisterPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number;
310
+ /**
311
+ * Registers an audio frame observer object.
312
+ *
313
+ * @param observer The audio frame observer, reporting the reception of each audio frame. See IAudioPcmFrameSink.
314
+ * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
315
+ *
316
+ * @returns
317
+ * 0: Success.
318
+ * < 0: Failure.
319
+ */
320
+ abstract registerAudioFrameObserver(observer: IAudioPcmFrameSink, mode?: RawAudioFrameOpModeType): number;
321
+ /**
322
+ * Unregisters an audio frame observer.
323
+ *
324
+ * @param observer The audio observer. See IAudioPcmFrameSink.
325
+ *
326
+ * @returns
327
+ * 0: Success.
328
+ * < 0: Failure.
329
+ */
330
+ abstract unregisterAudioFrameObserver(observer: IAudioPcmFrameSink): number;
331
+ /**
332
+ * Registers a video frame observer object.
333
+ *
334
+ * You need to implement the IMediaPlayerVideoFrameObserver class in this method and register callbacks according to your scenarios. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
335
+ *
336
+ * @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver.
337
+ *
338
+ * @returns
339
+ * 0: Success.
340
+ * < 0: Failure.
341
+ */
342
+ abstract registerVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number;
343
+ /**
344
+ * Unregisters the video frame observer.
345
+ *
346
+ * @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver.
347
+ *
348
+ * @returns
349
+ * 0: Success.
350
+ * < 0: Failure.
351
+ */
352
+ abstract unregisterVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number;
353
+ /**
354
+ * @ignore
355
+ */
356
+ abstract registerMediaPlayerAudioSpectrumObserver(observer: IAudioSpectrumObserver, intervalInMS: number): number;
357
+ /**
358
+ * @ignore
359
+ */
360
+ abstract unregisterMediaPlayerAudioSpectrumObserver(observer: IAudioSpectrumObserver): number;
361
+ /**
362
+ * Sets the channel mode of the current audio file.
363
+ *
364
+ * In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.
365
+ * Call this method after calling open.
366
+ * This method only applies to stereo audio files.
367
+ *
368
+ * @param mode The channel mode. See AudioDualMonoMode.
369
+ *
370
+ * @returns
371
+ * 0: Success.
372
+ * < 0: Failure.
373
+ */
374
+ abstract setAudioDualMonoMode(mode: AudioDualMonoMode): number;
375
+ /**
376
+ * @ignore
377
+ */
378
+ abstract getPlayerSdkVersion(): string;
379
+ /**
380
+ * Gets the path of the media resource being played.
381
+ *
382
+ * @returns
383
+ * The path of the media resource being played.
384
+ */
385
+ abstract getPlaySrc(): string;
386
+ /**
387
+ * @ignore
388
+ */
389
+ abstract openWithAgoraCDNSrc(src: string, startPos: number): number;
390
+ /**
391
+ * @ignore
392
+ */
393
+ abstract getAgoraCDNLineCount(): number;
394
+ /**
395
+ * @ignore
396
+ */
397
+ abstract switchAgoraCDNLineByIndex(index: number): number;
398
+ /**
399
+ * @ignore
400
+ */
401
+ abstract getCurrentAgoraCDNIndex(): number;
402
+ /**
403
+ * @ignore
404
+ */
405
+ abstract enableAutoSwitchAgoraCDN(enable: boolean): number;
406
+ /**
407
+ * @ignore
408
+ */
409
+ abstract renewAgoraCDNSrcToken(token: string, ts: number): number;
410
+ /**
411
+ * @ignore
412
+ */
413
+ abstract switchAgoraCDNSrc(src: string, syncPts?: boolean): number;
414
+ /**
415
+ * Switches the media resource being played.
416
+ *
417
+ * You can call this method to switch the media resource to be played according to the current network status. For example:
418
+ * When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.
419
+ * When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate. After calling this method, if you receive the onPlayerEvent callback report the PlayerEventSwitchComplete event, the switching is successful. If the switching fails, the SDK will automatically retry 3 times. If it still fails, you will receive the onPlayerEvent callback reporting the PlayerEventSwitchError event indicating an error occurred during media resource switching.
420
+ * Ensure that you call this method after open.
421
+ * To ensure normal playback, pay attention to the following when calling this method:
422
+ * Do not call this method when playback is paused.
423
+ * Do not call the seek method during switching.
424
+ * Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched.
425
+ *
426
+ * @param src The URL of the media resource.
427
+ * @param syncPts Whether to synchronize the playback position (ms) before and after the switch: true : Synchronize the playback position before and after the switch. false : (Default) Do not synchronize the playback position before and after the switch.
428
+ *
429
+ * @returns
430
+ * 0: Success.
431
+ * < 0: Failure.
432
+ */
433
+ abstract switchSrc(src: string, syncPts?: boolean): number;
434
+ /**
435
+ * Preloads a media resource.
436
+ *
437
+ * You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop.
438
+ * Before calling this method, ensure that you have called open or openWithMediaSource to open the media resource successfully.
439
+ * Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again.
440
+ *
441
+ * @param src The URL of the media resource.
442
+ * @param startPos The starting position (ms) for playing after the media resource is preloaded to the playlist. When preloading a live stream, set this parameter to 0.
443
+ *
444
+ * @returns
445
+ * 0: Success.
446
+ * < 0: Failure.
447
+ */
448
+ abstract preloadSrc(src: string, startPos: number): number;
449
+ /**
450
+ * Plays preloaded media resources.
451
+ *
452
+ * After calling the preloadSrc method to preload the media resource into the playlist, you can call this method to play the preloaded media resource. After calling this method, if you receive the onPlayerSourceStateChanged callback which reports the PlayerStatePlaying state, the playback is successful. If you want to change the preloaded media resource to be played, you can call this method again and specify the URL of the new media resource that you want to preload. If you want to replay the media resource, you need to call preloadSrc to preload the media resource to the playlist again before playing. If you want to clear the playlist, call the stop method. If you call this method when playback is paused, this method does not take effect until playback is resumed.
453
+ *
454
+ * @param src The URL of the media resource in the playlist must be consistent with the src set by the preloadSrc method; otherwise, the media resource cannot be played.
455
+ *
456
+ * @returns
457
+ * 0: Success.
458
+ * < 0: Failure.
459
+ */
460
+ abstract playPreloadedSrc(src: string): number;
461
+ /**
462
+ * Unloads media resources that are preloaded.
463
+ *
464
+ * This method cannot release the media resource being played.
465
+ *
466
+ * @param src The URL of the media resource.
467
+ *
468
+ * @returns
469
+ * 0: Success.
470
+ * < 0: Failure.
471
+ */
472
+ abstract unloadSrc(src: string): number;
473
+ /**
474
+ * Enables or disables the spatial audio effect for the media player.
475
+ *
476
+ * After successfully setting the spatial audio effect parameters of the media player, the SDK enables the spatial audio effect for the media player, and the local user can hear the media resources with a sense of space. If you need to disable the spatial audio effect for the media player, set the params parameter to null.
477
+ *
478
+ * @returns
479
+ * 0: Success.
480
+ * < 0: Failure.
481
+ */
482
+ abstract setSpatialAudioParams(params: SpatialAudioParams): number;
483
+ /**
484
+ * @ignore
485
+ */
486
+ abstract setSoundPositionParams(pan: number, gain: number): number;
487
+ /**
488
+ * Sets media player options.
489
+ *
490
+ * The media player supports setting options through key and value. The difference between this method and setPlayerOptionInString is that the value parameter of this method is of type Int, while the value of setPlayerOptionInString is of type String. These two methods cannot be used together.
491
+ *
492
+ * @param key The key of the option.
493
+ * @param value The value of the key.
494
+ *
495
+ * @returns
496
+ * 0: Success.
497
+ * < 0: Failure.
498
+ */
499
+ abstract setPlayerOptionInInt(key: string, value: number): number;
500
+ /**
501
+ * Sets media player options.
502
+ *
503
+ * The media player supports setting options through key and value. The difference between this method and setPlayerOptionInInt is that the value parameter of this method is of type String, while the value of setPlayerOptionInInt is of type String. These two methods cannot be used together.
504
+ *
505
+ * @param key The key of the option.
506
+ * @param value The value of the key.
507
+ *
508
+ * @returns
509
+ * 0: Success.
510
+ * < 0: Failure.
511
+ */
512
+ abstract setPlayerOptionInString(key: string, value: string): number;
513
+ }
514
+ /**
515
+ * This class provides methods to manage cached media files.
516
+ */
517
+ export declare abstract class IMediaPlayerCacheManager {
518
+ /**
519
+ * Deletes all cached media files in the media player.
520
+ *
521
+ * The cached media file currently being played will not be deleted.
522
+ *
523
+ * @returns
524
+ * 0: Success.
525
+ * < 0: Failure. See MediaPlayerReason.
526
+ */
527
+ abstract removeAllCaches(): number;
528
+ /**
529
+ * Deletes a cached media file that is the least recently used.
530
+ *
531
+ * You can call this method to delete a cached media file when the storage space for the cached files is about to reach its limit. After you call this method, the SDK deletes the cached media file that is least used. The cached media file currently being played will not be deleted.
532
+ *
533
+ * @returns
534
+ * 0: Success.
535
+ * < 0: Failure. See MediaPlayerReason.
536
+ */
537
+ abstract removeOldCache(): number;
538
+ /**
539
+ * Deletes a cached media file.
540
+ *
541
+ * The cached media file currently being played will not be deleted.
542
+ *
543
+ * @param uri The URI (Uniform Resource Identifier) of the media file to be deleted.
544
+ *
545
+ * @returns
546
+ * 0: Success.
547
+ * < 0: Failure. See MediaPlayerReason.
548
+ */
549
+ abstract removeCacheByUri(uri: string): number;
550
+ /**
551
+ * Sets the storage path for the media files that you want to cache.
552
+ *
553
+ * Make sure IRtcEngine is initialized before you call this method.
554
+ *
555
+ * @param path The absolute path of the media files to be cached. Ensure that the directory for the media files exists and is writable.
556
+ *
557
+ * @returns
558
+ * 0: Success.
559
+ * < 0: Failure. See MediaPlayerReason.
560
+ */
561
+ abstract setCacheDir(path: string): number;
562
+ /**
563
+ * Sets the maximum number of media files that can be cached.
564
+ *
565
+ * @param count The maximum number of media files that can be cached. The default value is 1,000.
566
+ *
567
+ * @returns
568
+ * 0: Success.
569
+ * < 0: Failure. See MediaPlayerReason.
570
+ */
571
+ abstract setMaxCacheFileCount(count: number): number;
572
+ /**
573
+ * Sets the maximum size of the aggregate storage space for cached media files.
574
+ *
575
+ * @param cacheSize The maximum size (bytes) of the aggregate storage space for cached media files. The default value is 1 GB.
576
+ *
577
+ * @returns
578
+ * 0: Success.
579
+ * < 0: Failure. See MediaPlayerReason.
580
+ */
581
+ abstract setMaxCacheFileSize(cacheSize: number): number;
582
+ /**
583
+ * Sets whether to delete cached media files automatically.
584
+ *
585
+ * If you enable this function to remove cached media files automatically, when the cached media files exceed either the number or size limit you set, the SDK automatically deletes the least recently used cache file.
586
+ *
587
+ * @param enable Whether to enable the SDK to delete cached media files automatically: true : Delete cached media files automatically. false : (Default) Do not delete cached media files automatically.
588
+ *
589
+ * @returns
590
+ * 0: Success.
591
+ * < 0: Failure. See MediaPlayerReason.
592
+ */
593
+ abstract enableAutoRemoveCache(enable: boolean): number;
594
+ /**
595
+ * Gets the storage path of the cached media files.
596
+ *
597
+ * If you have not called the setCacheDir method to set the storage path for the media files to be cached before calling this method, you get the default storage path used by the SDK.
598
+ *
599
+ * @param length An input parameter; the maximum length of the cache file storage path string.
600
+ *
601
+ * @returns
602
+ * The call succeeds, and the SDK returns the storage path of the cached media files.
603
+ * < 0: Failure. See MediaPlayerReason.
604
+ */
605
+ abstract getCacheDir(length: number): string;
606
+ /**
607
+ * Gets the maximum number of media files that can be cached.
608
+ *
609
+ * By default, the maximum number of media files that can be cached is 1,000.
610
+ *
611
+ * @returns
612
+ * > 0: The call succeeds and returns the maximum number of media files that can be cached.
613
+ * < 0: Failure. See MediaPlayerReason.
614
+ */
615
+ abstract getMaxCacheFileCount(): number;
616
+ /**
617
+ * Gets the maximum size of the aggregate storage space for cached media files.
618
+ *
619
+ * By default, the maximum size of the aggregate storage space for cached media files is 1 GB. You can call the setMaxCacheFileSize method to set the limit according to your scenarios.
620
+ *
621
+ * @returns
622
+ * > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files.
623
+ * < 0: Failure. See MediaPlayerReason.
624
+ */
625
+ abstract getMaxCacheFileSize(): number;
626
+ /**
627
+ * Gets the number of media files that are cached.
628
+ *
629
+ * @returns
630
+ * ≥ 0: The call succeeds and returns the number of media files that are cached.
631
+ * < 0: Failure. See MediaPlayerReason.
632
+ */
633
+ abstract getCacheFileCount(): number;
634
+ }
635
+ /**
636
+ * The video frame observer for the media player.
637
+ */
638
+ export interface IMediaPlayerVideoFrameObserver {
639
+ /**
640
+ * Occurs each time the player receives a video frame.
641
+ *
642
+ * After registering the video frame observer, the callback occurs every time the player receives a video frame, reporting the detailed information of the video frame.
643
+ *
644
+ * @param frame Video frame information. See VideoFrame.
645
+ */
646
+ onFrame?(frame: VideoFrame): void;
647
+ }
648
+ //# sourceMappingURL=IAgoraMediaPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgoraMediaPlayer.d.ts","sourceRoot":"","sources":["../../ts/Private/IAgoraMediaPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;GAEG;AACH,8BAAsB,YAAY;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,IAAI,MAAM;IAEnC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAEpD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAEzD;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,IAAI,MAAM;IAEvB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,IAAI,MAAM;IAExB;;;;;;;;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