agora-electron-sdk 4.1.1-rc.1 → 4.2.0-dev.13

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 (358) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +143 -143
  3. package/gulpfile.js +5 -4
  4. package/js/AgoraSdk.js +62 -60
  5. package/js/Private/AgoraBase.js +4575 -3269
  6. package/js/Private/AgoraMediaBase.js +968 -564
  7. package/js/Private/AgoraMediaPlayerTypes.js +422 -310
  8. package/js/Private/IAgoraLog.js +86 -74
  9. package/js/Private/IAgoraMediaEngine.js +32 -32
  10. package/js/Private/IAgoraMediaPlayer.js +16 -16
  11. package/js/Private/IAgoraMediaPlayerSource.js +3 -3
  12. package/js/Private/IAgoraMediaRecorder.js +12 -12
  13. package/js/Private/IAgoraMediaStreamingSource.js +84 -0
  14. package/js/Private/IAgoraMusicContentCenter.js +239 -81
  15. package/js/Private/IAgoraRhythmPlayer.js +70 -62
  16. package/js/Private/IAgoraRtcEngine.js +1807 -948
  17. package/js/Private/IAgoraRtcEngineEx.js +26 -18
  18. package/js/Private/IAgoraSpatialAudio.js +74 -30
  19. package/js/Private/IAudioDeviceManager.js +20 -20
  20. package/js/Private/extension/AgoraBaseExtension.js +2 -2
  21. package/js/Private/extension/AgoraMediaBaseExtension.js +2 -2
  22. package/js/Private/extension/AgoraMediaPlayerTypesExtension.js +2 -2
  23. package/js/Private/extension/IAgoraLogExtension.js +2 -2
  24. package/js/Private/extension/IAgoraMediaEngineExtension.js +2 -2
  25. package/js/Private/extension/IAgoraMediaPlayerExtension.js +2 -2
  26. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.js +2 -2
  27. package/js/Private/extension/IAgoraMediaRecorderExtension.js +2 -2
  28. package/js/Private/extension/IAgoraMusicContentCenterExtension.js +2 -2
  29. package/js/Private/extension/IAgoraRhythmPlayerExtension.js +2 -2
  30. package/js/Private/extension/IAgoraRtcEngineExExtension.js +2 -2
  31. package/js/Private/extension/IAgoraRtcEngineExtension.js +2 -2
  32. package/js/Private/extension/IAgoraSpatialAudioExtension.js +2 -2
  33. package/js/Private/extension/IAudioDeviceManagerExtension.js +2 -2
  34. package/js/Private/impl/AgoraBaseImpl.js +23 -23
  35. package/js/Private/impl/AgoraMediaBaseImpl.js +118 -138
  36. package/js/Private/impl/IAgoraMediaEngineImpl.js +287 -325
  37. package/js/Private/impl/IAgoraMediaPlayerImpl.js +932 -938
  38. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +63 -63
  39. package/js/Private/impl/IAgoraMediaRecorderImpl.js +47 -67
  40. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +353 -323
  41. package/js/Private/impl/IAgoraRtcEngineExImpl.js +945 -907
  42. package/js/Private/impl/IAgoraRtcEngineImpl.js +4742 -4702
  43. package/js/Private/impl/IAgoraSpatialAudioImpl.js +362 -362
  44. package/js/Private/impl/IAudioDeviceManagerImpl.js +375 -375
  45. package/js/Private/internal/AudioDeviceManagerInternal.js +44 -44
  46. package/js/Private/internal/IrisApiEngine.js +391 -382
  47. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +46 -46
  48. package/js/Private/internal/MediaEngineInternal.js +119 -123
  49. package/js/Private/internal/MediaPlayerInternal.js +215 -213
  50. package/js/Private/internal/MediaRecorderInternal.js +82 -81
  51. package/js/Private/internal/MusicContentCenterInternal.js +128 -130
  52. package/js/Private/internal/RtcEngineExInternal.js +422 -363
  53. package/js/Private/internal/emitter/EventEmitter.js +111 -111
  54. package/js/Private/ti/AgoraBase-ti.js +40 -40
  55. package/js/Private/ti/AgoraMediaBase-ti.js +71 -73
  56. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +5 -5
  57. package/js/Private/ti/IAgoraLog-ti.js +5 -5
  58. package/js/Private/ti/IAgoraMediaEngine-ti.js +5 -5
  59. package/js/Private/ti/IAgoraMediaPlayer-ti.js +38 -42
  60. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +48 -48
  61. package/js/Private/ti/IAgoraMediaRecorder-ti.js +5 -5
  62. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +5 -0
  63. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +41 -41
  64. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +5 -5
  65. package/js/Private/ti/IAgoraRtcEngine-ti.js +139 -139
  66. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +5 -5
  67. package/js/Private/ti/IAgoraSpatialAudio-ti.js +5 -5
  68. package/js/Private/ti/IAudioDeviceManager-ti.js +5 -5
  69. package/js/Renderer/AgoraView.js +128 -131
  70. package/js/Renderer/IRenderer.js +40 -48
  71. package/js/Renderer/IRendererManager.js +9 -0
  72. package/js/Renderer/RendererManager.js +479 -392
  73. package/js/Renderer/{GlRenderer → WebGLRenderer}/index.js +469 -473
  74. package/js/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +1337 -1337
  75. package/js/Renderer/YUVCanvasRenderer/index.js +195 -185
  76. package/js/Renderer/index.js +18 -0
  77. package/js/Types.js +17 -29
  78. package/js/Utils.js +168 -173
  79. package/package.json +61 -103
  80. package/scripts/bootstrap.js +1 -1
  81. package/scripts/build.js +1 -0
  82. package/scripts/buildJS.js +3 -3
  83. package/scripts/clean.js +2 -1
  84. package/scripts/downloadPrebuild.js +5 -5
  85. package/scripts/getConfig.js +3 -2
  86. package/scripts/synclib.js +8 -5
  87. package/scripts/util.js +3 -2
  88. package/scripts/zipBuild.js +2 -1
  89. package/ts/AgoraSdk.ts +9 -6
  90. package/ts/Private/AgoraBase.ts +278 -173
  91. package/ts/Private/AgoraMediaBase.ts +167 -100
  92. package/ts/Private/AgoraMediaPlayerTypes.ts +1 -1
  93. package/ts/Private/IAgoraMediaEngine.ts +43 -56
  94. package/ts/Private/IAgoraMediaPlayer.ts +90 -104
  95. package/ts/Private/IAgoraMediaPlayerSource.ts +3 -8
  96. package/ts/Private/IAgoraMediaRecorder.ts +8 -35
  97. package/ts/Private/IAgoraMediaStreamingSource.ts +80 -0
  98. package/ts/Private/IAgoraMusicContentCenter.ts +93 -12
  99. package/ts/Private/IAgoraRtcEngine.ts +807 -910
  100. package/ts/Private/IAgoraRtcEngineEx.ts +187 -191
  101. package/ts/Private/IAgoraSpatialAudio.ts +40 -22
  102. package/ts/Private/IAudioDeviceManager.ts +35 -13
  103. package/ts/Private/extension/IAgoraMediaEngineExtension.ts +1 -1
  104. package/ts/Private/extension/IAgoraMediaPlayerExtension.ts +4 -7
  105. package/ts/Private/extension/IAgoraMediaRecorderExtension.ts +6 -1
  106. package/ts/Private/extension/IAgoraMusicContentCenterExtension.ts +1 -1
  107. package/ts/Private/extension/IAgoraRtcEngineExtension.ts +4 -4
  108. package/ts/Private/impl/AgoraBaseImpl.ts +3 -3
  109. package/ts/Private/impl/AgoraMediaBaseImpl.ts +36 -42
  110. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +79 -127
  111. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +106 -106
  112. package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +13 -45
  113. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +61 -16
  114. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +129 -59
  115. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +490 -416
  116. package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +5 -3
  117. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +4 -2
  118. package/ts/Private/internal/AudioDeviceManagerInternal.ts +6 -5
  119. package/ts/Private/internal/IrisApiEngine.ts +41 -32
  120. package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +17 -13
  121. package/ts/Private/internal/MediaEngineInternal.ts +9 -11
  122. package/ts/Private/internal/MediaPlayerInternal.ts +42 -31
  123. package/ts/Private/internal/MediaRecorderInternal.ts +24 -22
  124. package/ts/Private/internal/MusicContentCenterInternal.ts +16 -18
  125. package/ts/Private/internal/RtcEngineExInternal.ts +189 -66
  126. package/ts/Private/ti/AgoraMediaBase-ti.ts +9 -10
  127. package/ts/Private/ti/IAgoraMediaPlayer-ti.ts +0 -5
  128. package/{js/Private/ti/AgoraMediaPlayerTypes-ti.d.ts → ts/Private/ti/IAgoraMediaStreamingSource-ti.ts} +11 -6
  129. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +4 -4
  130. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +4 -4
  131. package/ts/Renderer/AgoraView.ts +12 -7
  132. package/ts/Renderer/IRenderer.ts +11 -16
  133. package/ts/Renderer/IRendererManager.ts +35 -0
  134. package/ts/Renderer/RendererManager.ts +146 -82
  135. package/ts/Renderer/{GlRenderer → WebGLRenderer}/index.ts +36 -51
  136. package/ts/Renderer/YUVCanvasRenderer/index.ts +41 -25
  137. package/ts/Renderer/index.ts +2 -0
  138. package/ts/Types.ts +43 -23
  139. package/ts/Utils.ts +7 -12
  140. package/types/AgoraSdk.d.ts +38 -36
  141. package/types/AgoraSdk.d.ts.map +1 -0
  142. package/types/Private/AgoraBase.d.ts +4455 -4358
  143. package/types/Private/AgoraBase.d.ts.map +1 -0
  144. package/types/Private/AgoraMediaBase.d.ts +1125 -1070
  145. package/types/Private/AgoraMediaBase.d.ts.map +1 -0
  146. package/types/Private/AgoraMediaPlayerTypes.d.ts +409 -408
  147. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
  148. package/types/Private/IAgoraLog.d.ts +81 -80
  149. package/types/Private/IAgoraLog.d.ts.map +1 -0
  150. package/types/Private/IAgoraMediaEngine.d.ts +184 -193
  151. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
  152. package/types/Private/IAgoraMediaPlayer.d.ts +533 -546
  153. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
  154. package/types/Private/IAgoraMediaPlayerSource.d.ts +83 -88
  155. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
  156. package/types/Private/IAgoraMediaRecorder.d.ts +29 -49
  157. package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
  158. package/types/Private/IAgoraMediaStreamingSource.d.ts +42 -0
  159. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
  160. package/types/Private/IAgoraMusicContentCenter.d.ts +336 -255
  161. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
  162. package/types/Private/IAgoraRhythmPlayer.d.ts +65 -64
  163. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
  164. package/types/Private/IAgoraRtcEngine.d.ts +4948 -5058
  165. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
  166. package/types/Private/IAgoraRtcEngineEx.d.ts +554 -570
  167. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
  168. package/types/Private/IAgoraSpatialAudio.d.ts +266 -248
  169. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
  170. package/types/Private/IAudioDeviceManager.d.ts +255 -233
  171. package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
  172. package/types/Private/extension/AgoraBaseExtension.d.ts +2 -1
  173. package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
  174. package/types/Private/extension/AgoraMediaBaseExtension.d.ts +2 -1
  175. package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  176. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -1
  177. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  178. package/types/Private/extension/IAgoraLogExtension.d.ts +2 -1
  179. package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
  180. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +41 -40
  181. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  182. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +47 -46
  183. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  184. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -1
  185. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  186. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +45 -40
  187. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  188. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +21 -20
  189. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  190. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +2 -1
  191. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  192. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +2 -1
  193. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  194. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +43 -42
  195. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  196. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +2 -1
  197. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  198. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +2 -1
  199. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  200. package/types/Private/impl/AgoraBaseImpl.d.ts +3 -2
  201. package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
  202. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +9 -7
  203. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  204. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +40 -43
  205. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  206. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +141 -141
  207. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  208. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -2
  209. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  210. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +11 -13
  211. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  212. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +59 -51
  213. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  214. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +106 -101
  215. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  216. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +570 -566
  217. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  218. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +49 -48
  219. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  220. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +65 -64
  221. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  222. package/types/Private/internal/AudioDeviceManagerInternal.d.ts +9 -8
  223. package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
  224. package/types/Private/internal/IrisApiEngine.d.ts +148 -146
  225. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
  226. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +19 -18
  227. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  228. package/types/Private/internal/MediaEngineInternal.d.ts +22 -21
  229. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
  230. package/types/Private/internal/MediaPlayerInternal.d.ts +34 -33
  231. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
  232. package/types/Private/internal/MediaRecorderInternal.d.ts +18 -15
  233. package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
  234. package/types/Private/internal/MusicContentCenterInternal.d.ts +40 -39
  235. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
  236. package/types/Private/internal/RtcEngineExInternal.d.ts +80 -73
  237. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
  238. package/{js → types}/Private/internal/emitter/EventEmitter.d.ts +60 -59
  239. package/types/Private/internal/emitter/EventEmitter.d.ts.map +1 -0
  240. package/types/Private/ti/AgoraBase-ti.d.ts +8 -7
  241. package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
  242. package/types/Private/ti/AgoraMediaBase-ti.d.ts +14 -12
  243. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  244. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -6
  245. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  246. package/types/Private/ti/IAgoraLog-ti.d.ts +7 -6
  247. package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
  248. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +7 -6
  249. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  250. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +8 -8
  251. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  252. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -7
  253. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  254. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +7 -6
  255. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  256. package/{js/Private/ti/IAgoraMediaRecorder-ti.d.ts → types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts} +7 -6
  257. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  258. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +8 -7
  259. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  260. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +7 -6
  261. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  262. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +10 -9
  263. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  264. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +7 -6
  265. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  266. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +7 -6
  267. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  268. package/types/Private/ti/IAudioDeviceManager-ti.d.ts +7 -6
  269. package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  270. package/types/Renderer/AgoraView.d.ts +70 -70
  271. package/types/Renderer/AgoraView.d.ts.map +1 -0
  272. package/types/Renderer/IRenderer.d.ts +22 -21
  273. package/types/Renderer/IRenderer.d.ts.map +1 -0
  274. package/types/Renderer/IRendererManager.d.ts +18 -0
  275. package/types/Renderer/IRendererManager.d.ts.map +1 -0
  276. package/types/Renderer/RendererManager.d.ts +154 -71
  277. package/types/Renderer/RendererManager.d.ts.map +1 -0
  278. package/types/Renderer/{GlRenderer → WebGLRenderer}/index.d.ts +49 -59
  279. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -0
  280. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts +1 -0
  281. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
  282. package/types/Renderer/YUVCanvasRenderer/index.d.ts +16 -16
  283. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
  284. package/types/Renderer/index.d.ts +3 -0
  285. package/types/Renderer/index.d.ts.map +1 -0
  286. package/types/Types.d.ts +280 -260
  287. package/types/Types.d.ts.map +1 -0
  288. package/types/Utils.d.ts +59 -58
  289. package/types/Utils.d.ts.map +1 -0
  290. package/js/AgoraSdk.d.ts +0 -36
  291. package/js/Private/AgoraBase.d.ts +0 -4358
  292. package/js/Private/AgoraMediaBase.d.ts +0 -1070
  293. package/js/Private/AgoraMediaPlayerTypes.d.ts +0 -408
  294. package/js/Private/IAgoraLog.d.ts +0 -80
  295. package/js/Private/IAgoraMediaEngine.d.ts +0 -193
  296. package/js/Private/IAgoraMediaPlayer.d.ts +0 -546
  297. package/js/Private/IAgoraMediaPlayerSource.d.ts +0 -88
  298. package/js/Private/IAgoraMediaRecorder.d.ts +0 -49
  299. package/js/Private/IAgoraMusicContentCenter.d.ts +0 -255
  300. package/js/Private/IAgoraRhythmPlayer.d.ts +0 -64
  301. package/js/Private/IAgoraRtcEngine.d.ts +0 -5058
  302. package/js/Private/IAgoraRtcEngineEx.d.ts +0 -570
  303. package/js/Private/IAgoraSpatialAudio.d.ts +0 -248
  304. package/js/Private/IAudioDeviceManager.d.ts +0 -233
  305. package/js/Private/extension/AgoraBaseExtension.d.ts +0 -1
  306. package/js/Private/extension/AgoraMediaBaseExtension.d.ts +0 -1
  307. package/js/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -1
  308. package/js/Private/extension/IAgoraLogExtension.d.ts +0 -1
  309. package/js/Private/extension/IAgoraMediaEngineExtension.d.ts +0 -40
  310. package/js/Private/extension/IAgoraMediaPlayerExtension.d.ts +0 -46
  311. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -1
  312. package/js/Private/extension/IAgoraMediaRecorderExtension.d.ts +0 -40
  313. package/js/Private/extension/IAgoraMusicContentCenterExtension.d.ts +0 -20
  314. package/js/Private/extension/IAgoraRhythmPlayerExtension.d.ts +0 -1
  315. package/js/Private/extension/IAgoraRtcEngineExExtension.d.ts +0 -1
  316. package/js/Private/extension/IAgoraRtcEngineExtension.d.ts +0 -42
  317. package/js/Private/extension/IAgoraSpatialAudioExtension.d.ts +0 -1
  318. package/js/Private/extension/IAudioDeviceManagerExtension.d.ts +0 -1
  319. package/js/Private/impl/AgoraBaseImpl.d.ts +0 -2
  320. package/js/Private/impl/AgoraMediaBaseImpl.d.ts +0 -7
  321. package/js/Private/impl/IAgoraMediaEngineImpl.d.ts +0 -43
  322. package/js/Private/impl/IAgoraMediaPlayerImpl.d.ts +0 -141
  323. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -2
  324. package/js/Private/impl/IAgoraMediaRecorderImpl.d.ts +0 -13
  325. package/js/Private/impl/IAgoraMusicContentCenterImpl.d.ts +0 -51
  326. package/js/Private/impl/IAgoraRtcEngineExImpl.d.ts +0 -101
  327. package/js/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -566
  328. package/js/Private/impl/IAgoraSpatialAudioImpl.d.ts +0 -48
  329. package/js/Private/impl/IAudioDeviceManagerImpl.d.ts +0 -64
  330. package/js/Private/internal/AudioDeviceManagerInternal.d.ts +0 -8
  331. package/js/Private/internal/IrisApiEngine.d.ts +0 -146
  332. package/js/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -18
  333. package/js/Private/internal/MediaEngineInternal.d.ts +0 -21
  334. package/js/Private/internal/MediaPlayerInternal.d.ts +0 -33
  335. package/js/Private/internal/MediaRecorderInternal.d.ts +0 -15
  336. package/js/Private/internal/MusicContentCenterInternal.d.ts +0 -39
  337. package/js/Private/internal/RtcEngineExInternal.d.ts +0 -73
  338. package/js/Private/ti/AgoraBase-ti.d.ts +0 -7
  339. package/js/Private/ti/AgoraMediaBase-ti.d.ts +0 -12
  340. package/js/Private/ti/IAgoraLog-ti.d.ts +0 -6
  341. package/js/Private/ti/IAgoraMediaEngine-ti.d.ts +0 -6
  342. package/js/Private/ti/IAgoraMediaPlayer-ti.d.ts +0 -8
  343. package/js/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -7
  344. package/js/Private/ti/IAgoraMusicContentCenter-ti.d.ts +0 -7
  345. package/js/Private/ti/IAgoraRhythmPlayer-ti.d.ts +0 -6
  346. package/js/Private/ti/IAgoraRtcEngine-ti.d.ts +0 -9
  347. package/js/Private/ti/IAgoraRtcEngineEx-ti.d.ts +0 -6
  348. package/js/Private/ti/IAgoraSpatialAudio-ti.d.ts +0 -6
  349. package/js/Private/ti/IAudioDeviceManager-ti.d.ts +0 -6
  350. package/js/Renderer/AgoraView.d.ts +0 -70
  351. package/js/Renderer/GlRenderer/index.d.ts +0 -59
  352. package/js/Renderer/GlRenderer/webgl-utils.d.ts +0 -0
  353. package/js/Renderer/IRenderer.d.ts +0 -21
  354. package/js/Renderer/RendererManager.d.ts +0 -71
  355. package/js/Renderer/YUVCanvasRenderer/index.d.ts +0 -16
  356. package/js/Types.d.ts +0 -260
  357. package/js/Utils.d.ts +0 -58
  358. /package/ts/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
@@ -1,546 +0,0 @@
1
- import './extension/IAgoraMediaPlayerExtension';
2
- import { MediaSource, PlayerStreamInfo, MediaPlayerState } from './AgoraMediaPlayerTypes';
3
- import { RenderModeType, IAudioSpectrumObserver, AudioDualMonoMode, AudioPcmFrame, VideoFrame } from './AgoraMediaBase';
4
- import { IMediaPlayerSourceObserver } from './IAgoraMediaPlayerSource';
5
- import { SpatialAudioParams } from './AgoraBase';
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
- * ≥ 0: Success. The ID of the media player.< 0: Failure.
15
- */
16
- abstract getMediaPlayerId(): number;
17
- /**
18
- * Opens the media resource.
19
- * This method is called asynchronously.If you need to play a media file, make sure you receive the onPlayerSourceStateChanged callback reporting PlayerStateOpenCompleted before calling the play method to play the file.
20
- *
21
- * @param url The path of the media file. Both local path and online path are supported.On the Android platform, if you need to open a file in URI format, use open .
22
- *
23
- * @param startPos The starting position (ms) for playback. Default value is 0.
24
- *
25
- * @returns
26
- * 0: Success.< 0: Failure.
27
- */
28
- abstract open(url: string, startPos: number): number;
29
- /**
30
- * Opens a media file and configures the playback scenarios.
31
- * This method supports opening media files of different sources, including a custom media source, and allows you to configure the playback scenarios.
32
- *
33
- * @param source Media resources. See MediaSource .
34
- *
35
- * @returns
36
- * 0: Success.< 0: Failure.
37
- */
38
- abstract openWithMediaSource(source: MediaSource): number;
39
- /**
40
- * Plays the media file.
41
- * After calling open or seek, you can call this method to play the media file.
42
- *
43
- * @returns
44
- * 0: Success.< 0: Failure.
45
- */
46
- abstract play(): number;
47
- /**
48
- * Pauses the playback.
49
- *
50
- * @returns
51
- * 0: Success.< 0: Failure.
52
- */
53
- abstract pause(): number;
54
- /**
55
- * Stops playing the media track.
56
- *
57
- * @returns
58
- * 0: Success.< 0: Failure.
59
- */
60
- abstract stop(): number;
61
- /**
62
- * Resumes playing the media file.
63
- *
64
- * @returns
65
- * 0: Success.< 0: Failure.
66
- */
67
- abstract resume(): number;
68
- /**
69
- * Seeks to a new playback position.
70
- * After successfully calling this method, you will receive the onPlayerEvent callback, reporting the result of the seek operation to the new playback position.To play the media file from a specific position, do the following:Call this method to seek to the position you want to begin playback.Call the play method to play the media file.
71
- *
72
- * @param newPos The new playback position (ms).
73
- *
74
- * @returns
75
- * 0: Success.< 0: Failure.
76
- */
77
- abstract seek(newPos: number): number;
78
- /**
79
- * Sets the pitch of the current media resource.
80
- * Call this method after calling open .
81
- *
82
- * @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.
83
- *
84
- * @returns
85
- * 0: Success.< 0: Failure.
86
- */
87
- abstract setAudioPitch(pitch: number): number;
88
- /**
89
- * Gets the duration of the media resource.
90
- *
91
- * @returns
92
- * The total duration (ms) of the media file.
93
- */
94
- abstract getDuration(): number;
95
- /**
96
- * Gets current local playback progress.
97
- *
98
- * @returns
99
- * Returns the current playback progress (ms) if the call succeeds.< 0: Failure. See MediaPlayerError .
100
- */
101
- abstract getPlayPosition(): number;
102
- /**
103
- * Gets the number of the media streams in the media resource.
104
- * Call this method after calling open .
105
- *
106
- * @returns
107
- * The number of the media streams in the media resource if the method call succeeds.< 0: Failure. See MediaPlayerError .
108
- */
109
- abstract getStreamCount(): number;
110
- /**
111
- * Gets the detailed information of the media stream.
112
- * Call this method after calling getStreamCount .
113
- *
114
- * @param index The index of the media stream.
115
- *
116
- * @returns
117
- * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo .If the call fails, returns NULL.
118
- */
119
- abstract getStreamInfo(index: number): PlayerStreamInfo;
120
- /**
121
- * Sets the loop playback.
122
- * 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.
123
- *
124
- * @param loopCount The number of times the audio effect loops:
125
- *
126
- * @returns
127
- * 0: Success.< 0: Failure.
128
- */
129
- abstract setLoopCount(loopCount: number): number;
130
- /**
131
- * Sets the channel mode of the current audio file.
132
- * Call this method after calling open .
133
- *
134
- * @param speed The playback speed. Agora recommends that you limit this value to between 50 and 400, defined as follows:50: Half the original speed.100: The original speed.400: 4 times the original speed.
135
- *
136
- * @returns
137
- * 0: Success.< 0: Failure.
138
- */
139
- abstract setPlaybackSpeed(speed: number): number;
140
- /**
141
- * Selects the audio track used during playback.
142
- * 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.
143
- *
144
- * @param index The index of the audio track.
145
- *
146
- * @returns
147
- * 0: Success.< 0: Failure.
148
- */
149
- abstract selectAudioTrack(index: number): number;
150
- /**
151
- * Sets the private options for the media player.
152
- * The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, callsetPlayerOptionInInt ("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
153
- *
154
- * @param key The key of the option.
155
- *
156
- * @param value The value of the key.
157
- *
158
- * @returns
159
- * 0: Success.< 0: Failure.
160
- */
161
- abstract setPlayerOptionInInt(key: string, value: number): number;
162
- /**
163
- * @ignore
164
- */
165
- abstract setPlayerOptionInString(key: string, value: string): number;
166
- /**
167
- * @ignore
168
- */
169
- abstract takeScreenshot(filename: string): number;
170
- /**
171
- * @ignore
172
- */
173
- abstract selectInternalSubtitle(index: number): number;
174
- /**
175
- * @ignore
176
- */
177
- abstract setExternalSubtitle(url: string): number;
178
- /**
179
- * Gets current playback state.
180
- *
181
- * @returns
182
- * The current playback state. See MediaPlayerState .
183
- */
184
- abstract getState(): MediaPlayerState;
185
- /**
186
- * Sets whether to mute the media file.
187
- *
188
- * @param muted Whether to mute the media file:true: Mute the media file.false: (Default) Unmute the media file.
189
- *
190
- * @returns
191
- * 0: Success.< 0: Failure.
192
- */
193
- abstract mute(muted: boolean): number;
194
- /**
195
- * Reports whether the media resource is muted.
196
- *
197
- * @returns
198
- * true: Reports whether the media resource is muted.false: Reports whether the media resource is muted.
199
- */
200
- abstract getMute(): boolean;
201
- /**
202
- * Adjusts the local playback volume.
203
- *
204
- * @param volume The local playback volume, which ranges from 0 to 100:0: Mute.100: (Default) The original volume.
205
- *
206
- * @returns
207
- * 0: Success.< 0: Failure.
208
- */
209
- abstract adjustPlayoutVolume(volume: number): number;
210
- /**
211
- * Gets the local playback volume.
212
- *
213
- * @returns
214
- * The local playback volume, which ranges from 0 to 100.0: Mute.100: (Default) The original volume.
215
- */
216
- abstract getPlayoutVolume(): number;
217
- /**
218
- * Adjusts the volume of the media file for publishing.
219
- * After connected to the Agora server, you can call this method to adjust the volume of the media file heard by the remote user.
220
- *
221
- * @param volume The volume, which ranges from 0 to 400:0: Mute.100: (Default) The original volume.400: Four times the original volume (amplifying the audio signals by four times).
222
- *
223
- * @returns
224
- * 0: Success.< 0: Failure.
225
- */
226
- abstract adjustPublishSignalVolume(volume: number): number;
227
- /**
228
- * Gets the volume of the media file for publishing.
229
- *
230
- * @returns
231
- * The remote playback volume, if the method call succeeds.< 0: Failure.
232
- */
233
- abstract getPublishSignalVolume(): number;
234
- /**
235
- * Sets the view.
236
- *
237
- * @returns
238
- * 0: Success.< 0: Failure.
239
- */
240
- abstract setView(view: any): number;
241
- /**
242
- * Sets the render mode of the media player.
243
- *
244
- * @param renderMode Sets the render mode of the view. See RenderModeType .
245
- *
246
- * @returns
247
- * 0: Success.< 0: Failure.
248
- */
249
- abstract setRenderMode(renderMode: RenderModeType): number;
250
- /**
251
- * Registers a media player observer.
252
- *
253
- * @param observer The player observer, listening for events during the playback. See IMediaPlayerSourceObserver .
254
- *
255
- * @returns
256
- * 0: Success.< 0: Failure.
257
- */
258
- abstract registerPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number;
259
- /**
260
- * Releases a media player observer.
261
- *
262
- * @param observer The player observer, listening for events during the playback. See IMediaPlayerSourceObserver .
263
- *
264
- * @returns
265
- * 0: Success.< 0: Failure.
266
- */
267
- abstract unregisterPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number;
268
- /**
269
- * @ignore
270
- */
271
- abstract registerMediaPlayerAudioSpectrumObserver(observer: IAudioSpectrumObserver, intervalInMS: number): number;
272
- /**
273
- * @ignore
274
- */
275
- abstract unregisterMediaPlayerAudioSpectrumObserver(observer: IAudioSpectrumObserver): number;
276
- /**
277
- * Sets the channel mode of the current audio file.
278
- * 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.Call this method after calling open .This method only applies to stereo audio files.
279
- *
280
- * @param mode The channel mode. See AudioDualMonoMode .
281
- *
282
- * @returns
283
- * 0: Success.< 0: Failure.
284
- */
285
- abstract setAudioDualMonoMode(mode: AudioDualMonoMode): number;
286
- /**
287
- * @ignore
288
- */
289
- abstract getPlayerSdkVersion(): string;
290
- /**
291
- * @ignore
292
- */
293
- abstract getPlaySrc(): string;
294
- /**
295
- * @ignore
296
- */
297
- abstract openWithAgoraCDNSrc(src: string, startPos: number): number;
298
- /**
299
- * @ignore
300
- */
301
- abstract getAgoraCDNLineCount(): number;
302
- /**
303
- * @ignore
304
- */
305
- abstract switchAgoraCDNLineByIndex(index: number): number;
306
- /**
307
- * @ignore
308
- */
309
- abstract getCurrentAgoraCDNIndex(): number;
310
- /**
311
- * @ignore
312
- */
313
- abstract enableAutoSwitchAgoraCDN(enable: boolean): number;
314
- /**
315
- * @ignore
316
- */
317
- abstract renewAgoraCDNSrcToken(token: string, ts: number): number;
318
- /**
319
- * @ignore
320
- */
321
- abstract switchAgoraCDNSrc(src: string, syncPts?: boolean): number;
322
- /**
323
- * Switches the media resource being played.
324
- * You can call this method to switch the media resource to be played according to the current network status. For example:When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.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 event in the PlayerEventSwitchComplete callback, the switch is successful; If you receive the onPlayerEvent event in the PlayerEventSwitchError callback, the switch fails.Ensure that you call this method after open .To ensure normal playback, pay attention to the following when calling this method:Do not call this method when playback is paused.Do not call the seek method during switching.Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched.
325
- *
326
- * @param src The URL of the media resource.
327
- *
328
- * @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.Make sure to set this parameter as false if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios.
329
- *
330
- * @returns
331
- * 0: Success.< 0: Failure.
332
- */
333
- abstract switchSrc(src: string, syncPts?: boolean): number;
334
- /**
335
- * Preloads a media resource.
336
- * 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 .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.
337
- *
338
- * @param src The URL of the media resource.
339
- *
340
- * @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.
341
- *
342
- * @returns
343
- * 0: Success.< 0: Failure.
344
- */
345
- abstract preloadSrc(src: string, startPos: number): number;
346
- /**
347
- * Plays preloaded media resources.
348
- * 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.
349
- *
350
- * @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.
351
- *
352
- * @returns
353
- * 0: Success.< 0: Failure.
354
- */
355
- abstract playPreloadedSrc(src: string): number;
356
- /**
357
- * Unloads media resources that are preloaded.
358
- * This method cannot release the media resource being played.
359
- *
360
- * @param src The URL of the media resource.
361
- *
362
- * @returns
363
- * 0: Success.< 0: Failure.
364
- */
365
- abstract unloadSrc(src: string): number;
366
- /**
367
- * Enables or disables the spatial audio effect for the media player.
368
- * 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.
369
- *
370
- * @returns
371
- * 0: Success.< 0: Failure.
372
- */
373
- abstract setSpatialAudioParams(params: SpatialAudioParams): number;
374
- /**
375
- * @ignore
376
- */
377
- abstract setSoundPositionParams(pan: number, gain: number): number;
378
- /**
379
- * Registers an audio frame observer object.
380
- * You need to implement the IMediaPlayerAudioFrameObserver 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.
381
- *
382
- * @param observer The audio frame observer, reporting the reception of each audio frame. See IMediaPlayerAudioFrameObserver .
383
- *
384
- * @returns
385
- * 0: Success.< 0: Failure.
386
- */
387
- abstract registerAudioFrameObserver(observer: IMediaPlayerAudioFrameObserver): number;
388
- /**
389
- * Unregisters an audio observer.
390
- *
391
- * @param observer The audio observer. See IMediaPlayerAudioFrameObserver .
392
- *
393
- * @returns
394
- * 0: Success.< 0: Failure.
395
- */
396
- abstract unregisterAudioFrameObserver(observer: IMediaPlayerAudioFrameObserver): number;
397
- /**
398
- * Registers a video frame observer object.
399
- * 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.
400
- *
401
- * @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver .
402
- *
403
- * @returns
404
- * 0: Success.< 0: Failure.
405
- */
406
- abstract registerVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number;
407
- /**
408
- * Unregisters the video frame observer.
409
- *
410
- * @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver .
411
- *
412
- * @returns
413
- * 0: Success.< 0: Failure.
414
- */
415
- abstract unregisterVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number;
416
- }
417
- /**
418
- * This class provides methods to manage cached media files.
419
- */
420
- export declare abstract class IMediaPlayerCacheManager {
421
- /**
422
- * Deletes all cached media files in the media player.
423
- * The cached media file currently being played will not be deleted.
424
- *
425
- * @returns
426
- * 0: Success.< 0: Failure. See MediaPlayerError .
427
- */
428
- abstract removeAllCaches(): number;
429
- /**
430
- * Deletes a cached media file that is the least recently used.
431
- * 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.
432
- *
433
- * @returns
434
- * 0: Success.
435
- * < 0: Failure. See MediaPlayerError .
436
- */
437
- abstract removeOldCache(): number;
438
- /**
439
- * Deletes a cached media file.
440
- * The cached media file currently being played will not be deleted.
441
- *
442
- * @param uri The URI (Uniform Resource Identifier) of the media file to be deleted.
443
- *
444
- * @returns
445
- * 0: Success.< 0: Failure. See MediaPlayerError .
446
- */
447
- abstract removeCacheByUri(uri: string): number;
448
- /**
449
- * Sets the storage path for the media files that you want to cache.
450
- * Make sure IRtcEngine is initialized before you call this method.
451
- *
452
- * @param path The absolute path of the media files to be cached. Ensure that the directory for the media files exists and is writable.
453
- *
454
- * @returns
455
- * 0: Success.
456
- * < 0: Failure. See MediaPlayerError .
457
- */
458
- abstract setCacheDir(path: string): number;
459
- /**
460
- * Sets the maximum number of media files that can be cached.
461
- *
462
- * @param count The maximum number of media files that can be cached. The default value is 1,000.
463
- *
464
- * @returns
465
- * 0: Success.
466
- * < 0: Failure. See MediaPlayerError .
467
- */
468
- abstract setMaxCacheFileCount(count: number): number;
469
- /**
470
- * Sets the maximum size of the aggregate storage space for cached media files.
471
- *
472
- * @param cacheSize The maximum size (bytes) of the aggregate storage space for cached media files. The default value is 1 GB.
473
- *
474
- * @returns
475
- * 0: Success.< 0: Failure. See MediaPlayerError .
476
- */
477
- abstract setMaxCacheFileSize(cacheSize: number): number;
478
- /**
479
- * Sets whether to delete cached media files automatically.
480
- * 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.
481
- *
482
- * @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.
483
- *
484
- * @returns
485
- * 0: Success.
486
- * < 0: Failure. See MediaPlayerError .
487
- */
488
- abstract enableAutoRemoveCache(enable: boolean): number;
489
- /**
490
- * Gets the storage path of the cached media files.
491
- * 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.
492
- *
493
- * @param length An input parameter; the maximum length of the cache file storage path string.
494
- *
495
- * @returns
496
- * The call succeeds, and the SDK returns the storage path of the cached media files.< 0: Failure. See MediaPlayerError .
497
- */
498
- abstract getCacheDir(length: number): string;
499
- /**
500
- * Gets the maximum number of media files that can be cached.
501
- * By default, the maximum number of media files that can be cached is 1,000.
502
- *
503
- * @returns
504
- * > 0: The call succeeds and returns the maximum number of media files that can be cached.< 0: Failure. See MediaPlayerError .
505
- */
506
- abstract getMaxCacheFileCount(): number;
507
- /**
508
- * Gets the maximum size of the aggregate storage space for cached media files.
509
- * 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.
510
- *
511
- * @returns
512
- * > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files.< 0: Failure. See MediaPlayerError .
513
- */
514
- abstract getMaxCacheFileSize(): number;
515
- /**
516
- * Gets the number of media files that are cached.
517
- *
518
- * @returns
519
- * ≥ 0: The call succeeds and returns the number of media files that are cached.< 0: Failure. See MediaPlayerError .
520
- */
521
- abstract getCacheFileCount(): number;
522
- }
523
- /**
524
- * The audio frame observer for the media player.
525
- */
526
- export interface IMediaPlayerAudioFrameObserver {
527
- /**
528
- * Occurs each time the player receives an audio frame.
529
- * After registering the audio frame observer, the callback occurs every time the player receives an audio frame, reporting the detailed information of the audio frame.
530
- *
531
- * @param frame Audio frame information. See AudioPcmFrame .
532
- */
533
- onFrame?(frame: AudioPcmFrame): void;
534
- }
535
- /**
536
- * The video frame observer for the media player.
537
- */
538
- export interface IMediaPlayerVideoFrameObserver {
539
- /**
540
- * Occurs each time the player receives a video frame.
541
- * 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.
542
- *
543
- * @param frame Video frame information. See VideoFrame .
544
- */
545
- onFrame?(frame: VideoFrame): void;
546
- }
@@ -1,88 +0,0 @@
1
- import './extension/IAgoraMediaPlayerSourceExtension';
2
- import { MediaPlayerState, MediaPlayerError, MediaPlayerEvent, PlayerPreloadEvent, SrcInfo, PlayerUpdatedInfo } from './AgoraMediaPlayerTypes';
3
- /**
4
- * Provides callbacks for media players.
5
- */
6
- export interface IMediaPlayerSourceObserver {
7
- /**
8
- * Reports the playback state change.
9
- * When the state of the media player changes, the SDK triggers this callback to report the current playback state.
10
- *
11
- * @param state The playback state, see MediaPlayerState .
12
- *
13
- * @param ec The error code. See MediaPlayerError .
14
- */
15
- onPlayerSourceStateChanged?(state: MediaPlayerState, ec: MediaPlayerError): void;
16
- /**
17
- * Reports current playback progress.
18
- * When playing media files, the SDK triggers this callback every one second to report current playback progress.
19
- *
20
- * @param position The playback position (ms) of media files.
21
- */
22
- onPositionChanged?(positionMs: number): void;
23
- /**
24
- * Reports the playback event.
25
- * After calling the seek method, the SDK triggers the callback to report the results of the seek operation.
26
- *
27
- * @param eventCode The playback event. See MediaPlayerEvent .
28
- *
29
- * @param elapsedTime The time (ms) when the event occurs.
30
- *
31
- * @param message Information about the event.
32
- */
33
- onPlayerEvent?(eventCode: MediaPlayerEvent, elapsedTime: number, message: string): void;
34
- /**
35
- * Occurs when the media metadata is received.
36
- * The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.
37
- *
38
- * @param data The detailed data of the media metadata.
39
- *
40
- * @param length The data length (bytes).
41
- */
42
- onMetaData?(data: Uint8Array, length: number): void;
43
- /**
44
- * Reports the playback duration that the buffered data can support.
45
- * When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support.When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow.When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover.
46
- *
47
- * @param playCachedBuffer The playback duration (ms) that the buffered data can support.
48
- */
49
- onPlayBufferUpdated?(playCachedBuffer: number): void;
50
- /**
51
- * Reports the events of preloaded media resources.
52
- *
53
- * @param src The URL of the media resource.
54
- *
55
- * @param event Events that occur when media resources are preloaded. See PlayerPreloadEvent .
56
- */
57
- onPreloadEvent?(src: string, event: PlayerPreloadEvent): void;
58
- /**
59
- * @ignore
60
- */
61
- onCompleted?(): void;
62
- /**
63
- * @ignore
64
- */
65
- onAgoraCDNTokenWillExpire?(): void;
66
- /**
67
- * Occurs when the video bitrate of the media resource changes.
68
- *
69
- * @param from Information about the video bitrate of the media resource being played. See SrcInfo .
70
- *
71
- * @param to Information about the changed video bitrate of media resource being played. See SrcInfo .
72
- */
73
- onPlayerSrcInfoChanged?(from: SrcInfo, to: SrcInfo): void;
74
- /**
75
- * Occurs when information related to the media player changes.
76
- * When the information about the media player changes, the SDK triggers this callback. You can use this callback for troubleshooting.
77
- *
78
- * @param info Information related to the media player. See PlayerUpdatedInfo .
79
- */
80
- onPlayerInfoUpdated?(info: PlayerUpdatedInfo): void;
81
- /**
82
- * Reports the volume of the media player.
83
- * The SDK triggers this callback every 200 milliseconds to report the current volume of the media player.
84
- *
85
- * @param volume The volume of the media player. The value ranges from 0 to 255.
86
- */
87
- onAudioVolumeIndication?(volume: number): void;
88
- }
@@ -1,49 +0,0 @@
1
- import './extension/IAgoraMediaRecorderExtension';
2
- import { RtcConnection } from './IAgoraRtcEngineEx';
3
- import { IMediaRecorderObserver, MediaRecorderConfiguration } from './AgoraMediaBase';
4
- /**
5
- * Used for recording audio and video on the client.
6
- * IMediaRecorder can record the following:
7
- * The audio captured by the local microphone and encoded in AAC format.The video captured by the local camera and encoded by the SDK.
8
- */
9
- export declare abstract class IMediaRecorder {
10
- /**
11
- * Registers one IMediaRecorderObserver object.
12
- * Make sure the IRtcEngine is initialized before you call this method.
13
- *
14
- * @param connection The connection information. See RtcConnection .
15
- *
16
- * @param callback The callbacks for recording local audio and video streams. See IMediaRecorderObserver .
17
- *
18
- * @returns
19
- * 0: Success.< 0: Failure.
20
- */
21
- abstract setMediaRecorderObserver(connection: RtcConnection, callback: IMediaRecorderObserver): number;
22
- /**
23
- * Starts recording the local audio and video.
24
- * After successfully getting the IMediaRecorder object by calling getMediaRecorder , you can call this method to enable the recoridng of the local audio and video.This method can record the audio captured by the local microphone and encoded in AAC format, and the video captured by the local camera and encoded in H.264 format. The SDK can generate a recording file only when it detects audio and video streams; when there are no audio and video streams to be recorded or the audio and video streams are interrupted for more than five seconds, the SDK stops the recording and triggers the onRecorderStateChanged(RecorderStateError, RecorderErrorNoStream) callback.Once the recording is started, if the video resolution is changed, the SDK stops the recording; if the sampling rate and audio channel changes, the SDK continues recording and generates audio files respectively.Call this method after joining a channel.
25
- *
26
- * @param connection The connection information. See RtcConnection .
27
- *
28
- * @param config The recording configuration. See MediaRecorderConfiguration .
29
- *
30
- * @returns
31
- * 0: Success.< 0: Failure.2: The parameter is invalid. Ensure the following:The specified path of the recording file exists and is writable.The specified format of the recording file is supported.The maximum recording duration is correctly set.4: IRtcEngine does not support the request. The recording is ongoing or the recording stops because an error occurs.7: A method is called before IRtcEngine is initialized.
32
- */
33
- abstract startRecording(connection: RtcConnection, config: MediaRecorderConfiguration): number;
34
- /**
35
- * Stops recording the local audio and video.
36
- * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable.
37
- *
38
- * @param connection The connection information. See RtcConnection .
39
- *
40
- * @returns
41
- * 0: Success.< 0: Failure.-7: A method is called before IRtcEngine is initialized.
42
- */
43
- abstract stopRecording(connection: RtcConnection): number;
44
- /**
45
- * Release the IMediaRecorder object.
46
- * This method releases the IMediaRecorder object and all resources used by the IRtcEngine object. After calling this method, if you need to start recording again, you need to call getMediaRecorder again to get the IMediaRecorder object.
47
- */
48
- abstract release(): void;
49
- }