agora-electron-sdk 4.3.1 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/js/Private/AgoraBase.js +22 -13
  3. package/js/Private/IAgoraMusicContentCenter.js +19 -1
  4. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +32 -2
  5. package/js/Private/impl/IAgoraRtcEngineImpl.js +2 -2
  6. package/js/Private/internal/MusicContentCenterInternal.js +3 -0
  7. package/js/Private/internal/RtcEngineExInternal.js +5 -0
  8. package/js/Renderer/IRenderer.js +9 -0
  9. package/js/Renderer/WebGLRenderer/index.js +1 -0
  10. package/js/Renderer/YUVCanvasRenderer/index.js +1 -0
  11. package/package.json +5 -5
  12. package/ts/Private/AgoraBase.ts +40 -35
  13. package/ts/Private/AgoraMediaBase.ts +8 -6
  14. package/ts/Private/IAgoraMusicContentCenter.ts +28 -0
  15. package/ts/Private/IAgoraRtcEngine.ts +85 -133
  16. package/ts/Private/IAgoraRtcEngineEx.ts +5 -2
  17. package/ts/Private/IAgoraSpatialAudio.ts +2 -2
  18. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +39 -2
  19. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +2 -2
  20. package/ts/Private/internal/MusicContentCenterInternal.ts +5 -0
  21. package/ts/Private/internal/RtcEngineExInternal.ts +9 -0
  22. package/ts/Renderer/IRenderer.ts +8 -1
  23. package/ts/Renderer/WebGLRenderer/index.ts +1 -0
  24. package/ts/Renderer/YUVCanvasRenderer/index.ts +1 -0
  25. package/types/Private/AgoraBase.d.ts +40 -35
  26. package/types/Private/AgoraBase.d.ts.map +1 -1
  27. package/types/Private/AgoraMediaBase.d.ts +8 -6
  28. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  29. package/types/Private/IAgoraMusicContentCenter.d.ts +25 -0
  30. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  31. package/types/Private/IAgoraRtcEngine.d.ts +85 -133
  32. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  33. package/types/Private/IAgoraRtcEngineEx.d.ts +5 -2
  34. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  35. package/types/Private/IAgoraSpatialAudio.d.ts +2 -2
  36. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +5 -1
  37. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -1
  38. package/types/Private/internal/MusicContentCenterInternal.d.ts +2 -1
  39. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
  40. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
  41. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  42. package/types/Renderer/IRenderer.d.ts +1 -1
  43. package/types/Renderer/IRenderer.d.ts.map +1 -1
  44. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
  45. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -1
@@ -1221,9 +1221,7 @@ export interface IRtcEngineEventHandler {
1221
1221
  */
1222
1222
  onLeaveChannel?(connection: RtcConnection, stats: RtcStats): void;
1223
1223
  /**
1224
- * Reports the statistics of the current call.
1225
- *
1226
- * The SDK triggers this callback once every two seconds after the user joins the channel.
1224
+ * Reports the statistics about the current call.
1227
1225
  *
1228
1226
  * @param connection The connection information. See RtcConnection.
1229
1227
  * @param stats Statistics of the RTC engine. See RtcStats.
@@ -1318,19 +1316,19 @@ export interface IRtcEngineEventHandler {
1318
1316
  * @param source The type of the video source. See VideoSourceType.
1319
1317
  * @param width The width (px) of the first local video frame.
1320
1318
  * @param height The height (px) of the first local video frame.
1321
- * @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback. If you call startPreview before calling joinChannel, then this parameter is the time elapsed from calling the startPreview method until the SDK triggers this callback.
1319
+ * @param elapsed The time elapsed (ms) from the local user calling joinChannel to join the channel to when the SDK triggers this callback. If startPreviewWithoutSourceType / startPreview is called before joining the channel, this parameter indicates the time elapsed from calling startPreviewWithoutSourceType or startPreview to when this event occurred.
1322
1320
  */
1323
1321
  onFirstLocalVideoFrame?(source: VideoSourceType, width: number, height: number, elapsed: number): void;
1324
1322
  /**
1325
1323
  * Occurs when the first video frame is published.
1326
1324
  *
1327
1325
  * The SDK triggers this callback under one of the following circumstances:
1328
- * The local client enables the video module and calls joinChannel successfully.
1326
+ * The local client enables the video module and calls joinChannel to join the channel successfully.
1329
1327
  * The local client calls muteLocalVideoStream (true) and muteLocalVideoStream (false) in sequence.
1330
1328
  * The local client calls disableVideo and enableVideo in sequence.
1331
1329
  *
1332
1330
  * @param connection The connection information. See RtcConnection.
1333
- * @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
1331
+ * @param elapsed Time elapsed (ms) from the local user calling joinChannel until this callback is triggered.
1334
1332
  */
1335
1333
  onFirstLocalVideoFramePublished?(source: VideoSourceType, elapsed: number): void;
1336
1334
  /**
@@ -1591,9 +1589,11 @@ export interface IRtcEngineEventHandler {
1591
1589
  /**
1592
1590
  * Occurs when the token expires.
1593
1591
  *
1594
- * 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:
1592
+ * The SDK triggers this callback if the token expires. 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:
1593
+ * In scenarios involving one channel:
1595
1594
  * Call renewToken to pass in the new token.
1596
1595
  * Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel.
1596
+ * In scenarios involving mutiple channels: Call updateChannelMediaOptionsEx to pass in the new token.
1597
1597
  *
1598
1598
  * @param connection The connection information. See RtcConnection.
1599
1599
  */
@@ -1601,10 +1601,14 @@ export interface IRtcEngineEventHandler {
1601
1601
  /**
1602
1602
  * Occurs when the token expires in 30 seconds.
1603
1603
  *
1604
- * 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.
1604
+ * 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:
1605
+ * In scenarios involving one channel:
1606
+ * Call renewToken to pass in the new token.
1607
+ * Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel.
1608
+ * In scenarios involving mutiple channels: Call updateChannelMediaOptionsEx to pass in the new token.
1605
1609
  *
1606
1610
  * @param connection The connection information. See RtcConnection.
1607
- * @param token The token that expires in 30 seconds.
1611
+ * @param token The token that is about to expire.
1608
1612
  */
1609
1613
  onTokenPrivilegeWillExpire?(connection: RtcConnection, token: string): void;
1610
1614
  /**
@@ -2388,7 +2392,7 @@ export declare abstract class IRtcEngine {
2388
2392
  */
2389
2393
  abstract getErrorDescription(code: number): string;
2390
2394
  /**
2391
- * Queries the current device's supported video codec capabilities.
2395
+ * Queries the video codec capabilities of the SDK.
2392
2396
  *
2393
2397
  * @returns
2394
2398
  * 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.
@@ -2409,11 +2413,7 @@ export declare abstract class IRtcEngine {
2409
2413
  /**
2410
2414
  * Preloads a channel with token, channelId, and uid.
2411
2415
  *
2412
- * 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.
2413
- * 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.
2414
- * 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.
2415
- * One IRtcEngine instance supports preloading 20 channels at most. When exceeding this limit, the latest 20 preloaded channels take effect.
2416
- * 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.
2416
+ * 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. 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. 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.
2417
2417
  *
2418
2418
  * @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.
2419
2419
  * When preloading one channel, calling this method to pass in the new token.
@@ -2426,7 +2426,7 @@ export declare abstract class IRtcEngine {
2426
2426
  * All numeric characters: 0 to 9.
2427
2427
  * Space
2428
2428
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2429
- * @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.
2429
+ * @param uid The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2 32 -1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and onJoinChannelSuccess returns it in the callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2430
2430
  *
2431
2431
  * @returns
2432
2432
  * 0: Success.
@@ -2470,7 +2470,7 @@ export declare abstract class IRtcEngine {
2470
2470
  * All numeric characters: 0 to 9.
2471
2471
  * Space
2472
2472
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2473
- * @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 app must record and maintain the returned user ID, because the SDK does not do so.
2473
+ * @param uid The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2 32 -1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and onJoinChannelSuccess returns it in the callback. Your application must record and maintain the returned user ID, because the SDK does not do so.
2474
2474
  * @param options The channel media options. See ChannelMediaOptions.
2475
2475
  *
2476
2476
  * @returns
@@ -2514,15 +2514,18 @@ export declare abstract class IRtcEngine {
2514
2514
  /**
2515
2515
  * Renews the token.
2516
2516
  *
2517
- * The SDK triggers the onTokenPrivilegeWillExpire callback. onConnectionStateChanged The ConnectionChangedTokenExpired callback reports (9).
2517
+ * You can call this method to pass a new token to the SDK. A token will expire after a certain period of time, at which point the SDK will be unable to establish a connection with the server.
2518
2518
  *
2519
2519
  * @param token The new token.
2520
2520
  *
2521
2521
  * @returns
2522
2522
  * 0: Success.
2523
2523
  * < 0: Failure.
2524
- * -2: The parameter is invalid. For example, the token is invalid. You need to fill in a valid parameter.
2524
+ * -2: The parameter is invalid. For example, the token is empty.
2525
2525
  * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
2526
+ * 110: Invalid token. Ensure the following:
2527
+ * The user ID specified when generating the token is consistent with the user ID used when joining the channel.
2528
+ * The generated token is the same as the token passed in to join the channel.
2526
2529
  */
2527
2530
  abstract renewToken(token: string): number;
2528
2531
  /**
@@ -2603,9 +2606,7 @@ export declare abstract class IRtcEngine {
2603
2606
  /**
2604
2607
  * Disables the video module.
2605
2608
  *
2606
- * 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.
2607
- * This method affects the internal engine and can be called after leaving the channel.
2608
- * 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.
2609
+ * This method is used to disable the video module.
2609
2610
  *
2610
2611
  * @returns
2611
2612
  * 0: Success.
@@ -2615,12 +2616,7 @@ export declare abstract class IRtcEngine {
2615
2616
  /**
2616
2617
  * Enables the local video preview and specifies the video source for the preview.
2617
2618
  *
2618
- * You can call this method to enable local video preview. Call this method after the following:
2619
- * Call setupLocalVideo to initialize the local preview.
2620
- * Call enableVideo to enable the video module.
2621
- * The local preview enables the mirror mode by default.
2622
- * 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.
2623
- * The video source type set in this method needs to be consistent with the video source type of VideoCanvas you set in setupLocalVideo.
2619
+ * This method is used to start local video preview and specify the video source that appears in the preview screen.
2624
2620
  *
2625
2621
  * @param sourceType The type of the video source. See VideoSourceType.
2626
2622
  *
@@ -2632,8 +2628,6 @@ export declare abstract class IRtcEngine {
2632
2628
  /**
2633
2629
  * Stops the local video preview.
2634
2630
  *
2635
- * After calling startPreview to start the preview, if you want to close the local video preview, call this method. Call this method before joining a channel or after leaving a channel.
2636
- *
2637
2631
  * @param sourceType The type of the video source. See VideoSourceType.
2638
2632
  *
2639
2633
  * @returns
@@ -2666,7 +2660,7 @@ export declare abstract class IRtcEngine {
2666
2660
  /**
2667
2661
  * Sets the video encoder configuration.
2668
2662
  *
2669
- * Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. The config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found. You can call this method either before or after joining a channel. If the user does not need to reset the video encoding properties after joining the channel, Agora recommends calling this method before enableVideo to reduce the time to render the first video frame.
2663
+ * Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.
2670
2664
  *
2671
2665
  * @param config Video profile. See VideoEncoderConfiguration.
2672
2666
  *
@@ -2841,10 +2835,7 @@ export declare abstract class IRtcEngine {
2841
2835
  /**
2842
2836
  * Enables the audio module.
2843
2837
  *
2844
- * The audio mode is enabled by default.
2845
- * This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.
2846
- * 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.
2847
- * A successful call of this method resets enableLocalAudio, muteRemoteAudioStream, and muteAllRemoteAudioStreams. Proceed it with caution.
2838
+ * The audio module is enabled by default After calling disableAudio to disable the audio module, you can call this method to re-enable it.
2848
2839
  *
2849
2840
  * @returns
2850
2841
  * 0: Success.
@@ -2854,8 +2845,7 @@ export declare abstract class IRtcEngine {
2854
2845
  /**
2855
2846
  * Disables the audio module.
2856
2847
  *
2857
- * This method disables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.
2858
- * 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. enableLoopbackRecording : Whether to enable loopback audio capturing. 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.
2848
+ * The audio module is enabled by default, and you can call this method to disable the audio module.
2859
2849
  *
2860
2850
  * @returns
2861
2851
  * 0: Success.
@@ -2865,10 +2855,6 @@ export declare abstract class IRtcEngine {
2865
2855
  /**
2866
2856
  * Sets the audio profile and audio scenario.
2867
2857
  *
2868
- * You can call this method either before or after joining a channel.
2869
- * Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to AudioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue.
2870
- * 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
- *
2872
2858
  * @param profile The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType.
2873
2859
  * @param scenario The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType.
2874
2860
  *
@@ -2880,9 +2866,6 @@ export declare abstract class IRtcEngine {
2880
2866
  /**
2881
2867
  * Sets audio scenarios.
2882
2868
  *
2883
- * Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to AudioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue.
2884
- * You can call this method either before or after joining a channel.
2885
- *
2886
2869
  * @param scenario The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType.
2887
2870
  *
2888
2871
  * @returns
@@ -2893,9 +2876,7 @@ export declare abstract class IRtcEngine {
2893
2876
  /**
2894
2877
  * Enables or disables the local audio capture.
2895
2878
  *
2896
- * 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 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).
2897
- * 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.
2898
- * 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.
2879
+ * 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. The difference between this method and muteLocalAudioStream are as follows: 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 without affecting the audio capture status.
2899
2880
  *
2900
2881
  * @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
2882
  *
@@ -2907,7 +2888,7 @@ export declare abstract class IRtcEngine {
2907
2888
  /**
2908
2889
  * Stops or resumes publishing the local audio stream.
2909
2890
  *
2910
- * 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.
2891
+ * This method is used to control whether to publish the locally captured audio stream. If you call this method to stop publishing locally captured audio streams, the audio capturing device will still work and won't be affected.
2911
2892
  *
2912
2893
  * @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
2894
  *
@@ -2919,9 +2900,7 @@ export declare abstract class IRtcEngine {
2919
2900
  /**
2920
2901
  * Stops or resumes subscribing to the audio streams of all remote users.
2921
2902
  *
2922
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
2923
- * Call this method after joining a channel.
2924
- * 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.
2903
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. By default, the SDK subscribes to the audio streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeAudio to false when calling joinChannel to join the channel, which will cancel the subscription to the audio streams of all users upon joining the channel.
2925
2904
  *
2926
2905
  * @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
2906
  *
@@ -2937,8 +2916,6 @@ export declare abstract class IRtcEngine {
2937
2916
  /**
2938
2917
  * Stops or resumes subscribing to the audio stream of a specified user.
2939
2918
  *
2940
- * Call this method after joining a channel.
2941
- *
2942
2919
  * @param uid The user ID of the specified user.
2943
2920
  * @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
2921
  *
@@ -2950,9 +2927,7 @@ export declare abstract class IRtcEngine {
2950
2927
  /**
2951
2928
  * Stops or resumes publishing the local video stream.
2952
2929
  *
2953
- * A successful call of this method triggers the onUserMuteVideo callback on the remote client.
2954
- * This method executes faster than the enableLocalVideo (false) method, which controls the sending of the local video stream.
2955
- * This method does not affect any ongoing video recording, because it does not disable the camera.
2930
+ * This method is used to control whether to publish the locally captured video stream. If you call this method to stop publishing locally captured video streams, the video capturing device will still work and won't be affected. Compared to enableLocalVideo (false), which can also cancel the publishing of local video stream by turning off the local video stream capture, this method responds faster.
2956
2931
  *
2957
2932
  * @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
2933
  *
@@ -2978,9 +2953,7 @@ export declare abstract class IRtcEngine {
2978
2953
  /**
2979
2954
  * Stops or resumes subscribing to the video streams of all remote users.
2980
2955
  *
2981
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
2982
- * Call this method after joining a channel.
2983
- * 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.
2956
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. By default, the SDK subscribes to the video streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeVideo to false when calling joinChannel to join the channel, which will cancel the subscription to the video streams of all users upon joining the channel.
2984
2957
  *
2985
2958
  * @param mute Whether to stop subscribing to the video streams of all remote users. true : Stop subscribing to the video streams of all remote users. false : (Default) Subscribe to the audio streams of all remote users by default.
2986
2959
  *
@@ -3010,8 +2983,6 @@ export declare abstract class IRtcEngine {
3010
2983
  /**
3011
2984
  * Stops or resumes subscribing to the video stream of a specified user.
3012
2985
  *
3013
- * Call this method after joining a channel.
3014
- *
3015
2986
  * @param uid The user ID of the specified user.
3016
2987
  * @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.
3017
2988
  *
@@ -3128,7 +3099,7 @@ export declare abstract class IRtcEngine {
3128
3099
  /**
3129
3100
  * Enables the reporting of users' volume indication.
3130
3101
  *
3131
- * 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.
3102
+ * 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.
3132
3103
  *
3133
3104
  * @param interval Sets the time interval between two consecutive volume indications:
3134
3105
  * ≤ 0: Disables the volume indication.
@@ -3687,7 +3658,9 @@ export declare abstract class IRtcEngine {
3687
3658
  /**
3688
3659
  * Sets a preset voice beautifier effect.
3689
3660
  *
3690
- * 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.
3661
+ * 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. To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
3662
+ * Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
3663
+ * Call setAudioProfile to set the profile parameter to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5).
3691
3664
  * You can call this method either before or after joining a channel.
3692
3665
  * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3693
3666
  * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
@@ -3704,10 +3677,11 @@ export declare abstract class IRtcEngine {
3704
3677
  /**
3705
3678
  * Sets an SDK preset audio effect.
3706
3679
  *
3707
- * 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.
3680
+ * To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
3681
+ * Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
3682
+ * Call setAudioProfile to set the profile parameter to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5). 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.
3683
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3708
3684
  * You can call this method either before or after joining a channel.
3709
- * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect.
3710
- * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3711
3685
  * If you call setAudioEffectPreset and set enumerators except for RoomAcoustics3dVoice or PitchCorrection, do not call setAudioEffectParameters; otherwise, setAudioEffectPreset is overridden.
3712
3686
  * 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
3713
3687
  * 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.
@@ -3722,9 +3696,11 @@ export declare abstract class IRtcEngine {
3722
3696
  /**
3723
3697
  * Sets a preset voice beautifier effect.
3724
3698
  *
3725
- * 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.
3726
- * You can call this method either before or after joining a channel.
3699
+ * To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
3700
+ * Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
3701
+ * Call setAudioProfile to set the profile parameter to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5). 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.
3727
3702
  * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3703
+ * You can call this method either before or after joining a channel.
3728
3704
  * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3729
3705
  * 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
3730
3706
  * 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.
@@ -3739,18 +3715,19 @@ export declare abstract class IRtcEngine {
3739
3715
  /**
3740
3716
  * Sets parameters for SDK preset audio effects.
3741
3717
  *
3742
- * Call this method to set the following parameters for the local user who sends an audio stream:
3718
+ * To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
3719
+ * Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
3720
+ * Call setAudioProfile to set the profile parameter to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5). Call this method to set the following parameters for the local user who sends an audio stream:
3743
3721
  * 3D voice effect: Sets the cycle period of the 3D voice effect.
3744
3722
  * 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.
3723
+ * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3745
3724
  * You can call this method either before or after joining a channel.
3746
- * To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming (3) before calling this method.
3747
- * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect.
3748
3725
  * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3749
3726
  * 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
3750
3727
  *
3751
3728
  * @param preset The options for SDK preset audio effects: RoomAcoustics3dVoice, 3D voice effect:
3752
- * 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.
3753
- * 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.
3729
+ * You need to set the profile parameter in setAudioProfile to AudioProfileMusicStandardStereo (3) or AudioProfileMusicHighQualityStereo (5) before setting this enumerator; otherwise, the enumerator setting does not take effect.
3730
+ * 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:
3754
3731
  * @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.
3755
3732
  * 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.
3756
3733
  * @param param2 If you set preset to RoomAcoustics3dVoice , you need to set param2 to 0.
@@ -3764,9 +3741,11 @@ export declare abstract class IRtcEngine {
3764
3741
  /**
3765
3742
  * Sets parameters for the preset voice beautifier effects.
3766
3743
  *
3767
- * 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.
3768
- * You can call this method either before or after joining a channel.
3744
+ * To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
3745
+ * Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
3746
+ * Call setAudioProfile to set the profile parameter to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5). 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.
3769
3747
  * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
3748
+ * You can call this method either before or after joining a channel.
3770
3749
  * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
3771
3750
  * 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
3772
3751
  *
@@ -4147,10 +4126,10 @@ export declare abstract class IRtcEngine {
4147
4126
  /**
4148
4127
  * Adjusts the capturing signal volume.
4149
4128
  *
4150
- * You can call this method either before or after joining a channel.
4129
+ * If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
4151
4130
  *
4152
4131
  * @param volume The volume of the user. The value range is [0,400].
4153
- * 0: Mute. If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
4132
+ * 0: Mute.
4154
4133
  * 100: (Default) The original volume.
4155
4134
  * 400: Four times the original volume (amplifying the audio signals by four times).
4156
4135
  *
@@ -4172,11 +4151,10 @@ export declare abstract class IRtcEngine {
4172
4151
  /**
4173
4152
  * Adjusts the playback signal volume of all remote users.
4174
4153
  *
4175
- * This method adjusts the playback volume that is the mixed volume of all remote users.
4176
- * You can call this method either before or after joining a channel.
4154
+ * This method is used to adjust the signal volume of all remote users mixed and played locally. If you need to adjust the signal volume of a specified remote user played locally, it is recommended that you call adjustUserPlaybackSignalVolume instead.
4177
4155
  *
4178
4156
  * @param volume The volume of the user. The value range is [0,400].
4179
- * 0: Mute. If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
4157
+ * 0: Mute.
4180
4158
  * 100: (Default) The original volume.
4181
4159
  * 400: Four times the original volume (amplifying the audio signals by four times).
4182
4160
  *
@@ -4189,11 +4167,12 @@ export declare abstract class IRtcEngine {
4189
4167
  * Adjusts the playback signal volume of a specified remote user.
4190
4168
  *
4191
4169
  * 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.
4192
- * Call this method after joining a channel.
4193
- * The playback volume here refers to the mixed volume of a specified remote user.
4194
4170
  *
4195
4171
  * @param uid The user ID of the remote user.
4196
- * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
4172
+ * @param volume The volume of the user. The value range is [0,400].
4173
+ * 0: Mute.
4174
+ * 100: (Default) The original volume.
4175
+ * 400: Four times the original volume (amplifying the audio signals by four times).
4197
4176
  *
4198
4177
  * @returns
4199
4178
  * 0: Success.
@@ -4207,7 +4186,7 @@ export declare abstract class IRtcEngine {
4207
4186
  /**
4208
4187
  * Sets the fallback option for the subscribed video stream based on the network conditions.
4209
4188
  *
4210
- * An unstable network affects the audio and video quality in a video call or interactive live video streaming. If option is set as StreamFallbackOptionVideoStreamLow or StreamFallbackOptionAudioOnly, the SDK automatically switches the video from a high-quality stream to a low-quality stream or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. Meanwhile, the SDK continuously monitors network quality and resumes subscribing to audio and video streams when the network quality improves. When the subscribed video stream falls back to an audio-only stream, or recovers from an audio-only stream to an audio-video stream, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback. Ensure that you call this method before joining a channel.
4189
+ * An unstable network affects the audio and video quality in a video call or interactive live video streaming. If option is set as StreamFallbackOptionVideoStreamLow or StreamFallbackOptionAudioOnly, the SDK automatically switches the video from a high-quality stream to a low-quality stream or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. Meanwhile, the SDK continuously monitors network quality and resumes subscribing to audio and video streams when the network quality improves. When the subscribed video stream falls back to an audio-only stream, or recovers from an audio-only stream to an audio-video stream, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback.
4211
4190
  *
4212
4191
  * @param option Fallback options for the subscribed stream. See STREAM_FALLBACK_OPTIONS.
4213
4192
  *
@@ -4223,10 +4202,6 @@ export declare abstract class IRtcEngine {
4223
4202
  /**
4224
4203
  * Enables or disables extensions.
4225
4204
  *
4226
- * To call this method, call it immediately after initializing the IRtcEngine object.
4227
- * If you want to enable multiple extensions, you need to call this method multiple times.
4228
- * 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.
4229
- *
4230
4205
  * @param provider The name of the extension provider.
4231
4206
  * @param extension The name of the extension.
4232
4207
  * @param enable Whether to enable the extension: true : Enable the extension. false : Disable the extension.
@@ -4320,18 +4295,16 @@ export declare abstract class IRtcEngine {
4320
4295
  /**
4321
4296
  * Sets the volume of the in-ear monitor.
4322
4297
  *
4323
- * You can call this method either before or after joining a channel.
4324
- *
4325
- * @param volume The volume of the in-ear monitor. The value range is [0,400].
4298
+ * @param volume The volume of the user. The value range is [0,400].
4326
4299
  * 0: Mute.
4327
4300
  * 100: (Default) The original volume.
4328
- * 400: Four times the original volume.
4301
+ * 400: Four times the original volume (amplifying the audio signals by four times).
4329
4302
  */
4330
4303
  abstract setInEarMonitoringVolume(volume: number): number;
4331
4304
  /**
4332
- * Adds an extension to the SDK.
4305
+ * Loads an extension.
4333
4306
  *
4334
- * This method applies to Windows only.
4307
+ * This method is used to add extensions external to the SDK (such as those from Extensions Marketplace and SDK extensions) to the SDK.
4335
4308
  *
4336
4309
  * @param path The extension library path and name. For example: /library/libagora_segmentation_extension.dll.
4337
4310
  * @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.
@@ -4344,7 +4317,7 @@ export declare abstract class IRtcEngine {
4344
4317
  /**
4345
4318
  * Sets the properties of the extension provider.
4346
4319
  *
4347
- * 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).
4320
+ * 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.
4348
4321
  *
4349
4322
  * @param provider The name of the extension provider.
4350
4323
  * @param key The key of the extension.
@@ -4358,9 +4331,7 @@ export declare abstract class IRtcEngine {
4358
4331
  /**
4359
4332
  * Registers an extension.
4360
4333
  *
4361
- * After the extension is loaded, you can call this method to register the extension.
4362
- * Before calling this method, you need to call loadExtensionProvider to load the extension first.
4363
- * For extensions external to the SDK (such as those from Extensions Marketplace and SDK Extensions), you need to call this method before calling setExtensionProperty.
4334
+ * For extensions external to the SDK (such as those from Extensions Marketplace and SDK Extensions), you need to load them before calling this method. Extensions internal to the SDK (those included in the full SDK package) are automatically loaded and registered after the initialization of IRtcEngine.
4364
4335
  *
4365
4336
  * @param provider The name of the extension provider.
4366
4337
  * @param extension The name of the extension.
@@ -4369,6 +4340,7 @@ export declare abstract class IRtcEngine {
4369
4340
  * @returns
4370
4341
  * 0: Success.
4371
4342
  * < 0: Failure.
4343
+ * -3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library.
4372
4344
  */
4373
4345
  abstract registerExtension(provider: string, extension: string, type?: MediaSourceType): number;
4374
4346
  /**
@@ -4539,9 +4511,7 @@ export declare abstract class IRtcEngine {
4539
4511
  /**
4540
4512
  * Captures the screen by specifying the display ID.
4541
4513
  *
4542
- * 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:
4543
- * 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.
4544
- * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
4514
+ * Captures the video stream of a screen or a part of the screen area.
4545
4515
  *
4546
4516
  * @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.
4547
4517
  * @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen.
@@ -4557,9 +4527,9 @@ export declare abstract class IRtcEngine {
4557
4527
  /**
4558
4528
  * Captures the whole or part of a screen by specifying the screen rect.
4559
4529
  *
4560
- * There are two ways to start screen sharing, you can choose one according to your needs:
4530
+ * You can call this method either before or after joining the channel, with the following differences:
4561
4531
  * 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.
4562
- * 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.
4532
+ * Call this method after joining a channel, and then call updateChannelMediaOptions to join a channel 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.
4563
4533
  *
4564
4534
  * @param screenRect Sets the relative location of the screen to the virtual screen.
4565
4535
  * @param regionRect 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 screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen.
@@ -4579,10 +4549,7 @@ export declare abstract class IRtcEngine {
4579
4549
  /**
4580
4550
  * Captures the whole or part of a window by specifying the window ID.
4581
4551
  *
4582
- * There are two ways to start screen sharing, you can choose one according to your needs:
4583
- * 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.
4584
- * 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.
4585
- * 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:
4552
+ * This method captures a window or part of the window. You need to specify the ID of the window to be captured. This method applies to the macOS and Windows only. 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:
4586
4553
  *
4587
4554
  * @param windowId The ID of the window to be shared.
4588
4555
  * @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.
@@ -4671,8 +4638,6 @@ export declare abstract class IRtcEngine {
4671
4638
  /**
4672
4639
  * Stops screen capture.
4673
4640
  *
4674
- * After calling startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start screen capture, call this method to stop screen capture.
4675
- *
4676
4641
  * @returns
4677
4642
  * 0: Success.
4678
4643
  * < 0: Failure.
@@ -4694,14 +4659,14 @@ export declare abstract class IRtcEngine {
4694
4659
  * Ensure that you call this method after leaving a channel.
4695
4660
  *
4696
4661
  * @param callId The current call ID. You can get the call ID by calling getCallId.
4697
- * @param rating The rating of the call. The value is between 1 (the lowest score) and 5 (the highest score). If you set a value out of this range, the SDK returns the -2 (ERR_INVALID_ARGUMENT) error.
4662
+ * @param rating The value is between 1 (the lowest score) and 5 (the highest score).
4698
4663
  * @param description A description of the call. The string length should be less than 800 bytes.
4699
4664
  *
4700
4665
  * @returns
4701
4666
  * 0: Success.
4702
4667
  * < 0: Failure.
4703
- * -2 (ERR_INVALID_ARGUMENT).
4704
- * -3 (ERR_NOT_READY).
4668
+ * -1: A general error occurs (no specified reason).
4669
+ * -2: The parameter is invalid.
4705
4670
  */
4706
4671
  abstract rate(callId: string, rating: number, description: string): number;
4707
4672
  /**
@@ -4715,12 +4680,9 @@ export declare abstract class IRtcEngine {
4715
4680
  * @returns
4716
4681
  * 0: Success.
4717
4682
  * < 0: Failure.
4683
+ * -1: A general error occurs (no specified reason).
4718
4684
  * -2: The parameter is invalid.
4719
- * - 3: The SDK is not ready. Possible reasons include the following:
4720
- * The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.
4721
- * No user has joined the channel when the method is called. Please check your code logic.
4722
- * The user has not left the channel when the rate or complain method is called. Please check your code logic.
4723
- * The audio module is disabled. The program is not complete.
4685
+ * -7: The method is called before IRtcEngine is initialized.
4724
4686
  */
4725
4687
  abstract complain(callId: string, description: string): number;
4726
4688
  /**
@@ -4987,7 +4949,7 @@ export declare abstract class IRtcEngine {
4987
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.
4988
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.
4989
4951
  * Ensure that calling this method after enableVideo.
4990
- * If you only want to add a watermark to the media push, you can call this method or the method.
4952
+ * If you only want to add a watermark to the media push, you can call this method or the startRtmpStreamWithTranscoding method.
4991
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.
4992
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.
4993
4955
  * 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.
@@ -5503,14 +5465,11 @@ export declare abstract class IRtcEngine {
5503
5465
  */
5504
5466
  abstract sendAudioMetadata(metadata: string, length: number): number;
5505
5467
  /**
5506
- * Starts screen capture.
5468
+ * Starts screen capture from the specified video source.
5507
5469
  *
5508
- * This method, as well as startScreenCaptureByDisplayId and startScreenCaptureByWindowId, can all be used to enable 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.
5509
- * If you call this method to start screen capture, Agora recommends that you call stopScreenCaptureBySourceType to stop the capture and avoid using stopScreenCapture.
5470
+ * This method applies to the macOS and Windows only.
5510
5471
  *
5511
- * @param sourceType The type of the video source. See VideoSourceType.
5512
- * Windows supports up to four screen capture video streams.
5513
- * macOS supports only one screen capture video stream. You can only set this parameter to VideoSourceScreen (2).
5472
+ * @param sourceType The type of the video source. See VideoSourceType. On the macOS platform, this parameter can only be set to VideoSourceScreen (2).
5514
5473
  * @param config The configuration of the captured screen. See ScreenCaptureConfiguration.
5515
5474
  *
5516
5475
  * @returns
@@ -5519,10 +5478,7 @@ export declare abstract class IRtcEngine {
5519
5478
  */
5520
5479
  abstract startScreenCaptureBySourceType(sourceType: VideoSourceType, config: ScreenCaptureConfiguration): number;
5521
5480
  /**
5522
- * Stops screen capture.
5523
- *
5524
- * 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.
5525
- * 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.
5481
+ * Stops screen capture from the specified video source.
5526
5482
  *
5527
5483
  * @param sourceType The type of the video source. See VideoSourceType.
5528
5484
  *
@@ -5544,11 +5500,7 @@ export declare abstract class IRtcEngine {
5544
5500
  /**
5545
5501
  * Enables the local video preview.
5546
5502
  *
5547
- * You can call this method to enable local video preview. Call this method after the following:
5548
- * Call setupLocalVideo to initialize the local preview.
5549
- * Call enableVideo to enable the video module.
5550
- * The local preview enables the mirror mode by default.
5551
- * 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.
5503
+ * You can call this method to enable local video preview.
5552
5504
  *
5553
5505
  * @returns
5554
5506
  * 0: Success.