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