agora-electron-sdk 4.3.2 → 4.4.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/gulpfile.js +3 -1
  2. package/js/AgoraSdk.js +4 -4
  3. package/js/Private/AgoraBase.js +367 -326
  4. package/js/Private/AgoraMediaBase.js +265 -76
  5. package/js/Private/AgoraMediaPlayerTypes.js +12 -30
  6. package/js/Private/IAgoraH265Transcoder.js +2 -5
  7. package/js/Private/IAgoraLog.js +2 -5
  8. package/js/Private/IAgoraMediaEngine.js +2 -5
  9. package/js/Private/IAgoraMediaPlayer.js +4 -10
  10. package/js/Private/IAgoraMediaRecorder.js +2 -5
  11. package/js/Private/IAgoraMediaStreamingSource.js +2 -5
  12. package/js/Private/IAgoraMusicContentCenter.js +21 -68
  13. package/js/Private/IAgoraRhythmPlayer.js +2 -5
  14. package/js/Private/IAgoraRtcEngine.js +76 -130
  15. package/js/Private/IAgoraRtcEngineEx.js +5 -28
  16. package/js/Private/IAgoraSpatialAudio.js +6 -15
  17. package/js/Private/IAudioDeviceManager.js +2 -5
  18. package/js/Private/impl/AgoraMediaBaseImpl.js +11 -14
  19. package/js/Private/impl/IAgoraH265TranscoderImpl.js +43 -46
  20. package/js/Private/impl/IAgoraMediaEngineImpl.js +155 -172
  21. package/js/Private/impl/IAgoraMediaPlayerImpl.js +534 -546
  22. package/js/Private/impl/IAgoraMediaRecorderImpl.js +26 -29
  23. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +218 -251
  24. package/js/Private/impl/IAgoraRtcEngineExImpl.js +434 -436
  25. package/js/Private/impl/IAgoraRtcEngineImpl.js +2445 -2423
  26. package/js/Private/impl/IAgoraSpatialAudioImpl.js +167 -170
  27. package/js/Private/impl/IAudioDeviceManagerImpl.js +232 -235
  28. package/js/Private/internal/AgoraH265TranscoderInternal.js +33 -57
  29. package/js/Private/internal/AgoraMediaBaseInternal.js +9 -28
  30. package/js/Private/internal/AudioDeviceManagerInternal.js +24 -44
  31. package/js/Private/internal/IrisApiEngine.js +94 -145
  32. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +3 -23
  33. package/js/Private/internal/MediaEngineInternal.js +69 -94
  34. package/js/Private/internal/MediaPlayerInternal.js +105 -125
  35. package/js/Private/internal/MediaRecorderInternal.js +37 -64
  36. package/js/Private/internal/MusicContentCenterInternal.js +92 -129
  37. package/js/Private/internal/RtcEngineExInternal.js +213 -243
  38. package/js/Private/ti/AgoraBase-ti.js +2 -2
  39. package/js/Private/ti/AgoraMediaBase-ti.js +2 -2
  40. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
  41. package/js/Private/ti/IAgoraH265Transcoder-ti.js +2 -2
  42. package/js/Private/ti/IAgoraLog-ti.js +1 -1
  43. package/js/Private/ti/IAgoraMediaEngine-ti.js +1 -1
  44. package/js/Private/ti/IAgoraMediaPlayer-ti.js +2 -2
  45. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +2 -2
  46. package/js/Private/ti/IAgoraMediaRecorder-ti.js +1 -1
  47. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +1 -1
  48. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +2 -2
  49. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
  50. package/js/Private/ti/IAgoraRtcEngine-ti.js +7 -7
  51. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +1 -1
  52. package/js/Private/ti/IAgoraSpatialAudio-ti.js +1 -1
  53. package/js/Private/ti/IAudioDeviceManager-ti.js +1 -1
  54. package/js/Renderer/AgoraView.js +100 -145
  55. package/js/Renderer/IRenderer.js +43 -53
  56. package/js/Renderer/IRendererManager.js +106 -132
  57. package/js/Renderer/RendererCache.js +63 -96
  58. package/js/Renderer/RendererManager.js +35 -69
  59. package/js/Renderer/WebGLRenderer/index.js +77 -106
  60. package/js/Renderer/YUVCanvasRenderer/index.js +18 -40
  61. package/js/Utils.js +45 -64
  62. package/package.json +9 -7
  63. package/scripts/checkElectron.js +41 -0
  64. package/scripts/downloadPrebuild.js +56 -24
  65. package/scripts/synclib.js +6 -6
  66. package/ts/Private/AgoraBase.ts +269 -4
  67. package/ts/Private/AgoraMediaBase.ts +343 -1
  68. package/ts/Private/IAgoraMediaEngine.ts +3 -3
  69. package/ts/Private/IAgoraRtcEngine.ts +130 -119
  70. package/ts/Private/IAgoraRtcEngineEx.ts +14 -9
  71. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +30 -0
  72. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +181 -61
  73. package/ts/Private/internal/IrisApiEngine.ts +3 -7
  74. package/ts/Private/internal/MediaEngineInternal.ts +0 -1
  75. package/ts/Private/internal/RtcEngineExInternal.ts +8 -4
  76. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +5 -5
  77. package/ts/Renderer/IRenderer.ts +1 -2
  78. package/ts/Renderer/IRendererManager.ts +21 -12
  79. package/ts/Utils.ts +15 -0
  80. package/types/Private/AgoraBase.d.ts +264 -8
  81. package/types/Private/AgoraBase.d.ts.map +1 -1
  82. package/types/Private/AgoraMediaBase.d.ts +336 -1
  83. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  84. package/types/Private/IAgoraMediaEngine.d.ts +3 -3
  85. package/types/Private/IAgoraRtcEngine.d.ts +106 -116
  86. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  87. package/types/Private/IAgoraRtcEngineEx.d.ts +10 -10
  88. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  89. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +3 -1
  90. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
  91. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +13 -5
  92. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  93. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
  94. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -1
  95. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
  96. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  97. package/types/Renderer/IRenderer.d.ts.map +1 -1
  98. package/types/Renderer/IRendererManager.d.ts.map +1 -1
  99. package/types/Utils.d.ts +4 -0
  100. package/types/Utils.d.ts.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import './extension/IAgoraRtcEngineExtension';
2
- import { AudienceLatencyLevelType, AudioAinsMode, AudioEffectPreset, AudioEncodedFrameObserverConfig, AudioProfileType, AudioRecordingConfiguration, AudioSampleRateType, AudioScenarioType, AudioSessionOperationRestriction, AudioVolumeInfo, BeautyOptions, CameraFocalLengthType, CameraStabilizationMode, CaptureBrightnessLevelType, ChannelMediaRelayConfiguration, ChannelMediaRelayError, ChannelMediaRelayState, ChannelProfileType, ClientRoleChangeFailedReason, ClientRoleOptions, ClientRoleType, CodecCapInfo, ColorEnhanceOptions, ConnectionChangedReasonType, ConnectionStateType, DataStreamConfig, DeviceInfo, DownlinkNetworkInfo, EarMonitoringFilterType, EchoTestConfiguration, EncryptionConfig, EncryptionErrorType, ErrorCodeType, FocalLengthInfo, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, LastmileProbeResult, LicenseErrorType, LiveTranscoding, LocalAccessPointConfiguration, LocalAudioStats, LocalAudioStreamReason, LocalAudioStreamState, LocalTranscoderConfiguration, LocalVideoStreamReason, LocalVideoStreamState, LowlightEnhanceOptions, MediaTraceEvent, NetworkType, PermissionType, QualityAdaptIndication, QualityType, RecorderStreamInfo, Rectangle, RemoteAudioState, RemoteAudioStateReason, RemoteVideoState, RemoteVideoStateReason, RtcStats, RtmpStreamPublishReason, RtmpStreamPublishState, RtmpStreamingEvent, ScreenCaptureParameters, ScreenCaptureParameters2, ScreenScenarioType, SegmentationProperty, SenderOptions, SimulcastStreamConfig, SimulcastStreamMode, SpatialAudioParams, StreamPublishState, StreamSubscribeState, ThreadPriorityType, TranscodingVideoStream, UplinkNetworkInfo, UploadErrorReason, UserInfo, UserOfflineReasonType, VideoApplicationScenarioType, VideoCanvas, VideoCodecType, VideoContentHint, VideoDenoiserOptions, VideoEncoderConfiguration, VideoFormat, VideoLayout, VideoMirrorModeType, VideoOrientation, VideoQoePreferenceType, VideoRenderingTracingInfo, VideoStreamType, VideoSubscriptionOptions, VideoTranscoderError, VirtualBackgroundSource, VoiceBeautifierPreset, VoiceConversionPreset, WatermarkOptions, WlAccStats, WlaccMessageReason, WlaccSuggestAction } from './AgoraBase';
3
- import { ContentInspectConfig, ContentInspectResult, IAudioSpectrumObserver, MediaSourceType, RawAudioFrameOpModeType, RenderModeType, VideoSourceType } from './AgoraMediaBase';
2
+ import { AudienceLatencyLevelType, AudioAinsMode, AudioEffectPreset, AudioEncodedFrameObserverConfig, AudioProfileType, AudioRecordingConfiguration, AudioSampleRateType, AudioScenarioType, AudioSessionOperationRestriction, AudioVolumeInfo, BeautyOptions, CameraFocalLengthType, CameraStabilizationMode, CaptureBrightnessLevelType, ChannelMediaRelayConfiguration, ChannelMediaRelayError, ChannelMediaRelayState, ChannelProfileType, ClientRoleChangeFailedReason, ClientRoleOptions, ClientRoleType, CodecCapInfo, ColorEnhanceOptions, ConnectionChangedReasonType, ConnectionStateType, DataStreamConfig, DeviceInfo, DownlinkNetworkInfo, EarMonitoringFilterType, EchoTestConfiguration, EncryptionConfig, EncryptionErrorType, ErrorCodeType, FaceShapeArea, FaceShapeAreaOptions, FaceShapeBeautyOptions, FocalLengthInfo, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, LastmileProbeResult, LicenseErrorType, LiveTranscoding, LocalAccessPointConfiguration, LocalAudioStats, LocalAudioStreamReason, LocalAudioStreamState, LocalTranscoderConfiguration, LocalVideoStreamReason, LocalVideoStreamState, LowlightEnhanceOptions, MediaTraceEvent, NetworkType, PermissionType, QualityAdaptIndication, QualityType, RecorderStreamInfo, Rectangle, RemoteAudioState, RemoteAudioStateReason, RemoteVideoState, RemoteVideoStateReason, RtcStats, RtmpStreamPublishReason, RtmpStreamPublishState, RtmpStreamingEvent, ScreenCaptureParameters, ScreenCaptureParameters2, ScreenScenarioType, SegmentationProperty, SenderOptions, SimulcastConfig, SimulcastStreamConfig, SimulcastStreamMode, SpatialAudioParams, StreamPublishState, StreamSubscribeState, ThreadPriorityType, TranscodingVideoStream, UplinkNetworkInfo, UploadErrorReason, UserInfo, UserOfflineReasonType, VideoApplicationScenarioType, VideoCanvas, VideoCodecType, VideoContentHint, VideoDenoiserOptions, VideoDimensions, VideoEncoderConfiguration, VideoFormat, VideoLayout, VideoMirrorModeType, VideoOrientation, VideoQoePreferenceType, VideoRenderingTracingInfo, VideoStreamType, VideoSubscriptionOptions, VideoTranscoderError, VirtualBackgroundSource, VoiceAiTunerType, VoiceBeautifierPreset, VoiceConversionPreset, WatermarkOptions, WlAccStats, WlaccMessageReason, WlaccSuggestAction } from './AgoraBase';
3
+ import { ContentInspectConfig, ContentInspectResult, ExtensionContext, IAudioSpectrumObserver, MediaSourceType, RawAudioFrameOpModeType, RenderModeType, VideoSourceType } from './AgoraMediaBase';
4
4
  import { IH265Transcoder } from './IAgoraH265Transcoder';
5
5
  import { LogConfig, LogFilterType, LogLevel } from './IAgoraLog';
6
6
  import { AudioMixingDualMonoMode, IMediaEngine } from './IAgoraMediaEngine';
@@ -236,7 +236,31 @@ export declare enum StreamFallbackOptions {
236
236
  /**
237
237
  * @ignore
238
238
  */
239
- StreamFallbackOptionAudioOnly = 2
239
+ StreamFallbackOptionAudioOnly = 2,
240
+ /**
241
+ * @ignore
242
+ */
243
+ StreamFallbackOptionVideoStreamLayer1 = 3,
244
+ /**
245
+ * @ignore
246
+ */
247
+ StreamFallbackOptionVideoStreamLayer2 = 4,
248
+ /**
249
+ * @ignore
250
+ */
251
+ StreamFallbackOptionVideoStreamLayer3 = 5,
252
+ /**
253
+ * @ignore
254
+ */
255
+ StreamFallbackOptionVideoStreamLayer4 = 6,
256
+ /**
257
+ * @ignore
258
+ */
259
+ StreamFallbackOptionVideoStreamLayer5 = 7,
260
+ /**
261
+ * @ignore
262
+ */
263
+ StreamFallbackOptionVideoStreamLayer6 = 8
240
264
  }
241
265
  /**
242
266
  * @ignore
@@ -349,6 +373,10 @@ export declare class LocalVideoStats {
349
373
  * 1: Hardware encoding is applied for acceleration.
350
374
  */
351
375
  hwEncoderAccelerating?: number;
376
+ /**
377
+ * @ignore
378
+ */
379
+ simulcastDimensions?: VideoDimensions[];
352
380
  }
353
381
  /**
354
382
  * Audio statistics of the remote user.
@@ -459,6 +487,10 @@ export declare class RemoteVideoStats {
459
487
  * The bitrate (Kbps) of the remote video received since the last count.
460
488
  */
461
489
  receivedBitrate?: number;
490
+ /**
491
+ * @ignore
492
+ */
493
+ decoderInputFrameRate?: number;
462
494
  /**
463
495
  * The frame rate (fps) of decoding the remote video.
464
496
  */
@@ -1065,6 +1097,10 @@ export declare class ChannelMediaOptions {
1065
1097
  * Whether the audio stream being published is filtered according to the volume algorithm: true : The audio stream is filtered. If the audio stream filter is not enabled, this setting does not takes effect. false : The audio stream is not filtered. If you need to enable this function, contact.
1066
1098
  */
1067
1099
  isAudioFilterable?: boolean;
1100
+ /**
1101
+ * @ignore
1102
+ */
1103
+ parameters?: string;
1068
1104
  }
1069
1105
  /**
1070
1106
  * The cloud proxy type.
@@ -1214,10 +1250,10 @@ export interface IRtcEngineEventHandler {
1214
1250
  /**
1215
1251
  * Occurs when a user leaves a channel.
1216
1252
  *
1217
- * This callback notifies the app that the user leaves the channel by calling leaveChannel. From this callback, the app can get information such as the call duration and statistics.
1253
+ * You can obtain information such as the total duration of a call, and the data traffic that the SDK transmits and receives.
1218
1254
  *
1219
1255
  * @param connection The connection information. See RtcConnection.
1220
- * @param stats The statistics of the call. See RtcStats.
1256
+ * @param stats Call statistics. See RtcStats.
1221
1257
  */
1222
1258
  onLeaveChannel?(connection: RtcConnection, stats: RtcStats): void;
1223
1259
  /**
@@ -1276,7 +1312,7 @@ export interface IRtcEngineEventHandler {
1276
1312
  /**
1277
1313
  * Reports the last mile network quality of each user in the channel.
1278
1314
  *
1279
- * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server. The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times. txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream.
1315
+ * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server. The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times. This callback provides feedback on network quality through sending and receiving broadcast packets within the channel. Excessive broadcast packets can lead to broadcast storms. To prevent broadcast storms from causing a large amount of data transmission within the channel, this callback supports feedback on the network quality of up to 4 remote hosts simultaneously by default. txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream.
1280
1316
  *
1281
1317
  * @param connection The connection information. See RtcConnection.
1282
1318
  * @param remoteUid The user ID. The network quality of the user with this user ID is reported. If the uid is 0, the local network quality is reported.
@@ -1384,6 +1420,8 @@ export interface IRtcEngineEventHandler {
1384
1420
  /**
1385
1421
  * Occurs when the renderer receives the first frame of the remote video.
1386
1422
  *
1423
+ * This callback is only triggered when the video frame is rendered by the SDK; it will not be triggered if the user employs custom video rendering.You need to implement this independently using methods outside the SDK.
1424
+ *
1387
1425
  * @param connection The connection information. See RtcConnection.
1388
1426
  * @param remoteUid The user ID of the remote user sending the video stream.
1389
1427
  * @param width The width (px) of the video stream.
@@ -1487,7 +1525,7 @@ export interface IRtcEngineEventHandler {
1487
1525
  * @param connection The connection information. See RtcConnection.
1488
1526
  * @param stats The statistics of the local video stream. See LocalVideoStats.
1489
1527
  */
1490
- onLocalVideoStats?(source: VideoSourceType, stats: LocalVideoStats): void;
1528
+ onLocalVideoStats?(connection: RtcConnection, stats: LocalVideoStats): void;
1491
1529
  /**
1492
1530
  * Reports the statistics of the video stream sent by each remote users.
1493
1531
  *
@@ -1709,9 +1747,7 @@ export interface IRtcEngineEventHandler {
1709
1747
  */
1710
1748
  onSnapshotTaken?(connection: RtcConnection, uid: number, filePath: string, width: number, height: number, errCode: number): void;
1711
1749
  /**
1712
- * Occurs when the user role switches during the interactive live streaming.
1713
- *
1714
- * The SDK triggers this callback when the local user switches their user role by calling setClientRole after joining the channel.
1750
+ * Occurs when the user role or the audience latency level changes.
1715
1751
  *
1716
1752
  * @param connection The connection information. See RtcConnection.
1717
1753
  * @param oldRole Role that the user switches from: ClientRoleType.
@@ -1720,9 +1756,9 @@ export interface IRtcEngineEventHandler {
1720
1756
  */
1721
1757
  onClientRoleChanged?(connection: RtcConnection, oldRole: ClientRoleType, newRole: ClientRoleType, newRoleOptions: ClientRoleOptions): void;
1722
1758
  /**
1723
- * Occurs when the user role switching fails in the interactive live streaming.
1759
+ * Occurs when switching a user role fails.
1724
1760
  *
1725
- * In the live broadcasting channel profile, when the local user calls setClientRole to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role.
1761
+ * This callback informs you about the reason for failing to switching and your current user role.
1726
1762
  *
1727
1763
  * @param connection The connection information. See RtcConnection.
1728
1764
  * @param reason The reason for a user role switch failure. See ClientRoleChangeFailedReason.
@@ -1963,45 +1999,21 @@ export interface IRtcEngineEventHandler {
1963
1999
  */
1964
2000
  onAudioMetadataReceived?(connection: RtcConnection, uid: number, metadata: string, length: number): void;
1965
2001
  /**
1966
- * The event callback of the extension.
1967
- *
1968
- * To listen for events while the extension is running, you need to register this callback.
1969
- *
1970
- * @param provider The name of the extension provider.
1971
- * @param extension The name of the extension.
1972
- * @param key The key of the extension.
1973
- * @param value The value of the extension key.
2002
+ * @ignore
1974
2003
  */
1975
- onExtensionEvent?(provider: string, extension: string, key: string, value: string): void;
2004
+ onExtensionEventWithContext?(context: ExtensionContext, key: string, value: string): void;
1976
2005
  /**
1977
- * Occurs when the extension is enabled.
1978
- *
1979
- * The extension triggers this callback after it is successfully enabled.
1980
- *
1981
- * @param provider The name of the extension provider.
1982
- * @param extension The name of the extension.
2006
+ * @ignore
1983
2007
  */
1984
- onExtensionStarted?(provider: string, extension: string): void;
2008
+ onExtensionStartedWithContext?(context: ExtensionContext): void;
1985
2009
  /**
1986
- * Occurs when the extension is disabled.
1987
- *
1988
- * The extension triggers this callback after it is successfully destroyed.
1989
- *
1990
- * @param provider The name of the extension provider.
1991
- * @param extension The name of the extension.
2010
+ * @ignore
1992
2011
  */
1993
- onExtensionStopped?(provider: string, extension: string): void;
2012
+ onExtensionStoppedWithContext?(context: ExtensionContext): void;
1994
2013
  /**
1995
- * Occurs when the extension runs incorrectly.
1996
- *
1997
- * In case of extension enabling failure or runtime errors, the extension triggers this callback and reports the error code along with the reasons.
1998
- *
1999
- * @param provider The name of the extension provider.
2000
- * @param extension The name of the extension.
2001
- * @param error Error code. For details, see the extension documentation provided by the extension provider.
2002
- * @param message Reason. For details, see the extension documentation provided by the extension provider.
2014
+ * @ignore
2003
2015
  */
2004
- onExtensionError?(provider: string, extension: string, error: number, message: string): void;
2016
+ onExtensionErrorWithContext?(context: ExtensionContext, error: number, message: string): void;
2005
2017
  /**
2006
2018
  * @ignore
2007
2019
  */
@@ -2164,6 +2176,10 @@ export declare enum MaxMetadataSizeType {
2164
2176
  * Media metadata.
2165
2177
  */
2166
2178
  export declare class Metadata {
2179
+ /**
2180
+ * @ignore
2181
+ */
2182
+ channelId?: string;
2167
2183
  /**
2168
2184
  * The user ID.
2169
2185
  * For the recipient: The ID of the remote user who sent the Metadata.
@@ -2360,8 +2376,6 @@ export declare abstract class IRtcEngine {
2360
2376
  * Creates and initializes IRtcEngine.
2361
2377
  *
2362
2378
  * All called methods provided by the IRtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread.
2363
- * Before calling other APIs, you must call createAgoraRtcEngine and initialize to create and initialize the IRtcEngine object.
2364
- * The SDK supports creating only one IRtcEngine instance for an app.
2365
2379
  *
2366
2380
  * @param context Configurations for the IRtcEngine instance. See RtcEngineContext.
2367
2381
  *
@@ -2424,7 +2438,6 @@ export declare abstract class IRtcEngine {
2424
2438
  * All lowercase English letters: a to z.
2425
2439
  * All uppercase English letters: A to Z.
2426
2440
  * All numeric characters: 0 to 9.
2427
- * Space
2428
2441
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2429
2442
  * @param uid The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2 32 -1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and onJoinChannelSuccess returns it in the callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2430
2443
  *
@@ -2468,7 +2481,6 @@ export declare abstract class IRtcEngine {
2468
2481
  * All lowercase English letters: a to z.
2469
2482
  * All uppercase English letters: A to Z.
2470
2483
  * All numeric characters: 0 to 9.
2471
- * Space
2472
2484
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2473
2485
  * @param uid The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2 32 -1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and onJoinChannelSuccess returns it in the callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2474
2486
  * @param options The channel media options. See ChannelMediaOptions.
@@ -2501,8 +2513,7 @@ export declare abstract class IRtcEngine {
2501
2513
  /**
2502
2514
  * Sets channel options and leaves the channel.
2503
2515
  *
2504
- * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
2505
- * If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time. This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress. After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback.
2516
+ * After calling this method, the SDK terminates the audio and video interaction, leaves the current channel, and releases all resources related to the session. After joining the channel, you must call this method to end the call; otherwise, the next call cannot be started. If you have called joinChannelEx to join multiple channels, calling this method will leave all the channels you joined. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel.
2506
2517
  *
2507
2518
  * @param options The options for leaving the channel. See LeaveChannelOptions.
2508
2519
  *
@@ -2531,29 +2542,23 @@ export declare abstract class IRtcEngine {
2531
2542
  /**
2532
2543
  * Sets the channel profile.
2533
2544
  *
2534
- * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming.
2535
- * To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile.
2536
- * This method must be called and set before joinChannel, and cannot be set again after joining the channel.
2537
- * The default video encoding bitrate are different in different channel profiles. See setVideoEncoderConfiguration.
2545
+ * You can call this method to set the channel profile. The SDK adopts different optimization strategies for different channel profiles. For example, in a live streaming scenario, the SDK prioritizes video quality. After initializing the SDK, the default channel profile is the live streaming profile.
2538
2546
  *
2539
2547
  * @param profile The channel profile. See ChannelProfileType.
2540
2548
  *
2541
2549
  * @returns
2542
- * 0(ERR_OK): Success.
2550
+ * 0: Success.
2543
2551
  * < 0: Failure.
2544
2552
  * -2: The parameter is invalid.
2545
2553
  * -7: The SDK is not initialized.
2546
2554
  */
2547
2555
  abstract setChannelProfile(profile: ChannelProfileType): number;
2548
2556
  /**
2549
- * Sets the user role and level in an interactive live streaming channel.
2557
+ * Set the user role and the audience latency level in a live streaming scenario.
2550
2558
  *
2551
- * In the interactive live streaming profile, the SDK sets the user role as audience by default. You can call this method to set the user role as host. You can call this method either before or after joining a channel. If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel. If you call this method to switch the user role after joining a channel, the SDK automatically does the following:
2552
- * Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state.
2553
- * Triggers onClientRoleChanged on the local client.
2554
- * Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is set as ChannelProfileLiveBroadcasting) only.
2559
+ * By default,the SDK sets the user role as audience. You can call this method to set the user role as host. The user role (roles) determines the users' permissions at the SDK level, including whether they can publish audio and video streams in a channel.
2555
2560
  *
2556
- * @param role The user role in the interactive live streaming. See ClientRoleType.
2561
+ * @param role The user role. See ClientRoleType. If you set the user role as an audience member, you cannot publish audio and video streams in the channel. If you want to publish media streams in a channel during live streaming, ensure you set the user role as broadcaster.
2557
2562
  * @param options The detailed options of a user, including the user level. See ClientRoleOptions.
2558
2563
  *
2559
2564
  * @returns
@@ -2688,6 +2693,22 @@ export declare abstract class IRtcEngine {
2688
2693
  * The current device capabilities do not meet the requirements for image enhancement. Agora recommends you replace it with a high-performance device.
2689
2694
  */
2690
2695
  abstract setBeautyEffectOptions(enabled: boolean, options: BeautyOptions, type?: MediaSourceType): number;
2696
+ /**
2697
+ * @ignore
2698
+ */
2699
+ abstract setFaceShapeBeautyOptions(enabled: boolean, options: FaceShapeBeautyOptions, type?: MediaSourceType): number;
2700
+ /**
2701
+ * @ignore
2702
+ */
2703
+ abstract setFaceShapeAreaOptions(options: FaceShapeAreaOptions, type?: MediaSourceType): number;
2704
+ /**
2705
+ * @ignore
2706
+ */
2707
+ abstract getFaceShapeBeautyOptions(type?: MediaSourceType): FaceShapeBeautyOptions;
2708
+ /**
2709
+ * @ignore
2710
+ */
2711
+ abstract getFaceShapeAreaOptions(shapeArea: FaceShapeArea, type?: MediaSourceType): FaceShapeAreaOptions;
2691
2712
  /**
2692
2713
  * Sets low-light enhancement.
2693
2714
  *
@@ -2953,9 +2974,9 @@ export declare abstract class IRtcEngine {
2953
2974
  /**
2954
2975
  * Stops or resumes subscribing to the video streams of all remote users.
2955
2976
  *
2956
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. By default, the SDK subscribes to the video streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeVideo to false when calling joinChannel to join the channel, which will cancel the subscription to the video streams of all users upon joining the channel.
2977
+ * After successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users. By default, the SDK subscribes to the video streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeVideo to false when calling joinChannel to join the channel, which will cancel the subscription to the video streams of all users upon joining the channel.
2957
2978
  *
2958
- * @param mute Whether to stop subscribing to the video streams of all remote users. true : Stop subscribing to the video streams of all remote users. false : (Default) Subscribe to the audio streams of all remote users by default.
2979
+ * @param mute Whether to stop subscribing to the video streams of all remote users. true : Stop subscribing to the video streams of all remote users. false : (Default) Subscribe to the video streams of all remote users by default.
2959
2980
  *
2960
2981
  * @returns
2961
2982
  * 0: Success.
@@ -3839,6 +3860,10 @@ export declare abstract class IRtcEngine {
3839
3860
  * -1: A general error occurs (no specified reason).
3840
3861
  */
3841
3862
  abstract setHeadphoneEQParameters(lowGain: number, highGain: number): number;
3863
+ /**
3864
+ * @ignore
3865
+ */
3866
+ abstract enableVoiceAITuner(enabled: boolean, type: VoiceAiTunerType): number;
3842
3867
  /**
3843
3868
  * Sets the log file.
3844
3869
  *
@@ -3986,6 +4011,10 @@ export declare abstract class IRtcEngine {
3986
4011
  * < 0: Failure.
3987
4012
  */
3988
4013
  abstract setDualStreamMode(mode: SimulcastStreamMode, streamConfig?: SimulcastStreamConfig): number;
4014
+ /**
4015
+ * @ignore
4016
+ */
4017
+ abstract setSimulcastConfig(simulcastConfig: SimulcastConfig): number;
3989
4018
  /**
3990
4019
  * Sets whether to enable the local playback of external audio source.
3991
4020
  *
@@ -4141,7 +4170,11 @@ export declare abstract class IRtcEngine {
4141
4170
  /**
4142
4171
  * Whether to mute the recording signal.
4143
4172
  *
4144
- * @param mute true : The media file is muted. false : (Default) Do not mute the recording signal. If you have already called adjustRecordingSignalVolume to adjust the volume, then when you call this method and set it to true, the SDK will record the current volume and mute it. To restore the previous volume, call this method again and set it to false.
4173
+ * If you have already called adjustRecordingSignalVolume to adjust the recording signal volume, when you call this method and set it to true, the SDK behaves as follows:
4174
+ * Records the adjusted volume.
4175
+ * Mutes the recording signal. When you call this method again and set it to false, the recording signal volume will be restored to the volume recorded by the SDK before muting.
4176
+ *
4177
+ * @param mute true : Mute the recording signal. false : (Default) Do not mute the recording signal.
4145
4178
  *
4146
4179
  * @returns
4147
4180
  * 0: Success.
@@ -4280,8 +4313,6 @@ export declare abstract class IRtcEngine {
4280
4313
  * Enables in-ear monitoring.
4281
4314
  *
4282
4315
  * This method enables or disables in-ear monitoring.
4283
- * Users must use earphones (wired or Bluetooth) to hear the in-ear monitoring effect.
4284
- * You can call this method either before or after joining a channel.
4285
4316
  *
4286
4317
  * @param enabled Enables or disables in-ear monitoring. true : Enables in-ear monitoring. false : (Default) Disables in-ear monitoring.
4287
4318
  * @param includeAudioFilters The audio filter types of in-ear monitoring. See EarMonitoringFilterType.
@@ -4357,7 +4388,7 @@ export declare abstract class IRtcEngine {
4357
4388
  *
4358
4389
  * @returns
4359
4390
  * If the method call is successful, the video track ID is returned as the unique identifier of the video track.
4360
- * If the method call fails, a negative value is returned.
4391
+ * If the method call fails, 0xffffffff is returned.
4361
4392
  */
4362
4393
  abstract createCustomVideoTrack(): number;
4363
4394
  /**
@@ -4515,7 +4546,7 @@ export declare abstract class IRtcEngine {
4515
4546
  *
4516
4547
  * @param displayId The display ID of the screen to be shared. For the Windows platform, if you need to simultaneously share two screens (main screen and secondary screen), you can set displayId to -1 when calling this method.
4517
4548
  * @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen.
4518
- * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters.
4549
+ * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration.
4519
4550
  *
4520
4551
  * @returns
4521
4552
  * 0: Success.
@@ -4595,7 +4626,7 @@ export declare abstract class IRtcEngine {
4595
4626
  *
4596
4627
  * Call this method after starting screen sharing or window sharing.
4597
4628
  *
4598
- * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters.
4629
+ * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration.
4599
4630
  *
4600
4631
  * @returns
4601
4632
  * 0: Success.
@@ -4829,8 +4860,6 @@ export declare abstract class IRtcEngine {
4829
4860
  /**
4830
4861
  * Gets the current connection state of the SDK.
4831
4862
  *
4832
- * You can call this method either before or after joining a channel.
4833
- *
4834
4863
  * @returns
4835
4864
  * The current connection state. See ConnectionStateType.
4836
4865
  */
@@ -4861,39 +4890,6 @@ export declare abstract class IRtcEngine {
4861
4890
  * @ignore
4862
4891
  */
4863
4892
  abstract setRemoteUserPriority(uid: number, userPriority: PriorityType): number;
4864
- /**
4865
- * Sets the built-in encryption mode.
4866
- *
4867
- * Deprecated: Use enableEncryption instead. The SDK supports built-in encryption schemes, AES-128-GCM is supported by default. Call this method to use other encryption modes. All users in the same channel must use the same encryption mode and secret. Refer to the information related to the AES encryption algorithm on the differences between the encryption modes. Before calling this method, please call setEncryptionSecret to enable the built-in encryption function.
4868
- *
4869
- * @param encryptionMode The following encryption modes:
4870
- * " aes-128-xts ": 128-bit AES encryption, XTS mode.
4871
- * " aes-128-ecb ": 128-bit AES encryption, ECB mode.
4872
- * " aes-256-xts ": 256-bit AES encryption, XTS mode.
4873
- * " sm4-128-ecb ": 128-bit SM4 encryption, ECB mode.
4874
- * " aes-128-gcm ": 128-bit AES encryption, GCM mode.
4875
- * " aes-256-gcm ": 256-bit AES encryption, GCM mode.
4876
- * "": When this parameter is set as null, the encryption mode is set as " aes-128-gcm " by default.
4877
- *
4878
- * @returns
4879
- * 0: Success.
4880
- * < 0: Failure.
4881
- */
4882
- abstract setEncryptionMode(encryptionMode: string): number;
4883
- /**
4884
- * Enables built-in encryption with an encryption password before users join a channel.
4885
- *
4886
- * Deprecated: Use enableEncryption instead. Before joining the channel, you need to call this method to set the secret parameter to enable the built-in encryption. All users in the same channel should use the same secret. The secret is automatically cleared once a user leaves the channel. If you do not specify the secret or secret is set as null, the built-in encryption is disabled.
4887
- * Do not use this method for Media Push.
4888
- * For optimal transmission, ensure that the encrypted data size does not exceed the original data size + 16 bytes. 16 bytes is the maximum padding size for AES encryption.
4889
- *
4890
- * @param secret The encryption password.
4891
- *
4892
- * @returns
4893
- * 0: Success.
4894
- * < 0: Failure.
4895
- */
4896
- abstract setEncryptionSecret(secret: string): number;
4897
4893
  /**
4898
4894
  * Enables or disables the built-in encryption.
4899
4895
  *
@@ -4913,8 +4909,6 @@ export declare abstract class IRtcEngine {
4913
4909
  /**
4914
4910
  * Creates a data stream.
4915
4911
  *
4916
- * Creates a data stream. Each user can create up to five data streams in a single channel.
4917
- *
4918
4912
  * @param config The configurations for the data stream. See DataStreamConfig.
4919
4913
  *
4920
4914
  * @returns
@@ -5051,10 +5045,9 @@ export declare abstract class IRtcEngine {
5051
5045
  /**
5052
5046
  * Registers a user account.
5053
5047
  *
5054
- * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel. After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and account of the local user. This method is optional. To join a channel with a user account, you can choose either of the following ways:
5055
- * Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel.
5056
- * Call the joinChannelWithUserAccount method to join the channel. The difference between the two ways is that the time elapsed between calling the registerLocalUserAccount method and joining the channel is shorter than directly calling joinChannelWithUserAccount.
5057
- * Ensure that you set the userAccount parameter; otherwise, this method does not take effect.
5048
+ * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel. This method is optional. If you want to join a channel using a user account, you can choose one of the following methods:
5049
+ * Call the registerLocalUserAccount method to register a user account, and then call the joinChannelWithUserAccount method to join a channel, which can shorten the time it takes to enter the channel.
5050
+ * Call the joinChannelWithUserAccount method to join a channel.
5058
5051
  * Ensure that the userAccount is unique in the channel.
5059
5052
  * To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
5060
5053
  *
@@ -5084,7 +5077,6 @@ export declare abstract class IRtcEngine {
5084
5077
  * All lowercase English letters: a to z.
5085
5078
  * All uppercase English letters: A to Z.
5086
5079
  * All numeric characters: 0 to 9.
5087
- * Space
5088
5080
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5089
5081
  * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are as follows(89 in total):
5090
5082
  * The 26 lowercase English letters: a to z.
@@ -5118,7 +5110,6 @@ export declare abstract class IRtcEngine {
5118
5110
  * All lowercase English letters: a to z.
5119
5111
  * All uppercase English letters: A to Z.
5120
5112
  * All numeric characters: 0 to 9.
5121
- * Space
5122
5113
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5123
5114
  * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are as follows(89 in total):
5124
5115
  * The 26 lowercase English letters: a to z.
@@ -5136,7 +5127,7 @@ export declare abstract class IRtcEngine {
5136
5127
  /**
5137
5128
  * Gets the user information by passing in the user account.
5138
5129
  *
5139
- * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
5130
+ * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and pass in the user account to get the UID of the remote user from the UserInfo object.
5140
5131
  *
5141
5132
  * @param userAccount The user account.
5142
5133
  *
@@ -5148,7 +5139,7 @@ export declare abstract class IRtcEngine {
5148
5139
  /**
5149
5140
  * Gets the user information by passing in the user ID.
5150
5141
  *
5151
- * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
5142
+ * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and passi in the UID.to get the user account of the specified user from the UserInfo object.
5152
5143
  *
5153
5144
  * @param uid The user ID.
5154
5145
  *
@@ -5230,7 +5221,7 @@ export declare abstract class IRtcEngine {
5230
5221
  /**
5231
5222
  * Starts pushing media streams to the CDN directly.
5232
5223
  *
5233
- * Aogra does not support pushing media streams to one URL repeatedly. Media options Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (DirectCdnStreamingMediaOptions), you can refer to the following examples: If you want to push audio and video streams published by the host to the CDN, the media setting options should be set as follows: publishCustomAudioTrack is set as true and call the pushAudioFrame method publishCustomVideoTrack is set as true and call the pushVideoFrame method publishCameraTrack is set as false (the default value) publishMicrophoneTrack is set as false (the default value) As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in DirectCdnStreamingMediaOptions as true and call pushAudioFrame to push audio streams. Agora only supports pushing one audio and video streams or one audio streams to CDN.
5224
+ * Aogra does not support pushing media streams to one URL repeatedly. Media options Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (DirectCdnStreamingMediaOptions), you can refer to the following examples: If you want to push audio and video streams captured by the host from a custom source, the media setting options should be set as follows: publishCustomAudioTrack is set as true and call the pushAudioFrame method publishCustomVideoTrack is set as true and call the pushVideoFrame method publishCameraTrack is set as false (the default value) publishMicrophoneTrack is set as false (the default value) As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in DirectCdnStreamingMediaOptions as true and call pushAudioFrame to push audio streams. Agora only supports pushing one audio and video streams or one audio streams to CDN.
5234
5225
  *
5235
5226
  * @param eventHandler See onDirectCdnStreamingStateChanged and onDirectCdnStreamingStats.
5236
5227
  * @param publishUrl The CDN live streaming URL.
@@ -5589,7 +5580,6 @@ export declare abstract class IRtcEngine {
5589
5580
  * All lowercase English letters: a to z.
5590
5581
  * All uppercase English letters: A to Z.
5591
5582
  * All numeric characters: 0 to 9.
5592
- * Space
5593
5583
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5594
5584
  * @param uid The user ID of the remote user.
5595
5585
  */