react-native-shengwang 4.6.2-rc.2

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 (622) hide show
  1. package/CHANGELOG.md +755 -0
  2. package/LICENSE +20 -0
  3. package/README.md +162 -0
  4. package/android/build.gradle +180 -0
  5. package/android/consumer-rules.pro +5 -0
  6. package/android/gradle.properties +5 -0
  7. package/android/src/main/AndroidManifest.xml +11 -0
  8. package/android/src/main/AndroidManifestNew.xml +9 -0
  9. package/android/src/main/java/io/agora/rtc/ng/react/AgoraPIPActivity.java +107 -0
  10. package/android/src/main/java/io/agora/rtc/ng/react/AgoraRtcNgModule.java +278 -0
  11. package/android/src/main/java/io/agora/rtc/ng/react/AgoraRtcNgPackage.java +61 -0
  12. package/android/src/main/java/io/agora/rtc/ng/react/AgoraRtcSurfaceViewManager.java +60 -0
  13. package/android/src/main/java/io/agora/rtc/ng/react/AgoraRtcTextureViewManager.java +45 -0
  14. package/android/src/newarch/io/agora/rtc/ng/react/AgoraRtcNgSpec.java +9 -0
  15. package/android/src/newarch/io/agora/rtc/ng/react/AgoraRtcSurfaceViewManagerSpec.java +25 -0
  16. package/android/src/newarch/io/agora/rtc/ng/react/AgoraRtcTextureViewManagerSpec.java +25 -0
  17. package/android/src/oldarch/io/agora/rtc/ng/react/AgoraRtcNgSpec.java +40 -0
  18. package/android/src/oldarch/io/agora/rtc/ng/react/AgoraRtcSurfaceViewManagerSpec.java +16 -0
  19. package/android/src/oldarch/io/agora/rtc/ng/react/AgoraRtcTextureViewManagerSpec.java +12 -0
  20. package/ios/AgoraRtcNg.h +20 -0
  21. package/ios/AgoraRtcNg.mm +475 -0
  22. package/ios/AgoraRtcNg.xcodeproj/project.pbxproj +278 -0
  23. package/ios/AgoraRtcSurfaceView.h +17 -0
  24. package/ios/AgoraRtcSurfaceView.mm +95 -0
  25. package/ios/AgoraRtcSurfaceViewManager.mm +41 -0
  26. package/lib/commonjs/AgoraBase.js +4298 -0
  27. package/lib/commonjs/AgoraBase.js.map +1 -0
  28. package/lib/commonjs/AgoraMediaBase.js +1057 -0
  29. package/lib/commonjs/AgoraMediaBase.js.map +1 -0
  30. package/lib/commonjs/AgoraMediaPlayerTypes.js +323 -0
  31. package/lib/commonjs/AgoraMediaPlayerTypes.js.map +1 -0
  32. package/lib/commonjs/AgoraRtcRenderView.js +55 -0
  33. package/lib/commonjs/AgoraRtcRenderView.js.map +1 -0
  34. package/lib/commonjs/IAgoraH265Transcoder.js +40 -0
  35. package/lib/commonjs/IAgoraH265Transcoder.js.map +1 -0
  36. package/lib/commonjs/IAgoraLog.js +81 -0
  37. package/lib/commonjs/IAgoraLog.js.map +1 -0
  38. package/lib/commonjs/IAgoraMediaEngine.js +35 -0
  39. package/lib/commonjs/IAgoraMediaEngine.js.map +1 -0
  40. package/lib/commonjs/IAgoraMediaPlayer.js +25 -0
  41. package/lib/commonjs/IAgoraMediaPlayer.js.map +1 -0
  42. package/lib/commonjs/IAgoraMediaPlayerSource.js +4 -0
  43. package/lib/commonjs/IAgoraMediaPlayerSource.js.map +1 -0
  44. package/lib/commonjs/IAgoraMediaRecorder.js +13 -0
  45. package/lib/commonjs/IAgoraMediaRecorder.js.map +1 -0
  46. package/lib/commonjs/IAgoraMediaStreamingSource.js +77 -0
  47. package/lib/commonjs/IAgoraMediaStreamingSource.js.map +1 -0
  48. package/lib/commonjs/IAgoraMusicContentCenter.js +166 -0
  49. package/lib/commonjs/IAgoraMusicContentCenter.js.map +1 -0
  50. package/lib/commonjs/IAgoraPip.js +55 -0
  51. package/lib/commonjs/IAgoraPip.js.map +1 -0
  52. package/lib/commonjs/IAgoraRhythmPlayer.js +65 -0
  53. package/lib/commonjs/IAgoraRhythmPlayer.js.map +1 -0
  54. package/lib/commonjs/IAgoraRtcEngine.js +1056 -0
  55. package/lib/commonjs/IAgoraRtcEngine.js.map +1 -0
  56. package/lib/commonjs/IAgoraRtcEngineEx.js +22 -0
  57. package/lib/commonjs/IAgoraRtcEngineEx.js.map +1 -0
  58. package/lib/commonjs/IAgoraSpatialAudio.js +27 -0
  59. package/lib/commonjs/IAgoraSpatialAudio.js.map +1 -0
  60. package/lib/commonjs/IAudioDeviceManager.js +23 -0
  61. package/lib/commonjs/IAudioDeviceManager.js.map +1 -0
  62. package/lib/commonjs/Utils.js +44 -0
  63. package/lib/commonjs/Utils.js.map +1 -0
  64. package/lib/commonjs/extension/AgoraBaseExtension.js +6 -0
  65. package/lib/commonjs/extension/AgoraBaseExtension.js.map +1 -0
  66. package/lib/commonjs/extension/AgoraMediaBaseExtension.js +6 -0
  67. package/lib/commonjs/extension/AgoraMediaBaseExtension.js.map +1 -0
  68. package/lib/commonjs/extension/AgoraMediaPlayerTypesExtension.js +6 -0
  69. package/lib/commonjs/extension/AgoraMediaPlayerTypesExtension.js.map +1 -0
  70. package/lib/commonjs/extension/IAgoraH265TranscoderExtension.js +6 -0
  71. package/lib/commonjs/extension/IAgoraH265TranscoderExtension.js.map +1 -0
  72. package/lib/commonjs/extension/IAgoraLogExtension.js +6 -0
  73. package/lib/commonjs/extension/IAgoraLogExtension.js.map +1 -0
  74. package/lib/commonjs/extension/IAgoraMediaEngineExtension.js +6 -0
  75. package/lib/commonjs/extension/IAgoraMediaEngineExtension.js.map +1 -0
  76. package/lib/commonjs/extension/IAgoraMediaPlayerExtension.js +6 -0
  77. package/lib/commonjs/extension/IAgoraMediaPlayerExtension.js.map +1 -0
  78. package/lib/commonjs/extension/IAgoraMediaPlayerSourceExtension.js +6 -0
  79. package/lib/commonjs/extension/IAgoraMediaPlayerSourceExtension.js.map +1 -0
  80. package/lib/commonjs/extension/IAgoraMediaRecorderExtension.js +6 -0
  81. package/lib/commonjs/extension/IAgoraMediaRecorderExtension.js.map +1 -0
  82. package/lib/commonjs/extension/IAgoraMusicContentCenterExtension.js +6 -0
  83. package/lib/commonjs/extension/IAgoraMusicContentCenterExtension.js.map +1 -0
  84. package/lib/commonjs/extension/IAgoraPipExtension.js +6 -0
  85. package/lib/commonjs/extension/IAgoraPipExtension.js.map +1 -0
  86. package/lib/commonjs/extension/IAgoraRhythmPlayerExtension.js +6 -0
  87. package/lib/commonjs/extension/IAgoraRhythmPlayerExtension.js.map +1 -0
  88. package/lib/commonjs/extension/IAgoraRtcEngineExExtension.js +6 -0
  89. package/lib/commonjs/extension/IAgoraRtcEngineExExtension.js.map +1 -0
  90. package/lib/commonjs/extension/IAgoraRtcEngineExtension.js +6 -0
  91. package/lib/commonjs/extension/IAgoraRtcEngineExtension.js.map +1 -0
  92. package/lib/commonjs/extension/IAgoraSpatialAudioExtension.js +6 -0
  93. package/lib/commonjs/extension/IAgoraSpatialAudioExtension.js.map +1 -0
  94. package/lib/commonjs/extension/IAudioDeviceManagerExtension.js +6 -0
  95. package/lib/commonjs/extension/IAudioDeviceManagerExtension.js.map +1 -0
  96. package/lib/commonjs/impl/AgoraBaseImpl.js +26 -0
  97. package/lib/commonjs/impl/AgoraBaseImpl.js.map +1 -0
  98. package/lib/commonjs/impl/AgoraMediaBaseImpl.js +153 -0
  99. package/lib/commonjs/impl/AgoraMediaBaseImpl.js.map +1 -0
  100. package/lib/commonjs/impl/IAgoraH265TranscoderImpl.js +121 -0
  101. package/lib/commonjs/impl/IAgoraH265TranscoderImpl.js.map +1 -0
  102. package/lib/commonjs/impl/IAgoraMediaEngineImpl.js +341 -0
  103. package/lib/commonjs/impl/IAgoraMediaEngineImpl.js.map +1 -0
  104. package/lib/commonjs/impl/IAgoraMediaPlayerImpl.js +965 -0
  105. package/lib/commonjs/impl/IAgoraMediaPlayerImpl.js.map +1 -0
  106. package/lib/commonjs/impl/IAgoraMediaPlayerSourceImpl.js +76 -0
  107. package/lib/commonjs/impl/IAgoraMediaPlayerSourceImpl.js.map +1 -0
  108. package/lib/commonjs/impl/IAgoraMediaRecorderImpl.js +51 -0
  109. package/lib/commonjs/impl/IAgoraMediaRecorderImpl.js.map +1 -0
  110. package/lib/commonjs/impl/IAgoraMusicContentCenterImpl.js +429 -0
  111. package/lib/commonjs/impl/IAgoraMusicContentCenterImpl.js.map +1 -0
  112. package/lib/commonjs/impl/IAgoraRtcEngineExImpl.js +1182 -0
  113. package/lib/commonjs/impl/IAgoraRtcEngineExImpl.js.map +1 -0
  114. package/lib/commonjs/impl/IAgoraRtcEngineImpl.js +5435 -0
  115. package/lib/commonjs/impl/IAgoraRtcEngineImpl.js.map +1 -0
  116. package/lib/commonjs/impl/IAgoraSpatialAudioImpl.js +362 -0
  117. package/lib/commonjs/impl/IAgoraSpatialAudioImpl.js.map +1 -0
  118. package/lib/commonjs/impl/IAudioDeviceManagerImpl.js +379 -0
  119. package/lib/commonjs/impl/IAudioDeviceManagerImpl.js.map +1 -0
  120. package/lib/commonjs/index.js +255 -0
  121. package/lib/commonjs/index.js.map +1 -0
  122. package/lib/commonjs/internal/AgoraH265TranscoderInternal.js +66 -0
  123. package/lib/commonjs/internal/AgoraH265TranscoderInternal.js.map +1 -0
  124. package/lib/commonjs/internal/AgoraMediaBaseInternal.js +20 -0
  125. package/lib/commonjs/internal/AgoraMediaBaseInternal.js.map +1 -0
  126. package/lib/commonjs/internal/AgoraPipInternal.js +101 -0
  127. package/lib/commonjs/internal/AgoraPipInternal.js.map +1 -0
  128. package/lib/commonjs/internal/IAgoraRtcRenderView.js +72 -0
  129. package/lib/commonjs/internal/IAgoraRtcRenderView.js.map +1 -0
  130. package/lib/commonjs/internal/IrisApiEngine.js +259 -0
  131. package/lib/commonjs/internal/IrisApiEngine.js.map +1 -0
  132. package/lib/commonjs/internal/LocalSpatialAudioEngineInternal.js +10 -0
  133. package/lib/commonjs/internal/LocalSpatialAudioEngineInternal.js.map +1 -0
  134. package/lib/commonjs/internal/MediaEngineInternal.js +124 -0
  135. package/lib/commonjs/internal/MediaEngineInternal.js.map +1 -0
  136. package/lib/commonjs/internal/MediaPlayerInternal.js +170 -0
  137. package/lib/commonjs/internal/MediaPlayerInternal.js.map +1 -0
  138. package/lib/commonjs/internal/MediaRecorderInternal.js +75 -0
  139. package/lib/commonjs/internal/MediaRecorderInternal.js.map +1 -0
  140. package/lib/commonjs/internal/MusicContentCenterInternal.js +144 -0
  141. package/lib/commonjs/internal/MusicContentCenterInternal.js.map +1 -0
  142. package/lib/commonjs/internal/RtcEngineExInternal.js +258 -0
  143. package/lib/commonjs/internal/RtcEngineExInternal.js.map +1 -0
  144. package/lib/commonjs/internal/call.js +133 -0
  145. package/lib/commonjs/internal/call.js.map +1 -0
  146. package/lib/commonjs/internal/event.js +32 -0
  147. package/lib/commonjs/internal/event.js.map +1 -0
  148. package/lib/commonjs/specs/AgoraRtcSurfaceViewNativeComponent.js +10 -0
  149. package/lib/commonjs/specs/AgoraRtcSurfaceViewNativeComponent.js.map +1 -0
  150. package/lib/commonjs/specs/AgoraRtcTextureViewNativeComponent.js +10 -0
  151. package/lib/commonjs/specs/AgoraRtcTextureViewNativeComponent.js.map +1 -0
  152. package/lib/commonjs/specs/NativeAgoraRtcNg.js +9 -0
  153. package/lib/commonjs/specs/NativeAgoraRtcNg.js.map +1 -0
  154. package/lib/commonjs/specs/index.js +22 -0
  155. package/lib/commonjs/specs/index.js.map +1 -0
  156. package/lib/commonjs/ti/AgoraBase-ti.js +24 -0
  157. package/lib/commonjs/ti/AgoraBase-ti.js.map +1 -0
  158. package/lib/commonjs/ti/AgoraMediaBase-ti.js +59 -0
  159. package/lib/commonjs/ti/AgoraMediaBase-ti.js.map +1 -0
  160. package/lib/commonjs/ti/AgoraMediaPlayerTypes-ti.js +15 -0
  161. package/lib/commonjs/ti/AgoraMediaPlayerTypes-ti.js.map +1 -0
  162. package/lib/commonjs/ti/AgoraPip-ti.js +22 -0
  163. package/lib/commonjs/ti/AgoraPip-ti.js.map +1 -0
  164. package/lib/commonjs/ti/IAgoraH265Transcoder-ti.js +24 -0
  165. package/lib/commonjs/ti/IAgoraH265Transcoder-ti.js.map +1 -0
  166. package/lib/commonjs/ti/IAgoraLog-ti.js +15 -0
  167. package/lib/commonjs/ti/IAgoraLog-ti.js.map +1 -0
  168. package/lib/commonjs/ti/IAgoraMediaEngine-ti.js +15 -0
  169. package/lib/commonjs/ti/IAgoraMediaEngine-ti.js.map +1 -0
  170. package/lib/commonjs/ti/IAgoraMediaPlayer-ti.js +22 -0
  171. package/lib/commonjs/ti/IAgoraMediaPlayer-ti.js.map +1 -0
  172. package/lib/commonjs/ti/IAgoraMediaPlayerSource-ti.js +34 -0
  173. package/lib/commonjs/ti/IAgoraMediaPlayerSource-ti.js.map +1 -0
  174. package/lib/commonjs/ti/IAgoraMediaRecorder-ti.js +15 -0
  175. package/lib/commonjs/ti/IAgoraMediaRecorder-ti.js.map +1 -0
  176. package/lib/commonjs/ti/IAgoraMediaStreamingSource-ti.js +15 -0
  177. package/lib/commonjs/ti/IAgoraMediaStreamingSource-ti.js.map +1 -0
  178. package/lib/commonjs/ti/IAgoraMusicContentCenter-ti.js +26 -0
  179. package/lib/commonjs/ti/IAgoraMusicContentCenter-ti.js.map +1 -0
  180. package/lib/commonjs/ti/IAgoraPip-ti.js +22 -0
  181. package/lib/commonjs/ti/IAgoraPip-ti.js.map +1 -0
  182. package/lib/commonjs/ti/IAgoraRhythmPlayer-ti.js +15 -0
  183. package/lib/commonjs/ti/IAgoraRhythmPlayer-ti.js.map +1 -0
  184. package/lib/commonjs/ti/IAgoraRtcEngine-ti.js +128 -0
  185. package/lib/commonjs/ti/IAgoraRtcEngine-ti.js.map +1 -0
  186. package/lib/commonjs/ti/IAgoraRtcEngineEx-ti.js +15 -0
  187. package/lib/commonjs/ti/IAgoraRtcEngineEx-ti.js.map +1 -0
  188. package/lib/commonjs/ti/IAgoraSpatialAudio-ti.js +15 -0
  189. package/lib/commonjs/ti/IAgoraSpatialAudio-ti.js.map +1 -0
  190. package/lib/commonjs/ti/IAudioDeviceManager-ti.js +15 -0
  191. package/lib/commonjs/ti/IAudioDeviceManager-ti.js.map +1 -0
  192. package/lib/commonjs/ti/Utils-ti.js +15 -0
  193. package/lib/commonjs/ti/Utils-ti.js.map +1 -0
  194. package/lib/commonjs/ti/index-ti.js +15 -0
  195. package/lib/commonjs/ti/index-ti.js.map +1 -0
  196. package/lib/module/AgoraBase.js +4333 -0
  197. package/lib/module/AgoraBase.js.map +1 -0
  198. package/lib/module/AgoraMediaBase.js +1067 -0
  199. package/lib/module/AgoraMediaBase.js.map +1 -0
  200. package/lib/module/AgoraMediaPlayerTypes.js +318 -0
  201. package/lib/module/AgoraMediaPlayerTypes.js.map +1 -0
  202. package/lib/module/AgoraRtcRenderView.js +47 -0
  203. package/lib/module/AgoraRtcRenderView.js.map +1 -0
  204. package/lib/module/IAgoraH265Transcoder.js +36 -0
  205. package/lib/module/IAgoraH265Transcoder.js.map +1 -0
  206. package/lib/module/IAgoraLog.js +77 -0
  207. package/lib/module/IAgoraLog.js.map +1 -0
  208. package/lib/module/IAgoraMediaEngine.js +29 -0
  209. package/lib/module/IAgoraMediaEngine.js.map +1 -0
  210. package/lib/module/IAgoraMediaPlayer.js +17 -0
  211. package/lib/module/IAgoraMediaPlayer.js.map +1 -0
  212. package/lib/module/IAgoraMediaPlayerSource.js +6 -0
  213. package/lib/module/IAgoraMediaPlayerSource.js.map +1 -0
  214. package/lib/module/IAgoraMediaRecorder.js +6 -0
  215. package/lib/module/IAgoraMediaRecorder.js.map +1 -0
  216. package/lib/module/IAgoraMediaStreamingSource.js +73 -0
  217. package/lib/module/IAgoraMediaStreamingSource.js.map +1 -0
  218. package/lib/module/IAgoraMusicContentCenter.js +156 -0
  219. package/lib/module/IAgoraMusicContentCenter.js.map +1 -0
  220. package/lib/module/IAgoraPip.js +48 -0
  221. package/lib/module/IAgoraPip.js.map +1 -0
  222. package/lib/module/IAgoraRhythmPlayer.js +61 -0
  223. package/lib/module/IAgoraRhythmPlayer.js.map +1 -0
  224. package/lib/module/IAgoraRtcEngine.js +1049 -0
  225. package/lib/module/IAgoraRtcEngine.js.map +1 -0
  226. package/lib/module/IAgoraRtcEngineEx.js +15 -0
  227. package/lib/module/IAgoraRtcEngineEx.js.map +1 -0
  228. package/lib/module/IAgoraSpatialAudio.js +18 -0
  229. package/lib/module/IAgoraSpatialAudio.js.map +1 -0
  230. package/lib/module/IAudioDeviceManager.js +17 -0
  231. package/lib/module/IAudioDeviceManager.js.map +1 -0
  232. package/lib/module/Utils.js +35 -0
  233. package/lib/module/Utils.js.map +1 -0
  234. package/lib/module/extension/AgoraBaseExtension.js +2 -0
  235. package/lib/module/extension/AgoraBaseExtension.js.map +1 -0
  236. package/lib/module/extension/AgoraMediaBaseExtension.js +2 -0
  237. package/lib/module/extension/AgoraMediaBaseExtension.js.map +1 -0
  238. package/lib/module/extension/AgoraMediaPlayerTypesExtension.js +2 -0
  239. package/lib/module/extension/AgoraMediaPlayerTypesExtension.js.map +1 -0
  240. package/lib/module/extension/IAgoraH265TranscoderExtension.js +2 -0
  241. package/lib/module/extension/IAgoraH265TranscoderExtension.js.map +1 -0
  242. package/lib/module/extension/IAgoraLogExtension.js +2 -0
  243. package/lib/module/extension/IAgoraLogExtension.js.map +1 -0
  244. package/lib/module/extension/IAgoraMediaEngineExtension.js +2 -0
  245. package/lib/module/extension/IAgoraMediaEngineExtension.js.map +1 -0
  246. package/lib/module/extension/IAgoraMediaPlayerExtension.js +2 -0
  247. package/lib/module/extension/IAgoraMediaPlayerExtension.js.map +1 -0
  248. package/lib/module/extension/IAgoraMediaPlayerSourceExtension.js +2 -0
  249. package/lib/module/extension/IAgoraMediaPlayerSourceExtension.js.map +1 -0
  250. package/lib/module/extension/IAgoraMediaRecorderExtension.js +2 -0
  251. package/lib/module/extension/IAgoraMediaRecorderExtension.js.map +1 -0
  252. package/lib/module/extension/IAgoraMusicContentCenterExtension.js +2 -0
  253. package/lib/module/extension/IAgoraMusicContentCenterExtension.js.map +1 -0
  254. package/lib/module/extension/IAgoraPipExtension.js +2 -0
  255. package/lib/module/extension/IAgoraPipExtension.js.map +1 -0
  256. package/lib/module/extension/IAgoraRhythmPlayerExtension.js +2 -0
  257. package/lib/module/extension/IAgoraRhythmPlayerExtension.js.map +1 -0
  258. package/lib/module/extension/IAgoraRtcEngineExExtension.js +2 -0
  259. package/lib/module/extension/IAgoraRtcEngineExExtension.js.map +1 -0
  260. package/lib/module/extension/IAgoraRtcEngineExtension.js +2 -0
  261. package/lib/module/extension/IAgoraRtcEngineExtension.js.map +1 -0
  262. package/lib/module/extension/IAgoraSpatialAudioExtension.js +2 -0
  263. package/lib/module/extension/IAgoraSpatialAudioExtension.js.map +1 -0
  264. package/lib/module/extension/IAudioDeviceManagerExtension.js +2 -0
  265. package/lib/module/extension/IAudioDeviceManagerExtension.js.map +1 -0
  266. package/lib/module/impl/AgoraBaseImpl.js +20 -0
  267. package/lib/module/impl/AgoraBaseImpl.js.map +1 -0
  268. package/lib/module/impl/AgoraMediaBaseImpl.js +139 -0
  269. package/lib/module/impl/AgoraMediaBaseImpl.js.map +1 -0
  270. package/lib/module/impl/IAgoraH265TranscoderImpl.js +113 -0
  271. package/lib/module/impl/IAgoraH265TranscoderImpl.js.map +1 -0
  272. package/lib/module/impl/IAgoraMediaEngineImpl.js +335 -0
  273. package/lib/module/impl/IAgoraMediaEngineImpl.js.map +1 -0
  274. package/lib/module/impl/IAgoraMediaPlayerImpl.js +957 -0
  275. package/lib/module/impl/IAgoraMediaPlayerImpl.js.map +1 -0
  276. package/lib/module/impl/IAgoraMediaPlayerSourceImpl.js +70 -0
  277. package/lib/module/impl/IAgoraMediaPlayerSourceImpl.js.map +1 -0
  278. package/lib/module/impl/IAgoraMediaRecorderImpl.js +45 -0
  279. package/lib/module/impl/IAgoraMediaRecorderImpl.js.map +1 -0
  280. package/lib/module/impl/IAgoraMusicContentCenterImpl.js +419 -0
  281. package/lib/module/impl/IAgoraMusicContentCenterImpl.js.map +1 -0
  282. package/lib/module/impl/IAgoraRtcEngineExImpl.js +1176 -0
  283. package/lib/module/impl/IAgoraRtcEngineExImpl.js.map +1 -0
  284. package/lib/module/impl/IAgoraRtcEngineImpl.js +5423 -0
  285. package/lib/module/impl/IAgoraRtcEngineImpl.js.map +1 -0
  286. package/lib/module/impl/IAgoraSpatialAudioImpl.js +356 -0
  287. package/lib/module/impl/IAgoraSpatialAudioImpl.js.map +1 -0
  288. package/lib/module/impl/IAudioDeviceManagerImpl.js +373 -0
  289. package/lib/module/impl/IAudioDeviceManagerImpl.js.map +1 -0
  290. package/lib/module/index.js +43 -0
  291. package/lib/module/index.js.map +1 -0
  292. package/lib/module/internal/AgoraH265TranscoderInternal.js +58 -0
  293. package/lib/module/internal/AgoraH265TranscoderInternal.js.map +1 -0
  294. package/lib/module/internal/AgoraMediaBaseInternal.js +13 -0
  295. package/lib/module/internal/AgoraMediaBaseInternal.js.map +1 -0
  296. package/lib/module/internal/AgoraPipInternal.js +92 -0
  297. package/lib/module/internal/AgoraPipInternal.js.map +1 -0
  298. package/lib/module/internal/IAgoraRtcRenderView.js +62 -0
  299. package/lib/module/internal/IAgoraRtcRenderView.js.map +1 -0
  300. package/lib/module/internal/IrisApiEngine.js +251 -0
  301. package/lib/module/internal/IrisApiEngine.js.map +1 -0
  302. package/lib/module/internal/LocalSpatialAudioEngineInternal.js +3 -0
  303. package/lib/module/internal/LocalSpatialAudioEngineInternal.js.map +1 -0
  304. package/lib/module/internal/MediaEngineInternal.js +116 -0
  305. package/lib/module/internal/MediaEngineInternal.js.map +1 -0
  306. package/lib/module/internal/MediaPlayerInternal.js +162 -0
  307. package/lib/module/internal/MediaPlayerInternal.js.map +1 -0
  308. package/lib/module/internal/MediaRecorderInternal.js +67 -0
  309. package/lib/module/internal/MediaRecorderInternal.js.map +1 -0
  310. package/lib/module/internal/MusicContentCenterInternal.js +134 -0
  311. package/lib/module/internal/MusicContentCenterInternal.js.map +1 -0
  312. package/lib/module/internal/RtcEngineExInternal.js +250 -0
  313. package/lib/module/internal/RtcEngineExInternal.js.map +1 -0
  314. package/lib/module/internal/call.js +126 -0
  315. package/lib/module/internal/call.js.map +1 -0
  316. package/lib/module/internal/event.js +25 -0
  317. package/lib/module/internal/event.js.map +1 -0
  318. package/lib/module/specs/AgoraRtcSurfaceViewNativeComponent.js +3 -0
  319. package/lib/module/specs/AgoraRtcSurfaceViewNativeComponent.js.map +1 -0
  320. package/lib/module/specs/AgoraRtcTextureViewNativeComponent.js +3 -0
  321. package/lib/module/specs/AgoraRtcTextureViewNativeComponent.js.map +1 -0
  322. package/lib/module/specs/NativeAgoraRtcNg.js +3 -0
  323. package/lib/module/specs/NativeAgoraRtcNg.js.map +1 -0
  324. package/lib/module/specs/index.js +16 -0
  325. package/lib/module/specs/index.js.map +1 -0
  326. package/lib/module/ti/AgoraBase-ti.js +16 -0
  327. package/lib/module/ti/AgoraBase-ti.js.map +1 -0
  328. package/lib/module/ti/AgoraMediaBase-ti.js +51 -0
  329. package/lib/module/ti/AgoraMediaBase-ti.js.map +1 -0
  330. package/lib/module/ti/AgoraMediaPlayerTypes-ti.js +9 -0
  331. package/lib/module/ti/AgoraMediaPlayerTypes-ti.js.map +1 -0
  332. package/lib/module/ti/AgoraPip-ti.js +14 -0
  333. package/lib/module/ti/AgoraPip-ti.js.map +1 -0
  334. package/lib/module/ti/IAgoraH265Transcoder-ti.js +16 -0
  335. package/lib/module/ti/IAgoraH265Transcoder-ti.js.map +1 -0
  336. package/lib/module/ti/IAgoraLog-ti.js +9 -0
  337. package/lib/module/ti/IAgoraLog-ti.js.map +1 -0
  338. package/lib/module/ti/IAgoraMediaEngine-ti.js +9 -0
  339. package/lib/module/ti/IAgoraMediaEngine-ti.js.map +1 -0
  340. package/lib/module/ti/IAgoraMediaPlayer-ti.js +14 -0
  341. package/lib/module/ti/IAgoraMediaPlayer-ti.js.map +1 -0
  342. package/lib/module/ti/IAgoraMediaPlayerSource-ti.js +26 -0
  343. package/lib/module/ti/IAgoraMediaPlayerSource-ti.js.map +1 -0
  344. package/lib/module/ti/IAgoraMediaRecorder-ti.js +9 -0
  345. package/lib/module/ti/IAgoraMediaRecorder-ti.js.map +1 -0
  346. package/lib/module/ti/IAgoraMediaStreamingSource-ti.js +9 -0
  347. package/lib/module/ti/IAgoraMediaStreamingSource-ti.js.map +1 -0
  348. package/lib/module/ti/IAgoraMusicContentCenter-ti.js +18 -0
  349. package/lib/module/ti/IAgoraMusicContentCenter-ti.js.map +1 -0
  350. package/lib/module/ti/IAgoraPip-ti.js +14 -0
  351. package/lib/module/ti/IAgoraPip-ti.js.map +1 -0
  352. package/lib/module/ti/IAgoraRhythmPlayer-ti.js +9 -0
  353. package/lib/module/ti/IAgoraRhythmPlayer-ti.js.map +1 -0
  354. package/lib/module/ti/IAgoraRtcEngine-ti.js +120 -0
  355. package/lib/module/ti/IAgoraRtcEngine-ti.js.map +1 -0
  356. package/lib/module/ti/IAgoraRtcEngineEx-ti.js +9 -0
  357. package/lib/module/ti/IAgoraRtcEngineEx-ti.js.map +1 -0
  358. package/lib/module/ti/IAgoraSpatialAudio-ti.js +9 -0
  359. package/lib/module/ti/IAgoraSpatialAudio-ti.js.map +1 -0
  360. package/lib/module/ti/IAudioDeviceManager-ti.js +9 -0
  361. package/lib/module/ti/IAudioDeviceManager-ti.js.map +1 -0
  362. package/lib/module/ti/Utils-ti.js +9 -0
  363. package/lib/module/ti/Utils-ti.js.map +1 -0
  364. package/lib/module/ti/index-ti.js +9 -0
  365. package/lib/module/ti/index-ti.js.map +1 -0
  366. package/lib/typescript/src/AgoraBase.d.ts +5728 -0
  367. package/lib/typescript/src/AgoraBase.d.ts.map +1 -0
  368. package/lib/typescript/src/AgoraMediaBase.d.ts +1717 -0
  369. package/lib/typescript/src/AgoraMediaBase.d.ts.map +1 -0
  370. package/lib/typescript/src/AgoraMediaPlayerTypes.d.ts +456 -0
  371. package/lib/typescript/src/AgoraMediaPlayerTypes.d.ts.map +1 -0
  372. package/lib/typescript/src/AgoraRtcRenderView.d.ts +60 -0
  373. package/lib/typescript/src/AgoraRtcRenderView.d.ts.map +1 -0
  374. package/lib/typescript/src/IAgoraH265Transcoder.d.ts +28 -0
  375. package/lib/typescript/src/IAgoraH265Transcoder.d.ts.map +1 -0
  376. package/lib/typescript/src/IAgoraLog.d.ts +89 -0
  377. package/lib/typescript/src/IAgoraLog.d.ts.map +1 -0
  378. package/lib/typescript/src/IAgoraMediaEngine.d.ts +255 -0
  379. package/lib/typescript/src/IAgoraMediaEngine.d.ts.map +1 -0
  380. package/lib/typescript/src/IAgoraMediaPlayer.d.ts +656 -0
  381. package/lib/typescript/src/IAgoraMediaPlayer.d.ts.map +1 -0
  382. package/lib/typescript/src/IAgoraMediaPlayerSource.d.ts +109 -0
  383. package/lib/typescript/src/IAgoraMediaPlayerSource.d.ts.map +1 -0
  384. package/lib/typescript/src/IAgoraMediaRecorder.d.ts +60 -0
  385. package/lib/typescript/src/IAgoraMediaRecorder.d.ts.map +1 -0
  386. package/lib/typescript/src/IAgoraMediaStreamingSource.d.ts +42 -0
  387. package/lib/typescript/src/IAgoraMediaStreamingSource.d.ts.map +1 -0
  388. package/lib/typescript/src/IAgoraMusicContentCenter.d.ts +604 -0
  389. package/lib/typescript/src/IAgoraMusicContentCenter.d.ts.map +1 -0
  390. package/lib/typescript/src/IAgoraPip.d.ts +257 -0
  391. package/lib/typescript/src/IAgoraPip.d.ts.map +1 -0
  392. package/lib/typescript/src/IAgoraRhythmPlayer.d.ts +65 -0
  393. package/lib/typescript/src/IAgoraRhythmPlayer.d.ts.map +1 -0
  394. package/lib/typescript/src/IAgoraRtcEngine.d.ts +6831 -0
  395. package/lib/typescript/src/IAgoraRtcEngine.d.ts.map +1 -0
  396. package/lib/typescript/src/IAgoraRtcEngineEx.d.ts +817 -0
  397. package/lib/typescript/src/IAgoraRtcEngineEx.d.ts.map +1 -0
  398. package/lib/typescript/src/IAgoraSpatialAudio.d.ts +194 -0
  399. package/lib/typescript/src/IAgoraSpatialAudio.d.ts.map +1 -0
  400. package/lib/typescript/src/IAudioDeviceManager.d.ts +155 -0
  401. package/lib/typescript/src/IAudioDeviceManager.d.ts.map +1 -0
  402. package/lib/typescript/src/Utils.d.ts +19 -0
  403. package/lib/typescript/src/Utils.d.ts.map +1 -0
  404. package/lib/typescript/src/extension/AgoraBaseExtension.d.ts +2 -0
  405. package/lib/typescript/src/extension/AgoraBaseExtension.d.ts.map +1 -0
  406. package/lib/typescript/src/extension/AgoraMediaBaseExtension.d.ts +2 -0
  407. package/lib/typescript/src/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
  408. package/lib/typescript/src/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -0
  409. package/lib/typescript/src/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
  410. package/lib/typescript/src/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
  411. package/lib/typescript/src/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
  412. package/lib/typescript/src/extension/IAgoraLogExtension.d.ts +2 -0
  413. package/lib/typescript/src/extension/IAgoraLogExtension.d.ts.map +1 -0
  414. package/lib/typescript/src/extension/IAgoraMediaEngineExtension.d.ts +40 -0
  415. package/lib/typescript/src/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
  416. package/lib/typescript/src/extension/IAgoraMediaPlayerExtension.d.ts +46 -0
  417. package/lib/typescript/src/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
  418. package/lib/typescript/src/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -0
  419. package/lib/typescript/src/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
  420. package/lib/typescript/src/extension/IAgoraMediaRecorderExtension.d.ts +44 -0
  421. package/lib/typescript/src/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
  422. package/lib/typescript/src/extension/IAgoraMusicContentCenterExtension.d.ts +20 -0
  423. package/lib/typescript/src/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
  424. package/lib/typescript/src/extension/IAgoraPipExtension.d.ts +23 -0
  425. package/lib/typescript/src/extension/IAgoraPipExtension.d.ts.map +1 -0
  426. package/lib/typescript/src/extension/IAgoraRhythmPlayerExtension.d.ts +2 -0
  427. package/lib/typescript/src/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
  428. package/lib/typescript/src/extension/IAgoraRtcEngineExExtension.d.ts +2 -0
  429. package/lib/typescript/src/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
  430. package/lib/typescript/src/extension/IAgoraRtcEngineExtension.d.ts +49 -0
  431. package/lib/typescript/src/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
  432. package/lib/typescript/src/extension/IAgoraSpatialAudioExtension.d.ts +2 -0
  433. package/lib/typescript/src/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
  434. package/lib/typescript/src/extension/IAudioDeviceManagerExtension.d.ts +2 -0
  435. package/lib/typescript/src/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
  436. package/lib/typescript/src/impl/AgoraBaseImpl.d.ts +3 -0
  437. package/lib/typescript/src/impl/AgoraBaseImpl.d.ts.map +1 -0
  438. package/lib/typescript/src/impl/AgoraMediaBaseImpl.d.ts +14 -0
  439. package/lib/typescript/src/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
  440. package/lib/typescript/src/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
  441. package/lib/typescript/src/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
  442. package/lib/typescript/src/impl/IAgoraMediaEngineImpl.d.ts +46 -0
  443. package/lib/typescript/src/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
  444. package/lib/typescript/src/impl/IAgoraMediaPlayerImpl.d.ts +145 -0
  445. package/lib/typescript/src/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
  446. package/lib/typescript/src/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -0
  447. package/lib/typescript/src/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
  448. package/lib/typescript/src/impl/IAgoraMediaRecorderImpl.d.ts +11 -0
  449. package/lib/typescript/src/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
  450. package/lib/typescript/src/impl/IAgoraMusicContentCenterImpl.d.ts +67 -0
  451. package/lib/typescript/src/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
  452. package/lib/typescript/src/impl/IAgoraRtcEngineExImpl.d.ts +128 -0
  453. package/lib/typescript/src/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
  454. package/lib/typescript/src/impl/IAgoraRtcEngineImpl.d.ts +656 -0
  455. package/lib/typescript/src/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
  456. package/lib/typescript/src/impl/IAgoraSpatialAudioImpl.d.ts +47 -0
  457. package/lib/typescript/src/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
  458. package/lib/typescript/src/impl/IAudioDeviceManagerImpl.d.ts +65 -0
  459. package/lib/typescript/src/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
  460. package/lib/typescript/src/index.d.ts +31 -0
  461. package/lib/typescript/src/index.d.ts.map +1 -0
  462. package/lib/typescript/src/internal/AgoraH265TranscoderInternal.d.ts +14 -0
  463. package/lib/typescript/src/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
  464. package/lib/typescript/src/internal/AgoraMediaBaseInternal.d.ts +8 -0
  465. package/lib/typescript/src/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
  466. package/lib/typescript/src/internal/AgoraPipInternal.d.ts +21 -0
  467. package/lib/typescript/src/internal/AgoraPipInternal.d.ts.map +1 -0
  468. package/lib/typescript/src/internal/IAgoraRtcRenderView.d.ts +13 -0
  469. package/lib/typescript/src/internal/IAgoraRtcRenderView.d.ts.map +1 -0
  470. package/lib/typescript/src/internal/IrisApiEngine.d.ts +12 -0
  471. package/lib/typescript/src/internal/IrisApiEngine.d.ts.map +1 -0
  472. package/lib/typescript/src/internal/LocalSpatialAudioEngineInternal.d.ts +4 -0
  473. package/lib/typescript/src/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
  474. package/lib/typescript/src/internal/MediaEngineInternal.d.ts +23 -0
  475. package/lib/typescript/src/internal/MediaEngineInternal.d.ts.map +1 -0
  476. package/lib/typescript/src/internal/MediaPlayerInternal.d.ts +28 -0
  477. package/lib/typescript/src/internal/MediaPlayerInternal.d.ts.map +1 -0
  478. package/lib/typescript/src/internal/MediaRecorderInternal.d.ts +16 -0
  479. package/lib/typescript/src/internal/MediaRecorderInternal.d.ts.map +1 -0
  480. package/lib/typescript/src/internal/MusicContentCenterInternal.d.ts +31 -0
  481. package/lib/typescript/src/internal/MusicContentCenterInternal.d.ts.map +1 -0
  482. package/lib/typescript/src/internal/RtcEngineExInternal.d.ts +62 -0
  483. package/lib/typescript/src/internal/RtcEngineExInternal.d.ts.map +1 -0
  484. package/lib/typescript/src/internal/call.d.ts +5 -0
  485. package/lib/typescript/src/internal/call.d.ts.map +1 -0
  486. package/lib/typescript/src/internal/event.d.ts +58 -0
  487. package/lib/typescript/src/internal/event.d.ts.map +1 -0
  488. package/lib/typescript/src/specs/AgoraRtcSurfaceViewNativeComponent.d.ts +13 -0
  489. package/lib/typescript/src/specs/AgoraRtcSurfaceViewNativeComponent.d.ts.map +1 -0
  490. package/lib/typescript/src/specs/AgoraRtcTextureViewNativeComponent.d.ts +11 -0
  491. package/lib/typescript/src/specs/AgoraRtcTextureViewNativeComponent.d.ts.map +1 -0
  492. package/lib/typescript/src/specs/NativeAgoraRtcNg.d.ts +23 -0
  493. package/lib/typescript/src/specs/NativeAgoraRtcNg.d.ts.map +1 -0
  494. package/lib/typescript/src/specs/index.d.ts +3 -0
  495. package/lib/typescript/src/specs/index.d.ts.map +1 -0
  496. package/lib/typescript/src/ti/AgoraBase-ti.d.ts +8 -0
  497. package/lib/typescript/src/ti/AgoraBase-ti.d.ts.map +1 -0
  498. package/lib/typescript/src/ti/AgoraMediaBase-ti.d.ts +15 -0
  499. package/lib/typescript/src/ti/AgoraMediaBase-ti.d.ts.map +1 -0
  500. package/lib/typescript/src/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -0
  501. package/lib/typescript/src/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
  502. package/lib/typescript/src/ti/AgoraPip-ti.d.ts +8 -0
  503. package/lib/typescript/src/ti/AgoraPip-ti.d.ts.map +1 -0
  504. package/lib/typescript/src/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
  505. package/lib/typescript/src/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
  506. package/lib/typescript/src/ti/IAgoraLog-ti.d.ts +7 -0
  507. package/lib/typescript/src/ti/IAgoraLog-ti.d.ts.map +1 -0
  508. package/lib/typescript/src/ti/IAgoraMediaEngine-ti.d.ts +7 -0
  509. package/lib/typescript/src/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
  510. package/lib/typescript/src/ti/IAgoraMediaPlayer-ti.d.ts +8 -0
  511. package/lib/typescript/src/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
  512. package/lib/typescript/src/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -0
  513. package/lib/typescript/src/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
  514. package/lib/typescript/src/ti/IAgoraMediaRecorder-ti.d.ts +7 -0
  515. package/lib/typescript/src/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
  516. package/lib/typescript/src/ti/IAgoraMediaStreamingSource-ti.d.ts +7 -0
  517. package/lib/typescript/src/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
  518. package/lib/typescript/src/ti/IAgoraMusicContentCenter-ti.d.ts +8 -0
  519. package/lib/typescript/src/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
  520. package/lib/typescript/src/ti/IAgoraPip-ti.d.ts +8 -0
  521. package/lib/typescript/src/ti/IAgoraPip-ti.d.ts.map +1 -0
  522. package/lib/typescript/src/ti/IAgoraRhythmPlayer-ti.d.ts +7 -0
  523. package/lib/typescript/src/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
  524. package/lib/typescript/src/ti/IAgoraRtcEngine-ti.d.ts +10 -0
  525. package/lib/typescript/src/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
  526. package/lib/typescript/src/ti/IAgoraRtcEngineEx-ti.d.ts +7 -0
  527. package/lib/typescript/src/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
  528. package/lib/typescript/src/ti/IAgoraSpatialAudio-ti.d.ts +7 -0
  529. package/lib/typescript/src/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
  530. package/lib/typescript/src/ti/IAudioDeviceManager-ti.d.ts +7 -0
  531. package/lib/typescript/src/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
  532. package/lib/typescript/src/ti/Utils-ti.d.ts +7 -0
  533. package/lib/typescript/src/ti/Utils-ti.d.ts.map +1 -0
  534. package/lib/typescript/src/ti/index-ti.d.ts +7 -0
  535. package/lib/typescript/src/ti/index-ti.d.ts.map +1 -0
  536. package/package.json +175 -0
  537. package/react-native-agora.podspec +50 -0
  538. package/src/AgoraBase.ts +5941 -0
  539. package/src/AgoraMediaBase.ts +1814 -0
  540. package/src/AgoraMediaPlayerTypes.ts +467 -0
  541. package/src/AgoraRtcRenderView.tsx +72 -0
  542. package/src/IAgoraH265Transcoder.ts +73 -0
  543. package/src/IAgoraLog.ts +91 -0
  544. package/src/IAgoraMediaEngine.ts +321 -0
  545. package/src/IAgoraMediaPlayer.ts +753 -0
  546. package/src/IAgoraMediaPlayerSource.ts +137 -0
  547. package/src/IAgoraMediaRecorder.ts +65 -0
  548. package/src/IAgoraMediaStreamingSource.ts +81 -0
  549. package/src/IAgoraMusicContentCenter.ts +678 -0
  550. package/src/IAgoraPip.ts +295 -0
  551. package/src/IAgoraRhythmPlayer.ts +67 -0
  552. package/src/IAgoraRtcEngine.ts +8100 -0
  553. package/src/IAgoraRtcEngineEx.ts +1108 -0
  554. package/src/IAgoraSpatialAudio.ts +248 -0
  555. package/src/IAudioDeviceManager.ts +185 -0
  556. package/src/Utils.ts +35 -0
  557. package/src/extension/AgoraBaseExtension.ts +1 -0
  558. package/src/extension/AgoraMediaBaseExtension.ts +1 -0
  559. package/src/extension/AgoraMediaPlayerTypesExtension.ts +1 -0
  560. package/src/extension/IAgoraH265TranscoderExtension.ts +39 -0
  561. package/src/extension/IAgoraLogExtension.ts +1 -0
  562. package/src/extension/IAgoraMediaEngineExtension.ts +62 -0
  563. package/src/extension/IAgoraMediaPlayerExtension.ts +64 -0
  564. package/src/extension/IAgoraMediaPlayerSourceExtension.ts +1 -0
  565. package/src/extension/IAgoraMediaRecorderExtension.ts +59 -0
  566. package/src/extension/IAgoraMusicContentCenterExtension.ts +34 -0
  567. package/src/extension/IAgoraPipExtension.ts +37 -0
  568. package/src/extension/IAgoraRhythmPlayerExtension.ts +1 -0
  569. package/src/extension/IAgoraRtcEngineExExtension.ts +1 -0
  570. package/src/extension/IAgoraRtcEngineExtension.ts +72 -0
  571. package/src/extension/IAgoraSpatialAudioExtension.ts +1 -0
  572. package/src/extension/IAudioDeviceManagerExtension.ts +1 -0
  573. package/src/impl/AgoraBaseImpl.ts +39 -0
  574. package/src/impl/AgoraMediaBaseImpl.ts +238 -0
  575. package/src/impl/IAgoraH265TranscoderImpl.ts +152 -0
  576. package/src/impl/IAgoraMediaEngineImpl.ts +490 -0
  577. package/src/impl/IAgoraMediaPlayerImpl.ts +1180 -0
  578. package/src/impl/IAgoraMediaPlayerSourceImpl.ts +94 -0
  579. package/src/impl/IAgoraMediaRecorderImpl.ts +58 -0
  580. package/src/impl/IAgoraMusicContentCenterImpl.ts +561 -0
  581. package/src/impl/IAgoraRtcEngineExImpl.ts +1911 -0
  582. package/src/impl/IAgoraRtcEngineImpl.ts +7737 -0
  583. package/src/impl/IAgoraSpatialAudioImpl.ts +494 -0
  584. package/src/impl/IAudioDeviceManagerImpl.ts +442 -0
  585. package/src/index.ts +53 -0
  586. package/src/internal/AgoraH265TranscoderInternal.ts +93 -0
  587. package/src/internal/AgoraMediaBaseInternal.ts +15 -0
  588. package/src/internal/AgoraPipInternal.ts +136 -0
  589. package/src/internal/IAgoraRtcRenderView.tsx +79 -0
  590. package/src/internal/IrisApiEngine.ts +337 -0
  591. package/src/internal/LocalSpatialAudioEngineInternal.ts +3 -0
  592. package/src/internal/MediaEngineInternal.ts +187 -0
  593. package/src/internal/MediaPlayerInternal.ts +282 -0
  594. package/src/internal/MediaRecorderInternal.ts +96 -0
  595. package/src/internal/MusicContentCenterInternal.ts +204 -0
  596. package/src/internal/RtcEngineExInternal.ts +443 -0
  597. package/src/internal/call.ts +140 -0
  598. package/src/internal/event.ts +100 -0
  599. package/src/specs/AgoraRtcSurfaceViewNativeComponent.ts +16 -0
  600. package/src/specs/AgoraRtcTextureViewNativeComponent.ts +14 -0
  601. package/src/specs/NativeAgoraRtcNg.ts +40 -0
  602. package/src/specs/index.ts +26 -0
  603. package/src/ti/AgoraBase-ti.ts +16 -0
  604. package/src/ti/AgoraMediaBase-ti.ts +58 -0
  605. package/src/ti/AgoraMediaPlayerTypes-ti.ts +11 -0
  606. package/src/ti/AgoraPip-ti.ts +14 -0
  607. package/src/ti/IAgoraH265Transcoder-ti.ts +16 -0
  608. package/src/ti/IAgoraLog-ti.ts +11 -0
  609. package/src/ti/IAgoraMediaEngine-ti.ts +11 -0
  610. package/src/ti/IAgoraMediaPlayer-ti.ts +14 -0
  611. package/src/ti/IAgoraMediaPlayerSource-ti.ts +26 -0
  612. package/src/ti/IAgoraMediaRecorder-ti.ts +11 -0
  613. package/src/ti/IAgoraMediaStreamingSource-ti.ts +11 -0
  614. package/src/ti/IAgoraMusicContentCenter-ti.ts +18 -0
  615. package/src/ti/IAgoraPip-ti.ts +14 -0
  616. package/src/ti/IAgoraRhythmPlayer-ti.ts +11 -0
  617. package/src/ti/IAgoraRtcEngine-ti.ts +122 -0
  618. package/src/ti/IAgoraRtcEngineEx-ti.ts +11 -0
  619. package/src/ti/IAgoraSpatialAudio-ti.ts +11 -0
  620. package/src/ti/IAudioDeviceManager-ti.ts +11 -0
  621. package/src/ti/Utils-ti.ts +11 -0
  622. package/src/ti/index-ti.ts +11 -0
@@ -0,0 +1,1814 @@
1
+ import './extension/AgoraMediaBaseExtension';
2
+ import { EncodedVideoFrameInfo } from './AgoraBase';
3
+
4
+ /**
5
+ * 插件上下文信息。
6
+ */
7
+ export class ExtensionContext {
8
+ /**
9
+ * ExtensionContext 中报告的 uid 是否有效: true : uid 有效。 false : uid 无效。
10
+ */
11
+ isValid?: boolean;
12
+ /**
13
+ * 用户 ID。0 代表本地用户,大于 0 代表远端用户。
14
+ */
15
+ uid?: number;
16
+ /**
17
+ * 提供插件的服务商名称。
18
+ */
19
+ providerName?: string;
20
+ /**
21
+ * 插件的名称。
22
+ */
23
+ extensionName?: string;
24
+ }
25
+
26
+ /**
27
+ * 视频源的类型。
28
+ */
29
+ export enum VideoSourceType {
30
+ /**
31
+ * 0:(默认)视频源为第一个摄像头。
32
+ */
33
+ VideoSourceCameraPrimary = 0,
34
+ /**
35
+ * 0:(默认)视频源为第一个摄像头。
36
+ */
37
+ VideoSourceCamera = 0,
38
+ /**
39
+ * 1:视频源为第二个摄像头。
40
+ */
41
+ VideoSourceCameraSecondary = 1,
42
+ /**
43
+ * 2:视频源为第一个屏幕。
44
+ */
45
+ VideoSourceScreenPrimary = 2,
46
+ /**
47
+ * 2:视频源为第一个屏幕。
48
+ */
49
+ VideoSourceScreen = 2,
50
+ /**
51
+ * 3:视频源为第二个屏幕。
52
+ */
53
+ VideoSourceScreenSecondary = 3,
54
+ /**
55
+ * 4:自定义的视频源。
56
+ */
57
+ VideoSourceCustom = 4,
58
+ /**
59
+ * 5:视频源为媒体播放器。
60
+ */
61
+ VideoSourceMediaPlayer = 5,
62
+ /**
63
+ * 6:视频源为 PNG 图片。
64
+ */
65
+ VideoSourceRtcImagePng = 6,
66
+ /**
67
+ * 7:视频源为 JPEG 图片。
68
+ */
69
+ VideoSourceRtcImageJpeg = 7,
70
+ /**
71
+ * 8:视频源为 GIF 图片。
72
+ */
73
+ VideoSourceRtcImageGif = 8,
74
+ /**
75
+ * 9:视频源为网络获取的远端视频。
76
+ */
77
+ VideoSourceRemote = 9,
78
+ /**
79
+ * 10:转码后的视频源。
80
+ */
81
+ VideoSourceTranscoded = 10,
82
+ /**
83
+ * 11:(仅适用于 Android)视频源为第三个摄像头。
84
+ */
85
+ VideoSourceCameraThird = 11,
86
+ /**
87
+ * 12:(仅适用于 Android)视频源为第四个摄像头。
88
+ */
89
+ VideoSourceCameraFourth = 12,
90
+ /**
91
+ * @ignore
92
+ */
93
+ VideoSourceScreenThird = 13,
94
+ /**
95
+ * @ignore
96
+ */
97
+ VideoSourceScreenFourth = 14,
98
+ /**
99
+ * 15:视频源为语音驱动插件处理后的视频。
100
+ */
101
+ VideoSourceSpeechDriven = 15,
102
+ /**
103
+ * 100:未知的视频源。
104
+ */
105
+ VideoSourceUnknown = 100,
106
+ }
107
+
108
+ /**
109
+ * 音频源类型。
110
+ */
111
+ export enum AudioSourceType {
112
+ /**
113
+ * 0:(默认)麦克风。
114
+ */
115
+ AudioSourceMicrophone = 0,
116
+ /**
117
+ * 1:自定义采集到的音频流。
118
+ */
119
+ AudioSourceCustom = 1,
120
+ /**
121
+ * 2:媒体播放器。
122
+ */
123
+ AudioSourceMediaPlayer = 2,
124
+ /**
125
+ * 3:在屏幕共享时采集的系统音频流。
126
+ */
127
+ AudioSourceLoopbackRecording = 3,
128
+ /**
129
+ * @ignore
130
+ */
131
+ AudioSourceMixedStream = 4,
132
+ /**
133
+ * 5:指定远端用户的音频流。
134
+ */
135
+ AudioSourceRemoteUser = 5,
136
+ /**
137
+ * 6:当前频道内所有音频流的合流。
138
+ */
139
+ AudioSourceRemoteChannel = 6,
140
+ /**
141
+ * 100:未知的音频源。
142
+ */
143
+ AudioSourceUnknown = 100,
144
+ }
145
+
146
+ /**
147
+ * 音频路由的类型。
148
+ */
149
+ export enum AudioRoute {
150
+ /**
151
+ * -1: 使用默认的音频路由。
152
+ */
153
+ RouteDefault = -1,
154
+ /**
155
+ * 0: 音频路由为带麦克风的耳机。
156
+ */
157
+ RouteHeadset = 0,
158
+ /**
159
+ * 1: 音频路由为听筒。
160
+ */
161
+ RouteEarpiece = 1,
162
+ /**
163
+ * 2: 音频路由为不带麦克风的耳机。
164
+ */
165
+ RouteHeadsetnomic = 2,
166
+ /**
167
+ * 3: 音频路由为设备自带的扬声器。
168
+ */
169
+ RouteSpeakerphone = 3,
170
+ /**
171
+ * 4: 音频路由为外接的扬声器。(仅适用于 iOS)
172
+ */
173
+ RouteLoudspeaker = 4,
174
+ /**
175
+ * 5: 音频路由为使用 HFP 协议的蓝牙设备。
176
+ */
177
+ RouteBluetoothDeviceHfp = 5,
178
+ /**
179
+ * @ignore
180
+ */
181
+ RouteUsb = 6,
182
+ /**
183
+ * @ignore
184
+ */
185
+ RouteHdmi = 7,
186
+ /**
187
+ * @ignore
188
+ */
189
+ RouteDisplayport = 8,
190
+ /**
191
+ * @ignore
192
+ */
193
+ RouteAirplay = 9,
194
+ /**
195
+ * 10: 音频路由为使用 A2DP 协议的蓝牙设备。
196
+ */
197
+ RouteBluetoothDeviceA2dp = 10,
198
+ }
199
+
200
+ /**
201
+ * @ignore
202
+ */
203
+ export enum BytesPerSample {
204
+ /**
205
+ * @ignore
206
+ */
207
+ TwoBytesPerSample = 2,
208
+ }
209
+
210
+ /**
211
+ * @ignore
212
+ */
213
+ export class AudioParameters {
214
+ /**
215
+ * @ignore
216
+ */
217
+ sample_rate?: number;
218
+ /**
219
+ * @ignore
220
+ */
221
+ channels?: number;
222
+ /**
223
+ * @ignore
224
+ */
225
+ frames_per_buffer?: number;
226
+ }
227
+
228
+ /**
229
+ * 音频数据的使用模式。
230
+ */
231
+ export enum RawAudioFrameOpModeType {
232
+ /**
233
+ * 0: (默认) 只读模式,例如: 若用户通过 SDK 采集数据,自己进行旁路推流,则可以选择该模式。
234
+ */
235
+ RawAudioFrameOpModeReadOnly = 0,
236
+ /**
237
+ * 2: 读写模式, 例如: 若用户自己有音效处理模块,且想要根据实际需要对数据进行前处理(例如变声),则可以选择该模式。
238
+ */
239
+ RawAudioFrameOpModeReadWrite = 2,
240
+ }
241
+
242
+ /**
243
+ * 媒体源类型。
244
+ */
245
+ export enum MediaSourceType {
246
+ /**
247
+ * 0: 音频播放设备。
248
+ */
249
+ AudioPlayoutSource = 0,
250
+ /**
251
+ * 1: 音频采集设备。
252
+ */
253
+ AudioRecordingSource = 1,
254
+ /**
255
+ * 2: 第一个摄像头
256
+ */
257
+ PrimaryCameraSource = 2,
258
+ /**
259
+ * 3: 第二个摄像头。
260
+ */
261
+ SecondaryCameraSource = 3,
262
+ /**
263
+ * @ignore
264
+ */
265
+ PrimaryScreenSource = 4,
266
+ /**
267
+ * @ignore
268
+ */
269
+ SecondaryScreenSource = 5,
270
+ /**
271
+ * 6: 自定义采集的视频源。
272
+ */
273
+ CustomVideoSource = 6,
274
+ /**
275
+ * @ignore
276
+ */
277
+ MediaPlayerSource = 7,
278
+ /**
279
+ * @ignore
280
+ */
281
+ RtcImagePngSource = 8,
282
+ /**
283
+ * @ignore
284
+ */
285
+ RtcImageJpegSource = 9,
286
+ /**
287
+ * @ignore
288
+ */
289
+ RtcImageGifSource = 10,
290
+ /**
291
+ * @ignore
292
+ */
293
+ RemoteVideoSource = 11,
294
+ /**
295
+ * @ignore
296
+ */
297
+ TranscodedVideoSource = 12,
298
+ /**
299
+ * 13: 视频源为语音驱动插件处理后的视频。
300
+ */
301
+ SpeechDrivenVideoSource = 13,
302
+ /**
303
+ * 100: 未知媒体源。
304
+ */
305
+ UnknownMediaSource = 100,
306
+ }
307
+
308
+ /**
309
+ * @ignore
310
+ */
311
+ export class PacketOptions {
312
+ /**
313
+ * @ignore
314
+ */
315
+ timestamp?: number;
316
+ /**
317
+ * @ignore
318
+ */
319
+ audioLevelIndication?: number;
320
+ }
321
+
322
+ /**
323
+ * @ignore
324
+ */
325
+ export class AudioEncodedFrameInfo {
326
+ /**
327
+ * @ignore
328
+ */
329
+ sendTs?: number;
330
+ /**
331
+ * @ignore
332
+ */
333
+ codec?: number;
334
+ }
335
+
336
+ /**
337
+ * 外部 PCM 格式音频帧的信息。
338
+ */
339
+ export class AudioPcmFrame {
340
+ /**
341
+ * 音频帧的时间戳 (ms)。
342
+ */
343
+ capture_timestamp?: number;
344
+ /**
345
+ * 每个声道的采样点数。
346
+ */
347
+ samples_per_channel_?: number;
348
+ /**
349
+ * 音频采样率 (Hz)。
350
+ */
351
+ sample_rate_hz_?: number;
352
+ /**
353
+ * 音频声道数。
354
+ */
355
+ num_channels_?: number;
356
+ /**
357
+ * @ignore
358
+ */
359
+ audio_track_number_?: number;
360
+ /**
361
+ * 音频数据的字节数。
362
+ */
363
+ bytes_per_sample?: BytesPerSample;
364
+ /**
365
+ * 音频帧数据。
366
+ */
367
+ data_?: number[];
368
+ /**
369
+ * @ignore
370
+ */
371
+ is_stereo_?: boolean;
372
+ }
373
+
374
+ /**
375
+ * 声道模式。
376
+ */
377
+ export enum AudioDualMonoMode {
378
+ /**
379
+ * 0: 原始模式。
380
+ */
381
+ AudioDualMonoStereo = 0,
382
+ /**
383
+ * 1: 左声道模式。该模式用左声道的音频替换右声道的音频,即用户只能听到左声道的音频。
384
+ */
385
+ AudioDualMonoL = 1,
386
+ /**
387
+ * 2: 右声道模式。该模式用右声道的音频替换左声道的音频,即用户只能听到右声道的音频。
388
+ */
389
+ AudioDualMonoR = 2,
390
+ /**
391
+ * 3: 混合模式。该模式将左右声道的数据叠加,即用户能同时听到左声道和右声道的音频。
392
+ */
393
+ AudioDualMonoMix = 3,
394
+ }
395
+
396
+ /**
397
+ * 视频像素格式。
398
+ */
399
+ export enum VideoPixelFormat {
400
+ /**
401
+ * 0: 原始视频像素格式。
402
+ */
403
+ VideoPixelDefault = 0,
404
+ /**
405
+ * 1: I420 格式。
406
+ */
407
+ VideoPixelI420 = 1,
408
+ /**
409
+ * @ignore
410
+ */
411
+ VideoPixelBgra = 2,
412
+ /**
413
+ * @ignore
414
+ */
415
+ VideoPixelNv21 = 3,
416
+ /**
417
+ * 4: RGBA 格式。
418
+ */
419
+ VideoPixelRgba = 4,
420
+ /**
421
+ * @ignore
422
+ */
423
+ VideoPixelNv12 = 8,
424
+ /**
425
+ * @ignore
426
+ */
427
+ VideoTexture2d = 10,
428
+ /**
429
+ * @ignore
430
+ */
431
+ VideoTextureOes = 11,
432
+ /**
433
+ * @ignore
434
+ */
435
+ VideoCvpixelNv12 = 12,
436
+ /**
437
+ * @ignore
438
+ */
439
+ VideoCvpixelI420 = 13,
440
+ /**
441
+ * @ignore
442
+ */
443
+ VideoCvpixelBgra = 14,
444
+ /**
445
+ * @ignore
446
+ */
447
+ VideoCvpixelP010 = 15,
448
+ /**
449
+ * 16: I422 格式。
450
+ */
451
+ VideoPixelI422 = 16,
452
+ /**
453
+ * @ignore
454
+ */
455
+ VideoTextureId3d11texture2d = 17,
456
+ /**
457
+ * @ignore
458
+ */
459
+ VideoPixelI010 = 18,
460
+ }
461
+
462
+ /**
463
+ * 视频显示模式。
464
+ */
465
+ export enum RenderModeType {
466
+ /**
467
+ * 1: 视频尺寸等比缩放。优先保证视窗被填满。因视频尺寸与显示视窗尺寸不一致而多出的视频将被截掉。
468
+ */
469
+ RenderModeHidden = 1,
470
+ /**
471
+ * 2: 视频尺寸等比缩放。优先保证视频内容全部显示。因视频尺寸与显示视窗尺寸不一致造成的视窗未被填满的区域填充黑色。
472
+ */
473
+ RenderModeFit = 2,
474
+ /**
475
+ * @ignore
476
+ */
477
+ RenderModeAdaptive = 3,
478
+ }
479
+
480
+ /**
481
+ * @ignore
482
+ */
483
+ export enum CameraVideoSourceType {
484
+ /**
485
+ * @ignore
486
+ */
487
+ CameraSourceFront = 0,
488
+ /**
489
+ * @ignore
490
+ */
491
+ CameraSourceBack = 1,
492
+ /**
493
+ * @ignore
494
+ */
495
+ VideoSourceUnspecified = 2,
496
+ }
497
+
498
+ /**
499
+ * @ignore
500
+ */
501
+ export enum MetaInfoKey {
502
+ /**
503
+ * @ignore
504
+ */
505
+ KeyFaceCapture = 0,
506
+ }
507
+
508
+ /**
509
+ * @ignore
510
+ */
511
+ export abstract class IVideoFrameMetaInfo {
512
+ /**
513
+ * @ignore
514
+ */
515
+ abstract getMetaInfoStr(key: MetaInfoKey): string;
516
+ }
517
+
518
+ /**
519
+ * @ignore
520
+ */
521
+ export enum PrimaryID {
522
+ /**
523
+ * @ignore
524
+ */
525
+ PrimaryidBt709 = 1,
526
+ /**
527
+ * @ignore
528
+ */
529
+ PrimaryidUnspecified = 2,
530
+ /**
531
+ * @ignore
532
+ */
533
+ PrimaryidBt470m = 4,
534
+ /**
535
+ * @ignore
536
+ */
537
+ PrimaryidBt470bg = 5,
538
+ /**
539
+ * @ignore
540
+ */
541
+ PrimaryidSmpte170m = 6,
542
+ /**
543
+ * @ignore
544
+ */
545
+ PrimaryidSmpte240m = 7,
546
+ /**
547
+ * @ignore
548
+ */
549
+ PrimaryidFilm = 8,
550
+ /**
551
+ * @ignore
552
+ */
553
+ PrimaryidBt2020 = 9,
554
+ /**
555
+ * @ignore
556
+ */
557
+ PrimaryidSmptest428 = 10,
558
+ /**
559
+ * @ignore
560
+ */
561
+ PrimaryidSmptest431 = 11,
562
+ /**
563
+ * @ignore
564
+ */
565
+ PrimaryidSmptest432 = 12,
566
+ /**
567
+ * @ignore
568
+ */
569
+ PrimaryidJedecp22 = 22,
570
+ }
571
+
572
+ /**
573
+ * @ignore
574
+ */
575
+ export enum RangeID {
576
+ /**
577
+ * @ignore
578
+ */
579
+ RangeidInvalid = 0,
580
+ /**
581
+ * @ignore
582
+ */
583
+ RangeidLimited = 1,
584
+ /**
585
+ * @ignore
586
+ */
587
+ RangeidFull = 2,
588
+ /**
589
+ * @ignore
590
+ */
591
+ RangeidDerived = 3,
592
+ }
593
+
594
+ /**
595
+ * @ignore
596
+ */
597
+ export enum MatrixID {
598
+ /**
599
+ * @ignore
600
+ */
601
+ MatrixidRgb = 0,
602
+ /**
603
+ * @ignore
604
+ */
605
+ MatrixidBt709 = 1,
606
+ /**
607
+ * @ignore
608
+ */
609
+ MatrixidUnspecified = 2,
610
+ /**
611
+ * @ignore
612
+ */
613
+ MatrixidFcc = 4,
614
+ /**
615
+ * @ignore
616
+ */
617
+ MatrixidBt470bg = 5,
618
+ /**
619
+ * @ignore
620
+ */
621
+ MatrixidSmpte170m = 6,
622
+ /**
623
+ * @ignore
624
+ */
625
+ MatrixidSmpte240m = 7,
626
+ /**
627
+ * @ignore
628
+ */
629
+ MatrixidYcocg = 8,
630
+ /**
631
+ * @ignore
632
+ */
633
+ MatrixidBt2020Ncl = 9,
634
+ /**
635
+ * @ignore
636
+ */
637
+ MatrixidBt2020Cl = 10,
638
+ /**
639
+ * @ignore
640
+ */
641
+ MatrixidSmpte2085 = 11,
642
+ /**
643
+ * @ignore
644
+ */
645
+ MatrixidCdncls = 12,
646
+ /**
647
+ * @ignore
648
+ */
649
+ MatrixidCdcls = 13,
650
+ /**
651
+ * @ignore
652
+ */
653
+ MatrixidBt2100Ictcp = 14,
654
+ }
655
+
656
+ /**
657
+ * @ignore
658
+ */
659
+ export enum TransferID {
660
+ /**
661
+ * @ignore
662
+ */
663
+ TransferidBt709 = 1,
664
+ /**
665
+ * @ignore
666
+ */
667
+ TransferidUnspecified = 2,
668
+ /**
669
+ * @ignore
670
+ */
671
+ TransferidGamma22 = 4,
672
+ /**
673
+ * @ignore
674
+ */
675
+ TransferidGamma28 = 5,
676
+ /**
677
+ * @ignore
678
+ */
679
+ TransferidSmpte170m = 6,
680
+ /**
681
+ * @ignore
682
+ */
683
+ TransferidSmpte240m = 7,
684
+ /**
685
+ * @ignore
686
+ */
687
+ TransferidLinear = 8,
688
+ /**
689
+ * @ignore
690
+ */
691
+ TransferidLog = 9,
692
+ /**
693
+ * @ignore
694
+ */
695
+ TransferidLogSqrt = 10,
696
+ /**
697
+ * @ignore
698
+ */
699
+ TransferidIec6196624 = 11,
700
+ /**
701
+ * @ignore
702
+ */
703
+ TransferidBt1361Ecg = 12,
704
+ /**
705
+ * @ignore
706
+ */
707
+ TransferidIec6196621 = 13,
708
+ /**
709
+ * @ignore
710
+ */
711
+ TransferidBt202010 = 14,
712
+ /**
713
+ * @ignore
714
+ */
715
+ TransferidBt202012 = 15,
716
+ /**
717
+ * @ignore
718
+ */
719
+ TransferidSmptest2084 = 16,
720
+ /**
721
+ * @ignore
722
+ */
723
+ TransferidSmptest428 = 17,
724
+ /**
725
+ * @ignore
726
+ */
727
+ TransferidAribStdB67 = 18,
728
+ }
729
+
730
+ /**
731
+ * @ignore
732
+ */
733
+ export class ColorSpace {
734
+ /**
735
+ * @ignore
736
+ */
737
+ primaries?: PrimaryID;
738
+ /**
739
+ * @ignore
740
+ */
741
+ transfer?: TransferID;
742
+ /**
743
+ * @ignore
744
+ */
745
+ matrix?: MatrixID;
746
+ /**
747
+ * @ignore
748
+ */
749
+ range?: RangeID;
750
+ }
751
+
752
+ /**
753
+ * @ignore
754
+ */
755
+ export class Hdr10MetadataInfo {
756
+ /**
757
+ * @ignore
758
+ */
759
+ redPrimaryX?: number;
760
+ /**
761
+ * @ignore
762
+ */
763
+ redPrimaryY?: number;
764
+ /**
765
+ * @ignore
766
+ */
767
+ greenPrimaryX?: number;
768
+ /**
769
+ * @ignore
770
+ */
771
+ greenPrimaryY?: number;
772
+ /**
773
+ * @ignore
774
+ */
775
+ bluePrimaryX?: number;
776
+ /**
777
+ * @ignore
778
+ */
779
+ bluePrimaryY?: number;
780
+ /**
781
+ * @ignore
782
+ */
783
+ whitePointX?: number;
784
+ /**
785
+ * @ignore
786
+ */
787
+ whitePointY?: number;
788
+ /**
789
+ * @ignore
790
+ */
791
+ maxMasteringLuminance?: number;
792
+ /**
793
+ * @ignore
794
+ */
795
+ minMasteringLuminance?: number;
796
+ /**
797
+ * @ignore
798
+ */
799
+ maxContentLightLevel?: number;
800
+ /**
801
+ * @ignore
802
+ */
803
+ maxFrameAverageLightLevel?: number;
804
+ }
805
+
806
+ /**
807
+ * alphaBuffer 和视频帧的相对位置。
808
+ */
809
+ export enum AlphaStitchMode {
810
+ /**
811
+ * 0:(默认)仅视频帧,即 alphaBuffer 不和视频帧拼接。
812
+ */
813
+ NoAlphaStitch = 0,
814
+ /**
815
+ * 1: alphaBuffer 位于视频帧的上方。
816
+ */
817
+ AlphaStitchUp = 1,
818
+ /**
819
+ * 2: alphaBuffer 位于视频帧的下方。
820
+ */
821
+ AlphaStitchBelow = 2,
822
+ /**
823
+ * 3: alphaBuffer 位于视频帧的左侧。
824
+ */
825
+ AlphaStitchLeft = 3,
826
+ /**
827
+ * 4: alphaBuffer 位于视频帧的右侧。
828
+ */
829
+ AlphaStitchRight = 4,
830
+ }
831
+
832
+ /**
833
+ * @ignore
834
+ */
835
+ export enum EglContextType {
836
+ /**
837
+ * @ignore
838
+ */
839
+ EglContext10 = 0,
840
+ /**
841
+ * @ignore
842
+ */
843
+ EglContext14 = 1,
844
+ }
845
+
846
+ /**
847
+ * 视频 buffer 类型。
848
+ */
849
+ export enum VideoBufferType {
850
+ /**
851
+ * 1: 类型为原始数据。
852
+ */
853
+ VideoBufferRawData = 1,
854
+ /**
855
+ * 2: 类型为原始数据。
856
+ */
857
+ VideoBufferArray = 2,
858
+ /**
859
+ * 3: 类型为 Texture 。
860
+ */
861
+ VideoBufferTexture = 3,
862
+ }
863
+
864
+ /**
865
+ * 外部视频帧。
866
+ */
867
+ export class ExternalVideoFrame {
868
+ /**
869
+ * 视频类型。详见 VideoBufferType 。
870
+ */
871
+ type?: VideoBufferType;
872
+ /**
873
+ * 像素格式。详见 VideoPixelFormat 。
874
+ */
875
+ format?: VideoPixelFormat;
876
+ /**
877
+ * 视频缓冲区。
878
+ */
879
+ buffer?: Uint8Array;
880
+ /**
881
+ * 传入视频帧的行间距,单位为像素而不是字节。对于 Texture,该值指的是 Texture 的宽度。
882
+ */
883
+ stride?: number;
884
+ /**
885
+ * 传入视频帧的高度。
886
+ */
887
+ height?: number;
888
+ /**
889
+ * 该参数仅适用于原始视频数据。
890
+ */
891
+ cropLeft?: number;
892
+ /**
893
+ * 该参数仅适用于原始视频数据。
894
+ */
895
+ cropTop?: number;
896
+ /**
897
+ * 该参数仅适用于原始视频数据。
898
+ */
899
+ cropRight?: number;
900
+ /**
901
+ * 该参数仅适用于原始视频数据。
902
+ */
903
+ cropBottom?: number;
904
+ /**
905
+ * 原始数据相关字段。指定是否对传入的视频组做顺时针旋转操作,可选值为 0, 90, 180, 270。默认为 0。
906
+ */
907
+ rotation?: number;
908
+ /**
909
+ * 传入的视频帧的时间戳,以毫秒为单位。不正确的时间戳会导致丢帧或者音视频不同步。
910
+ */
911
+ timestamp?: number;
912
+ /**
913
+ * 该参数仅适用于 Texture 格式的视频数据。指该视频帧的 Texture ID。
914
+ */
915
+ eglType?: EglContextType;
916
+ /**
917
+ * 该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。
918
+ */
919
+ textureId?: number;
920
+ /**
921
+ * @ignore
922
+ */
923
+ fenceObject?: number;
924
+ /**
925
+ * 该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。
926
+ */
927
+ matrix?: number[];
928
+ /**
929
+ * 该参数仅适用于 Texture 格式的视频数据。指 MetaData 的数据缓冲区,默认值为 NULL 。
930
+ */
931
+ metadataBuffer?: Uint8Array;
932
+ /**
933
+ * 该参数仅适用于 Texture 格式的视频数据。指 MetaData 的大小,默认值为 0 。
934
+ */
935
+ metadataSize?: number;
936
+ /**
937
+ * 采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为 [0,255],其中 0 代表背景;255 代表前景(人像)。
938
+ * 你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。
939
+ */
940
+ alphaBuffer?: Uint8Array;
941
+ /**
942
+ * 对于 BGRA 或 RGBA 格式的视频数据,你可以任选一种方式设置 Alpha 通道数据:
943
+ * 通过将该参数设置为 true 自动填写。
944
+ * 通过 alphaBuffer 参数设置。 该参数仅适用于 BGRA 或 RGBA 格式的视频数据。设置是否提取视频帧中的 Alpha 通道数据并自动填入到 alphaBuffer 中: true :提取并填充 Alpha 通道数据。 false :(默认)不提取填充 Alpha 通道数据。
945
+ */
946
+ fillAlphaBuffer?: boolean;
947
+ /**
948
+ * 当视频帧中包含 Alpha 通道数据时,设置 alphaBuffer 和视频帧的相对位置。详见 AlphaStitchMode 。
949
+ */
950
+ alphaStitchMode?: AlphaStitchMode;
951
+ /**
952
+ * @ignore
953
+ */
954
+ d3d11Texture2d?: any;
955
+ /**
956
+ * @ignore
957
+ */
958
+ textureSliceIndex?: number;
959
+ /**
960
+ * @ignore
961
+ */
962
+ hdr10MetadataInfo?: Hdr10MetadataInfo;
963
+ /**
964
+ * 视频帧的色彩空间属性,默认情况下会应用 Full Range 和 BT.709 标准配置。你可以根据自定义采集、自定义渲染的业务需求进行自定义设置,详见 [VideoColorSpace](https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace)。
965
+ */
966
+ colorSpace?: ColorSpace;
967
+ }
968
+
969
+ /**
970
+ * 视频帧的属性设置。
971
+ *
972
+ * 缓冲区给出的是指向指针的指针,该接口不能修改缓冲区的指针,只能修改缓冲区的内容。
973
+ */
974
+ export class VideoFrame {
975
+ /**
976
+ * 像素格式。详见 VideoPixelFormat 。
977
+ */
978
+ type?: VideoPixelFormat;
979
+ /**
980
+ * 视频像素宽度。
981
+ */
982
+ width?: number;
983
+ /**
984
+ * 视频像素高度。
985
+ */
986
+ height?: number;
987
+ /**
988
+ * 对 YUV 数据,表示 Y 缓冲区的行跨度;对 RGBA 数据,表示总的数据长度。 在处理视频数据时,需根据该参数处理每行像素数据之间的偏移量,否则可能导致图像失真。
989
+ */
990
+ yStride?: number;
991
+ /**
992
+ * 对 YUV 数据,表示 U 缓冲区的行跨度;对 RGBA 数据,值为 0。 在处理视频数据时,需根据该参数处理每行像素数据之间的偏移量,否则可能导致图像失真。
993
+ */
994
+ uStride?: number;
995
+ /**
996
+ * 对 YUV 数据,表示 V 缓冲区的行跨度;对 RGBA 数据,值为 0。 在处理视频数据时,需根据该参数处理每行像素数据之间的偏移量,否则可能导致图像失真。
997
+ */
998
+ vStride?: number;
999
+ /**
1000
+ * 对 YUV 数据,表示 Y 缓冲区的指针;对 RGBA 数据,表示数据缓冲区。
1001
+ */
1002
+ yBuffer?: Uint8Array;
1003
+ /**
1004
+ * 对 YUV 数据,表示 U 缓冲区的指针;对 RGBA 数据,值为空。
1005
+ */
1006
+ uBuffer?: Uint8Array;
1007
+ /**
1008
+ * 对 YUV 数据,表示 V 缓冲区的指针;对 RGBA 数据,值为空。
1009
+ */
1010
+ vBuffer?: Uint8Array;
1011
+ /**
1012
+ * 在渲染视频前设置该帧的顺时针旋转角度,目前支持 0 度、90 度、180 度,和 270 度。
1013
+ */
1014
+ rotation?: number;
1015
+ /**
1016
+ * 视频帧被渲染时的 Unix 时间戳(毫秒)。该时间戳可用于指导渲染视频帧。该参数为必填。
1017
+ */
1018
+ renderTimeMs?: number;
1019
+ /**
1020
+ * 保留参数。
1021
+ */
1022
+ avsync_type?: number;
1023
+ /**
1024
+ * 该参数仅适用于 Texture 格式的视频数据。指 MetaData 的数据缓冲区,默认值为 NULL 。
1025
+ */
1026
+ metadata_buffer?: Uint8Array;
1027
+ /**
1028
+ * 该参数仅适用于 Texture 格式的视频数据。指 MetaData 的大小,默认值为 0 。
1029
+ */
1030
+ metadata_size?: number;
1031
+ /**
1032
+ * 该参数仅适用于 Texture 格式的视频数据。Texture ID。
1033
+ */
1034
+ textureId?: number;
1035
+ /**
1036
+ * 该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。
1037
+ */
1038
+ matrix?: number[];
1039
+ /**
1040
+ * 采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为 [0,255],其中 0 代表背景;255 代表前景(人像)。
1041
+ * 你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。
1042
+ * 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。
1043
+ * 请务必确保 alphaBuffer 跟视频帧的尺寸 (width × height) 完全一致,否则可能会导致 App 崩溃。
1044
+ */
1045
+ alphaBuffer?: Uint8Array;
1046
+ /**
1047
+ * 当视频帧中包含 Alpha 通道数据时,设置 alphaBuffer 和视频帧的相对位置。详见 AlphaStitchMode 。
1048
+ */
1049
+ alphaStitchMode?: AlphaStitchMode;
1050
+ /**
1051
+ * @ignore
1052
+ */
1053
+ pixelBuffer?: Uint8Array;
1054
+ /**
1055
+ * 视频帧中的元信息。该参数需要[联系技术支持](https://ticket.shengwang.cn/)使用。
1056
+ */
1057
+ metaInfo?: IVideoFrameMetaInfo;
1058
+ /**
1059
+ * @ignore
1060
+ */
1061
+ hdr10MetadataInfo?: Hdr10MetadataInfo;
1062
+ /**
1063
+ * 视频帧的色彩空间属性,默认情况下会应用 Full Range 和 BT.709 标准配置。你可以根据自定义采集、自定义渲染的业务需求进行自定义设置,详见 [VideoColorSpace](https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace)。
1064
+ */
1065
+ colorSpace?: ColorSpace;
1066
+ }
1067
+
1068
+ /**
1069
+ * @ignore
1070
+ */
1071
+ export enum MediaPlayerSourceType {
1072
+ /**
1073
+ * @ignore
1074
+ */
1075
+ MediaPlayerSourceDefault = 0,
1076
+ /**
1077
+ * @ignore
1078
+ */
1079
+ MediaPlayerSourceFullFeatured = 1,
1080
+ /**
1081
+ * @ignore
1082
+ */
1083
+ MediaPlayerSourceSimple = 2,
1084
+ }
1085
+
1086
+ /**
1087
+ * 视频观测位置。
1088
+ */
1089
+ export enum VideoModulePosition {
1090
+ /**
1091
+ * 1: 本地采集视频数据并且经过前处理之后的位置,对应 onCaptureVideoFrame 回调。此处观测到的视频具备视频前处理的效果,可通过开启美颜、虚拟背景或水印等方式验证。
1092
+ */
1093
+ PositionPostCapturer = 1 << 0,
1094
+ /**
1095
+ * 2: 接收远端发送的视频在渲染前的位置,对应 onRenderVideoFrame 回调。
1096
+ */
1097
+ PositionPreRenderer = 1 << 1,
1098
+ /**
1099
+ * 4: 本地视频编码前的位置,对应 onPreEncodeVideoFrame 回调。此处观测到的视频具备视频前处理和编码前处理的效果:
1100
+ * 对于视频前处理效果,可通过开启美颜、虚拟背景或水印等方式验证。
1101
+ * 对于编码前处理效果,可通过设置一个较低的帧率(例如 5 fps)验证。
1102
+ */
1103
+ PositionPreEncoder = 1 << 2,
1104
+ /**
1105
+ * 8: 本地采集视频之后、前处理之前的位置。此处观测到的视频不具备前处理的效果,可通过开启美颜、虚拟背景或设置水印等方式验证。
1106
+ */
1107
+ PositionPostCapturerOrigin = 1 << 3,
1108
+ }
1109
+
1110
+ /**
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
+ * 视频内容审核模块的类型。
1130
+ */
1131
+ export enum ContentInspectType {
1132
+ /**
1133
+ * 0:(默认)该功能模块无实际功能。请不要将 type 设为该值。
1134
+ */
1135
+ ContentInspectInvalid = 0,
1136
+ /**
1137
+ * @ignore
1138
+ */
1139
+ ContentInspectModeration = 1,
1140
+ /**
1141
+ * 2:使用声网自研插件截图上传。SDK 会对视频流进行截图并上传。
1142
+ */
1143
+ ContentInspectSupervision = 2,
1144
+ /**
1145
+ * 3:使用云市场插件截图上传。SDK 会使用云市场视频审核插件对视频流进行截图并上传。
1146
+ */
1147
+ ContentInspectImageModeration = 3,
1148
+ }
1149
+
1150
+ /**
1151
+ * ContentInspectModule 结构体,用于配置本地截图上传的频率。
1152
+ */
1153
+ export class ContentInspectModule {
1154
+ /**
1155
+ * 功能模块的类型。详见 ContentInspectType 。
1156
+ */
1157
+ type?: ContentInspectType;
1158
+ /**
1159
+ * 本地截图上传的间隔,单位为秒,取值必须大于 0。默认值为 0,表示不进行截图上传。推荐值为 10 秒,你也可以根据业务需求自行调整。
1160
+ */
1161
+ interval?: number;
1162
+ /**
1163
+ * 视频观察器的位置。详见 VideoModulePosition 。
1164
+ */
1165
+ position?: VideoModulePosition;
1166
+ }
1167
+
1168
+ /**
1169
+ * 本地截图上传配置。
1170
+ */
1171
+ export class ContentInspectConfig {
1172
+ /**
1173
+ * 附加信息,最大长度为 1024 字节。
1174
+ * SDK 会将附加信息和截图一起上传至声网服务器;截图完成后,声网服务器会将附加信息随回调通知一起发送给你的服务器。
1175
+ */
1176
+ extraInfo?: string;
1177
+ /**
1178
+ * (可选)云市场视频审核相关服务端配置,该参数仅在 ContentInspectModule 中的 type 设置为 ContentInspectImageModeration 时生效。如需使用,请[联系技术支持](https://ticket.shengwang.cn/)。
1179
+ */
1180
+ serverConfig?: string;
1181
+ /**
1182
+ * 功能模块。详见 ContentInspectModule 。
1183
+ * 最多支持配置 32 个 ContentInspectModule 实例, MAX_CONTENT_INSPECT_MODULE_COUNT 的取值范围为 [1,32] 中的整数。 一个功能模块最多只能配置一个实例。目前仅支持截图上传功能。
1184
+ */
1185
+ modules?: ContentInspectModule[];
1186
+ /**
1187
+ * 功能模块数,即配置的 ContentInspectModule 实例的数量,必须与 modules 中配置的实例个数一致。最大值为 32。
1188
+ */
1189
+ moduleCount?: number;
1190
+ }
1191
+
1192
+ /**
1193
+ * 视频截图设置。
1194
+ */
1195
+ export class SnapshotConfig {
1196
+ /**
1197
+ * 请确保目录存在且可写。 截图的本地保存路径,需精确到文件名及格式,例如:
1198
+ * iOS: /App Sandbox/Library/Caches/example.jpg
1199
+ * Android: /storage/emulated/0/Android/data/<package name>/files/example.jpg
1200
+ */
1201
+ filePath?: string;
1202
+ /**
1203
+ * 截图的视频帧在视频链路中的位置。详见 VideoModulePosition 。
1204
+ */
1205
+ position?: VideoModulePosition;
1206
+ }
1207
+
1208
+ /**
1209
+ * 该类用于获取原始的 PCM 音频数据。
1210
+ *
1211
+ * 你可以继承这个类,实现 onFrame 回调来获得 PCM 音频数据。
1212
+ */
1213
+ export interface IAudioPcmFrameSink {
1214
+ /**
1215
+ * 已获取音频帧回调。
1216
+ *
1217
+ * 注册音频数据观测器后,每次接收到一帧音频帧时,都会触发该回调,报告音频帧信息。
1218
+ *
1219
+ * @param frame 音频帧信息。详见 AudioPcmFrame 。
1220
+ */
1221
+ onFrame?(frame: AudioPcmFrame): void;
1222
+ }
1223
+
1224
+ /**
1225
+ * 音频帧类型。
1226
+ */
1227
+ export enum AudioFrameType {
1228
+ /**
1229
+ * 0: PCM 16
1230
+ */
1231
+ FrameTypePcm16 = 0,
1232
+ }
1233
+
1234
+ /**
1235
+ * 原始音频数据。
1236
+ */
1237
+ export class AudioFrame {
1238
+ /**
1239
+ * 音频帧类型,详见 AudioFrameType 。
1240
+ */
1241
+ type?: AudioFrameType;
1242
+ /**
1243
+ * 每个声道的采样点数。
1244
+ */
1245
+ samplesPerChannel?: number;
1246
+ /**
1247
+ * 每个采样点的字节数。对于 PCM 来说,一般使用 16 bit,即两个字节。
1248
+ */
1249
+ bytesPerSample?: BytesPerSample;
1250
+ /**
1251
+ * 声道数量(如果是立体声,数据是交叉的)。
1252
+ * 1: 单声道
1253
+ * 2: 双声道
1254
+ */
1255
+ channels?: number;
1256
+ /**
1257
+ * 每声道每秒的采样点数。
1258
+ */
1259
+ samplesPerSec?: number;
1260
+ /**
1261
+ * 声音数据缓存区(如果是立体声,数据是交叉存储的)。
1262
+ * 缓存区数据大小 buffer = samples × channels × bytesPerSample 。
1263
+ */
1264
+ buffer?: Uint8Array;
1265
+ /**
1266
+ * 外部音频帧的渲染时间戳。
1267
+ * 你可以使用该时间戳还原音频帧顺序;在有视频的场景中(包含使用外部视频源的场景),该参数可以用于实现音视频同步。
1268
+ */
1269
+ renderTimeMs?: number;
1270
+ /**
1271
+ * 保留参数。
1272
+ */
1273
+ avsync_type?: number;
1274
+ /**
1275
+ * @ignore
1276
+ */
1277
+ presentationMs?: number;
1278
+ /**
1279
+ * @ignore
1280
+ */
1281
+ audioTrackNumber?: number;
1282
+ /**
1283
+ * @ignore
1284
+ */
1285
+ rtpTimestamp?: number;
1286
+ }
1287
+
1288
+ /**
1289
+ * @ignore
1290
+ */
1291
+ export enum AudioFramePosition {
1292
+ /**
1293
+ * @ignore
1294
+ */
1295
+ AudioFramePositionNone = 0x0000,
1296
+ /**
1297
+ * @ignore
1298
+ */
1299
+ AudioFramePositionPlayback = 0x0001,
1300
+ /**
1301
+ * @ignore
1302
+ */
1303
+ AudioFramePositionRecord = 0x0002,
1304
+ /**
1305
+ * @ignore
1306
+ */
1307
+ AudioFramePositionMixed = 0x0004,
1308
+ /**
1309
+ * @ignore
1310
+ */
1311
+ AudioFramePositionBeforeMixing = 0x0008,
1312
+ /**
1313
+ * @ignore
1314
+ */
1315
+ AudioFramePositionEarMonitoring = 0x0010,
1316
+ }
1317
+
1318
+ /**
1319
+ * 音频数据格式。
1320
+ *
1321
+ * SDK 会根据 AudioParams 设置以下回调中的音频数据格式: onRecordAudioFrame onPlaybackAudioFrame onMixedAudioFrame
1322
+ * SDK 会通过 AudioParams 中的 samplesPerCall 、 sampleRate 和 channel 参数计算采样间隔,并根据该采样间隔触发 onRecordAudioFrame 、 onPlaybackAudioFrame 、 onMixedAudioFrame 和 onEarMonitoringAudioFrame 回调。
1323
+ * 采样间隔 = samplesPerCall /(sampleRate × channel)。
1324
+ * 请确保采样间隔不得小于 0.01 (s)。
1325
+ */
1326
+ export class AudioParams {
1327
+ /**
1328
+ * 数据的采样率,单位为 Hz,取值如下:
1329
+ * 8000
1330
+ * 16000(默认值)
1331
+ * 32000
1332
+ * 44100
1333
+ * 48000
1334
+ */
1335
+ sample_rate?: number;
1336
+ /**
1337
+ * 数据的声道数,取值如下:
1338
+ * 1:单声道(默认值)
1339
+ * 2:双声道
1340
+ */
1341
+ channels?: number;
1342
+ /**
1343
+ * 数据的使用模式。详见 RawAudioFrameOpModeType 。
1344
+ */
1345
+ mode?: RawAudioFrameOpModeType;
1346
+ /**
1347
+ * 数据的采样点数,如旁路推流应用中通常为 1024。
1348
+ */
1349
+ samples_per_call?: number;
1350
+ }
1351
+
1352
+ /**
1353
+ * 音频观测器。
1354
+ *
1355
+ * 你可以调用 registerAudioFrameObserver 注册或取消注册 IAudioFrameObserverBase 音频观测器。
1356
+ */
1357
+ export interface IAudioFrameObserverBase {
1358
+ /**
1359
+ * 获得采集的原始音频数据。
1360
+ *
1361
+ * 为保证采集的音频数据格式符合预期,你可以在如下方法设置音频的数据格式:调用 setRecordingAudioFrameParameters 设置音频数据格式后,调用 registerAudioFrameObserver 注册音频观测器对象,SDK 会根据该方法中的参数计算采样间隔,并根据该采样间隔触发 onRecordAudioFrame 回调。
1362
+ *
1363
+ * @param channelId 频道 ID。
1364
+ * @param audioFrame 音频原始数据。详见 AudioFrame 。
1365
+ */
1366
+ onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1367
+
1368
+ /**
1369
+ * 获得播放的原始音频数据。
1370
+ *
1371
+ * 为保证播放的音频数据格式符合预期,你可以在如下方法设置音频的数据格式:调用 setPlaybackAudioFrameParameters 设置音频数据格式后,调用 registerAudioFrameObserver 注册音频观测器对象,SDK 会根据该方法中的参数计算采样间隔,并根据该采样间隔触发 onPlaybackAudioFrame 回调。
1372
+ *
1373
+ * @param channelId 频道 ID。
1374
+ * @param audioFrame 音频原始数据。详见 AudioFrame 。
1375
+ */
1376
+ onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1377
+
1378
+ /**
1379
+ * 获取采集和播放音频混音后的数据。
1380
+ *
1381
+ * 为保证采集和播放混音后的音频数据格式符合预期,你可以在如下方法设置音频的数据格式:调用 setMixedAudioFrameParameters 设置音频数据格式后,调用 registerAudioFrameObserver 注册音频观测器对象,SDK 会根据该方法中的参数计算采样间隔,并根据该采样间隔触发 onMixedAudioFrame 回调。
1382
+ *
1383
+ * @param channelId 频道 ID。
1384
+ * @param audioFrame 音频原始数据。详见 AudioFrame 。
1385
+ */
1386
+ onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
1387
+
1388
+ /**
1389
+ * 获得耳返的原始音频数据。
1390
+ *
1391
+ * 为保证耳返的音频数据格式符合预期,你可以使用如下方法设置耳返音频数据格式:调用 setEarMonitoringAudioFrameParameters 设置音频数据格式后,调用 registerAudioFrameObserver 注册音频观测器对象,SDK 会根据该方法中的参数计算采样间隔,并根据该采样间隔触发 onEarMonitoringAudioFrame 回调。
1392
+ *
1393
+ * @param audioFrame 音频原始数据。详见 AudioFrame 。
1394
+ */
1395
+ onEarMonitoringAudioFrame?(audioFrame: AudioFrame): void;
1396
+ }
1397
+
1398
+ /**
1399
+ * 音频观测器。
1400
+ *
1401
+ * 你可以调用 registerAudioFrameObserver 注册或取消注册 IAudioFrameObserver 音频观测器。
1402
+ */
1403
+ export interface IAudioFrameObserver extends IAudioFrameObserverBase {
1404
+ /**
1405
+ * 获取所订阅的远端用户混音前的声音。
1406
+ *
1407
+ * 由于框架的限制,该回调不支持将处理后的音频数据发送回 SDK。
1408
+ *
1409
+ * @param channelId 频道 ID。
1410
+ * @param uid 订阅的远端用户的 ID。
1411
+ * @param audioFrame 音频原始数据。详见 AudioFrame 。
1412
+ */
1413
+ onPlaybackAudioFrameBeforeMixing?(
1414
+ channelId: string,
1415
+ uid: number,
1416
+ audioFrame: AudioFrame
1417
+ ): void;
1418
+ }
1419
+
1420
+ /**
1421
+ * 音频频谱数据。
1422
+ */
1423
+ export class AudioSpectrumData {
1424
+ /**
1425
+ * 音频频谱数据。声网将声音频率分为 256 个频域,通过该参数报告各频域的能量值,每个能量值的取值范围为 [-300,1],单位为 dBFS。
1426
+ */
1427
+ audioSpectrumData?: number[];
1428
+ /**
1429
+ * 音频频谱数据长度为 256。
1430
+ */
1431
+ dataLength?: number;
1432
+ }
1433
+
1434
+ /**
1435
+ * 远端用户的音频频谱信息。
1436
+ */
1437
+ export class UserAudioSpectrumInfo {
1438
+ /**
1439
+ * 远端用户 ID。
1440
+ */
1441
+ uid?: number;
1442
+ /**
1443
+ * @ignore
1444
+ */
1445
+ spectrumData?: AudioSpectrumData;
1446
+ }
1447
+
1448
+ /**
1449
+ * 音频频谱观测器。
1450
+ */
1451
+ export interface IAudioSpectrumObserver {
1452
+ /**
1453
+ * 获取本地音频频谱。
1454
+ *
1455
+ * 成功调用 registerAudioSpectrumObserver 实现 IAudioSpectrumObserver 中的 onLocalAudioSpectrum 回调并调用 enableAudioSpectrumMonitor 开启音频频谱监测后,SDK 会按照你设置的时间间隔触发该回调,报告编码前的本地音频数据的频谱。
1456
+ *
1457
+ * @param data 本地用户的音频频谱数据。详见 AudioSpectrumData 。
1458
+ */
1459
+ onLocalAudioSpectrum?(data: AudioSpectrumData): void;
1460
+
1461
+ /**
1462
+ * 获取远端音频频谱。
1463
+ *
1464
+ * 成功调用 registerAudioSpectrumObserver 实现 IAudioSpectrumObserver 中的 onRemoteAudioSpectrum 回调并调用 enableAudioSpectrumMonitor 开启音频频谱监测后,SDK 会按照你设置的时间间隔触发该回调,报告接收到的远端音频数据的频谱。
1465
+ *
1466
+ * @param spectrums 远端用户的音频频谱信息,详见 UserAudioSpectrumInfo 。 数组数量等于 SDK 监测到的远端用户数量,数组为空表示没有监测到远端用户的音频频谱。
1467
+ * @param spectrumNumber 远端用户的数量。
1468
+ */
1469
+ onRemoteAudioSpectrum?(
1470
+ spectrums: UserAudioSpectrumInfo[],
1471
+ spectrumNumber: number
1472
+ ): void;
1473
+ }
1474
+
1475
+ /**
1476
+ * 用于接收编码后的视频图像的类。
1477
+ */
1478
+ export interface IVideoEncodedFrameObserver {
1479
+ /**
1480
+ * 报告接收端已收到远端发送的待解码视频帧。
1481
+ *
1482
+ * 调用 setRemoteVideoSubscriptionOptions 方法并将 encodedFrameOnly 设置为 true 时,SDK 会在本地触发该回调,上报接收到的编码后视频帧信息。
1483
+ *
1484
+ * @param channelId 频道名。
1485
+ * @param uid 远端用户 ID。
1486
+ * @param imageBuffer 视频图像 buffer。
1487
+ * @param length 视频图像的数据长度。
1488
+ * @param videoEncodedFrameInfo 编码后的视频帧信息,详见 EncodedVideoFrameInfo 。
1489
+ */
1490
+ onEncodedVideoFrameReceived?(
1491
+ channelId: string,
1492
+ uid: number,
1493
+ imageBuffer: Uint8Array,
1494
+ length: number,
1495
+ videoEncodedFrameInfo: EncodedVideoFrameInfo
1496
+ ): void;
1497
+ }
1498
+
1499
+ /**
1500
+ * 视频帧处理模式。
1501
+ */
1502
+ export enum VideoFrameProcessMode {
1503
+ /**
1504
+ * 只读模式。
1505
+ * 只读模式下,你不修改视频帧,视频观测器相当于渲染器。
1506
+ */
1507
+ ProcessModeReadOnly = 0,
1508
+ /**
1509
+ * 读写模式。
1510
+ * 读写模式下,你会修改视频帧,视频观测器相当于视频 filter。
1511
+ */
1512
+ ProcessModeReadWrite = 1,
1513
+ }
1514
+
1515
+ /**
1516
+ * 视频观测器。
1517
+ *
1518
+ * 你可以调用 registerVideoFrameObserver 注册或取消注册 IVideoFrameObserver 视频观测器。
1519
+ */
1520
+ export interface IVideoFrameObserver {
1521
+ /**
1522
+ * 获取本地设备采集到的视频数据。
1523
+ *
1524
+ * 你可以在回调中获取本地设备采集到的原始视频数据。
1525
+ * 如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。
1526
+ * 建议你在修改 videoFrame 中的参数时,需确保修改后的参数跟视频帧缓冲区中的视频帧实际情况保持一致,否则可能导致本地预览画面和对端的视频画面出现非预期的旋转、失真等问题。
1527
+ * 建议你通过 C++ API 实现该回调。
1528
+ * 由于框架的限制,该回调不支持将处理后的视频数据发送回 SDK。
1529
+ *
1530
+ * @param sourceType 视频源类型,可能的视频源包括:摄像头、屏幕或媒体播放器。详见 VideoSourceType 。
1531
+ * @param videoFrame 视频帧数据。详见 VideoFrame 。 通过该回调获取的视频帧数据格式默认值如下:
1532
+ * Android:I420
1533
+ * iOS:I420
1534
+ */
1535
+ onCaptureVideoFrame?(
1536
+ sourceType: VideoSourceType,
1537
+ videoFrame: VideoFrame
1538
+ ): void;
1539
+
1540
+ /**
1541
+ * 获取本地视频编码前的视频数据。
1542
+ *
1543
+ * 成功注册视频数据观测器后,SDK 会在捕捉到每个视频帧时触发该回调。你可以在回调中获取编码前的视频数据,然后根据场景需要,对视频数据进行处理。
1544
+ * 完成处理后,你可以在该回调中,传入处理后的视频数据将其发送回 SDK。
1545
+ * 建议你通过 C++ API 实现该回调。
1546
+ * 由于框架的限制,该回调不支持将处理后的视频数据发送回 SDK。
1547
+ * 此处获取的视频数据已经过前处理,如裁剪、旋转和美颜等。
1548
+ * 建议你在修改 videoFrame 中的参数时,需确保修改后的参数跟视频帧缓冲区中的视频帧实际情况保持一致,否则可能导致本地预览画面和对端的视频画面出现非预期的旋转、失真等问题。
1549
+ *
1550
+ * @param sourceType 视频源的类型。详见 VideoSourceType 。
1551
+ * @param videoFrame 视频帧数据。详见 VideoFrame 。 通过该回调获取的视频帧数据格式默认值如下:
1552
+ * Android:I420
1553
+ * iOS:I420
1554
+ */
1555
+ onPreEncodeVideoFrame?(
1556
+ sourceType: VideoSourceType,
1557
+ videoFrame: VideoFrame
1558
+ ): void;
1559
+
1560
+ /**
1561
+ * @ignore
1562
+ */
1563
+ onMediaPlayerVideoFrame?(videoFrame: VideoFrame, mediaPlayerId: number): void;
1564
+
1565
+ /**
1566
+ * 获取远端发送的视频数据。
1567
+ *
1568
+ * 成功注册视频数据观测器后,SDK 会在捕捉到每个视频帧时触发该回调。你可以在回调中获取远端发送的渲染前的视频数据,然后根据场景需要,对视频数据进行处理。
1569
+ * 如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。
1570
+ * 建议你通过 C++ API 实现该回调。
1571
+ * 由于框架的限制,该回调不支持将处理后的视频数据发送回 SDK。
1572
+ * 建议你在修改 videoFrame 中的参数时,需确保修改后的参数跟视频帧缓冲区中的视频帧实际情况保持一致,否则可能导致本地预览画面和对端的视频画面出现非预期的旋转、失真等问题。
1573
+ *
1574
+ * @param channelId 频道 ID。
1575
+ * @param remoteUid 发送该帧视频的远端用户 ID。
1576
+ * @param videoFrame 视频帧数据。详见 VideoFrame 。 通过该回调获取的视频帧数据格式默认值如下:
1577
+ * Android:I420
1578
+ * iOS:I420
1579
+ */
1580
+ onRenderVideoFrame?(
1581
+ channelId: string,
1582
+ remoteUid: number,
1583
+ videoFrame: VideoFrame
1584
+ ): void;
1585
+
1586
+ /**
1587
+ * @ignore
1588
+ */
1589
+ onTranscodedVideoFrame?(videoFrame: VideoFrame): void;
1590
+ }
1591
+
1592
+ /**
1593
+ * 外部视频帧编码类型。
1594
+ */
1595
+ export enum ExternalVideoSourceType {
1596
+ /**
1597
+ * 0:未编码视频帧。
1598
+ */
1599
+ VideoFrame = 0,
1600
+ /**
1601
+ * 1:已编码视频帧。
1602
+ */
1603
+ EncodedVideoFrame = 1,
1604
+ }
1605
+
1606
+ /**
1607
+ * 录制文件的格式。
1608
+ */
1609
+ export enum MediaRecorderContainerFormat {
1610
+ /**
1611
+ * 1:(默认)MP4。
1612
+ */
1613
+ FormatMp4 = 1,
1614
+ }
1615
+
1616
+ /**
1617
+ * 录制内容。
1618
+ */
1619
+ export enum MediaRecorderStreamType {
1620
+ /**
1621
+ * 1: 仅音频。
1622
+ */
1623
+ StreamTypeAudio = 0x01,
1624
+ /**
1625
+ * 2: 仅视频。
1626
+ */
1627
+ StreamTypeVideo = 0x02,
1628
+ /**
1629
+ * 3: (默认)音视频。
1630
+ */
1631
+ StreamTypeBoth = 0x01 | 0x02,
1632
+ }
1633
+
1634
+ /**
1635
+ * 当前的录制状态。
1636
+ */
1637
+ export enum RecorderState {
1638
+ /**
1639
+ * -1: 音视频流录制出错,错误原因详见 RecorderReasonCode 。
1640
+ */
1641
+ RecorderStateError = -1,
1642
+ /**
1643
+ * 2: 音视频流录制开始。
1644
+ */
1645
+ RecorderStateStart = 2,
1646
+ /**
1647
+ * 3: 音视频流录制停止。
1648
+ */
1649
+ RecorderStateStop = 3,
1650
+ }
1651
+
1652
+ /**
1653
+ * 录制状态出错的原因。
1654
+ */
1655
+ export enum RecorderReasonCode {
1656
+ /**
1657
+ * 0: 一切正常。
1658
+ */
1659
+ RecorderReasonNone = 0,
1660
+ /**
1661
+ * @ignore
1662
+ */
1663
+ RecorderReasonWriteFailed = 1,
1664
+ /**
1665
+ * @ignore
1666
+ */
1667
+ RecorderReasonNoStream = 2,
1668
+ /**
1669
+ * @ignore
1670
+ */
1671
+ RecorderReasonOverMaxDuration = 3,
1672
+ /**
1673
+ * @ignore
1674
+ */
1675
+ RecorderReasonConfigChanged = 4,
1676
+ }
1677
+
1678
+ /**
1679
+ * 音视频流录制配置。
1680
+ */
1681
+ export class MediaRecorderConfiguration {
1682
+ /**
1683
+ * 请确保你指定的路径存在并且可写。 录制文件在本地保存的绝对路径,需精确到文件名及格式。例如:
1684
+ * iOS: /App Sandbox/Library/Caches/example.mp4
1685
+ * Android: /storage/emulated/0/Android/data/<package name>/files/example.mp4
1686
+ */
1687
+ storagePath?: string;
1688
+ /**
1689
+ * 录制文件的格式。详见 MediaRecorderContainerFormat 。
1690
+ */
1691
+ containerFormat?: MediaRecorderContainerFormat;
1692
+ /**
1693
+ * 录制内容。详见 MediaRecorderStreamType 。
1694
+ */
1695
+ streamType?: MediaRecorderStreamType;
1696
+ /**
1697
+ * 最大录制时长,单位为毫秒,默认值为 120000。
1698
+ */
1699
+ maxDurationMs?: number;
1700
+ /**
1701
+ * 录制信息更新间隔,单位为毫秒,取值范围为 [1000,10000]。SDK 会根据该值的设置触发 onRecorderInfoUpdated 回调,报告更新后的录制信息。
1702
+ */
1703
+ recorderInfoUpdateInterval?: number;
1704
+ /**
1705
+ * 录制视频的宽度 (px),宽 × 高的最大值不应超过 3840 × 2160。
1706
+ * 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type 设置为 Preview 时需要传入。
1707
+ */
1708
+ width?: number;
1709
+ /**
1710
+ * 录制视频的高度 (px),宽 × 高的最大值不超过 3840 × 2160。
1711
+ * 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type 设置为 Preview 时需要传入。
1712
+ */
1713
+ height?: number;
1714
+ /**
1715
+ * 录制视频的帧率,最高值不超过 30,如: 5、10、15、24、30 等。
1716
+ * 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type 设置为 Preview 时需要传入。
1717
+ */
1718
+ fps?: number;
1719
+ /**
1720
+ * 录制音频的采样率 (Hz),可设置为 16000,32000,44100 或 48000。
1721
+ * 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type 设置为 Preview 时需要传入。
1722
+ */
1723
+ sample_rate?: number;
1724
+ /**
1725
+ * 录制音频的声道数:
1726
+ * 1: 单声道
1727
+ * 2: 双声道 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type 设置为 Preview 时需要传入。
1728
+ */
1729
+ channel_num?: number;
1730
+ /**
1731
+ * 录制视频源的类型。详见 VideoSourceType 。
1732
+ * 该参数仅在 调用 createMediaRecorder 且将 RecorderStreamInfo 中的 type 设置为 Preview 时需要传入。
1733
+ */
1734
+ videoSourceType?: VideoSourceType;
1735
+ }
1736
+
1737
+ /**
1738
+ * 人脸信息观测器。
1739
+ *
1740
+ * 你可以调用 registerFaceInfoObserver 注册 IFaceInfoObserver 观测器。
1741
+ */
1742
+ export interface IFaceInfoObserver {
1743
+ /**
1744
+ * 报告已获取语音驱动插件处理后的人脸信息。
1745
+ *
1746
+ * @param outFaceInfo 输出参数,语音驱动插件处理后的人脸信息 JSON 字符串,包含以下字段:
1747
+ * faces:Object 序列。包含识别到的人脸信息,每一张人脸对应一个 Object。
1748
+ * blendshapes:Object。面捕系数集,命名符合 ARkit 标准,内部的键值对为每一个 blendshape 系数。blendshape 系数为浮点,取值范围为 [0.0,1.0]。
1749
+ * rotation:Object 序列。头部旋转量,包含以下三个键值对,取值为浮点数,范围为 [-180.0,180.0]:
1750
+ * pitch:头部俯仰角度。低头为正值,抬头为负值。
1751
+ * yaw:头部水平旋转角度。左转为正值,右转为负值。
1752
+ * roll:头部垂直旋转角度。右倾为正值,左倾为负值。
1753
+ * timestamp:String。输出结果的时间戳,单位为毫秒。 以下为 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" }
1754
+ *
1755
+ * @returns
1756
+ * true : 人脸信息 JSON 解析成功。 false : 人脸信息 JSON 解析失败。
1757
+ */
1758
+ onFaceInfo?(outFaceInfo: string): void;
1759
+ }
1760
+
1761
+ /**
1762
+ * 录制文件信息。
1763
+ */
1764
+ export class RecorderInfo {
1765
+ /**
1766
+ * 录制文件的绝对存储路径。
1767
+ */
1768
+ fileName?: string;
1769
+ /**
1770
+ * 录制文件的时长,单位为毫秒。
1771
+ */
1772
+ durationMs?: number;
1773
+ /**
1774
+ * 录制文件的大小,单位为字节。
1775
+ */
1776
+ fileSize?: number;
1777
+ }
1778
+
1779
+ /**
1780
+ * 包含音视频录制的事件。
1781
+ */
1782
+ export interface IMediaRecorderObserver {
1783
+ /**
1784
+ * 录制状态发生改变回调。
1785
+ *
1786
+ * 音视频流录制状态发生改变时,SDK 会触发该回调,报告当前的录制状态和引起录制状态改变的原因。
1787
+ *
1788
+ * @param channelId 频道名称。
1789
+ * @param uid 用户 ID。
1790
+ * @param state 当前的录制状态。详见 RecorderState 。
1791
+ * @param reason 录制状态出错的原因。详见 RecorderReasonCode 。
1792
+ */
1793
+ onRecorderStateChanged?(
1794
+ channelId: string,
1795
+ uid: number,
1796
+ state: RecorderState,
1797
+ reason: RecorderReasonCode
1798
+ ): void;
1799
+
1800
+ /**
1801
+ * 录制信息更新回调。
1802
+ *
1803
+ * 成功注册该回调并开启音视频流录制后,SDK 会根据你在 MediaRecorderConfiguration 中设置的 recorderInfoUpdateInterval 的值周期性触发该回调,报告当前录制文件的文件名、时长和大小。
1804
+ *
1805
+ * @param channelId 频道名称。
1806
+ * @param uid 用户 ID。
1807
+ * @param info 录制文件信息。详见 RecorderInfo 。
1808
+ */
1809
+ onRecorderInfoUpdated?(
1810
+ channelId: string,
1811
+ uid: number,
1812
+ info: RecorderInfo
1813
+ ): void;
1814
+ }