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,1169 @@
1
+ import { SpatialAudioParams } from '../AgoraBase';
2
+ import {
3
+ AudioDualMonoMode,
4
+ IAudioPcmFrameSink,
5
+ IAudioSpectrumObserver,
6
+ RawAudioFrameOpModeType,
7
+ RenderModeType,
8
+ } from '../AgoraMediaBase';
9
+ import {
10
+ MediaPlayerState,
11
+ MediaSource,
12
+ PlayerStreamInfo,
13
+ } from '../AgoraMediaPlayerTypes';
14
+ import {
15
+ IMediaPlayer,
16
+ IMediaPlayerCacheManager,
17
+ IMediaPlayerVideoFrameObserver,
18
+ } from '../IAgoraMediaPlayer';
19
+ import { IMediaPlayerSourceObserver } from '../IAgoraMediaPlayerSource';
20
+
21
+ // @ts-ignore
22
+ export class IMediaPlayerImpl implements IMediaPlayer {
23
+ getMediaPlayerId(): number {
24
+ const apiType = this.getApiTypeFromGetMediaPlayerId();
25
+ const jsonParams = {};
26
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
27
+ return jsonResults.result;
28
+ }
29
+
30
+ protected getApiTypeFromGetMediaPlayerId(): string {
31
+ return 'MediaPlayer_getMediaPlayerId';
32
+ }
33
+
34
+ open(url: string, startPos: number): number {
35
+ const apiType = this.getApiTypeFromOpen(url, startPos);
36
+ const jsonParams = {
37
+ url: url,
38
+ startPos: startPos,
39
+ toJSON: () => {
40
+ return {
41
+ url: url,
42
+ startPos: startPos,
43
+ };
44
+ },
45
+ };
46
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
47
+ return jsonResults.result;
48
+ }
49
+
50
+ protected getApiTypeFromOpen(url: string, startPos: number): string {
51
+ return 'MediaPlayer_open_e43f201';
52
+ }
53
+
54
+ openWithMediaSource(source: MediaSource): number {
55
+ const apiType = this.getApiTypeFromOpenWithMediaSource(source);
56
+ const jsonParams = {
57
+ source: source,
58
+ toJSON: () => {
59
+ return {
60
+ source: source,
61
+ };
62
+ },
63
+ };
64
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
65
+ return jsonResults.result;
66
+ }
67
+
68
+ protected getApiTypeFromOpenWithMediaSource(source: MediaSource): string {
69
+ return 'MediaPlayer_openWithMediaSource_3c11499';
70
+ }
71
+
72
+ play(): number {
73
+ const apiType = this.getApiTypeFromPlay();
74
+ const jsonParams = {};
75
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
76
+ return jsonResults.result;
77
+ }
78
+
79
+ protected getApiTypeFromPlay(): string {
80
+ return 'MediaPlayer_play';
81
+ }
82
+
83
+ pause(): number {
84
+ const apiType = this.getApiTypeFromPause();
85
+ const jsonParams = {};
86
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
87
+ return jsonResults.result;
88
+ }
89
+
90
+ protected getApiTypeFromPause(): string {
91
+ return 'MediaPlayer_pause';
92
+ }
93
+
94
+ stop(): number {
95
+ const apiType = this.getApiTypeFromStop();
96
+ const jsonParams = {};
97
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
98
+ return jsonResults.result;
99
+ }
100
+
101
+ protected getApiTypeFromStop(): string {
102
+ return 'MediaPlayer_stop';
103
+ }
104
+
105
+ resume(): number {
106
+ const apiType = this.getApiTypeFromResume();
107
+ const jsonParams = {};
108
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
109
+ return jsonResults.result;
110
+ }
111
+
112
+ protected getApiTypeFromResume(): string {
113
+ return 'MediaPlayer_resume';
114
+ }
115
+
116
+ seek(newPos: number): number {
117
+ const apiType = this.getApiTypeFromSeek(newPos);
118
+ const jsonParams = {
119
+ newPos: newPos,
120
+ toJSON: () => {
121
+ return {
122
+ newPos: newPos,
123
+ };
124
+ },
125
+ };
126
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
127
+ return jsonResults.result;
128
+ }
129
+
130
+ protected getApiTypeFromSeek(newPos: number): string {
131
+ return 'MediaPlayer_seek_f631116';
132
+ }
133
+
134
+ setAudioPitch(pitch: number): number {
135
+ const apiType = this.getApiTypeFromSetAudioPitch(pitch);
136
+ const jsonParams = {
137
+ pitch: pitch,
138
+ toJSON: () => {
139
+ return {
140
+ pitch: pitch,
141
+ };
142
+ },
143
+ };
144
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
145
+ return jsonResults.result;
146
+ }
147
+
148
+ protected getApiTypeFromSetAudioPitch(pitch: number): string {
149
+ return 'MediaPlayer_setAudioPitch_46f8ab7';
150
+ }
151
+
152
+ getDuration(): number {
153
+ const apiType = this.getApiTypeFromGetDuration();
154
+ const jsonParams = {};
155
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
156
+ const duration = jsonResults.duration;
157
+ return duration;
158
+ }
159
+
160
+ protected getApiTypeFromGetDuration(): string {
161
+ return 'MediaPlayer_getDuration_b12f121';
162
+ }
163
+
164
+ getPlayPosition(): number {
165
+ const apiType = this.getApiTypeFromGetPlayPosition();
166
+ const jsonParams = {};
167
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
168
+ const pos = jsonResults.pos;
169
+ return pos;
170
+ }
171
+
172
+ protected getApiTypeFromGetPlayPosition(): string {
173
+ return 'MediaPlayer_getPlayPosition_b12f121';
174
+ }
175
+
176
+ getStreamCount(): number {
177
+ const apiType = this.getApiTypeFromGetStreamCount();
178
+ const jsonParams = {};
179
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
180
+ const count = jsonResults.count;
181
+ return count;
182
+ }
183
+
184
+ protected getApiTypeFromGetStreamCount(): string {
185
+ return 'MediaPlayer_getStreamCount_b12f121';
186
+ }
187
+
188
+ getStreamInfo(index: number): PlayerStreamInfo {
189
+ const apiType = this.getApiTypeFromGetStreamInfo(index);
190
+ const jsonParams = {
191
+ index: index,
192
+ toJSON: () => {
193
+ return {
194
+ index: index,
195
+ };
196
+ },
197
+ };
198
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
199
+ const info = jsonResults.info;
200
+ return info;
201
+ }
202
+
203
+ protected getApiTypeFromGetStreamInfo(index: number): string {
204
+ return 'MediaPlayer_getStreamInfo_0fa63fa';
205
+ }
206
+
207
+ setLoopCount(loopCount: number): number {
208
+ const apiType = this.getApiTypeFromSetLoopCount(loopCount);
209
+ const jsonParams = {
210
+ loopCount: loopCount,
211
+ toJSON: () => {
212
+ return {
213
+ loopCount: loopCount,
214
+ };
215
+ },
216
+ };
217
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
218
+ return jsonResults.result;
219
+ }
220
+
221
+ protected getApiTypeFromSetLoopCount(loopCount: number): string {
222
+ return 'MediaPlayer_setLoopCount_46f8ab7';
223
+ }
224
+
225
+ setPlaybackSpeed(speed: number): number {
226
+ const apiType = this.getApiTypeFromSetPlaybackSpeed(speed);
227
+ const jsonParams = {
228
+ speed: speed,
229
+ toJSON: () => {
230
+ return {
231
+ speed: speed,
232
+ };
233
+ },
234
+ };
235
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
236
+ return jsonResults.result;
237
+ }
238
+
239
+ protected getApiTypeFromSetPlaybackSpeed(speed: number): string {
240
+ return 'MediaPlayer_setPlaybackSpeed_46f8ab7';
241
+ }
242
+
243
+ selectAudioTrack(index: number): number {
244
+ const apiType = this.getApiTypeFromSelectAudioTrack(index);
245
+ const jsonParams = {
246
+ index: index,
247
+ toJSON: () => {
248
+ return {
249
+ index: index,
250
+ };
251
+ },
252
+ };
253
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
254
+ return jsonResults.result;
255
+ }
256
+
257
+ protected getApiTypeFromSelectAudioTrack(index: number): string {
258
+ return 'MediaPlayer_selectAudioTrack_46f8ab7';
259
+ }
260
+
261
+ selectMultiAudioTrack(
262
+ playoutTrackIndex: number,
263
+ publishTrackIndex: number
264
+ ): number {
265
+ const apiType = this.getApiTypeFromSelectMultiAudioTrack(
266
+ playoutTrackIndex,
267
+ publishTrackIndex
268
+ );
269
+ const jsonParams = {
270
+ playoutTrackIndex: playoutTrackIndex,
271
+ publishTrackIndex: publishTrackIndex,
272
+ toJSON: () => {
273
+ return {
274
+ playoutTrackIndex: playoutTrackIndex,
275
+ publishTrackIndex: publishTrackIndex,
276
+ };
277
+ },
278
+ };
279
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
280
+ return jsonResults.result;
281
+ }
282
+
283
+ protected getApiTypeFromSelectMultiAudioTrack(
284
+ playoutTrackIndex: number,
285
+ publishTrackIndex: number
286
+ ): string {
287
+ return 'MediaPlayer_selectMultiAudioTrack_4e92b3c';
288
+ }
289
+
290
+ takeScreenshot(filename: string): number {
291
+ const apiType = this.getApiTypeFromTakeScreenshot(filename);
292
+ const jsonParams = {
293
+ filename: filename,
294
+ toJSON: () => {
295
+ return {
296
+ filename: filename,
297
+ };
298
+ },
299
+ };
300
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
301
+ return jsonResults.result;
302
+ }
303
+
304
+ protected getApiTypeFromTakeScreenshot(filename: string): string {
305
+ return 'MediaPlayer_takeScreenshot_3a2037f';
306
+ }
307
+
308
+ selectInternalSubtitle(index: number): number {
309
+ const apiType = this.getApiTypeFromSelectInternalSubtitle(index);
310
+ const jsonParams = {
311
+ index: index,
312
+ toJSON: () => {
313
+ return {
314
+ index: index,
315
+ };
316
+ },
317
+ };
318
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
319
+ return jsonResults.result;
320
+ }
321
+
322
+ protected getApiTypeFromSelectInternalSubtitle(index: number): string {
323
+ return 'MediaPlayer_selectInternalSubtitle_46f8ab7';
324
+ }
325
+
326
+ setExternalSubtitle(url: string): number {
327
+ const apiType = this.getApiTypeFromSetExternalSubtitle(url);
328
+ const jsonParams = {
329
+ url: url,
330
+ toJSON: () => {
331
+ return {
332
+ url: url,
333
+ };
334
+ },
335
+ };
336
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
337
+ return jsonResults.result;
338
+ }
339
+
340
+ protected getApiTypeFromSetExternalSubtitle(url: string): string {
341
+ return 'MediaPlayer_setExternalSubtitle_3a2037f';
342
+ }
343
+
344
+ getState(): MediaPlayerState {
345
+ const apiType = this.getApiTypeFromGetState();
346
+ const jsonParams = {};
347
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
348
+ return jsonResults.result;
349
+ }
350
+
351
+ protected getApiTypeFromGetState(): string {
352
+ return 'MediaPlayer_getState';
353
+ }
354
+
355
+ mute(muted: boolean): number {
356
+ const apiType = this.getApiTypeFromMute(muted);
357
+ const jsonParams = {
358
+ muted: muted,
359
+ toJSON: () => {
360
+ return {
361
+ muted: muted,
362
+ };
363
+ },
364
+ };
365
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
366
+ return jsonResults.result;
367
+ }
368
+
369
+ protected getApiTypeFromMute(muted: boolean): string {
370
+ return 'MediaPlayer_mute_5039d15';
371
+ }
372
+
373
+ getMute(): boolean {
374
+ const apiType = this.getApiTypeFromGetMute();
375
+ const jsonParams = {};
376
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
377
+ const muted = jsonResults.muted;
378
+ return muted;
379
+ }
380
+
381
+ protected getApiTypeFromGetMute(): string {
382
+ return 'MediaPlayer_getMute_c93e9d4';
383
+ }
384
+
385
+ adjustPlayoutVolume(volume: number): number {
386
+ const apiType = this.getApiTypeFromAdjustPlayoutVolume(volume);
387
+ const jsonParams = {
388
+ volume: volume,
389
+ toJSON: () => {
390
+ return {
391
+ volume: volume,
392
+ };
393
+ },
394
+ };
395
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
396
+ return jsonResults.result;
397
+ }
398
+
399
+ protected getApiTypeFromAdjustPlayoutVolume(volume: number): string {
400
+ return 'MediaPlayer_adjustPlayoutVolume_46f8ab7';
401
+ }
402
+
403
+ getPlayoutVolume(): number {
404
+ const apiType = this.getApiTypeFromGetPlayoutVolume();
405
+ const jsonParams = {};
406
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
407
+ const volume = jsonResults.volume;
408
+ return volume;
409
+ }
410
+
411
+ protected getApiTypeFromGetPlayoutVolume(): string {
412
+ return 'MediaPlayer_getPlayoutVolume_9cfaa7e';
413
+ }
414
+
415
+ adjustPublishSignalVolume(volume: number): number {
416
+ const apiType = this.getApiTypeFromAdjustPublishSignalVolume(volume);
417
+ const jsonParams = {
418
+ volume: volume,
419
+ toJSON: () => {
420
+ return {
421
+ volume: volume,
422
+ };
423
+ },
424
+ };
425
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
426
+ return jsonResults.result;
427
+ }
428
+
429
+ protected getApiTypeFromAdjustPublishSignalVolume(volume: number): string {
430
+ return 'MediaPlayer_adjustPublishSignalVolume_46f8ab7';
431
+ }
432
+
433
+ getPublishSignalVolume(): number {
434
+ const apiType = this.getApiTypeFromGetPublishSignalVolume();
435
+ const jsonParams = {};
436
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
437
+ const volume = jsonResults.volume;
438
+ return volume;
439
+ }
440
+
441
+ protected getApiTypeFromGetPublishSignalVolume(): string {
442
+ return 'MediaPlayer_getPublishSignalVolume_9cfaa7e';
443
+ }
444
+
445
+ setView(view: any): number {
446
+ const apiType = this.getApiTypeFromSetView(view);
447
+ const jsonParams = {
448
+ view: view,
449
+ toJSON: () => {
450
+ return {
451
+ view: view,
452
+ };
453
+ },
454
+ };
455
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
456
+ return jsonResults.result;
457
+ }
458
+
459
+ protected getApiTypeFromSetView(view: any): string {
460
+ return 'MediaPlayer_setView_cb1a81f';
461
+ }
462
+
463
+ setRenderMode(renderMode: RenderModeType): number {
464
+ const apiType = this.getApiTypeFromSetRenderMode(renderMode);
465
+ const jsonParams = {
466
+ renderMode: renderMode,
467
+ toJSON: () => {
468
+ return {
469
+ renderMode: renderMode,
470
+ };
471
+ },
472
+ };
473
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
474
+ return jsonResults.result;
475
+ }
476
+
477
+ protected getApiTypeFromSetRenderMode(renderMode: RenderModeType): string {
478
+ return 'MediaPlayer_setRenderMode_bedb5ae';
479
+ }
480
+
481
+ registerPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number {
482
+ const apiType = this.getApiTypeFromRegisterPlayerSourceObserver(observer);
483
+ const jsonParams = {
484
+ observer: observer,
485
+ toJSON: () => {
486
+ return {};
487
+ },
488
+ };
489
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
490
+ return jsonResults.result;
491
+ }
492
+
493
+ protected getApiTypeFromRegisterPlayerSourceObserver(
494
+ observer: IMediaPlayerSourceObserver
495
+ ): string {
496
+ return 'MediaPlayer_registerPlayerSourceObserver_15621d7';
497
+ }
498
+
499
+ unregisterPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number {
500
+ const apiType = this.getApiTypeFromUnregisterPlayerSourceObserver(observer);
501
+ const jsonParams = {
502
+ observer: observer,
503
+ toJSON: () => {
504
+ return {};
505
+ },
506
+ };
507
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
508
+ return jsonResults.result;
509
+ }
510
+
511
+ protected getApiTypeFromUnregisterPlayerSourceObserver(
512
+ observer: IMediaPlayerSourceObserver
513
+ ): string {
514
+ return 'MediaPlayer_unregisterPlayerSourceObserver_15621d7';
515
+ }
516
+
517
+ registerAudioFrameObserver(
518
+ observer: IAudioPcmFrameSink,
519
+ mode: RawAudioFrameOpModeType = RawAudioFrameOpModeType.RawAudioFrameOpModeReadOnly
520
+ ): number {
521
+ const apiType = this.getApiTypeFromRegisterAudioFrameObserver(
522
+ observer,
523
+ mode
524
+ );
525
+ const jsonParams = {
526
+ observer: observer,
527
+ mode: mode,
528
+ toJSON: () => {
529
+ return {
530
+ mode: mode,
531
+ };
532
+ },
533
+ };
534
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
535
+ return jsonResults.result;
536
+ }
537
+
538
+ protected getApiTypeFromRegisterAudioFrameObserver(
539
+ observer: IAudioPcmFrameSink,
540
+ mode: RawAudioFrameOpModeType = RawAudioFrameOpModeType.RawAudioFrameOpModeReadOnly
541
+ ): string {
542
+ return 'MediaPlayer_registerAudioFrameObserver_a5b510b';
543
+ }
544
+
545
+ unregisterAudioFrameObserver(observer: IAudioPcmFrameSink): number {
546
+ const apiType = this.getApiTypeFromUnregisterAudioFrameObserver(observer);
547
+ const jsonParams = {
548
+ observer: observer,
549
+ toJSON: () => {
550
+ return {};
551
+ },
552
+ };
553
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
554
+ return jsonResults.result;
555
+ }
556
+
557
+ protected getApiTypeFromUnregisterAudioFrameObserver(
558
+ observer: IAudioPcmFrameSink
559
+ ): string {
560
+ return 'MediaPlayer_unregisterAudioFrameObserver_89ab9b5';
561
+ }
562
+
563
+ registerVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number {
564
+ const apiType = this.getApiTypeFromRegisterVideoFrameObserver(observer);
565
+ const jsonParams = {
566
+ observer: observer,
567
+ toJSON: () => {
568
+ return {};
569
+ },
570
+ };
571
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
572
+ return jsonResults.result;
573
+ }
574
+
575
+ protected getApiTypeFromRegisterVideoFrameObserver(
576
+ observer: IMediaPlayerVideoFrameObserver
577
+ ): string {
578
+ return 'MediaPlayer_registerVideoFrameObserver_833bd8d';
579
+ }
580
+
581
+ unregisterVideoFrameObserver(
582
+ observer: IMediaPlayerVideoFrameObserver
583
+ ): number {
584
+ const apiType = this.getApiTypeFromUnregisterVideoFrameObserver(observer);
585
+ const jsonParams = {
586
+ observer: observer,
587
+ toJSON: () => {
588
+ return {};
589
+ },
590
+ };
591
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
592
+ return jsonResults.result;
593
+ }
594
+
595
+ protected getApiTypeFromUnregisterVideoFrameObserver(
596
+ observer: IMediaPlayerVideoFrameObserver
597
+ ): string {
598
+ return 'MediaPlayer_unregisterVideoFrameObserver_5165d4c';
599
+ }
600
+
601
+ registerMediaPlayerAudioSpectrumObserver(
602
+ observer: IAudioSpectrumObserver,
603
+ intervalInMS: number
604
+ ): number {
605
+ const apiType = this.getApiTypeFromRegisterMediaPlayerAudioSpectrumObserver(
606
+ observer,
607
+ intervalInMS
608
+ );
609
+ const jsonParams = {
610
+ observer: observer,
611
+ intervalInMS: intervalInMS,
612
+ toJSON: () => {
613
+ return {
614
+ intervalInMS: intervalInMS,
615
+ };
616
+ },
617
+ };
618
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
619
+ return jsonResults.result;
620
+ }
621
+
622
+ protected getApiTypeFromRegisterMediaPlayerAudioSpectrumObserver(
623
+ observer: IAudioSpectrumObserver,
624
+ intervalInMS: number
625
+ ): string {
626
+ return 'MediaPlayer_registerMediaPlayerAudioSpectrumObserver_226bb48';
627
+ }
628
+
629
+ unregisterMediaPlayerAudioSpectrumObserver(
630
+ observer: IAudioSpectrumObserver
631
+ ): number {
632
+ const apiType =
633
+ this.getApiTypeFromUnregisterMediaPlayerAudioSpectrumObserver(observer);
634
+ const jsonParams = {
635
+ observer: observer,
636
+ toJSON: () => {
637
+ return {};
638
+ },
639
+ };
640
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
641
+ return jsonResults.result;
642
+ }
643
+
644
+ protected getApiTypeFromUnregisterMediaPlayerAudioSpectrumObserver(
645
+ observer: IAudioSpectrumObserver
646
+ ): string {
647
+ return 'MediaPlayer_unregisterMediaPlayerAudioSpectrumObserver_09064ce';
648
+ }
649
+
650
+ setAudioDualMonoMode(mode: AudioDualMonoMode): number {
651
+ const apiType = this.getApiTypeFromSetAudioDualMonoMode(mode);
652
+ const jsonParams = {
653
+ mode: mode,
654
+ toJSON: () => {
655
+ return {
656
+ mode: mode,
657
+ };
658
+ },
659
+ };
660
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
661
+ return jsonResults.result;
662
+ }
663
+
664
+ protected getApiTypeFromSetAudioDualMonoMode(
665
+ mode: AudioDualMonoMode
666
+ ): string {
667
+ return 'MediaPlayer_setAudioDualMonoMode_30c9672';
668
+ }
669
+
670
+ getPlayerSdkVersion(): string {
671
+ const apiType = this.getApiTypeFromGetPlayerSdkVersion();
672
+ const jsonParams = {};
673
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
674
+ return jsonResults.result;
675
+ }
676
+
677
+ protected getApiTypeFromGetPlayerSdkVersion(): string {
678
+ return 'MediaPlayer_getPlayerSdkVersion';
679
+ }
680
+
681
+ getPlaySrc(): string {
682
+ const apiType = this.getApiTypeFromGetPlaySrc();
683
+ const jsonParams = {};
684
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
685
+ return jsonResults.result;
686
+ }
687
+
688
+ protected getApiTypeFromGetPlaySrc(): string {
689
+ return 'MediaPlayer_getPlaySrc';
690
+ }
691
+
692
+ openWithAgoraCDNSrc(src: string, startPos: number): number {
693
+ const apiType = this.getApiTypeFromOpenWithAgoraCDNSrc(src, startPos);
694
+ const jsonParams = {
695
+ src: src,
696
+ startPos: startPos,
697
+ toJSON: () => {
698
+ return {
699
+ src: src,
700
+ startPos: startPos,
701
+ };
702
+ },
703
+ };
704
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
705
+ return jsonResults.result;
706
+ }
707
+
708
+ protected getApiTypeFromOpenWithAgoraCDNSrc(
709
+ src: string,
710
+ startPos: number
711
+ ): string {
712
+ return 'MediaPlayer_openWithAgoraCDNSrc_e43f201';
713
+ }
714
+
715
+ getAgoraCDNLineCount(): number {
716
+ const apiType = this.getApiTypeFromGetAgoraCDNLineCount();
717
+ const jsonParams = {};
718
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
719
+ return jsonResults.result;
720
+ }
721
+
722
+ protected getApiTypeFromGetAgoraCDNLineCount(): string {
723
+ return 'MediaPlayer_getAgoraCDNLineCount';
724
+ }
725
+
726
+ switchAgoraCDNLineByIndex(index: number): number {
727
+ const apiType = this.getApiTypeFromSwitchAgoraCDNLineByIndex(index);
728
+ const jsonParams = {
729
+ index: index,
730
+ toJSON: () => {
731
+ return {
732
+ index: index,
733
+ };
734
+ },
735
+ };
736
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
737
+ return jsonResults.result;
738
+ }
739
+
740
+ protected getApiTypeFromSwitchAgoraCDNLineByIndex(index: number): string {
741
+ return 'MediaPlayer_switchAgoraCDNLineByIndex_46f8ab7';
742
+ }
743
+
744
+ getCurrentAgoraCDNIndex(): number {
745
+ const apiType = this.getApiTypeFromGetCurrentAgoraCDNIndex();
746
+ const jsonParams = {};
747
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
748
+ return jsonResults.result;
749
+ }
750
+
751
+ protected getApiTypeFromGetCurrentAgoraCDNIndex(): string {
752
+ return 'MediaPlayer_getCurrentAgoraCDNIndex';
753
+ }
754
+
755
+ enableAutoSwitchAgoraCDN(enable: boolean): number {
756
+ const apiType = this.getApiTypeFromEnableAutoSwitchAgoraCDN(enable);
757
+ const jsonParams = {
758
+ enable: enable,
759
+ toJSON: () => {
760
+ return {
761
+ enable: enable,
762
+ };
763
+ },
764
+ };
765
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
766
+ return jsonResults.result;
767
+ }
768
+
769
+ protected getApiTypeFromEnableAutoSwitchAgoraCDN(enable: boolean): string {
770
+ return 'MediaPlayer_enableAutoSwitchAgoraCDN_5039d15';
771
+ }
772
+
773
+ renewAgoraCDNSrcToken(token: string, ts: number): number {
774
+ const apiType = this.getApiTypeFromRenewAgoraCDNSrcToken(token, ts);
775
+ const jsonParams = {
776
+ token: token,
777
+ ts: ts,
778
+ toJSON: () => {
779
+ return {
780
+ token: token,
781
+ ts: ts,
782
+ };
783
+ },
784
+ };
785
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
786
+ return jsonResults.result;
787
+ }
788
+
789
+ protected getApiTypeFromRenewAgoraCDNSrcToken(
790
+ token: string,
791
+ ts: number
792
+ ): string {
793
+ return 'MediaPlayer_renewAgoraCDNSrcToken_e43f201';
794
+ }
795
+
796
+ switchAgoraCDNSrc(src: string, syncPts: boolean = false): number {
797
+ const apiType = this.getApiTypeFromSwitchAgoraCDNSrc(src, syncPts);
798
+ const jsonParams = {
799
+ src: src,
800
+ syncPts: syncPts,
801
+ toJSON: () => {
802
+ return {
803
+ src: src,
804
+ syncPts: syncPts,
805
+ };
806
+ },
807
+ };
808
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
809
+ return jsonResults.result;
810
+ }
811
+
812
+ protected getApiTypeFromSwitchAgoraCDNSrc(
813
+ src: string,
814
+ syncPts: boolean = false
815
+ ): string {
816
+ return 'MediaPlayer_switchAgoraCDNSrc_7a174df';
817
+ }
818
+
819
+ switchSrc(src: string, syncPts: boolean = true): number {
820
+ const apiType = this.getApiTypeFromSwitchSrc(src, syncPts);
821
+ const jsonParams = {
822
+ src: src,
823
+ syncPts: syncPts,
824
+ toJSON: () => {
825
+ return {
826
+ src: src,
827
+ syncPts: syncPts,
828
+ };
829
+ },
830
+ };
831
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
832
+ return jsonResults.result;
833
+ }
834
+
835
+ protected getApiTypeFromSwitchSrc(
836
+ src: string,
837
+ syncPts: boolean = true
838
+ ): string {
839
+ return 'MediaPlayer_switchSrc_7a174df';
840
+ }
841
+
842
+ preloadSrc(src: string, startPos: number): number {
843
+ const apiType = this.getApiTypeFromPreloadSrc(src, startPos);
844
+ const jsonParams = {
845
+ src: src,
846
+ startPos: startPos,
847
+ toJSON: () => {
848
+ return {
849
+ src: src,
850
+ startPos: startPos,
851
+ };
852
+ },
853
+ };
854
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
855
+ return jsonResults.result;
856
+ }
857
+
858
+ protected getApiTypeFromPreloadSrc(src: string, startPos: number): string {
859
+ return 'MediaPlayer_preloadSrc_e43f201';
860
+ }
861
+
862
+ playPreloadedSrc(src: string): number {
863
+ const apiType = this.getApiTypeFromPlayPreloadedSrc(src);
864
+ const jsonParams = {
865
+ src: src,
866
+ toJSON: () => {
867
+ return {
868
+ src: src,
869
+ };
870
+ },
871
+ };
872
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
873
+ return jsonResults.result;
874
+ }
875
+
876
+ protected getApiTypeFromPlayPreloadedSrc(src: string): string {
877
+ return 'MediaPlayer_playPreloadedSrc_3a2037f';
878
+ }
879
+
880
+ unloadSrc(src: string): number {
881
+ const apiType = this.getApiTypeFromUnloadSrc(src);
882
+ const jsonParams = {
883
+ src: src,
884
+ toJSON: () => {
885
+ return {
886
+ src: src,
887
+ };
888
+ },
889
+ };
890
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
891
+ return jsonResults.result;
892
+ }
893
+
894
+ protected getApiTypeFromUnloadSrc(src: string): string {
895
+ return 'MediaPlayer_unloadSrc_3a2037f';
896
+ }
897
+
898
+ setSpatialAudioParams(params: SpatialAudioParams): number {
899
+ const apiType = this.getApiTypeFromSetSpatialAudioParams(params);
900
+ const jsonParams = {
901
+ params: params,
902
+ toJSON: () => {
903
+ return {
904
+ params: params,
905
+ };
906
+ },
907
+ };
908
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
909
+ return jsonResults.result;
910
+ }
911
+
912
+ protected getApiTypeFromSetSpatialAudioParams(
913
+ params: SpatialAudioParams
914
+ ): string {
915
+ return 'MediaPlayer_setSpatialAudioParams_5035667';
916
+ }
917
+
918
+ setSoundPositionParams(pan: number, gain: number): number {
919
+ const apiType = this.getApiTypeFromSetSoundPositionParams(pan, gain);
920
+ const jsonParams = {
921
+ pan: pan,
922
+ gain: gain,
923
+ toJSON: () => {
924
+ return {
925
+ pan: pan,
926
+ gain: gain,
927
+ };
928
+ },
929
+ };
930
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
931
+ return jsonResults.result;
932
+ }
933
+
934
+ protected getApiTypeFromSetSoundPositionParams(
935
+ pan: number,
936
+ gain: number
937
+ ): string {
938
+ return 'MediaPlayer_setSoundPositionParams_f282d50';
939
+ }
940
+
941
+ setPlayerOptionInInt(key: string, value: number): number {
942
+ const apiType = this.getApiTypeFromSetPlayerOptionInInt(key, value);
943
+ const jsonParams = {
944
+ key: key,
945
+ value: value,
946
+ toJSON: () => {
947
+ return {
948
+ key: key,
949
+ value: value,
950
+ };
951
+ },
952
+ };
953
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
954
+ return jsonResults.result;
955
+ }
956
+
957
+ protected getApiTypeFromSetPlayerOptionInInt(
958
+ key: string,
959
+ value: number
960
+ ): string {
961
+ return 'MediaPlayer_setPlayerOption_4d05d29';
962
+ }
963
+
964
+ setPlayerOptionInString(key: string, value: string): number {
965
+ const apiType = this.getApiTypeFromSetPlayerOptionInString(key, value);
966
+ const jsonParams = {
967
+ key: key,
968
+ value: value,
969
+ toJSON: () => {
970
+ return {
971
+ key: key,
972
+ value: value,
973
+ };
974
+ },
975
+ };
976
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
977
+ return jsonResults.result;
978
+ }
979
+
980
+ protected getApiTypeFromSetPlayerOptionInString(
981
+ key: string,
982
+ value: string
983
+ ): string {
984
+ return 'MediaPlayer_setPlayerOption_ccad422';
985
+ }
986
+ }
987
+
988
+ // @ts-ignore
989
+ export class IMediaPlayerCacheManagerImpl implements IMediaPlayerCacheManager {
990
+ removeAllCaches(): number {
991
+ const apiType = this.getApiTypeFromRemoveAllCaches();
992
+ const jsonParams = {};
993
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
994
+ return jsonResults.result;
995
+ }
996
+
997
+ protected getApiTypeFromRemoveAllCaches(): string {
998
+ return 'MediaPlayerCacheManager_removeAllCaches';
999
+ }
1000
+
1001
+ removeOldCache(): number {
1002
+ const apiType = this.getApiTypeFromRemoveOldCache();
1003
+ const jsonParams = {};
1004
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1005
+ return jsonResults.result;
1006
+ }
1007
+
1008
+ protected getApiTypeFromRemoveOldCache(): string {
1009
+ return 'MediaPlayerCacheManager_removeOldCache';
1010
+ }
1011
+
1012
+ removeCacheByUri(uri: string): number {
1013
+ const apiType = this.getApiTypeFromRemoveCacheByUri(uri);
1014
+ const jsonParams = {
1015
+ uri: uri,
1016
+ toJSON: () => {
1017
+ return {
1018
+ uri: uri,
1019
+ };
1020
+ },
1021
+ };
1022
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1023
+ return jsonResults.result;
1024
+ }
1025
+
1026
+ protected getApiTypeFromRemoveCacheByUri(uri: string): string {
1027
+ return 'MediaPlayerCacheManager_removeCacheByUri_3a2037f';
1028
+ }
1029
+
1030
+ setCacheDir(path: string): number {
1031
+ const apiType = this.getApiTypeFromSetCacheDir(path);
1032
+ const jsonParams = {
1033
+ path: path,
1034
+ toJSON: () => {
1035
+ return {
1036
+ path: path,
1037
+ };
1038
+ },
1039
+ };
1040
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1041
+ return jsonResults.result;
1042
+ }
1043
+
1044
+ protected getApiTypeFromSetCacheDir(path: string): string {
1045
+ return 'MediaPlayerCacheManager_setCacheDir_3a2037f';
1046
+ }
1047
+
1048
+ setMaxCacheFileCount(count: number): number {
1049
+ const apiType = this.getApiTypeFromSetMaxCacheFileCount(count);
1050
+ const jsonParams = {
1051
+ count: count,
1052
+ toJSON: () => {
1053
+ return {
1054
+ count: count,
1055
+ };
1056
+ },
1057
+ };
1058
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1059
+ return jsonResults.result;
1060
+ }
1061
+
1062
+ protected getApiTypeFromSetMaxCacheFileCount(count: number): string {
1063
+ return 'MediaPlayerCacheManager_setMaxCacheFileCount_46f8ab7';
1064
+ }
1065
+
1066
+ setMaxCacheFileSize(cacheSize: number): number {
1067
+ const apiType = this.getApiTypeFromSetMaxCacheFileSize(cacheSize);
1068
+ const jsonParams = {
1069
+ cacheSize: cacheSize,
1070
+ toJSON: () => {
1071
+ return {
1072
+ cacheSize: cacheSize,
1073
+ };
1074
+ },
1075
+ };
1076
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1077
+ return jsonResults.result;
1078
+ }
1079
+
1080
+ protected getApiTypeFromSetMaxCacheFileSize(cacheSize: number): string {
1081
+ return 'MediaPlayerCacheManager_setMaxCacheFileSize_f631116';
1082
+ }
1083
+
1084
+ enableAutoRemoveCache(enable: boolean): number {
1085
+ const apiType = this.getApiTypeFromEnableAutoRemoveCache(enable);
1086
+ const jsonParams = {
1087
+ enable: enable,
1088
+ toJSON: () => {
1089
+ return {
1090
+ enable: enable,
1091
+ };
1092
+ },
1093
+ };
1094
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1095
+ return jsonResults.result;
1096
+ }
1097
+
1098
+ protected getApiTypeFromEnableAutoRemoveCache(enable: boolean): string {
1099
+ return 'MediaPlayerCacheManager_enableAutoRemoveCache_5039d15';
1100
+ }
1101
+
1102
+ getCacheDir(length: number): string {
1103
+ const apiType = this.getApiTypeFromGetCacheDir(length);
1104
+ const jsonParams = {
1105
+ length: length,
1106
+ toJSON: () => {
1107
+ return {
1108
+ length: length,
1109
+ };
1110
+ },
1111
+ };
1112
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1113
+ const path = jsonResults.path;
1114
+ return path;
1115
+ }
1116
+
1117
+ protected getApiTypeFromGetCacheDir(length: number): string {
1118
+ return 'MediaPlayerCacheManager_getCacheDir_c9551e8';
1119
+ }
1120
+
1121
+ getMaxCacheFileCount(): number {
1122
+ const apiType = this.getApiTypeFromGetMaxCacheFileCount();
1123
+ const jsonParams = {};
1124
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1125
+ return jsonResults.result;
1126
+ }
1127
+
1128
+ protected getApiTypeFromGetMaxCacheFileCount(): string {
1129
+ return 'MediaPlayerCacheManager_getMaxCacheFileCount';
1130
+ }
1131
+
1132
+ getMaxCacheFileSize(): number {
1133
+ const apiType = this.getApiTypeFromGetMaxCacheFileSize();
1134
+ const jsonParams = {};
1135
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1136
+ return jsonResults.result;
1137
+ }
1138
+
1139
+ protected getApiTypeFromGetMaxCacheFileSize(): string {
1140
+ return 'MediaPlayerCacheManager_getMaxCacheFileSize';
1141
+ }
1142
+
1143
+ getCacheFileCount(): number {
1144
+ const apiType = this.getApiTypeFromGetCacheFileCount();
1145
+ const jsonParams = {};
1146
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1147
+ return jsonResults.result;
1148
+ }
1149
+
1150
+ protected getApiTypeFromGetCacheFileCount(): string {
1151
+ return 'MediaPlayerCacheManager_getCacheFileCount';
1152
+ }
1153
+ }
1154
+
1155
+ export function processIMediaPlayerVideoFrameObserver(
1156
+ handler: IMediaPlayerVideoFrameObserver,
1157
+ event: string,
1158
+ jsonParams: any
1159
+ ) {
1160
+ switch (event) {
1161
+ case 'onFrame':
1162
+ if (handler.onFrame !== undefined) {
1163
+ handler.onFrame(jsonParams.frame);
1164
+ }
1165
+ break;
1166
+ }
1167
+ }
1168
+
1169
+ import { callIrisApi } from '../internal/IrisApiEngine';