agora-electron-sdk 4.2.2-dev.4 → 4.2.2-dev.6

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 (64) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/js/Private/AgoraBase.js +121 -51
  3. package/js/Private/AgoraMediaBase.js +9 -7
  4. package/js/Private/IAgoraRtcEngine.js +11 -11
  5. package/js/Private/IAgoraRtcEngineEx.js +1 -1
  6. package/js/Private/IAgoraSpatialAudio.js +2 -2
  7. package/js/Private/impl/IAgoraMediaEngineImpl.js +12 -6
  8. package/js/Private/impl/IAgoraRtcEngineImpl.js +7 -7
  9. package/js/Private/internal/MusicContentCenterInternal.js +3 -0
  10. package/js/Private/internal/RtcEngineExInternal.js +24 -7
  11. package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
  12. package/js/Renderer/WebGLRenderer/index.js +19 -19
  13. package/js/Renderer/YUVCanvasRenderer/index.js +1 -1
  14. package/package.json +3 -3
  15. package/scripts/zipBuild.js +3 -1
  16. package/ts/Private/AgoraBase.ts +278 -131
  17. package/ts/Private/AgoraMediaBase.ts +52 -34
  18. package/ts/Private/AgoraMediaPlayerTypes.ts +8 -5
  19. package/ts/Private/IAgoraLog.ts +7 -3
  20. package/ts/Private/IAgoraMediaEngine.ts +73 -31
  21. package/ts/Private/IAgoraMediaPlayer.ts +126 -64
  22. package/ts/Private/IAgoraMediaPlayerSource.ts +3 -1
  23. package/ts/Private/IAgoraRtcEngine.ts +1307 -519
  24. package/ts/Private/IAgoraRtcEngineEx.ts +227 -94
  25. package/ts/Private/IAgoraSpatialAudio.ts +70 -35
  26. package/ts/Private/IAudioDeviceManager.ts +61 -31
  27. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +12 -6
  28. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +9 -11
  29. package/ts/Private/internal/MusicContentCenterInternal.ts +4 -0
  30. package/ts/Private/internal/RtcEngineExInternal.ts +36 -14
  31. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +2 -2
  32. package/ts/Renderer/WebGLRenderer/index.ts +26 -21
  33. package/ts/Renderer/YUVCanvasRenderer/index.ts +1 -1
  34. package/types/Private/AgoraBase.d.ts +278 -131
  35. package/types/Private/AgoraBase.d.ts.map +1 -1
  36. package/types/Private/AgoraMediaBase.d.ts +52 -34
  37. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  38. package/types/Private/AgoraMediaPlayerTypes.d.ts +8 -5
  39. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
  40. package/types/Private/IAgoraLog.d.ts +7 -3
  41. package/types/Private/IAgoraLog.d.ts.map +1 -1
  42. package/types/Private/IAgoraMediaEngine.d.ts +73 -31
  43. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  44. package/types/Private/IAgoraMediaPlayer.d.ts +126 -64
  45. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  46. package/types/Private/IAgoraMediaPlayerSource.d.ts +3 -1
  47. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
  48. package/types/Private/IAgoraRtcEngine.d.ts +1308 -519
  49. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  50. package/types/Private/IAgoraRtcEngineEx.d.ts +227 -94
  51. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  52. package/types/Private/IAgoraSpatialAudio.d.ts +70 -35
  53. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
  54. package/types/Private/IAudioDeviceManager.d.ts +61 -31
  55. package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
  56. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +2 -2
  57. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -1
  58. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +5 -5
  59. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  60. package/types/Private/internal/MusicContentCenterInternal.d.ts +1 -0
  61. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
  62. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  63. package/types/Renderer/WebGLRenderer/index.d.ts +1 -1
  64. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
@@ -1,5 +1,5 @@
1
1
  import './extension/IAgoraRtcEngineExtension';
2
- import { AudienceLatencyLevelType, AudioAinsMode, AudioEffectPreset, AudioEncodedFrameObserverConfig, AudioProfileType, AudioRecordingConfiguration, AudioSampleRateType, AudioScenarioType, AudioSessionOperationRestriction, AudioVolumeInfo, BeautyOptions, CaptureBrightnessLevelType, ChannelMediaRelayConfiguration, ChannelMediaRelayError, ChannelMediaRelayEvent, ChannelMediaRelayState, ChannelProfileType, ClientRoleChangeFailedReason, ClientRoleOptions, ClientRoleType, CodecCapInfo, ColorEnhanceOptions, ConnectionChangedReasonType, ConnectionStateType, DataStreamConfig, DeviceInfo, DownlinkNetworkInfo, EarMonitoringFilterType, EchoTestConfiguration, EncryptionConfig, EncryptionErrorType, ErrorCodeType, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, LastmileProbeResult, LicenseErrorType, LiveTranscoding, LocalAccessPointConfiguration, LocalAudioStats, LocalAudioStreamError, LocalAudioStreamState, LocalTranscoderConfiguration, LocalVideoStreamError, LocalVideoStreamState, LowlightEnhanceOptions, MediaTraceEvent, NetworkType, PermissionType, QualityAdaptIndication, QualityType, RecorderStreamInfo, Rectangle, RemoteAudioState, RemoteAudioStateReason, RemoteVideoState, RemoteVideoStateReason, RtcStats, RtmpStreamPublishErrorType, RtmpStreamPublishState, RtmpStreamingEvent, ScreenCaptureFramerateCapability, ScreenCaptureParameters, ScreenCaptureParameters2, ScreenScenarioType, SegmentationProperty, SenderOptions, SimulcastStreamConfig, SimulcastStreamMode, SpatialAudioParams, StreamPublishState, StreamSubscribeState, ThreadPriorityType, TranscodingVideoStream, UplinkNetworkInfo, UploadErrorReason, UserInfo, UserOfflineReasonType, VideoApplicationScenarioType, VideoCanvas, VideoCodecType, VideoContentHint, VideoDenoiserOptions, VideoEncoderConfiguration, VideoFormat, VideoMirrorModeType, VideoOrientation, VideoRenderingTracingInfo, VideoStreamType, VideoSubscriptionOptions, VideoTranscoderError, VirtualBackgroundSource, VoiceBeautifierPreset, VoiceConversionPreset, WatermarkOptions, WlAccStats, WlaccMessageReason, WlaccSuggestAction } from './AgoraBase';
2
+ import { AudienceLatencyLevelType, AudioAinsMode, AudioEffectPreset, AudioEncodedFrameObserverConfig, AudioProfileType, AudioRecordingConfiguration, AudioSampleRateType, AudioScenarioType, AudioSessionOperationRestriction, AudioVolumeInfo, BeautyOptions, CaptureBrightnessLevelType, ChannelMediaRelayConfiguration, ChannelMediaRelayError, ChannelMediaRelayEvent, ChannelMediaRelayState, ChannelProfileType, ClientRoleChangeFailedReason, ClientRoleOptions, ClientRoleType, CodecCapInfo, ColorEnhanceOptions, ConnectionChangedReasonType, ConnectionStateType, DataStreamConfig, DeviceInfo, DownlinkNetworkInfo, EarMonitoringFilterType, EchoTestConfiguration, EncryptionConfig, EncryptionErrorType, ErrorCodeType, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, LastmileProbeResult, LicenseErrorType, LiveTranscoding, LocalAccessPointConfiguration, LocalAudioStats, LocalAudioStreamError, LocalAudioStreamState, LocalTranscoderConfiguration, LocalVideoStreamError, LocalVideoStreamState, LowlightEnhanceOptions, MediaTraceEvent, NetworkType, PermissionType, QualityAdaptIndication, QualityType, RecorderStreamInfo, Rectangle, RemoteAudioState, RemoteAudioStateReason, RemoteVideoState, RemoteVideoStateReason, RtcStats, RtmpStreamPublishErrorType, 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, VideoMirrorModeType, VideoOrientation, VideoRenderingTracingInfo, VideoStreamType, VideoSubscriptionOptions, VideoTranscoderError, VirtualBackgroundSource, VoiceBeautifierPreset, VoiceConversionPreset, WatermarkOptions, WlAccStats, WlaccMessageReason, WlaccSuggestAction } from './AgoraBase';
3
3
  import { ContentInspectConfig, ContentInspectResult, IAudioSpectrumObserver, MediaSourceType, RawAudioFrameOpModeType, RenderModeType, VideoSourceType } from './AgoraMediaBase';
4
4
  import { LogConfig, LogFilterType, LogLevel } from './IAgoraLog';
5
5
  import { AudioMixingDualMonoMode, IMediaEngine } from './IAgoraMediaEngine';
@@ -39,11 +39,11 @@ export declare enum MediaDeviceType {
39
39
  */
40
40
  AudioApplicationPlayoutDevice = 4,
41
41
  /**
42
- * (For macOS only)5: Virtual audio playback device (virtual sound card).
42
+ * (For macOS only) 5: Virtual audio playback device (virtual sound card).
43
43
  */
44
44
  AudioVirtualPlayoutDevice = 5,
45
45
  /**
46
- * (For macOS only)6: Virtual audio capturing device (virtual sound card).
46
+ * (For macOS only) 6: Virtual audio capturing device (virtual sound card).
47
47
  */
48
48
  AudioVirtualRecordingDevice = 6
49
49
  }
@@ -60,11 +60,11 @@ export declare enum AudioMixingStateType {
60
60
  */
61
61
  AudioMixingStatePaused = 711,
62
62
  /**
63
- * 713: The music file stops playing.The possible reasons include:AudioMixingReasonAllLoopsCompleted(723)AudioMixingReasonStoppedByUser(724)
63
+ * 713: The music file stops playing. The possible reasons include: AudioMixingReasonAllLoopsCompleted (723) AudioMixingReasonStoppedByUser (724)
64
64
  */
65
65
  AudioMixingStateStopped = 713,
66
66
  /**
67
- * 714: An error occurs during the playback of the audio mixing file.The possible reasons include:AudioMixingReasonCanNotOpen(701)AudioMixingReasonTooFrequentCall(702)AudioMixingReasonInterruptedEof(703)
67
+ * 714: An error occurs during the playback of the audio mixing file. The possible reasons include: AudioMixingReasonCanNotOpen (701) AudioMixingReasonTooFrequentCall (702) AudioMixingReasonInterruptedEof (703)
68
68
  */
69
69
  AudioMixingStateFailed = 714
70
70
  }
@@ -259,11 +259,11 @@ export declare class LocalVideoStats {
259
259
  */
260
260
  uid?: number;
261
261
  /**
262
- * The actual bitrate (Kbps) while sending the local video stream.This value does not include the bitrate for resending the video after packet loss.
262
+ * The actual bitrate (Kbps) while sending the local video stream. This value does not include the bitrate for resending the video after packet loss.
263
263
  */
264
264
  sentBitrate?: number;
265
265
  /**
266
- * The actual frame rate (fps) while sending the local video stream.This value does not include the frame rate for resending the video after packet loss.
266
+ * The actual frame rate (fps) while sending the local video stream. This value does not include the frame rate for resending the video after packet loss.
267
267
  */
268
268
  sentFrameRate?: number;
269
269
  /**
@@ -319,7 +319,7 @@ export declare class LocalVideoStats {
319
319
  */
320
320
  qualityAdaptIndication?: QualityAdaptIndication;
321
321
  /**
322
- * The bitrate (Kbps) while encoding the local video stream.This value does not include the bitrate for resending the video after packet loss.
322
+ * The bitrate (Kbps) while encoding the local video stream. This value does not include the bitrate for resending the video after packet loss.
323
323
  */
324
324
  encodedBitrate?: number;
325
325
  /**
@@ -343,7 +343,9 @@ export declare class LocalVideoStats {
343
343
  */
344
344
  dualStreamEnabled?: boolean;
345
345
  /**
346
- * The local video encoding acceleration type. 0: Software encoding is applied without acceleration.1: Hardware encoding is applied for acceleration.
346
+ * The local video encoding acceleration type.
347
+ * 0: Software encoding is applied without acceleration.
348
+ * 1: Hardware encoding is applied for acceleration.
347
349
  */
348
350
  hwEncoderAccelerating?: number;
349
351
  }
@@ -364,7 +366,7 @@ export declare class RemoteAudioStats {
364
366
  */
365
367
  networkTransportDelay?: number;
366
368
  /**
367
- * The network delay (ms) from the audio receiver to the jitter buffer.When the receiving end is an audience member and audienceLatencyLevel of ClientRoleOptions is 1, this parameter does not take effect.
369
+ * The network delay (ms) from the audio receiver to the jitter buffer. When the receiving end is an audience member and audienceLatencyLevel of ClientRoleOptions is 1, this parameter does not take effect.
368
370
  */
369
371
  jitterBufferDelay?: number;
370
372
  /**
@@ -392,7 +394,7 @@ export declare class RemoteAudioStats {
392
394
  */
393
395
  frozenRate?: number;
394
396
  /**
395
- * The quality of the remote audio stream in the reported interval. The quality is determined by the Agora real-time audio MOS (Mean Opinion Score) measurement method. The return value range is [0, 500]. Dividing the return value by 100 gets the MOS score, which ranges from 0 to 5. The higher the score, the better the audio quality.The subjective perception of audio quality corresponding to the Agora real-time audio MOS scores is as follows:MOS scorePerception of audio qualityGreater than 4Excellent. The audio sounds clear and smooth.From 3.5 to 4Good. The audio has some perceptible impairment but still sounds clear.From 3 to 3.5Fair. The audio freezes occasionally and requires attentive listening.From 2.5 to 3Poor. The audio sounds choppy and requires considerable effort to understand.From 2 to 2.5Bad. The audio has occasional noise. Consecutive audio dropouts occur, resulting in some information loss. The users can communicate only with difficulty.Less than 2Very bad. The audio has persistent noise. Consecutive audio dropouts are frequent, resulting in severe information loss. Communication is nearly impossible.
397
+ * The quality of the remote audio stream in the reported interval. The quality is determined by the Agora real-time audio MOS (Mean Opinion Score) measurement method. The return value range is [0, 500]. Dividing the return value by 100 gets the MOS score, which ranges from 0 to 5. The higher the score, the better the audio quality. The subjective perception of audio quality corresponding to the Agora real-time audio MOS scores is as follows: MOS score Perception of audio quality Greater than 4 Excellent. The audio sounds clear and smooth. From 3.5 to 4 Good. The audio has some perceptible impairment but still sounds clear. From 3 to 3.5 Fair. The audio freezes occasionally and requires attentive listening. From 2.5 to 3 Poor. The audio sounds choppy and requires considerable effort to understand. From 2 to 2.5 Bad. The audio has occasional noise. Consecutive audio dropouts occur, resulting in some information loss. The users can communicate only with difficulty. Less than 2 Very bad. The audio has persistent noise. Consecutive audio dropouts are frequent, resulting in severe information loss. Communication is nearly impossible.
396
398
  */
397
399
  mosValue?: number;
398
400
  /**
@@ -404,7 +406,7 @@ export declare class RemoteAudioStats {
404
406
  */
405
407
  plcCount?: number;
406
408
  /**
407
- * The total active time (ms) between the start of the audio call and the callback of the remote user.The active time refers to the total duration of the remote user without the mute state.
409
+ * The total active time (ms) between the start of the audio call and the callback of the remote user. The active time refers to the total duration of the remote user without the mute state.
408
410
  */
409
411
  totalActiveTime?: number;
410
412
  /**
@@ -433,7 +435,7 @@ export declare class RemoteVideoStats {
433
435
  */
434
436
  uid?: number;
435
437
  /**
436
- * Deprecated:In scenarios where audio and video are synchronized, you can get the video delay data from networkTransportDelay and jitterBufferDelay in RemoteAudioStats.The video delay (ms).
438
+ * Deprecated: In scenarios where audio and video are synchronized, you can get the video delay data from networkTransportDelay and jitterBufferDelay in RemoteAudioStats. The video delay (ms).
437
439
  */
438
440
  delay?: number;
439
441
  /**
@@ -481,11 +483,11 @@ export declare class RemoteVideoStats {
481
483
  */
482
484
  frozenRate?: number;
483
485
  /**
484
- * The amount of time (ms) that the audio is ahead of the video.If this value is negative, the audio is lagging behind the video.
486
+ * The amount of time (ms) that the audio is ahead of the video. If this value is negative, the audio is lagging behind the video.
485
487
  */
486
488
  avSyncTimeMs?: number;
487
489
  /**
488
- * The total active time (ms) of the video.As long as the remote user or host neither stops sending the video stream nor disables the video module after joining the channel, the video is available.
490
+ * The total active time (ms) of the video. As long as the remote user or host neither stops sending the video stream nor disables the video module after joining the channel, the video is available.
489
491
  */
490
492
  totalActiveTime?: number;
491
493
  /**
@@ -719,7 +721,7 @@ export declare class CameraCapturerConfiguration {
719
721
  */
720
722
  cameraDirection?: CameraDirection;
721
723
  /**
722
- * This method applies to Windows only.The ID of the camera. The maximum length is MaxDeviceIdLengthType.
724
+ * This method applies to Windows only. The ID of the camera. The maximum length is MaxDeviceIdLengthType.
723
725
  */
724
726
  deviceId?: string;
725
727
  /**
@@ -727,7 +729,7 @@ export declare class CameraCapturerConfiguration {
727
729
  */
728
730
  format?: VideoFormat;
729
731
  /**
730
- * Whether to follow the video aspect ratio set in setVideoEncoderConfiguration:true: (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame.false: Do not follow the system default audio playback device. The SDK does not change the aspect ratio of the captured video frame.
732
+ * Whether to follow the video aspect ratio set in setVideoEncoderConfiguration : true : (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame. false : Do not follow the system default audio playback device. The SDK does not change the aspect ratio of the captured video frame.
731
733
  */
732
734
  followEncodeDimensionRatio?: boolean;
733
735
  }
@@ -736,19 +738,19 @@ export declare class CameraCapturerConfiguration {
736
738
  */
737
739
  export declare class ScreenCaptureConfiguration {
738
740
  /**
739
- * Whether to capture the window on the screen:true: Capture the window.false: (Default) Capture the screen, not the window.
741
+ * Whether to capture the window on the screen: true : Capture the window. false : (Default) Capture the screen, not the window.
740
742
  */
741
743
  isCaptureWindow?: boolean;
742
744
  /**
743
- * (macOS only) The display ID of the screen.This parameter takes effect only when you want to capture the screen on macOS.
745
+ * (macOS only) The display ID of the screen. This parameter takes effect only when you want to capture the screen on macOS.
744
746
  */
745
747
  displayId?: number;
746
748
  /**
747
- * (Windows only) The relative position of the shared screen to the virtual screen.This parameter takes effect only when you want to capture the screen on Windows.
749
+ * (Windows only) The relative position of the shared screen to the virtual screen. This parameter takes effect only when you want to capture the screen on Windows.
748
750
  */
749
751
  screenRect?: Rectangle;
750
752
  /**
751
- * Window ID.This parameter takes effect only when you want to capture the window.
753
+ * Window ID. This parameter takes effect only when you want to capture the window.
752
754
  */
753
755
  windowId?: any;
754
756
  /**
@@ -850,7 +852,7 @@ export declare class ScreenCaptureSourceInfo {
850
852
  */
851
853
  sourceTitle?: string;
852
854
  /**
853
- * Determines whether the screen is the primary display:true: The screen is the primary display.false: The screen is not the primary display.
855
+ * Determines whether the screen is the primary display: true : The screen is the primary display. false : The screen is not the primary display.
854
856
  */
855
857
  primaryMonitor?: boolean;
856
858
  /**
@@ -862,7 +864,7 @@ export declare class ScreenCaptureSourceInfo {
862
864
  */
863
865
  position?: Rectangle;
864
866
  /**
865
- * (For Windows only) Whether the window is minimized:true: The window is minimized.false: The window is not minimized.
867
+ * (For Windows only) Whether the window is minimized: true : The window is minimized. false : The window is not minimized.
866
868
  */
867
869
  minimizeWindow?: boolean;
868
870
  /**
@@ -899,91 +901,91 @@ export declare class ImageTrackOptions {
899
901
  /**
900
902
  * The channel media options.
901
903
  *
902
- * Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection . For example, publishMicrophoneTrack , publishAudioTrack , publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack , publishScreenTrack , publishCustomVideoTrack , or publishEncodedVideoTrack can be set as true . Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters.
904
+ * Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishAudioTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters.
903
905
  */
904
906
  export declare class ChannelMediaOptions {
905
907
  /**
906
- * Whether to publish the video captured by the camera:true: Publish the video captured by the camera.false: Do not publish the video captured by the camera.
908
+ * Whether to publish the video captured by the camera: true : Publish the video captured by the camera. false : Do not publish the video captured by the camera.
907
909
  */
908
910
  publishCameraTrack?: boolean;
909
911
  /**
910
- * Whether to publish the video captured by the second camera:true: Publish the video captured by the second camera.false: Do not publish the video captured by the second camera.
912
+ * Whether to publish the video captured by the second camera: true : Publish the video captured by the second camera. false : Do not publish the video captured by the second camera.
911
913
  */
912
914
  publishSecondaryCameraTrack?: boolean;
913
915
  /**
914
- * @ignore
916
+ * Whether to publish the video captured by the third camera: true : Publish the video captured by the third camera. false : Do not publish the video captured by the third camera.
915
917
  */
916
918
  publishThirdCameraTrack?: boolean;
917
919
  /**
918
- * @ignore
920
+ * Whether to publish the video captured by the fourth camera: true : Publish the video captured by the fourth camera. false : Do not publish the video captured by the fourth camera.
919
921
  */
920
922
  publishFourthCameraTrack?: boolean;
921
923
  /**
922
- * Whether to publish the audio captured by the microphone:true: Publish the audio captured by the microphone.false: Do not publish the audio captured by the microphone.
924
+ * Whether to publish the audio captured by the microphone: true : Publish the audio captured by the microphone. false : Do not publish the audio captured by the microphone.
923
925
  */
924
926
  publishMicrophoneTrack?: boolean;
925
927
  /**
926
- * Whether to publish the video captured from the screen:true: Publish the video captured from the screen.false: Do not publish the video captured from the screen.This parameter applies to Android and iOS only.
928
+ * @ignore
927
929
  */
928
930
  publishScreenCaptureVideo?: boolean;
929
931
  /**
930
- * Whether to publish the audio captured from the screen:true: Publish the audio captured from the screen.false: Publish the audio captured from the screen.This parameter applies to Android and iOS only.
932
+ * @ignore
931
933
  */
932
934
  publishScreenCaptureAudio?: boolean;
933
935
  /**
934
- * Whether to publish the video captured from the screen:true: Publish the video captured from the screen.false: (Default) Do not publish the video captured from the screen.
936
+ * Whether to publish the video captured from the screen: true : Publish the video captured from the screen. false : Do not publish the video captured from the screen.
935
937
  */
936
938
  publishScreenTrack?: boolean;
937
939
  /**
938
- * Whether to publish the video captured from the second screen:true: Publish the video captured from the second screen.false: Do not publish the video captured from the second screen.
940
+ * Whether to publish the video captured from the second screen: true : Publish the video captured from the second screen. false : Do not publish the video captured from the second screen.
939
941
  */
940
942
  publishSecondaryScreenTrack?: boolean;
941
943
  /**
942
- * @ignore
944
+ * Whether to publish the video captured from the third screen: true : Publish the captured video from the third screen. false : Do not publish the video captured from the third screen.
943
945
  */
944
946
  publishThirdScreenTrack?: boolean;
945
947
  /**
946
- * @ignore
948
+ * Whether to publish the video captured from the fourth screen: true : Publish the captured video from the fourth screen. false : Do not publish the video captured from the fourth screen.
947
949
  */
948
950
  publishFourthScreenTrack?: boolean;
949
951
  /**
950
- * Whether to publish the audio captured from a custom source:true: Publish the audio captured from the custom source.false: Do not publish the captured audio from a custom source.
952
+ * Whether to publish the audio captured from a custom source: true : Publish the audio captured from the custom source. false : Do not publish the captured audio from a custom source.
951
953
  */
952
954
  publishCustomAudioTrack?: boolean;
953
955
  /**
954
- * The ID of the custom audio source to publish. The default value is 0.If you have set sourceNumber in setExternalAudioSource to a value greater than 1, the SDK creates the corresponding number of custom audio tracks and assigns an ID to each audio track, starting from 0.
956
+ * The ID of the custom audio source to publish. The default value is 0. If you have set sourceNumber in setExternalAudioSource to a value greater than 1, the SDK creates the corresponding number of custom audio tracks and assigns an ID to each audio track, starting from 0.
955
957
  */
956
958
  publishCustomAudioTrackId?: number;
957
959
  /**
958
- * Whether to publish the video captured from a custom source:true: Publish the video captured from the custom source.false: Do not publish the captured video from a custom source.
960
+ * Whether to publish the video captured from a custom source: true : Publish the video captured from the custom source. false : Do not publish the captured video from a custom source.
959
961
  */
960
962
  publishCustomVideoTrack?: boolean;
961
963
  /**
962
- * Whether to publish the encoded video:true: Publish the encoded video.false: Do not publish the encoded video.
964
+ * Whether to publish the encoded video: true : Publish the encoded video. false : Do not publish the encoded video.
963
965
  */
964
966
  publishEncodedVideoTrack?: boolean;
965
967
  /**
966
- * Whether to publish the audio from the media player:true: Publish the audio from the media player.false: Do not publish the audio from the media player.
968
+ * Whether to publish the audio from the media player: true : Publish the audio from the media player. false : Do not publish the audio from the media player.
967
969
  */
968
970
  publishMediaPlayerAudioTrack?: boolean;
969
971
  /**
970
- * Whether to publish the video from the media player:true: Publish the video from the media player.false: Do not publish the video from the media player.
972
+ * Whether to publish the video from the media player: true : Publish the video from the media player. false : Do not publish the video from the media player.
971
973
  */
972
974
  publishMediaPlayerVideoTrack?: boolean;
973
975
  /**
974
- * Whether to publish the local transcoded video:true: Publish the local transcoded video.false: Do not publish the local transcoded video.
976
+ * Whether to publish the local transcoded video: true : Publish the local transcoded video. false : Do not publish the local transcoded video.
975
977
  */
976
978
  publishTranscodedVideoTrack?: boolean;
977
979
  /**
978
- * Whether to automatically subscribe to all remote audio streams when the user joins a channel:true: Subscribe to all remote audio streams.false: Do not automatically subscribe to any remote audio streams.
980
+ * Whether to automatically subscribe to all remote audio streams when the user joins a channel: true : Subscribe to all remote audio streams. false : Do not automatically subscribe to any remote audio streams.
979
981
  */
980
982
  autoSubscribeAudio?: boolean;
981
983
  /**
982
- * Whether to automatically subscribe to all remote video streams when the user joins the channel:true: Subscribe to all remote video streams.false: Do not automatically subscribe to any remote video streams.
984
+ * Whether to automatically subscribe to all remote video streams when the user joins the channel: true : Subscribe to all remote video streams. false : Do not automatically subscribe to any remote video streams.
983
985
  */
984
986
  autoSubscribeVideo?: boolean;
985
987
  /**
986
- * Whether to enable audio capturing or playback:true: Do not enable audio capturing or playback.false: Do not enable audio capturing or playback.If you need to publish the audio streams captured by your microphone, ensure this parameter is set as true.
988
+ * Whether to enable audio capturing or playback: true : Enable audio capturing or playback. false : Do not enable audio capturing or playback. If you need to publish the audio streams captured by your microphone, ensure this parameter is set as true.
987
989
  */
988
990
  enableAudioRecordingOrPlayout?: boolean;
989
991
  /**
@@ -1015,7 +1017,9 @@ export declare class ChannelMediaOptions {
1015
1017
  */
1016
1018
  mediaPlayerAudioDelayMs?: number;
1017
1019
  /**
1018
- * (Optional) The token generated on your server for authentication. See This parameter takes effect only when calling updateChannelMediaOptions or updateChannelMediaOptionsEx.Ensure that the App ID, channel name, and user name used for creating the token are the same as those used by the initialize method for initializing the RTC engine, and those used by the joinChannel and joinChannelEx methods for joining the channel.
1020
+ * (Optional) The token generated on your server for authentication. See
1021
+ * This parameter takes effect only when calling updateChannelMediaOptions or updateChannelMediaOptionsEx.
1022
+ * Ensure that the App ID, channel name, and user name used for creating the token are the same as those used by the initialize method for initializing the RTC engine, and those used by the joinChannel and joinChannelEx methods for joining the channel.
1019
1023
  */
1020
1024
  token?: string;
1021
1025
  /**
@@ -1023,11 +1027,13 @@ export declare class ChannelMediaOptions {
1023
1027
  */
1024
1028
  enableBuiltInMediaEncryption?: boolean;
1025
1029
  /**
1026
- * Whether to publish the sound of a metronome to remote users:true: Publish processed audio frames. Both the local user and remote users can hear the metronome.false: Do not publish the sound of the metronome. Only the local user can hear the metronome.
1030
+ * Whether to publish the sound of a metronome to remote users: true : Publish processed audio frames. Both the local user and remote users can hear the metronome. false : Do not publish the sound of the metronome. Only the local user can hear the metronome.
1027
1031
  */
1028
1032
  publishRhythmPlayerTrack?: boolean;
1029
1033
  /**
1030
- * Whether to enable interactive mode:true: Enable interactive mode. Once this mode is enabled and the user role is set as audience, the user can receive remote video streams with low latency.false:Do not enable interactive mode. If this mode is disabled, the user receives the remote video streams in default settings.This parameter only applies to scenarios involving cohosting across channels. The cohosts need to call the joinChannelEx method to join the other host's channel as an audience member, and set isInteractiveAudience to true.This parameter takes effect only when the user role is ClientRoleAudience.
1034
+ * Whether to enable interactive mode: true : Enable interactive mode. Once this mode is enabled and the user role is set as audience, the user can receive remote video streams with low latency. false :Do not enable interactive mode. If this mode is disabled, the user receives the remote video streams in default settings.
1035
+ * This parameter only applies to scenarios involving cohosting across channels. The cohosts need to call the joinChannelEx method to join the other host's channel as an audience member, and set isInteractiveAudience to true.
1036
+ * This parameter takes effect only when the user role is ClientRoleAudience.
1031
1037
  */
1032
1038
  isInteractiveAudience?: boolean;
1033
1039
  /**
@@ -1035,7 +1041,7 @@ export declare class ChannelMediaOptions {
1035
1041
  */
1036
1042
  customVideoTrackId?: number;
1037
1043
  /**
1038
- * 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 .
1044
+ * 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.
1039
1045
  */
1040
1046
  isAudioFilterable?: boolean;
1041
1047
  }
@@ -1077,20 +1083,20 @@ export declare enum ProxyType {
1077
1083
  */
1078
1084
  export declare class LeaveChannelOptions {
1079
1085
  /**
1080
- * Whether to stop playing and mixing the music file when a user leaves the channel. true: (Default) Stop playing and mixing the music file.false: Do not stop playing and mixing the music file.
1086
+ * Whether to stop playing and mixing the music file when a user leaves the channel. true : (Default) Stop playing and mixing the music file. false : Do not stop playing and mixing the music file.
1081
1087
  */
1082
1088
  stopAudioMixing?: boolean;
1083
1089
  /**
1084
- * Whether to stop playing all audio effects when a user leaves the channel. true: (Default) Stop playing all audio effects.false: Do not stop playing any audio effect.
1090
+ * Whether to stop playing all audio effects when a user leaves the channel. true : (Default) Stop playing all audio effects. false : Do not stop playing any audio effect.
1085
1091
  */
1086
1092
  stopAllEffect?: boolean;
1087
1093
  /**
1088
- * Whether to stop microphone recording when a user leaves the channel. true: (Default) Stop microphone recording.false: Do not stop microphone recording.
1094
+ * Whether to stop microphone recording when a user leaves the channel. true : (Default) Stop microphone recording. false : Do not stop microphone recording.
1089
1095
  */
1090
1096
  stopMicrophoneRecording?: boolean;
1091
1097
  }
1092
1098
  /**
1093
- * IRtcEngineEventHandlerThe SDK uses the interface to send event notifications to your app. Your app can get those notifications through methods that inherit this interface.
1099
+ * The SDK uses the IRtcEngineEventHandler interface to send event notifications to your app. Your app can get those notifications through methods that inherit this interface.
1094
1100
  */
1095
1101
  export interface IRtcEngineEventHandler {
1096
1102
  /**
@@ -1148,7 +1154,7 @@ export interface IRtcEngineEventHandler {
1148
1154
  /**
1149
1155
  * Reports the last mile network probe result.
1150
1156
  *
1151
- * The SDK triggers this callback within 30 seconds after the app calls startLastmileProbeTest .
1157
+ * The SDK triggers this callback within 30 seconds after the app calls startLastmileProbeTest.
1152
1158
  *
1153
1159
  * @param result The uplink and downlink last-mile network probe test result. See LastmileProbeResult.
1154
1160
  */
@@ -1156,18 +1162,21 @@ export interface IRtcEngineEventHandler {
1156
1162
  /**
1157
1163
  * Reports the volume information of users.
1158
1164
  *
1159
- * By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication . The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest. Once this callback is enabled, if the local user calls the muteLocalAudioStream method to mute, the SDK continues to report the volume indication of the local user. If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users.
1165
+ * By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication. Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest. Once this callback is enabled, if the local user calls the muteLocalAudioStream method to mute, the SDK continues to report the volume indication of the local user. If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users.
1160
1166
  *
1161
1167
  * @param connection The connection information. See RtcConnection.
1162
1168
  * @param speakers The volume information of the users. See AudioVolumeInfo. An empty speakers array in the callback indicates that no remote user is in the channel or is sending a stream.
1163
- * @param speakerNumber The total number of users.In the callback for the local user, if the local user is sending streams, the value of speakerNumber is 1.In the callback for remote users, the value range of speakerNumber is [0,3]. If the number of remote users who send streams is greater than or equal to three, the value of speakerNumber is 3.
1164
- * @param totalVolume The volume of the speaker. The value range is [0,255].In the callback for the local user, totalVolume is the volume of the local user who sends a stream.In the callback for remote users, totalVolume is the sum of the volume of all remote users (up to three) whose instantaneous volume is the highest.
1169
+ * @param speakerNumber The total number of users.
1170
+ * In the callback for the local user, if the local user is sending streams, the value of speakerNumber is 1.
1171
+ * In the callback for remote users, the value range of speakerNumber is [0,3]. If the number of remote users who send streams is greater than or equal to three, the value of speakerNumber is 3.
1172
+ * @param totalVolume The volume of the speaker. The value range is [0,255].
1173
+ * In the callback for the local user, totalVolume is the volume of the local user who sends a stream. In the callback for remote users, totalVolume is the sum of the volume of all remote users (up to three) whose instantaneous volume is the highest.
1165
1174
  */
1166
1175
  onAudioVolumeIndication?(connection: RtcConnection, speakers: AudioVolumeInfo[], speakerNumber: number, totalVolume: number): void;
1167
1176
  /**
1168
1177
  * Occurs when a user leaves a channel.
1169
1178
  *
1170
- * 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 quality statistics.
1179
+ * 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 quality statistics.
1171
1180
  *
1172
1181
  * @param connection The connection information. See RtcConnection.
1173
1182
  * @param stats The statistics of the call. See RtcStats.
@@ -1200,7 +1209,8 @@ export interface IRtcEngineEventHandler {
1200
1209
  * @param position The playback progress (ms).
1201
1210
  *
1202
1211
  * @returns
1203
- * 0: Success. < 0: Failure.
1212
+ * 0: Success.
1213
+ * < 0: Failure.
1204
1214
  */
1205
1215
  onAudioMixingPositionChanged?(position: number): void;
1206
1216
  /**
@@ -1259,7 +1269,7 @@ export interface IRtcEngineEventHandler {
1259
1269
  *
1260
1270
  * This callback reports the last-mile network conditions of the local user before the user joins the channel. Last mile refers to the connection between the local device and Agora's edge server. Before the user joins the channel, this callback is triggered by the SDK once startLastmileProbeTest is called and reports the last-mile network conditions of the local user.
1261
1271
  *
1262
- * @param quality The last-mile network quality. QualityUnknown(0): The quality is unknown.QualityExcellent(1): The quality is excellent.QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent.QualityPoor(3): Users can feel the communication is slightly impaired.QualityBad(4): Users cannot communicate smoothly.QualityVbad(5): The quality is so bad that users can barely communicate.QualityDown(6): The network is down, and users cannot communicate at all.See QualityType.
1272
+ * @param quality The last-mile network quality. QualityUnknown (0): The quality is unknown. QualityExcellent (1): The quality is excellent. QualityGood (2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. QualityPoor (3): Users can feel the communication is slightly impaired. QualityBad (4): Users cannot communicate smoothly. QualityVbad (5): The quality is so bad that users can barely communicate. QualityDown (6): The network is down, and users cannot communicate at all. See QualityType.
1263
1273
  */
1264
1274
  onLastmileQuality?(quality: QualityType): void;
1265
1275
  /**
@@ -1276,16 +1286,25 @@ export interface IRtcEngineEventHandler {
1276
1286
  /**
1277
1287
  * Occurs when the first video frame is published.
1278
1288
  *
1279
- * The SDK triggers this callback under one of the following circumstances: The local client enables the video module and calls joinChannel successfully. The local client calls muteLocalVideoStream ( true ) and muteLocalVideoStream ( false ) in sequence. The local client calls disableVideo and enableVideo in sequence.
1289
+ * The SDK triggers this callback under one of the following circumstances:
1290
+ * The local client enables the video module and calls joinChannel successfully.
1291
+ * The local client calls muteLocalVideoStream (true) and muteLocalVideoStream (false) in sequence.
1292
+ * The local client calls disableVideo and enableVideo in sequence.
1280
1293
  *
1281
1294
  * @param connection The connection information. See RtcConnection.
1282
1295
  * @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1283
1296
  */
1284
- onFirstLocalVideoFramePublished?(connection: RtcConnection, elapsed: number): void;
1297
+ onFirstLocalVideoFramePublished?(source: VideoSourceType, elapsed: number): void;
1285
1298
  /**
1286
1299
  * Occurs when the first remote video frame is received and decoded.
1287
1300
  *
1288
- * The SDK triggers this callback under one of the following circumstances: The remote user joins the channel and sends the video stream. The remote user stops sending the video stream and re-sends it after 15 seconds. Reasons for such an interruption include: The remote user leaves the channel. The remote user drops offline. The remote user calls muteLocalVideoStream to stop sending the video stream. The remote user calls disableVideo to disable video.
1301
+ * The SDK triggers this callback under one of the following circumstances:
1302
+ * The remote user joins the channel and sends the video stream.
1303
+ * The remote user stops sending the video stream and re-sends it after 15 seconds. Reasons for such an interruption include:
1304
+ * The remote user leaves the channel.
1305
+ * The remote user drops offline.
1306
+ * The remote user calls muteLocalVideoStream to stop sending the video stream.
1307
+ * The remote user calls disableVideo to disable video.
1289
1308
  *
1290
1309
  * @param connection The connection information. See RtcConnection.
1291
1310
  * @param remoteUid The user ID of the remote user sending the video stream.
@@ -1308,7 +1327,9 @@ export interface IRtcEngineEventHandler {
1308
1327
  /**
1309
1328
  * Occurs when the local video stream state changes.
1310
1329
  *
1311
- * When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateFailed and error code of LocalVideoStreamErrorCaptureFailure in the following situations: The app switches to the background, and the system gets the camera resource. The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateCapturing and error code of LocalVideoStreamErrorCaptureFailure . Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment.
1330
+ * When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateFailed and error code of LocalVideoStreamErrorCaptureFailure in the following situations:
1331
+ * The app switches to the background, and the system gets the camera resource.
1332
+ * The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateCapturing and error code of LocalVideoStreamErrorCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment.
1312
1333
  *
1313
1334
  * @param source The type of the video source. See VideoSourceType.
1314
1335
  * @param state The state of the local video, see LocalVideoStreamState.
@@ -1340,7 +1361,11 @@ export interface IRtcEngineEventHandler {
1340
1361
  /**
1341
1362
  * Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel.
1342
1363
  *
1343
- * In a communication channel, this callback indicates that a remote user joins the channel. The SDK also triggers this callback to report the existing users in the channel when a user joins the channel. In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17. The SDK triggers this callback under one of the following circumstances: A remote user/host joins the channel. A remote user switches the user role to the host after joining the channel. A remote user/host rejoins the channel after a network interruption.
1364
+ * In a communication channel, this callback indicates that a remote user joins the channel. The SDK also triggers this callback to report the existing users in the channel when a user joins the channel.
1365
+ * In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17. The SDK triggers this callback under one of the following circumstances:
1366
+ * A remote user/host joins the channel.
1367
+ * A remote user switches the user role to the host after joining the channel.
1368
+ * A remote user/host rejoins the channel after a network interruption.
1344
1369
  *
1345
1370
  * @param connection The connection information. See RtcConnection.
1346
1371
  * @param remoteUid The ID of the user or host who joins the channel.
@@ -1350,7 +1375,9 @@ export interface IRtcEngineEventHandler {
1350
1375
  /**
1351
1376
  * Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel.
1352
1377
  *
1353
- * There are two reasons for users to become offline: Leave the channel: When a user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel. Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections. It's recommended to use the Agora RTM SDK for reliable offline detection.
1378
+ * There are two reasons for users to become offline:
1379
+ * Leave the channel: When a user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel.
1380
+ * Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections. It's recommended to use the Agora RTM SDK for reliable offline detection.
1354
1381
  *
1355
1382
  * @param connection The connection information. See RtcConnection.
1356
1383
  * @param remoteUid The ID of the user who leaves the channel or goes offline.
@@ -1364,7 +1391,7 @@ export interface IRtcEngineEventHandler {
1364
1391
  *
1365
1392
  * @param connection The connection information. See RtcConnection.
1366
1393
  * @param remoteUid The user ID.
1367
- * @param muted Whether the remote user's audio stream is muted:true: User's audio stream is muted.false: User's audio stream is unmuted.
1394
+ * @param muted Whether the remote user's audio stream is muted: true : User's audio stream is muted. false : User's audio stream is unmuted.
1368
1395
  */
1369
1396
  onUserMuteAudio?(connection: RtcConnection, remoteUid: number, muted: boolean): void;
1370
1397
  /**
@@ -1374,7 +1401,7 @@ export interface IRtcEngineEventHandler {
1374
1401
  *
1375
1402
  * @param connection The connection information. See RtcConnection.
1376
1403
  * @param remoteUid The user ID of the remote user.
1377
- * @param muted Whether the remote user stops publishing the video stream:true: The remote user stops publishing the video stream.false: The remote user resumes publishing the video stream.
1404
+ * @param muted Whether the remote user stops publishing the video stream: true : The remote user stops publishing the video stream. false : The remote user resumes publishing the video stream.
1378
1405
  */
1379
1406
  onUserMuteVideo?(connection: RtcConnection, remoteUid: number, muted: boolean): void;
1380
1407
  /**
@@ -1384,7 +1411,7 @@ export interface IRtcEngineEventHandler {
1384
1411
  *
1385
1412
  * @param connection The connection information. See RtcConnection.
1386
1413
  * @param remoteUid The user ID of the remote user.
1387
- * @param enabled true: The video module is enabled.false: The video module is disabled.
1414
+ * @param enabled true : The video module is enabled. false : The video module is disabled.
1388
1415
  */
1389
1416
  onUserEnableVideo?(connection: RtcConnection, remoteUid: number, enabled: boolean): void;
1390
1417
  /**
@@ -1398,7 +1425,7 @@ export interface IRtcEngineEventHandler {
1398
1425
  *
1399
1426
  * @param connection The connection information. See RtcConnection.
1400
1427
  * @param remoteUid The user ID of the remote user.
1401
- * @param enabled Whether the specified remote user enables/disables the local video capturing function:true: The video module is enabled. Other users in the channel can see the video of this remote user.false: The video module is disabled. Other users in the channel can no longer receive the video stream from this remote user, while this remote user can still receive the video streams from other users.
1428
+ * @param enabled Whether the specified remote user enables/disables the local video capturing function: true : The video module is enabled. Other users in the channel can see the video of this remote user. false : The video module is disabled. Other users in the channel can no longer receive the video stream from this remote user, while this remote user can still receive the video streams from other users.
1402
1429
  */
1403
1430
  onUserEnableLocalVideo?(connection: RtcConnection, remoteUid: number, enabled: boolean): void;
1404
1431
  /**
@@ -1427,7 +1454,7 @@ export interface IRtcEngineEventHandler {
1427
1454
  * @param connection The connection information. See RtcConnection.
1428
1455
  * @param stats The statistics of the local video stream. See LocalVideoStats.
1429
1456
  */
1430
- onLocalVideoStats?(connection: RtcConnection, stats: LocalVideoStats): void;
1457
+ onLocalVideoStats?(source: VideoSourceType, stats: LocalVideoStats): void;
1431
1458
  /**
1432
1459
  * Reports the statistics of the video stream sent by each remote users.
1433
1460
  *
@@ -1485,7 +1512,9 @@ export interface IRtcEngineEventHandler {
1485
1512
  /**
1486
1513
  * Occurs when the connection between the SDK and the server is interrupted.
1487
1514
  *
1488
- * Deprecated: Use onConnectionStateChanged instead. The SDK triggers this callback when it loses connection with the server for more than four seconds after the connection is established. After triggering this callback, the SDK tries to reconnect to the server. You can use this callback to implement pop-up reminders. The differences between this callback and onConnectionLost are as follow: The SDK triggers the onConnectionInterrupted callback when it loses connection with the server for more than four seconds after it successfully joins the channel. The SDK triggers the onConnectionLost callback when it loses connection with the server for more than 10 seconds, whether or not it joins the channel. If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.
1515
+ * Deprecated: Use onConnectionStateChanged instead. The SDK triggers this callback when it loses connection with the server for more than four seconds after the connection is established. After triggering this callback, the SDK tries to reconnect to the server. You can use this callback to implement pop-up reminders. The differences between this callback and onConnectionLost are as follow:
1516
+ * The SDK triggers the onConnectionInterrupted callback when it loses connection with the server for more than four seconds after it successfully joins the channel.
1517
+ * The SDK triggers the onConnectionLost callback when it loses connection with the server for more than 10 seconds, whether or not it joins the channel. If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.
1489
1518
  *
1490
1519
  * @param connection The connection information. See RtcConnection.
1491
1520
  */
@@ -1527,7 +1556,9 @@ export interface IRtcEngineEventHandler {
1527
1556
  /**
1528
1557
  * Occurs when the token expires.
1529
1558
  *
1530
- * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways: Call renewToken to pass in the new token. Call to leave the current channel and then pass in the new token when you call joinChannel to join a channel.
1559
+ * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways:
1560
+ * Call renewToken to pass in the new token.
1561
+ * Call to leave the current channel and then pass in the new token when you call joinChannel to join a channel.
1531
1562
  *
1532
1563
  * @param connection The connection information. See RtcConnection.
1533
1564
  */
@@ -1535,7 +1566,7 @@ export interface IRtcEngineEventHandler {
1535
1566
  /**
1536
1567
  * Occurs when the token expires in 30 seconds.
1537
1568
  *
1538
- * When the token is about to expire in 30 seconds, the SDK triggers this callback to remind the app to renew the token. Upon receiving this callback, you need to generate a new token on your server, and call renewToken to pass the new token to the SDK.
1569
+ * When the token is about to expire in 30 seconds, the SDK triggers this callback to remind the app to renew the token. Upon receiving this callback, you need to generate a new token on your server, and call renewToken to pass the new token to the SDK. In scenarios involving multiple channels, you need to call updateChannelMediaOptionsEx to pass the new token to the SDK.
1539
1570
  *
1540
1571
  * @param connection The connection information. See RtcConnection.
1541
1572
  * @param token The token that expires in 30 seconds.
@@ -1548,7 +1579,10 @@ export interface IRtcEngineEventHandler {
1548
1579
  /**
1549
1580
  * Occurs when the first audio frame is published.
1550
1581
  *
1551
- * The SDK triggers this callback under one of the following circumstances: The local client enables the audio module and calls joinChannel successfully. The local client calls muteLocalAudioStream ( true ) and muteLocalAudioStream ( false ) in sequence. The local client calls disableAudio and enableAudio in sequence.
1582
+ * The SDK triggers this callback under one of the following circumstances:
1583
+ * The local client enables the audio module and calls joinChannel successfully.
1584
+ * The local client calls muteLocalAudioStream (true) and muteLocalAudioStream (false) in sequence.
1585
+ * The local client calls disableAudio and enableAudio in sequence.
1552
1586
  *
1553
1587
  * @param connection The connection information. See RtcConnection.
1554
1588
  * @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
@@ -1567,7 +1601,13 @@ export interface IRtcEngineEventHandler {
1567
1601
  /**
1568
1602
  * Occurs when the SDK decodes the first remote audio frame for playback.
1569
1603
  *
1570
- * Deprecated: Use onRemoteAudioStateChanged instead. The SDK triggers this callback under one of the following circumstances: The remote user joins the channel and sends the audio stream for the first time. The remote user's audio is offline and then goes online to re-send audio. It means the local user cannot receive audio in 15 seconds. Reasons for such an interruption include: The remote user leaves channel. The remote user drops offline. The remote user calls muteLocalAudioStream to stop sending the audio stream. The remote user calls disableAudio to disable audio.
1604
+ * Deprecated: Use onRemoteAudioStateChanged instead. The SDK triggers this callback under one of the following circumstances:
1605
+ * The remote user joins the channel and sends the audio stream for the first time.
1606
+ * The remote user's audio is offline and then goes online to re-send audio. It means the local user cannot receive audio in 15 seconds. Reasons for such an interruption include:
1607
+ * The remote user leaves channel.
1608
+ * The remote user drops offline.
1609
+ * The remote user calls muteLocalAudioStream to stop sending the audio stream.
1610
+ * The remote user calls disableAudio to disable audio.
1571
1611
  *
1572
1612
  * @param connection The connection information. See RtcConnection.
1573
1613
  * @param uid The user ID of the remote user.
@@ -1599,7 +1639,9 @@ export interface IRtcEngineEventHandler {
1599
1639
  /**
1600
1640
  * Occurs when the most active remote speaker is detected.
1601
1641
  *
1602
- * After a successful call of enableAudioVolumeIndication , the SDK continuously detects which remote user has the loudest volume. During the current period, the remote user whose volume is detected as the loudest for the most times, is the most active user. When the number of users is no less than two and an active remote speaker exists, the SDK triggers this callback and reports the uid of the most active remote speaker. If the most active remote speaker is always the same user, the SDK triggers the onActiveSpeaker callback only once. If the most active remote speaker changes to another user, the SDK triggers this callback again and reports the uid of the new active remote speaker.
1642
+ * After a successful call of enableAudioVolumeIndication, the SDK continuously detects which remote user has the loudest volume. During the current period, the remote user whose volume is detected as the loudest for the most times, is the most active user. When the number of users is no less than two and an active remote speaker exists, the SDK triggers this callback and reports the uid of the most active remote speaker.
1643
+ * If the most active remote speaker is always the same user, the SDK triggers the onActiveSpeaker callback only once.
1644
+ * If the most active remote speaker changes to another user, the SDK triggers this callback again and reports the uid of the new active remote speaker.
1603
1645
  *
1604
1646
  * @param connection The connection information. See RtcConnection.
1605
1647
  * @param uid The user ID of the most active speaker.
@@ -1619,7 +1661,12 @@ export interface IRtcEngineEventHandler {
1619
1661
  * @param filePath The local path of the snapshot.
1620
1662
  * @param width The width (px) of the snapshot.
1621
1663
  * @param height The height (px) of the snapshot.
1622
- * @param errCode The message that confirms success or gives the reason why the snapshot is not successfully taken:0: Success.< 0: Failure:-1: The SDK fails to write data to a file or encode a JPEG image.-2: The SDK does not find the video stream of the specified user within one second after the takeSnapshot method call succeeds. The possible reasons are: local capture stops, remote end stops publishing, or video data processing is blocked.-3: Calling the takeSnapshot method too frequently.
1664
+ * @param errCode The message that confirms success or gives the reason why the snapshot is not successfully taken:
1665
+ * 0: Success.
1666
+ * < 0: Failure:
1667
+ * -1: The SDK fails to write data to a file or encode a JPEG image.
1668
+ * -2: The SDK does not find the video stream of the specified user within one second after the takeSnapshot method call succeeds. The possible reasons are: local capture stops, remote end stops publishing, or video data processing is blocked.
1669
+ * -3: Calling the takeSnapshot method too frequently.
1623
1670
  */
1624
1671
  onSnapshotTaken?(connection: RtcConnection, uid: number, filePath: string, width: number, height: number, errCode: number): void;
1625
1672
  /**
@@ -1650,7 +1697,7 @@ export interface IRtcEngineEventHandler {
1650
1697
  *
1651
1698
  * @param deviceType The device type. See MediaDeviceType.
1652
1699
  * @param volume The volume value. The range is [0, 255].
1653
- * @param muted Whether the audio device is muted:true: The audio device is muted.false: The audio device is not muted.
1700
+ * @param muted Whether the audio device is muted: true : The audio device is muted. false : The audio device is not muted.
1654
1701
  */
1655
1702
  onAudioDeviceVolumeChanged?(deviceType: MediaDeviceType, volume: number, muted: boolean): void;
1656
1703
  /**
@@ -1681,7 +1728,14 @@ export interface IRtcEngineEventHandler {
1681
1728
  *
1682
1729
  * This callback applies to macOS only.
1683
1730
  *
1684
- * @param routing The current audio routing.-1: The default audio route.0: The audio route is a headset with a microphone.1: The audio route is an earpiece.2: The audio route is a headset without a microphone.3: The audio route is the speaker that comes with the device.4: The audio route is an external speaker. (For iOS and macOS only)(5): The audio route is a Bluetooth headset.
1731
+ * @param routing The current audio routing.
1732
+ * -1: The default audio route.
1733
+ * 0: The audio route is a headset with a microphone.
1734
+ * 1: The audio route is an earpiece.
1735
+ * 2: The audio route is a headset without a microphone.
1736
+ * 3: The audio route is the speaker that comes with the device.
1737
+ * 4: The audio route is an external speaker. (For iOS and macOS only)
1738
+ * (5): The audio route is a Bluetooth headset.
1685
1739
  */
1686
1740
  onAudioRoutingChanged?(routing: number): void;
1687
1741
  /**
@@ -1763,7 +1817,7 @@ export interface IRtcEngineEventHandler {
1763
1817
  /**
1764
1818
  * Reports the built-in encryption errors.
1765
1819
  *
1766
- * When encryption is enabled by calling enableEncryption , the SDK triggers this callback if an error occurs in encryption or decryption on the sender or the receiver side.
1820
+ * When encryption is enabled by calling enableEncryption, the SDK triggers this callback if an error occurs in encryption or decryption on the sender or the receiver side.
1767
1821
  *
1768
1822
  * @param connection The connection information. See RtcConnection.
1769
1823
  * @param errorType Details about the error type. See EncryptionErrorType.
@@ -1852,7 +1906,7 @@ export interface IRtcEngineEventHandler {
1852
1906
  /**
1853
1907
  * Occurs when the extension is enabled.
1854
1908
  *
1855
- * After a successful call of enableExtension ( true ) , the extension triggers this callback.
1909
+ * After a successful call of enableExtension (true), the extension triggers this callback.
1856
1910
  *
1857
1911
  * @param provider The name of the extension provider.
1858
1912
  * @param extension The name of the extension.
@@ -1861,7 +1915,7 @@ export interface IRtcEngineEventHandler {
1861
1915
  /**
1862
1916
  * Occurs when the extension is disabled.
1863
1917
  *
1864
- * After a successful call of enableExtension ( false ) , this callback is triggered.
1918
+ * After a successful call of enableExtension (false), this callback is triggered.
1865
1919
  *
1866
1920
  * @param provider The name of the extension provider.
1867
1921
  * @param extension The name of the extension.
@@ -1870,7 +1924,7 @@ export interface IRtcEngineEventHandler {
1870
1924
  /**
1871
1925
  * Occurs when the extension runs incorrectly.
1872
1926
  *
1873
- * When calling enableExtension ( true ) fails or the extension runs in error, the extension triggers this callback and reports the error code and reason.
1927
+ * When calling enableExtension (true) fails or the extension runs in error, the extension triggers this callback and reports the error code and reason.
1874
1928
  *
1875
1929
  * @param provider The name of the extension provider.
1876
1930
  * @param extension The name of the extension.
@@ -1885,7 +1939,7 @@ export interface IRtcEngineEventHandler {
1885
1939
  /**
1886
1940
  * Occurs when there's an error during the local video mixing.
1887
1941
  *
1888
- * When you fail to call startLocalVideoTranscoder or updateLocalTranscoderConfiguration , the SDK triggers this callback to report the reason.
1942
+ * When you fail to call startLocalVideoTranscoder or updateLocalTranscoderConfiguration, the SDK triggers this callback to report the reason.
1889
1943
  *
1890
1944
  * @param stream The video streams that cannot be mixed during video mixing. See TranscodingVideoStream.
1891
1945
  * @param error The reason for local video mixing error. See VideoTranscoderError.
@@ -1911,7 +1965,8 @@ export declare abstract class IVideoDeviceManager {
1911
1965
  * Enumerates the video devices.
1912
1966
  *
1913
1967
  * @returns
1914
- * Success: A VideoDeviceInfo array including all video devices in the system. Failure: An empty array.
1968
+ * Success: A VideoDeviceInfo array including all video devices in the system.
1969
+ * Failure: An empty array.
1915
1970
  */
1916
1971
  abstract enumerateVideoDevices(): VideoDeviceInfo[];
1917
1972
  /**
@@ -1919,10 +1974,11 @@ export declare abstract class IVideoDeviceManager {
1919
1974
  *
1920
1975
  * Plugging or unplugging a device does not change its device ID.
1921
1976
  *
1922
- * @param deviceIdUTF8 The device ID. You can get the device ID by calling enumerateVideoDevices.The maximum length is MaxDeviceIdLengthType.
1977
+ * @param deviceIdUTF8 The device ID. You can get the device ID by calling enumerateVideoDevices. The maximum length is MaxDeviceIdLengthType.
1923
1978
  *
1924
1979
  * @returns
1925
- * 0: Success. < 0: Failure.
1980
+ * 0: Success.
1981
+ * < 0: Failure.
1926
1982
  */
1927
1983
  abstract setDevice(deviceIdUTF8: string): number;
1928
1984
  /**
@@ -1940,7 +1996,8 @@ export declare abstract class IVideoDeviceManager {
1940
1996
  * @param deviceIdUTF8 The ID of the video capture device.
1941
1997
  *
1942
1998
  * @returns
1943
- * > 0: Success. Returns the number of video formats supported by this device. For example: If the specified camera supports 10 different video formats, the return value is 10. ≤ 0: Failure.
1999
+ * > 0: Success. Returns the number of video formats supported by this device. For example: If the specified camera supports 10 different video formats, the return value is 10.
2000
+ * ≤ 0: Failure.
1944
2001
  */
1945
2002
  abstract numberOfCapabilities(deviceIdUTF8: string): number;
1946
2003
  /**
@@ -1952,7 +2009,7 @@ export declare abstract class IVideoDeviceManager {
1952
2009
  * @param deviceCapabilityNumber The index number of the video format. If the return value of numberOfCapabilities is i, the value range of this parameter is [0,i).
1953
2010
  *
1954
2011
  * @returns
1955
- * The specific information of the specified video format, including width (px), height (px), and frame rate (fps). See VideoFormat .
2012
+ * The specific information of the specified video format, including width (px), height (px), and frame rate (fps). See VideoFormat.
1956
2013
  */
1957
2014
  abstract getCapability(deviceIdUTF8: string, deviceCapabilityNumber: number): VideoFormat;
1958
2015
  /**
@@ -1989,11 +2046,21 @@ export declare class RtcEngineContext {
1989
2046
  */
1990
2047
  audioScenario?: AudioScenarioType;
1991
2048
  /**
1992
- * The region for connection. This is an advanced feature and applies to scenarios that have regional restrictions. The area codes support bitwise operation.
2049
+ * The region for connection. This is an advanced feature and applies to scenarios that have regional restrictions. The area codes support bitwise operation.
1993
2050
  */
1994
2051
  areaCode?: number;
1995
2052
  /**
1996
- * The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log.The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log.The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8.The SDK writes the latest logs in agorasdk.log or agoraapi.log.When agorasdk.log is full, the SDK processes the log files in the following order:Delete the agorasdk.4.log file (if any).Rename agorasdk.3.log to agorasdk.4.log.Rename agorasdk.2.log to agorasdk.3.log.Rename agorasdk.1.log to agorasdk.2.log.Create a new agorasdk.log file.The overwrite rules for the agoraapi.log file are the same as for agorasdk.log.Sets the log file size. See LogConfig.By default, the SDK generates five SDK log files and five API call log files with the following rules:
2053
+ * The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log.
2054
+ * The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log.
2055
+ * The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8.
2056
+ * The SDK writes the latest logs in agorasdk.log or agoraapi.log.
2057
+ * When agorasdk.log is full, the SDK processes the log files in the following order:
2058
+ * Delete the agorasdk.4.log file (if any).
2059
+ * Rename agorasdk.3.log to agorasdk.4.log.
2060
+ * Rename agorasdk.2.log to agorasdk.3.log.
2061
+ * Rename agorasdk.1.log to agorasdk.2.log.
2062
+ * Create a new agorasdk.log file.
2063
+ * The overwrite rules for the agoraapi.log file are the same as for agorasdk.log. Sets the log file size. See LogConfig. By default, the SDK generates five SDK log files and five API call log files with the following rules:
1997
2064
  */
1998
2065
  logConfig?: LogConfig;
1999
2066
  /**
@@ -2005,11 +2072,11 @@ export declare class RtcEngineContext {
2005
2072
  */
2006
2073
  useExternalEglContext?: boolean;
2007
2074
  /**
2008
- * Whether to enable domain name restriction:true: Enables the domain name restriction. This value is suitable for scenarios where IoT devices use IoT cards for network access. The SDK will only connect to servers in the domain name or IP whitelist that has been reported to the operator.false: (Default) Disables the domain name restriction. This value is suitable for most common scenarios.
2075
+ * Whether to enable domain name restriction: true : Enables the domain name restriction. This value is suitable for scenarios where IoT devices use IoT cards for network access. The SDK will only connect to servers in the domain name or IP whitelist that has been reported to the operator. false : (Default) Disables the domain name restriction. This value is suitable for most common scenarios.
2009
2076
  */
2010
2077
  domainLimit?: boolean;
2011
2078
  /**
2012
- * Whether to automatically register the Agora extensions when initializing IRtcEngine:true: (Default) Automatically register the Agora extensions when initializing IRtcEngine.false: Do not register the Agora extensions when initializing IRtcEngine. You need to call enableExtension to register the Agora extensions.
2079
+ * Whether to automatically register the Agora extensions when initializing IRtcEngine : true : (Default) Automatically register the Agora extensions when initializing IRtcEngine. false : Do not register the Agora extensions when initializing IRtcEngine. You need to call enableExtension to register the Agora extensions.
2013
2080
  */
2014
2081
  autoRegisterAgoraExtensions?: boolean;
2015
2082
  }
@@ -2048,7 +2115,9 @@ export declare enum MaxMetadataSizeType {
2048
2115
  */
2049
2116
  export declare class Metadata {
2050
2117
  /**
2051
- * The user ID.For the recipient:the ID of the remote user who sent the Metadata.Ignore it for sender.
2118
+ * The user ID.
2119
+ * For the recipient:the ID of the remote user who sent the Metadata.
2120
+ * Ignore it for sender.
2052
2121
  */
2053
2122
  uid?: number;
2054
2123
  /**
@@ -2182,19 +2251,19 @@ export interface IDirectCdnStreamingEventHandler {
2182
2251
  */
2183
2252
  export declare class DirectCdnStreamingMediaOptions {
2184
2253
  /**
2185
- * Sets whether to publish the video captured by the camera:true: Publish the video captured by the camera.false: (Default) Do not publish the video captured by the camera.
2254
+ * Sets whether to publish the video captured by the camera: true : Publish the video captured by the camera. false : (Default) Do not publish the video captured by the camera.
2186
2255
  */
2187
2256
  publishCameraTrack?: boolean;
2188
2257
  /**
2189
- * Sets whether to publish the audio captured by the microphone:true: Publish the audio captured by the microphone.false: (Default) Do not publish the audio captured by the microphone.
2258
+ * Sets whether to publish the audio captured by the microphone: true : Publish the audio captured by the microphone. false : (Default) Do not publish the audio captured by the microphone.
2190
2259
  */
2191
2260
  publishMicrophoneTrack?: boolean;
2192
2261
  /**
2193
- * Sets whether to publish the captured audio from a custom source:true: Publish the captured audio from a custom source.false: (Default) Do not publish the captured audio from the custom source.
2262
+ * Sets whether to publish the captured audio from a custom source: true : Publish the captured audio from a custom source. false : (Default) Do not publish the captured audio from the custom source.
2194
2263
  */
2195
2264
  publishCustomAudioTrack?: boolean;
2196
2265
  /**
2197
- * Sets whether to publish the captured video from a custom source:true: Publish the captured video from a custom source.false: (Default) Do not publish the captured video from the custom source.
2266
+ * Sets whether to publish the captured video from a custom source: true : Publish the captured video from a custom source. false : (Default) Do not publish the captured video from the custom source.
2198
2267
  */
2199
2268
  publishCustomVideoTrack?: boolean;
2200
2269
  /**
@@ -2240,20 +2309,30 @@ export declare abstract class IRtcEngine {
2240
2309
  /**
2241
2310
  * Releases the IRtcEngine instance.
2242
2311
  *
2243
- * This method releases all resources used by the Agora SDK. Use this method for apps in which users occasionally make voice or video calls. When users do not make calls, you can free up resources for other operations. After a successful method call, you can no longer use any method or callback in the SDK anymore. If you want to use the real-time communication functions again, you must call createAgoraRtcEngine and initialize to create a new IRtcEngine instance. If you want to create a new IRtcEngine instance after destroyingthe current one, ensure that you wait till the release method execution to complete.
2312
+ * This method releases all resources used by the Agora SDK. Use this method for apps in which users occasionally make voice or video calls. When users do not make calls, you can free up resources for other operations. After a successful method call, you can no longer use any method or callback in the SDK anymore. If you want to use the real-time communication functions again, you must call createAgoraRtcEngine and initialize to create a new IRtcEngine instance.
2313
+ * This method can be called synchronously. You need to wait for the resource of IRtcEngine to be released before performing other operations (for example, create a new IRtcEngine object). Therefore, Agora recommends calling this method in the child thread to avoid blocking the main thread.
2314
+ * Besides, Agora does not recommend you calling release in any callback of the SDK. Otherwise, the SDK cannot release the resources until the callbacks return results, which may result in a deadlock.
2244
2315
  *
2245
- * @param sync Whether the method is called synchronously:true: Synchronous call. Agora suggests calling this method in a sub-thread to avoid congestion in the main thread because the synchronous call and the app cannot move on to another task until the resources used by IRtcEngine are released. Besides, you cannot call release in any method or callback of the SDK. Otherwise, the SDK cannot release the resources until the callbacks return results, which may result in a deadlock.false: Asynchronous call. Currently this method only supports synchronous calls, do not set this parameter to this value.
2316
+ * @param sync Whether the method is called synchronously: true : Synchronous call. false : Asynchronous call. Currently this method only supports synchronous calls. Do not set this parameter to this value.
2246
2317
  */
2247
2318
  abstract release(sync?: boolean): void;
2248
2319
  /**
2249
2320
  * Creates and initializes IRtcEngine.
2250
2321
  *
2251
- * All called methods provided by the IRtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread. Before calling other APIs, you must call createAgoraRtcEngine and initialize to create and initialize the IRtcEngine object. The SDK supports creating only one IRtcEngine instance for an app.
2322
+ * All called methods provided by the IRtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread.
2323
+ * Before calling other APIs, you must call createAgoraRtcEngine and initialize to create and initialize the IRtcEngine object.
2324
+ * The SDK supports creating only one IRtcEngine instance for an app.
2252
2325
  *
2253
2326
  * @param context Configurations for the IRtcEngine instance. See RtcEngineContext.
2254
2327
  *
2255
2328
  * @returns
2256
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -7: The SDK is not initialized. -22: The resource request failed. The SDK fails to allocate resources because your app consumes too much system resource or the system resources are insufficient. -101: The App ID is invalid.
2329
+ * 0: Success.
2330
+ * < 0: Failure.
2331
+ * -1: A general error occurs (no specified reason).
2332
+ * -2: The parameter is invalid.
2333
+ * -7: The SDK is not initialized.
2334
+ * -22: The resource request failed. The SDK fails to allocate resources because your app consumes too much system resource or the system resources are insufficient.
2335
+ * -101: The App ID is invalid.
2257
2336
  */
2258
2337
  abstract initialize(context: RtcEngineContext): number;
2259
2338
  /**
@@ -2276,36 +2355,120 @@ export declare abstract class IRtcEngine {
2276
2355
  * Queries the current device's supported video codec capabilities.
2277
2356
  *
2278
2357
  * @returns
2279
- * If the call is successful, an object containing the following attributes is returned: codecInfo : The CodecCapInfo array, indicating the video codec capabillity of the device. size : The size of the CodecCapInfo array. If the call timeouts, please modify the call logic and do not invoke the method in the main thread.
2358
+ * If the call is successful, an object containing the following attributes is returned: codecInfo : The CodecCapInfo array, indicating the video codec capabillity of the device. size : The size of the CodecCapInfo array.
2359
+ * If the call timeouts, please modify the call logic and do not invoke the method in the main thread.
2280
2360
  */
2281
2361
  abstract queryCodecCapability(): {
2282
2362
  codecInfo: CodecCapInfo[];
2283
2363
  size: number;
2284
2364
  };
2285
2365
  /**
2286
- * @ignore
2366
+ * Preloads a channel with token, channelId uid
2367
+ *
2368
+ * When audience members need to switch between different channels frequently, calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear and see the host. As it may take a while for the SDK to preload a channel, Agora recommends that you call this method as soon as possible after obtaining the channel name and user ID to join a channel.
2369
+ * When calling this method, ensure you set the user role as audience and do not set the audio scenario as AudioScenarioChorus, otherwise, this method does not take effect.
2370
+ * You also need to make sure that the channel name, user ID and token passed in for preloading are the same as the values passed in when joinning the channel, otherwise, this method does not take effect.
2371
+ * One IRtcEngine instance supports preloading 20 channels at most. When exceeding this limit, the latest 20 preloaded channels take effect.
2372
+ * Failing to preload a channel does not mean that you can't join a channel, nor will it increase the time of joining a channel. If you join a preloaded channel, leave it and want to rejoin the same channel, you do not need to call this method unless the token for preloading the channel expires.
2373
+ *
2374
+ * @param token The token generated on your server for authentication. When the token for preloading channels expires, you can update the token based on the number of channels you preload.
2375
+ * When preloading one channel, calling this method to pass in the new token.
2376
+ * When preloading more than one channels:
2377
+ * If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token.
2378
+ * If you use different tokens to preload different channels, call this method to pass in your user ID, channel name and the new token.
2379
+ * @param channelId The channel name that you want to preload. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
2380
+ * All lowercase English letters: a to z.
2381
+ * All uppercase English letters: A to Z.
2382
+ * All numeric characters: 0 to 9.
2383
+ * Space
2384
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2385
+ * @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 returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2386
+ *
2387
+ * @returns
2388
+ * 0: Success.
2389
+ * < 0: Failure.
2390
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2391
+ * -102: The channel name is invalid. You need to pass in a valid channel name and join the channel again.
2287
2392
  */
2288
2393
  abstract preloadChannel(token: string, channelId: string, uid: number): number;
2289
2394
  /**
2290
- * @ignore
2395
+ * Preloads a channel with token, channelId userAccount.
2396
+ *
2397
+ * When audience members need to switch between different channels frequently, calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear and see the host. As it may take a while for the SDK to preload a channel, Agora recommends that you call this method as soon as possible after obtaining the channel name and user ID to join a channel. If you join a preloaded channel, leave it and want to rejoin the same channel, you do not need to call this method unless the token for preloading the channel expires.
2398
+ * Failing to preload a channel does not mean that you can't join a channel, nor will it increase the time of joining a channel.
2399
+ * One IRtcEngine instance supports preloading 20 channels at most. When exceeding this limit, the latest 20 preloaded channels take effect.
2400
+ * When calling this method, ensure you set the user role as audience and do not set the audio scenario as AudioScenarioChorus, otherwise, this method does not take effect.
2401
+ * You also need to make sure that the User Account, channel ID and token passed in for preloading are the same as the values passed in when joining the channel, otherwise, this method does not take effect.
2402
+ *
2403
+ * @param token The token generated on your server for authentication. When the token for preloading channels expires, you can update the token based on the number of channels you preload.
2404
+ * When preloading one channel, calling this method to pass in the new token.
2405
+ * When preloading more than one channels:
2406
+ * If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token.
2407
+ * If you use different tokens to preload different channels, call this method to pass in your user ID, channel name and the new token.
2408
+ * @param channelId The channel name that you want to preload. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
2409
+ * All lowercase English letters: a to z.
2410
+ * All uppercase English letters: A to Z.
2411
+ * All numeric characters: 0 to 9.
2412
+ * Space
2413
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2414
+ * @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 (89 in total):
2415
+ * The 26 lowercase English letters: a to z.
2416
+ * The 26 uppercase English letters: A to Z.
2417
+ * All numeric characters: 0 to 9.
2418
+ * Space
2419
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2420
+ *
2421
+ * @returns
2422
+ * 0: Success.
2423
+ * < 0: Failure.
2424
+ * -2: The parameter is invalid. For example, the User Account is empty. You need to pass in a valid parameter and join the channel again.
2425
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2426
+ * -102: The channel name is invalid. You need to pass in a valid channel name and join the channel again.
2291
2427
  */
2292
2428
  abstract preloadChannelWithUserAccount(token: string, channelId: string, userAccount: string): number;
2293
2429
  /**
2294
- * @ignore
2430
+ * Updates the wildcard token for preloading channels.
2431
+ *
2432
+ * You need to maintain the life cycle of the wildcard token by yourself. When the token expires, you need to generate a new wildcard token and then call this method to pass in the new token.
2433
+ *
2434
+ * @param token The new token.
2435
+ *
2436
+ * @returns
2437
+ * 0: Success.
2438
+ * < 0: Failure.
2439
+ * -2: The parameter is invalid. For example, the token is invalid. You need to pass in a valid parameter and join the channel again.
2440
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2295
2441
  */
2296
2442
  abstract updatePreloadChannelToken(token: string): number;
2297
2443
  /**
2298
2444
  * Joins a channel with media options.
2299
2445
  *
2300
- * This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other. A successful call of this method triggers the following callbacks: The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks. The remote client: onUserJoined , if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile. When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client. This method allows users to join only one channel at a time. Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token.
2446
+ * This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other. A successful call of this method triggers the following callbacks:
2447
+ * The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks.
2448
+ * The remote client: onUserJoined, if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile. When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client.
2449
+ * This method allows users to join only one channel at a time.
2450
+ * Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token.
2301
2451
  *
2302
2452
  * @param token The token generated on your server for authentication.
2303
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2304
- * @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 232-1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2453
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
2454
+ * All lowercase English letters: a to z.
2455
+ * All uppercase English letters: A to Z.
2456
+ * All numeric characters: 0 to 9.
2457
+ * Space
2458
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2459
+ * @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 returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2305
2460
  * @param options The channel media options. See ChannelMediaOptions.
2306
2461
  *
2307
2462
  * @returns
2308
- * 0: Success. < 0: Failure. -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again. -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object. -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method. -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state. -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel. -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
2463
+ * 0: Success.
2464
+ * < 0: Failure.
2465
+ * -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
2466
+ * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
2467
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2468
+ * -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
2469
+ * -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
2470
+ * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
2471
+ * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
2309
2472
  */
2310
2473
  abstract joinChannel(token: string, channelId: string, uid: number, options: ChannelMediaOptions): number;
2311
2474
  /**
@@ -2314,63 +2477,91 @@ export declare abstract class IRtcEngine {
2314
2477
  * @param options The channel media options. See ChannelMediaOptions.
2315
2478
  *
2316
2479
  * @returns
2317
- * 0: Success. < 0: Failure. -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. -8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
2480
+ * 0: Success.
2481
+ * < 0: Failure.
2482
+ * -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.
2483
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2484
+ * -8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
2318
2485
  */
2319
2486
  abstract updateChannelMediaOptions(options: ChannelMediaOptions): number;
2320
2487
  /**
2321
2488
  * Sets channel options and leaves the channel.
2322
2489
  *
2323
- * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback. 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.
2490
+ * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
2491
+ * 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.
2324
2492
  *
2325
2493
  * @param options The options for leaving the channel. See LeaveChannelOptions.
2326
2494
  *
2327
2495
  * @returns
2328
- * 0: Success. < 0: Failure.
2496
+ * 0: Success.
2497
+ * < 0: Failure.
2329
2498
  */
2330
2499
  abstract leaveChannel(options?: LeaveChannelOptions): number;
2331
2500
  /**
2332
2501
  * Renews the token.
2333
2502
  *
2334
- * The SDK triggers the onTokenPrivilegeWillExpire callback. The onConnectionStateChanged callback reports ConnectionChangedTokenExpired (9).
2503
+ * The SDK triggers the onTokenPrivilegeWillExpire callback.
2504
+ * The onConnectionStateChanged callback reports ConnectionChangedTokenExpired (9).
2335
2505
  *
2336
2506
  * @param token The new token.
2337
2507
  *
2338
2508
  * @returns
2339
- * 0: Success. < 0: Failure. -2: The parameter is invalid. For example, the token is invalid. You need to fill in a valid parameter. -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2509
+ * 0: Success.
2510
+ * < 0: Failure.
2511
+ * -2: The parameter is invalid. For example, the token is invalid. You need to fill in a valid parameter.
2512
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2340
2513
  */
2341
2514
  abstract renewToken(token: string): number;
2342
2515
  /**
2343
2516
  * Sets the channel profile.
2344
2517
  *
2345
- * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of the channel. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for the interactive live video streaming. To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile. This method must be called and set before joinChannel , and cannot be set again after joining the channel. The default video encoding bitrate are different in different channel profiles. See setVideoEncoderConfiguration .
2518
+ * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of the channel. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for the interactive live video streaming.
2519
+ * To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile.
2520
+ * This method must be called and set before joinChannel, and cannot be set again after joining the channel.
2521
+ * The default video encoding bitrate are different in different channel profiles. See setVideoEncoderConfiguration.
2346
2522
  *
2347
2523
  * @param profile The channel profile. See ChannelProfileType.
2348
2524
  *
2349
2525
  * @returns
2350
- * 0(ERR_OK): Success. < 0: Failure. -2: The parameter is invalid. -7: The SDK is not initialized.
2526
+ * 0(ERR_OK): Success.
2527
+ * < 0: Failure.
2528
+ * -2: The parameter is invalid.
2529
+ * -7: The SDK is not initialized.
2351
2530
  */
2352
2531
  abstract setChannelProfile(profile: ChannelProfileType): number;
2353
2532
  /**
2354
2533
  * Sets the user role and level in an interactive live streaming channel.
2355
2534
  *
2356
- * 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: Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state. Triggers onClientRoleChanged on the local client. Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is ChannelProfileLiveBroadcasting ) only.
2535
+ * 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:
2536
+ * Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state.
2537
+ * Triggers onClientRoleChanged on the local client.
2538
+ * Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is ChannelProfileLiveBroadcasting) only.
2357
2539
  *
2358
2540
  * @param role The user role in the interactive live streaming. See ClientRoleType.
2359
2541
  * @param options The detailed options of a user, including the user level. See ClientRoleOptions.
2360
2542
  *
2361
2543
  * @returns
2362
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -5: The request is rejected. -7: The SDK is not initialized.
2544
+ * 0: Success.
2545
+ * < 0: Failure.
2546
+ * -1: A general error occurs (no specified reason).
2547
+ * -2: The parameter is invalid.
2548
+ * -5: The request is rejected.
2549
+ * -7: The SDK is not initialized.
2363
2550
  */
2364
2551
  abstract setClientRole(role: ClientRoleType, options?: ClientRoleOptions): number;
2365
2552
  /**
2366
2553
  * Starts an audio device loopback test.
2367
2554
  *
2368
- * To test whether the user's local sending and receiving streams are normal, you can call this method to perform an audio and video call loop test, which tests whether the audio and video devices and the user's upstream and downstream networks are working properly. After starting the test, the user needs to make a sound or face the camera. The audio or video is output after about two seconds. If the audio playback is normal, the audio device and the user's upstream and downstream networks are working properly; if the video playback is normal, the video device and the user's upstream and downstream networks are working properly. You can call this method either before or after joining a channel. After calling this method, call stopEchoTest to end the test; otherwise, the user cannot perform the next audio and video call loop test and cannot join the channel. In live streaming scenarios, this method only applies to hosts.
2555
+ * To test whether the user's local sending and receiving streams are normal, you can call this method to perform an audio and video call loop test, which tests whether the audio and video devices and the user's upstream and downstream networks are working properly. After starting the test, the user needs to make a sound or face the camera. The audio or video is output after about two seconds. If the audio playback is normal, the audio device and the user's upstream and downstream networks are working properly; if the video playback is normal, the video device and the user's upstream and downstream networks are working properly.
2556
+ * You can call this method either before or after joining a channel. When calling in a channel, make sure that no audio or video stream is being published.
2557
+ * After calling this method, call stopEchoTest to end the test; otherwise, the user cannot perform the next audio and video call loop test and cannot join the channel.
2558
+ * In live streaming scenarios, this method only applies to hosts.
2369
2559
  *
2370
2560
  * @param config The configuration of the audio and video call loop test. See EchoTestConfiguration.
2371
2561
  *
2372
2562
  * @returns
2373
- * 0: Success. < 0: Failure.
2563
+ * 0: Success.
2564
+ * < 0: Failure.
2374
2565
  */
2375
2566
  abstract startEchoTest(config: EchoTestConfiguration): number;
2376
2567
  /**
@@ -2378,48 +2569,75 @@ export declare abstract class IRtcEngine {
2378
2569
  *
2379
2570
  * @returns
2380
2571
  * 0: Success.
2381
- * < 0: Failure. -5(ERR_REFUSED): Failed to stop the echo test. The echo test may not be running.
2572
+ * < 0: Failure.
2573
+ * -5(ERR_REFUSED): Failed to stop the echo test. The echo test may not be running.
2382
2574
  */
2383
2575
  abstract stopEchoTest(): number;
2384
2576
  /**
2385
2577
  * Enables or disables multi-camera capture.
2386
2578
  *
2387
- * In scenarios where there are existing cameras to capture video, Agora recommends that you use the following steps to capture and publish video with multiple cameras: Call this method to enable multi-channel camera capture. Call to start the local video preview. Call startCameraCapture , and set sourceType to start video capture with the second camera. Call joinChannelEx , and set publishSecondaryCameraTrack to true to publish the video stream captured by the second camera in the channel. If you want to disable multi-channel camera capture, use the following steps: Call stopCameraCapture . Call this method with enabled set to false . You can call this method before and after to enable multi-camera capture: If it is enabled before , the local video preview shows the image captured by the two cameras at the same time. If it is enabled after , the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal. When using this function, ensure that the system version is 13.0 or later. The minimum iOS device types that support multi-camera capture are as follows: iPhone XR iPhone XS iPhone XS Max iPad Pro 3rd generation and later
2388
- *
2389
- * @param enabled Whether to enable multi-camera video capture mode:true: Enable multi-camera capture mode; the SDK uses multiple cameras to capture video.false: Disable multi-camera capture mode; the SDK uses a single camera to capture video.
2579
+ * In scenarios where there are existing cameras to capture video, Agora recommends that you use the following steps to capture and publish video with multiple cameras:
2580
+ * Call this method to enable multi-channel camera capture.
2581
+ * Call to start the local video preview.
2582
+ * Call startCameraCapture, and set sourceType to start video capture with the second camera.
2583
+ * Call joinChannelEx, and set publishSecondaryCameraTrack to true to publish the video stream captured by the second camera in the channel. If you want to disable multi-channel camera capture, use the following steps:
2584
+ * Call stopCameraCapture.
2585
+ * Call this method with enabled set to false. You can call this method before and after to enable multi-camera capture:
2586
+ * If it is enabled before, the local video preview shows the image captured by the two cameras at the same time.
2587
+ * If it is enabled after, the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal. When using this function, ensure that the system version is 13.0 or later. The minimum iOS device types that support multi-camera capture are as follows:
2588
+ * iPhone XR
2589
+ * iPhone XS
2590
+ * iPhone XS Max
2591
+ * iPad Pro 3rd generation and later
2592
+ *
2593
+ * @param enabled Whether to enable multi-camera video capture mode: true : Enable multi-camera capture mode; the SDK uses multiple cameras to capture video. false : Disable multi-camera capture mode; the SDK uses a single camera to capture video.
2390
2594
  * @param config Capture configuration for the second camera. See CameraCapturerConfiguration.
2391
2595
  *
2392
2596
  * @returns
2393
- * 0: Success. < 0: Failure.
2597
+ * 0: Success.
2598
+ * < 0: Failure.
2394
2599
  */
2395
2600
  abstract enableMultiCamera(enabled: boolean, config: CameraCapturerConfiguration): number;
2396
2601
  /**
2397
2602
  * Enables the video module.
2398
2603
  *
2399
- * Call this method either before joining a channel or during a call. If this method is called before joining a channel, the call starts in the video mode; if called during a call, the audio call switches to a video call. Call disableVideo to disable the video mode. A successful call of this method triggers the onRemoteVideoStateChanged callback on the remote client. This method enables the internal engine and is valid after leaving the channel. Calling this method will reset the entire engine, resulting in a slow response time. Instead of callling this method, you can independently control a specific video module based on your actual needs using the following methods: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams. A successful call of this method resets enableLocalVideo , muteRemoteVideoStream , and muteAllRemoteVideoStreams . Proceed it with caution.
2604
+ * Call this method either before joining a channel or during a call. If this method is called before joining a channel, the call starts in the video mode; if called during a call, the audio call switches to a video call. Call disableVideo to disable the video mode. A successful call of this method triggers the onRemoteVideoStateChanged callback on the remote client.
2605
+ * This method enables the internal engine and is valid after leaving the channel.
2606
+ * Calling this method will reset the entire engine, resulting in a slow response time. Instead of callling this method, you can independently control a specific video module based on your actual needs using the following methods: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2607
+ * A successful call of this method resets enableLocalVideo, muteRemoteVideoStream, and muteAllRemoteVideoStreams. Proceed it with caution.
2400
2608
  *
2401
2609
  * @returns
2402
- * 0: Success. < 0: Failure.
2610
+ * 0: Success.
2611
+ * < 0: Failure.
2403
2612
  */
2404
2613
  abstract enableVideo(): number;
2405
2614
  /**
2406
2615
  * Disables the video module.
2407
2616
  *
2408
- * This method can be called before joining a channel or during a call to disable the video module. If it is called before joining a channel, an audio call starts when you join the channel; if called during a call, a video call switches to an audio call. Call enableVideo to enable the video module. A successful call of this method triggers the onUserEnableVideo ( false ) callback on the remote client. This method affects the internal engine and can be called after leaving the channel. This method resets the internal engine and thus might takes some time to take effect. Agora recommends using the following APIs to control the video modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2617
+ * This method can be called before joining a channel or during a call to disable the video module. If it is called before joining a channel, an audio call starts when you join the channel; if called during a call, a video call switches to an audio call. Call enableVideo to enable the video module. A successful call of this method triggers the onUserEnableVideo (false) callback on the remote client.
2618
+ * This method affects the internal engine and can be called after leaving the channel.
2619
+ * This method resets the internal engine and thus might takes some time to take effect. Agora recommends using the following APIs to control the video modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams.
2409
2620
  *
2410
2621
  * @returns
2411
- * 0: Success. < 0: Failure.
2622
+ * 0: Success.
2623
+ * < 0: Failure.
2412
2624
  */
2413
2625
  abstract disableVideo(): number;
2414
2626
  /**
2415
2627
  * Enables the local video preview and specifies the video source for the preview.
2416
2628
  *
2417
- * You can call this method to enable local video preview. Before calling this method, ensure that you do the following: Call setView to set the local preview window. Call enableVideo to enable the video. The local preview enables the mirror mode by default. After the local video preview is enabled, if you call leaveChannel to exit the channel, the local preview remains until you call stopPreview to disable it. The video source type set in this method needs to be consistent with the video source type of VideoCanvas you set in setupLocalVideo .
2629
+ * You can call this method to enable local video preview. Call this method after the following:
2630
+ * Call setView to initialize the local preview.
2631
+ * Call enableVideo to enable the video module.
2632
+ * The local preview enables the mirror mode by default.
2633
+ * After the local video preview is enabled, if you call leaveChannel to exit the channel, the local preview remains until you call stopPreview to disable it.
2634
+ * The video source type set in this method needs to be consistent with the video source type of VideoCanvas you set in setupLocalVideo.
2418
2635
  *
2419
2636
  * @param sourceType The type of the video source. See VideoSourceType.
2420
2637
  *
2421
2638
  * @returns
2422
- * 0: Success. < 0: Failure.
2639
+ * 0: Success.
2640
+ * < 0: Failure.
2423
2641
  */
2424
2642
  abstract startPreview(sourceType?: VideoSourceType): number;
2425
2643
  /**
@@ -2430,25 +2648,32 @@ export declare abstract class IRtcEngine {
2430
2648
  * @param sourceType The type of the video source. See VideoSourceType.
2431
2649
  *
2432
2650
  * @returns
2433
- * < 0: Failure.
2651
+ * 0: Success.
2652
+ * < 0: Failure.
2434
2653
  */
2435
2654
  abstract stopPreview(sourceType?: VideoSourceType): number;
2436
2655
  /**
2437
2656
  * Starts the last mile network probe test.
2438
2657
  *
2439
- * This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method applies to the following scenarios: Before a user joins a channel, call this method to check the uplink network quality. In a live streaming channel, call this method to check the uplink network quality before an audience member switches to a host. Do not call other methods before receiving the onLastmileQuality and onLastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted. A host should not call this method after joining a channel (when in a call).
2658
+ * This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method applies to the following scenarios:
2659
+ * Before a user joins a channel, call this method to check the uplink network quality.
2660
+ * In a live streaming channel, call this method to check the uplink network quality before an audience member switches to a host.
2661
+ * Do not call other methods before receiving the onLastmileQuality and onLastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted.
2662
+ * A host should not call this method after joining a channel (when in a call).
2440
2663
  *
2441
2664
  * @param config The configurations of the last-mile network probe test. See LastmileProbeConfig.
2442
2665
  *
2443
2666
  * @returns
2444
- * 0: Success. < 0: Failure.
2667
+ * 0: Success.
2668
+ * < 0: Failure.
2445
2669
  */
2446
2670
  abstract startLastmileProbeTest(config: LastmileProbeConfig): number;
2447
2671
  /**
2448
2672
  * Stops the last mile network probe test.
2449
2673
  *
2450
2674
  * @returns
2451
- * 0: Success. < 0: Failure.
2675
+ * 0: Success.
2676
+ * < 0: Failure.
2452
2677
  */
2453
2678
  abstract stopLastmileProbeTest(): number;
2454
2679
  /**
@@ -2459,95 +2684,136 @@ export declare abstract class IRtcEngine {
2459
2684
  * @param config Video profile. See VideoEncoderConfiguration.
2460
2685
  *
2461
2686
  * @returns
2462
- * 0: Success. < 0: Failure.
2687
+ * 0: Success.
2688
+ * < 0: Failure.
2463
2689
  */
2464
2690
  abstract setVideoEncoderConfiguration(config: VideoEncoderConfiguration): number;
2465
2691
  /**
2466
2692
  * Sets the image enhancement options.
2467
2693
  *
2468
- * Enables or disables image enhancement, and sets the options. Call this method before calling enableVideo or . This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
2694
+ * Enables or disables image enhancement, and sets the options.
2695
+ * Call this method before calling enableVideo or.
2696
+ * This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
2469
2697
  *
2470
- * @param enabled Whether to enable the image enhancement function:true: Enable the image enhancement function.false: (Default) Disable the image enhancement function.
2698
+ * @param enabled Whether to enable the image enhancement function: true : Enable the image enhancement function. false : (Default) Disable the image enhancement function.
2471
2699
  * @param options The image enhancement options. See BeautyOptions.
2472
2700
  * @param type The type of the video source, see MediaSourceType.
2473
2701
  *
2474
2702
  * @returns
2475
- * 0: Success. < 0: Failure.
2703
+ * 0: Success.
2704
+ * < 0: Failure.
2476
2705
  */
2477
2706
  abstract setBeautyEffectOptions(enabled: boolean, options: BeautyOptions, type?: MediaSourceType): number;
2478
2707
  /**
2479
2708
  * Sets low-light enhancement.
2480
2709
  *
2481
- * The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect. Call this method after calling enableVideo . Dark light enhancement has certain requirements for equipment performance. The low-light enhancement feature has certain performance requirements on devices. If your device overheats after you enable low-light enhancement, Agora recommends modifying the low-light enhancement options to a less performance-consuming level or disabling low-light enhancement entirely. Both this method and setExtensionProperty can turn on low-light enhancement: When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty . This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
2710
+ * The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.
2711
+ * Call this method after calling enableVideo.
2712
+ * Dark light enhancement has certain requirements for equipment performance. The low-light enhancement feature has certain performance requirements on devices. If your device overheats after you enable low-light enhancement, Agora recommends modifying the low-light enhancement options to a less performance-consuming level or disabling low-light enhancement entirely.
2713
+ * Both this method and setExtensionProperty can turn on low-light enhancement:
2714
+ * When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK).
2715
+ * When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty.
2716
+ * This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
2482
2717
  *
2483
- * @param enabled Whether to enable low-light enhancement function:true: Enable low-light enhancement function.false: (Default) Disable low-light enhancement function.
2718
+ * @param enabled Whether to enable low-light enhancement function: true : Enable low-light enhancement function. false : (Default) Disable low-light enhancement function.
2484
2719
  * @param options The low-light enhancement options. See LowlightEnhanceOptions.
2485
2720
  * @param type The type of the video source. See MediaSourceType.
2486
2721
  *
2487
2722
  * @returns
2488
- * 0: Success. < 0: Failure.
2723
+ * 0: Success.
2724
+ * < 0: Failure.
2489
2725
  */
2490
2726
  abstract setLowlightEnhanceOptions(enabled: boolean, options: LowlightEnhanceOptions, type?: MediaSourceType): number;
2491
2727
  /**
2492
2728
  * Sets video noise reduction.
2493
2729
  *
2494
- * Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding. You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect. Call this method after calling enableVideo . Video noise reduction has certain requirements for equipment performance. If your device overheats after you enable video noise reduction, Agora recommends modifying the video noise reduction options to a less performance-consuming level or disabling video noise reduction entirely. Both this method and setExtensionProperty can turn on video noise reduction function: When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty . This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
2730
+ * Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding. You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect.
2731
+ * Call this method after calling enableVideo.
2732
+ * Video noise reduction has certain requirements for equipment performance. If your device overheats after you enable video noise reduction, Agora recommends modifying the video noise reduction options to a less performance-consuming level or disabling video noise reduction entirely.
2733
+ * Both this method and setExtensionProperty can turn on video noise reduction function:
2734
+ * When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK).
2735
+ * When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty.
2736
+ * This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
2495
2737
  *
2496
- * @param enabled Whether to enable video noise reduction:true: Enable video noise reduction.false: (Default) Disable video noise reduction.
2738
+ * @param enabled Whether to enable video noise reduction: true : Enable video noise reduction. false : (Default) Disable video noise reduction.
2497
2739
  * @param options The video noise reduction options. See VideoDenoiserOptions.
2498
2740
  * @param type The type of the video source. See MediaSourceType.
2499
2741
  *
2500
2742
  * @returns
2501
- * 0: Success. < 0: Failure.
2743
+ * 0: Success.
2744
+ * < 0: Failure.
2502
2745
  */
2503
2746
  abstract setVideoDenoiserOptions(enabled: boolean, options: VideoDenoiserOptions, type?: MediaSourceType): number;
2504
2747
  /**
2505
2748
  * Sets color enhancement.
2506
2749
  *
2507
- * The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect. Call this method after calling enableVideo . The color enhancement feature has certain performance requirements on devices. With color enhancement turned on, Agora recommends that you change the color enhancement level to one that consumes less performance or turn off color enhancement if your device is experiencing severe heat problems. Both this method and setExtensionProperty can enable color enhancement: When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty . This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
2750
+ * The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.
2751
+ * Call this method after calling enableVideo.
2752
+ * The color enhancement feature has certain performance requirements on devices. With color enhancement turned on, Agora recommends that you change the color enhancement level to one that consumes less performance or turn off color enhancement if your device is experiencing severe heat problems.
2753
+ * Both this method and setExtensionProperty can enable color enhancement:
2754
+ * When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK).
2755
+ * When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty.
2756
+ * This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
2508
2757
  *
2509
- * @param enabled Whether to enable color enhancement:true Enable color enhancement.false: (Default) Disable color enhancement.
2758
+ * @param enabled Whether to enable color enhancement: true Enable color enhancement. false : (Default) Disable color enhancement.
2510
2759
  * @param options The color enhancement options. See ColorEnhanceOptions.
2511
2760
  * @param type The type of the video source. See MediaSourceType.
2512
2761
  *
2513
2762
  * @returns
2514
- * 0: Success. < 0: Failure.
2763
+ * 0: Success.
2764
+ * < 0: Failure.
2515
2765
  */
2516
2766
  abstract setColorEnhanceOptions(enabled: boolean, options: ColorEnhanceOptions, type?: MediaSourceType): number;
2517
2767
  /**
2518
2768
  * Enables/Disables the virtual background.
2519
2769
  *
2520
- * The virtual background feature enables the local user to replace their original background with a static image, dynamic video, blurred background, or portrait-background segmentation to achieve picture-in-picture effect. Once the virtual background feature is enabled, all users in the channel can see the custom background. Call this method before calling enableVideo or . This feature requires high performance devices. Agora recommends that you implement it on devices equipped with the following chips: Devices with an i5 CPU and better Agora recommends that you use this feature in scenarios that meet the following conditions: A high-definition camera device is used, and the environment is uniformly lit. There are few objects in the captured video. Portraits are half-length and unobstructed. Ensure that the background is a solid color that is different from the color of the user's clothing. This method relies on the virtual background dynamic library libagora_segmentation_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
2770
+ * The virtual background feature enables the local user to replace their original background with a static image, dynamic video, blurred background, or portrait-background segmentation to achieve picture-in-picture effect. Once the virtual background feature is enabled, all users in the channel can see the custom background. Call this method before calling enableVideo or.
2771
+ * This feature requires high performance devices. Agora recommends that you implement it on devices equipped with the following chips:
2772
+ * Devices with an i5 CPU and better
2773
+ * Agora recommends that you use this feature in scenarios that meet the following conditions:
2774
+ * A high-definition camera device is used, and the environment is uniformly lit.
2775
+ * There are few objects in the captured video. Portraits are half-length and unobstructed. Ensure that the background is a solid color that is different from the color of the user's clothing.
2776
+ * This method relies on the virtual background dynamic library libagora_segmentation_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
2521
2777
  *
2522
- * @param enabled Whether to enable virtual background:true: Enable virtual background.false: Disable virtual background.
2778
+ * @param enabled Whether to enable virtual background: true : Enable virtual background. false : Disable virtual background.
2523
2779
  * @param backgroundSource The custom background. See VirtualBackgroundSource. To adapt the resolution of the custom background image to that of the video captured by the SDK, the SDK scales and crops the custom background image while ensuring that the content of the custom background image is not distorted.
2524
2780
  * @param segproperty Processing properties for background images. See SegmentationProperty.
2525
- * @param type The type of the video source. See MediaSourceType.In this method, this parameter supports only the following two settings:The default value is PrimaryCameraSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
2781
+ * @param type The type of the video source. See MediaSourceType. In this method, this parameter supports only the following two settings:
2782
+ * The default value is PrimaryCameraSource.
2783
+ * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
2526
2784
  *
2527
2785
  * @returns
2528
- * 0: Success. < 0: Failure. -1: The custom background image does not exist. Check the value of source in VirtualBackgroundSource . -2: The color format of the custom background image is invalid. Check the value of color in VirtualBackgroundSource . -3: The device does not support virtual background.
2786
+ * 0: Success.
2787
+ * < 0: Failure.
2788
+ * -1: The custom background image does not exist. Check the value of source in VirtualBackgroundSource.
2789
+ * -2: The color format of the custom background image is invalid. Check the value of color in VirtualBackgroundSource.
2790
+ * -3: The device does not support virtual background.
2529
2791
  */
2530
2792
  abstract enableVirtualBackground(enabled: boolean, backgroundSource: VirtualBackgroundSource, segproperty: SegmentationProperty, type?: MediaSourceType): number;
2531
2793
  /**
2532
2794
  * Initializes the video view of a remote user.
2533
2795
  *
2534
- * This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. If you use the Agora recording function, the recording client joins the channel as a placeholder client, triggering the onUserJoined callback. Do not bind the placeholder client to the app view because the placeholder client does not send any video streams. If your app does not recognize the placeholder client, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback.
2796
+ * This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user.
2797
+ * If you use the Agora recording function, the recording client joins the channel as a placeholder client, triggering the onUserJoined callback. Do not bind the placeholder client to the app view because the placeholder client does not send any video streams. If your app does not recognize the placeholder client, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback.
2535
2798
  *
2536
2799
  * @param canvas The remote video view and settings. See VideoCanvas.
2537
2800
  *
2538
2801
  * @returns
2539
- * 0: Success. < 0: Failure.
2802
+ * 0: Success.
2803
+ * < 0: Failure.
2540
2804
  */
2541
2805
  abstract setupRemoteVideo(canvas: VideoCanvas): number;
2542
2806
  /**
2543
2807
  * Initializes the local video view.
2544
2808
  *
2545
- * This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL . You can call this method either before or after joining a channel.
2809
+ * This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL.
2810
+ * You can call this method either before or after joining a channel.
2546
2811
  *
2547
2812
  * @param canvas The local video view and settings. See VideoCanvas.
2548
2813
  *
2549
2814
  * @returns
2550
- * 0: Success. < 0: Failure.
2815
+ * 0: Success.
2816
+ * < 0: Failure.
2551
2817
  */
2552
2818
  abstract setupLocalVideo(canvas: VideoCanvas): number;
2553
2819
  /**
@@ -2555,40 +2821,62 @@ export declare abstract class IRtcEngine {
2555
2821
  *
2556
2822
  * After successfully calling this method, the SDK will automatically enable the best practice strategies and adjust key performance metrics based on the specified scenario, to optimize the video experience. Ensure that you call this method before joining a channel.
2557
2823
  *
2558
- * @param scenarioType The type of video application scenario. See VideoApplicationScenarioType.If set to ApplicationScenarioMeeting (1), the SDK automatically enables the following strategies:In meeting scenarios where low-quality video streams are required to have a high bitrate, the SDK automatically enables multiple technologies used to deal with network congestions, to enhance the performance of the low-quality streams and to ensure the smooth reception by subscribers.The SDK monitors the number of subscribers to the high-quality video stream in real time and dynamically adjusts its configuration based on the number of subscribers.If nobody subscribers to the high-quality stream, the SDK automatically reduces its bitrate and frame rate to save upstream bandwidth.If someone subscribes to the high-quality stream, the SDK resets the high-quality stream to the VideoEncoderConfiguration configuration used in the most recent calling of setVideoEncoderConfiguration. If no configuration has been set by the user previously, the following values are used:Resolution: 1280 × 720Frame rate: 15 fpsBitrate: 1600 KbpsThe SDK monitors the number of subscribers to the low-quality video stream in real time and dynamically enables or disables it based on the number of subscribers.If the user has called setDualStreamMode to set that never send low-quality video stream (DisableSimulcastStream), the dynamic adjustment of the low-quality stream in meeting scenarios will not take effect.If nobody subscribes to the low-quality stream, the SDK automatically disables it to save upstream bandwidth.If someone subscribes to the low-quality stream, the SDK enables the low-quality stream and resets it to the SimulcastStreamConfig configuration used in the most recent calling of setDualStreamMode. If no configuration has been set by the user previously, the following values are used:Resolution: 480 × 272Frame rate: 15 fpsBitrate: 500 Kbps
2824
+ * @param scenarioType The type of video application scenario. See VideoApplicationScenarioType. If set to ApplicationScenarioMeeting (1), the SDK automatically enables the following strategies:
2825
+ * In meeting scenarios where low-quality video streams are required to have a high bitrate, the SDK automatically enables multiple technologies used to deal with network congestions, to enhance the performance of the low-quality streams and to ensure the smooth reception by subscribers.
2826
+ * The SDK monitors the number of subscribers to the high-quality video stream in real time and dynamically adjusts its configuration based on the number of subscribers.
2827
+ * If nobody subscribers to the high-quality stream, the SDK automatically reduces its bitrate and frame rate to save upstream bandwidth.
2828
+ * If someone subscribes to the high-quality stream, the SDK resets the high-quality stream to the VideoEncoderConfiguration configuration used in the most recent calling of setVideoEncoderConfiguration. If no configuration has been set by the user previously, the following values are used:
2829
+ * Resolution: 1280 × 720
2830
+ * Frame rate: 15 fps
2831
+ * Bitrate: 1600 Kbps
2832
+ * The SDK monitors the number of subscribers to the low-quality video stream in real time and dynamically enables or disables it based on the number of subscribers. If the user has called setDualStreamMode to set that never send low-quality video stream (DisableSimulcastStream), the dynamic adjustment of the low-quality stream in meeting scenarios will not take effect.
2833
+ * If nobody subscribes to the low-quality stream, the SDK automatically disables it to save upstream bandwidth.
2834
+ * If someone subscribes to the low-quality stream, the SDK enables the low-quality stream and resets it to the SimulcastStreamConfig configuration used in the most recent calling of setDualStreamMode. If no configuration has been set by the user previously, the following values are used:
2835
+ * Resolution: 480 × 272
2836
+ * Frame rate: 15 fps
2837
+ * Bitrate: 500 Kbps
2559
2838
  *
2560
2839
  * @returns
2561
- * 0: Success. < 0: Failure.
2840
+ * 0: Success.
2841
+ * < 0: Failure.
2562
2842
  */
2563
2843
  abstract setVideoScenario(scenarioType: VideoApplicationScenarioType): number;
2564
2844
  /**
2565
2845
  * Enables the audio module.
2566
2846
  *
2567
- * The audio mode is enabled by default. This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel. Calling this method will reset the entire engine, resulting in a slow response time. Instead of callling this method, you can independently control a specific audio module based on your actual needs using the following methods: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams. A successful call of this method resets enableLocalAudio , muteRemoteAudioStream , and muteAllRemoteAudioStreams . Proceed it with caution.
2847
+ * The audio mode is enabled by default.
2848
+ * This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.
2849
+ * Calling this method will reset the entire engine, resulting in a slow response time. Instead of callling this method, you can independently control a specific audio module based on your actual needs using the following methods: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams.
2850
+ * A successful call of this method resets enableLocalAudio, muteRemoteAudioStream, and muteAllRemoteAudioStreams. Proceed it with caution.
2568
2851
  *
2569
2852
  * @returns
2570
- * 0: Success. < 0: Failure.
2853
+ * 0: Success.
2854
+ * < 0: Failure.
2571
2855
  */
2572
2856
  abstract enableAudio(): number;
2573
2857
  /**
2574
2858
  * Disables the audio module.
2575
2859
  *
2576
- * This method disables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel. This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams.
2860
+ * This method disables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.
2861
+ * This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams.
2577
2862
  *
2578
2863
  * @returns
2579
- * 0: Success. < 0: Failure.
2864
+ * 0: Success.
2865
+ * < 0: Failure.
2580
2866
  */
2581
2867
  abstract disableAudio(): number;
2582
2868
  /**
2583
2869
  * Sets the audio profile and audio scenario.
2584
2870
  *
2585
- * You can call this method either before or after joining a channel. In scenarios requiring high-quality audio, such as online music tutoring, Agora recommends you set profile as AudioProfileMusicHighQuality (4) and scenario as AudioScenarioGameStreaming (3) .
2871
+ * You can call this method either before or after joining a channel.
2872
+ * In scenarios requiring high-quality audio, such as online music tutoring, Agora recommends you set profile as AudioProfileMusicHighQuality (4) and scenario as AudioScenarioGameStreaming (3).
2586
2873
  *
2587
2874
  * @param profile The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType.
2588
2875
  * @param scenario The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types.
2589
2876
  *
2590
2877
  * @returns
2591
- * 0: Success. < 0: Failure.
2878
+ * 0: Success.
2879
+ * < 0: Failure.
2592
2880
  */
2593
2881
  abstract setAudioProfile(profile: AudioProfileType, scenario?: AudioScenarioType): number;
2594
2882
  /**
@@ -2599,18 +2887,22 @@ export declare abstract class IRtcEngine {
2599
2887
  * @param scenario The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types.
2600
2888
  *
2601
2889
  * @returns
2602
- * 0: Success. < 0: Failure.
2890
+ * 0: Success.
2891
+ * < 0: Failure.
2603
2892
  */
2604
2893
  abstract setAudioScenario(scenario: AudioScenarioType): number;
2605
2894
  /**
2606
2895
  * Enables or disables the local audio capture.
2607
2896
  *
2608
- * The audio function is enabled by default when users joining a channel. This method disables or re-enables the local audio function to stop or restart local audio capturing. This method does not affect receiving or playing the remote audio streams, and enableLocalAudio ( false ) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel. Once the local audio function is disabled or re-enabled, the SDK triggers the onLocalAudioStateChanged callback, which reports LocalAudioStreamStateStopped (0) or LocalAudioStreamStateRecording (1). The difference between this method and muteLocalAudioStream are as follow: enableLocalAudio : Disables or re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback. muteLocalAudioStream : Sends or stops sending the local audio streams. You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel.
2897
+ * The audio function is enabled by default when users joining a channel. This method disables or re-enables the local audio function to stop or restart local audio capturing. This method does not affect receiving or playing the remote audio streams, and enableLocalAudio (false) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel. Once the local audio function is disabled or re-enabled, the SDK triggers the onLocalAudioStateChanged callback, which reports LocalAudioStreamStateStopped (0) or LocalAudioStreamStateRecording (1).
2898
+ * The difference between this method and muteLocalAudioStream are as follow: enableLocalAudio : Disables or re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback. muteLocalAudioStream : Sends or stops sending the local audio streams.
2899
+ * You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel.
2609
2900
  *
2610
- * @param enabled true: (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone).false: Disable the local audio function, that is, to stop local audio capturing.
2901
+ * @param enabled true : (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone). false : Disable the local audio function, that is, to stop local audio capturing.
2611
2902
  *
2612
2903
  * @returns
2613
- * 0: Success. < 0: Failure.
2904
+ * 0: Success.
2905
+ * < 0: Failure.
2614
2906
  */
2615
2907
  abstract enableLocalAudio(enabled: boolean): number;
2616
2908
  /**
@@ -2618,21 +2910,25 @@ export declare abstract class IRtcEngine {
2618
2910
  *
2619
2911
  * This method does not affect any ongoing audio recording, because it does not disable the audio capture device. A successful call of this method triggers the onUserMuteAudio and onRemoteAudioStateChanged callbacks on the remote client.
2620
2912
  *
2621
- * @param mute Whether to stop publishing the local audio stream:true: Stops publishing the local audio stream.false: (Default) Resumes publishing the local audio stream.
2913
+ * @param mute Whether to stop publishing the local audio stream: true : Stops publishing the local audio stream. false : (Default) Resumes publishing the local audio stream.
2622
2914
  *
2623
2915
  * @returns
2624
- * 0: Success. < 0: Failure.
2916
+ * 0: Success.
2917
+ * < 0: Failure.
2625
2918
  */
2626
2919
  abstract muteLocalAudioStream(mute: boolean): number;
2627
2920
  /**
2628
2921
  * Stops or resumes subscribing to the audio streams of all remote users.
2629
2922
  *
2630
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. Call this method after joining a channel. If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel .
2923
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
2924
+ * Call this method after joining a channel.
2925
+ * If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel.
2631
2926
  *
2632
- * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default.
2927
+ * @param mute Whether to stop subscribing to the audio streams of all remote users: true : Stops subscribing to the audio streams of all remote users. false : (Default) Subscribes to the audio streams of all remote users by default.
2633
2928
  *
2634
2929
  * @returns
2635
- * 0: Success. < 0: Failure.
2930
+ * 0: Success.
2931
+ * < 0: Failure.
2636
2932
  */
2637
2933
  abstract muteAllRemoteAudioStreams(mute: boolean): number;
2638
2934
  /**
@@ -2645,43 +2941,53 @@ export declare abstract class IRtcEngine {
2645
2941
  * Call this method after joining a channel.
2646
2942
  *
2647
2943
  * @param uid The user ID of the specified user.
2648
- * @param mute Whether to subscribe to the specified remote user's audio stream.true: Stop subscribing to the audio stream of the specified user.false: (Default) Subscribe to the audio stream of the specified user.
2944
+ * @param mute Whether to subscribe to the specified remote user's audio stream. true : Stop subscribing to the audio stream of the specified user. false : (Default) Subscribe to the audio stream of the specified user.
2649
2945
  *
2650
2946
  * @returns
2651
- * 0: Success. < 0: Failure.
2947
+ * 0: Success.
2948
+ * < 0: Failure.
2652
2949
  */
2653
2950
  abstract muteRemoteAudioStream(uid: number, mute: boolean): number;
2654
2951
  /**
2655
2952
  * Stops or resumes publishing the local video stream.
2656
2953
  *
2657
- * A successful call of this method triggers the onUserMuteVideo callback on the remote client. This method executes faster than the enableLocalVideo ( false ) method, which controls the sending of the local video stream. This method does not affect any ongoing video recording, because it does not disable the camera.
2954
+ * A successful call of this method triggers the onUserMuteVideo callback on the remote client.
2955
+ * This method executes faster than the enableLocalVideo (false) method, which controls the sending of the local video stream.
2956
+ * This method does not affect any ongoing video recording, because it does not disable the camera.
2658
2957
  *
2659
- * @param mute Whether to stop publishing the local video stream.true: Stop publishing the local video stream.false: (Default) Publish the local video stream.
2958
+ * @param mute Whether to stop publishing the local video stream. true : Stop publishing the local video stream. false : (Default) Publish the local video stream.
2660
2959
  *
2661
2960
  * @returns
2662
- * 0: Success. < 0: Failure.
2961
+ * 0: Success.
2962
+ * < 0: Failure.
2663
2963
  */
2664
2964
  abstract muteLocalVideoStream(mute: boolean): number;
2665
2965
  /**
2666
2966
  * Enables/Disables the local video capture.
2667
2967
  *
2668
- * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream. After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo ( false ) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo ( true ). After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client. You can call this method either before or after joining a channel. This method enables the internal engine and is valid after leaving the channel.
2968
+ * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream. After calling enableVideo, the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo (true). After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.
2969
+ * You can call this method either before or after joining a channel.
2970
+ * This method enables the internal engine and is valid after leaving the channel.
2669
2971
  *
2670
- * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
2972
+ * @param enabled Whether to enable the local video capture. true : (Default) Enable the local video capture. false : Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
2671
2973
  *
2672
2974
  * @returns
2673
- * 0: Success. < 0: Failure.
2975
+ * 0: Success.
2976
+ * < 0: Failure.
2674
2977
  */
2675
2978
  abstract enableLocalVideo(enabled: boolean): number;
2676
2979
  /**
2677
2980
  * Stops or resumes subscribing to the video streams of all remote users.
2678
2981
  *
2679
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. Call this method after joining a channel. If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false .
2982
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
2983
+ * Call this method after joining a channel.
2984
+ * If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false.
2680
2985
  *
2681
- * @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.
2986
+ * @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.
2682
2987
  *
2683
2988
  * @returns
2684
- * 0: Success. < 0: Failure.
2989
+ * 0: Success.
2990
+ * < 0: Failure.
2685
2991
  */
2686
2992
  abstract muteAllRemoteVideoStreams(mute: boolean): number;
2687
2993
  /**
@@ -2694,93 +3000,126 @@ export declare abstract class IRtcEngine {
2694
3000
  * Call this method after joining a channel.
2695
3001
  *
2696
3002
  * @param uid The user ID of the specified user.
2697
- * @param mute Whether to subscribe to the specified remote user's video stream.true: Stop subscribing to the video streams of the specified user.false: (Default) Subscribe to the video stream of the specified user.
3003
+ * @param mute Whether to subscribe to the specified remote user's video stream. true : Stop subscribing to the video streams of the specified user. false : (Default) Subscribe to the video stream of the specified user.
2698
3004
  *
2699
3005
  * @returns
2700
- * 0: Success. < 0: Failure.
3006
+ * 0: Success.
3007
+ * < 0: Failure.
2701
3008
  */
2702
3009
  abstract muteRemoteVideoStream(uid: number, mute: boolean): number;
2703
3010
  /**
2704
3011
  * Sets the stream type of the remote video.
2705
3012
  *
2706
- * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode ( false ) , the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType , the setting of setRemoteVideoStreamType takes effect.
3013
+ * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType, the setting of setRemoteVideoStreamType takes effect.
2707
3014
  *
2708
3015
  * @param uid The user ID.
2709
3016
  * @param streamType The video stream type: VideoStreamType.
2710
3017
  *
2711
3018
  * @returns
2712
- * 0: Success. < 0: Failure.
3019
+ * 0: Success.
3020
+ * < 0: Failure.
2713
3021
  */
2714
3022
  abstract setRemoteVideoStreamType(uid: number, streamType: VideoStreamType): number;
2715
3023
  /**
2716
3024
  * Options for subscribing to remote video streams.
2717
3025
  *
2718
- * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user. If you only register one IVideoFrameObserver object, the SDK subscribes to the raw video data and encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false ). If you only register one IVideoEncodedFrameObserver object, the SDK only subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to true ). If you register one IVideoFrameObserver object and one IVideoEncodedFrameObserver object successively, the SDK subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false ). If you call this method first with the options parameter set, and then register one IVideoFrameObserver or IVideoEncodedFrameObserver object, you need to call this method again and set the options parameter as described in the above two items to get the desired results. Agora recommends the following steps: Set autoSubscribeVideo to false when calling joinChannel to join a channel. Call this method after receiving the onUserJoined callback to set the subscription options for the specified remote user's video stream. Call the muteRemoteVideoStream method to resume subscribing to the video stream of the specified remote user. If you set encodedFrameOnly to true in the previous step, the SDK triggers the onEncodedVideoFrameReceived callback locally to report the received encoded video frame information.
3026
+ * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user.
3027
+ * If you only register one IVideoFrameObserver object, the SDK subscribes to the raw video data and encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false).
3028
+ * If you only register one IVideoEncodedFrameObserver object, the SDK only subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to true).
3029
+ * If you register one IVideoFrameObserver object and one IVideoEncodedFrameObserver object successively, the SDK subscribes to the encoded video data by default (the effect is equivalent to setting encodedFrameOnly to false).
3030
+ * If you call this method first with the options parameter set, and then register one IVideoFrameObserver or IVideoEncodedFrameObserver object, you need to call this method again and set the options parameter as described in the above two items to get the desired results. Agora recommends the following steps:
3031
+ * Set autoSubscribeVideo to false when calling joinChannel to join a channel.
3032
+ * Call this method after receiving the onUserJoined callback to set the subscription options for the specified remote user's video stream.
3033
+ * Call the muteRemoteVideoStream method to resume subscribing to the video stream of the specified remote user. If you set encodedFrameOnly to true in the previous step, the SDK triggers the onEncodedVideoFrameReceived callback locally to report the received encoded video frame information.
2719
3034
  *
2720
3035
  * @param uid The user ID of the remote user.
2721
3036
  * @param options The video subscription options. See VideoSubscriptionOptions.
2722
3037
  *
2723
3038
  * @returns
2724
- * 0: Success. < 0: Failure.
3039
+ * 0: Success.
3040
+ * < 0: Failure.
2725
3041
  */
2726
3042
  abstract setRemoteVideoSubscriptionOptions(uid: number, options: VideoSubscriptionOptions): number;
2727
3043
  /**
2728
3044
  * Sets the default stream type of subscrption for remote video streams.
2729
3045
  *
2730
- * The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode ( false ) , the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel. If you call both this method and setRemoteVideoStreamType , the SDK applies the settings in the setRemoteVideoStreamType method.
3046
+ * The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.
3047
+ * Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel.
3048
+ * If you call both this method and setRemoteVideoStreamType, the SDK applies the settings in the setRemoteVideoStreamType method.
2731
3049
  *
2732
3050
  * @param streamType The default video-stream type. See VideoStreamType.
2733
3051
  *
2734
3052
  * @returns
2735
- * 0: Success. < 0: Failure.
3053
+ * 0: Success.
3054
+ * < 0: Failure.
2736
3055
  */
2737
3056
  abstract setRemoteDefaultVideoStreamType(streamType: VideoStreamType): number;
2738
3057
  /**
2739
3058
  * Set the blocklist of subscriptions for audio streams.
2740
3059
  *
2741
- * You can call this method to specify the audio streams of a user that you do not want to subscribe to. You can call this method either before or after joining a channel. The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions . Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3060
+ * You can call this method to specify the audio streams of a user that you do not want to subscribe to.
3061
+ * You can call this method either before or after joining a channel.
3062
+ * The blocklist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams, and autoSubscribeAudio in ChannelMediaOptions.
3063
+ * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
3064
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
2742
3065
  *
2743
- * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
3066
+ * @param uidList The user ID list of users that you do not want to subscribe to. If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
2744
3067
  * @param uidNumber The number of users in the user ID list.
2745
3068
  *
2746
3069
  * @returns
2747
- * 0: Success. < 0: Failure.
3070
+ * 0: Success.
3071
+ * < 0: Failure.
2748
3072
  */
2749
3073
  abstract setSubscribeAudioBlocklist(uidList: number[], uidNumber: number): number;
2750
3074
  /**
2751
3075
  * Sets the allowlist of subscriptions for audio streams.
2752
3076
  *
2753
- * You can call this method to specify the audio streams of a user that you want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. You can call this method either before or after joining a channel. The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions . Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
3077
+ * You can call this method to specify the audio streams of a user that you want to subscribe to.
3078
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3079
+ * You can call this method either before or after joining a channel.
3080
+ * The allowlist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions.
3081
+ * Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
2754
3082
  *
2755
- * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
3083
+ * @param uidList The user ID list of users that you want to subscribe to. If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
2756
3084
  * @param uidNumber The number of users in the user ID list.
2757
3085
  *
2758
3086
  * @returns
2759
- * 0: Success. < 0: Failure.
3087
+ * 0: Success.
3088
+ * < 0: Failure.
2760
3089
  */
2761
3090
  abstract setSubscribeAudioAllowlist(uidList: number[], uidNumber: number): number;
2762
3091
  /**
2763
3092
  * Set the blocklist of subscriptions for video streams.
2764
3093
  *
2765
- * You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. You can call this method either before or after joining a channel. The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
3094
+ * You can call this method to specify the video streams of a user that you do not want to subscribe to.
3095
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3096
+ * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
3097
+ * You can call this method either before or after joining a channel.
3098
+ * The blocklist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
2766
3099
  *
2767
- * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
3100
+ * @param uidList The user ID list of users that you do not want to subscribe to. If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
2768
3101
  * @param uidNumber The number of users in the user ID list.
2769
3102
  *
2770
3103
  * @returns
2771
- * 0: Success. < 0: Failure.
3104
+ * 0: Success.
3105
+ * < 0: Failure.
2772
3106
  */
2773
3107
  abstract setSubscribeVideoBlocklist(uidList: number[], uidNumber: number): number;
2774
3108
  /**
2775
3109
  * Set the allowlist of subscriptions for video streams.
2776
3110
  *
2777
- * You can call this method to specify the video streams of a user that you want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. You can call this method either before or after joining a channel. The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
3111
+ * You can call this method to specify the video streams of a user that you want to subscribe to.
3112
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
3113
+ * Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
3114
+ * You can call this method either before or after joining a channel.
3115
+ * The allowlist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
2778
3116
  *
2779
- * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
3117
+ * @param uidList The user ID list of users that you want to subscribe to. If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
2780
3118
  * @param uidNumber The number of users in the user ID list.
2781
3119
  *
2782
3120
  * @returns
2783
- * 0: Success. < 0: Failure.
3121
+ * 0: Success.
3122
+ * < 0: Failure.
2784
3123
  */
2785
3124
  abstract setSubscribeVideoAllowlist(uidList: number[], uidNumber: number): number;
2786
3125
  /**
@@ -2788,29 +3127,36 @@ export declare abstract class IRtcEngine {
2788
3127
  *
2789
3128
  * This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. Once you call this method and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method. You can call this method either before or after joining a channel.
2790
3129
  *
2791
- * @param interval Sets the time interval between two consecutive volume indications:≤ 0: Disables the volume indication.> 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
3130
+ * @param interval Sets the time interval between two consecutive volume indications:
3131
+ * ≤ 0: Disables the volume indication.
3132
+ * > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
2792
3133
  * @param smooth The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator.
2793
- * @param reportVad true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
3134
+ * @param reportVad true : Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user. false : (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
2794
3135
  *
2795
3136
  * @returns
2796
- * 0: Success. < 0: Failure.
3137
+ * 0: Success.
3138
+ * < 0: Failure.
2797
3139
  */
2798
3140
  abstract enableAudioVolumeIndication(interval: number, smooth: number, reportVad: boolean): number;
2799
3141
  /**
2800
3142
  * Starts audio recording on the client and sets recording configurations.
2801
3143
  *
2802
- * The Agora SDK allows recording during a call. After successfully calling this method, you can record the audio of users in the channel and get an audio recording file. Supported formats of the recording file are as follows: WAV: High-fidelity files with typically larger file sizes. For example, if the sample rate is 32,000 Hz, the file size for 10-minute recording is approximately 73 MB. AAC: Low-fidelity files with typically smaller file sizes. For example, if the sample rate is 32,000 Hz and the recording quality is AudioRecordingQualityMedium , the file size for 10-minute recording is approximately 2 MB. Once the user leaves the channel, the recording automatically stops. Call this method after joining a channel.
3144
+ * The Agora SDK allows recording during a call. After successfully calling this method, you can record the audio of users in the channel and get an audio recording file. Supported formats of the recording file are as follows:
3145
+ * WAV: High-fidelity files with typically larger file sizes. For example, if the sample rate is 32,000 Hz, the file size for 10-minute recording is approximately 73 MB.
3146
+ * AAC: Low-fidelity files with typically smaller file sizes. For example, if the sample rate is 32,000 Hz and the recording quality is AudioRecordingQualityMedium, the file size for 10-minute recording is approximately 2 MB. Once the user leaves the channel, the recording automatically stops. Call this method after joining a channel.
2803
3147
  *
2804
3148
  * @param config Recording configurations. See AudioRecordingConfiguration.
2805
3149
  *
2806
3150
  * @returns
2807
- * 0: Success. < 0: Failure.
3151
+ * 0: Success.
3152
+ * < 0: Failure.
2808
3153
  */
2809
3154
  abstract startAudioRecording(config: AudioRecordingConfiguration): number;
2810
3155
  /**
2811
3156
  * Registers an encoded audio observer.
2812
3157
  *
2813
- * Call this method after joining a channel. You can call this method or startAudioRecording to set the recording type and quality of audio files, but Agora does not recommend using this method and startAudioRecording at the same time. Only the method called later will take effect.
3158
+ * Call this method after joining a channel.
3159
+ * You can call this method or startAudioRecording to set the recording type and quality of audio files, but Agora does not recommend using this method and startAudioRecording at the same time. Only the method called later will take effect.
2814
3160
  *
2815
3161
  * @returns
2816
3162
  * One IAudioEncodedFrameObserver object.
@@ -2820,14 +3166,16 @@ export declare abstract class IRtcEngine {
2820
3166
  * Stops the audio recording on the client.
2821
3167
  *
2822
3168
  * @returns
2823
- * 0: Success. < 0: Failure.
3169
+ * 0: Success.
3170
+ * < 0: Failure.
2824
3171
  */
2825
3172
  abstract stopAudioRecording(): number;
2826
3173
  /**
2827
3174
  * Creates a media player instance.
2828
3175
  *
2829
3176
  * @returns
2830
- * The IMediaPlayer instance, if the method call succeeds. An empty pointer, if the method call fails.
3177
+ * The IMediaPlayer instance, if the method call succeeds.
3178
+ * An empty pointer, if the method call fails.
2831
3179
  */
2832
3180
  abstract createMediaPlayer(): IMediaPlayer;
2833
3181
  /**
@@ -2836,7 +3184,8 @@ export declare abstract class IRtcEngine {
2836
3184
  * @param mediaPlayer One IMediaPlayer object.
2837
3185
  *
2838
3186
  * @returns
2839
- * ≥ 0: Success. Returns the ID of media player instance. < 0: Failure.
3187
+ * ≥ 0: Success. Returns the ID of media player instance.
3188
+ * < 0: Failure.
2840
3189
  */
2841
3190
  abstract destroyMediaPlayer(mediaPlayer: IMediaPlayer): number;
2842
3191
  /**
@@ -2850,17 +3199,29 @@ export declare abstract class IRtcEngine {
2850
3199
  /**
2851
3200
  * Starts playing the music file.
2852
3201
  *
2853
- * This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged ( AudioMixingStateStopped ) callback on the local client. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support . You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms. If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports 701.
3202
+ * This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged (AudioMixingStatePlaying) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged (AudioMixingStateStopped) callback on the local client.
3203
+ * For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
3204
+ * You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms.
3205
+ * If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports 701.
2854
3206
  *
2855
3207
  * @param filePath File path:
2856
- * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.
3208
+ * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example : C:\music\audio.mp4.
2857
3209
  * macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
2858
- * @param loopback Whether to only play music files on the local client:true: Only play music files on the local client so that only the local user can hear the music.false: Publish music files to remote clients so that both the local user and remote users can hear the music.
2859
- * @param cycle The number of times the music file plays.≥ 0: The number of playback times. For example, 0 means that the SDK does not play the music file while 1 means that the SDK plays once.-1: Play the audio file in an infinite loop.
3210
+ * @param loopback Whether to only play music files on the local client: true : Only play music files on the local client so that only the local user can hear the music. false : Publish music files to remote clients so that both the local user and remote users can hear the music.
3211
+ * @param cycle The number of times the music file plays.
3212
+ * ≥ 0: The number of playback times. For example, 0 means that the SDK does not play the music file while 1 means that the SDK plays once.
3213
+ * -1: Play the audio file in an infinite loop.
2860
3214
  * @param startPos The playback position (ms) of the music file.
2861
3215
  *
2862
3216
  * @returns
2863
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -3: The SDK is not ready. The audio module is disabled. The program is not complete. The initialization of IRtcEngine fails. Reinitialize the IRtcEngine .
3217
+ * 0: Success.
3218
+ * < 0: Failure.
3219
+ * -1: A general error occurs (no specified reason).
3220
+ * -2: The parameter is invalid.
3221
+ * -3: The SDK is not ready.
3222
+ * The audio module is disabled.
3223
+ * The program is not complete.
3224
+ * The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.
2864
3225
  */
2865
3226
  abstract startAudioMixing(filePath: string, loopback: boolean, cycle: number, startPos?: number): number;
2866
3227
  /**
@@ -2869,7 +3230,8 @@ export declare abstract class IRtcEngine {
2869
3230
  * This method stops the audio mixing. Call this method when you are in a channel.
2870
3231
  *
2871
3232
  * @returns
2872
- * 0: Success. < 0: Failure.
3233
+ * 0: Success.
3234
+ * < 0: Failure.
2873
3235
  */
2874
3236
  abstract stopAudioMixing(): number;
2875
3237
  /**
@@ -2878,7 +3240,8 @@ export declare abstract class IRtcEngine {
2878
3240
  * Call this method after joining a channel.
2879
3241
  *
2880
3242
  * @returns
2881
- * 0: Success. < 0: Failure.
3243
+ * 0: Success.
3244
+ * < 0: Failure.
2882
3245
  */
2883
3246
  abstract pauseAudioMixing(): number;
2884
3247
  /**
@@ -2887,180 +3250,212 @@ export declare abstract class IRtcEngine {
2887
3250
  * This method resumes playing and mixing the music file. Call this method when you are in a channel.
2888
3251
  *
2889
3252
  * @returns
2890
- * 0: Success. < 0: Failure.
3253
+ * 0: Success.
3254
+ * < 0: Failure.
2891
3255
  */
2892
3256
  abstract resumeAudioMixing(): number;
2893
3257
  /**
2894
3258
  * Selects the audio track used during playback.
2895
3259
  *
2896
- * After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language. For the supported formats of audio files, see . You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3260
+ * After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language.
3261
+ * For the supported formats of audio files, see.
3262
+ * You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2897
3263
  *
2898
- * @param index The audio track you want to specify. The value range is [0, getAudioTrackCount()].
3264
+ * @param index The audio track you want to specify. The value range is [0, getAudioTrackCount ()].
2899
3265
  *
2900
3266
  * @returns
2901
- * 0: Success. < 0: Failure.
3267
+ * 0: Success.
3268
+ * < 0: Failure.
2902
3269
  */
2903
3270
  abstract selectAudioTrack(index: number): number;
2904
3271
  /**
2905
3272
  * Gets the index of audio tracks of the current music file.
2906
3273
  *
2907
- * You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3274
+ * You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2908
3275
  *
2909
3276
  * @returns
2910
- * The SDK returns the index of the audio tracks if the method call succeeds. < 0: Failure.
3277
+ * The SDK returns the index of the audio tracks if the method call succeeds.
3278
+ * < 0: Failure.
2911
3279
  */
2912
3280
  abstract getAudioTrackCount(): number;
2913
3281
  /**
2914
3282
  * Adjusts the volume during audio mixing.
2915
3283
  *
2916
- * This method adjusts the audio mixing volume on both the local client and remote clients. Call this method after startAudioMixing .
3284
+ * This method adjusts the audio mixing volume on both the local client and remote clients.
3285
+ * Call this method after startAudioMixing.
2917
3286
  *
2918
3287
  * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
2919
3288
  *
2920
3289
  * @returns
2921
- * 0: Success. < 0: Failure.
3290
+ * 0: Success.
3291
+ * < 0: Failure.
2922
3292
  */
2923
3293
  abstract adjustAudioMixingVolume(volume: number): number;
2924
3294
  /**
2925
3295
  * Adjusts the volume of audio mixing for publishing.
2926
3296
  *
2927
- * This method adjusts the volume of audio mixing for publishing (sending to other users). Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3297
+ * This method adjusts the volume of audio mixing for publishing (sending to other users). Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2928
3298
  *
2929
3299
  * @param volume The volume of audio mixing for local playback. The value ranges between 0 and 100 (default). 100 represents the original volume.
2930
3300
  *
2931
3301
  * @returns
2932
- * 0: Success. < 0: Failure.
3302
+ * 0: Success.
3303
+ * < 0: Failure.
2933
3304
  */
2934
3305
  abstract adjustAudioMixingPublishVolume(volume: number): number;
2935
3306
  /**
2936
3307
  * Retrieves the audio mixing volume for publishing.
2937
3308
  *
2938
- * This method helps troubleshoot audio volume‑related issues. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3309
+ * This method helps troubleshoot audio volume‑related issues. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2939
3310
  *
2940
3311
  * @returns
2941
- * ≥ 0: The audio mixing volume, if this method call succeeds. The value range is [0,100]. < 0: Failure.
3312
+ * ≥ 0: The audio mixing volume, if this method call succeeds. The value range is [0,100].
3313
+ * < 0: Failure.
2942
3314
  */
2943
3315
  abstract getAudioMixingPublishVolume(): number;
2944
3316
  /**
2945
3317
  * Adjusts the volume of audio mixing for local playback.
2946
3318
  *
2947
- * Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3319
+ * Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2948
3320
  *
2949
3321
  * @param volume The volume of audio mixing for local playback. The value ranges between 0 and 100 (default). 100 represents the original volume.
2950
3322
  *
2951
3323
  * @returns
2952
- * 0: Success. < 0: Failure.
3324
+ * 0: Success.
3325
+ * < 0: Failure.
2953
3326
  */
2954
3327
  abstract adjustAudioMixingPlayoutVolume(volume: number): number;
2955
3328
  /**
2956
3329
  * Retrieves the audio mixing volume for local playback.
2957
3330
  *
2958
- * This method helps troubleshoot audio volume‑related issues. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3331
+ * This method helps troubleshoot audio volume‑related issues. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2959
3332
  *
2960
3333
  * @returns
2961
- * ≥ 0: The audio mixing volume, if this method call succeeds. The value range is [0,100]. < 0: Failure.
3334
+ * ≥ 0: The audio mixing volume, if this method call succeeds. The value range is [0,100].
3335
+ * < 0: Failure.
2962
3336
  */
2963
3337
  abstract getAudioMixingPlayoutVolume(): number;
2964
3338
  /**
2965
3339
  * Retrieves the duration (ms) of the music file.
2966
3340
  *
2967
- * Retrieves the total duration (ms) of the audio. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3341
+ * Retrieves the total duration (ms) of the audio. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2968
3342
  *
2969
3343
  * @returns
2970
- * ≥ 0: The audio mixing duration, if this method call succeeds. < 0: Failure.
3344
+ * ≥ 0: The audio mixing duration, if this method call succeeds.
3345
+ * < 0: Failure.
2971
3346
  */
2972
3347
  abstract getAudioMixingDuration(): number;
2973
3348
  /**
2974
3349
  * Retrieves the playback position (ms) of the music file.
2975
3350
  *
2976
- * Retrieves the playback position (ms) of the audio. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback. If you need to call getAudioMixingCurrentPosition multiple times, ensure that the time interval between calling this method is more than 500 ms.
3351
+ * Retrieves the playback position (ms) of the audio. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
3352
+ * If you need to call getAudioMixingCurrentPosition multiple times, ensure that the time interval between calling this method is more than 500 ms.
2977
3353
  *
2978
3354
  * @returns
2979
- * ≥ 0: The current playback position (ms) of the audio mixing, if this method call succeeds. 0 represents that the current music file does not start playing. < 0: Failure.
3355
+ * ≥ 0: The current playback position (ms) of the audio mixing, if this method call succeeds. 0 represents that the current music file does not start playing.
3356
+ * < 0: Failure.
2980
3357
  */
2981
3358
  abstract getAudioMixingCurrentPosition(): number;
2982
3359
  /**
2983
3360
  * Sets the audio mixing position.
2984
3361
  *
2985
- * Call this method to set the playback position of the music file to a different starting position (the default plays from the beginning). You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3362
+ * Call this method to set the playback position of the music file to a different starting position (the default plays from the beginning). You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
2986
3363
  *
2987
3364
  * @param pos Integer. The playback position (ms).
2988
3365
  *
2989
3366
  * @returns
2990
- * 0: Success. < 0: Failure.
3367
+ * 0: Success.
3368
+ * < 0: Failure.
2991
3369
  */
2992
3370
  abstract setAudioMixingPosition(pos: number): number;
2993
3371
  /**
2994
3372
  * Sets the channel mode of the current audio file.
2995
3373
  *
2996
- * In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode. Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback. This method only applies to stereo audio files.
3374
+ * In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.
3375
+ * Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
3376
+ * This method only applies to stereo audio files.
2997
3377
  *
2998
3378
  * @param mode The channel mode. See AudioMixingDualMonoMode.
2999
3379
  *
3000
3380
  * @returns
3001
- * 0: Success. < 0: Failure.
3381
+ * 0: Success.
3382
+ * < 0: Failure.
3002
3383
  */
3003
3384
  abstract setAudioMixingDualMonoMode(mode: AudioMixingDualMonoMode): number;
3004
3385
  /**
3005
3386
  * Sets the pitch of the local music file.
3006
3387
  *
3007
- * When a local music file is mixed with a local human voice, call this method to set the pitch of the local music file only. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged ( AudioMixingStatePlaying ) callback.
3388
+ * When a local music file is mixed with a local human voice, call this method to set the pitch of the local music file only. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
3008
3389
  *
3009
3390
  * @param pitch Sets the pitch of the local music file by the chromatic scale. The default value is 0, which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value between consecutive values is a chromatic value. The greater the absolute value of this parameter, the higher or lower the pitch of the local music file.
3010
3391
  *
3011
3392
  * @returns
3012
- * 0: Success. < 0: Failure.
3393
+ * 0: Success.
3394
+ * < 0: Failure.
3013
3395
  */
3014
3396
  abstract setAudioMixingPitch(pitch: number): number;
3015
3397
  /**
3016
3398
  * Retrieves the volume of the audio effects.
3017
3399
  *
3018
- * The volume is an integer ranging from 0 to 100. The default value is 100, which means the original volume. Call this method after playEffect .
3400
+ * The volume is an integer ranging from 0 to 100. The default value is 100, which means the original volume. Call this method after playEffect.
3019
3401
  *
3020
3402
  * @returns
3021
- * Volume of the audio effects, if this method call succeeds. < 0: Failure.
3403
+ * Volume of the audio effects, if this method call succeeds.
3404
+ * < 0: Failure.
3022
3405
  */
3023
3406
  abstract getEffectsVolume(): number;
3024
3407
  /**
3025
3408
  * Sets the volume of the audio effects.
3026
3409
  *
3027
- * Call this method after playEffect .
3410
+ * Call this method after playEffect.
3028
3411
  *
3029
3412
  * @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume.
3030
3413
  *
3031
3414
  * @returns
3032
- * 0: Success. < 0: Failure.
3415
+ * 0: Success.
3416
+ * < 0: Failure.
3033
3417
  */
3034
3418
  abstract setEffectsVolume(volume: number): number;
3035
3419
  /**
3036
3420
  * Preloads a specified audio effect file into the memory.
3037
3421
  *
3038
- * To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel . This method does not support online audio effect files. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support .
3422
+ * To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel.
3423
+ * This method does not support online audio effect files.
3424
+ * For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
3039
3425
  *
3040
3426
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3041
- * @param filePath File path:Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3427
+ * @param filePath File path:
3428
+ * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example : C:\music\audio.mp4.
3429
+ * macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3042
3430
  * @param startPos The playback position (ms) of the audio effect file.
3043
3431
  *
3044
3432
  * @returns
3045
- * 0: Success. < 0: Failure.
3433
+ * 0: Success.
3434
+ * < 0: Failure.
3046
3435
  */
3047
3436
  abstract preloadEffect(soundId: number, filePath: string, startPos?: number): number;
3048
3437
  /**
3049
3438
  * Plays the specified local or online audio effect file.
3050
3439
  *
3051
- * If you use this method to play an online audio effect file, Agora recommends that you cache the online audio effect file to your local device, call preloadEffect to preload the cached audio effect file into memory, and then call this method to play the audio effect. Otherwise, you might encounter playback failures or no sound during playback due to loading timeouts or failures. To play multiple audio effect files at the same time, call this method multiple times with different soundId and filePath . To achieve the optimal user experience, Agora recommends that do not playing more than three audio files at the same time. After the playback of an audio effect file completes, the SDK triggers the onAudioEffectFinished callback.
3440
+ * If you use this method to play an online audio effect file, Agora recommends that you cache the online audio effect file to your local device, call preloadEffect to preload the cached audio effect file into memory, and then call this method to play the audio effect. Otherwise, you might encounter playback failures or no sound during playback due to loading timeouts or failures. To play multiple audio effect files at the same time, call this method multiple times with different soundId and filePath. To achieve the optimal user experience, Agora recommends that do not playing more than three audio files at the same time. After the playback of an audio effect file completes, the SDK triggers the onAudioEffectFinished callback.
3052
3441
  *
3053
- * @param soundId The audio effect ID. The ID of each audio effect file is unique.If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of soundId in preloadEffect.
3054
- * @param filePath The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example, C:\music\audio.mp4. Supported audio formats include MP3, AAC, M4A, MP4, WAV, and 3GP. See supported audio formats.If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of filePath in preloadEffect.
3055
- * @param loopCount The number of times the audio effect loops.≥ 0: The number of playback times. For example, 1 means looping one time, which means playing the audio effect two times in total.-1: Play the audio file in an infinite loop.
3442
+ * @param soundId The audio effect ID. The ID of each audio effect file is unique. If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of soundId in preloadEffect.
3443
+ * @param filePath The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example, C:\music\audio.mp4. Supported audio formats include MP3, AAC, M4A, MP4, WAV, and 3GP. See supported audio formats. If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of filePath in preloadEffect.
3444
+ * @param loopCount The number of times the audio effect loops.
3445
+ * ≥ 0: The number of playback times. For example, 1 means looping one time, which means playing the audio effect two times in total.
3446
+ * -1: Play the audio file in an infinite loop.
3056
3447
  * @param pitch The pitch of the audio effect. The value range is 0.5 to 2.0. The default value is 1.0, which means the original pitch. The lower the value, the lower the pitch.
3057
- * @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:-1.0: The audio effect is heard on the left of the user.0.0: The audio effect is heard in front of the user.1.0: The audio effect is heard on the right of the user.
3448
+ * @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:
3449
+ * -1.0: The audio effect is heard on the left of the user.
3450
+ * 0.0: The audio effect is heard in front of the user.
3451
+ * 1.0: The audio effect is heard on the right of the user.
3058
3452
  * @param gain The volume of the audio effect. The value range is 0.0 to 100.0. The default value is 100.0, which means the original volume. The smaller the value, the lower the volume.
3059
- * @param publish Whether to publish the audio effect to the remote users:true: Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect.false: Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3453
+ * @param publish Whether to publish the audio effect to the remote users: true : Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect. false : Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3060
3454
  * @param startPos The playback position (ms) of the audio effect file.
3061
3455
  *
3062
3456
  * @returns
3063
- * 0: Success. < 0: Failure.
3457
+ * 0: Success.
3458
+ * < 0: Failure.
3064
3459
  */
3065
3460
  abstract playEffect(soundId: number, filePath: string, loopCount: number, pitch: number, pan: number, gain: number, publish?: boolean, startPos?: number): number;
3066
3461
  /**
@@ -3068,14 +3463,21 @@ export declare abstract class IRtcEngine {
3068
3463
  *
3069
3464
  * After calling preloadEffect multiple times to preload multiple audio effects into the memory, you can call this method to play all the specified audio effects for all users in the channel.
3070
3465
  *
3071
- * @param loopCount The number of times the audio effect loops:-1: Play the audio effect files in an indefinite loop until you call stopEffect or stopAllEffects.0: Play the audio effect once.1: Play the audio effect twice.
3466
+ * @param loopCount The number of times the audio effect loops:
3467
+ * -1: Play the audio effect files in an indefinite loop until you call stopEffect or stopAllEffects.
3468
+ * 0: Play the audio effect once.
3469
+ * 1: Play the audio effect twice.
3072
3470
  * @param pitch The pitch of the audio effect. The value ranges between 0.5 and 2.0. The default value is 1.0 (original pitch). The lower the value, the lower the pitch.
3073
- * @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:-1.0: The audio effect shows on the left.0: The audio effect shows ahead.1.0: The audio effect shows on the right.
3471
+ * @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:
3472
+ * -1.0: The audio effect shows on the left.
3473
+ * 0: The audio effect shows ahead.
3474
+ * 1.0: The audio effect shows on the right.
3074
3475
  * @param gain The volume of the audio effect. The value range is [0, 100]. The default value is 100 (original volume). The smaller the value, the lower the volume.
3075
- * @param publish Whether to publish the audio effect to the remote users:true: Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect.false: (Default) Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3476
+ * @param publish Whether to publish the audio effect to the remote users: true : Publish the audio effect to the remote users. Both the local user and remote users can hear the audio effect. false : (Default) Do not publish the audio effect to the remote users. Only the local user can hear the audio effect.
3076
3477
  *
3077
3478
  * @returns
3078
- * 0: Success. < 0: Failure.
3479
+ * 0: Success.
3480
+ * < 0: Failure.
3079
3481
  */
3080
3482
  abstract playAllEffects(loopCount: number, pitch: number, pan: number, gain: number, publish?: boolean): number;
3081
3483
  /**
@@ -3084,7 +3486,8 @@ export declare abstract class IRtcEngine {
3084
3486
  * @param soundId The ID of the audio effect file.
3085
3487
  *
3086
3488
  * @returns
3087
- * ≥ 0: Returns the volume of the specified audio effect, if the method call is successful. The value ranges between 0 and 100. 100 represents the original volume. < 0: Failure.
3489
+ * ≥ 0: Returns the volume of the specified audio effect, if the method call is successful. The value ranges between 0 and 100. 100 represents the original volume.
3490
+ * < 0: Failure.
3088
3491
  */
3089
3492
  abstract getVolumeOfEffect(soundId: number): number;
3090
3493
  /**
@@ -3094,7 +3497,8 @@ export declare abstract class IRtcEngine {
3094
3497
  * @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume.
3095
3498
  *
3096
3499
  * @returns
3097
- * 0: Success. < 0: Failure.
3500
+ * 0: Success.
3501
+ * < 0: Failure.
3098
3502
  */
3099
3503
  abstract setVolumeOfEffect(soundId: number, volume: number): number;
3100
3504
  /**
@@ -3103,14 +3507,16 @@ export declare abstract class IRtcEngine {
3103
3507
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3104
3508
  *
3105
3509
  * @returns
3106
- * 0: Success. < 0: Failure.
3510
+ * 0: Success.
3511
+ * < 0: Failure.
3107
3512
  */
3108
3513
  abstract pauseEffect(soundId: number): number;
3109
3514
  /**
3110
3515
  * Pauses all audio effects.
3111
3516
  *
3112
3517
  * @returns
3113
- * 0: Success. < 0: Failure.
3518
+ * 0: Success.
3519
+ * < 0: Failure.
3114
3520
  */
3115
3521
  abstract pauseAllEffects(): number;
3116
3522
  /**
@@ -3119,14 +3525,16 @@ export declare abstract class IRtcEngine {
3119
3525
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3120
3526
  *
3121
3527
  * @returns
3122
- * 0: Success. < 0: Failure.
3528
+ * 0: Success.
3529
+ * < 0: Failure.
3123
3530
  */
3124
3531
  abstract resumeEffect(soundId: number): number;
3125
3532
  /**
3126
3533
  * Resumes playing all audio effect files.
3127
3534
  *
3128
3535
  * @returns
3129
- * 0: Success. < 0: Failure.
3536
+ * 0: Success.
3537
+ * < 0: Failure.
3130
3538
  */
3131
3539
  abstract resumeAllEffects(): number;
3132
3540
  /**
@@ -3135,14 +3543,16 @@ export declare abstract class IRtcEngine {
3135
3543
  * @param soundId The ID of the audio effect. Each audio effect has a unique ID.
3136
3544
  *
3137
3545
  * @returns
3138
- * 0: Success. < 0: Failure.
3546
+ * 0: Success.
3547
+ * < 0: Failure.
3139
3548
  */
3140
3549
  abstract stopEffect(soundId: number): number;
3141
3550
  /**
3142
3551
  * Stops playing all audio effects.
3143
3552
  *
3144
3553
  * @returns
3145
- * 0: Success. < 0: Failure.
3554
+ * 0: Success.
3555
+ * < 0: Failure.
3146
3556
  */
3147
3557
  abstract stopAllEffects(): number;
3148
3558
  /**
@@ -3151,14 +3561,16 @@ export declare abstract class IRtcEngine {
3151
3561
  * @param soundId The ID of the audio effect. Each audio effect has a unique ID.
3152
3562
  *
3153
3563
  * @returns
3154
- * 0: Success. < 0: Failure.
3564
+ * 0: Success.
3565
+ * < 0: Failure.
3155
3566
  */
3156
3567
  abstract unloadEffect(soundId: number): number;
3157
3568
  /**
3158
3569
  * Releases a specified preloaded audio effect from the memory.
3159
3570
  *
3160
3571
  * @returns
3161
- * 0: Success. < 0: Failure.
3572
+ * 0: Success.
3573
+ * < 0: Failure.
3162
3574
  */
3163
3575
  abstract unloadAllEffects(): number;
3164
3576
  /**
@@ -3167,23 +3579,25 @@ export declare abstract class IRtcEngine {
3167
3579
  * Call this method after joining a channel.
3168
3580
  *
3169
3581
  * @param filePath File path:
3170
- * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.
3582
+ * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example : C:\music\audio.mp4.
3171
3583
  * macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3172
3584
  *
3173
3585
  * @returns
3174
- * The total duration (ms) of the specified audio effect file, if the method call succeeds. < 0: Failure.
3586
+ * The total duration (ms) of the specified audio effect file, if the method call succeeds.
3587
+ * < 0: Failure.
3175
3588
  */
3176
3589
  abstract getEffectDuration(filePath: string): number;
3177
3590
  /**
3178
3591
  * Sets the playback position of an audio effect file.
3179
3592
  *
3180
- * After a successful setting, the local audio effect file starts playing at the specified position. Call this method after playEffect .
3593
+ * After a successful setting, the local audio effect file starts playing at the specified position. Call this method after playEffect.
3181
3594
  *
3182
3595
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3183
3596
  * @param pos The playback position (ms) of the audio effect file.
3184
3597
  *
3185
3598
  * @returns
3186
- * 0: Success. < 0: Failure.
3599
+ * 0: Success.
3600
+ * < 0: Failure.
3187
3601
  */
3188
3602
  abstract setEffectPosition(soundId: number, pos: number): number;
3189
3603
  /**
@@ -3194,112 +3608,159 @@ export declare abstract class IRtcEngine {
3194
3608
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
3195
3609
  *
3196
3610
  * @returns
3197
- * The playback position (ms) of the specified audio effect file, if the method call succeeds. < 0: Failure.
3611
+ * The playback position (ms) of the specified audio effect file, if the method call succeeds.
3612
+ * < 0: Failure.
3198
3613
  */
3199
3614
  abstract getEffectCurrentPosition(soundId: number): number;
3200
3615
  /**
3201
3616
  * Enables or disables stereo panning for remote users.
3202
3617
  *
3203
- * Ensure that you call this method before joining a channel to enable stereo panning for remote users so that the local user can track the position of a remote user by calling setRemoteVoicePosition .
3618
+ * Ensure that you call this method before joining a channel to enable stereo panning for remote users so that the local user can track the position of a remote user by calling setRemoteVoicePosition.
3204
3619
  *
3205
- * @param enabled Whether to enable stereo panning for remote users:true: Enable stereo panning.false: Disable stereo panning.
3620
+ * @param enabled Whether to enable stereo panning for remote users: true : Enable stereo panning. false : Disable stereo panning.
3206
3621
  *
3207
3622
  * @returns
3208
- * 0: Success. < 0: Failure.
3623
+ * 0: Success.
3624
+ * < 0: Failure.
3209
3625
  */
3210
3626
  abstract enableSoundPositionIndication(enabled: boolean): number;
3211
3627
  /**
3212
3628
  * Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
3213
3629
  *
3214
- * This method sets the 2D position and volume of a remote user, so that the local user can easily hear and identify the remote user's position. When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games. For this method to work, enable stereo panning for remote users by calling the enableSoundPositionIndication method before joining a channel. For the best voice positioning, Agora recommends using a wired headset. Call this method after joining a channel.
3630
+ * This method sets the 2D position and volume of a remote user, so that the local user can easily hear and identify the remote user's position. When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games.
3631
+ * For this method to work, enable stereo panning for remote users by calling the enableSoundPositionIndication method before joining a channel.
3632
+ * For the best voice positioning, Agora recommends using a wired headset.
3633
+ * Call this method after joining a channel.
3215
3634
  *
3216
3635
  * @param uid The user ID of the remote user.
3217
- * @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:0.0: (Default) The remote voice comes from the front.-1.0: The remote voice comes from the left.1.0: The remote voice comes from the right.
3636
+ * @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:
3637
+ * 0.0: (Default) The remote voice comes from the front.
3638
+ * -1.0: The remote voice comes from the left.
3639
+ * 1.0: The remote voice comes from the right.
3218
3640
  * @param gain The volume of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original volume of the remote user). The smaller the value, the lower the volume.
3219
3641
  *
3220
3642
  * @returns
3221
- * 0: Success. < 0: Failure.
3643
+ * 0: Success.
3644
+ * < 0: Failure.
3222
3645
  */
3223
3646
  abstract setRemoteVoicePosition(uid: number, pan: number, gain: number): number;
3224
3647
  /**
3225
3648
  * Enables or disables the spatial audio effect.
3226
3649
  *
3227
- * After enabling the spatial audio effect, you can call setRemoteUserSpatialAudioParams to set the spatial audio effect parameters of the remote user. You can call this method either before or after joining a channel. This method relies on the spatial audio dynamic library libagora_spatial_audio_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
3650
+ * After enabling the spatial audio effect, you can call setRemoteUserSpatialAudioParams to set the spatial audio effect parameters of the remote user.
3651
+ * You can call this method either before or after joining a channel.
3652
+ * This method relies on the spatial audio dynamic library libagora_spatial_audio_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3228
3653
  *
3229
- * @param enabled Whether to enable the spatial audio effect:true: Enable the spatial audio effect.false: Disable the spatial audio effect.
3654
+ * @param enabled Whether to enable the spatial audio effect: true : Enable the spatial audio effect. false : Disable the spatial audio effect.
3230
3655
  *
3231
3656
  * @returns
3232
- * 0: Success. < 0: Failure.
3657
+ * 0: Success.
3658
+ * < 0: Failure.
3233
3659
  */
3234
3660
  abstract enableSpatialAudio(enabled: boolean): number;
3235
3661
  /**
3236
3662
  * Sets the spatial audio effect parameters of the remote user.
3237
3663
  *
3238
- * Call this method after enableSpatialAudio . After successfully setting the spatial audio effect parameters of the remote user, the local user can hear the remote user with a sense of space.
3239
- *
3240
- * @param uid The user ID.
3664
+ * Call this method after enableSpatialAudio. After successfully setting the spatial audio effect parameters of the remote user, the local user can hear the remote user with a sense of space.
3241
3665
  *
3242
3666
  * @returns
3243
- * 0: Success. < 0: Failure.
3667
+ * 0: Success.
3668
+ * < 0: Failure.
3244
3669
  */
3245
3670
  abstract setRemoteUserSpatialAudioParams(uid: number, params: SpatialAudioParams): number;
3246
3671
  /**
3247
3672
  * Sets a preset voice beautifier effect.
3248
3673
  *
3249
- * Call this method to set a preset voice beautifier effect for the local user who sends an audio stream. After setting a voice beautifier effect, all users in the channel can hear the effect. You can set different voice beautifier effects for different scenarios. For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming (3) and profile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) before calling this method. You can call this method either before or after joining a channel. Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6) , or the method does not take effect. This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music. After calling setVoiceBeautifierPreset , Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierPreset will be overwritten: setAudioEffectPreset setAudioEffectParameters setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
3674
+ * Call this method to set a preset voice beautifier effect for the local user who sends an audio stream. After setting a voice beautifier effect, all users in the channel can hear the effect. You can set different voice beautifier effects for different scenarios. For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming (3) and profile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) before calling this method.
3675
+ * You can call this method either before or after joining a channel.
3676
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3677
+ * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3678
+ * After calling setVoiceBeautifierPreset, Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierPreset will be overwritten: setAudioEffectPreset setAudioEffectParameters setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
3679
+ * This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3250
3680
  *
3251
3681
  * @param preset The preset voice beautifier effect options: VoiceBeautifierPreset.
3252
3682
  *
3253
3683
  * @returns
3254
- * 0: Success. < 0: Failure.
3684
+ * 0: Success.
3685
+ * < 0: Failure.
3255
3686
  */
3256
3687
  abstract setVoiceBeautifierPreset(preset: VoiceBeautifierPreset): number;
3257
3688
  /**
3258
3689
  * Sets an SDK preset audio effect.
3259
3690
  *
3260
- * Call this method to set an SDK preset audio effect for the local user who sends an audio stream. This audio effect does not change the gender characteristics of the original voice. After setting an audio effect, all users in the channel can hear the effect. To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming (3) before calling this method. You can call this method either before or after joining a channel. Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect. This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music. If you call setAudioEffectPreset and set enumerators except for RoomAcoustics3dVoice or PitchCorrection , do not call setAudioEffectParameters ; otherwise, setAudioEffectPreset is overridden. After calling setAudioEffectPreset , Agora does not recommend you to call the following methods, otherwise the effect set by setAudioEffectPreset will be overwritten: setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
3691
+ * Call this method to set an SDK preset audio effect for the local user who sends an audio stream. This audio effect does not change the gender characteristics of the original voice. After setting an audio effect, all users in the channel can hear the effect. To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming (3) before calling this method.
3692
+ * You can call this method either before or after joining a channel.
3693
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect.
3694
+ * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3695
+ * If you call setAudioEffectPreset and set enumerators except for RoomAcoustics3dVoice or PitchCorrection, do not call setAudioEffectParameters; otherwise, setAudioEffectPreset is overridden.
3696
+ * After calling setAudioEffectPreset, Agora does not recommend you to call the following methods, otherwise the effect set by setAudioEffectPreset will be overwritten: setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
3697
+ * This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3261
3698
  *
3262
3699
  * @param preset The options for SDK preset audio effects. See AudioEffectPreset.
3263
3700
  *
3264
3701
  * @returns
3265
- * 0: Success. < 0: Failure.
3702
+ * 0: Success.
3703
+ * < 0: Failure.
3266
3704
  */
3267
3705
  abstract setAudioEffectPreset(preset: AudioEffectPreset): number;
3268
3706
  /**
3269
3707
  * Sets a preset voice beautifier effect.
3270
3708
  *
3271
- * Call this method to set a preset voice beautifier effect for the local user who sends an audio stream. After setting an audio effect, all users in the channel can hear the effect. You can set different voice beautifier effects for different scenarios. To achieve better audio effect quality, Agora recommends that you call setAudioProfile and set the profile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) and scenario to AudioScenarioGameStreaming (3) before calling this method. You can call this method either before or after joining a channel. Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6) , or the method does not take effect. This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music. After calling setVoiceConversionPreset , Agora does not recommend you to call the following methods, otherwise the effect set by setVoiceConversionPreset will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setVoiceBeautifierParameters setLocalVoicePitch setLocalVoiceFormant setLocalVoiceEqualization setLocalVoiceReverb This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
3709
+ * Call this method to set a preset voice beautifier effect for the local user who sends an audio stream. After setting an audio effect, all users in the channel can hear the effect. You can set different voice beautifier effects for different scenarios. To achieve better audio effect quality, Agora recommends that you call setAudioProfile and set the profile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) and scenario to AudioScenarioGameStreaming (3) before calling this method.
3710
+ * You can call this method either before or after joining a channel.
3711
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3712
+ * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3713
+ * After calling setVoiceConversionPreset, Agora does not recommend you to call the following methods, otherwise the effect set by setVoiceConversionPreset will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setVoiceBeautifierParameters setLocalVoicePitch setLocalVoiceFormant setLocalVoiceEqualization setLocalVoiceReverb
3714
+ * This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3272
3715
  *
3273
3716
  * @param preset The options for the preset voice beautifier effects: VoiceConversionPreset.
3274
3717
  *
3275
3718
  * @returns
3276
- * 0: Success. < 0: Failure.
3719
+ * 0: Success.
3720
+ * < 0: Failure.
3277
3721
  */
3278
3722
  abstract setVoiceConversionPreset(preset: VoiceConversionPreset): number;
3279
3723
  /**
3280
3724
  * Sets parameters for SDK preset audio effects.
3281
3725
  *
3282
- * Call this method to set the following parameters for the local user who sends an audio stream: 3D voice effect: Sets the cycle period of the 3D voice effect. Pitch correction effect: Sets the basic mode and tonic pitch of the pitch correction effect. Different songs have different modes and tonic pitches. Agora recommends bounding this method with interface elements to enable users to adjust the pitch correction interactively. After setting the audio parameters, all users in the channel can hear the effect. You can call this method either before or after joining a channel. To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming (3) before calling this method. Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect. This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music. After calling setAudioEffectParameters , Agora does not recommend you to call the following methods, otherwise the effect set by setAudioEffectParameters will be overwritten: setAudioEffectPreset setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
3726
+ * Call this method to set the following parameters for the local user who sends an audio stream:
3727
+ * 3D voice effect: Sets the cycle period of the 3D voice effect.
3728
+ * Pitch correction effect: Sets the basic mode and tonic pitch of the pitch correction effect. Different songs have different modes and tonic pitches. Agora recommends bounding this method with interface elements to enable users to adjust the pitch correction interactively. After setting the audio parameters, all users in the channel can hear the effect.
3729
+ * You can call this method either before or after joining a channel.
3730
+ * To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming (3) before calling this method.
3731
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect.
3732
+ * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3733
+ * After calling setAudioEffectParameters, Agora does not recommend you to call the following methods, otherwise the effect set by setAudioEffectParameters will be overwritten: setAudioEffectPreset setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
3283
3734
  *
3284
- * @param preset The options for SDK preset audio effects:RoomAcoustics3dVoice, 3D voice effect:Call setAudioProfile and set the profile parameter in to AudioProfileMusicStandardStereo(3) or AudioProfileMusicHighQualityStereo(5) before setting this enumerator; otherwise, the enumerator setting does not take effect.If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect.PitchCorrection, Pitch correction effect: To achieve better audio effect quality, Agora recommends setting the profile parameter in setAudioProfile to AudioProfileMusicHighQuality(4) or AudioProfileMusicHighQualityStereo(5) before setting this enumerator.
3285
- * @param param1 If you set preset to RoomAcoustics3dVoice, param1 sets the cycle period of the 3D voice effect. The value range is [1,60] and the unit is seconds. The default value is 10, indicating that the voice moves around you every 10 seconds.If you set preset to PitchCorrection, param1 indicates the basic mode of the pitch correction effect:1: (Default) Natural major scale.2: Natural minor scale.3: Japanese pentatonic scale.
3286
- * @param param2 If you set preset to RoomAcoustics3dVoice , you need to set param2 to 0.If you set preset to PitchCorrection, param2 indicates the tonic pitch of the pitch correction effect:1: A2: A#3: B4: (Default) C5: C#6: D7: D#8: E9: F10: F#11: G12: G#
3735
+ * @param preset The options for SDK preset audio effects: RoomAcoustics3dVoice, 3D voice effect:
3736
+ * Call setAudioProfile and set the profile parameter in to AudioProfileMusicStandardStereo (3) or AudioProfileMusicHighQualityStereo (5) before setting this enumerator; otherwise, the enumerator setting does not take effect.
3737
+ * If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect. PitchCorrection, Pitch correction effect: To achieve better audio effect quality, Agora recommends setting the profile parameter in setAudioProfile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) before setting this enumerator.
3738
+ * @param param1 If you set preset to RoomAcoustics3dVoice, param1 sets the cycle period of the 3D voice effect. The value range is [1,60] and the unit is seconds. The default value is 10, indicating that the voice moves around you every 10 seconds.
3739
+ * If you set preset to PitchCorrection, param1 indicates the basic mode of the pitch correction effect: 1 : (Default) Natural major scale. 2 : Natural minor scale. 3 : Japanese pentatonic scale.
3740
+ * @param param2 If you set preset to RoomAcoustics3dVoice , you need to set param2 to 0.
3741
+ * If you set preset to PitchCorrection, param2 indicates the tonic pitch of the pitch correction effect: 1 : A 2 : A# 3 : B 4 : (Default) C 5 : C# 6 : D 7 : D# 8 : E 9 : F 10 : F# 11 : G 12 : G#
3287
3742
  *
3288
3743
  * @returns
3289
- * 0: Success. < 0: Failure.
3744
+ * 0: Success.
3745
+ * < 0: Failure.
3290
3746
  */
3291
3747
  abstract setAudioEffectParameters(preset: AudioEffectPreset, param1: number, param2: number): number;
3292
3748
  /**
3293
3749
  * Sets parameters for the preset voice beautifier effects.
3294
3750
  *
3295
- * Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream. After setting the audio parameters, all users in the channel can hear the effect. For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming (3) and profile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) before calling this method. You can call this method either before or after joining a channel. Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6) , or the method does not take effect. This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music. After calling setVoiceBeautifierParameters , Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierParameters will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceConversionPreset
3751
+ * Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream. After setting the audio parameters, all users in the channel can hear the effect. For better voice effects, Agora recommends that you call setAudioProfile and set scenario to AudioScenarioGameStreaming (3) and profile to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5) before calling this method.
3752
+ * You can call this method either before or after joining a channel.
3753
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3754
+ * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3755
+ * After calling setVoiceBeautifierParameters, Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierParameters will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceConversionPreset
3296
3756
  *
3297
- * @param preset The option for the preset audio effect:SINGING_BEAUTIFIER: The singing beautifier effect.
3298
- * @param param1 The gender characteristics options for the singing voice:1: A male-sounding voice.2: A female-sounding voice.
3299
- * @param param2 The reverberation effect options for the singing voice:1: The reverberation effect sounds like singing in a small room.2: The reverberation effect sounds like singing in a large room.3: The reverberation effect sounds like singing in a hall.
3757
+ * @param preset The option for the preset audio effect: SINGING_BEAUTIFIER : The singing beautifier effect.
3758
+ * @param param1 The gender characteristics options for the singing voice: 1 : A male-sounding voice. 2 : A female-sounding voice.
3759
+ * @param param2 The reverberation effect options for the singing voice: 1 : The reverberation effect sounds like singing in a small room. 2 : The reverberation effect sounds like singing in a large room. 3 : The reverberation effect sounds like singing in a hall.
3300
3760
  *
3301
3761
  * @returns
3302
- * 0: Success. < 0: Failure.
3762
+ * 0: Success.
3763
+ * < 0: Failure.
3303
3764
  */
3304
3765
  abstract setVoiceBeautifierParameters(preset: VoiceBeautifierPreset, param1: number, param2: number): number;
3305
3766
  /**
@@ -3314,18 +3775,20 @@ export declare abstract class IRtcEngine {
3314
3775
  * @param pitch The local voice pitch. The value range is [0.5,2.0]. The lower the value, the lower the pitch. The default value is 1.0 (no change to the pitch).
3315
3776
  *
3316
3777
  * @returns
3317
- * 0: Success. < 0: Failure.
3778
+ * 0: Success.
3779
+ * < 0: Failure.
3318
3780
  */
3319
3781
  abstract setLocalVoicePitch(pitch: number): number;
3320
3782
  /**
3321
3783
  * Set the formant ratio to change the timbre of human voice.
3322
3784
  *
3323
- * Formant ratio affects the timbre of voice. The smaller the value, the deeper the sound will be, and the larger, the sharper. You can call this method to set the formant ratio of local audio to change the timbre of human voice. After you set the formant ratio, all users in the channel can hear the changed voice. If you want to change the timbre and pitch of voice at the same time, Agora recommends using this method together with setLocalVoicePitch . You can call this method either before or after joining a channel.
3785
+ * Formant ratio affects the timbre of voice. The smaller the value, the deeper the sound will be, and the larger, the sharper. You can call this method to set the formant ratio of local audio to change the timbre of human voice. After you set the formant ratio, all users in the channel can hear the changed voice. If you want to change the timbre and pitch of voice at the same time, Agora recommends using this method together with setLocalVoicePitch. You can call this method either before or after joining a channel.
3324
3786
  *
3325
- * @param formantRatio The formant ratio. The value range is [-1.0, 1.0]. The default value is 0.0, which means do not change the timbre of the voice.Agora recommends setting this value within the range of [-0.4, 0.6]. Otherwise, the voice may be seriously distorted.
3787
+ * @param formantRatio The formant ratio. The value range is [-1.0, 1.0]. The default value is 0.0, which means do not change the timbre of the voice. Agora recommends setting this value within the range of [-0.4, 0.6]. Otherwise, the voice may be seriously distorted.
3326
3788
  *
3327
3789
  * @returns
3328
- * 0: Success. < 0: Failure.
3790
+ * 0: Success.
3791
+ * < 0: Failure.
3329
3792
  */
3330
3793
  abstract setLocalVoiceFormant(formantRatio: number): number;
3331
3794
  /**
@@ -3337,19 +3800,21 @@ export declare abstract class IRtcEngine {
3337
3800
  * @param bandGain The gain of each band in dB. The value ranges between -15 and 15. The default value is 0.
3338
3801
  *
3339
3802
  * @returns
3340
- * 0: Success. < 0: Failure.
3803
+ * 0: Success.
3804
+ * < 0: Failure.
3341
3805
  */
3342
3806
  abstract setLocalVoiceEqualization(bandFrequency: AudioEqualizationBandFrequency, bandGain: number): number;
3343
3807
  /**
3344
3808
  * Sets the local voice reverberation.
3345
3809
  *
3346
- * The SDK provides an easier-to-use method, setAudioEffectPreset , to directly implement preset reverb effects for such as pop, R&B, and KTV. You can call this method either before or after joining a channel.
3810
+ * The SDK provides an easier-to-use method, setAudioEffectPreset, to directly implement preset reverb effects for such as pop, R&B, and KTV. You can call this method either before or after joining a channel.
3347
3811
  *
3348
3812
  * @param reverbKey The reverberation key. Agora provides five reverberation keys, see AudioReverbType.
3349
3813
  * @param value The value of the reverberation key.
3350
3814
  *
3351
3815
  * @returns
3352
- * 0: Success. < 0: Failure.
3816
+ * 0: Success.
3817
+ * < 0: Failure.
3353
3818
  */
3354
3819
  abstract setLocalVoiceReverb(reverbKey: AudioReverbType, value: number): number;
3355
3820
  /**
@@ -3360,7 +3825,9 @@ export declare abstract class IRtcEngine {
3360
3825
  * @param preset The preset headphone equalization effect. See HeadphoneEqualizerPreset.
3361
3826
  *
3362
3827
  * @returns
3363
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason).
3828
+ * 0: Success.
3829
+ * < 0: Failure.
3830
+ * -1: A general error occurs (no specified reason).
3364
3831
  */
3365
3832
  abstract setHeadphoneEQPreset(preset: HeadphoneEqualizerPreset): number;
3366
3833
  /**
@@ -3372,7 +3839,9 @@ export declare abstract class IRtcEngine {
3372
3839
  * @param highGain The high-frequency parameters of the headphone equalizer. The value range is [-10,10]. The larger the value, the sharper the sound.
3373
3840
  *
3374
3841
  * @returns
3375
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason).
3842
+ * 0: Success.
3843
+ * < 0: Failure.
3844
+ * -1: A general error occurs (no specified reason).
3376
3845
  */
3377
3846
  abstract setHeadphoneEQParameters(lowGain: number, highGain: number): number;
3378
3847
  /**
@@ -3383,18 +3852,20 @@ export declare abstract class IRtcEngine {
3383
3852
  * @param filePath The complete path of the log files. These log files are encoded in UTF-8.
3384
3853
  *
3385
3854
  * @returns
3386
- * 0: Success. < 0: Failure.
3855
+ * 0: Success.
3856
+ * < 0: Failure.
3387
3857
  */
3388
3858
  abstract setLogFile(filePath: string): number;
3389
3859
  /**
3390
3860
  * Sets the log output level of the SDK.
3391
3861
  *
3392
- * Deprecated: Use logConfig in initialize instead. This method sets the output log level of the SDK. You can use one or a combination of the log filter levels. The log level follows the sequence of LogFilterOff , LogFilterCritical , LogFilterError , LogFilterWarn , LogFilterInfo , and LogFilterDebug . Choose a level to see the logs preceding that level. If, for example, you set the log level to LogFilterWarn , you see the logs within levels LogFilterCritical , LogFilterError and LogFilterWarn .
3862
+ * Deprecated: Use logConfig in initialize instead. This method sets the output log level of the SDK. You can use one or a combination of the log filter levels. The log level follows the sequence of LogFilterOff, LogFilterCritical, LogFilterError, LogFilterWarn, LogFilterInfo, and LogFilterDebug. Choose a level to see the logs preceding that level. If, for example, you set the log level to LogFilterWarn, you see the logs within levels LogFilterCritical, LogFilterError and LogFilterWarn.
3393
3863
  *
3394
3864
  * @param filter The output log level of the SDK. See LogFilterType.
3395
3865
  *
3396
3866
  * @returns
3397
- * 0: Success. < 0: Failure.
3867
+ * 0: Success.
3868
+ * < 0: Failure.
3398
3869
  */
3399
3870
  abstract setLogFilter(filter: LogFilterType): number;
3400
3871
  /**
@@ -3405,18 +3876,31 @@ export declare abstract class IRtcEngine {
3405
3876
  * @param level The log level: LogLevel.
3406
3877
  *
3407
3878
  * @returns
3408
- * 0: Success. < 0: Failure.
3879
+ * 0: Success.
3880
+ * < 0: Failure.
3409
3881
  */
3410
3882
  abstract setLogLevel(level: LogLevel): number;
3411
3883
  /**
3412
3884
  * Sets the log file size.
3413
3885
  *
3414
- * Deprecated: Use the logConfig parameter in initialize instead. By default, the SDK generates five SDK log files and five API call log files with the following rules: The SDK log files are: agorasdk.log , agorasdk.1.log , agorasdk.2.log , agorasdk.3.log , and agorasdk.4.log . The API call log files are: agoraapi.log , agoraapi.1.log , agoraapi.2.log , agoraapi.3.log , and agoraapi.4.log . The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8. The SDK writes the latest logs in agorasdk.log or agoraapi.log . When agorasdk.log is full, the SDK processes the log files in the following order: Delete the agorasdk.4.log file (if any). Rename agorasdk.3.log to agorasdk.4.log . Rename agorasdk.2.log to agorasdk.3.log . Rename agorasdk.1.log to agorasdk.2.log . Create a new agorasdk.log file. The overwrite rules for the agoraapi.log file are the same as for agorasdk.log . This method is used to set the size of the agorasdk.log file only and does not effect the agoraapi.log file .
3886
+ * Deprecated: Use the logConfig parameter in initialize instead. By default, the SDK generates five SDK log files and five API call log files with the following rules:
3887
+ * The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log.
3888
+ * The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log.
3889
+ * The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8.
3890
+ * The SDK writes the latest logs in agorasdk.log or agoraapi.log.
3891
+ * When agorasdk.log is full, the SDK processes the log files in the following order:
3892
+ * Delete the agorasdk.4.log file (if any).
3893
+ * Rename agorasdk.3.log to agorasdk.4.log.
3894
+ * Rename agorasdk.2.log to agorasdk.3.log.
3895
+ * Rename agorasdk.1.log to agorasdk.2.log.
3896
+ * Create a new agorasdk.log file.
3897
+ * The overwrite rules for the agoraapi.log file are the same as for agorasdk.log. This method is used to set the size of the agorasdk.log file only and does not effect the agoraapi.log file.
3415
3898
  *
3416
- * @param fileSizeInKBytes The size (KB) of an agorasdk.log file. The value range is [128,20480]. The default value is 1,024 KB. If you set fileSizeInKByte smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you set fileSizeInKByte greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB.
3899
+ * @param fileSizeInKBytes The size (KB) of an agorasdk.log file. The value range is [128,20480]. The default value is 2,048 KB. If you set fileSizeInKByte smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you set fileSizeInKByte greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB.
3417
3900
  *
3418
3901
  * @returns
3419
- * 0: Success. < 0: Failure.
3902
+ * 0: Success.
3903
+ * < 0: Failure.
3420
3904
  */
3421
3905
  abstract setLogFileSize(fileSizeInKBytes: number): number;
3422
3906
  /**
@@ -3426,26 +3910,32 @@ export declare abstract class IRtcEngine {
3426
3910
  /**
3427
3911
  * Updates the display mode of the local video view.
3428
3912
  *
3429
- * After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream. Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method. During a call, you can call this method as many times as necessary to update the display mode of the local video view.
3913
+ * After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream.
3914
+ * Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method.
3915
+ * During a call, you can call this method as many times as necessary to update the display mode of the local video view.
3430
3916
  *
3431
3917
  * @param renderMode The local video display mode. See RenderModeType.
3432
- * @param mirrorMode The mirror mode of the local video view. See VideoMirrorModeType.If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
3918
+ * @param mirrorMode The mirror mode of the local video view. See VideoMirrorModeType. If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
3433
3919
  *
3434
3920
  * @returns
3435
- * 0: Success. < 0: Failure.
3921
+ * 0: Success.
3922
+ * < 0: Failure.
3436
3923
  */
3437
3924
  abstract setLocalRenderMode(renderMode: RenderModeType, mirrorMode?: VideoMirrorModeType): number;
3438
3925
  /**
3439
3926
  * Updates the display mode of the video view of a remote user.
3440
3927
  *
3441
- * After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees. Call this method after initializing the remote view by calling the setupRemoteVideo method. During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
3928
+ * After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
3929
+ * Call this method after initializing the remote view by calling the setupRemoteVideo method.
3930
+ * During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
3442
3931
  *
3443
3932
  * @param uid The user ID of the remote user.
3444
3933
  * @param renderMode The rendering mode of the remote user view.
3445
3934
  * @param mirrorMode The mirror mode of the remote user view. See VideoMirrorModeType.
3446
3935
  *
3447
3936
  * @returns
3448
- * 0: Success. < 0: Failure.
3937
+ * 0: Success.
3938
+ * < 0: Failure.
3449
3939
  */
3450
3940
  abstract setRemoteRenderMode(uid: number, renderMode: RenderModeType, mirrorMode: VideoMirrorModeType): number;
3451
3941
  /**
@@ -3456,31 +3946,42 @@ export declare abstract class IRtcEngine {
3456
3946
  * @param mirrorMode The local video mirror mode. See VideoMirrorModeType.
3457
3947
  *
3458
3948
  * @returns
3459
- * 0: Success. < 0: Failure.
3949
+ * 0: Success.
3950
+ * < 0: Failure.
3460
3951
  */
3461
3952
  abstract setLocalVideoMirrorMode(mirrorMode: VideoMirrorModeType): number;
3462
3953
  /**
3463
3954
  * Enables or disables the dual-stream mode on the sender and sets the low-quality video stream.
3464
3955
  *
3465
- * Deprecated: This method is deprecated as of v4.2.0. Use setDualStreamMode instead. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream: High-quality video stream: High bitrate, high resolution. Low-quality video stream: Low bitrate, low resolution. After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams. If you need to enable dual video streams in a multi-channel scenario, you can call the enableDualStreamModeEx method. You can call this method either before or after joining a channel.
3956
+ * Deprecated: This method is deprecated as of v4.2.0. Use setDualStreamMode instead. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:
3957
+ * High-quality video stream: High bitrate, high resolution.
3958
+ * Low-quality video stream: Low bitrate, low resolution. After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.
3959
+ * This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
3960
+ * If you need to enable dual video streams in a multi-channel scenario, you can call the enableDualStreamModeEx method.
3961
+ * You can call this method either before or after joining a channel.
3466
3962
  *
3467
- * @param enabled Whether to enable dual-stream mode:true: Enable dual-stream mode.false: (Default) Disable dual-stream mode.
3963
+ * @param enabled Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode.
3468
3964
  * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
3469
3965
  *
3470
3966
  * @returns
3471
- * 0: Success. < 0: Failure.
3967
+ * 0: Success.
3968
+ * < 0: Failure.
3472
3969
  */
3473
3970
  abstract enableDualStreamMode(enabled: boolean, streamConfig?: SimulcastStreamConfig): number;
3474
3971
  /**
3475
3972
  * Sets dual-stream mode configuration on the sender, and sets the low-quality video stream.
3476
3973
  *
3477
- * The difference and connection between this method and is as follows: When calling this method and setting mode to DisableSimulcastStream , it has the same effect as ( false ) . When calling this method and setting mode to EnableSimulcastStream , it has the same effect as ( true ) . Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence. The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream . If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream (never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).
3974
+ * The difference and connection between this method and is as follows:
3975
+ * When calling this method and setting mode to DisableSimulcastStream, it has the same effect as (false).
3976
+ * When calling this method and setting mode to EnableSimulcastStream, it has the same effect as (true).
3977
+ * Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence. The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream (never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).
3478
3978
  *
3479
3979
  * @param mode The mode in which the video stream is sent. See SimulcastStreamMode.
3480
- * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.When setting mode to DisableSimulcastStream, setting streamConfig will not take effect.
3980
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to DisableSimulcastStream, setting streamConfig will not take effect.
3481
3981
  *
3482
3982
  * @returns
3483
- * 0: Success. < 0: Failure.
3983
+ * 0: Success.
3984
+ * < 0: Failure.
3484
3985
  */
3485
3986
  abstract setDualStreamMode(mode: SimulcastStreamMode, streamConfig?: SimulcastStreamConfig): number;
3486
3987
  /**
@@ -3490,29 +3991,39 @@ export declare abstract class IRtcEngine {
3490
3991
  /**
3491
3992
  * Sets the format of the captured raw audio data.
3492
3993
  *
3493
- * Sets the audio format for the onRecordAudioFrame callback. Ensure that you call this method before joining a channel. The SDK calculates the sampling interval based on the samplesPerCall , sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /( sampleRate × channel ) . Ensure that the sample interval ≥ 0.01 (s).
3994
+ * Sets the audio format for the onRecordAudioFrame callback.
3995
+ * Ensure that you call this method before joining a channel.
3996
+ * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s).
3494
3997
  *
3495
3998
  * @param sampleRate The sample rate returned in the SDK, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
3496
- * @param channel The number of channels returned by the SDK. You can set the value as 1 or 2:1: Mono.2: Stereo.
3999
+ * @param channel The number of channels returned by the SDK. You can set the value as 1 or 2:
4000
+ * 1: Mono.
4001
+ * 2: Stereo.
3497
4002
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
3498
4003
  * @param samplesPerCall The number of data samples returned in the SDK, such as 1024 for the Media Push.
3499
4004
  *
3500
4005
  * @returns
3501
- * 0: Success. < 0: Failure.
4006
+ * 0: Success.
4007
+ * < 0: Failure.
3502
4008
  */
3503
4009
  abstract setRecordingAudioFrameParameters(sampleRate: number, channel: number, mode: RawAudioFrameOpModeType, samplesPerCall: number): number;
3504
4010
  /**
3505
4011
  * Sets the audio data format for playback.
3506
4012
  *
3507
- * Sets the data format for the onPlaybackAudioFrame callback. Ensure that you call this method before joining a channel. The SDK calculates the sampling interval based on the samplesPerCall , sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /( sampleRate × channel ) . Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the callback according to the sampling interval. onPlaybackAudioFrame
4013
+ * Sets the data format for the onPlaybackAudioFrame callback.
4014
+ * Ensure that you call this method before joining a channel.
4015
+ * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onPlaybackAudioFrame callback according to the sampling interval.
3508
4016
  *
3509
4017
  * @param sampleRate The sample rate returned in the onPlaybackAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
3510
- * @param channel The number of channels returned in the onPlaybackAudioFrame callback:1: Mono.2: Stereo.
4018
+ * @param channel The number of channels returned in the onPlaybackAudioFrame callback:
4019
+ * 1: Mono.
4020
+ * 2: Stereo.
3511
4021
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
3512
4022
  * @param samplesPerCall The number of data samples returned in the onPlaybackAudioFrame callback, such as 1024 for the Media Push.
3513
4023
  *
3514
4024
  * @returns
3515
- * 0: Success. < 0: Failure.
4025
+ * 0: Success.
4026
+ * < 0: Failure.
3516
4027
  */
3517
4028
  abstract setPlaybackAudioFrameParameters(sampleRate: number, channel: number, mode: RawAudioFrameOpModeType, samplesPerCall: number): number;
3518
4029
  /**
@@ -3523,31 +4034,38 @@ export declare abstract class IRtcEngine {
3523
4034
  * @param samplesPerCall Sets the number of samples. In Media Push scenarios, set it as 1024.
3524
4035
  *
3525
4036
  * @returns
3526
- * 0: Success. < 0: Failure.
4037
+ * 0: Success.
4038
+ * < 0: Failure.
3527
4039
  */
3528
4040
  abstract setMixedAudioFrameParameters(sampleRate: number, channel: number, samplesPerCall: number): number;
3529
4041
  /**
3530
4042
  * Sets the format of the in-ear monitoring raw audio data.
3531
4043
  *
3532
- * This method is used to set the in-ear monitoring audio data format reported by the onEarMonitoringAudioFrame callback. Before calling this method, you need to call enableInEarMonitoring , and set includeAudioFilters to EarMonitoringFilterBuiltInAudioFilters or EarMonitoringFilterNoiseSuppression . The SDK calculates the sampling interval based on the samplesPerCall , sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /( sampleRate × channel ) . Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
4044
+ * This method is used to set the in-ear monitoring audio data format reported by the onEarMonitoringAudioFrame callback.
4045
+ * Before calling this method, you need to call enableInEarMonitoring, and set includeAudioFilters to EarMonitoringFilterBuiltInAudioFilters or EarMonitoringFilterNoiseSuppression.
4046
+ * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
3533
4047
  *
3534
4048
  * @param sampleRate The sample rate of the audio data reported in the onEarMonitoringAudioFrame callback, which can be set as 8,000, 16,000, 32,000, 44,100, or 48,000 Hz.
3535
- * @param channel The number of audio channels reported in the onEarMonitoringAudioFrame callback.1: Mono.2: Stereo.
4049
+ * @param channel The number of audio channels reported in the onEarMonitoringAudioFrame callback.
4050
+ * 1: Mono.
4051
+ * 2: Stereo.
3536
4052
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
3537
4053
  * @param samplesPerCall The number of data samples reported in the onEarMonitoringAudioFrame callback, such as 1,024 for the Media Push.
3538
4054
  *
3539
4055
  * @returns
3540
- * 0: Success. < 0: Failure.
4056
+ * 0: Success.
4057
+ * < 0: Failure.
3541
4058
  */
3542
4059
  abstract setEarMonitoringAudioFrameParameters(sampleRate: number, channel: number, mode: RawAudioFrameOpModeType, samplesPerCall: number): number;
3543
4060
  /**
3544
4061
  * Sets the audio data format reported by onPlaybackAudioFrameBeforeMixing.
3545
4062
  *
3546
4063
  * @param sampleRate The sample rate (Hz) of the audio data, which can be set as 8000, 16000, 32000, 44100, or 48000.
3547
- * @param channel The number of channels of the external audio source, which can be set as 1(Mono) or 2(Stereo).
4064
+ * @param channel The number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo).
3548
4065
  *
3549
4066
  * @returns
3550
- * 0: Success. < 0: Failure.
4067
+ * 0: Success.
4068
+ * < 0: Failure.
3551
4069
  */
3552
4070
  abstract setPlaybackAudioFrameBeforeMixingParameters(sampleRate: number, channel: number): number;
3553
4071
  /**
@@ -3558,16 +4076,19 @@ export declare abstract class IRtcEngine {
3558
4076
  * @param intervalInMS The interval (in milliseconds) at which the SDK triggers the onLocalAudioSpectrum and onRemoteAudioSpectrum callbacks. The default value is 100. Do not set this parameter to a value less than 10, otherwise calling this method would fail.
3559
4077
  *
3560
4078
  * @returns
3561
- * 0: Success. < 0: Failure. -2: Invalid parameters.
4079
+ * 0: Success.
4080
+ * < 0: Failure.
4081
+ * -2: Invalid parameters.
3562
4082
  */
3563
4083
  abstract enableAudioSpectrumMonitor(intervalInMS?: number): number;
3564
4084
  /**
3565
4085
  * Disables audio spectrum monitoring.
3566
4086
  *
3567
- * After calling enableAudioSpectrumMonitor , if you want to disable audio spectrum monitoring, you can call this method. You can call this method either before or after joining a channel.
4087
+ * After calling enableAudioSpectrumMonitor, if you want to disable audio spectrum monitoring, you can call this method. You can call this method either before or after joining a channel.
3568
4088
  *
3569
4089
  * @returns
3570
- * 0: Success. < 0: Failure.
4090
+ * 0: Success.
4091
+ * < 0: Failure.
3571
4092
  */
3572
4093
  abstract disableAudioSpectrumMonitor(): number;
3573
4094
  /**
@@ -3584,10 +4105,11 @@ export declare abstract class IRtcEngine {
3584
4105
  /**
3585
4106
  * Unregisters the audio spectrum observer.
3586
4107
  *
3587
- * After calling registerAudioSpectrumObserver , if you want to disable audio spectrum monitoring, you can call this method. You can call this method either before or after joining a channel.
4108
+ * After calling registerAudioSpectrumObserver, if you want to disable audio spectrum monitoring, you can call this method. You can call this method either before or after joining a channel.
3588
4109
  *
3589
4110
  * @returns
3590
- * 0: Success. < 0: Failure.
4111
+ * 0: Success.
4112
+ * < 0: Failure.
3591
4113
  */
3592
4114
  abstract unregisterAudioSpectrumObserver(observer: IAudioSpectrumObserver): number;
3593
4115
  /**
@@ -3595,45 +4117,55 @@ export declare abstract class IRtcEngine {
3595
4117
  *
3596
4118
  * You can call this method either before or after joining a channel.
3597
4119
  *
3598
- * @param volume The volume of the user. The value range is [0,400].0: Mute.If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.100: (Default) The original volume.400: Four times the original volume (amplifying the audio signals by four times).
4120
+ * @param volume The volume of the user. The value range is [0,400].
4121
+ * 0: Mute. If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
4122
+ * 100: (Default) The original volume.
4123
+ * 400: Four times the original volume (amplifying the audio signals by four times).
3599
4124
  *
3600
4125
  * @returns
3601
- * 0: Success. < 0: Failure.
4126
+ * 0: Success.
4127
+ * < 0: Failure.
3602
4128
  */
3603
4129
  abstract adjustRecordingSignalVolume(volume: number): number;
3604
4130
  /**
3605
4131
  * Whether to mute the recording signal.
3606
4132
  *
3607
- * @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.
4133
+ * @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.
3608
4134
  *
3609
4135
  * @returns
3610
- * 0: Success. < 0: Failure.
4136
+ * 0: Success.
4137
+ * < 0: Failure.
3611
4138
  */
3612
4139
  abstract muteRecordingSignal(mute: boolean): number;
3613
4140
  /**
3614
4141
  * Adjusts the playback signal volume of all remote users.
3615
4142
  *
3616
- * This method adjusts the playback volume that is the mixed volume of all remote users. You can call this method either before or after joining a channel.
4143
+ * This method adjusts the playback volume that is the mixed volume of all remote users.
4144
+ * You can call this method either before or after joining a channel.
3617
4145
  *
3618
4146
  * @param volume The volume of the user. The value range is [0,400].
3619
- * 0: Mute.If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
4147
+ * 0: Mute. If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
3620
4148
  * 100: (Default) The original volume.
3621
4149
  * 400: Four times the original volume (amplifying the audio signals by four times).
3622
4150
  *
3623
4151
  * @returns
3624
- * 0: Success. < 0: Failure.
4152
+ * 0: Success.
4153
+ * < 0: Failure.
3625
4154
  */
3626
4155
  abstract adjustPlaybackSignalVolume(volume: number): number;
3627
4156
  /**
3628
4157
  * Adjusts the playback signal volume of a specified remote user.
3629
4158
  *
3630
- * You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user. Call this method after joining a channel. The playback volume here refers to the mixed volume of a specified remote user.
4159
+ * You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user.
4160
+ * Call this method after joining a channel.
4161
+ * The playback volume here refers to the mixed volume of a specified remote user.
3631
4162
  *
3632
4163
  * @param uid The user ID of the remote user.
3633
4164
  * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
3634
4165
  *
3635
4166
  * @returns
3636
- * 0: Success. < 0: Failure.
4167
+ * 0: Success.
4168
+ * < 0: Failure.
3637
4169
  */
3638
4170
  abstract adjustUserPlaybackSignalVolume(uid: number, volume: number): number;
3639
4171
  /**
@@ -3651,13 +4183,17 @@ export declare abstract class IRtcEngine {
3651
4183
  /**
3652
4184
  * Enables loopback audio capturing.
3653
4185
  *
3654
- * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end. macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing. You can call this method either before or after joining a channel.
4186
+ * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.
4187
+ * macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing.
4188
+ * You can call this method either before or after joining a channel.
3655
4189
  *
3656
- * @param enabled Whether to enable loopback audio capturing.true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
3657
- * @param deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing.Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing.
4190
+ * @param enabled Whether to enable loopback audio capturing. true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing.
4191
+ * @param deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing.
4192
+ * Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing.
3658
4193
  *
3659
4194
  * @returns
3660
- * 0: Success. < 0: Failure.
4195
+ * 0: Success.
4196
+ * < 0: Failure.
3661
4197
  */
3662
4198
  abstract enableLoopbackRecording(enabled: boolean, deviceName?: string): number;
3663
4199
  /**
@@ -3668,7 +4204,8 @@ export declare abstract class IRtcEngine {
3668
4204
  * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
3669
4205
  *
3670
4206
  * @returns
3671
- * 0: Success. < 0: Failure.
4207
+ * 0: Success.
4208
+ * < 0: Failure.
3672
4209
  */
3673
4210
  abstract adjustLoopbackSignalVolume(volume: number): number;
3674
4211
  /**
@@ -3678,19 +4215,24 @@ export declare abstract class IRtcEngine {
3678
4215
  /**
3679
4216
  * Enables in-ear monitoring.
3680
4217
  *
3681
- * This method enables or disables in-ear monitoring. Users must use earphones (wired or Bluetooth) to hear the in-ear monitoring effect. You can call this method either before or after joining a channel.
4218
+ * This method enables or disables in-ear monitoring.
4219
+ * Users must use earphones (wired or Bluetooth) to hear the in-ear monitoring effect.
4220
+ * You can call this method either before or after joining a channel.
3682
4221
  *
3683
- * @param enabled Enables or disables in-ear monitoring.true: Enables in-ear monitoring.false: (Default) Disables in-ear monitoring.
4222
+ * @param enabled Enables or disables in-ear monitoring. true : Enables in-ear monitoring. false : (Default) Disables in-ear monitoring.
3684
4223
  * @param includeAudioFilters The audio filter of in-ear monitoring: See EarMonitoringFilterType.
3685
4224
  *
3686
4225
  * @returns
3687
- * 0: Success. < 0: Failure. - 8: Make sure the current audio routing is Bluetooth or headset.
4226
+ * 0: Success.
4227
+ * < 0: Failure.
4228
+ * - 8: Make sure the current audio routing is Bluetooth or headset.
3688
4229
  */
3689
4230
  abstract enableInEarMonitoring(enabled: boolean, includeAudioFilters: EarMonitoringFilterType): number;
3690
4231
  /**
3691
4232
  * Sets the volume of the in-ear monitor.
3692
4233
  *
3693
- * Users must use wired earphones to hear their own voices. You can call this method either before or after joining a channel.
4234
+ * Users must use wired earphones to hear their own voices.
4235
+ * You can call this method either before or after joining a channel.
3694
4236
  *
3695
4237
  * @param volume The volume of the in-ear monitor. The value ranges between 0 and 100. The default value is 100.
3696
4238
  *
@@ -3704,23 +4246,25 @@ export declare abstract class IRtcEngine {
3704
4246
  * This method applies to Windows only.
3705
4247
  *
3706
4248
  * @param path The extension library path and name. For example: /library/libagora_segmentation_extension.dll.
3707
- * @param unloadAfterUse Whether to uninstall the current extension when you no longer using it:true: Uninstall the extension when the IRtcEngine is destroyed.false: (Rcommended) Do not uninstall the extension until the process terminates.
4249
+ * @param unloadAfterUse Whether to uninstall the current extension when you no longer using it: true : Uninstall the extension when the IRtcEngine is destroyed. false : (Rcommended) Do not uninstall the extension until the process terminates.
3708
4250
  *
3709
4251
  * @returns
3710
- * 0: Success. < 0: Failure.
4252
+ * 0: Success.
4253
+ * < 0: Failure.
3711
4254
  */
3712
4255
  abstract loadExtensionProvider(path: string, unloadAfterUse?: boolean): number;
3713
4256
  /**
3714
4257
  * Sets the properties of the extension provider.
3715
4258
  *
3716
- * You can call this method to set the attributes of the extension provider and initialize the relevant parameters according to the type of the provider. Call this method after enableExtension , and before enabling the audio ( enableAudio / enableLocalAudio ) or the video ( enableVideo / enableLocalVideo ).
4259
+ * You can call this method to set the attributes of the extension provider and initialize the relevant parameters according to the type of the provider. Call this method after enableExtension, and before enabling the audio (enableAudio / enableLocalAudio) or the video (enableVideo / enableLocalVideo).
3717
4260
  *
3718
4261
  * @param provider The name of the extension provider.
3719
4262
  * @param key The key of the extension.
3720
4263
  * @param value The value of the extension key.
3721
4264
  *
3722
4265
  * @returns
3723
- * 0: Success. < 0: Failure.
4266
+ * 0: Success.
4267
+ * < 0: Failure.
3724
4268
  */
3725
4269
  abstract setExtensionProviderProperty(provider: string, key: string, value: string): number;
3726
4270
  /**
@@ -3730,26 +4274,33 @@ export declare abstract class IRtcEngine {
3730
4274
  *
3731
4275
  * @param provider The name of the extension provider.
3732
4276
  * @param extension The name of the extension.
3733
- * @param type Type of media source. See MediaSourceType.In this method, this parameter supports only the following two settings:
4277
+ * @param type Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings:
3734
4278
  * The default value is UnknownMediaSource.
3735
4279
  * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
3736
4280
  *
3737
4281
  * @returns
3738
- * 0: Success. < 0: Failure.
4282
+ * 0: Success.
4283
+ * < 0: Failure.
3739
4284
  */
3740
4285
  abstract registerExtension(provider: string, extension: string, type?: MediaSourceType): number;
3741
4286
  /**
3742
4287
  * Enables or disables extensions.
3743
4288
  *
3744
- * To call this method, call it immediately after initializing the IRtcEngine object. If you want to enable multiple extensions, you need to call this method multiple times. The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first.
4289
+ * To call this method, call it immediately after initializing the IRtcEngine object.
4290
+ * If you want to enable multiple extensions, you need to call this method multiple times.
4291
+ * The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first.
3745
4292
  *
3746
4293
  * @param provider The name of the extension provider.
3747
4294
  * @param extension The name of the extension.
3748
- * @param enable Whether to enable the extension:true: Enable the extension.false: Disable the extension.
3749
- * @param type Type of media source. See MediaSourceType.In this method, this parameter supports only the following two settings:The default value is UnknownMediaSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
4295
+ * @param enable Whether to enable the extension: true : Enable the extension. false : Disable the extension.
4296
+ * @param type Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings:
4297
+ * The default value is UnknownMediaSource.
4298
+ * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource.
3750
4299
  *
3751
4300
  * @returns
3752
- * 0: Success. < 0: Failure. -3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library.
4301
+ * 0: Success.
4302
+ * < 0: Failure.
4303
+ * -3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library.
3753
4304
  */
3754
4305
  abstract enableExtension(provider: string, extension: string, enable?: boolean, type?: MediaSourceType): number;
3755
4306
  /**
@@ -3764,7 +4315,8 @@ export declare abstract class IRtcEngine {
3764
4315
  * @param type The type of the video source, see MediaSourceType.
3765
4316
  *
3766
4317
  * @returns
3767
- * 0: Success. < 0: Failure.
4318
+ * 0: Success.
4319
+ * < 0: Failure.
3768
4320
  */
3769
4321
  abstract setExtensionProperty(provider: string, extension: string, key: string, value: string, type?: MediaSourceType): number;
3770
4322
  /**
@@ -3777,7 +4329,8 @@ export declare abstract class IRtcEngine {
3777
4329
  * @param type Source type of the extension. See MediaSourceType.
3778
4330
  *
3779
4331
  * @returns
3780
- * The extension information, if the method call succeeds. An empty string, if the method call fails.
4332
+ * The extension information, if the method call succeeds.
4333
+ * An empty string, if the method call fails.
3781
4334
  */
3782
4335
  abstract getExtensionProperty(provider: string, extension: string, key: string, bufLen: number, type?: MediaSourceType): string;
3783
4336
  /**
@@ -3787,10 +4340,14 @@ export declare abstract class IRtcEngine {
3787
4340
  /**
3788
4341
  * Creates a customized video track.
3789
4342
  *
3790
- * When you need to publish multiple custom captured videos in the channel, you can refer to the following steps: Call this method to create a video track and get the video track ID. In each channel's ChannelMediaOptions , set the customVideoTrackId parameter to the ID of the video track you want to publish, and set publishCustomVideoTrack to true . If you call pushVideoFrame , and specify customVideoTrackId as the videoTrackId set in step 2, you can publish the corresponding custom video source in multiple channels.
4343
+ * When you need to publish multiple custom captured videos in the channel, you can refer to the following steps:
4344
+ * Call this method to create a video track and get the video track ID.
4345
+ * In each channel's ChannelMediaOptions, set the customVideoTrackId parameter to the ID of the video track you want to publish, and set publishCustomVideoTrack to true.
4346
+ * If you call pushVideoFrame, and specify customVideoTrackId as the videoTrackId set in step 2, you can publish the corresponding custom video source in multiple channels.
3791
4347
  *
3792
4348
  * @returns
3793
- * If the method call is successful, the video track ID is returned as the unique identifier of the video track. If the method call fails, a negative value is returned.
4349
+ * If the method call is successful, the video track ID is returned as the unique identifier of the video track.
4350
+ * If the method call fails, a negative value is returned.
3794
4351
  */
3795
4352
  abstract createCustomVideoTrack(): number;
3796
4353
  /**
@@ -3803,7 +4360,8 @@ export declare abstract class IRtcEngine {
3803
4360
  * @param videoTrackId The video track ID returned by calling the createCustomVideoTrack method.
3804
4361
  *
3805
4362
  * @returns
3806
- * 0: Success. < 0: Failure.
4363
+ * 0: Success.
4364
+ * < 0: Failure.
3807
4365
  */
3808
4366
  abstract destroyCustomVideoTrack(videoTrackId: number): number;
3809
4367
  /**
@@ -3873,7 +4431,7 @@ export declare abstract class IRtcEngine {
3873
4431
  /**
3874
4432
  * @ignore
3875
4433
  */
3876
- abstract setCameraExposureFactor(value: number): number;
4434
+ abstract setCameraExposureFactor(factor: number): number;
3877
4435
  /**
3878
4436
  * @ignore
3879
4437
  */
@@ -3905,7 +4463,7 @@ export declare abstract class IRtcEngine {
3905
4463
  *
3906
4464
  * @param thumbSize The target size of the screen or window thumbnail (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and thumbSize is 100 × 100, the actual size of the thumbnail is 100 × 75. If the target size is larger than the original size, the thumbnail is the original image and the SDK does not scale it.
3907
4465
  * @param iconSize The target size of the icon corresponding to the application program (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and iconSize is 100 × 100, the actual size of the icon is 100 × 75. If the target size is larger than the original size, the icon is the original image and the SDK does not scale it.
3908
- * @param includeScreen Whether the SDK returns the screen information in addition to the window information:true: The SDK returns screen and window information.false: The SDK returns window information only.
4466
+ * @param includeScreen Whether the SDK returns the screen information in addition to the window information: true : The SDK returns screen and window information. false : The SDK returns window information only.
3909
4467
  *
3910
4468
  * @returns
3911
4469
  * The ScreenCaptureSourceInfo array.
@@ -3918,60 +4476,80 @@ export declare abstract class IRtcEngine {
3918
4476
  /**
3919
4477
  * Captures the screen by specifying the display ID.
3920
4478
  *
3921
- * This method shares a screen or part of the screen. There are two ways to start screen sharing, you can choose one according to your needs: Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4479
+ * This method shares a screen or part of the screen. There are two ways to start screen sharing, you can choose one according to your needs:
4480
+ * Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4481
+ * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
3922
4482
  *
3923
- * @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.
4483
+ * @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.
3924
4484
  * @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen.
3925
4485
  * @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.
3926
4486
  *
3927
4487
  * @returns
3928
- * 0: Success. < 0: Failure. -2: The parameter is invalid. -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4488
+ * 0: Success.
4489
+ * < 0: Failure.
4490
+ * -2: The parameter is invalid.
4491
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
3929
4492
  */
3930
4493
  abstract startScreenCaptureByDisplayId(displayId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters): number;
3931
4494
  /**
3932
4495
  * Captures the whole or part of a screen by specifying the screen rect.
3933
4496
  *
3934
- * There are two ways to start screen sharing, you can choose one according to your needs: Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Deprecated: This method is deprecated. Use startScreenCaptureByDisplayId instead. Agora strongly recommends using startScreenCaptureByDisplayId if you need to start screen sharing on a device connected to another display. This method shares a screen or part of the screen. You need to specify the area of the screen to be shared. This method applies to Windows only.
4497
+ * There are two ways to start screen sharing, you can choose one according to your needs:
4498
+ * Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4499
+ * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Deprecated: This method is deprecated. Use startScreenCaptureByDisplayId instead. Agora strongly recommends using startScreenCaptureByDisplayId if you need to start screen sharing on a device connected to another display. This method shares a screen or part of the screen. You need to specify the area of the screen to be shared. This method applies to Windows only.
3935
4500
  *
3936
4501
  * @param screenRect Sets the relative location of the screen to the virtual screen.
3937
4502
  * @param regionRect Rectangle. If the specified region overruns the screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen.
3938
4503
  * @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.
3939
4504
  *
3940
4505
  * @returns
3941
- * 0: Success. < 0: Failure. -2: The parameter is invalid. -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4506
+ * 0: Success.
4507
+ * < 0: Failure.
4508
+ * -2: The parameter is invalid.
4509
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
3942
4510
  */
3943
4511
  abstract startScreenCaptureByScreenRect(screenRect: Rectangle, regionRect: Rectangle, captureParams: ScreenCaptureParameters): number;
3944
4512
  /**
3945
4513
  * Gets the audio device information.
3946
4514
  *
3947
- * After calling this method, you can get whether the audio device supports ultra-low-latency capture and playback. You can call this method either before or after joining a channel.
4515
+ * After calling this method, you can get whether the audio device supports ultra-low-latency capture and playback.
4516
+ * You can call this method either before or after joining a channel.
3948
4517
  *
3949
4518
  * @returns
3950
- * The DeviceInfo object that identifies the audio device information. Not null: Success. Null: Failure.
4519
+ * The DeviceInfo object that identifies the audio device information.
4520
+ * Not null: Success.
4521
+ * Null: Failure.
3951
4522
  */
3952
4523
  abstract getAudioDeviceInfo(): DeviceInfo;
3953
4524
  /**
3954
4525
  * Captures the whole or part of a window by specifying the window ID.
3955
4526
  *
3956
- * There are two ways to start screen sharing, you can choose one according to your needs: Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. This method captures a window or part of the window. You need to specify the ID of the window to be captured. The window sharing feature of the Agora SDK relies on WGC (Windows Graphics Capture) or GDI (Graphics Device Interface) capture, and WGC cannot be set to disable mouse capture on systems earlier than Windows 10 2004. Therefore, captureMouseCursor(false) might not work when you start window sharing on a device with a system earlier than Windows 10 2004. See ScreenCaptureParameters . This method supports window sharing of UWP (Universal Windows Platform) applications. Agora tests the mainstream UWP applications by using the lastest SDK, see details as follows:
4527
+ * There are two ways to start screen sharing, you can choose one according to your needs:
4528
+ * Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4529
+ * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. This method captures a window or part of the window. You need to specify the ID of the window to be captured.
4530
+ * The window sharing feature of the Agora SDK relies on WGC (Windows Graphics Capture) or GDI (Graphics Device Interface) capture, and WGC cannot be set to disable mouse capture on systems earlier than Windows 10 2004. Therefore, captureMouseCursor(false) might not work when you start window sharing on a device with a system earlier than Windows 10 2004. See ScreenCaptureParameters. This method supports window sharing of UWP (Universal Windows Platform) applications. Agora tests the mainstream UWP applications by using the lastest SDK, see details as follows:
3957
4531
  *
3958
4532
  * @param windowId The ID of the window to be shared.
3959
4533
  * @param regionRect (Optional) Sets the relative location of the region to the screen. If you do not set this parameter, the SDK shares the whole screen. See Rectangle. If the specified region overruns the window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole window.
3960
4534
  * @param captureParams Screen sharing configurations. 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.
3961
4535
  *
3962
4536
  * @returns
3963
- * 0: Success. < 0: Failure. -2: The parameter is invalid. -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4537
+ * 0: Success.
4538
+ * < 0: Failure.
4539
+ * -2: The parameter is invalid.
4540
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
3964
4541
  */
3965
4542
  abstract startScreenCaptureByWindowId(windowId: any, regionRect: Rectangle, captureParams: ScreenCaptureParameters): number;
3966
4543
  /**
3967
4544
  * Sets the content hint for screen sharing.
3968
4545
  *
3969
- * A content hint suggests the type of the content being shared, so that the SDK applies different optimization algorithms to different types of content. If you don't call this method, the default content hint is ContentHintNone . You can call this method either before or after you start screen sharing.
4546
+ * A content hint suggests the type of the content being shared, so that the SDK applies different optimization algorithms to different types of content. If you don't call this method, the default content hint is ContentHintNone. You can call this method either before or after you start screen sharing.
3970
4547
  *
3971
4548
  * @param contentHint The content hint for screen sharing. See VideoContentHint.
3972
4549
  *
3973
4550
  * @returns
3974
- * 0: Success. < 0: Failure.
4551
+ * 0: Success.
4552
+ * < 0: Failure.
3975
4553
  * -2: The parameter is invalid.
3976
4554
  * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
3977
4555
  */
@@ -3984,7 +4562,10 @@ export declare abstract class IRtcEngine {
3984
4562
  * @param regionRect The relative location of the screen-share area to the screen or window. If you do not set this parameter, the SDK shares the whole screen or window. See Rectangle. If the specified region overruns the screen or window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen or window.
3985
4563
  *
3986
4564
  * @returns
3987
- * 0: Success. < 0: Failure. -2: The parameter is invalid. -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4565
+ * 0: Success.
4566
+ * < 0: Failure.
4567
+ * -2: The parameter is invalid.
4568
+ * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
3988
4569
  */
3989
4570
  abstract updateScreenCaptureRegion(regionRect: Rectangle): number;
3990
4571
  /**
@@ -3995,7 +4576,8 @@ export declare abstract class IRtcEngine {
3995
4576
  * @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
3996
4577
  *
3997
4578
  * @returns
3998
- * 0: Success. < 0: Failure.
4579
+ * 0: Success.
4580
+ * < 0: Failure.
3999
4581
  * -2: The parameter is invalid.
4000
4582
  * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again.
4001
4583
  */
@@ -4007,9 +4589,12 @@ export declare abstract class IRtcEngine {
4007
4589
  /**
4008
4590
  * Starts screen capture.
4009
4591
  *
4010
- * This method, as well as startScreenCaptureByDisplayId and startScreenCaptureByWindowId , all have the capability to start screen capture, with the following differences: startScreenCaptureByDisplayId and startScreenCaptureByWindowId only support capturing video from a single screen or window. By calling this method and specifying the sourceType parameter, you can capture multiple video streams used for local video mixing or multi-channel publishing. If you call this method to start screen capture, Agora recommends that you call stopScreenCaptureBySourceType to stop the capture and avoid using stopScreenCapture .
4592
+ * This method, as well as startScreenCaptureByDisplayId and startScreenCaptureByWindowId, all have the capability to start screen capture, with the following differences: startScreenCaptureByDisplayId and startScreenCaptureByWindowId only support capturing video from a single screen or window. By calling this method and specifying the sourceType parameter, you can capture multiple video streams used for local video mixing or multi-channel publishing.
4593
+ * If you call this method to start screen capture, Agora recommends that you call stopScreenCaptureBySourceType to stop the capture and avoid using stopScreenCapture.
4011
4594
  *
4012
- * @param sourceType The type of the video source. See VideoSourceType.Windows supports up to four screen capture video streams.macOS supports only one screen capture video stream. You can only set this parameter to VideoSourceScreen(2).
4595
+ * @param sourceType The type of the video source. See VideoSourceType.
4596
+ * Windows supports up to four screen capture video streams.
4597
+ * macOS supports only one screen capture video stream. You can only set this parameter to VideoSourceScreen (2).
4013
4598
  * @param config The configuration of the captured screen. See ScreenCaptureConfiguration.
4014
4599
  */
4015
4600
  abstract startScreenCaptureBySourceType(sourceType: VideoSourceType, config: ScreenCaptureConfiguration): number;
@@ -4020,7 +4605,7 @@ export declare abstract class IRtcEngine {
4020
4605
  /**
4021
4606
  * @ignore
4022
4607
  */
4023
- abstract queryScreenCaptureCapability(): ScreenCaptureFramerateCapability;
4608
+ abstract queryScreenCaptureCapability(): number;
4024
4609
  /**
4025
4610
  * Sets the screen sharing scenario.
4026
4611
  *
@@ -4029,34 +4614,39 @@ export declare abstract class IRtcEngine {
4029
4614
  * @param screenScenario The screen sharing scenario. See ScreenScenarioType.
4030
4615
  *
4031
4616
  * @returns
4032
- * 0: Success. < 0: Failure.
4617
+ * 0: Success.
4618
+ * < 0: Failure.
4033
4619
  */
4034
4620
  abstract setScreenCaptureScenario(screenScenario: ScreenScenarioType): number;
4035
4621
  /**
4036
4622
  * Stops screen capture.
4037
4623
  *
4038
4624
  * @returns
4039
- * 0: Success. < 0: Failure.
4625
+ * 0: Success.
4626
+ * < 0: Failure.
4040
4627
  */
4041
4628
  abstract stopScreenCapture(): number;
4042
4629
  /**
4043
4630
  * Stops screen capture.
4044
4631
  *
4045
- * After calling startScreenCaptureBySourceType to start capturing video from one or more screens, you can call this method and set the sourceType parameter to stop capturing from the specified screens. If you call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start screen capture, Agora recommends that you call stopScreenCapture to stop the capture and do not use this one.
4632
+ * After calling startScreenCaptureBySourceType to start capturing video from one or more screens, you can call this method and set the sourceType parameter to stop capturing from the specified screens.
4633
+ * If you call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start screen capture, Agora recommends that you call stopScreenCapture to stop the capture and do not use this one.
4046
4634
  *
4047
4635
  * @param sourceType The type of the video source. See VideoSourceType.
4048
4636
  *
4049
4637
  * @returns
4050
- * 0: Success. < 0: Failure.
4638
+ * 0: Success.
4639
+ * < 0: Failure.
4051
4640
  */
4052
4641
  abstract stopScreenCaptureBySourceType(sourceType: VideoSourceType): number;
4053
4642
  /**
4054
4643
  * Retrieves the call ID.
4055
4644
  *
4056
- * When a user joins a channel on a client, a callId is generated to identify the call from the client. Some methods, such as rate and complain , must be called after the call ends to submit feedback to the SDK. These methods require the callId parameter. Call this method after joining a channel.
4645
+ * When a user joins a channel on a client, a callId is generated to identify the call from the client. Some methods, such as rate and complain, must be called after the call ends to submit feedback to the SDK. These methods require the callId parameter. Call this method after joining a channel.
4057
4646
  *
4058
4647
  * @returns
4059
- * The current call ID, if the method succeeds. An empty string, if the method call fails.
4648
+ * The current call ID, if the method succeeds.
4649
+ * An empty string, if the method call fails.
4060
4650
  */
4061
4651
  abstract getCallId(): string;
4062
4652
  /**
@@ -4069,7 +4659,10 @@ export declare abstract class IRtcEngine {
4069
4659
  * @param description A description of the call. The string length should be less than 800 bytes.
4070
4660
  *
4071
4661
  * @returns
4072
- * 0: Success. < 0: Failure. -2 ( ERR_INVALID_ARGUMENT ). -3 ( ERR_NOT_READY ).
4662
+ * 0: Success.
4663
+ * < 0: Failure.
4664
+ * -2 (ERR_INVALID_ARGUMENT).
4665
+ * -3 (ERR_NOT_READY).
4073
4666
  */
4074
4667
  abstract rate(callId: string, rating: number, description: string): number;
4075
4668
  /**
@@ -4081,88 +4674,123 @@ export declare abstract class IRtcEngine {
4081
4674
  * @param description A description of the call. The string length should be less than 800 bytes.
4082
4675
  *
4083
4676
  * @returns
4084
- * 0: Success. < 0: Failure. -2: The parameter is invalid. - 3: The SDK is not ready. Possible reasons include the following: The initialization of IRtcEngine fails. Reinitialize the IRtcEngine . No user has joined the channel when the method is called. Please check your code logic. The user has not left the channel when the rate or complain method is called. Please check your code logic. The audio module is disabled. The program is not complete.
4677
+ * 0: Success.
4678
+ * < 0: Failure.
4679
+ * -2: The parameter is invalid.
4680
+ * - 3: The SDK is not ready. Possible reasons include the following:
4681
+ * The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.
4682
+ * No user has joined the channel when the method is called. Please check your code logic.
4683
+ * The user has not left the channel when the rate or complain method is called. Please check your code logic.
4684
+ * The audio module is disabled. The program is not complete.
4085
4685
  */
4086
4686
  abstract complain(callId: string, description: string): number;
4087
4687
  /**
4088
4688
  * Starts pushing media streams to a CDN without transcoding.
4089
4689
  *
4090
- * Ensure that you enable the Media Push service before using this function. See Enable Media Push . Call this method after joining a channel. Only hosts in the LIVE_BROADCASTING profile can call this method. If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4690
+ * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
4691
+ * Call this method after joining a channel.
4692
+ * Only hosts in the LIVE_BROADCASTING profile can call this method.
4693
+ * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4091
4694
  *
4092
4695
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
4093
4696
  *
4094
4697
  * @returns
4095
- * 0: Success. < 0: Failure. -2: The URL is null or the string length is 0. -7: The SDK is not initialized before calling this method. -19: The Media Push URL is already in use, use another URL instead.
4698
+ * 0: Success.
4699
+ * < 0: Failure.
4700
+ * -2: The URL is null or the string length is 0.
4701
+ * -7: The SDK is not initialized before calling this method.
4702
+ * -19: The Media Push URL is already in use, use another URL instead.
4096
4703
  */
4097
4704
  abstract startRtmpStreamWithoutTranscoding(url: string): number;
4098
4705
  /**
4099
4706
  * Starts Media Push and sets the transcoding configuration.
4100
4707
  *
4101
- * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. Ensure that you enable the Media Push service before using this function. See Enable Media Push . Call this method after joining a channel. Only hosts in the LIVE_BROADCASTING profile can call this method. If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
4708
+ * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4709
+ * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
4710
+ * Call this method after joining a channel.
4711
+ * Only hosts in the LIVE_BROADCASTING profile can call this method.
4712
+ * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
4102
4713
  *
4103
4714
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
4104
4715
  * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
4105
4716
  *
4106
4717
  * @returns
4107
- * 0: Success. < 0: Failure. -2: The URL is null or the string length is 0. -7: The SDK is not initialized before calling this method. -19: The Media Push URL is already in use, use another URL instead.
4718
+ * 0: Success.
4719
+ * < 0: Failure.
4720
+ * -2: The URL is null or the string length is 0.
4721
+ * -7: The SDK is not initialized before calling this method.
4722
+ * -19: The Media Push URL is already in use, use another URL instead.
4108
4723
  */
4109
4724
  abstract startRtmpStreamWithTranscoding(url: string, transcoding: LiveTranscoding): number;
4110
4725
  /**
4111
4726
  * Updates the transcoding configuration.
4112
4727
  *
4113
- * Agora recommends that you use the server-side Media Push function. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated.
4728
+ * Agora recommends that you use the server-side Media Push function. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated.
4114
4729
  *
4115
4730
  * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
4116
4731
  *
4117
4732
  * @returns
4118
- * 0: Success. < 0: Failure.
4733
+ * 0: Success.
4734
+ * < 0: Failure.
4119
4735
  */
4120
4736
  abstract updateRtmpTranscoding(transcoding: LiveTranscoding): number;
4121
4737
  /**
4122
4738
  * Stops pushing media streams to a CDN.
4123
4739
  *
4124
- * Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4740
+ * Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
4125
4741
  *
4126
4742
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
4127
4743
  *
4128
4744
  * @returns
4129
- * 0: Success. < 0: Failure.
4745
+ * 0: Success.
4746
+ * < 0: Failure.
4130
4747
  */
4131
4748
  abstract stopRtmpStream(url: string): number;
4132
4749
  /**
4133
4750
  * Starts the local video mixing.
4134
4751
  *
4135
- * After calling this method, you can merge multiple video streams into one video stream locally. For example, you can merge the video streams captured by the camera, screen sharing, media player, remote video, video files, images, etc. into one video stream, and then publish the mixed video stream to the channel. Local video mixing requires more CPU resources. Therefore, Agora recommends enabling this function on devices with higher performance. If you need to mix locally captured video streams, the SDK supports the following capture combinations: On the Windows platform, it supports up to 4 video streams captured by cameras + 4 screen sharing streams. On the macOS platform, it supports up to 4 video streams captured by cameras + 1 screen sharing stream. If you need to mix the locally collected video streams, you need to call this method after startCameraCapture or startScreenCaptureBySourceType If you want to publish the mixed video stream to the channel, you need to set publishTranscodedVideoTrack in ChannelMediaOptions to true when calling joinChannel or updateChannelMediaOptions .
4752
+ * After calling this method, you can merge multiple video streams into one video stream locally. For example, you can merge the video streams captured by the camera, screen sharing, media player, remote video, video files, images, etc. into one video stream, and then publish the mixed video stream to the channel.
4753
+ * Local video mixing requires more CPU resources. Therefore, Agora recommends enabling this function on devices with higher performance.
4754
+ * If you need to mix locally captured video streams, the SDK supports the following capture combinations:
4755
+ * On the Windows platform, it supports up to 4 video streams captured by cameras + 4 screen sharing streams.
4756
+ * On the macOS platform, it supports up to 4 video streams captured by cameras + 1 screen sharing stream.
4757
+ * If you need to mix the locally collected video streams, you need to call this method after startCameraCapture or startScreenCaptureBySourceType
4758
+ * If you want to publish the mixed video stream to the channel, you need to set publishTranscodedVideoTrack in ChannelMediaOptions to true when calling joinChannel or updateChannelMediaOptions.
4136
4759
  *
4137
- * @param config Configuration of the local video mixing, see LocalTranscoderConfiguration.The maximum resolution of each video stream participating in the local video mixing is 4096 × 2160. If this limit is exceeded, video mixing does not take effect.The maximum resolution of the mixed video stream is 4096 × 2160.
4760
+ * @param config Configuration of the local video mixing, see LocalTranscoderConfiguration.
4761
+ * The maximum resolution of each video stream participating in the local video mixing is 4096 × 2160. If this limit is exceeded, video mixing does not take effect.
4762
+ * The maximum resolution of the mixed video stream is 4096 × 2160.
4138
4763
  *
4139
4764
  * @returns
4140
- * 0: Success. < 0: Failure.
4765
+ * 0: Success.
4766
+ * < 0: Failure.
4141
4767
  */
4142
4768
  abstract startLocalVideoTranscoder(config: LocalTranscoderConfiguration): number;
4143
4769
  /**
4144
4770
  * Updates the local video mixing configuration.
4145
4771
  *
4146
- * After calling startLocalVideoTranscoder , call this method if you want to update the local video mixing configuration. If you want to update the video source type used for local video mixing, such as adding a second camera or screen to capture video, you need to call this method after startCameraCapture or startScreenCaptureBySourceType
4772
+ * After calling startLocalVideoTranscoder, call this method if you want to update the local video mixing configuration. If you want to update the video source type used for local video mixing, such as adding a second camera or screen to capture video, you need to call this method after startCameraCapture or startScreenCaptureBySourceType
4147
4773
  *
4148
4774
  * @param config Configuration of the local video mixing, see LocalTranscoderConfiguration.
4149
4775
  *
4150
4776
  * @returns
4151
- * 0: Success. < 0: Failure.
4777
+ * 0: Success.
4778
+ * < 0: Failure.
4152
4779
  */
4153
4780
  abstract updateLocalTranscoderConfiguration(config: LocalTranscoderConfiguration): number;
4154
4781
  /**
4155
4782
  * Stops the local video mixing.
4156
4783
  *
4157
- * After calling startLocalVideoTranscoder , call this method if you want to stop the local video mixing.
4784
+ * After calling startLocalVideoTranscoder, call this method if you want to stop the local video mixing.
4158
4785
  */
4159
4786
  abstract stopLocalVideoTranscoder(): number;
4160
4787
  /**
4161
4788
  * Starts camera capture.
4162
4789
  *
4163
- * You can call this method to start capturing video from one or more cameras by specifying sourceType .
4790
+ * You can call this method to start capturing video from one or more cameras by specifying sourceType.
4164
4791
  *
4165
- * @param sourceType The type of the video source. See VideoSourceType.On the desktop platforms, you can capture video from up to 4 cameras.
4792
+ * @param sourceType The type of the video source. See VideoSourceType.
4793
+ * On the desktop platforms, you can capture video from up to 4 cameras.
4166
4794
  * @param config The configuration of the video capture. See CameraCapturerConfiguration.
4167
4795
  */
4168
4796
  abstract startCameraCapture(sourceType: VideoSourceType, config: CameraCapturerConfiguration): number;
@@ -4174,19 +4802,22 @@ export declare abstract class IRtcEngine {
4174
4802
  * @param sourceType The type of the video source. See VideoSourceType.
4175
4803
  *
4176
4804
  * @returns
4177
- * 0: Success. < 0: Failure.
4805
+ * 0: Success.
4806
+ * < 0: Failure.
4178
4807
  */
4179
4808
  abstract stopCameraCapture(sourceType: VideoSourceType): number;
4180
4809
  /**
4181
4810
  * Sets the rotation angle of the captured video.
4182
4811
  *
4183
- * This method applies to Windows only. This method must be called after the camera is turned on, such as calling after startPreview and enableVideo . When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video.
4812
+ * This method applies to Windows only.
4813
+ * When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video.
4184
4814
  *
4185
4815
  * @param type The video source type. See VideoSourceType.
4186
4816
  * @param orientation The clockwise rotation angle. See VideoOrientation.
4187
4817
  *
4188
4818
  * @returns
4189
- * 0: Success. < 0: Failure.
4819
+ * 0: Success.
4820
+ * < 0: Failure.
4190
4821
  */
4191
4822
  abstract setCameraDeviceOrientation(type: VideoSourceType, orientation: VideoOrientation): number;
4192
4823
  /**
@@ -4199,7 +4830,7 @@ export declare abstract class IRtcEngine {
4199
4830
  * You can call this method either before or after joining a channel.
4200
4831
  *
4201
4832
  * @returns
4202
- * The current connection state. See ConnectionStateType .
4833
+ * The current connection state. See ConnectionStateType.
4203
4834
  */
4204
4835
  abstract getConnectionState(): ConnectionStateType;
4205
4836
  /**
@@ -4232,23 +4863,34 @@ export declare abstract class IRtcEngine {
4232
4863
  /**
4233
4864
  * Sets the built-in encryption mode.
4234
4865
  *
4235
- * 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.
4866
+ * 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.
4236
4867
  *
4237
- * @param encryptionMode The following encryption modes:"aes-128-xts": 128-bit AES encryption, XTS mode."aes-128-ecb": 128-bit AES encryption, ECB mode."aes-256-xts": 256-bit AES encryption, XTS mode."sm4-128-ecb": 128-bit SM4 encryption, ECB mode."aes-128-gcm": 128-bit AES encryption, GCM mode."aes-256-gcm": 256-bit AES encryption, GCM mode."": When this parameter is set as null, the encryption mode is set as "aes-128-gcm" by default.
4868
+ * @param encryptionMode The following encryption modes:
4869
+ * " aes-128-xts ": 128-bit AES encryption, XTS mode.
4870
+ * " aes-128-ecb ": 128-bit AES encryption, ECB mode.
4871
+ * " aes-256-xts ": 256-bit AES encryption, XTS mode.
4872
+ * " sm4-128-ecb ": 128-bit SM4 encryption, ECB mode.
4873
+ * " aes-128-gcm ": 128-bit AES encryption, GCM mode.
4874
+ * " aes-256-gcm ": 256-bit AES encryption, GCM mode.
4875
+ * "": When this parameter is set as null, the encryption mode is set as " aes-128-gcm " by default.
4238
4876
  *
4239
4877
  * @returns
4240
- * 0: Success. < 0: Failure.
4878
+ * 0: Success.
4879
+ * < 0: Failure.
4241
4880
  */
4242
4881
  abstract setEncryptionMode(encryptionMode: string): number;
4243
4882
  /**
4244
4883
  * Enables built-in encryption with an encryption password before users join a channel.
4245
4884
  *
4246
- * 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. Do not use this method for Media Push. 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.
4885
+ * 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.
4886
+ * Do not use this method for Media Push.
4887
+ * 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.
4247
4888
  *
4248
4889
  * @param secret The encryption password.
4249
4890
  *
4250
4891
  * @returns
4251
- * 0: Success. < 0: Failure.
4892
+ * 0: Success.
4893
+ * < 0: Failure.
4252
4894
  */
4253
4895
  abstract setEncryptionSecret(secret: string): number;
4254
4896
  /**
@@ -4256,11 +4898,15 @@ export declare abstract class IRtcEngine {
4256
4898
  *
4257
4899
  * In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel. All users in the same channel must use the same encryption mode and encryption key. After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. If you enable the built-in encryption, you cannot use the Media Push function.
4258
4900
  *
4259
- * @param enabled Whether to enable built-in encryption:true: Enable the built-in encryption.false: Disable the built-in encryption.
4901
+ * @param enabled Whether to enable built-in encryption: true : Enable the built-in encryption. false : Disable the built-in encryption.
4260
4902
  * @param config Built-in encryption configurations. See EncryptionConfig.
4261
4903
  *
4262
4904
  * @returns
4263
- * 0: Success. < 0: Failure. -2: An invalid parameter is used. Set the parameter with a valid value. -4: The built-in encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library. -7: The SDK is not initialized. Initialize the IRtcEngine instance before calling this method.
4905
+ * 0: Success.
4906
+ * < 0: Failure.
4907
+ * -2: An invalid parameter is used. Set the parameter with a valid value.
4908
+ * -4: The built-in encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library.
4909
+ * -7: The SDK is not initialized. Initialize the IRtcEngine instance before calling this method.
4264
4910
  */
4265
4911
  abstract enableEncryption(enabled: boolean, config: EncryptionConfig): number;
4266
4912
  /**
@@ -4271,40 +4917,58 @@ export declare abstract class IRtcEngine {
4271
4917
  * @param config The configurations for the data stream. See DataStreamConfig.
4272
4918
  *
4273
4919
  * @returns
4274
- * ID of the created data stream, if the method call succeeds. < 0: Failure.
4920
+ * ID of the created data stream, if the method call succeeds.
4921
+ * < 0: Failure.
4275
4922
  */
4276
4923
  abstract createDataStream(config: DataStreamConfig): number;
4277
4924
  /**
4278
4925
  * Sends data stream messages.
4279
4926
  *
4280
- * Sends data stream messages to all users in a channel. The SDK has the following restrictions on this method: Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 KB. Each client can send up to 6 KB of data per second. Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message.
4281
- * A failed method call triggers the onStreamMessageError callback on the remote client. Ensure that you call createDataStream to create a data channel before calling this method. In live streaming scenarios, this method only applies to hosts.
4927
+ * Sends data stream messages to all users in a channel. The SDK has the following restrictions on this method:
4928
+ * Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.
4929
+ * Each client can send up to 6 KB of data per second.
4930
+ * Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message.
4931
+ * A failed method call triggers the onStreamMessageError callback on the remote client.
4932
+ * Ensure that you call createDataStream to create a data channel before calling this method.
4933
+ * In live streaming scenarios, this method only applies to hosts.
4282
4934
  *
4283
4935
  * @param streamId The data stream ID. You can get the data stream ID by calling createDataStream.
4284
4936
  * @param data The message to be sent.
4285
4937
  * @param length The length of the data.
4286
4938
  *
4287
4939
  * @returns
4288
- * 0: Success. < 0: Failure.
4940
+ * 0: Success.
4941
+ * < 0: Failure.
4289
4942
  */
4290
4943
  abstract sendStreamMessage(streamId: number, data: Uint8Array, length: number): number;
4291
4944
  /**
4292
4945
  * Adds a watermark image to the local video.
4293
4946
  *
4294
- * This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one. The watermark coordinates are dependent on the settings in the setVideoEncoderConfiguration method: If the orientation mode of the encoding video ( OrientationMode ) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation. If the orientation mode of the encoding video ( OrientationMode ) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation. When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfiguration method; otherwise, the watermark image will be cropped. Ensure that calling this method after enableVideo . If you only want to add a watermark to the media push, you can call this method or the method. This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray. If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings. If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview. If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
4947
+ * This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one. The watermark coordinates are dependent on the settings in the setVideoEncoderConfiguration method:
4948
+ * If the orientation mode of the encoding video (OrientationMode) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.
4949
+ * If the orientation mode of the encoding video (OrientationMode) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.
4950
+ * When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfiguration method; otherwise, the watermark image will be cropped.
4951
+ * Ensure that calling this method after enableVideo.
4952
+ * If you only want to add a watermark to the media push, you can call this method or the method.
4953
+ * This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray.
4954
+ * If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings.
4955
+ * If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview.
4956
+ * If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
4295
4957
  *
4296
4958
  * @param watermarkUrl The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path.
4297
4959
  * @param options The options of the watermark image to be added. See WatermarkOptions.
4298
4960
  *
4299
4961
  * @returns
4300
- * 0: Success. < 0: Failure.
4962
+ * 0: Success.
4963
+ * < 0: Failure.
4301
4964
  */
4302
4965
  abstract addVideoWatermark(watermarkUrl: string, options: WatermarkOptions): number;
4303
4966
  /**
4304
4967
  * Removes the watermark image from the video stream.
4305
4968
  *
4306
4969
  * @returns
4307
- * 0: Success. < 0: Failure.
4970
+ * 0: Success.
4971
+ * < 0: Failure.
4308
4972
  */
4309
4973
  abstract clearVideoWatermarks(): number;
4310
4974
  /**
@@ -4320,10 +4984,11 @@ export declare abstract class IRtcEngine {
4320
4984
  *
4321
4985
  * Deprecated: The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method. You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user. This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios.
4322
4986
  *
4323
- * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability.
4987
+ * @param enabled Whether to enable interoperability: true : Enable interoperability. false : (Default) Disable interoperability.
4324
4988
  *
4325
4989
  * @returns
4326
- * 0: Success. < 0: Failure.
4990
+ * 0: Success.
4991
+ * < 0: Failure.
4327
4992
  */
4328
4993
  abstract enableWebSdkInteroperability(enabled: boolean): number;
4329
4994
  /**
@@ -4336,13 +5001,14 @@ export declare abstract class IRtcEngine {
4336
5001
  * Registers the metadata observer.
4337
5002
  *
4338
5003
  * You need to implement the IMetadataObserver class and specify the metadata type in this method. This method enables you to add synchronized metadata in the video stream for more diversified
4339
- * live interactive streaming, such as sending shopping links, digital coupons, and online quizzes. Call this method before joinChannel .
5004
+ * live interactive streaming, such as sending shopping links, digital coupons, and online quizzes. Call this method before joinChannel.
4340
5005
  *
4341
5006
  * @param observer The metadata observer. See IMetadataObserver.
4342
5007
  * @param type The metadata type. The SDK currently only supports VideoMetadata. See MetadataType.
4343
5008
  *
4344
5009
  * @returns
4345
- * 0: Success. < 0: Failure.
5010
+ * 0: Success.
5011
+ * < 0: Failure.
4346
5012
  */
4347
5013
  abstract registerMediaMetadataObserver(observer: IMetadataObserver, type: MetadataType): number;
4348
5014
  /**
@@ -4352,7 +5018,8 @@ export declare abstract class IRtcEngine {
4352
5018
  * @param type The metadata type. The SDK currently only supports VideoMetadata. See MetadataType.
4353
5019
  *
4354
5020
  * @returns
4355
- * 0: Success. < 0: Failure.
5021
+ * 0: Success.
5022
+ * < 0: Failure.
4356
5023
  */
4357
5024
  abstract unregisterMediaMetadataObserver(observer: IMetadataObserver, type: MetadataType): number;
4358
5025
  /**
@@ -4366,58 +5033,104 @@ export declare abstract class IRtcEngine {
4366
5033
  /**
4367
5034
  * Sets whether to enable the AI ​​noise suppression function and set the noise suppression mode.
4368
5035
  *
4369
- * You can call this method to enable AI noise suppression function. Once enabled, the SDK automatically detects and reduces stationary and non-stationary noise from your audio on the premise of ensuring the quality of human voice. Stationary noise refers to noise signal with constant average statistical properties and negligibly small fluctuations of level within the period of observation. Common sources of stationary noises are: Television; Air conditioner; Machinery, etc. Non-stationary noise refers to noise signal with huge fluctuations of level within the period of observation. Common sources of non-stationary noises are: Thunder; Explosion; Cracking, etc.
5036
+ * You can call this method to enable AI noise suppression function. Once enabled, the SDK automatically detects and reduces stationary and non-stationary noise from your audio on the premise of ensuring the quality of human voice. Stationary noise refers to noise signal with constant average statistical properties and negligibly small fluctuations of level within the period of observation. Common sources of stationary noises are:
5037
+ * Television;
5038
+ * Air conditioner;
5039
+ * Machinery, etc. Non-stationary noise refers to noise signal with huge fluctuations of level within the period of observation. Common sources of non-stationary noises are:
5040
+ * Thunder;
5041
+ * Explosion;
5042
+ * Cracking, etc.
4370
5043
  *
4371
- * @param enabled Whether to enable the AI noise suppression function:true: Enable the AI noise suppression.false: (Default) Disable the AI noise suppression.
5044
+ * @param enabled Whether to enable the AI noise suppression function: true : Enable the AI noise suppression. false : (Default) Disable the AI noise suppression.
4372
5045
  * @param mode The AI noise suppression modes. See AudioAinsMode.
4373
5046
  *
4374
5047
  * @returns
4375
- * 0: Success. < 0: Failure.
5048
+ * 0: Success.
5049
+ * < 0: Failure.
4376
5050
  */
4377
5051
  abstract setAINSMode(enabled: boolean, mode: AudioAinsMode): number;
4378
5052
  /**
4379
5053
  * Registers a user account.
4380
5054
  *
4381
- * 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: Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel. 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 . Ensure that you set the userAccount parameter; otherwise, this method does not take effect. Ensure that the userAccount is unique in the channel. 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.
5055
+ * 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:
5056
+ * Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel.
5057
+ * 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.
5058
+ * Ensure that you set the userAccount parameter; otherwise, this method does not take effect.
5059
+ * Ensure that the userAccount is unique in the channel.
5060
+ * 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.
4382
5061
  *
4383
5062
  * @param appId The App ID of your project on Agora Console.
4384
- * @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 follow(89 in total):The 26 lowercase English letters: a to z.The 26 uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5063
+ * @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 follow(89 in total):
5064
+ * The 26 lowercase English letters: a to z.
5065
+ * The 26 uppercase English letters: A to Z.
5066
+ * All numeric characters: 0 to 9.
5067
+ * Space
5068
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
4385
5069
  *
4386
5070
  * @returns
4387
- * 0: Success. < 0: Failure.
5071
+ * 0: Success.
5072
+ * < 0: Failure.
4388
5073
  */
4389
5074
  abstract registerLocalUserAccount(appId: string, userAccount: string): number;
4390
5075
  /**
4391
5076
  * Joins the channel with a user account, and configures whether to automatically subscribe to audio or video streams after joining the channel.
4392
5077
  *
4393
- * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks: The local client: onLocalUserRegistered , onJoinChannelSuccess and onConnectionStateChanged callbacks. The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. 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.
5078
+ * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:
5079
+ * The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks.
5080
+ * The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. 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.
4394
5081
  *
4395
5082
  * @param token The token generated on your server for authentication.
4396
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
4397
- * @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 (89 in total):The 26 lowercase English letters: a to z.The 26 uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5083
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
5084
+ * All lowercase English letters: a to z.
5085
+ * All uppercase English letters: A to Z.
5086
+ * All numeric characters: 0 to 9.
5087
+ * Space
5088
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5089
+ * @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 (89 in total):
5090
+ * The 26 lowercase English letters: a to z.
5091
+ * The 26 uppercase English letters: A to Z.
5092
+ * All numeric characters: 0 to 9.
5093
+ * Space
5094
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
4398
5095
  * @param options The channel media options. See ChannelMediaOptions.
4399
5096
  *
4400
5097
  * @returns
4401
- * 0: Success. < 0: Failure. -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again. -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object. -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method. -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state. -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel. -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
5098
+ * 0: Success.
5099
+ * < 0: Failure.
5100
+ * -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
5101
+ * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
5102
+ * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
5103
+ * -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
5104
+ * -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
5105
+ * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
5106
+ * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
4402
5107
  */
4403
5108
  abstract joinChannelWithUserAccount(token: string, channelId: string, userAccount: string, options?: ChannelMediaOptions): number;
4404
5109
  /**
4405
5110
  * Joins the channel with a user account, and configures whether to automatically subscribe to audio or video streams after joining the channel.
4406
5111
  *
4407
- * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks: The local client: onLocalUserRegistered , onJoinChannelSuccess and onConnectionStateChanged callbacks. The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. 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.
5112
+ * This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:
5113
+ * The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks.
5114
+ * The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. 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.
4408
5115
  *
4409
5116
  * @param token The token generated on your server for authentication.
4410
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5117
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
5118
+ * All lowercase English letters: a to z.
5119
+ * All uppercase English letters: A to Z.
5120
+ * All numeric characters: 0 to 9.
5121
+ * Space
5122
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
4411
5123
  * @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 (89 in total):
4412
5124
  * The 26 lowercase English letters: a to z.
4413
5125
  * The 26 uppercase English letters: A to Z.
4414
5126
  * All numeric characters: 0 to 9.
4415
5127
  * Space
4416
- * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5128
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
4417
5129
  * @param options The channel media options. See ChannelMediaOptions.
4418
5130
  *
4419
5131
  * @returns
4420
- * 0: Success. < 0: Failure.
5132
+ * 0: Success.
5133
+ * < 0: Failure.
4421
5134
  */
4422
5135
  abstract joinChannelWithUserAccountEx(token: string, channelId: string, userAccount: string, options: ChannelMediaOptions): number;
4423
5136
  /**
@@ -4428,7 +5141,8 @@ export declare abstract class IRtcEngine {
4428
5141
  * @param userAccount The user account.
4429
5142
  *
4430
5143
  * @returns
4431
- * A pointer to the UserInfo instance, if the method call succeeds. If the call fails, returns NULL .
5144
+ * A pointer to the UserInfo instance, if the method call succeeds.
5145
+ * If the call fails, returns NULL.
4432
5146
  */
4433
5147
  abstract getUserInfoByUserAccount(userAccount: string): UserInfo;
4434
5148
  /**
@@ -4439,40 +5153,65 @@ export declare abstract class IRtcEngine {
4439
5153
  * @param uid The user ID.
4440
5154
  *
4441
5155
  * @returns
4442
- * A pointer to the UserInfo instance, if the method call succeeds. If the call fails, returns NULL .
5156
+ * A pointer to the UserInfo instance, if the method call succeeds.
5157
+ * If the call fails, returns NULL.
4443
5158
  */
4444
5159
  abstract getUserInfoByUid(uid: number): UserInfo;
4445
5160
  /**
4446
5161
  * Starts relaying media streams across channels or updates channels for media relay.
4447
5162
  *
4448
- * The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback, and this callback returns the state of the media stream relay. Common states are as follows: If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), it means that the SDK starts relaying media streams from the source channel to the destination channel. If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay. Call this method after joining the channel. This method takes effect only when you are a host in a live streaming channel. The relaying media streams across channels function needs to be enabled by contacting . Agora does not support string user accounts in this API.
5163
+ * The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels. This feature supports relaying media streams to a maximum of six destination channels. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback, and this callback returns the state of the media stream relay. Common states are as follows:
5164
+ * If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), it means that the SDK starts relaying media streams from the source channel to the destination channel.
5165
+ * If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.
5166
+ * Call this method after joining the channel.
5167
+ * This method takes effect only when you are a host in a live streaming channel.
5168
+ * The relaying media streams across channels function needs to be enabled by contacting.
5169
+ * Agora does not support string user accounts in this API.
4449
5170
  *
4450
5171
  * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
4451
5172
  *
4452
5173
  * @returns
4453
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host. -8: Internal state error. Probably because the user is not an audience member.
5174
+ * 0: Success.
5175
+ * < 0: Failure.
5176
+ * -1: A general error occurs (no specified reason).
5177
+ * -2: The parameter is invalid.
5178
+ * -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not a host.
5179
+ * -8: Internal state error. Probably because the user is not a broadcaster.
4454
5180
  */
4455
5181
  abstract startOrUpdateChannelMediaRelay(configuration: ChannelMediaRelayConfiguration): number;
4456
5182
  /**
4457
5183
  * Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
4458
5184
  *
4459
- * Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelay instead. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay. If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel. If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay. Call this method after joining the channel. This method takes effect only when you are a host in a live streaming channel. After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelay method to quit the current relay. The relaying media streams across channels function needs to be enabled by contacting . Agora does not support string user accounts in this API.
5185
+ * Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelay instead. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.
5186
+ * If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel.
5187
+ * If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.
5188
+ * Call this method after joining the channel.
5189
+ * This method takes effect only when you are a host in a live streaming channel.
5190
+ * After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelay method to quit the current relay.
5191
+ * The relaying media streams across channels function needs to be enabled by contacting.
5192
+ * Agora does not support string user accounts in this API.
4460
5193
  *
4461
5194
  * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
4462
5195
  *
4463
5196
  * @returns
4464
- * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host. -8: Internal state error. Probably because the user is not an audience member.
5197
+ * 0: Success.
5198
+ * < 0: Failure.
5199
+ * -1: A general error occurs (no specified reason).
5200
+ * -2: The parameter is invalid.
5201
+ * -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not a host.
5202
+ * -8: Internal state error. Probably because the user is not a broadcaster.
4465
5203
  */
4466
5204
  abstract startChannelMediaRelay(configuration: ChannelMediaRelayConfiguration): number;
4467
5205
  /**
4468
5206
  * Updates the channels for media stream relay.
4469
5207
  *
4470
- * Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelay instead. After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method. After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code. Call the method after successfully calling the startChannelMediaRelay method and receiving onChannelMediaRelayStateChanged ( RelayStateRunning , RelayOk ) ; otherwise, the method call fails.
5208
+ * Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelay instead. After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method. After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code. Call the method after successfully calling the startChannelMediaRelay method and receiving onChannelMediaRelayStateChanged (RelayStateRunning, RelayOk); otherwise, the method call fails.
4471
5209
  *
4472
5210
  * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
4473
5211
  *
4474
5212
  * @returns
4475
- * 0: Success. < 0: Failure.
5213
+ * 0: Success.
5214
+ * < 0: Failure.
4476
5215
  */
4477
5216
  abstract updateChannelMediaRelay(configuration: ChannelMediaRelayConfiguration): number;
4478
5217
  /**
@@ -4481,25 +5220,28 @@ export declare abstract class IRtcEngine {
4481
5220
  * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports RelayStateIdle (0) and RelayOk (0), the host successfully stops the relay. If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the RelayErrorServerNoResponse (2) or RelayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops.
4482
5221
  *
4483
5222
  * @returns
4484
- * 0: Success. < 0: Failure.
5223
+ * 0: Success.
5224
+ * < 0: Failure.
4485
5225
  */
4486
5226
  abstract stopChannelMediaRelay(): number;
4487
5227
  /**
4488
5228
  * Pauses the media stream relay to all target channels.
4489
5229
  *
4490
- * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay . Call this method after startOrUpdateChannelMediaRelay .
5230
+ * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay. Call this method after startOrUpdateChannelMediaRelay.
4491
5231
  *
4492
5232
  * @returns
4493
- * 0: Success. < 0: Failure.
5233
+ * 0: Success.
5234
+ * < 0: Failure.
4494
5235
  */
4495
5236
  abstract pauseAllChannelMediaRelay(): number;
4496
5237
  /**
4497
5238
  * Resumes the media stream relay to all target channels.
4498
5239
  *
4499
- * After calling the pauseAllChannelMediaRelay method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelay .
5240
+ * After calling the pauseAllChannelMediaRelay method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelay.
4500
5241
  *
4501
5242
  * @returns
4502
- * 0: Success. < 0: Failure.
5243
+ * 0: Success.
5244
+ * < 0: Failure.
4503
5245
  */
4504
5246
  abstract resumeAllChannelMediaRelay(): number;
4505
5247
  /**
@@ -4516,30 +5258,33 @@ export declare abstract class IRtcEngine {
4516
5258
  *
4517
5259
  * This method only affects video streams captured by cameras or screens, or from custom video capture sources. That is, when you set publishCameraTrack or publishCustomVideoTrack in DirectCdnStreamingMediaOptions as true to capture videos, you can call this method to set the video profiles. If your local camera does not support the video resolution you set,the SDK automatically adjusts the video resolution to a value that is closest to your settings for capture, encoding or streaming, with the same aspect ratio as the resolution you set. You can get the actual resolution of the video streams through the onDirectCdnStreamingStats callback.
4518
5260
  *
4519
- * @param config Video profile. See VideoEncoderConfiguration.During CDN live streaming, Agora only supports setting OrientationMode as OrientationFixedLandscape or OrientationFixedPortrait.
5261
+ * @param config Video profile. See VideoEncoderConfiguration. During CDN live streaming, Agora only supports setting OrientationMode as OrientationFixedLandscape or OrientationFixedPortrait.
4520
5262
  *
4521
5263
  * @returns
4522
- * 0: Success. < 0: Failure.
5264
+ * 0: Success.
5265
+ * < 0: Failure.
4523
5266
  */
4524
5267
  abstract setDirectCdnStreamingVideoConfiguration(config: VideoEncoderConfiguration): number;
4525
5268
  /**
4526
5269
  * Starts pushing media streams to the CDN directly.
4527
5270
  *
4528
- * 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.
5271
+ * 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.
4529
5272
  *
4530
5273
  * @param eventHandler See onDirectCdnStreamingStateChanged and onDirectCdnStreamingStats.
4531
5274
  * @param publishUrl The CDN live streaming URL.
4532
5275
  * @param options The media setting options for the host. See DirectCdnStreamingMediaOptions.
4533
5276
  *
4534
5277
  * @returns
4535
- * 0: Success. < 0: Failure.
5278
+ * 0: Success.
5279
+ * < 0: Failure.
4536
5280
  */
4537
5281
  abstract startDirectCdnStreaming(eventHandler: IDirectCdnStreamingEventHandler, publishUrl: string, options: DirectCdnStreamingMediaOptions): number;
4538
5282
  /**
4539
5283
  * Stops pushing media streams to the CDN directly.
4540
5284
  *
4541
5285
  * @returns
4542
- * 0: Success. < 0: Failure.
5286
+ * 0: Success.
5287
+ * < 0: Failure.
4543
5288
  */
4544
5289
  abstract stopDirectCdnStreaming(): number;
4545
5290
  /**
@@ -4561,25 +5306,33 @@ export declare abstract class IRtcEngine {
4561
5306
  /**
4562
5307
  * Takes a snapshot of a video stream.
4563
5308
  *
4564
- * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot. Call this method after joining a channel. This method takes a snapshot of the published video stream specified in ChannelMediaOptions . If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
5309
+ * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.
5310
+ * Call this method after joining a channel.
5311
+ * This method takes a snapshot of the published video stream specified in ChannelMediaOptions.
5312
+ * If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
4565
5313
  *
4566
5314
  * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
4567
- * @param filePath The local path (including filename extensions) of the snapshot. For example:Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpgmacOS: ~/Library/Logs/example.jpgEnsure that the path you specify exists and is writable.
5315
+ * @param filePath The local path (including filename extensions) of the snapshot. For example:
5316
+ * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
5317
+ * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
4568
5318
  *
4569
5319
  * @returns
4570
- * 0: Success. < 0: Failure.
5320
+ * 0: Success.
5321
+ * < 0: Failure.
4571
5322
  */
4572
5323
  abstract takeSnapshot(uid: number, filePath: string): number;
4573
5324
  /**
4574
5325
  * Enables or disables video screenshot and upload.
4575
5326
  *
4576
- * When video screenshot and upload function is enabled, the SDK takes screenshots and upload videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig . After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. Before calling this method, ensure that the video screenshot upload service has been activated. This method relies on the video screenshot and upload dynamic library libagora_content_inspect_extension.dll . If the dynamic library is deleted, the function cannot be enabled normally.
5327
+ * When video screenshot and upload function is enabled, the SDK takes screenshots and upload videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. Before calling this method, ensure that the video screenshot upload service has been activated. Before calling this method, ensure that Video content moderation service has been activated.
5328
+ * This method relies on the video screenshot and upload dynamic library libagora_content_inspect_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
4577
5329
  *
4578
- * @param enabled Whether to enable video screenshot and uploadtrue: Enables video screenshot and upload. false: Disables video screenshot and upload.
5330
+ * @param enabled Whether to enable video screenshot and upload true : Enables video screenshot and upload. false : Disables video screenshot and upload.
4579
5331
  * @param config Configuration of video screenshot and upload. See ContentInspectConfig.
4580
5332
  *
4581
5333
  * @returns
4582
- * 0: Success. < 0: Failure.
5334
+ * 0: Success.
5335
+ * < 0: Failure.
4583
5336
  */
4584
5337
  abstract enableContentInspect(enabled: boolean, config: ContentInspectConfig): number;
4585
5338
  /**
@@ -4591,7 +5344,8 @@ export declare abstract class IRtcEngine {
4591
5344
  * @param volume The volume of the audio source. The value can range from 0 to 100. 0 means mute; 100 means the original volume.
4592
5345
  *
4593
5346
  * @returns
4594
- * 0: Success. < 0: Failure.
5347
+ * 0: Success.
5348
+ * < 0: Failure.
4595
5349
  */
4596
5350
  abstract adjustCustomAudioPublishVolume(trackId: number, volume: number): number;
4597
5351
  /**
@@ -4601,12 +5355,18 @@ export declare abstract class IRtcEngine {
4601
5355
  /**
4602
5356
  * Sets up cloud proxy service.
4603
5357
  *
4604
- * When users' network access is restricted by a firewall, configure the firewall to allow specific IP addresses and ports provided by Agora; then, call this method to enable the cloud proxyType and set the cloud proxy type with the proxyType parameter. After successfully connecting to the cloud proxy, the SDK triggers the onConnectionStateChanged ( ConnectionStateConnecting , ConnectionChangedSettingProxyServer ) callback. To disable the cloud proxy that has been set, call the setCloudProxy ( NoneProxy ) . To change the cloud proxy type that has been set, call the setCloudProxy ( NoneProxy ) first, and then call the setCloudProxy to set the proxyType you want. Agora recommends that you call this method after joining a channel. When a user is behind a firewall and uses the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available. When you use the Force TCP cloud proxy, note that an error would occur when calling the startAudioMixing method to play online music files in the HTTP protocol. The services for Media Push and cohosting across channels use the cloud proxy with the TCP protocol.
5358
+ * When users' network access is restricted by a firewall, configure the firewall to allow specific IP addresses and ports provided by Agora; then, call this method to enable the cloud proxyType and set the cloud proxy type with the proxyType parameter. After successfully connecting to the cloud proxy, the SDK triggers the onConnectionStateChanged (ConnectionStateConnecting, ConnectionChangedSettingProxyServer) callback. To disable the cloud proxy that has been set, call the setCloudProxy (NoneProxy). To change the cloud proxy type that has been set, call the setCloudProxy (NoneProxy) first, and then call the setCloudProxy to set the proxyType you want.
5359
+ * Agora recommends that you call this method after joining a channel.
5360
+ * When a user is behind a firewall and uses the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available.
5361
+ * When you use the Force TCP cloud proxy, note that an error would occur when calling the startAudioMixing method to play online music files in the HTTP protocol. The services for Media Push and cohosting across channels use the cloud proxy with the TCP protocol.
4605
5362
  *
4606
- * @param proxyType The type of the cloud proxy. See CloudProxyType.This parameter is mandatory. The SDK reports an error if you do not pass in a value.
5363
+ * @param proxyType The type of the cloud proxy. See CloudProxyType. This parameter is mandatory. The SDK reports an error if you do not pass in a value.
4607
5364
  *
4608
5365
  * @returns
4609
- * 0: Success. < 0: Failure. -2: The parameter is invalid. -7: The SDK is not initialized.
5366
+ * 0: Success.
5367
+ * < 0: Failure.
5368
+ * -2: The parameter is invalid.
5369
+ * -7: The SDK is not initialized.
4610
5370
  */
4611
5371
  abstract setCloudProxy(proxyType: CloudProxyType): number;
4612
5372
  /**
@@ -4616,12 +5376,13 @@ export declare abstract class IRtcEngine {
4616
5376
  /**
4617
5377
  * Sets audio advanced options.
4618
5378
  *
4619
- * If you have advanced audio processing requirements, such as capturing and sending stereo audio, you can call this method to set advanced audio options. Call this method after calling joinChannel , enableAudio and enableLocalAudio .
5379
+ * If you have advanced audio processing requirements, such as capturing and sending stereo audio, you can call this method to set advanced audio options. Call this method after calling joinChannel, enableAudio and enableLocalAudio.
4620
5380
  *
4621
5381
  * @param options The advanced options for audio. See AdvancedAudioOptions.
4622
5382
  *
4623
5383
  * @returns
4624
- * 0: Success. < 0: Failure.
5384
+ * 0: Success.
5385
+ * < 0: Failure.
4625
5386
  */
4626
5387
  abstract setAdvancedAudioOptions(options: AdvancedAudioOptions, sourceType?: number): number;
4627
5388
  /**
@@ -4633,20 +5394,22 @@ export declare abstract class IRtcEngine {
4633
5394
  *
4634
5395
  * Agora recommends that you call this method after joining a channel. When publishing video streams, you can call this method to replace the current video feeds with custom images. Once you enable this function, you can select images to replace the video feeds through the ImageTrackOptions parameter. If you disable this function, the remote users see the video feeds that you publish.
4635
5396
  *
4636
- * @param enable Whether to replace the current video feeds with custom images:true: Replace the current video feeds with custom images.false: (Default) Do not replace the current video feeds with custom images.
5397
+ * @param enable Whether to replace the current video feeds with custom images: true : Replace the current video feeds with custom images. false : (Default) Do not replace the current video feeds with custom images.
4637
5398
  * @param options Image configurations. See ImageTrackOptions.
4638
5399
  *
4639
5400
  * @returns
4640
- * 0: Success. < 0: Failure.
5401
+ * 0: Success.
5402
+ * < 0: Failure.
4641
5403
  */
4642
5404
  abstract enableVideoImageSource(enable: boolean, options: ImageTrackOptions): number;
4643
5405
  /**
4644
5406
  * Gets the current Monotonic Time of the SDK.
4645
5407
  *
4646
- * Monotonic Time refers to a monotonically increasing time series whose value increases over time. The unit is milliseconds. In custom video capture and custom audio capture scenarios, in order to ensure audio and video synchronization, Agora recommends that you call this method to obtain the current Monotonic Time of the SDK, and then pass this value into the timestamp parameter in the captured video frame ( VideoFrame ) and audio frame ( AudioFrame ).
5408
+ * Monotonic Time refers to a monotonically increasing time series whose value increases over time. The unit is milliseconds. In custom video capture and custom audio capture scenarios, in order to ensure audio and video synchronization, Agora recommends that you call this method to obtain the current Monotonic Time of the SDK, and then pass this value into the timestamp parameter in the captured video frame (VideoFrame) and audio frame (AudioFrame).
4647
5409
  *
4648
5410
  * @returns
4649
- * ≥0: The method call is successful, and returns the current Monotonic Time of the SDK (in milliseconds). < 0: Failure.
5411
+ * ≥0: The method call is successful, and returns the current Monotonic Time of the SDK (in milliseconds).
5412
+ * < 0: Failure.
4650
5413
  */
4651
5414
  abstract getCurrentMonotonicTimeInMs(): number;
4652
5415
  /**
@@ -4659,34 +5422,52 @@ export declare abstract class IRtcEngine {
4659
5422
  * You can use this method to get the type of network in use at any stage. You can call this method either before or after joining a channel.
4660
5423
  *
4661
5424
  * @returns
4662
- * ≥ 0: The method call is successful, and the local network connection type is returned. 0: The SDK disconnects from the network. 1: The network type is LAN. 2: The network type is Wi-Fi (including hotspots). 3: The network type is mobile 2G. 4: The network type is mobile 3G. 5: The network type is mobile 4G. 6: The network type is mobile 5G. < 0: The method call failed with an error code. -1: The network type is unknown.
5425
+ * ≥ 0: The method call is successful, and the local network connection type is returned.
5426
+ * 0: The SDK disconnects from the network.
5427
+ * 1: The network type is LAN.
5428
+ * 2: The network type is Wi-Fi (including hotspots).
5429
+ * 3: The network type is mobile 2G.
5430
+ * 4: The network type is mobile 3G.
5431
+ * 5: The network type is mobile 4G.
5432
+ * 6: The network type is mobile 5G.
5433
+ * < 0: The method call failed with an error code.
5434
+ * -1: The network type is unknown.
4663
5435
  */
4664
- abstract getNetworkType(): NetworkType;
5436
+ abstract getNetworkType(): number;
4665
5437
  /**
4666
5438
  * Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.
4667
5439
  *
4668
5440
  * @param parameters Pointer to the set parameters in a JSON string.
4669
5441
  *
4670
5442
  * @returns
4671
- * 0: Success. < 0: Failure.
5443
+ * 0: Success.
5444
+ * < 0: Failure.
4672
5445
  */
4673
5446
  abstract setParameters(parameters: string): number;
4674
5447
  /**
4675
5448
  * Enables tracing the video frame rendering process.
4676
5449
  *
4677
- * The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the onVideoRenderingTracingResult callback. By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process. After the local user leaves the current channel, the SDK automatically resets the time point to the next time when the user successfully joins the channel.
5450
+ * The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the onVideoRenderingTracingResult callback.
5451
+ * By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process.
5452
+ * After the local user leaves the current channel, the SDK automatically resets the time point to the next time when the user successfully joins the channel.
4678
5453
  *
4679
5454
  * @returns
4680
- * 0: Success. < 0: Failure. -7: The method is called before IRtcEngine is initialized.
5455
+ * 0: Success.
5456
+ * < 0: Failure.
5457
+ * -7: The method is called before IRtcEngine is initialized.
4681
5458
  */
4682
5459
  abstract startMediaRenderingTracing(): number;
4683
5460
  /**
4684
5461
  * Enables audio and video frame instant rendering.
4685
5462
  *
4686
- * After successfully calling this method, the SDK enables the instant frame rendering mode, which can speed up the first frame rendering speed after the user joins the channel. Once the instant rendering function is enabled, it can only be canceled by calling the release method to destroy the IRtcEngine object. In this mode, the SDK uses Agora's custom encryption algorithm to shorten the time required to establish transmission links, and the security is reduced compared to the standard DTLS (Datagram Transport Layer Security). If the application scenario requires higher security standards, Agora recommends that you do not use this method.
5463
+ * After successfully calling this method, the SDK enables the instant frame rendering mode, which can speed up the first frame rendering speed after the user joins the channel.
5464
+ * Once the instant rendering function is enabled, it can only be canceled by calling the release method to destroy the IRtcEngine object.
5465
+ * In this mode, the SDK uses Agora's custom encryption algorithm to shorten the time required to establish transmission links, and the security is reduced compared to the standard DTLS (Datagram Transport Layer Security). If the application scenario requires higher security standards, Agora recommends that you do not use this method.
4687
5466
  *
4688
5467
  * @returns
4689
- * 0: Success. < 0: Failure. -7: The method is called before IRtcEngine is initialized.
5468
+ * 0: Success.
5469
+ * < 0: Failure.
5470
+ * -7: The method is called before IRtcEngine is initialized.
4690
5471
  */
4691
5472
  abstract enableInstantMediaRendering(): number;
4692
5473
  /**
@@ -4746,18 +5527,20 @@ export declare abstract class IRtcEngine {
4746
5527
  * @param sourceType The type of the video source. See VideoSourceType.
4747
5528
  *
4748
5529
  * @returns
4749
- * 0: Success. < 0: Failure.
5530
+ * 0: Success.
5531
+ * < 0: Failure.
4750
5532
  */
4751
5533
  abstract sendMetaData(metadata: Metadata, sourceType: VideoSourceType): number;
4752
5534
  /**
4753
5535
  * Sets the maximum size of the media metadata.
4754
5536
  *
4755
- * After calling registerMediaMetadataObserver , you can call this method to set the maximum size of the media metadata.
5537
+ * After calling registerMediaMetadataObserver, you can call this method to set the maximum size of the media metadata.
4756
5538
  *
4757
5539
  * @param size The maximum size of media metadata.
4758
5540
  *
4759
5541
  * @returns
4760
- * 0: Success. < 0: Failure.
5542
+ * 0: Success.
5543
+ * < 0: Failure.
4761
5544
  */
4762
5545
  abstract setMaxMetadataSize(size: number): number;
4763
5546
  /**
@@ -4770,7 +5553,12 @@ export declare abstract class IRtcEngine {
4770
5553
  * Destroys multiple video renderer objects at one time.
4771
5554
  *
4772
5555
  * @param sourceType The type of the video source. See VideoSourceType.
4773
- * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
5556
+ * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
5557
+ * All lowercase English letters: a to z.
5558
+ * All uppercase English letters: A to Z.
5559
+ * All numeric characters: 0 to 9.
5560
+ * Space
5561
+ * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
4774
5562
  * @param uid The user ID of the remote user.
4775
5563
  */
4776
5564
  abstract destroyRendererByConfig(sourceType: VideoSourceType, channelId?: string, uid?: number): void;
@@ -4780,7 +5568,8 @@ export declare abstract class IRtcEngine {
4780
5568
  * @param observer The encoded audio observer. See IAudioEncodedFrameObserver.
4781
5569
  *
4782
5570
  * @returns
4783
- * 0: Success. < 0: Failure.
5571
+ * 0: Success.
5572
+ * < 0: Failure.
4784
5573
  */
4785
5574
  abstract unregisterAudioEncodedFrameObserver(observer: IAudioEncodedFrameObserver): number;
4786
5575
  /**
@@ -4892,15 +5681,15 @@ export declare enum VideoProfileType {
4892
5681
  */
4893
5682
  VideoProfileLandscape360p8 = 37,
4894
5683
  /**
4895
- * 38: 640 × 360, frame rate 15 fps, bitrate 800 Kbps.This profile applies only to the live streaming channel profile.
5684
+ * 38: 640 × 360, frame rate 15 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
4896
5685
  */
4897
5686
  VideoProfileLandscape360p9 = 38,
4898
5687
  /**
4899
- * 39: 640 × 360, frame rate 24 fps, bitrate 800 Kbps.This profile applies only to the live streaming channel profile.
5688
+ * 39: 640 × 360, frame rate 24 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
4900
5689
  */
4901
5690
  VideoProfileLandscape360p10 = 39,
4902
5691
  /**
4903
- * 100: 640 × 360, frame rate 24 fps, bitrate 1000 Kbps.This profile applies only to the live streaming channel profile.
5692
+ * 100: 640 × 360, frame rate 24 fps, bitrate 1000 Kbps. This profile applies only to the live streaming channel profile.
4904
5693
  */
4905
5694
  VideoProfileLandscape360p11 = 100,
4906
5695
  /**
@@ -5032,15 +5821,15 @@ export declare enum VideoProfileType {
5032
5821
  */
5033
5822
  VideoProfilePortrait360p8 = 1037,
5034
5823
  /**
5035
- * 1038: 360 × 640, frame rate 15 fps, bitrate 800 Kbps.This profile applies only to the live streaming channel profile.
5824
+ * 1038: 360 × 640, frame rate 15 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
5036
5825
  */
5037
5826
  VideoProfilePortrait360p9 = 1038,
5038
5827
  /**
5039
- * 1039: 360 × 640, frame rate 24 fps, bitrate 800 Kbps.This profile applies only to the live streaming channel profile.
5828
+ * 1039: 360 × 640, frame rate 24 fps, bitrate 800 Kbps. This profile applies only to the live streaming channel profile.
5040
5829
  */
5041
5830
  VideoProfilePortrait360p10 = 1039,
5042
5831
  /**
5043
- * 1100: 360 × 640, frame rate 24 fps, bitrate 1000 Kbps.This profile applies only to the live streaming channel profile.
5832
+ * 1100: 360 × 640, frame rate 24 fps, bitrate 1000 Kbps. This profile applies only to the live streaming channel profile.
5044
5833
  */
5045
5834
  VideoProfilePortrait360p11 = 1100,
5046
5835
  /**