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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +143 -143
  3. package/gulpfile.js +5 -4
  4. package/js/AgoraSdk.js +62 -60
  5. package/js/Private/AgoraBase.js +4575 -3269
  6. package/js/Private/AgoraMediaBase.js +968 -564
  7. package/js/Private/AgoraMediaPlayerTypes.js +422 -310
  8. package/js/Private/IAgoraLog.js +86 -74
  9. package/js/Private/IAgoraMediaEngine.js +32 -32
  10. package/js/Private/IAgoraMediaPlayer.js +16 -16
  11. package/js/Private/IAgoraMediaPlayerSource.js +3 -3
  12. package/js/Private/IAgoraMediaRecorder.js +12 -12
  13. package/js/Private/IAgoraMediaStreamingSource.js +84 -0
  14. package/js/Private/IAgoraMusicContentCenter.js +239 -81
  15. package/js/Private/IAgoraRhythmPlayer.js +70 -62
  16. package/js/Private/IAgoraRtcEngine.js +1807 -948
  17. package/js/Private/IAgoraRtcEngineEx.js +26 -18
  18. package/js/Private/IAgoraSpatialAudio.js +74 -30
  19. package/js/Private/IAudioDeviceManager.js +20 -20
  20. package/js/Private/extension/AgoraBaseExtension.js +2 -2
  21. package/js/Private/extension/AgoraMediaBaseExtension.js +2 -2
  22. package/js/Private/extension/AgoraMediaPlayerTypesExtension.js +2 -2
  23. package/js/Private/extension/IAgoraLogExtension.js +2 -2
  24. package/js/Private/extension/IAgoraMediaEngineExtension.js +2 -2
  25. package/js/Private/extension/IAgoraMediaPlayerExtension.js +2 -2
  26. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.js +2 -2
  27. package/js/Private/extension/IAgoraMediaRecorderExtension.js +2 -2
  28. package/js/Private/extension/IAgoraMusicContentCenterExtension.js +2 -2
  29. package/js/Private/extension/IAgoraRhythmPlayerExtension.js +2 -2
  30. package/js/Private/extension/IAgoraRtcEngineExExtension.js +2 -2
  31. package/js/Private/extension/IAgoraRtcEngineExtension.js +2 -2
  32. package/js/Private/extension/IAgoraSpatialAudioExtension.js +2 -2
  33. package/js/Private/extension/IAudioDeviceManagerExtension.js +2 -2
  34. package/js/Private/impl/AgoraBaseImpl.js +23 -23
  35. package/js/Private/impl/AgoraMediaBaseImpl.js +118 -138
  36. package/js/Private/impl/IAgoraMediaEngineImpl.js +287 -325
  37. package/js/Private/impl/IAgoraMediaPlayerImpl.js +932 -938
  38. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +63 -63
  39. package/js/Private/impl/IAgoraMediaRecorderImpl.js +47 -67
  40. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +353 -323
  41. package/js/Private/impl/IAgoraRtcEngineExImpl.js +945 -907
  42. package/js/Private/impl/IAgoraRtcEngineImpl.js +4742 -4702
  43. package/js/Private/impl/IAgoraSpatialAudioImpl.js +362 -362
  44. package/js/Private/impl/IAudioDeviceManagerImpl.js +375 -375
  45. package/js/Private/internal/AudioDeviceManagerInternal.js +44 -44
  46. package/js/Private/internal/IrisApiEngine.js +391 -382
  47. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +46 -46
  48. package/js/Private/internal/MediaEngineInternal.js +119 -123
  49. package/js/Private/internal/MediaPlayerInternal.js +215 -213
  50. package/js/Private/internal/MediaRecorderInternal.js +82 -81
  51. package/js/Private/internal/MusicContentCenterInternal.js +128 -130
  52. package/js/Private/internal/RtcEngineExInternal.js +422 -363
  53. package/js/Private/internal/emitter/EventEmitter.js +111 -111
  54. package/js/Private/ti/AgoraBase-ti.js +40 -40
  55. package/js/Private/ti/AgoraMediaBase-ti.js +71 -73
  56. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +5 -5
  57. package/js/Private/ti/IAgoraLog-ti.js +5 -5
  58. package/js/Private/ti/IAgoraMediaEngine-ti.js +5 -5
  59. package/js/Private/ti/IAgoraMediaPlayer-ti.js +38 -42
  60. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +48 -48
  61. package/js/Private/ti/IAgoraMediaRecorder-ti.js +5 -5
  62. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +5 -0
  63. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +41 -41
  64. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +5 -5
  65. package/js/Private/ti/IAgoraRtcEngine-ti.js +139 -139
  66. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +5 -5
  67. package/js/Private/ti/IAgoraSpatialAudio-ti.js +5 -5
  68. package/js/Private/ti/IAudioDeviceManager-ti.js +5 -5
  69. package/js/Renderer/AgoraView.js +128 -131
  70. package/js/Renderer/IRenderer.js +40 -48
  71. package/js/Renderer/IRendererManager.js +9 -0
  72. package/js/Renderer/RendererManager.js +479 -392
  73. package/js/Renderer/{GlRenderer → WebGLRenderer}/index.js +469 -473
  74. package/js/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +1337 -1337
  75. package/js/Renderer/YUVCanvasRenderer/index.js +195 -185
  76. package/js/Renderer/index.js +18 -0
  77. package/js/Types.js +17 -29
  78. package/js/Utils.js +168 -173
  79. package/package.json +61 -103
  80. package/scripts/bootstrap.js +1 -1
  81. package/scripts/build.js +1 -0
  82. package/scripts/buildJS.js +3 -3
  83. package/scripts/clean.js +2 -1
  84. package/scripts/downloadPrebuild.js +5 -5
  85. package/scripts/getConfig.js +3 -2
  86. package/scripts/synclib.js +8 -5
  87. package/scripts/util.js +3 -2
  88. package/scripts/zipBuild.js +2 -1
  89. package/ts/AgoraSdk.ts +9 -6
  90. package/ts/Private/AgoraBase.ts +278 -173
  91. package/ts/Private/AgoraMediaBase.ts +167 -100
  92. package/ts/Private/AgoraMediaPlayerTypes.ts +1 -1
  93. package/ts/Private/IAgoraMediaEngine.ts +43 -56
  94. package/ts/Private/IAgoraMediaPlayer.ts +90 -104
  95. package/ts/Private/IAgoraMediaPlayerSource.ts +3 -8
  96. package/ts/Private/IAgoraMediaRecorder.ts +8 -35
  97. package/ts/Private/IAgoraMediaStreamingSource.ts +80 -0
  98. package/ts/Private/IAgoraMusicContentCenter.ts +93 -12
  99. package/ts/Private/IAgoraRtcEngine.ts +807 -910
  100. package/ts/Private/IAgoraRtcEngineEx.ts +187 -191
  101. package/ts/Private/IAgoraSpatialAudio.ts +40 -22
  102. package/ts/Private/IAudioDeviceManager.ts +35 -13
  103. package/ts/Private/extension/IAgoraMediaEngineExtension.ts +1 -1
  104. package/ts/Private/extension/IAgoraMediaPlayerExtension.ts +4 -7
  105. package/ts/Private/extension/IAgoraMediaRecorderExtension.ts +6 -1
  106. package/ts/Private/extension/IAgoraMusicContentCenterExtension.ts +1 -1
  107. package/ts/Private/extension/IAgoraRtcEngineExtension.ts +4 -4
  108. package/ts/Private/impl/AgoraBaseImpl.ts +3 -3
  109. package/ts/Private/impl/AgoraMediaBaseImpl.ts +36 -42
  110. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +79 -127
  111. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +106 -106
  112. package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +13 -45
  113. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +61 -16
  114. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +129 -59
  115. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +490 -416
  116. package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +5 -3
  117. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +4 -2
  118. package/ts/Private/internal/AudioDeviceManagerInternal.ts +6 -5
  119. package/ts/Private/internal/IrisApiEngine.ts +41 -32
  120. package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +17 -13
  121. package/ts/Private/internal/MediaEngineInternal.ts +9 -11
  122. package/ts/Private/internal/MediaPlayerInternal.ts +42 -31
  123. package/ts/Private/internal/MediaRecorderInternal.ts +24 -22
  124. package/ts/Private/internal/MusicContentCenterInternal.ts +16 -18
  125. package/ts/Private/internal/RtcEngineExInternal.ts +189 -66
  126. package/ts/Private/ti/AgoraMediaBase-ti.ts +9 -10
  127. package/ts/Private/ti/IAgoraMediaPlayer-ti.ts +0 -5
  128. package/{js/Private/ti/AgoraMediaPlayerTypes-ti.d.ts → ts/Private/ti/IAgoraMediaStreamingSource-ti.ts} +11 -6
  129. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +4 -4
  130. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +4 -4
  131. package/ts/Renderer/AgoraView.ts +12 -7
  132. package/ts/Renderer/IRenderer.ts +11 -16
  133. package/ts/Renderer/IRendererManager.ts +35 -0
  134. package/ts/Renderer/RendererManager.ts +146 -82
  135. package/ts/Renderer/{GlRenderer → WebGLRenderer}/index.ts +36 -51
  136. package/ts/Renderer/YUVCanvasRenderer/index.ts +41 -25
  137. package/ts/Renderer/index.ts +2 -0
  138. package/ts/Types.ts +43 -23
  139. package/ts/Utils.ts +7 -12
  140. package/types/AgoraSdk.d.ts +38 -36
  141. package/types/AgoraSdk.d.ts.map +1 -0
  142. package/types/Private/AgoraBase.d.ts +4455 -4358
  143. package/types/Private/AgoraBase.d.ts.map +1 -0
  144. package/types/Private/AgoraMediaBase.d.ts +1125 -1070
  145. package/types/Private/AgoraMediaBase.d.ts.map +1 -0
  146. package/types/Private/AgoraMediaPlayerTypes.d.ts +409 -408
  147. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
  148. package/types/Private/IAgoraLog.d.ts +81 -80
  149. package/types/Private/IAgoraLog.d.ts.map +1 -0
  150. package/types/Private/IAgoraMediaEngine.d.ts +184 -193
  151. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
  152. package/types/Private/IAgoraMediaPlayer.d.ts +533 -546
  153. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
  154. package/types/Private/IAgoraMediaPlayerSource.d.ts +83 -88
  155. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
  156. package/types/Private/IAgoraMediaRecorder.d.ts +29 -49
  157. package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
  158. package/types/Private/IAgoraMediaStreamingSource.d.ts +42 -0
  159. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
  160. package/types/Private/IAgoraMusicContentCenter.d.ts +336 -255
  161. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
  162. package/types/Private/IAgoraRhythmPlayer.d.ts +65 -64
  163. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
  164. package/types/Private/IAgoraRtcEngine.d.ts +4948 -5058
  165. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
  166. package/types/Private/IAgoraRtcEngineEx.d.ts +554 -570
  167. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
  168. package/types/Private/IAgoraSpatialAudio.d.ts +266 -248
  169. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
  170. package/types/Private/IAudioDeviceManager.d.ts +255 -233
  171. package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
  172. package/types/Private/extension/AgoraBaseExtension.d.ts +2 -1
  173. package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
  174. package/types/Private/extension/AgoraMediaBaseExtension.d.ts +2 -1
  175. package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  176. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -1
  177. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  178. package/types/Private/extension/IAgoraLogExtension.d.ts +2 -1
  179. package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
  180. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +41 -40
  181. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  182. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +47 -46
  183. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  184. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -1
  185. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  186. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +45 -40
  187. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  188. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +21 -20
  189. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  190. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +2 -1
  191. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  192. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +2 -1
  193. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  194. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +43 -42
  195. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  196. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +2 -1
  197. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  198. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +2 -1
  199. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  200. package/types/Private/impl/AgoraBaseImpl.d.ts +3 -2
  201. package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
  202. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +9 -7
  203. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  204. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +40 -43
  205. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  206. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +141 -141
  207. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  208. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -2
  209. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  210. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +11 -13
  211. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  212. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +59 -51
  213. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  214. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +106 -101
  215. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  216. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +570 -566
  217. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  218. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +49 -48
  219. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  220. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +65 -64
  221. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  222. package/types/Private/internal/AudioDeviceManagerInternal.d.ts +9 -8
  223. package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
  224. package/types/Private/internal/IrisApiEngine.d.ts +148 -146
  225. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
  226. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +19 -18
  227. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  228. package/types/Private/internal/MediaEngineInternal.d.ts +22 -21
  229. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
  230. package/types/Private/internal/MediaPlayerInternal.d.ts +34 -33
  231. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
  232. package/types/Private/internal/MediaRecorderInternal.d.ts +18 -15
  233. package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
  234. package/types/Private/internal/MusicContentCenterInternal.d.ts +40 -39
  235. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
  236. package/types/Private/internal/RtcEngineExInternal.d.ts +80 -73
  237. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
  238. package/{js → types}/Private/internal/emitter/EventEmitter.d.ts +60 -59
  239. package/types/Private/internal/emitter/EventEmitter.d.ts.map +1 -0
  240. package/types/Private/ti/AgoraBase-ti.d.ts +8 -7
  241. package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
  242. package/types/Private/ti/AgoraMediaBase-ti.d.ts +14 -12
  243. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  244. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -6
  245. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  246. package/types/Private/ti/IAgoraLog-ti.d.ts +7 -6
  247. package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
  248. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +7 -6
  249. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  250. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +8 -8
  251. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  252. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -7
  253. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  254. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +7 -6
  255. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  256. package/{js/Private/ti/IAgoraMediaRecorder-ti.d.ts → types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts} +7 -6
  257. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  258. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +8 -7
  259. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  260. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +7 -6
  261. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  262. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +10 -9
  263. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  264. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +7 -6
  265. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  266. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +7 -6
  267. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  268. package/types/Private/ti/IAudioDeviceManager-ti.d.ts +7 -6
  269. package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  270. package/types/Renderer/AgoraView.d.ts +70 -70
  271. package/types/Renderer/AgoraView.d.ts.map +1 -0
  272. package/types/Renderer/IRenderer.d.ts +22 -21
  273. package/types/Renderer/IRenderer.d.ts.map +1 -0
  274. package/types/Renderer/IRendererManager.d.ts +18 -0
  275. package/types/Renderer/IRendererManager.d.ts.map +1 -0
  276. package/types/Renderer/RendererManager.d.ts +154 -71
  277. package/types/Renderer/RendererManager.d.ts.map +1 -0
  278. package/types/Renderer/{GlRenderer → WebGLRenderer}/index.d.ts +49 -59
  279. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -0
  280. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts +1 -0
  281. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
  282. package/types/Renderer/YUVCanvasRenderer/index.d.ts +16 -16
  283. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
  284. package/types/Renderer/index.d.ts +3 -0
  285. package/types/Renderer/index.d.ts.map +1 -0
  286. package/types/Types.d.ts +280 -260
  287. package/types/Types.d.ts.map +1 -0
  288. package/types/Utils.d.ts +59 -58
  289. package/types/Utils.d.ts.map +1 -0
  290. package/js/AgoraSdk.d.ts +0 -36
  291. package/js/Private/AgoraBase.d.ts +0 -4358
  292. package/js/Private/AgoraMediaBase.d.ts +0 -1070
  293. package/js/Private/AgoraMediaPlayerTypes.d.ts +0 -408
  294. package/js/Private/IAgoraLog.d.ts +0 -80
  295. package/js/Private/IAgoraMediaEngine.d.ts +0 -193
  296. package/js/Private/IAgoraMediaPlayer.d.ts +0 -546
  297. package/js/Private/IAgoraMediaPlayerSource.d.ts +0 -88
  298. package/js/Private/IAgoraMediaRecorder.d.ts +0 -49
  299. package/js/Private/IAgoraMusicContentCenter.d.ts +0 -255
  300. package/js/Private/IAgoraRhythmPlayer.d.ts +0 -64
  301. package/js/Private/IAgoraRtcEngine.d.ts +0 -5058
  302. package/js/Private/IAgoraRtcEngineEx.d.ts +0 -570
  303. package/js/Private/IAgoraSpatialAudio.d.ts +0 -248
  304. package/js/Private/IAudioDeviceManager.d.ts +0 -233
  305. package/js/Private/extension/AgoraBaseExtension.d.ts +0 -1
  306. package/js/Private/extension/AgoraMediaBaseExtension.d.ts +0 -1
  307. package/js/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -1
  308. package/js/Private/extension/IAgoraLogExtension.d.ts +0 -1
  309. package/js/Private/extension/IAgoraMediaEngineExtension.d.ts +0 -40
  310. package/js/Private/extension/IAgoraMediaPlayerExtension.d.ts +0 -46
  311. package/js/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -1
  312. package/js/Private/extension/IAgoraMediaRecorderExtension.d.ts +0 -40
  313. package/js/Private/extension/IAgoraMusicContentCenterExtension.d.ts +0 -20
  314. package/js/Private/extension/IAgoraRhythmPlayerExtension.d.ts +0 -1
  315. package/js/Private/extension/IAgoraRtcEngineExExtension.d.ts +0 -1
  316. package/js/Private/extension/IAgoraRtcEngineExtension.d.ts +0 -42
  317. package/js/Private/extension/IAgoraSpatialAudioExtension.d.ts +0 -1
  318. package/js/Private/extension/IAudioDeviceManagerExtension.d.ts +0 -1
  319. package/js/Private/impl/AgoraBaseImpl.d.ts +0 -2
  320. package/js/Private/impl/AgoraMediaBaseImpl.d.ts +0 -7
  321. package/js/Private/impl/IAgoraMediaEngineImpl.d.ts +0 -43
  322. package/js/Private/impl/IAgoraMediaPlayerImpl.d.ts +0 -141
  323. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -2
  324. package/js/Private/impl/IAgoraMediaRecorderImpl.d.ts +0 -13
  325. package/js/Private/impl/IAgoraMusicContentCenterImpl.d.ts +0 -51
  326. package/js/Private/impl/IAgoraRtcEngineExImpl.d.ts +0 -101
  327. package/js/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -566
  328. package/js/Private/impl/IAgoraSpatialAudioImpl.d.ts +0 -48
  329. package/js/Private/impl/IAudioDeviceManagerImpl.d.ts +0 -64
  330. package/js/Private/internal/AudioDeviceManagerInternal.d.ts +0 -8
  331. package/js/Private/internal/IrisApiEngine.d.ts +0 -146
  332. package/js/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -18
  333. package/js/Private/internal/MediaEngineInternal.d.ts +0 -21
  334. package/js/Private/internal/MediaPlayerInternal.d.ts +0 -33
  335. package/js/Private/internal/MediaRecorderInternal.d.ts +0 -15
  336. package/js/Private/internal/MusicContentCenterInternal.d.ts +0 -39
  337. package/js/Private/internal/RtcEngineExInternal.d.ts +0 -73
  338. package/js/Private/ti/AgoraBase-ti.d.ts +0 -7
  339. package/js/Private/ti/AgoraMediaBase-ti.d.ts +0 -12
  340. package/js/Private/ti/IAgoraLog-ti.d.ts +0 -6
  341. package/js/Private/ti/IAgoraMediaEngine-ti.d.ts +0 -6
  342. package/js/Private/ti/IAgoraMediaPlayer-ti.d.ts +0 -8
  343. package/js/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -7
  344. package/js/Private/ti/IAgoraMusicContentCenter-ti.d.ts +0 -7
  345. package/js/Private/ti/IAgoraRhythmPlayer-ti.d.ts +0 -6
  346. package/js/Private/ti/IAgoraRtcEngine-ti.d.ts +0 -9
  347. package/js/Private/ti/IAgoraRtcEngineEx-ti.d.ts +0 -6
  348. package/js/Private/ti/IAgoraSpatialAudio-ti.d.ts +0 -6
  349. package/js/Private/ti/IAudioDeviceManager-ti.d.ts +0 -6
  350. package/js/Renderer/AgoraView.d.ts +0 -70
  351. package/js/Renderer/GlRenderer/index.d.ts +0 -59
  352. package/js/Renderer/GlRenderer/webgl-utils.d.ts +0 -0
  353. package/js/Renderer/IRenderer.d.ts +0 -21
  354. package/js/Renderer/RendererManager.d.ts +0 -71
  355. package/js/Renderer/YUVCanvasRenderer/index.d.ts +0 -16
  356. package/js/Types.d.ts +0 -260
  357. package/js/Utils.d.ts +0 -58
  358. /package/ts/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
package/js/Utils.js CHANGED
@@ -1,173 +1,168 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgoraEnv = exports.classMix = exports.getDefaultRendererVideoConfig = exports.formatConfigByVideoSourceType = exports.objsKeysToLowerCase = exports.parseJSON = exports.logDebug = exports.logInfo = exports.logError = exports.logWarn = exports.deprecate = exports.DEBUG_TAG = exports.TAG = void 0;
4
- const AgoraBase_1 = require("./Private/AgoraBase");
5
- const AgoraMediaBase_1 = require("./Private/AgoraMediaBase");
6
- /**
7
- * @ignore
8
- */
9
- exports.TAG = '[Agora]: ';
10
- /**
11
- * @ignore
12
- */
13
- exports.DEBUG_TAG = '[Agora Debug]: ';
14
- /**
15
- * @ignore
16
- */
17
- const deprecate = (originApi, replaceApi) => (0, exports.logError)(`${exports.TAG} This method ${originApi} will be deprecated soon. `, replaceApi ? `Please use ${replaceApi} instead` : '');
18
- exports.deprecate = deprecate;
19
- /**
20
- * @ignore
21
- */
22
- const logWarn = (msg, ...optParams) => {
23
- if (!exports.AgoraEnv.enableLogging) {
24
- return;
25
- }
26
- console.warn(`${exports.TAG} ${msg}`, ...optParams);
27
- };
28
- exports.logWarn = logWarn;
29
- /**
30
- * @ignore
31
- */
32
- const logError = (msg, ...optParams) => {
33
- if (!exports.AgoraEnv.enableLogging) {
34
- return;
35
- }
36
- console.error(`${exports.TAG} ${msg}`, ...optParams);
37
- };
38
- exports.logError = logError;
39
- /**
40
- * @ignore
41
- */
42
- const logInfo = (msg, ...optParams) => {
43
- if (!exports.AgoraEnv.enableLogging) {
44
- return;
45
- }
46
- console.log(`${exports.TAG} ${msg}`, ...optParams);
47
- };
48
- exports.logInfo = logInfo;
49
- /**
50
- * @ignore
51
- */
52
- const logDebug = (msg, ...optParams) => {
53
- if (!exports.AgoraEnv.enableLogging || !exports.AgoraEnv.enableDebugLogging) {
54
- return;
55
- }
56
- console.warn(`${exports.DEBUG_TAG} ${msg}`, ...optParams);
57
- };
58
- exports.logDebug = logDebug;
59
- /**
60
- * @ignore
61
- */
62
- const parseJSON = (jsonString) => {
63
- if (jsonString === '') {
64
- return jsonString;
65
- }
66
- let obj;
67
- try {
68
- obj = JSON.parse(jsonString);
69
- }
70
- catch (error) {
71
- (0, exports.logError)('parseJSON', error);
72
- }
73
- return obj || jsonString;
74
- };
75
- exports.parseJSON = parseJSON;
76
- /**
77
- * @ignore
78
- */
79
- const objsKeysToLowerCase = (array) => {
80
- array.forEach((obj) => {
81
- for (const key in obj) {
82
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
83
- const element = obj[key];
84
- obj[key.toLocaleLowerCase()] = element;
85
- }
86
- }
87
- });
88
- };
89
- exports.objsKeysToLowerCase = objsKeysToLowerCase;
90
- /**
91
- * @ignore
92
- */
93
- const formatConfigByVideoSourceType = (videoSourceType, originChannelId = '', originUid = 0) => {
94
- if (videoSourceType === undefined || videoSourceType === null) {
95
- throw new Error(`must set videoSourceType`);
96
- }
97
- let uid = originUid;
98
- let channelId = originChannelId;
99
- switch (videoSourceType) {
100
- case AgoraBase_1.VideoSourceType.VideoSourceCamera:
101
- case AgoraBase_1.VideoSourceType.VideoSourceCameraPrimary:
102
- case AgoraBase_1.VideoSourceType.VideoSourceScreen:
103
- case AgoraBase_1.VideoSourceType.VideoSourceScreenSecondary:
104
- case AgoraBase_1.VideoSourceType.VideoSourceTranscoded:
105
- channelId = '';
106
- uid = 0;
107
- break;
108
- case AgoraBase_1.VideoSourceType.VideoSourceRemote:
109
- if (!uid || !channelId) {
110
- throw new Error(`must set uid:${uid}} and channelId:${channelId}`);
111
- }
112
- break;
113
- case AgoraBase_1.VideoSourceType.VideoSourceMediaPlayer:
114
- channelId = '';
115
- if (!uid) {
116
- throw new Error(`must set uid(mediaPlayerId):${uid}}}`);
117
- }
118
- break;
119
- default:
120
- break;
121
- }
122
- return { uid, channelId, videoSourceType };
123
- };
124
- exports.formatConfigByVideoSourceType = formatConfigByVideoSourceType;
125
- /**
126
- * @ignore
127
- */
128
- const getDefaultRendererVideoConfig = (config) => {
129
- const rendererOptions = Object.assign({
130
- contentMode: AgoraMediaBase_1.RenderModeType.RenderModeFit,
131
- mirror: false,
132
- }, config.rendererOptions);
133
- const { uid, channelId, videoSourceType } = (0, exports.formatConfigByVideoSourceType)(config.videoSourceType, config.channelId, config.uid);
134
- return Object.assign(Object.assign({}, config), { uid, channelId, videoSourceType, rendererOptions });
135
- };
136
- exports.getDefaultRendererVideoConfig = getDefaultRendererVideoConfig;
137
- /**
138
- * @ignore
139
- */
140
- function classMix(...mixins) {
141
- class MixClass {
142
- constructor() {
143
- for (let mixin of mixins) {
144
- copyProperties(this, new mixin()); // 拷贝实例属性
145
- }
146
- }
147
- }
148
- for (let mixin of mixins) {
149
- copyProperties(MixClass, mixin); // 拷贝静态属性
150
- copyProperties(MixClass.prototype, mixin.prototype); // 拷贝原型属性
151
- }
152
- return MixClass;
153
- }
154
- exports.classMix = classMix;
155
- function copyProperties(target, source) {
156
- for (let key of Reflect.ownKeys(source)) {
157
- if (key !== 'constructor' && key !== 'prototype' && key !== 'name') {
158
- let desc = Object.getOwnPropertyDescriptor(source, key);
159
- Object.defineProperty(target, key, desc);
160
- }
161
- }
162
- }
163
- const agora = require('../build/Release/agora_node_ext');
164
- /**
165
- * @ignore
166
- */
167
- exports.AgoraEnv = {
168
- enableLogging: true,
169
- enableDebugLogging: false,
170
- AgoraElectronBridge: new agora.AgoraElectronBridge(),
171
- };
172
- // @ts-ignore
173
- (window || global).AgoraEnv = exports.AgoraEnv;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgoraEnv = exports.classMix = exports.getDefaultRendererVideoConfig = exports.formatConfigByVideoSourceType = exports.objsKeysToLowerCase = exports.parseJSON = exports.logDebug = exports.logInfo = exports.logError = exports.logWarn = exports.deprecate = exports.DEBUG_TAG = exports.TAG = void 0;
4
+ const AgoraMediaBase_1 = require("./Private/AgoraMediaBase");
5
+ /**
6
+ * @ignore
7
+ */
8
+ exports.TAG = '[Agora]: ';
9
+ /**
10
+ * @ignore
11
+ */
12
+ exports.DEBUG_TAG = '[Agora Debug]: ';
13
+ /**
14
+ * @ignore
15
+ */
16
+ const deprecate = (originApi, replaceApi) => (0, exports.logError)(`${exports.TAG} This method ${originApi} will be deprecated soon. `, replaceApi ? `Please use ${replaceApi} instead` : '');
17
+ exports.deprecate = deprecate;
18
+ /**
19
+ * @ignore
20
+ */
21
+ const logWarn = (msg, ...optParams) => {
22
+ if (!exports.AgoraEnv.enableLogging) {
23
+ return;
24
+ }
25
+ console.warn(`${exports.TAG} ${msg}`, ...optParams);
26
+ };
27
+ exports.logWarn = logWarn;
28
+ /**
29
+ * @ignore
30
+ */
31
+ const logError = (msg, ...optParams) => {
32
+ if (!exports.AgoraEnv.enableLogging) {
33
+ return;
34
+ }
35
+ console.error(`${exports.TAG} ${msg}`, ...optParams);
36
+ };
37
+ exports.logError = logError;
38
+ /**
39
+ * @ignore
40
+ */
41
+ const logInfo = (msg, ...optParams) => {
42
+ if (!exports.AgoraEnv.enableLogging) {
43
+ return;
44
+ }
45
+ console.log(`${exports.TAG} ${msg}`, ...optParams);
46
+ };
47
+ exports.logInfo = logInfo;
48
+ /**
49
+ * @ignore
50
+ */
51
+ const logDebug = (msg, ...optParams) => {
52
+ if (!exports.AgoraEnv.enableLogging || !exports.AgoraEnv.enableDebugLogging) {
53
+ return;
54
+ }
55
+ console.warn(`${exports.DEBUG_TAG} ${msg}`, ...optParams);
56
+ };
57
+ exports.logDebug = logDebug;
58
+ /**
59
+ * @ignore
60
+ */
61
+ const parseJSON = (jsonString) => {
62
+ if (jsonString === '') {
63
+ return jsonString;
64
+ }
65
+ let obj;
66
+ try {
67
+ obj = JSON.parse(jsonString);
68
+ }
69
+ catch (error) {
70
+ (0, exports.logError)('parseJSON', error);
71
+ }
72
+ return obj || jsonString;
73
+ };
74
+ exports.parseJSON = parseJSON;
75
+ /**
76
+ * @ignore
77
+ */
78
+ const objsKeysToLowerCase = (array) => {
79
+ array.forEach((obj) => {
80
+ for (const key in obj) {
81
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
82
+ const element = obj[key];
83
+ obj[key.toLocaleLowerCase()] = element;
84
+ }
85
+ }
86
+ });
87
+ };
88
+ exports.objsKeysToLowerCase = objsKeysToLowerCase;
89
+ /**
90
+ * @ignore
91
+ */
92
+ const formatConfigByVideoSourceType = (videoSourceType, originChannelId = '', originUid = 0) => {
93
+ if (videoSourceType === undefined || videoSourceType === null) {
94
+ throw new Error(`must set videoSourceType:${videoSourceType}`);
95
+ }
96
+ let uid = originUid;
97
+ let channelId = originChannelId;
98
+ switch (videoSourceType) {
99
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceCamera:
100
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceCameraPrimary:
101
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceScreen:
102
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceScreenSecondary:
103
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceTranscoded:
104
+ channelId = '';
105
+ uid = 0;
106
+ break;
107
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceRemote:
108
+ if (!uid || !channelId) {
109
+ throw new Error(`must set uid:${uid} and channelId:${channelId}`);
110
+ }
111
+ break;
112
+ case AgoraMediaBase_1.VideoSourceType.VideoSourceMediaPlayer:
113
+ channelId = '';
114
+ if (!uid) {
115
+ throw new Error(`must set mediaPlayerId:${uid}`);
116
+ }
117
+ break;
118
+ default:
119
+ break;
120
+ }
121
+ return { uid, channelId, videoSourceType };
122
+ };
123
+ exports.formatConfigByVideoSourceType = formatConfigByVideoSourceType;
124
+ /**
125
+ * @ignore
126
+ */
127
+ const getDefaultRendererVideoConfig = (config) => {
128
+ const rendererOptions = Object.assign({}, exports.AgoraEnv.AgoraRendererManager?.defaultRenderConfig?.rendererOptions, config.rendererOptions);
129
+ const { uid, channelId, videoSourceType } = (0, exports.formatConfigByVideoSourceType)(config.videoSourceType, config.channelId, config.uid);
130
+ return { ...config, uid, channelId, videoSourceType, rendererOptions };
131
+ };
132
+ exports.getDefaultRendererVideoConfig = getDefaultRendererVideoConfig;
133
+ /**
134
+ * @ignore
135
+ */
136
+ function classMix(...mixins) {
137
+ class MixClass {
138
+ constructor() {
139
+ for (let mixin of mixins) {
140
+ copyProperties(this, new mixin()); // 拷贝实例属性
141
+ }
142
+ }
143
+ }
144
+ for (let mixin of mixins) {
145
+ copyProperties(MixClass, mixin); // 拷贝静态属性
146
+ copyProperties(MixClass.prototype, mixin.prototype); // 拷贝原型属性
147
+ }
148
+ return MixClass;
149
+ }
150
+ exports.classMix = classMix;
151
+ function copyProperties(target, source) {
152
+ for (let key of Reflect.ownKeys(source)) {
153
+ if (key !== 'constructor' && key !== 'prototype' && key !== 'name') {
154
+ let desc = Object.getOwnPropertyDescriptor(source, key);
155
+ Object.defineProperty(target, key, desc);
156
+ }
157
+ }
158
+ }
159
+ const agora = require('../build/Release/agora_node_ext');
160
+ /**
161
+ * @ignore
162
+ */
163
+ exports.AgoraEnv = {
164
+ enableLogging: true,
165
+ enableDebugLogging: false,
166
+ webEnvReady: true,
167
+ AgoraElectronBridge: new agora.AgoraElectronBridge(),
168
+ };
package/package.json CHANGED
@@ -1,11 +1,20 @@
1
1
  {
2
2
  "name": "agora-electron-sdk",
3
- "version": "4.1.1-rc.1",
3
+ "version": "4.2.0-dev.13",
4
4
  "description": "agora-electron-sdk",
5
- "main": "js/AgoraSdk.js",
5
+ "main": "js/AgoraSdk",
6
6
  "types": "types/AgoraSdk.d.ts",
7
- "repository": "https://github.com/AgoraIO-Extensions/Electron-SDK",
8
- "author": "agora.io",
7
+ "source": "ts/AgoraSdk",
8
+ "files": [
9
+ "js",
10
+ "ts",
11
+ "types",
12
+ "scripts",
13
+ "gulpfile.*",
14
+ "agora_node_ext",
15
+ "common",
16
+ "extra"
17
+ ],
9
18
  "scripts": {
10
19
  "totalBuild": "cross-env-shell gulp totalBuild \\\"--INIT_CWD=$INIT_CWD\\\"",
11
20
  "build": "cross-env-shell gulp build \\\"--INIT_CWD=$INIT_CWD\\\"",
@@ -13,7 +22,7 @@
13
22
  "syncLib": "cross-env-shell gulp syncLib \\\"--INIT_CWD=$INIT_CWD\\\"",
14
23
  "buildJS": "cross-env-shell gulp buildJS \\\"--INIT_CWD=$INIT_CWD\\\"",
15
24
  "zipBuild": "cross-env-shell gulp zipBuild \\\"--INIT_CWD=$INIT_CWD\\\"",
16
- "prepublishOnly": "cross-env-shell npm run buildJS \\\"--INIT_CWD=$INIT_CWD\\\"",
25
+ "prepack": "cross-env-shell npm run buildJS \\\"--INIT_CWD=$INIT_CWD\\\"",
17
26
  "build_mac_debug": "cmake-js rebuild --CDCMAKE_BUILD_TYPE=Debug --CDCMAKE_OSX_ARCHITECTURES=\"arm64;x86_64\" -G Xcode",
18
27
  "build_mac_release": "cmake-js rebuild --CDCMAKE_BUILD_TYPE=Release --CDCMAKE_OSX_ARCHITECTURES=\"arm64;x86_64\" -G Xcode",
19
28
  "build_windows_win32_debug": "cmake-js rebuild --arch=ia32 --CDCMAKE_OSX_ARCHITECTURES=\"i386\" --CDCMAKE_BUILD_TYPE=Debug -G \"Visual Studio 16 2019\" ",
@@ -23,7 +32,7 @@
23
32
  "build_linux_debug": "cmake-js rebuild --arch=x64 --CDCMAKE_BUILD_TYPE=Debug -G \"Unix Makefiles\"",
24
33
  "build_linux_release": "cmake-js rebuild --arch=x64 --CDCMAKE_BUILD_TYPE=Release -G \"Unix Makefiles\"",
25
34
  "test": "jest",
26
- "typescript": "tsc --noEmit",
35
+ "typecheck": "tsc --noEmit",
27
36
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
28
37
  "install": "cross-env-shell gulp NPM_Install \\\"--INIT_CWD=$INIT_CWD\\\"",
29
38
  "release": "release-it",
@@ -31,68 +40,47 @@
31
40
  "bootstrap": "yarn config set agora-electron-sdk-pre-built 0 && yarn example && yarn install && yarn patch-package && yarn ts_interface_builder && yarn totalBuild && yarn link && yarn example link agora-electron-sdk && yarn config delete agora-electron-sdk-pre-built",
32
41
  "ts_interface_builder": "ts-interface-builder ts/Private/*.ts -o ts/Private/ti/"
33
42
  },
34
- "agora_electron": {
35
- "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.1.1-rc.1_DCG_Windows_Video_20230215_1032.zip",
36
- "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.1.1-rc.1_DCG_Mac_Video_20230215_1034.zip"
37
- },
38
- "dependencies": {
39
- "bindings": "1.2.1",
40
- "buffer": "^6.0.3",
41
- "cross-env": "^7.0.3",
42
- "download": "^8.0.0",
43
- "extract-zip": "^2.0.1",
44
- "fs-extra": "^9.1.0",
45
- "gulp": "^4.0.2",
46
- "gulp-cli": "^2.3.0",
47
- "gulp-zip": "^5.1.0",
48
- "json-bigint": "^1.0.0",
49
- "jsonfile": "^6.1.0",
50
- "lodash.isequal": "^4.5.0",
51
- "minimist": "^1.2.5",
52
- "rimraf": "^3.0.0",
53
- "shelljs": "^0.8.4",
54
- "ts-interface-checker": "^1.0.2",
55
- "winston": "^3.3.3",
56
- "yuv-buffer": "1.0.0",
57
- "yuv-canvas": "1.2.6"
58
- },
59
- "files": [
60
- "js",
61
- "ts",
62
- "types",
63
- "scripts",
64
- "gulpfile.*",
65
- "agora_node_ext",
66
- "common",
67
- "extra"
43
+ "keywords": [
44
+ "electron",
45
+ "windows",
46
+ "mac"
68
47
  ],
48
+ "repository": "https://github.com/AgoraIO-Extensions/Electron-SDK",
49
+ "author": "Agora.io",
50
+ "license": "MIT",
51
+ "bugs": {
52
+ "url": "https://github.com/AgoraIO-Extensions/Electron-SDK/issues"
53
+ },
54
+ "homepage": "https://github.com/AgoraIO-Extensions/Electron-SDK#readme",
69
55
  "publishConfig": {
70
56
  "registry": "https://registry.npmjs.org/"
71
57
  },
72
58
  "devDependencies": {
73
- "@arkweid/lefthook": "^0.7.7",
74
59
  "@commitlint/config-conventional": "^17.0.2",
60
+ "@evilmartians/lefthook": "^1.2.2",
75
61
  "@release-it/conventional-changelog": "^5.0.0",
76
- "@typescript-eslint/parser": "^5.33.0",
62
+ "@types/json-bigint": "^1.0.1",
63
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
64
+ "@typescript-eslint/parser": "^5.30.5",
77
65
  "cmake-js": "6.3.2",
78
66
  "commitlint": "^17.0.2",
79
- "cz-conventional-changelog": "3.3.0",
80
67
  "eslint": "^8.4.1",
81
68
  "eslint-config-prettier": "^8.5.0",
82
- "eslint-plugin-prettier": "^3.1.3",
83
- "husky": "4.2.5",
69
+ "eslint-plugin-auto-import": "^0.1.1",
70
+ "eslint-plugin-import": "^2.27.5",
71
+ "eslint-plugin-prettier": "^4.0.0",
72
+ "eslint-plugin-react": "^7.30.1",
73
+ "eslint-plugin-react-hooks": "^4.6.0",
84
74
  "patch-package": "^6.5.0",
85
75
  "prettier": "^2.0.5",
86
76
  "release-it": "^15.0.0",
87
77
  "ts-interface-builder": "^0.3.3",
88
78
  "typescript": "^4.5.2"
89
79
  },
90
- "husky": {
91
- "hooks": {
92
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
93
- "pre-commit": "yarn lint && yarn typescript"
94
- }
80
+ "engines": {
81
+ "node": ">= 14.0.0"
95
82
  },
83
+ "packageManager": "^yarn@1.22.15",
96
84
  "commitlint": {
97
85
  "extends": [
98
86
  "@commitlint/config-conventional"
@@ -116,59 +104,29 @@
116
104
  }
117
105
  }
118
106
  },
119
- "eslintConfig": {
120
- "env": {
121
- "node": true,
122
- "browser": true,
123
- "shared-node-browser": true
124
- },
125
- "parser": "@typescript-eslint/parser",
126
- "extends": [
127
- "prettier",
128
- "eslint:recommended"
129
- ],
130
- "plugins": [
131
- "prettier"
132
- ],
133
- "rules": {
134
- "no-unused-vars": "off",
135
- "@typescript-eslint/no-unused-vars": "off",
136
- "prettier/prettier": [
137
- "error",
138
- {
139
- "quoteProps": "consistent",
140
- "singleQuote": true,
141
- "tabWidth": 2,
142
- "trailingComma": "es5",
143
- "useTabs": false
144
- }
145
- ]
146
- },
147
- "globals": {
148
- "define": "readonly",
149
- "obj_attrib": "readonly",
150
- "info": "readonly",
151
- "NodeJS": "readonly"
152
- }
153
- },
154
- "eslintIgnore": [
155
- "node_modules/",
156
- "build/",
157
- "dist/",
158
- "js/",
159
- "types/",
160
- "ts/Private/ti/"
161
- ],
162
- "prettier": {
163
- "quoteProps": "consistent",
164
- "singleQuote": true,
165
- "tabWidth": 2,
166
- "trailingComma": "es5",
167
- "useTabs": false
107
+ "dependencies": {
108
+ "bindings": "1.2.1",
109
+ "buffer": "^6.0.3",
110
+ "cross-env": "^7.0.3",
111
+ "download": "^8.0.0",
112
+ "extract-zip": "^2.0.1",
113
+ "fs-extra": "^9.1.0",
114
+ "gulp": "^4.0.2",
115
+ "gulp-cli": "^2.3.0",
116
+ "gulp-zip": "^5.1.0",
117
+ "json-bigint": "^1.0.0",
118
+ "jsonfile": "^6.1.0",
119
+ "lodash.isequal": "^4.5.0",
120
+ "minimist": "^1.2.5",
121
+ "rimraf": "^3.0.0",
122
+ "shelljs": "^0.8.4",
123
+ "ts-interface-checker": "^1.0.2",
124
+ "winston": "^3.3.3",
125
+ "yuv-buffer": "1.0.0",
126
+ "yuv-canvas": "1.2.6"
168
127
  },
169
- "config": {
170
- "commitizen": {
171
- "path": "./node_modules/cz-conventional-changelog"
172
- }
128
+ "agora_electron": {
129
+ "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.0-dev.13_DCG_Windows_Video_20230426_0712.zip",
130
+ "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.0-dev.13_DCG_Mac_Video_20230426_0712.zip"
173
131
  }
174
132
  }
@@ -1,6 +1,6 @@
1
+ const child_process = require('child_process');
1
2
  const os = require('os');
2
3
  const path = require('path');
3
- const child_process = require('child_process');
4
4
 
5
5
  const root = path.resolve(__dirname, '..');
6
6
  const args = process.argv.slice(2);
package/scripts/build.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const { exec } = require('shelljs');
2
+
2
3
  const getConfig = require('./getConfig');
3
4
  const logger = require('./logger');
4
5
  const { getOS } = require('./util');
@@ -1,13 +1,13 @@
1
1
  const { exec } = require('shelljs');
2
- const logger = require('./logger');
2
+
3
3
  const { cleanJSDir, cleanTypesDir } = require('./clean');
4
+ const logger = require('./logger');
4
5
 
5
6
  const buildJS = async (cb) => {
6
7
  logger.info('Build js from typescript');
7
8
  await cleanJSDir();
8
9
  await cleanTypesDir();
9
- await exec('tsc', { silent: false });
10
- await exec('tsc -p dtsconfig.json', { silent: false });
10
+ await exec('tsc -p tsconfig.build.json', { silent: false });
11
11
  cb();
12
12
  };
13
13
 
package/scripts/clean.js CHANGED
@@ -1,6 +1,7 @@
1
- const fs = require('fs-extra');
2
1
  const path = require('path');
3
2
 
3
+ const fs = require('fs-extra');
4
+
4
5
  const destIrisSDKDir = path.join(__dirname, `../iris`);
5
6
  const buildDir = path.resolve(__dirname, '../build');
6
7
 
@@ -1,10 +1,12 @@
1
1
  const path = require('path');
2
+
2
3
  const download = require('download');
3
4
  const fs = require('fs-extra');
4
- const { getOS } = require('./util');
5
- const logger = require('./logger');
5
+
6
6
  const { cleanBuildDir, cleanJSDir, buildDir } = require('./clean');
7
7
  const getConfig = require('./getConfig');
8
+ const logger = require('./logger');
9
+ const { getOS } = require('./util');
8
10
 
9
11
  const { platform, packageVersion, arch, no_symbol } = getConfig();
10
12
 
@@ -86,9 +88,7 @@ module.exports = async (cb) => {
86
88
  extract: true,
87
89
  });
88
90
  } catch (error) {
89
- logger.error(error);
90
- logger.error('Agora sdk download base sdk error');
91
- throw new Error(error);
91
+ logger.error('Agora sdk download base sdk error', error);
92
92
  }
93
93
 
94
94
  if (no_symbol) {
@@ -1,8 +1,9 @@
1
- const minimist = require('minimist');
2
1
  const path = require('path');
2
+
3
+ const minimist = require('minimist');
4
+
3
5
  const logger = require('./logger');
4
6
 
5
- //@ts-ignore
6
7
  const { INIT_CWD } = minimist(process.argv.slice(2), {
7
8
  string: ['INIT_CWD'],
8
9
  default: {},