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,94 @@
1
+ import { IMediaPlayerSourceObserver } from '../IAgoraMediaPlayerSource';
2
+
3
+ export function processIMediaPlayerSourceObserver(
4
+ handler: IMediaPlayerSourceObserver,
5
+ event: string,
6
+ jsonParams: any
7
+ ) {
8
+ switch (event) {
9
+ case 'onPlayerSourceStateChanged':
10
+ if (handler.onPlayerSourceStateChanged !== undefined) {
11
+ handler.onPlayerSourceStateChanged(jsonParams.state, jsonParams.reason);
12
+ }
13
+ break;
14
+
15
+ case 'onPositionChanged':
16
+ if (handler.onPositionChanged !== undefined) {
17
+ handler.onPositionChanged(
18
+ jsonParams.positionMs,
19
+ jsonParams.timestampMs
20
+ );
21
+ }
22
+ break;
23
+
24
+ case 'onPlayerEvent':
25
+ if (handler.onPlayerEvent !== undefined) {
26
+ handler.onPlayerEvent(
27
+ jsonParams.eventCode,
28
+ jsonParams.elapsedTime,
29
+ jsonParams.message
30
+ );
31
+ }
32
+ break;
33
+
34
+ case 'onMetaData':
35
+ if (handler.onMetaData !== undefined) {
36
+ handler.onMetaData(jsonParams.data, jsonParams.length);
37
+ }
38
+ break;
39
+
40
+ case 'onPlayBufferUpdated':
41
+ if (handler.onPlayBufferUpdated !== undefined) {
42
+ handler.onPlayBufferUpdated(jsonParams.playCachedBuffer);
43
+ }
44
+ break;
45
+
46
+ case 'onPreloadEvent':
47
+ if (handler.onPreloadEvent !== undefined) {
48
+ handler.onPreloadEvent(jsonParams.src, jsonParams.event);
49
+ }
50
+ break;
51
+
52
+ case 'onCompleted':
53
+ if (handler.onCompleted !== undefined) {
54
+ handler.onCompleted();
55
+ }
56
+ break;
57
+
58
+ case 'onAgoraCDNTokenWillExpire':
59
+ if (handler.onAgoraCDNTokenWillExpire !== undefined) {
60
+ handler.onAgoraCDNTokenWillExpire();
61
+ }
62
+ break;
63
+
64
+ case 'onPlayerSrcInfoChanged':
65
+ if (handler.onPlayerSrcInfoChanged !== undefined) {
66
+ handler.onPlayerSrcInfoChanged(jsonParams.from, jsonParams.to);
67
+ }
68
+ break;
69
+
70
+ case 'onPlayerInfoUpdated':
71
+ if (handler.onPlayerInfoUpdated !== undefined) {
72
+ handler.onPlayerInfoUpdated(jsonParams.info);
73
+ }
74
+ break;
75
+
76
+ case 'onPlayerCacheStats':
77
+ if (handler.onPlayerCacheStats !== undefined) {
78
+ handler.onPlayerCacheStats(jsonParams.stats);
79
+ }
80
+ break;
81
+
82
+ case 'onPlayerPlaybackStats':
83
+ if (handler.onPlayerPlaybackStats !== undefined) {
84
+ handler.onPlayerPlaybackStats(jsonParams.stats);
85
+ }
86
+ break;
87
+
88
+ case 'onAudioVolumeIndication':
89
+ if (handler.onAudioVolumeIndication !== undefined) {
90
+ handler.onAudioVolumeIndication(jsonParams.volume);
91
+ }
92
+ break;
93
+ }
94
+ }
@@ -0,0 +1,59 @@
1
+ import {
2
+ IMediaRecorderObserver,
3
+ MediaRecorderConfiguration,
4
+ } from '../AgoraMediaBase';
5
+ import { IMediaRecorder } from '../IAgoraMediaRecorder';
6
+
7
+ // @ts-ignore
8
+ export class IMediaRecorderImpl implements IMediaRecorder {
9
+ setMediaRecorderObserver(callback: IMediaRecorderObserver): number {
10
+ const apiType = this.getApiTypeFromSetMediaRecorderObserver(callback);
11
+ const jsonParams = {
12
+ callback: callback,
13
+ toJSON: () => {
14
+ return {};
15
+ },
16
+ };
17
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
18
+ return jsonResults.result;
19
+ }
20
+
21
+ protected getApiTypeFromSetMediaRecorderObserver(
22
+ callback: IMediaRecorderObserver
23
+ ): string {
24
+ return 'MediaRecorder_setMediaRecorderObserver_e1f7340';
25
+ }
26
+
27
+ startRecording(config: MediaRecorderConfiguration): number {
28
+ const apiType = this.getApiTypeFromStartRecording(config);
29
+ const jsonParams = {
30
+ config: config,
31
+ toJSON: () => {
32
+ return {
33
+ config: config,
34
+ };
35
+ },
36
+ };
37
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
38
+ return jsonResults.result;
39
+ }
40
+
41
+ protected getApiTypeFromStartRecording(
42
+ config: MediaRecorderConfiguration
43
+ ): string {
44
+ return 'MediaRecorder_startRecording_94480b3';
45
+ }
46
+
47
+ stopRecording(): number {
48
+ const apiType = this.getApiTypeFromStopRecording();
49
+ const jsonParams = {};
50
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
51
+ return jsonResults.result;
52
+ }
53
+
54
+ protected getApiTypeFromStopRecording(): string {
55
+ return 'MediaRecorder_stopRecording';
56
+ }
57
+ }
58
+
59
+ import { callIrisApi } from '../internal/IrisApiEngine';
@@ -0,0 +1,562 @@
1
+ import {
2
+ IMusicContentCenter,
3
+ IMusicContentCenterEventHandler,
4
+ IMusicPlayer,
5
+ Music,
6
+ MusicCacheInfo,
7
+ MusicChartCollection,
8
+ MusicChartInfo,
9
+ MusicCollection,
10
+ MusicContentCenterConfiguration,
11
+ MusicPlayMode,
12
+ } from '../IAgoraMusicContentCenter';
13
+
14
+ import { IMediaPlayerImpl } from './IAgoraMediaPlayerImpl';
15
+
16
+ // @ts-ignore
17
+ export class MusicChartCollectionImpl implements MusicChartCollection {
18
+ getCount(): number {
19
+ const apiType = this.getApiTypeFromGetCount();
20
+ const jsonParams = {};
21
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
22
+ return jsonResults.result;
23
+ }
24
+
25
+ protected getApiTypeFromGetCount(): string {
26
+ return 'MusicChartCollection_getCount';
27
+ }
28
+
29
+ get(index: number): MusicChartInfo {
30
+ const apiType = this.getApiTypeFromGet(index);
31
+ const jsonParams = {
32
+ index: index,
33
+ toJSON: () => {
34
+ return {
35
+ index: index,
36
+ };
37
+ },
38
+ };
39
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
40
+ return jsonResults.result;
41
+ }
42
+
43
+ protected getApiTypeFromGet(index: number): string {
44
+ return 'MusicChartCollection_get_46f8ab7';
45
+ }
46
+ }
47
+
48
+ // @ts-ignore
49
+ export class MusicCollectionImpl implements MusicCollection {
50
+ getCount(): number {
51
+ const apiType = this.getApiTypeFromGetCount();
52
+ const jsonParams = {};
53
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
54
+ return jsonResults.result;
55
+ }
56
+
57
+ protected getApiTypeFromGetCount(): string {
58
+ return 'MusicCollection_getCount';
59
+ }
60
+
61
+ getTotal(): number {
62
+ const apiType = this.getApiTypeFromGetTotal();
63
+ const jsonParams = {};
64
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
65
+ return jsonResults.result;
66
+ }
67
+
68
+ protected getApiTypeFromGetTotal(): string {
69
+ return 'MusicCollection_getTotal';
70
+ }
71
+
72
+ getPage(): number {
73
+ const apiType = this.getApiTypeFromGetPage();
74
+ const jsonParams = {};
75
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
76
+ return jsonResults.result;
77
+ }
78
+
79
+ protected getApiTypeFromGetPage(): string {
80
+ return 'MusicCollection_getPage';
81
+ }
82
+
83
+ getPageSize(): number {
84
+ const apiType = this.getApiTypeFromGetPageSize();
85
+ const jsonParams = {};
86
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
87
+ return jsonResults.result;
88
+ }
89
+
90
+ protected getApiTypeFromGetPageSize(): string {
91
+ return 'MusicCollection_getPageSize';
92
+ }
93
+
94
+ getMusic(index: number): Music {
95
+ const apiType = this.getApiTypeFromGetMusic(index);
96
+ const jsonParams = {
97
+ index: index,
98
+ toJSON: () => {
99
+ return {
100
+ index: index,
101
+ };
102
+ },
103
+ };
104
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
105
+ return jsonResults.result;
106
+ }
107
+
108
+ protected getApiTypeFromGetMusic(index: number): string {
109
+ return 'MusicCollection_getMusic_8fcdcef';
110
+ }
111
+ }
112
+
113
+ export function processIMusicContentCenterEventHandler(
114
+ handler: IMusicContentCenterEventHandler,
115
+ event: string,
116
+ jsonParams: any
117
+ ) {
118
+ switch (event) {
119
+ case 'onMusicChartsResult':
120
+ if (handler.onMusicChartsResult !== undefined) {
121
+ handler.onMusicChartsResult(
122
+ jsonParams.requestId,
123
+ jsonParams.result,
124
+ jsonParams.reason
125
+ );
126
+ }
127
+ break;
128
+
129
+ case 'onMusicCollectionResult':
130
+ if (handler.onMusicCollectionResult !== undefined) {
131
+ handler.onMusicCollectionResult(
132
+ jsonParams.requestId,
133
+ jsonParams.result,
134
+ jsonParams.reason
135
+ );
136
+ }
137
+ break;
138
+
139
+ case 'onLyricResult':
140
+ if (handler.onLyricResult !== undefined) {
141
+ handler.onLyricResult(
142
+ jsonParams.requestId,
143
+ jsonParams.songCode,
144
+ jsonParams.lyricUrl,
145
+ jsonParams.reason
146
+ );
147
+ }
148
+ break;
149
+
150
+ case 'onSongSimpleInfoResult':
151
+ if (handler.onSongSimpleInfoResult !== undefined) {
152
+ handler.onSongSimpleInfoResult(
153
+ jsonParams.requestId,
154
+ jsonParams.songCode,
155
+ jsonParams.simpleInfo,
156
+ jsonParams.reason
157
+ );
158
+ }
159
+ break;
160
+
161
+ case 'onPreLoadEvent':
162
+ if (handler.onPreLoadEvent !== undefined) {
163
+ handler.onPreLoadEvent(
164
+ jsonParams.requestId,
165
+ jsonParams.songCode,
166
+ jsonParams.percent,
167
+ jsonParams.lyricUrl,
168
+ jsonParams.state,
169
+ jsonParams.reason
170
+ );
171
+ }
172
+ break;
173
+ }
174
+ }
175
+
176
+ // @ts-ignore
177
+ export class IMusicPlayerImpl extends IMediaPlayerImpl implements IMusicPlayer {
178
+ setPlayMode(mode: MusicPlayMode): number {
179
+ const apiType = this.getApiTypeFromSetPlayMode(mode);
180
+ const jsonParams = {
181
+ mode: mode,
182
+ toJSON: () => {
183
+ return {
184
+ mode: mode,
185
+ };
186
+ },
187
+ };
188
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
189
+ return jsonResults.result;
190
+ }
191
+
192
+ protected getApiTypeFromSetPlayMode(mode: MusicPlayMode): string {
193
+ return 'MusicPlayer_setPlayMode_748bee0';
194
+ }
195
+
196
+ openWithSongCode(songCode: number, startPos: number = 0): number {
197
+ const apiType = this.getApiTypeFromOpenWithSongCode(songCode, startPos);
198
+ const jsonParams = {
199
+ songCode: songCode,
200
+ startPos: startPos,
201
+ toJSON: () => {
202
+ return {
203
+ songCode: songCode,
204
+ startPos: startPos,
205
+ };
206
+ },
207
+ };
208
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
209
+ return jsonResults.result;
210
+ }
211
+
212
+ protected getApiTypeFromOpenWithSongCode(
213
+ songCode: number,
214
+ startPos: number = 0
215
+ ): string {
216
+ return 'MusicPlayer_open_303b92e';
217
+ }
218
+ }
219
+
220
+ // @ts-ignore
221
+ export class IMusicContentCenterImpl implements IMusicContentCenter {
222
+ initialize(configuration: MusicContentCenterConfiguration): number {
223
+ const apiType = this.getApiTypeFromInitialize(configuration);
224
+ const jsonParams = {
225
+ configuration: configuration,
226
+ toJSON: () => {
227
+ return {
228
+ configuration: configuration,
229
+ };
230
+ },
231
+ };
232
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
233
+ return jsonResults.result;
234
+ }
235
+
236
+ protected getApiTypeFromInitialize(
237
+ configuration: MusicContentCenterConfiguration
238
+ ): string {
239
+ return 'MusicContentCenter_initialize_df70304';
240
+ }
241
+
242
+ renewToken(token: string): number {
243
+ const apiType = this.getApiTypeFromRenewToken(token);
244
+ const jsonParams = {
245
+ token: token,
246
+ toJSON: () => {
247
+ return {
248
+ token: token,
249
+ };
250
+ },
251
+ };
252
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
253
+ return jsonResults.result;
254
+ }
255
+
256
+ protected getApiTypeFromRenewToken(token: string): string {
257
+ return 'MusicContentCenter_renewToken_3a2037f';
258
+ }
259
+
260
+ release(): void {
261
+ const apiType = this.getApiTypeFromRelease();
262
+ const jsonParams = {};
263
+ callIrisApi.call(this, apiType, jsonParams);
264
+ }
265
+
266
+ protected getApiTypeFromRelease(): string {
267
+ return 'MusicContentCenter_release';
268
+ }
269
+
270
+ registerEventHandler(eventHandler: IMusicContentCenterEventHandler): number {
271
+ const apiType = this.getApiTypeFromRegisterEventHandler(eventHandler);
272
+ const jsonParams = {
273
+ eventHandler: eventHandler,
274
+ toJSON: () => {
275
+ return {};
276
+ },
277
+ };
278
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
279
+ return jsonResults.result;
280
+ }
281
+
282
+ protected getApiTypeFromRegisterEventHandler(
283
+ eventHandler: IMusicContentCenterEventHandler
284
+ ): string {
285
+ return 'MusicContentCenter_registerEventHandler_ae49451';
286
+ }
287
+
288
+ unregisterEventHandler(): number {
289
+ const apiType = this.getApiTypeFromUnregisterEventHandler();
290
+ const jsonParams = {};
291
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
292
+ return jsonResults.result;
293
+ }
294
+
295
+ protected getApiTypeFromUnregisterEventHandler(): string {
296
+ return 'MusicContentCenter_unregisterEventHandler';
297
+ }
298
+
299
+ createMusicPlayer(): IMusicPlayer {
300
+ const apiType = this.getApiTypeFromCreateMusicPlayer();
301
+ const jsonParams = {};
302
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
303
+ return jsonResults.result;
304
+ }
305
+
306
+ protected getApiTypeFromCreateMusicPlayer(): string {
307
+ return 'MusicContentCenter_createMusicPlayer';
308
+ }
309
+
310
+ destroyMusicPlayer(musicPlayer: IMusicPlayer): number {
311
+ const apiType = this.getApiTypeFromDestroyMusicPlayer(musicPlayer);
312
+ const jsonParams = {
313
+ music_player: musicPlayer,
314
+ toJSON: () => {
315
+ return {};
316
+ },
317
+ };
318
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
319
+ return jsonResults.result;
320
+ }
321
+
322
+ protected getApiTypeFromDestroyMusicPlayer(
323
+ musicPlayer: IMusicPlayer
324
+ ): string {
325
+ return 'MusicContentCenter_destroyMusicPlayer_876d086';
326
+ }
327
+
328
+ getMusicCharts(): string {
329
+ const apiType = this.getApiTypeFromGetMusicCharts();
330
+ const jsonParams = {};
331
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
332
+ const requestId = jsonResults.requestId;
333
+ return requestId;
334
+ }
335
+
336
+ protected getApiTypeFromGetMusicCharts(): string {
337
+ return 'MusicContentCenter_getMusicCharts_66d4ecd';
338
+ }
339
+
340
+ getMusicCollectionByMusicChartId(
341
+ musicChartId: number,
342
+ page: number,
343
+ pageSize: number,
344
+ jsonOption?: string
345
+ ): string {
346
+ const apiType = this.getApiTypeFromGetMusicCollectionByMusicChartId(
347
+ musicChartId,
348
+ page,
349
+ pageSize,
350
+ jsonOption
351
+ );
352
+ const jsonParams = {
353
+ musicChartId: musicChartId,
354
+ page: page,
355
+ pageSize: pageSize,
356
+ jsonOption: jsonOption,
357
+ toJSON: () => {
358
+ return {
359
+ musicChartId: musicChartId,
360
+ page: page,
361
+ pageSize: pageSize,
362
+ jsonOption: jsonOption,
363
+ };
364
+ },
365
+ };
366
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
367
+ const requestId = jsonResults.requestId;
368
+ return requestId;
369
+ }
370
+
371
+ protected getApiTypeFromGetMusicCollectionByMusicChartId(
372
+ musicChartId: number,
373
+ page: number,
374
+ pageSize: number,
375
+ jsonOption?: string
376
+ ): string {
377
+ return 'MusicContentCenter_getMusicCollectionByMusicChartId_8cd0b4d';
378
+ }
379
+
380
+ searchMusic(
381
+ keyWord: string,
382
+ page: number,
383
+ pageSize: number,
384
+ jsonOption?: string
385
+ ): string {
386
+ const apiType = this.getApiTypeFromSearchMusic(
387
+ keyWord,
388
+ page,
389
+ pageSize,
390
+ jsonOption
391
+ );
392
+ const jsonParams = {
393
+ keyWord: keyWord,
394
+ page: page,
395
+ pageSize: pageSize,
396
+ jsonOption: jsonOption,
397
+ toJSON: () => {
398
+ return {
399
+ keyWord: keyWord,
400
+ page: page,
401
+ pageSize: pageSize,
402
+ jsonOption: jsonOption,
403
+ };
404
+ },
405
+ };
406
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
407
+ const requestId = jsonResults.requestId;
408
+ return requestId;
409
+ }
410
+
411
+ protected getApiTypeFromSearchMusic(
412
+ keyWord: string,
413
+ page: number,
414
+ pageSize: number,
415
+ jsonOption?: string
416
+ ): string {
417
+ return 'MusicContentCenter_searchMusic_3f8cf09';
418
+ }
419
+
420
+ preload(songCode: number): string {
421
+ const apiType = this.getApiTypeFromPreload(songCode);
422
+ const jsonParams = {
423
+ songCode: songCode,
424
+ toJSON: () => {
425
+ return {
426
+ songCode: songCode,
427
+ };
428
+ },
429
+ };
430
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
431
+ const requestId = jsonResults.requestId;
432
+ return requestId;
433
+ }
434
+
435
+ protected getApiTypeFromPreload(songCode: number): string {
436
+ return 'MusicContentCenter_preload_d3baeab';
437
+ }
438
+
439
+ removeCache(songCode: number): number {
440
+ const apiType = this.getApiTypeFromRemoveCache(songCode);
441
+ const jsonParams = {
442
+ songCode: songCode,
443
+ toJSON: () => {
444
+ return {
445
+ songCode: songCode,
446
+ };
447
+ },
448
+ };
449
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
450
+ return jsonResults.result;
451
+ }
452
+
453
+ protected getApiTypeFromRemoveCache(songCode: number): string {
454
+ return 'MusicContentCenter_removeCache_f631116';
455
+ }
456
+
457
+ getCaches(): { cacheInfo: MusicCacheInfo[]; cacheInfoSize: number } {
458
+ const apiType = this.getApiTypeFromGetCaches();
459
+ const jsonParams = {};
460
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
461
+ const cacheInfo = jsonResults.cacheInfo;
462
+ const cacheInfoSize = jsonResults.cacheInfoSize;
463
+ return {
464
+ cacheInfo,
465
+ cacheInfoSize,
466
+ };
467
+ }
468
+
469
+ protected getApiTypeFromGetCaches(): string {
470
+ return 'MusicContentCenter_getCaches_c4f9978';
471
+ }
472
+
473
+ isPreloaded(songCode: number): boolean {
474
+ const apiType = this.getApiTypeFromIsPreloaded(songCode);
475
+ const jsonParams = {
476
+ songCode: songCode,
477
+ toJSON: () => {
478
+ return {
479
+ songCode: songCode,
480
+ };
481
+ },
482
+ };
483
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
484
+ return jsonResults.result;
485
+ }
486
+
487
+ protected getApiTypeFromIsPreloaded(songCode: number): string {
488
+ return 'MusicContentCenter_isPreloaded_f631116';
489
+ }
490
+
491
+ getLyric(songCode: number, lyricType: number = 0): string {
492
+ const apiType = this.getApiTypeFromGetLyric(songCode, lyricType);
493
+ const jsonParams = {
494
+ songCode: songCode,
495
+ lyricType: lyricType,
496
+ toJSON: () => {
497
+ return {
498
+ songCode: songCode,
499
+ lyricType: lyricType,
500
+ };
501
+ },
502
+ };
503
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
504
+ const requestId = jsonResults.requestId;
505
+ return requestId;
506
+ }
507
+
508
+ protected getApiTypeFromGetLyric(
509
+ songCode: number,
510
+ lyricType: number = 0
511
+ ): string {
512
+ return 'MusicContentCenter_getLyric_5ab5efd';
513
+ }
514
+
515
+ getSongSimpleInfo(songCode: number): string {
516
+ const apiType = this.getApiTypeFromGetSongSimpleInfo(songCode);
517
+ const jsonParams = {
518
+ songCode: songCode,
519
+ toJSON: () => {
520
+ return {
521
+ songCode: songCode,
522
+ };
523
+ },
524
+ };
525
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
526
+ const requestId = jsonResults.requestId;
527
+ return requestId;
528
+ }
529
+
530
+ protected getApiTypeFromGetSongSimpleInfo(songCode: number): string {
531
+ return 'MusicContentCenter_getSongSimpleInfo_d3baeab';
532
+ }
533
+
534
+ getInternalSongCode(songCode: number, jsonOption: string): number {
535
+ const apiType = this.getApiTypeFromGetInternalSongCode(
536
+ songCode,
537
+ jsonOption
538
+ );
539
+ const jsonParams = {
540
+ songCode: songCode,
541
+ jsonOption: jsonOption,
542
+ toJSON: () => {
543
+ return {
544
+ songCode: songCode,
545
+ jsonOption: jsonOption,
546
+ };
547
+ },
548
+ };
549
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
550
+ const internalSongCode = jsonResults.internalSongCode;
551
+ return internalSongCode;
552
+ }
553
+
554
+ protected getApiTypeFromGetInternalSongCode(
555
+ songCode: number,
556
+ jsonOption: string
557
+ ): string {
558
+ return 'MusicContentCenter_getInternalSongCode_3a3d1e7';
559
+ }
560
+ }
561
+
562
+ import { callIrisApi } from '../internal/IrisApiEngine';