agora-electron-sdk 4.5.2 → 4.5.3-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 (411) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +6 -3
  3. package/js/example/src/renderer/examples/advanced/VideoEffect/videoEffectHelpers.js +308 -0
  4. package/js/{AgoraSdk.js → ts/AgoraSdk.js} +2 -12
  5. package/js/{Decoder → ts/Decoder}/index.js +1 -1
  6. package/js/{Private → ts/Private}/AgoraBase.js +829 -674
  7. package/js/{Private → ts/Private}/AgoraMediaBase.js +154 -151
  8. package/js/{Private → ts/Private}/AgoraMediaPlayerTypes.js +58 -54
  9. package/js/{Private → ts/Private}/IAgoraLog.js +13 -13
  10. package/js/{Private → ts/Private}/IAgoraMediaEngine.js +4 -4
  11. package/js/{Private → ts/Private}/IAgoraMediaPlayer.js +2 -2
  12. package/js/{Private → ts/Private}/IAgoraMusicContentCenter.js +1 -1
  13. package/js/{Private → ts/Private}/IAgoraRhythmPlayer.js +13 -13
  14. package/js/{Private → ts/Private}/IAgoraRtcEngine.js +150 -94
  15. package/js/{Private → ts/Private}/IAgoraRtcEngineEx.js +3 -3
  16. package/js/{Private → ts/Private}/IAgoraSpatialAudio.js +4 -4
  17. package/js/{Private → ts/Private}/IAudioDeviceManager.js +2 -2
  18. package/js/{Private → ts/Private}/impl/IAgoraMediaPlayerImpl.js +10 -0
  19. package/js/{Private → ts/Private}/impl/IAgoraRtcEngineExImpl.js +74 -0
  20. package/js/{Private → ts/Private}/impl/IAgoraRtcEngineImpl.js +233 -1
  21. package/js/{Private → ts/Private}/internal/IrisApiEngine.js +45 -0
  22. package/js/{Private → ts/Private}/internal/RtcEngineExInternal.js +74 -4
  23. package/js/ts/Private/internal/VideoEffectObjectInternal.js +14 -0
  24. package/js/{Private → ts/Private}/ti/IAgoraRtcEngine-ti.js +2 -0
  25. package/js/{Renderer → ts/Renderer}/AgoraView.js +19 -2
  26. package/js/{Renderer → ts/Renderer}/IRenderer.js +7 -4
  27. package/js/{Renderer → ts/Renderer}/IRendererCache.js +17 -1
  28. package/js/ts/Renderer/RendererCache.js +252 -0
  29. package/js/{Renderer → ts/Renderer}/RendererManager.js +13 -64
  30. package/js/{Renderer → ts/Renderer}/WebCodecsRenderer/index.js +5 -5
  31. package/js/{Renderer → ts/Renderer}/WebCodecsRendererCache.js +13 -1
  32. package/js/{Renderer → ts/Renderer}/WebGLRenderer/index.js +179 -26
  33. package/js/{Renderer → ts/Renderer}/YUVCanvasRenderer/index.js +12 -5
  34. package/js/{Utils.js → ts/Utils.js} +7 -7
  35. package/package.json +25 -12
  36. package/scripts/checkElectron.js +4 -2
  37. package/scripts/download.js +102 -0
  38. package/scripts/downloadPrebuild.js +2 -1
  39. package/scripts/synclib.js +2 -2
  40. package/ts/AgoraSdk.ts +2 -12
  41. package/ts/Decoder/index.ts +5 -1
  42. package/ts/Private/AgoraBase.ts +1259 -1060
  43. package/ts/Private/AgoraMediaBase.ts +351 -324
  44. package/ts/Private/AgoraMediaPlayerTypes.ts +94 -91
  45. package/ts/Private/IAgoraLog.ts +20 -18
  46. package/ts/Private/IAgoraMediaEngine.ts +86 -81
  47. package/ts/Private/IAgoraMediaPlayer.ts +196 -181
  48. package/ts/Private/IAgoraMediaPlayerSource.ts +40 -40
  49. package/ts/Private/IAgoraMusicContentCenter.ts +3 -3
  50. package/ts/Private/IAgoraRhythmPlayer.ts +15 -15
  51. package/ts/Private/IAgoraRtcEngine.ts +2492 -2047
  52. package/ts/Private/IAgoraRtcEngineEx.ts +434 -335
  53. package/ts/Private/IAgoraSpatialAudio.ts +43 -45
  54. package/ts/Private/IAudioDeviceManager.ts +106 -97
  55. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +12 -0
  56. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +138 -0
  57. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +331 -0
  58. package/ts/Private/internal/IrisApiEngine.ts +47 -0
  59. package/ts/Private/internal/RtcEngineExInternal.ts +106 -9
  60. package/ts/Private/internal/VideoEffectObjectInternal.ts +14 -0
  61. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +2 -0
  62. package/ts/Renderer/AgoraView.ts +32 -3
  63. package/ts/Renderer/IRenderer.ts +8 -3
  64. package/ts/Renderer/IRendererCache.ts +33 -0
  65. package/ts/Renderer/RendererCache.ts +211 -12
  66. package/ts/Renderer/RendererManager.ts +21 -99
  67. package/ts/Renderer/WebCodecsRenderer/index.ts +9 -6
  68. package/ts/Renderer/WebCodecsRendererCache.ts +17 -1
  69. package/ts/Renderer/WebGLRenderer/index.ts +246 -40
  70. package/ts/Renderer/YUVCanvasRenderer/index.ts +29 -16
  71. package/ts/Types.ts +14 -9
  72. package/ts/Utils.ts +8 -7
  73. package/types/example/src/renderer/examples/advanced/VideoEffect/videoEffectHelpers.d.ts +130 -0
  74. package/types/example/src/renderer/examples/advanced/VideoEffect/videoEffectHelpers.d.ts.map +1 -0
  75. package/types/{AgoraSdk.d.ts → ts/AgoraSdk.d.ts} +2 -12
  76. package/types/ts/AgoraSdk.d.ts.map +1 -0
  77. package/types/ts/Decoder/gpu-utils.d.ts.map +1 -0
  78. package/types/ts/Decoder/index.d.ts.map +1 -0
  79. package/types/ts/Private/AgoraBase.d.ts +5504 -0
  80. package/types/ts/Private/AgoraBase.d.ts.map +1 -0
  81. package/types/ts/Private/AgoraMediaBase.d.ts +1695 -0
  82. package/types/ts/Private/AgoraMediaBase.d.ts.map +1 -0
  83. package/types/ts/Private/AgoraMediaPlayerTypes.d.ts +456 -0
  84. package/types/ts/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
  85. package/types/ts/Private/IAgoraH265Transcoder.d.ts.map +1 -0
  86. package/types/ts/Private/IAgoraLog.d.ts +91 -0
  87. package/types/ts/Private/IAgoraLog.d.ts.map +1 -0
  88. package/types/ts/Private/IAgoraMediaEngine.d.ts +255 -0
  89. package/types/ts/Private/IAgoraMediaEngine.d.ts.map +1 -0
  90. package/types/ts/Private/IAgoraMediaPlayer.d.ts +662 -0
  91. package/types/ts/Private/IAgoraMediaPlayer.d.ts.map +1 -0
  92. package/types/ts/Private/IAgoraMediaPlayerSource.d.ts +109 -0
  93. package/types/ts/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
  94. package/types/ts/Private/IAgoraMediaRecorder.d.ts.map +1 -0
  95. package/types/ts/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
  96. package/types/{Private → ts/Private}/IAgoraMusicContentCenter.d.ts +3 -3
  97. package/types/ts/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
  98. package/types/ts/Private/IAgoraRhythmPlayer.d.ts +65 -0
  99. package/types/ts/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
  100. package/types/ts/Private/IAgoraRtcEngine.d.ts +6504 -0
  101. package/types/ts/Private/IAgoraRtcEngine.d.ts.map +1 -0
  102. package/types/ts/Private/IAgoraRtcEngineEx.d.ts +817 -0
  103. package/types/ts/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
  104. package/types/ts/Private/IAgoraSpatialAudio.d.ts +194 -0
  105. package/types/ts/Private/IAgoraSpatialAudio.d.ts.map +1 -0
  106. package/types/ts/Private/IAudioDeviceManager.d.ts +321 -0
  107. package/types/ts/Private/IAudioDeviceManager.d.ts.map +1 -0
  108. package/types/ts/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
  109. package/types/ts/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  110. package/types/ts/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  111. package/types/ts/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
  112. package/types/ts/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
  113. package/types/ts/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  114. package/types/ts/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  115. package/types/ts/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  116. package/types/ts/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  117. package/types/ts/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  118. package/types/ts/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  119. package/types/ts/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  120. package/types/ts/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  121. package/types/ts/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  122. package/types/ts/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  123. package/types/ts/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
  124. package/types/ts/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  125. package/types/ts/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
  126. package/types/ts/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  127. package/types/{Private → ts/Private}/impl/IAgoraMediaPlayerImpl.d.ts +2 -0
  128. package/types/ts/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  129. package/types/ts/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  130. package/types/ts/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  131. package/types/ts/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  132. package/types/{Private → ts/Private}/impl/IAgoraRtcEngineExImpl.d.ts +7 -1
  133. package/types/ts/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  134. package/types/{Private → ts/Private}/impl/IAgoraRtcEngineImpl.d.ts +27 -1
  135. package/types/ts/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  136. package/types/ts/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  137. package/types/ts/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  138. package/types/ts/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
  139. package/types/ts/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
  140. package/types/ts/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
  141. package/types/ts/Private/internal/IrisApiEngine.d.ts.map +1 -0
  142. package/types/ts/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  143. package/types/ts/Private/internal/MediaEngineInternal.d.ts.map +1 -0
  144. package/types/ts/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
  145. package/types/ts/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
  146. package/types/ts/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
  147. package/types/{Private → ts/Private}/internal/RtcEngineExInternal.d.ts +10 -4
  148. package/types/ts/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
  149. package/types/ts/Private/internal/VideoEffectObjectInternal.d.ts +7 -0
  150. package/types/ts/Private/internal/VideoEffectObjectInternal.d.ts.map +1 -0
  151. package/types/{Private → ts/Private}/ipc/main.d.ts.map +1 -1
  152. package/types/ts/Private/ipc/renderer.d.ts.map +1 -0
  153. package/types/ts/Private/ti/AgoraBase-ti.d.ts.map +1 -0
  154. package/types/ts/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  155. package/types/ts/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  156. package/types/ts/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
  157. package/types/ts/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
  158. package/types/ts/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  159. package/types/ts/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  160. package/types/ts/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  161. package/types/ts/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  162. package/types/ts/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  163. package/types/ts/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  164. package/types/ts/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  165. package/types/ts/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  166. package/types/ts/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  167. package/types/ts/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  168. package/types/ts/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  169. package/types/{Renderer → ts/Renderer}/AgoraView.d.ts +6 -0
  170. package/types/ts/Renderer/AgoraView.d.ts.map +1 -0
  171. package/types/ts/Renderer/CapabilityManager.d.ts.map +1 -0
  172. package/types/{Renderer → ts/Renderer}/IRenderer.d.ts +2 -2
  173. package/types/ts/Renderer/IRenderer.d.ts.map +1 -0
  174. package/types/{Renderer → ts/Renderer}/IRendererCache.d.ts +21 -1
  175. package/types/ts/Renderer/IRendererCache.d.ts.map +1 -0
  176. package/types/{Renderer → ts/Renderer}/RendererCache.d.ts +27 -0
  177. package/types/ts/Renderer/RendererCache.d.ts.map +1 -0
  178. package/types/{Renderer → ts/Renderer}/RendererManager.d.ts +4 -17
  179. package/types/ts/Renderer/RendererManager.d.ts.map +1 -0
  180. package/types/{Renderer → ts/Renderer}/WebCodecsRenderer/index.d.ts +3 -3
  181. package/types/ts/Renderer/WebCodecsRenderer/index.d.ts.map +1 -0
  182. package/types/{Renderer → ts/Renderer}/WebCodecsRendererCache.d.ts +7 -0
  183. package/types/ts/Renderer/WebCodecsRendererCache.d.ts.map +1 -0
  184. package/types/{Renderer → ts/Renderer}/WebGLRenderer/index.d.ts +12 -2
  185. package/types/ts/Renderer/WebGLRenderer/index.d.ts.map +1 -0
  186. package/types/ts/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
  187. package/types/ts/Renderer/YUVCanvasRenderer/index.d.ts +10 -0
  188. package/types/ts/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
  189. package/types/ts/Renderer/index.d.ts.map +1 -0
  190. package/types/{Types.d.ts → ts/Types.d.ts} +11 -6
  191. package/types/ts/Types.d.ts.map +1 -0
  192. package/types/{Utils.d.ts → ts/Utils.d.ts} +1 -1
  193. package/types/ts/Utils.d.ts.map +1 -0
  194. package/js/Renderer/RendererCache.js +0 -100
  195. package/types/AgoraSdk.d.ts.map +0 -1
  196. package/types/Decoder/gpu-utils.d.ts.map +0 -1
  197. package/types/Decoder/index.d.ts.map +0 -1
  198. package/types/Private/AgoraBase.d.ts +0 -5310
  199. package/types/Private/AgoraBase.d.ts.map +0 -1
  200. package/types/Private/AgoraMediaBase.d.ts +0 -1668
  201. package/types/Private/AgoraMediaBase.d.ts.map +0 -1
  202. package/types/Private/AgoraMediaPlayerTypes.d.ts +0 -453
  203. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +0 -1
  204. package/types/Private/IAgoraH265Transcoder.d.ts.map +0 -1
  205. package/types/Private/IAgoraLog.d.ts +0 -89
  206. package/types/Private/IAgoraLog.d.ts.map +0 -1
  207. package/types/Private/IAgoraMediaEngine.d.ts +0 -250
  208. package/types/Private/IAgoraMediaEngine.d.ts.map +0 -1
  209. package/types/Private/IAgoraMediaPlayer.d.ts +0 -648
  210. package/types/Private/IAgoraMediaPlayer.d.ts.map +0 -1
  211. package/types/Private/IAgoraMediaPlayerSource.d.ts +0 -109
  212. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +0 -1
  213. package/types/Private/IAgoraMediaRecorder.d.ts.map +0 -1
  214. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +0 -1
  215. package/types/Private/IAgoraMusicContentCenter.d.ts.map +0 -1
  216. package/types/Private/IAgoraRhythmPlayer.d.ts +0 -65
  217. package/types/Private/IAgoraRhythmPlayer.d.ts.map +0 -1
  218. package/types/Private/IAgoraRtcEngine.d.ts +0 -6103
  219. package/types/Private/IAgoraRtcEngine.d.ts.map +0 -1
  220. package/types/Private/IAgoraRtcEngineEx.d.ts +0 -741
  221. package/types/Private/IAgoraRtcEngineEx.d.ts.map +0 -1
  222. package/types/Private/IAgoraSpatialAudio.d.ts +0 -196
  223. package/types/Private/IAgoraSpatialAudio.d.ts.map +0 -1
  224. package/types/Private/IAudioDeviceManager.d.ts +0 -312
  225. package/types/Private/IAudioDeviceManager.d.ts.map +0 -1
  226. package/types/Private/extension/AgoraBaseExtension.d.ts.map +0 -1
  227. package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +0 -1
  228. package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +0 -1
  229. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +0 -1
  230. package/types/Private/extension/IAgoraLogExtension.d.ts.map +0 -1
  231. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +0 -1
  232. package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +0 -1
  233. package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +0 -1
  234. package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +0 -1
  235. package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +0 -1
  236. package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +0 -1
  237. package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +0 -1
  238. package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +0 -1
  239. package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +0 -1
  240. package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +0 -1
  241. package/types/Private/impl/AgoraBaseImpl.d.ts.map +0 -1
  242. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +0 -1
  243. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +0 -1
  244. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +0 -1
  245. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +0 -1
  246. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +0 -1
  247. package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +0 -1
  248. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +0 -1
  249. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +0 -1
  250. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +0 -1
  251. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +0 -1
  252. package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +0 -1
  253. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +0 -1
  254. package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +0 -1
  255. package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +0 -1
  256. package/types/Private/internal/IrisApiEngine.d.ts.map +0 -1
  257. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +0 -1
  258. package/types/Private/internal/MediaEngineInternal.d.ts.map +0 -1
  259. package/types/Private/internal/MediaPlayerInternal.d.ts.map +0 -1
  260. package/types/Private/internal/MediaRecorderInternal.d.ts.map +0 -1
  261. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +0 -1
  262. package/types/Private/internal/RtcEngineExInternal.d.ts.map +0 -1
  263. package/types/Private/ipc/renderer.d.ts.map +0 -1
  264. package/types/Private/ti/AgoraBase-ti.d.ts.map +0 -1
  265. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +0 -1
  266. package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +0 -1
  267. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +0 -1
  268. package/types/Private/ti/IAgoraLog-ti.d.ts.map +0 -1
  269. package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +0 -1
  270. package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +0 -1
  271. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +0 -1
  272. package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +0 -1
  273. package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +0 -1
  274. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +0 -1
  275. package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +0 -1
  276. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +0 -1
  277. package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +0 -1
  278. package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +0 -1
  279. package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +0 -1
  280. package/types/Renderer/AgoraView.d.ts.map +0 -1
  281. package/types/Renderer/CapabilityManager.d.ts.map +0 -1
  282. package/types/Renderer/IRenderer.d.ts.map +0 -1
  283. package/types/Renderer/IRendererCache.d.ts.map +0 -1
  284. package/types/Renderer/RendererCache.d.ts.map +0 -1
  285. package/types/Renderer/RendererManager.d.ts.map +0 -1
  286. package/types/Renderer/WebCodecsRenderer/index.d.ts.map +0 -1
  287. package/types/Renderer/WebCodecsRendererCache.d.ts.map +0 -1
  288. package/types/Renderer/WebGLRenderer/index.d.ts.map +0 -1
  289. package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +0 -1
  290. package/types/Renderer/YUVCanvasRenderer/index.d.ts +0 -9
  291. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +0 -1
  292. package/types/Renderer/index.d.ts.map +0 -1
  293. package/types/Types.d.ts.map +0 -1
  294. package/types/Utils.d.ts.map +0 -1
  295. /package/js/{Decoder → ts/Decoder}/gpu-utils.js +0 -0
  296. /package/js/{Private → ts/Private}/IAgoraH265Transcoder.js +0 -0
  297. /package/js/{Private → ts/Private}/IAgoraMediaPlayerSource.js +0 -0
  298. /package/js/{Private → ts/Private}/IAgoraMediaRecorder.js +0 -0
  299. /package/js/{Private → ts/Private}/IAgoraMediaStreamingSource.js +0 -0
  300. /package/js/{Private → ts/Private}/extension/AgoraBaseExtension.js +0 -0
  301. /package/js/{Private → ts/Private}/extension/AgoraMediaBaseExtension.js +0 -0
  302. /package/js/{Private → ts/Private}/extension/AgoraMediaPlayerTypesExtension.js +0 -0
  303. /package/js/{Private → ts/Private}/extension/IAgoraH265TranscoderExtension.js +0 -0
  304. /package/js/{Private → ts/Private}/extension/IAgoraLogExtension.js +0 -0
  305. /package/js/{Private → ts/Private}/extension/IAgoraMediaEngineExtension.js +0 -0
  306. /package/js/{Private → ts/Private}/extension/IAgoraMediaPlayerExtension.js +0 -0
  307. /package/js/{Private → ts/Private}/extension/IAgoraMediaPlayerSourceExtension.js +0 -0
  308. /package/js/{Private → ts/Private}/extension/IAgoraMediaRecorderExtension.js +0 -0
  309. /package/js/{Private → ts/Private}/extension/IAgoraMusicContentCenterExtension.js +0 -0
  310. /package/js/{Private → ts/Private}/extension/IAgoraRhythmPlayerExtension.js +0 -0
  311. /package/js/{Private → ts/Private}/extension/IAgoraRtcEngineExExtension.js +0 -0
  312. /package/js/{Private → ts/Private}/extension/IAgoraRtcEngineExtension.js +0 -0
  313. /package/js/{Private → ts/Private}/extension/IAgoraSpatialAudioExtension.js +0 -0
  314. /package/js/{Private → ts/Private}/extension/IAudioDeviceManagerExtension.js +0 -0
  315. /package/js/{Private → ts/Private}/impl/AgoraBaseImpl.js +0 -0
  316. /package/js/{Private → ts/Private}/impl/AgoraMediaBaseImpl.js +0 -0
  317. /package/js/{Private → ts/Private}/impl/IAgoraH265TranscoderImpl.js +0 -0
  318. /package/js/{Private → ts/Private}/impl/IAgoraMediaEngineImpl.js +0 -0
  319. /package/js/{Private → ts/Private}/impl/IAgoraMediaPlayerSourceImpl.js +0 -0
  320. /package/js/{Private → ts/Private}/impl/IAgoraMediaRecorderImpl.js +0 -0
  321. /package/js/{Private → ts/Private}/impl/IAgoraMusicContentCenterImpl.js +0 -0
  322. /package/js/{Private → ts/Private}/impl/IAgoraSpatialAudioImpl.js +0 -0
  323. /package/js/{Private → ts/Private}/impl/IAudioDeviceManagerImpl.js +0 -0
  324. /package/js/{Private → ts/Private}/internal/AgoraH265TranscoderInternal.js +0 -0
  325. /package/js/{Private → ts/Private}/internal/AgoraMediaBaseInternal.js +0 -0
  326. /package/js/{Private → ts/Private}/internal/AudioDeviceManagerInternal.js +0 -0
  327. /package/js/{Private → ts/Private}/internal/LocalSpatialAudioEngineInternal.js +0 -0
  328. /package/js/{Private → ts/Private}/internal/MediaEngineInternal.js +0 -0
  329. /package/js/{Private → ts/Private}/internal/MediaPlayerInternal.js +0 -0
  330. /package/js/{Private → ts/Private}/internal/MediaRecorderInternal.js +0 -0
  331. /package/js/{Private → ts/Private}/internal/MusicContentCenterInternal.js +0 -0
  332. /package/js/{Private → ts/Private}/ipc/main.js +0 -0
  333. /package/js/{Private → ts/Private}/ipc/renderer.js +0 -0
  334. /package/js/{Private → ts/Private}/ti/AgoraBase-ti.js +0 -0
  335. /package/js/{Private → ts/Private}/ti/AgoraMediaBase-ti.js +0 -0
  336. /package/js/{Private → ts/Private}/ti/AgoraMediaPlayerTypes-ti.js +0 -0
  337. /package/js/{Private → ts/Private}/ti/IAgoraH265Transcoder-ti.js +0 -0
  338. /package/js/{Private → ts/Private}/ti/IAgoraLog-ti.js +0 -0
  339. /package/js/{Private → ts/Private}/ti/IAgoraMediaEngine-ti.js +0 -0
  340. /package/js/{Private → ts/Private}/ti/IAgoraMediaPlayer-ti.js +0 -0
  341. /package/js/{Private → ts/Private}/ti/IAgoraMediaPlayerSource-ti.js +0 -0
  342. /package/js/{Private → ts/Private}/ti/IAgoraMediaRecorder-ti.js +0 -0
  343. /package/js/{Private → ts/Private}/ti/IAgoraMediaStreamingSource-ti.js +0 -0
  344. /package/js/{Private → ts/Private}/ti/IAgoraMusicContentCenter-ti.js +0 -0
  345. /package/js/{Private → ts/Private}/ti/IAgoraRhythmPlayer-ti.js +0 -0
  346. /package/js/{Private → ts/Private}/ti/IAgoraRtcEngineEx-ti.js +0 -0
  347. /package/js/{Private → ts/Private}/ti/IAgoraSpatialAudio-ti.js +0 -0
  348. /package/js/{Private → ts/Private}/ti/IAudioDeviceManager-ti.js +0 -0
  349. /package/js/{Renderer → ts/Renderer}/CapabilityManager.js +0 -0
  350. /package/js/{Renderer → ts/Renderer}/WebGLRenderer/webgl-utils.js +0 -0
  351. /package/js/{Renderer → ts/Renderer}/index.js +0 -0
  352. /package/js/{Types.js → ts/Types.js} +0 -0
  353. /package/types/{Decoder → ts/Decoder}/gpu-utils.d.ts +0 -0
  354. /package/types/{Decoder → ts/Decoder}/index.d.ts +0 -0
  355. /package/types/{Private → ts/Private}/IAgoraH265Transcoder.d.ts +0 -0
  356. /package/types/{Private → ts/Private}/IAgoraMediaRecorder.d.ts +0 -0
  357. /package/types/{Private → ts/Private}/IAgoraMediaStreamingSource.d.ts +0 -0
  358. /package/types/{Private → ts/Private}/extension/AgoraBaseExtension.d.ts +0 -0
  359. /package/types/{Private → ts/Private}/extension/AgoraMediaBaseExtension.d.ts +0 -0
  360. /package/types/{Private → ts/Private}/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -0
  361. /package/types/{Private → ts/Private}/extension/IAgoraH265TranscoderExtension.d.ts +0 -0
  362. /package/types/{Private → ts/Private}/extension/IAgoraLogExtension.d.ts +0 -0
  363. /package/types/{Private → ts/Private}/extension/IAgoraMediaEngineExtension.d.ts +0 -0
  364. /package/types/{Private → ts/Private}/extension/IAgoraMediaPlayerExtension.d.ts +0 -0
  365. /package/types/{Private → ts/Private}/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -0
  366. /package/types/{Private → ts/Private}/extension/IAgoraMediaRecorderExtension.d.ts +0 -0
  367. /package/types/{Private → ts/Private}/extension/IAgoraMusicContentCenterExtension.d.ts +0 -0
  368. /package/types/{Private → ts/Private}/extension/IAgoraRhythmPlayerExtension.d.ts +0 -0
  369. /package/types/{Private → ts/Private}/extension/IAgoraRtcEngineExExtension.d.ts +0 -0
  370. /package/types/{Private → ts/Private}/extension/IAgoraRtcEngineExtension.d.ts +0 -0
  371. /package/types/{Private → ts/Private}/extension/IAgoraSpatialAudioExtension.d.ts +0 -0
  372. /package/types/{Private → ts/Private}/extension/IAudioDeviceManagerExtension.d.ts +0 -0
  373. /package/types/{Private → ts/Private}/impl/AgoraBaseImpl.d.ts +0 -0
  374. /package/types/{Private → ts/Private}/impl/AgoraMediaBaseImpl.d.ts +0 -0
  375. /package/types/{Private → ts/Private}/impl/IAgoraH265TranscoderImpl.d.ts +0 -0
  376. /package/types/{Private → ts/Private}/impl/IAgoraMediaEngineImpl.d.ts +0 -0
  377. /package/types/{Private → ts/Private}/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -0
  378. /package/types/{Private → ts/Private}/impl/IAgoraMediaRecorderImpl.d.ts +0 -0
  379. /package/types/{Private → ts/Private}/impl/IAgoraMusicContentCenterImpl.d.ts +0 -0
  380. /package/types/{Private → ts/Private}/impl/IAgoraSpatialAudioImpl.d.ts +0 -0
  381. /package/types/{Private → ts/Private}/impl/IAudioDeviceManagerImpl.d.ts +0 -0
  382. /package/types/{Private → ts/Private}/internal/AgoraH265TranscoderInternal.d.ts +0 -0
  383. /package/types/{Private → ts/Private}/internal/AgoraMediaBaseInternal.d.ts +0 -0
  384. /package/types/{Private → ts/Private}/internal/AudioDeviceManagerInternal.d.ts +0 -0
  385. /package/types/{Private → ts/Private}/internal/IrisApiEngine.d.ts +0 -0
  386. /package/types/{Private → ts/Private}/internal/LocalSpatialAudioEngineInternal.d.ts +0 -0
  387. /package/types/{Private → ts/Private}/internal/MediaEngineInternal.d.ts +0 -0
  388. /package/types/{Private → ts/Private}/internal/MediaPlayerInternal.d.ts +0 -0
  389. /package/types/{Private → ts/Private}/internal/MediaRecorderInternal.d.ts +0 -0
  390. /package/types/{Private → ts/Private}/internal/MusicContentCenterInternal.d.ts +0 -0
  391. /package/types/{Private → ts/Private}/ipc/main.d.ts +0 -0
  392. /package/types/{Private → ts/Private}/ipc/renderer.d.ts +0 -0
  393. /package/types/{Private → ts/Private}/ti/AgoraBase-ti.d.ts +0 -0
  394. /package/types/{Private → ts/Private}/ti/AgoraMediaBase-ti.d.ts +0 -0
  395. /package/types/{Private → ts/Private}/ti/AgoraMediaPlayerTypes-ti.d.ts +0 -0
  396. /package/types/{Private → ts/Private}/ti/IAgoraH265Transcoder-ti.d.ts +0 -0
  397. /package/types/{Private → ts/Private}/ti/IAgoraLog-ti.d.ts +0 -0
  398. /package/types/{Private → ts/Private}/ti/IAgoraMediaEngine-ti.d.ts +0 -0
  399. /package/types/{Private → ts/Private}/ti/IAgoraMediaPlayer-ti.d.ts +0 -0
  400. /package/types/{Private → ts/Private}/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -0
  401. /package/types/{Private → ts/Private}/ti/IAgoraMediaRecorder-ti.d.ts +0 -0
  402. /package/types/{Private → ts/Private}/ti/IAgoraMediaStreamingSource-ti.d.ts +0 -0
  403. /package/types/{Private → ts/Private}/ti/IAgoraMusicContentCenter-ti.d.ts +0 -0
  404. /package/types/{Private → ts/Private}/ti/IAgoraRhythmPlayer-ti.d.ts +0 -0
  405. /package/types/{Private → ts/Private}/ti/IAgoraRtcEngine-ti.d.ts +0 -0
  406. /package/types/{Private → ts/Private}/ti/IAgoraRtcEngineEx-ti.d.ts +0 -0
  407. /package/types/{Private → ts/Private}/ti/IAgoraSpatialAudio-ti.d.ts +0 -0
  408. /package/types/{Private → ts/Private}/ti/IAudioDeviceManager-ti.d.ts +0 -0
  409. /package/types/{Renderer → ts/Renderer}/CapabilityManager.d.ts +0 -0
  410. /package/types/{Renderer → ts/Renderer}/WebGLRenderer/webgl-utils.d.ts +0 -0
  411. /package/types/{Renderer → ts/Renderer}/index.d.ts +0 -0
@@ -2,111 +2,111 @@ import './extension/AgoraMediaBaseExtension';
2
2
  import { EncodedVideoFrameInfo } from './AgoraBase';
3
3
 
4
4
  /**
5
- * The context information of the extension.
5
+ * Plugin context information.
6
6
  */
7
7
  export class ExtensionContext {
8
8
  /**
9
- * Whether the uid in ExtensionContext is valid: true : The uid is valid. false : The uid is invalid.
9
+ * Whether the uid reported in ExtensionContext is valid: true : uid is valid. false : uid is invalid.
10
10
  */
11
11
  isValid?: boolean;
12
12
  /**
13
- * The user ID. 0 represents a local user, while greater than 0 represents a remote user.
13
+ * User ID. 0 represents the local user, values greater than 0 represent remote users.
14
14
  */
15
15
  uid?: number;
16
16
  /**
17
- * The name of the extension provider.
17
+ * Name of the plugin provider.
18
18
  */
19
19
  providerName?: string;
20
20
  /**
21
- * The name of the extension.
21
+ * Name of the plugin.
22
22
  */
23
23
  extensionName?: string;
24
24
  }
25
25
 
26
26
  /**
27
- * The type of the video source.
27
+ * Type of video source.
28
28
  */
29
29
  export enum VideoSourceType {
30
30
  /**
31
- * 0: (Default) The primary camera.
31
+ * 0: (Default) The video source is the first camera.
32
32
  */
33
33
  VideoSourceCameraPrimary = 0,
34
34
  /**
35
- * 0: (Default) The primary camera.
35
+ * 0: (Default) The video source is the first camera.
36
36
  */
37
37
  VideoSourceCamera = 0,
38
38
  /**
39
- * 1: The secondary camera.
39
+ * 1: The video source is the second camera.
40
40
  */
41
41
  VideoSourceCameraSecondary = 1,
42
42
  /**
43
- * 2: The primary screen.
43
+ * 2: The video source is the first screen.
44
44
  */
45
45
  VideoSourceScreenPrimary = 2,
46
46
  /**
47
- * 2: The primary screen.
47
+ * 2: The video source is the first screen.
48
48
  */
49
49
  VideoSourceScreen = 2,
50
50
  /**
51
- * 3: The secondary screen.
51
+ * 3: The video source is the second screen.
52
52
  */
53
53
  VideoSourceScreenSecondary = 3,
54
54
  /**
55
- * 4: A custom video source.
55
+ * 4: Custom video source.
56
56
  */
57
57
  VideoSourceCustom = 4,
58
58
  /**
59
- * 5: The media player.
59
+ * 5: The video source is a media player.
60
60
  */
61
61
  VideoSourceMediaPlayer = 5,
62
62
  /**
63
- * 6: One PNG image.
63
+ * 6: The video source is a PNG image.
64
64
  */
65
65
  VideoSourceRtcImagePng = 6,
66
66
  /**
67
- * 7: One JPEG image.
67
+ * 7: The video source is a JPEG image.
68
68
  */
69
69
  VideoSourceRtcImageJpeg = 7,
70
70
  /**
71
- * 8: One GIF image.
71
+ * 8: The video source is a GIF image.
72
72
  */
73
73
  VideoSourceRtcImageGif = 8,
74
74
  /**
75
- * 9: One remote video acquired by the network.
75
+ * 9: The video source is remote video obtained over the network.
76
76
  */
77
77
  VideoSourceRemote = 9,
78
78
  /**
79
- * 10: One transcoded video source.
79
+ * 10: Transcoded video source.
80
80
  */
81
81
  VideoSourceTranscoded = 10,
82
82
  /**
83
- * 11: The third camera.
83
+ * 11: The video source is the third camera.
84
84
  */
85
85
  VideoSourceCameraThird = 11,
86
86
  /**
87
- * 12: The fourth camera.
87
+ * 12: The video source is the fourth camera.
88
88
  */
89
89
  VideoSourceCameraFourth = 12,
90
90
  /**
91
- * 13: The third screen.
91
+ * 13: The video source is the third screen.
92
92
  */
93
93
  VideoSourceScreenThird = 13,
94
94
  /**
95
- * 14: The fourth screen.
95
+ * 14: The video source is the fourth screen.
96
96
  */
97
97
  VideoSourceScreenFourth = 14,
98
98
  /**
99
- * @ignore
99
+ * 15: The video source is video processed by a speech-driven plugin.
100
100
  */
101
101
  VideoSourceSpeechDriven = 15,
102
102
  /**
103
- * 100: An unknown video source.
103
+ * 100: Unknown video source.
104
104
  */
105
105
  VideoSourceUnknown = 100,
106
106
  }
107
107
 
108
108
  /**
109
- * The audio source type.
109
+ * Audio source type.
110
110
  */
111
111
  export enum AudioSourceType {
112
112
  /**
@@ -114,7 +114,7 @@ export enum AudioSourceType {
114
114
  */
115
115
  AudioSourceMicrophone = 0,
116
116
  /**
117
- * 1: Custom audio stream.
117
+ * 1: Custom captured audio stream.
118
118
  */
119
119
  AudioSourceCustom = 1,
120
120
  /**
@@ -130,69 +130,69 @@ export enum AudioSourceType {
130
130
  */
131
131
  AudioSourceMixedStream = 4,
132
132
  /**
133
- * 5: Audio stream from a specified remote user.
133
+ * 5: Audio stream of a specified remote user.
134
134
  */
135
135
  AudioSourceRemoteUser = 5,
136
136
  /**
137
- * 6: Mixed audio streams from all users in the current channel.
137
+ * 6: Mixed stream of all audio streams in the current channel.
138
138
  */
139
139
  AudioSourceRemoteChannel = 6,
140
140
  /**
141
- * 100: An unknown audio source.
141
+ * 100: Unknown audio source.
142
142
  */
143
143
  AudioSourceUnknown = 100,
144
144
  }
145
145
 
146
146
  /**
147
- * The type of the audio route.
147
+ * Types of audio routing.
148
148
  */
149
149
  export enum AudioRoute {
150
150
  /**
151
- * -1: The default audio route.
151
+ * -1: Use the default audio route.
152
152
  */
153
153
  RouteDefault = -1,
154
154
  /**
155
- * 0: Audio output routing is a headset with microphone.
155
+ * 0: Audio routed to headset with microphone.
156
156
  */
157
157
  RouteHeadset = 0,
158
158
  /**
159
- * 1: The audio route is an earpiece.
159
+ * 1: Audio routed to earpiece.
160
160
  */
161
161
  RouteEarpiece = 1,
162
162
  /**
163
- * 2: The audio route is a headset without a microphone.
163
+ * 2: Audio routed to headset without microphone.
164
164
  */
165
165
  RouteHeadsetnomic = 2,
166
166
  /**
167
- * 3: The audio route is the speaker that comes with the device.
167
+ * 3: Audio routed to built-in speaker.
168
168
  */
169
169
  RouteSpeakerphone = 3,
170
170
  /**
171
- * 4: The audio route is an external speaker. (macOS only)
171
+ * 4: Audio routed to external speaker. (macOS only)
172
172
  */
173
173
  RouteLoudspeaker = 4,
174
174
  /**
175
- * 5: The audio route is a Bluetooth device using the HFP protocol.
175
+ * 5: Audio routed to Bluetooth device using HFP protocol.
176
176
  */
177
177
  RouteBluetoothDeviceHfp = 5,
178
178
  /**
179
- * 6: The audio route is a USB peripheral device. (For macOS only)
179
+ * 6: Audio routed to USB peripheral device. (macOS only)
180
180
  */
181
181
  RouteUsb = 6,
182
182
  /**
183
- * 7: The audio route is an HDMI peripheral device. (For macOS only)
183
+ * 7: Audio routed to HDMI peripheral device. (macOS only)
184
184
  */
185
185
  RouteHdmi = 7,
186
186
  /**
187
- * 8: The audio route is a DisplayPort peripheral device. (For macOS only)
187
+ * 8: Audio routed to DisplayPort peripheral device. (macOS only)
188
188
  */
189
189
  RouteDisplayport = 8,
190
190
  /**
191
- * 9: The audio route is Apple AirPlay. (For macOS only)
191
+ * 9: Audio routed to Apple AirPlay. (macOS only)
192
192
  */
193
193
  RouteAirplay = 9,
194
194
  /**
195
- * 10: The audio route is a Bluetooth device using the A2DP protocol.
195
+ * 10: Audio routed to Bluetooth device using A2DP protocol.
196
196
  */
197
197
  RouteBluetoothDeviceA2dp = 10,
198
198
  }
@@ -226,21 +226,21 @@ export class AudioParameters {
226
226
  }
227
227
 
228
228
  /**
229
- * The use mode of the audio data.
229
+ * Usage mode of audio data.
230
230
  */
231
231
  export enum RawAudioFrameOpModeType {
232
232
  /**
233
- * 0: Read-only mode, Users only read the data returned by the SDK without modifying anything. For example, when users acquire the data with the Agora SDK, then start the media push.
233
+ * 0: (Default) Read-only mode. You only retrieve the raw data returned by the SDK without making any modifications. For example, if you collect data via the SDK and perform your own CDN streaming, you can use this mode.
234
234
  */
235
235
  RawAudioFrameOpModeReadOnly = 0,
236
236
  /**
237
- * 2: Read and write mode, Users read the data returned by the SDK, modify it, and then play it. For example, when users have their own audio-effect processing module and perform some voice preprocessing, such as a voice change.
237
+ * 2: Read-write mode. You modify the raw audio returned by the SDK and send it back to the SDK for encoding and transmission. For example, if you have your own audio effects module and want to pre-process the data (e.g., voice changing), you can use this mode.
238
238
  */
239
239
  RawAudioFrameOpModeReadWrite = 2,
240
240
  }
241
241
 
242
242
  /**
243
- * Media source type.
243
+ * Media source types.
244
244
  */
245
245
  export enum MediaSourceType {
246
246
  /**
@@ -248,15 +248,15 @@ export enum MediaSourceType {
248
248
  */
249
249
  AudioPlayoutSource = 0,
250
250
  /**
251
- * 1: Audio capturing device.
251
+ * 1: Audio recording device.
252
252
  */
253
253
  AudioRecordingSource = 1,
254
254
  /**
255
- * 2: The primary camera.
255
+ * 2: Primary camera.
256
256
  */
257
257
  PrimaryCameraSource = 2,
258
258
  /**
259
- * 3: A secondary camera.
259
+ * 3: Secondary camera.
260
260
  */
261
261
  SecondaryCameraSource = 3,
262
262
  /**
@@ -296,7 +296,7 @@ export enum MediaSourceType {
296
296
  */
297
297
  TranscodedVideoSource = 12,
298
298
  /**
299
- * @ignore
299
+ * 13: Video source processed by speech-driven plugin.
300
300
  */
301
301
  SpeechDrivenVideoSource = 13,
302
302
  /**
@@ -305,82 +305,6 @@ export enum MediaSourceType {
305
305
  UnknownMediaSource = 100,
306
306
  }
307
307
 
308
- /**
309
- * @ignore
310
- */
311
- export enum ContentInspectResult {
312
- /**
313
- * @ignore
314
- */
315
- ContentInspectNeutral = 1,
316
- /**
317
- * @ignore
318
- */
319
- ContentInspectSexy = 2,
320
- /**
321
- * @ignore
322
- */
323
- ContentInspectPorn = 3,
324
- }
325
-
326
- /**
327
- * The type of video content moderation module.
328
- */
329
- export enum ContentInspectType {
330
- /**
331
- * 0: (Default) This module has no actual function. Do not set type to this value.
332
- */
333
- ContentInspectInvalid = 0,
334
- /**
335
- * @ignore
336
- */
337
- ContentInspectModeration = 1,
338
- /**
339
- * 2: Video screenshot and upload via Agora self-developed extension. SDK takes screenshots of the video stream in the channel and uploads them.
340
- */
341
- ContentInspectSupervision = 2,
342
- /**
343
- * 3: Video screenshot and upload via extensions from Agora Extensions Marketplace. SDK uses video moderation extensions from Agora Extensions Marketplace to take screenshots of the video stream in the channel and uploads them.
344
- */
345
- ContentInspectImageModeration = 3,
346
- }
347
-
348
- /**
349
- * ContentInspectModule A structure used to configure the frequency of video screenshot and upload.
350
- */
351
- export class ContentInspectModule {
352
- /**
353
- * Types of functional module. See ContentInspectType.
354
- */
355
- type?: ContentInspectType;
356
- /**
357
- * The frequency (s) of video screenshot and upload. The value should be set as larger than 0. The default value is 0, the SDK does not take screenshots. Agora recommends that you set the value as 10; you can also adjust it according to your business needs.
358
- */
359
- interval?: number;
360
- }
361
-
362
- /**
363
- * Screenshot and upload configuration.
364
- */
365
- export class ContentInspectConfig {
366
- /**
367
- * Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server.
368
- */
369
- extraInfo?: string;
370
- /**
371
- * @ignore
372
- */
373
- serverConfig?: string;
374
- /**
375
- * Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported.
376
- */
377
- modules?: ContentInspectModule[];
378
- /**
379
- * The number of functional modules, that is,the number of configured ContentInspectModule instances, must be the same as the number of instances configured in modules. The maximum number is 32.
380
- */
381
- moduleCount?: number;
382
- }
383
-
384
308
  /**
385
309
  * @ignore
386
310
  */
@@ -410,31 +334,35 @@ export class AudioEncodedFrameInfo {
410
334
  }
411
335
 
412
336
  /**
413
- * The parameters of the audio frame in PCM format.
337
+ * Information of external PCM format audio frame.
414
338
  */
415
339
  export class AudioPcmFrame {
416
340
  /**
417
- * The timestamp (ms) of the audio frame.
341
+ * Timestamp of the audio frame (ms).
418
342
  */
419
343
  capture_timestamp?: number;
420
344
  /**
421
- * The number of samples per channel in the audio frame.
345
+ * Number of samples per channel.
422
346
  */
423
347
  samples_per_channel_?: number;
424
348
  /**
425
- * Audio sample rate (Hz).
349
+ * Audio sampling rate (Hz).
426
350
  */
427
351
  sample_rate_hz_?: number;
428
352
  /**
429
- * The number of audio channels.
353
+ * Number of audio channels.
430
354
  */
431
355
  num_channels_?: number;
432
356
  /**
433
- * The number of bytes per sample.
357
+ * @ignore
358
+ */
359
+ audio_track_number_?: number;
360
+ /**
361
+ * Number of bytes per audio sample.
434
362
  */
435
363
  bytes_per_sample?: BytesPerSample;
436
364
  /**
437
- * The audio frame.
365
+ * Audio frame data.
438
366
  */
439
367
  data_?: number[];
440
368
  /**
@@ -444,7 +372,7 @@ export class AudioPcmFrame {
444
372
  }
445
373
 
446
374
  /**
447
- * The channel mode.
375
+ * Channel mode.
448
376
  */
449
377
  export enum AudioDualMonoMode {
450
378
  /**
@@ -452,29 +380,29 @@ export enum AudioDualMonoMode {
452
380
  */
453
381
  AudioDualMonoStereo = 0,
454
382
  /**
455
- * 1: Left channel mode. This mode replaces the audio of the right channel with the audio of the left channel, which means the user can only hear the audio of the left channel.
383
+ * 1: Left channel mode. Replaces the right channel audio with the left channel audio, so users only hear the left channel.
456
384
  */
457
385
  AudioDualMonoL = 1,
458
386
  /**
459
- * 2: Right channel mode. This mode replaces the audio of the left channel with the audio of the right channel, which means the user can only hear the audio of the right channel.
387
+ * 2: Right channel mode. Replaces the left channel audio with the right channel audio, so users only hear the right channel.
460
388
  */
461
389
  AudioDualMonoR = 2,
462
390
  /**
463
- * 3: Mixed channel mode. This mode mixes the audio of the left channel and the right channel, which means the user can hear the audio of the left channel and the right channel at the same time.
391
+ * 3: Mixed mode. Combines left and right channel audio so users hear both channels simultaneously.
464
392
  */
465
393
  AudioDualMonoMix = 3,
466
394
  }
467
395
 
468
396
  /**
469
- * The video pixel format.
397
+ * Video pixel format.
470
398
  */
471
399
  export enum VideoPixelFormat {
472
400
  /**
473
- * 0: Raw video pixel format.
401
+ * 0: Original video pixel format.
474
402
  */
475
403
  VideoPixelDefault = 0,
476
404
  /**
477
- * 1: The format is I420.
405
+ * 1: I420 format.
478
406
  */
479
407
  VideoPixelI420 = 1,
480
408
  /**
@@ -486,7 +414,7 @@ export enum VideoPixelFormat {
486
414
  */
487
415
  VideoPixelNv21 = 3,
488
416
  /**
489
- * 4: The format is RGBA.
417
+ * 4: RGBA format.
490
418
  */
491
419
  VideoPixelRgba = 4,
492
420
  /**
@@ -518,7 +446,7 @@ export enum VideoPixelFormat {
518
446
  */
519
447
  VideoCvpixelP010 = 15,
520
448
  /**
521
- * 16: The format is I422.
449
+ * 16: I422 format.
522
450
  */
523
451
  VideoPixelI422 = 16,
524
452
  /**
@@ -532,15 +460,15 @@ export enum VideoPixelFormat {
532
460
  }
533
461
 
534
462
  /**
535
- * Video display modes.
463
+ * Video display mode.
536
464
  */
537
465
  export enum RenderModeType {
538
466
  /**
539
- * 1: Hidden mode. The priority is to fill the window. Any excess video that does not match the window size will be cropped.
467
+ * 1: The video is scaled proportionally. Priority is given to filling the view. Excess video beyond the view due to size mismatch is cropped.
540
468
  */
541
469
  RenderModeHidden = 1,
542
470
  /**
543
- * 2: Fit mode. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black.
471
+ * 2: The video is scaled proportionally. Priority is given to displaying the entire video content. Black bars are added to fill the view if the video size does not match the view size.
544
472
  */
545
473
  RenderModeFit = 2,
546
474
  /**
@@ -876,11 +804,11 @@ export class Hdr10MetadataInfo {
876
804
  }
877
805
 
878
806
  /**
879
- * The relative position of alphaBuffer and video frames.
807
+ * The relative position of alphaBuffer and the video frame.
880
808
  */
881
809
  export enum AlphaStitchMode {
882
810
  /**
883
- * 0: (Default) Only video frame, that is, alphaBuffer is not stitched with the video frame.
811
+ * 0: (Default) Only the video frame is used, i.e., alphaBuffer is not stitched with the video frame.
884
812
  */
885
813
  NoAlphaStitch = 0,
886
814
  /**
@@ -916,77 +844,77 @@ export enum EglContextType {
916
844
  }
917
845
 
918
846
  /**
919
- * The video buffer type.
847
+ * Video buffer type.
920
848
  */
921
849
  export enum VideoBufferType {
922
850
  /**
923
- * 1: The video buffer in the format of raw data.
851
+ * 1: Type is raw data.
924
852
  */
925
853
  VideoBufferRawData = 1,
926
854
  /**
927
- * 2: The video buffer in the format of raw data.
855
+ * 2: Type is raw data.
928
856
  */
929
857
  VideoBufferArray = 2,
930
858
  /**
931
- * 3: The video buffer in the format of Texture.
859
+ * 3: Type is Texture.
932
860
  */
933
861
  VideoBufferTexture = 3,
934
862
  }
935
863
 
936
864
  /**
937
- * The external video frame.
865
+ * External video frame.
938
866
  */
939
867
  export class ExternalVideoFrame {
940
868
  /**
941
- * The video type. See VideoBufferType.
869
+ * Video type. See VideoBufferType.
942
870
  */
943
871
  type?: VideoBufferType;
944
872
  /**
945
- * The pixel format. See VideoPixelFormat.
873
+ * Pixel format. See VideoPixelFormat.
946
874
  */
947
875
  format?: VideoPixelFormat;
948
876
  /**
949
- * Video frame buffer.
877
+ * Video buffer.
950
878
  */
951
879
  buffer?: Uint8Array;
952
880
  /**
953
- * Line spacing of the incoming video frame, which must be in pixels instead of bytes. For textures, it is the width of the texture.
881
+ * Stride of the input video frame in pixels (not bytes). For Texture, this value refers to the width of the Texture.
954
882
  */
955
883
  stride?: number;
956
884
  /**
957
- * Height of the incoming video frame.
885
+ * Height of the input video frame.
958
886
  */
959
887
  height?: number;
960
888
  /**
961
- * Raw data related parameter. The number of pixels trimmed from the left. The default value is 0.
889
+ * This parameter applies only to raw video data.
962
890
  */
963
891
  cropLeft?: number;
964
892
  /**
965
- * Raw data related parameter. The number of pixels trimmed from the top. The default value is 0.
893
+ * This parameter applies only to raw video data.
966
894
  */
967
895
  cropTop?: number;
968
896
  /**
969
- * Raw data related parameter. The number of pixels trimmed from the right. The default value is 0.
897
+ * This parameter applies only to raw video data.
970
898
  */
971
899
  cropRight?: number;
972
900
  /**
973
- * Raw data related parameter. The number of pixels trimmed from the bottom. The default value is 0.
901
+ * This parameter applies only to raw video data.
974
902
  */
975
903
  cropBottom?: number;
976
904
  /**
977
- * Raw data related parameter. The clockwise rotation of the video frame. You can set the rotation angle as 0, 90, 180, or 270. The default value is 0.
905
+ * Field related to raw data. Specifies whether to rotate the input video group clockwise. Available values: 0, 90, 180, 270. Default is 0.
978
906
  */
979
907
  rotation?: number;
980
908
  /**
981
- * Timestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video.
909
+ * Timestamp of the input video frame in milliseconds. Incorrect timestamps may cause frame drops or audio-video desynchronization.
982
910
  */
983
911
  timestamp?: number;
984
912
  /**
985
- * This parameter only applies to video data in Texture format. Texture ID of the video frame.
913
+ * This parameter applies only to video data in Texture format. Refers to the Texture ID of the video frame.
986
914
  */
987
915
  eglType?: EglContextType;
988
916
  /**
989
- * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
917
+ * This parameter applies only to video data in Texture format. Refers to an input 4x4 transformation matrix, typically an identity matrix.
990
918
  */
991
919
  textureId?: number;
992
920
  /**
@@ -994,37 +922,38 @@ export class ExternalVideoFrame {
994
922
  */
995
923
  fenceObject?: number;
996
924
  /**
997
- * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
925
+ * This parameter applies only to video data in Texture format. Refers to an input 4x4 transformation matrix, typically an identity matrix.
998
926
  */
999
927
  matrix?: number[];
1000
928
  /**
1001
- * This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
929
+ * This parameter applies only to video data in Texture format. Refers to the metadata buffer. Default value is NULL.
1002
930
  */
1003
931
  metadataBuffer?: Uint8Array;
1004
932
  /**
1005
- * This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
933
+ * This parameter applies only to video data in Texture format. Refers to the size of the metadata. Default value is 0.
1006
934
  */
1007
935
  metadataSize?: number;
1008
936
  /**
1009
- * The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from [0,255], where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering.
937
+ * Alpha channel data output by portrait segmentation algorithm. This data matches the size of the video frame, with pixel values ranging from [0,255], where 0 indicates background and 255 indicates foreground (portrait).
938
+ * You can use this parameter to render the video background into various effects such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the input video frame and alphaBuffer are of Full Range type; other types may cause incorrect rendering of alpha data.
1010
939
  */
1011
940
  alphaBuffer?: Uint8Array;
1012
941
  /**
1013
- * This parameter only applies to video data in BGRA or RGBA format. Whether to extract the alpha channel data from the video frame and automatically fill it into alphaBuffer : true :Extract and fill the alpha channel data. false : (Default) Do not extract and fill the Alpha channel data. For video data in BGRA or RGBA format, you can set the Alpha channel data in either of the following ways:
1014
- * Automatically by setting this parameter to true.
1015
- * Manually through the alphaBuffer parameter.
942
+ * For video data in BGRA or RGBA format, you can set the alpha channel data in either of the following ways:
943
+ * Automatically fill by setting this parameter to true.
944
+ * Set via the alphaBuffer parameter. This parameter applies only to video data in BGRA or RGBA format. Specifies whether to extract the alpha channel data from the video frame and automatically fill it into alphaBuffer : true : Extract and fill alpha channel data. false : (Default) Do not extract and fill alpha channel data.
1016
945
  */
1017
946
  fillAlphaBuffer?: boolean;
1018
947
  /**
1019
- * When the video frame contains alpha channel data, it represents the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
948
+ * When the video frame contains alpha channel data, sets the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
1020
949
  */
1021
950
  alphaStitchMode?: AlphaStitchMode;
1022
951
  /**
1023
- * This parameter only applies to video data in Windows Texture format. It represents a pointer to an object of type ID3D11Texture2D, which is used by a video frame.
952
+ * This parameter applies only to video data in Windows Texture format. Refers to a pointer to an object of type ID3D11Texture2D used by the video frame.
1024
953
  */
1025
954
  d3d11Texture2d?: any;
1026
955
  /**
1027
- * This parameter only applies to video data in Windows Texture format. It represents an index of an ID3D11Texture2D texture object used by the video frame in the ID3D11Texture2D array.
956
+ * This parameter applies only to video data in Windows Texture format. Refers to the index of the ID3D11Texture2D texture object used by the video frame in the ID3D11Texture2D array.
1028
957
  */
1029
958
  textureSliceIndex?: number;
1030
959
  /**
@@ -1032,89 +961,90 @@ export class ExternalVideoFrame {
1032
961
  */
1033
962
  hdr10MetadataInfo?: Hdr10MetadataInfo;
1034
963
  /**
1035
- * By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
964
+ * Color space properties of the video frame. By default, Full Range and BT.709 standard configurations are applied. You can customize the settings based on your requirements for custom capture and rendering. See [VideoColorSpace](https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace).
1036
965
  */
1037
966
  colorSpace?: ColorSpace;
1038
967
  }
1039
968
 
1040
969
  /**
1041
- * Configurations of the video frame.
970
+ * Video frame property settings.
1042
971
  *
1043
- * Note that the buffer provides a pointer to a pointer. This interface cannot modify the pointer of the buffer, but it can modify the content of the buffer.
972
+ * The buffer is provided as a pointer to a pointer. This interface cannot modify the buffer pointer, only the buffer content.
1044
973
  */
1045
974
  export class VideoFrame {
1046
975
  /**
1047
- * The pixel format. See VideoPixelFormat.
976
+ * Pixel format. See VideoPixelFormat.
1048
977
  */
1049
978
  type?: VideoPixelFormat;
1050
979
  /**
1051
- * The width of the video, in pixels.
980
+ * Video pixel width.
1052
981
  */
1053
982
  width?: number;
1054
983
  /**
1055
- * The height of the video, in pixels.
984
+ * Video pixel height.
1056
985
  */
1057
986
  height?: number;
1058
987
  /**
1059
- * For YUV data, the line span of the Y buffer; for RGBA data, the total data length. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
988
+ * For YUV data, indicates the row stride of the Y buffer; for RGBA data, indicates the total data length. When processing video data, you need to handle the offset between rows of pixel data according to this parameter, otherwise image distortion may occur.
1060
989
  */
1061
990
  yStride?: number;
1062
991
  /**
1063
- * For YUV data, the line span of the U buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
992
+ * For YUV data, indicates the row stride of the U buffer; for RGBA data, the value is 0. When processing video data, you need to handle the offset between rows of pixel data according to this parameter, otherwise image distortion may occur.
1064
993
  */
1065
994
  uStride?: number;
1066
995
  /**
1067
- * For YUV data, the line span of the V buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
996
+ * For YUV data, indicates the row stride of the V buffer; for RGBA data, the value is 0. When processing video data, you need to handle the offset between rows of pixel data according to this parameter, otherwise image distortion may occur.
1068
997
  */
1069
998
  vStride?: number;
1070
999
  /**
1071
- * For YUV data, the pointer to the Y buffer; for RGBA data, the data buffer.
1000
+ * For YUV data, indicates the pointer to the Y buffer; for RGBA data, indicates the data buffer.
1072
1001
  */
1073
1002
  yBuffer?: Uint8Array;
1074
1003
  /**
1075
- * For YUV data, the pointer to the U buffer; for RGBA data, the value is 0.
1004
+ * For YUV data, indicates the pointer to the U buffer; for RGBA data, the value is empty.
1076
1005
  */
1077
1006
  uBuffer?: Uint8Array;
1078
1007
  /**
1079
- * For YUV data, the pointer to the V buffer; for RGBA data, the value is 0.
1008
+ * For YUV data, indicates the pointer to the V buffer; for RGBA data, the value is empty.
1080
1009
  */
1081
1010
  vBuffer?: Uint8Array;
1082
1011
  /**
1083
- * The clockwise rotation of the video frame before rendering. Supported values include 0, 90, 180, and 270 degrees.
1012
+ * Sets the clockwise rotation angle of the frame before rendering the video. Currently supports 0, 90, 180, and 270 degrees.
1084
1013
  */
1085
1014
  rotation?: number;
1086
1015
  /**
1087
- * The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. This parameter is required.
1016
+ * The Unix timestamp (in milliseconds) when the video frame is rendered. This timestamp can be used to guide video frame rendering. This parameter is required.
1088
1017
  */
1089
1018
  renderTimeMs?: number;
1090
1019
  /**
1091
- * Reserved for future use.
1020
+ * Reserved parameter.
1092
1021
  */
1093
1022
  avsync_type?: number;
1094
1023
  /**
1095
- * This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
1024
+ * This parameter applies only to video data in Texture format. Indicates the data buffer of MetaData. Default is NULL.
1096
1025
  */
1097
1026
  metadata_buffer?: Uint8Array;
1098
1027
  /**
1099
- * This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
1028
+ * This parameter applies only to video data in Texture format. Indicates the size of MetaData. Default is 0.
1100
1029
  */
1101
1030
  metadata_size?: number;
1102
1031
  /**
1103
- * This parameter only applies to video data in Texture format. Texture ID.
1032
+ * This parameter applies only to video data in Texture format. Texture ID.
1104
1033
  */
1105
1034
  textureId?: number;
1106
1035
  /**
1107
- * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
1036
+ * This parameter applies only to video data in Texture format. A 4x4 transformation matrix input, typically an identity matrix.
1108
1037
  */
1109
1038
  matrix?: number[];
1110
1039
  /**
1111
- * The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from [0,255], where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc.
1112
- * In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering.
1113
- * Make sure that alphaBuffer is exactly the same size as the video frame (width × height), otherwise it may cause the app to crash.
1040
+ * Alpha channel data output by the portrait segmentation algorithm. This data matches the size of the video frame. Each pixel value ranges from [0, 255], where 0 represents the background and 255 represents the foreground (portrait).
1041
+ * You can use this parameter to render the video background with various effects, such as transparency, solid color, image, video, etc.
1042
+ * In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of Full Range type; other types may cause abnormal Alpha data rendering.
1043
+ * Make sure that alphaBuffer matches the video frame size (width × height) exactly, otherwise the app may crash.
1114
1044
  */
1115
1045
  alphaBuffer?: Uint8Array;
1116
1046
  /**
1117
- * When the video frame contains alpha channel data, it represents the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
1047
+ * When the video frame contains Alpha channel data, sets the relative position between alphaBuffer and the video frame. See AlphaStitchMode.
1118
1048
  */
1119
1049
  alphaStitchMode?: AlphaStitchMode;
1120
1050
  /**
@@ -1122,7 +1052,7 @@ export class VideoFrame {
1122
1052
  */
1123
1053
  pixelBuffer?: Uint8Array;
1124
1054
  /**
1125
- * The meta information in the video frame. To use this parameter, contact.
1055
+ * Metadata in the video frame. This parameter requires [contacting technical support](https://www.agora.io/cn/contact/) to use.
1126
1056
  */
1127
1057
  metaInfo?: IVideoFrameMetaInfo;
1128
1058
  /**
@@ -1130,7 +1060,7 @@ export class VideoFrame {
1130
1060
  */
1131
1061
  hdr10MetadataInfo?: Hdr10MetadataInfo;
1132
1062
  /**
1133
- * By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
1063
+ * The color space property of the video frame. By default, Full Range and BT.709 standard configuration is applied. You can customize this setting based on your custom capture and rendering needs. See [VideoColorSpace](https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace).
1134
1064
  */
1135
1065
  colorSpace?: ColorSpace;
1136
1066
  }
@@ -1154,57 +1084,139 @@ export enum MediaPlayerSourceType {
1154
1084
  }
1155
1085
 
1156
1086
  /**
1157
- * The frame position of the video observer.
1087
+ * Video observation position.
1158
1088
  */
1159
1089
  export enum VideoModulePosition {
1160
1090
  /**
1161
- * 1: The location of the locally collected video data after preprocessing corresponds to the onCaptureVideoFrame callback. The observed video here has the effect of video pre-processing, which can be verified by enabling image enhancement, virtual background, or watermark.
1091
+ * 1: Position after local video capture and preprocessing, corresponding to the onCaptureVideoFrame callback. The video observed here includes video preprocessing effects, which can be verified by enabling beauty effects, virtual background, or watermark.
1162
1092
  */
1163
1093
  PositionPostCapturer = 1 << 0,
1164
1094
  /**
1165
- * 2: The pre-renderer position, which corresponds to the video data in the onRenderVideoFrame callback.
1095
+ * 2: Position before rendering of received remote video, corresponding to the onRenderVideoFrame callback.
1166
1096
  */
1167
1097
  PositionPreRenderer = 1 << 1,
1168
1098
  /**
1169
- * 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. The observed video here has the effects of video pre-processing and encoding pre-processing.
1170
- * To verify the pre-processing effects of the video, you can enable image enhancement, virtual background, or watermark.
1171
- * To verify the pre-encoding processing effect, you can set a lower frame rate (for example, 5 fps).
1099
+ * 4: Position before local video encoding, corresponding to the onPreEncodeVideoFrame callback. The video observed here includes preprocessing and pre-encoding effects:
1100
+ * For preprocessing effects, you can verify by enabling beauty effects, virtual background, or watermark.
1101
+ * For pre-encoding effects, you can verify by setting a low frame rate (e.g., 5 fps).
1172
1102
  */
1173
1103
  PositionPreEncoder = 1 << 2,
1174
1104
  /**
1175
- * 8: The position after local video capture and before pre-processing. The observed video here does not have pre-processing effects, which can be verified by enabling image enhancement, virtual background, or watermarks.
1105
+ * 8: Position after local video capture and before preprocessing. The video observed here does not include preprocessing effects, which can be verified by enabling beauty effects, virtual background, or watermark.
1176
1106
  */
1177
1107
  PositionPostCapturerOrigin = 1 << 3,
1178
1108
  }
1179
1109
 
1180
1110
  /**
1181
- * The snapshot configuration.
1111
+ * @ignore
1112
+ */
1113
+ export enum ContentInspectResult {
1114
+ /**
1115
+ * @ignore
1116
+ */
1117
+ ContentInspectNeutral = 1,
1118
+ /**
1119
+ * @ignore
1120
+ */
1121
+ ContentInspectSexy = 2,
1122
+ /**
1123
+ * @ignore
1124
+ */
1125
+ ContentInspectPorn = 3,
1126
+ }
1127
+
1128
+ /**
1129
+ * The type of video content moderation module.
1130
+ */
1131
+ export enum ContentInspectType {
1132
+ /**
1133
+ * 0: (Default) This module has no actual function. Do not set type to this value.
1134
+ */
1135
+ ContentInspectInvalid = 0,
1136
+ /**
1137
+ * @ignore
1138
+ */
1139
+ ContentInspectModeration = 1,
1140
+ /**
1141
+ * 2: Uses Agora's self-developed plugin to capture and upload screenshots. The SDK captures and uploads screenshots of the video stream.
1142
+ */
1143
+ ContentInspectSupervision = 2,
1144
+ /**
1145
+ * 3: Uses a Marketplace plugin to capture and upload screenshots. The SDK uses a Marketplace video moderation plugin to capture and upload screenshots of the video stream.
1146
+ */
1147
+ ContentInspectImageModeration = 3,
1148
+ }
1149
+
1150
+ /**
1151
+ * ContentInspectModule structure used to configure the frequency of local screenshot uploads.
1152
+ */
1153
+ export class ContentInspectModule {
1154
+ /**
1155
+ * Type of function module. See ContentInspectType.
1156
+ */
1157
+ type?: ContentInspectType;
1158
+ /**
1159
+ * Interval for local screenshot uploads in seconds. The value must be greater than 0. Default is 0, which means no screenshot upload. Recommended value is 10 seconds, but you can adjust it based on your business needs.
1160
+ */
1161
+ interval?: number;
1162
+ /**
1163
+ * Position of the video observer. See VideoModulePosition.
1164
+ */
1165
+ position?: VideoModulePosition;
1166
+ }
1167
+
1168
+ /**
1169
+ * Local screenshot upload configuration.
1170
+ */
1171
+ export class ContentInspectConfig {
1172
+ /**
1173
+ * Additional information, maximum length is 1024 bytes.
1174
+ * The SDK uploads this information along with the screenshot to the Agora server; after the screenshot is complete, the Agora server sends the additional information to your server along with the callback notification.
1175
+ */
1176
+ extraInfo?: string;
1177
+ /**
1178
+ * @ignore
1179
+ */
1180
+ serverConfig?: string;
1181
+ /**
1182
+ * Function modules. See ContentInspectModule.
1183
+ * You can configure up to 32 ContentInspectModule instances. The value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. Only one instance can be configured per function module. Currently, only screenshot upload is supported.
1184
+ */
1185
+ modules?: ContentInspectModule[];
1186
+ /**
1187
+ * Number of function modules, i.e., the number of configured ContentInspectModule instances. Must match the number of instances configured in modules. Maximum value is 32.
1188
+ */
1189
+ moduleCount?: number;
1190
+ }
1191
+
1192
+ /**
1193
+ * Video snapshot settings.
1182
1194
  */
1183
1195
  export class SnapshotConfig {
1184
1196
  /**
1185
- * The local path (including filename extensions) of the snapshot. For example:
1197
+ * Make sure the directory exists and is writable. Local path to save the snapshot, including file name and format. For example:
1186
1198
  * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
1187
- * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
1199
+ * macOS: ~/Library/Logs/example.jpg
1188
1200
  */
1189
1201
  filePath?: string;
1190
1202
  /**
1191
- * The position of the snapshot video frame in the video pipeline. See VideoModulePosition.
1203
+ * The position of the video frame in the video pipeline for the snapshot. See VideoModulePosition.
1192
1204
  */
1193
1205
  position?: VideoModulePosition;
1194
1206
  }
1195
1207
 
1196
1208
  /**
1197
- * This class is used to get raw PCM audio.
1209
+ * This class is used to obtain raw PCM audio data.
1198
1210
  *
1199
- * You can inherit this class and implement the onFrame callback to get raw PCM audio.
1211
+ * You can inherit this class and implement the onFrame callback to get PCM audio data.
1200
1212
  */
1201
1213
  export interface IAudioPcmFrameSink {
1202
1214
  /**
1203
- * Occurs each time the player receives an audio frame.
1215
+ * Callback when an audio frame is received.
1204
1216
  *
1205
- * After registering the audio frame observer, the callback occurs every time the player receives an audio frame, reporting the detailed information of the audio frame.
1217
+ * After registering the audio data observer, this callback is triggered each time an audio frame is received to report the audio frame information.
1206
1218
  *
1207
- * @param frame The audio frame information. See AudioPcmFrame.
1219
+ * @param frame Audio frame information. See AudioPcmFrame.
1208
1220
  */
1209
1221
  onFrame?(frame: AudioPcmFrame): void;
1210
1222
  }
@@ -1224,37 +1236,39 @@ export enum AudioFrameType {
1224
1236
  */
1225
1237
  export class AudioFrame {
1226
1238
  /**
1227
- * The type of the audio frame. See AudioFrameType.
1239
+ * Audio frame type. See AudioFrameType.
1228
1240
  */
1229
1241
  type?: AudioFrameType;
1230
1242
  /**
1231
- * The number of samples per channel in the audio frame.
1243
+ * Number of samples per channel.
1232
1244
  */
1233
1245
  samplesPerChannel?: number;
1234
1246
  /**
1235
- * The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).
1247
+ * Number of bytes per sample. For PCM, 16-bit (2 bytes) is typically used.
1236
1248
  */
1237
1249
  bytesPerSample?: BytesPerSample;
1238
1250
  /**
1239
- * The number of audio channels (the data are interleaved if it is stereo).
1240
- * 1: Mono.
1241
- * 2: Stereo.
1251
+ * Number of channels (if stereo, the data is interleaved).
1252
+ * 1: Mono
1253
+ * 2: Stereo
1242
1254
  */
1243
1255
  channels?: number;
1244
1256
  /**
1245
- * The number of samples per channel in the audio frame.
1257
+ * Number of samples per second per channel.
1246
1258
  */
1247
1259
  samplesPerSec?: number;
1248
1260
  /**
1249
- * The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved. The size of the data buffer is as follows: buffer = samples × channels × bytesPerSample.
1261
+ * Audio data buffer (if stereo, the data is interleaved).
1262
+ * Buffer data size buffer = samples × channels × bytesPerSample.
1250
1263
  */
1251
1264
  buffer?: Uint8Array;
1252
1265
  /**
1253
- * The timestamp (ms) of the external audio frame. You can use this timestamp to restore the order of the captured audio frame, and synchronize audio and video frames in video scenarios, including scenarios where external video sources are used.
1266
+ * Render timestamp of the external audio frame.
1267
+ * You can use this timestamp to restore the order of audio frames; in scenarios with video (including those using external video sources), this parameter can be used to achieve audio-video synchronization.
1254
1268
  */
1255
1269
  renderTimeMs?: number;
1256
1270
  /**
1257
- * Reserved for future use.
1271
+ * Reserved parameter.
1258
1272
  */
1259
1273
  avsync_type?: number;
1260
1274
  /**
@@ -1304,44 +1318,47 @@ export enum AudioFramePosition {
1304
1318
  /**
1305
1319
  * Audio data format.
1306
1320
  *
1307
- * The SDK sets the audio data format in the following callbacks according to AudioParams. onRecordAudioFrame onPlaybackAudioFrame onMixedAudioFrame
1308
- * The SDK calculates the sampling interval through the samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks according to the sampling interval. Sample interval (sec) = samplePerCall /(sampleRate × channel).
1309
- * Ensure that the sample interval 0.01 (s).
1321
+ * The SDK sets the audio data format in the following callbacks based on AudioParams : onRecordAudioFrame onPlaybackAudioFrame onMixedAudioFrame
1322
+ * The SDK calculates the sampling interval using the samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks based on that interval.
1323
+ * Sampling interval = samplesPerCall / (sampleRate × channel).
1324
+ * Ensure the sampling interval is not less than 0.01 (s).
1310
1325
  */
1311
1326
  export class AudioParams {
1312
1327
  /**
1313
- * The audio sample rate (Hz), which can be set as one of the following values:
1314
- * 8000.
1315
- * (Default) 16000.
1316
- * 32000.
1328
+ * Sampling rate of the data in Hz. Supported values:
1329
+ * 8000
1330
+ * 16000 (default)
1331
+ * 32000
1317
1332
  * 44100
1318
1333
  * 48000
1319
1334
  */
1320
1335
  sample_rate?: number;
1321
1336
  /**
1322
- * The number of audio channels, which can be set as either of the following values:
1323
- * 1: (Default) Mono.
1324
- * 2: Stereo.
1337
+ * Number of audio channels. Supported values:
1338
+ * 1: Mono (default)
1339
+ * 2: Stereo
1325
1340
  */
1326
1341
  channels?: number;
1327
1342
  /**
1328
- * The use mode of the audio data. See RawAudioFrameOpModeType.
1343
+ * Usage mode of the data. See RawAudioFrameOpModeType.
1329
1344
  */
1330
1345
  mode?: RawAudioFrameOpModeType;
1331
1346
  /**
1332
- * The number of samples, such as 1024 for the media push.
1347
+ * Number of samples per call, typically 1024 in scenarios like media push.
1333
1348
  */
1334
1349
  samples_per_call?: number;
1335
1350
  }
1336
1351
 
1337
1352
  /**
1338
- * The audio frame observer.
1353
+ * Audio frame observer.
1354
+ *
1355
+ * You can call registerAudioFrameObserver to register or unregister the IAudioFrameObserverBase audio observer.
1339
1356
  */
1340
1357
  export interface IAudioFrameObserverBase {
1341
1358
  /**
1342
- * Gets the captured audio frame.
1359
+ * Receives the raw audio data for recording.
1343
1360
  *
1344
- * To ensure that the data format of captured audio frame is as expected, Agora recommends that you set the audio data format as follows: After calling setRecordingAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object, the SDK will calculate the sampling interval according to the parameters set in this method, and triggers the onRecordAudioFrame callback according to the sampling interval.
1361
+ * To ensure the recorded audio data format meets expectations, you can set the format as follows: Call setRecordingAudioFrameParameters to set the audio format, then call registerAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters in this method and triggers the onRecordAudioFrame callback accordingly.
1345
1362
  *
1346
1363
  * @param channelId The channel ID.
1347
1364
  * @param audioFrame The raw audio data. See AudioFrame.
@@ -1349,9 +1366,9 @@ export interface IAudioFrameObserverBase {
1349
1366
  onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1350
1367
 
1351
1368
  /**
1352
- * Gets the raw audio frame for playback.
1369
+ * Receives the raw audio data for playback.
1353
1370
  *
1354
- * To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.
1371
+ * To ensure the playback audio data format meets expectations, you can set the format as follows: Call setPlaybackAudioFrameParameters to set the audio format, then call registerAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters in this method and triggers the onPlaybackAudioFrame callback accordingly.
1355
1372
  *
1356
1373
  * @param channelId The channel ID.
1357
1374
  * @param audioFrame The raw audio data. See AudioFrame.
@@ -1359,19 +1376,19 @@ export interface IAudioFrameObserverBase {
1359
1376
  onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1360
1377
 
1361
1378
  /**
1362
- * Retrieves the mixed captured and playback audio frame.
1379
+ * Retrieves the audio data after mixing the captured and playback audio.
1363
1380
  *
1364
- * To ensure that the data format of mixed captured and playback audio frame meets the expectations, Agora recommends that you set the data format as follows: After calling setMixedAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onMixedAudioFrame callback according to the sampling interval.
1381
+ * To ensure that the format of the mixed audio data from capture and playback meets expectations, you can set the audio data format using the following method: After calling setMixedAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object. The SDK calculates the sampling interval based on the parameters in this method and triggers the onMixedAudioFrame callback accordingly.
1365
1382
  *
1366
- * @param channelId The channel ID.
1367
- * @param audioFrame The raw audio data. See AudioFrame.
1383
+ * @param channelId Channel ID.
1384
+ * @param audioFrame Raw audio data. See AudioFrame.
1368
1385
  */
1369
1386
  onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1370
1387
 
1371
1388
  /**
1372
- * Gets the in-ear monitoring audio frame.
1389
+ * Receives the raw audio data for ear monitoring.
1373
1390
  *
1374
- * In order to ensure that the obtained in-ear audio data meets the expectations, Agora recommends that you set the in-ear monitoring-ear audio data format as follows: After calling setEarMonitoringAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
1391
+ * To ensure the ear monitoring audio data format meets expectations, you can set it as follows: Call setEarMonitoringAudioFrameParameters to set the audio format, then call registerAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters in this method and triggers the onEarMonitoringAudioFrame callback accordingly.
1375
1392
  *
1376
1393
  * @param audioFrame The raw audio data. See AudioFrame.
1377
1394
  */
@@ -1379,16 +1396,18 @@ export interface IAudioFrameObserverBase {
1379
1396
  }
1380
1397
 
1381
1398
  /**
1382
- * The audio frame observer.
1399
+ * Audio frame observer.
1400
+ *
1401
+ * You can call registerAudioFrameObserver to register or unregister the IAudioFrameObserver.
1383
1402
  */
1384
1403
  export interface IAudioFrameObserver extends IAudioFrameObserverBase {
1385
1404
  /**
1386
- * Retrieves the audio frame before mixing of subscribed remote users.
1405
+ * Receives the audio of subscribed remote users before mixing.
1387
1406
  *
1388
1407
  * Due to framework limitations, this callback does not support sending processed audio data back to the SDK.
1389
1408
  *
1390
1409
  * @param channelId The channel ID.
1391
- * @param uid The ID of subscribed remote users.
1410
+ * @param uid The ID of the subscribed remote user.
1392
1411
  * @param audioFrame The raw audio data. See AudioFrame.
1393
1412
  */
1394
1413
  onPlaybackAudioFrameBeforeMixing?(
@@ -1399,52 +1418,52 @@ export interface IAudioFrameObserver extends IAudioFrameObserverBase {
1399
1418
  }
1400
1419
 
1401
1420
  /**
1402
- * The audio spectrum data.
1421
+ * Audio spectrum data.
1403
1422
  */
1404
1423
  export class AudioSpectrumData {
1405
1424
  /**
1406
- * The audio spectrum data. Agora divides the audio frequency into 256 frequency domains, and reports the energy value of each frequency domain through this parameter. The value range of each energy type is [-300, 1] and the unit is dBFS.
1425
+ * Audio spectrum data. The SDK divides the sound frequency into 256 bands and reports the energy value of each band through this parameter. Each energy value ranges from [-300, 1], in dBFS.
1407
1426
  */
1408
1427
  audioSpectrumData?: number[];
1409
1428
  /**
1410
- * The audio spectrum data length is 256.
1429
+ * The length of the audio spectrum data is 256.
1411
1430
  */
1412
1431
  dataLength?: number;
1413
1432
  }
1414
1433
 
1415
1434
  /**
1416
- * Audio spectrum information of the remote user.
1435
+ * Audio spectrum information of a remote user.
1417
1436
  */
1418
1437
  export class UserAudioSpectrumInfo {
1419
1438
  /**
1420
- * The user ID of the remote user.
1439
+ * Remote user ID.
1421
1440
  */
1422
1441
  uid?: number;
1423
1442
  /**
1424
- * Audio spectrum information of the remote user. See AudioSpectrumData.
1443
+ * Audio spectrum data of the remote user. See AudioSpectrumData.
1425
1444
  */
1426
1445
  spectrumData?: AudioSpectrumData;
1427
1446
  }
1428
1447
 
1429
1448
  /**
1430
- * The audio spectrum observer.
1449
+ * Audio spectrum observer.
1431
1450
  */
1432
1451
  export interface IAudioSpectrumObserver {
1433
1452
  /**
1434
- * Gets the statistics of a local audio spectrum.
1453
+ * Gets the local audio spectrum.
1435
1454
  *
1436
- * After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback as the time interval you set to report the received remote audio data spectrum before encoding.
1455
+ * After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback at the interval you set to report the spectrum of local audio data before encoding.
1437
1456
  *
1438
- * @param data The audio spectrum data of the local user. See AudioSpectrumData.
1457
+ * @param data The local user's audio spectrum data. See AudioSpectrumData.
1439
1458
  */
1440
1459
  onLocalAudioSpectrum?(data: AudioSpectrumData): void;
1441
1460
 
1442
1461
  /**
1443
1462
  * Gets the remote audio spectrum.
1444
1463
  *
1445
- * After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in the IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
1464
+ * After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback at the interval you set to report the spectrum of received remote audio data.
1446
1465
  *
1447
- * @param spectrums The audio spectrum information of the remote user. See UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected.
1466
+ * @param spectrums The audio spectrum information of remote users. See UserAudioSpectrumInfo. The number of elements in the array equals the number of remote users monitored by the SDK. An empty array indicates no remote user audio spectrum is detected.
1448
1467
  * @param spectrumNumber The number of remote users.
1449
1468
  */
1450
1469
  onRemoteAudioSpectrum?(
@@ -1454,18 +1473,19 @@ export interface IAudioSpectrumObserver {
1454
1473
  }
1455
1474
 
1456
1475
  /**
1457
- * Receives encoded video images.
1476
+ * Class used to receive encoded video frames.
1458
1477
  */
1459
1478
  export interface IVideoEncodedFrameObserver {
1460
1479
  /**
1461
- * Reports that the receiver has received the to-be-decoded video frame sent by the remote end.
1480
+ * Reports that a remote encoded video frame has been received.
1462
1481
  *
1463
- * If you call the setRemoteVideoSubscriptionOptions method and set encodedFrameOnly to true, the SDK triggers this callback locally to report the received encoded video frame information.
1482
+ * When you call setRemoteVideoSubscriptionOptions and set encodedFrameOnly to true, the SDK triggers this callback locally to report the received encoded video frame information.
1464
1483
  *
1465
- * @param uid The user ID of the remote user.
1466
- * @param imageBuffer The encoded video image buffer.
1467
- * @param length The data length of the video image.
1468
- * @param videoEncodedFrameInfo For the information of the encoded video frame, see EncodedVideoFrameInfo.
1484
+ * @param channelId Channel name.
1485
+ * @param uid Remote user ID.
1486
+ * @param imageBuffer Video image buffer.
1487
+ * @param length Length of the video image data.
1488
+ * @param videoEncodedFrameInfo Encoded video frame information. See EncodedVideoFrameInfo.
1469
1489
  */
1470
1490
  onEncodedVideoFrameReceived?(
1471
1491
  uid: number,
@@ -1476,30 +1496,38 @@ export interface IVideoEncodedFrameObserver {
1476
1496
  }
1477
1497
 
1478
1498
  /**
1479
- * The process mode of the video frame:
1499
+ * Video frame processing mode.
1480
1500
  */
1481
1501
  export enum VideoFrameProcessMode {
1482
1502
  /**
1483
- * Read-only mode. In this mode, you do not modify the video frame. The video frame observer is a renderer.
1503
+ * Read-only mode.
1504
+ * In read-only mode, you do not modify the video frame. The video observer acts as a renderer.
1484
1505
  */
1485
1506
  ProcessModeReadOnly = 0,
1486
1507
  /**
1487
- * Read and write mode. In this mode, you modify the video frame. The video frame observer is a video filter.
1508
+ * Read-write mode.
1509
+ * In read-write mode, you modify the video frame. The video observer acts as a video filter.
1488
1510
  */
1489
1511
  ProcessModeReadWrite = 1,
1490
1512
  }
1491
1513
 
1492
1514
  /**
1493
- * The IVideoFrameObserver class.
1515
+ * Video frame observer.
1516
+ *
1517
+ * You can call registerVideoFrameObserver to register or unregister the IVideoFrameObserver video observer.
1494
1518
  */
1495
1519
  export interface IVideoFrameObserver {
1496
1520
  /**
1497
- * Occurs each time the SDK receives a video frame captured by local devices.
1521
+ * Gets the video data captured by the local device.
1498
1522
  *
1499
- * You can get raw video data collected by the local device through this callback.
1523
+ * You can get the raw video data captured by the local device in this callback.
1524
+ * If the video data format you receive is RGBA, the SDK does not support processing the Alpha channel.
1525
+ * When modifying parameters in videoFrame, ensure they match the actual video frame data in the buffer. Otherwise, unexpected rotation or distortion may occur in the local preview or remote video.
1526
+ * It is recommended to implement this callback using the C++ API.
1527
+ * Due to framework limitations, this callback does not support sending the processed video data back to the SDK.
1500
1528
  *
1501
- * @param sourceType Video source types, including cameras, screens, or media player. See VideoSourceType.
1502
- * @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
1529
+ * @param sourceType Type of video source, which may include camera, screen, or media player. See VideoSourceType.
1530
+ * @param videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is:
1503
1531
  * macOS: I420
1504
1532
  * Windows: YUV420
1505
1533
  */
@@ -1509,16 +1537,17 @@ export interface IVideoFrameObserver {
1509
1537
  ): void;
1510
1538
 
1511
1539
  /**
1512
- * Occurs each time the SDK receives a video frame before encoding.
1540
+ * Gets the video data before local encoding.
1513
1541
  *
1514
- * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios. After processing, you can send the processed video data back to the SDK in this callback.
1515
- * It is recommended that you ensure the modified parameters in videoFrame are consistent with the actual situation of the video frames in the video frame buffer. Otherwise, it may cause unexpected rotation, distortion, and other issues in the local preview and remote video display.
1516
- * It's recommended that you implement this callback through the C++ API.
1517
- * Due to framework limitations, this callback does not support sending processed video data back to the SDK.
1518
- * The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
1542
+ * After successfully registering the video data observer, the SDK triggers this callback when each video frame is captured. You can get the video data before encoding and process it as needed.
1543
+ * After processing, you can pass the processed video data back to the SDK in this callback.
1544
+ * It is recommended to implement this callback using the C++ API.
1545
+ * Due to framework limitations, this callback does not support sending the processed video data back to the SDK.
1546
+ * The video data obtained here has already been pre-processed, such as cropping, rotation, beautification, etc.
1547
+ * When modifying parameters in videoFrame, ensure they match the actual video frame data in the buffer. Otherwise, unexpected rotation or distortion may occur in the local preview or remote video.
1519
1548
  *
1520
- * @param sourceType The type of the video source. See VideoSourceType.
1521
- * @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
1549
+ * @param sourceType Type of video source. See VideoSourceType.
1550
+ * @param videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is:
1522
1551
  * macOS: I420
1523
1552
  * Windows: YUV420
1524
1553
  */
@@ -1533,17 +1562,17 @@ export interface IVideoFrameObserver {
1533
1562
  onMediaPlayerVideoFrame?(videoFrame: VideoFrame, mediaPlayerId: number): void;
1534
1563
 
1535
1564
  /**
1536
- * Occurs each time the SDK receives a video frame sent by the remote user.
1565
+ * Gets the video data sent by the remote user.
1537
1566
  *
1538
- * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data sent from the remote end before rendering, and then process it according to the particular scenarios.
1539
- * It is recommended that you ensure the modified parameters in videoFrame are consistent with the actual situation of the video frames in the video frame buffer. Otherwise, it may cause unexpected rotation, distortion, and other issues in the local preview and remote video display.
1540
- * If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
1541
- * It's recommended that you implement this callback through the C++ API.
1542
- * Due to framework limitations, this callback does not support sending processed video data back to the SDK.
1567
+ * After successfully registering the video data observer, the SDK triggers this callback when each video frame is captured. You can get the video data sent by the remote user before rendering and process it as needed.
1568
+ * If the video data format you receive is RGBA, the SDK does not support processing the Alpha channel.
1569
+ * It is recommended to implement this callback using the C++ API.
1570
+ * Due to framework limitations, this callback does not support sending the processed video data back to the SDK.
1571
+ * When modifying parameters in videoFrame, ensure they match the actual video frame data in the buffer. Otherwise, unexpected rotation or distortion may occur in the local preview or remote video.
1543
1572
  *
1544
- * @param channelId The channel ID.
1545
- * @param remoteUid The user ID of the remote user who sends the current video frame.
1546
- * @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
1573
+ * @param channelId Channel ID.
1574
+ * @param remoteUid The user ID of the remote user who sent the video frame.
1575
+ * @param videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is:
1547
1576
  * macOS: I420
1548
1577
  * Windows: YUV420
1549
1578
  */
@@ -1560,15 +1589,15 @@ export interface IVideoFrameObserver {
1560
1589
  }
1561
1590
 
1562
1591
  /**
1563
- * The external video frame encoding type.
1592
+ * Encoding type of external video frames.
1564
1593
  */
1565
1594
  export enum ExternalVideoSourceType {
1566
1595
  /**
1567
- * 0: The video frame is not encoded.
1596
+ * 0: Unencoded video frame.
1568
1597
  */
1569
1598
  VideoFrame = 0,
1570
1599
  /**
1571
- * 1: The video frame is encoded.
1600
+ * 1: Encoded video frame.
1572
1601
  */
1573
1602
  EncodedVideoFrame = 1,
1574
1603
  }
@@ -1584,47 +1613,47 @@ export enum MediaRecorderContainerFormat {
1584
1613
  }
1585
1614
 
1586
1615
  /**
1587
- * The recording content.
1616
+ * @ignore
1588
1617
  */
1589
1618
  export enum MediaRecorderStreamType {
1590
1619
  /**
1591
- * Only audio.
1620
+ * @ignore
1592
1621
  */
1593
1622
  StreamTypeAudio = 0x01,
1594
1623
  /**
1595
- * Only video.
1624
+ * @ignore
1596
1625
  */
1597
1626
  StreamTypeVideo = 0x02,
1598
1627
  /**
1599
- * (Default) Audio and video.
1628
+ * @ignore
1600
1629
  */
1601
1630
  StreamTypeBoth = 0x01 | 0x02,
1602
1631
  }
1603
1632
 
1604
1633
  /**
1605
- * The current recording state.
1634
+ * Current recording state.
1606
1635
  */
1607
1636
  export enum RecorderState {
1608
1637
  /**
1609
- * -1: An error occurs during the recording. See RecorderReasonCode for the reason.
1638
+ * -1: Audio/video stream recording error. See RecorderReasonCode for details.
1610
1639
  */
1611
1640
  RecorderStateError = -1,
1612
1641
  /**
1613
- * 2: The audio and video recording starts.
1642
+ * 2: Audio/video stream recording started.
1614
1643
  */
1615
1644
  RecorderStateStart = 2,
1616
1645
  /**
1617
- * 3: The audio and video recording stops.
1646
+ * 3: Audio/video stream recording stopped.
1618
1647
  */
1619
1648
  RecorderStateStop = 3,
1620
1649
  }
1621
1650
 
1622
1651
  /**
1623
- * The reason for the state change.
1652
+ * Reason for recording state error.
1624
1653
  */
1625
1654
  export enum RecorderReasonCode {
1626
1655
  /**
1627
- * 0: No error.
1656
+ * 0: Everything is normal.
1628
1657
  */
1629
1658
  RecorderReasonNone = 0,
1630
1659
  /**
@@ -1696,27 +1725,25 @@ export class MediaRecorderConfiguration {
1696
1725
  }
1697
1726
 
1698
1727
  /**
1699
- * Facial information observer.
1728
+ * Face information observer.
1700
1729
  *
1701
- * You can call registerFaceInfoObserver to register one IFaceInfoObserver observer.
1730
+ * You can call registerFaceInfoObserver to register the IFaceInfoObserver observer.
1702
1731
  */
1703
1732
  export interface IFaceInfoObserver {
1704
1733
  /**
1705
- * Occurs when the facial information processed by speech driven extension is received.
1734
+ * Reports face information processed by the voice driver plugin.
1706
1735
  *
1707
- * @param outFaceInfo Output parameter, the JSON string of the facial information processed by the voice driver plugin, including the following fields:
1708
- * faces: Object sequence. The collection of facial information, with each face corresponding to an object.
1709
- * blendshapes: Object. The collection of face capture coefficients, named according to ARkit standards, with each key-value pair representing a blendshape coefficient. The blendshape coefficient is a floating point number with a range of [0.0, 1.0].
1710
- * rotation: Object sequence. The rotation of the head, which includes the following three key-value pairs, with values as floating point numbers ranging from -180.0 to 180.0:
1711
- * pitch: Head pitch angle. A positve value means looking down, while a negative value means looking up.
1712
- * yaw: Head yaw angle. A positve value means turning left, while a negative value means turning right.
1713
- * roll: Head roll angle. A positve value means tilting to the right, while a negative value means tilting to the left.
1714
- * timestamp: String. The timestamp of the output result, in milliseconds. Here is an example of JSON:
1715
- * { "faces":[{ "blendshapes":{ "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0, "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0, "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0, "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0, "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0, "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0, "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0, "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0, "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0, "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0, "tongueOut":0.0 }, "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5},
1716
- * }], "timestamp":"654879876546" }
1736
+ * @param outFaceInfo Output parameter. A JSON string of the face information processed by the voice driver plugin, containing the following fields:
1737
+ * faces: An array of objects. Each object contains information about a detected face.
1738
+ * blendshapes: Object. A set of blendshape coefficients named according to the ARKit standard. Each key-value pair represents a blendshape coefficient. The coefficient is a float in the range [0.0, 1.0].
1739
+ * rotation: An array of objects. Head rotation values, including the following key-value pairs with float values in the range [-180.0, 180.0]:
1740
+ * pitch: Head pitch angle. Positive when looking down, negative when looking up.
1741
+ * yaw: Head yaw angle. Positive when turning left, negative when turning right.
1742
+ * roll: Head roll angle. Positive when tilting right, negative when tilting left.
1743
+ * timestamp: String. The timestamp of the output result in milliseconds. Example JSON: { "faces":[{ "blendshapes":{ "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0, "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0, "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0, "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0, "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0, "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0, "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0, "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0, "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0, "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0, "tongueOut":0.0 }, "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5}, }], "timestamp":"654879876546" }
1717
1744
  *
1718
1745
  * @returns
1719
- * true : Facial information JSON parsing successful. false : Facial information JSON parsing failed.
1746
+ * true : Successfully parsed the face information JSON. false : Failed to parse the face information JSON.
1720
1747
  */
1721
1748
  onFaceInfo?(outFaceInfo: string): void;
1722
1749
  }