agora-electron-sdk 4.3.1-dev.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.
- package/CHANGELOG.md +14 -4
- package/js/Private/AgoraBase.js +22 -13
- package/js/Private/IAgoraMusicContentCenter.js +19 -1
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +32 -2
- package/js/Private/impl/IAgoraRtcEngineImpl.js +2 -2
- package/js/Private/internal/MusicContentCenterInternal.js +3 -0
- package/js/Private/internal/RtcEngineExInternal.js +5 -0
- package/js/Renderer/IRenderer.js +9 -0
- package/js/Renderer/WebGLRenderer/index.js +1 -0
- package/js/Renderer/YUVCanvasRenderer/index.js +1 -0
- package/package.json +5 -5
- package/ts/Private/AgoraBase.ts +40 -35
- package/ts/Private/AgoraMediaBase.ts +8 -6
- package/ts/Private/IAgoraMusicContentCenter.ts +28 -0
- package/ts/Private/IAgoraRtcEngine.ts +85 -133
- package/ts/Private/IAgoraRtcEngineEx.ts +5 -2
- package/ts/Private/IAgoraSpatialAudio.ts +2 -2
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +39 -2
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +2 -2
- package/ts/Private/internal/MusicContentCenterInternal.ts +5 -0
- package/ts/Private/internal/RtcEngineExInternal.ts +9 -0
- package/ts/Renderer/IRenderer.ts +8 -1
- package/ts/Renderer/WebGLRenderer/index.ts +1 -0
- package/ts/Renderer/YUVCanvasRenderer/index.ts +1 -0
- package/types/Private/AgoraBase.d.ts +40 -35
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +8 -6
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts +25 -0
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +85 -133
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +5 -2
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +2 -2
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +5 -1
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts +2 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Renderer/IRenderer.d.ts +1 -1
- package/types/Renderer/IRenderer.d.ts.map +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
- package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -1
|
@@ -1391,9 +1391,7 @@ export interface IRtcEngineEventHandler {
|
|
|
1391
1391
|
onLeaveChannel?(connection: RtcConnection, stats: RtcStats): void;
|
|
1392
1392
|
|
|
1393
1393
|
/**
|
|
1394
|
-
* Reports the statistics
|
|
1395
|
-
*
|
|
1396
|
-
* The SDK triggers this callback once every two seconds after the user joins the channel.
|
|
1394
|
+
* Reports the statistics about the current call.
|
|
1397
1395
|
*
|
|
1398
1396
|
* @param connection The connection information. See RtcConnection.
|
|
1399
1397
|
* @param stats Statistics of the RTC engine. See RtcStats.
|
|
@@ -1512,7 +1510,7 @@ export interface IRtcEngineEventHandler {
|
|
|
1512
1510
|
* @param source The type of the video source. See VideoSourceType.
|
|
1513
1511
|
* @param width The width (px) of the first local video frame.
|
|
1514
1512
|
* @param height The height (px) of the first local video frame.
|
|
1515
|
-
* @param elapsed
|
|
1513
|
+
* @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.
|
|
1516
1514
|
*/
|
|
1517
1515
|
onFirstLocalVideoFrame?(
|
|
1518
1516
|
source: VideoSourceType,
|
|
@@ -1525,12 +1523,12 @@ export interface IRtcEngineEventHandler {
|
|
|
1525
1523
|
* Occurs when the first video frame is published.
|
|
1526
1524
|
*
|
|
1527
1525
|
* The SDK triggers this callback under one of the following circumstances:
|
|
1528
|
-
* The local client enables the video module and calls joinChannel successfully.
|
|
1526
|
+
* The local client enables the video module and calls joinChannel to join the channel successfully.
|
|
1529
1527
|
* The local client calls muteLocalVideoStream (true) and muteLocalVideoStream (false) in sequence.
|
|
1530
1528
|
* The local client calls disableVideo and enableVideo in sequence.
|
|
1531
1529
|
*
|
|
1532
1530
|
* @param connection The connection information. See RtcConnection.
|
|
1533
|
-
* @param elapsed Time elapsed (ms) from the local user calling joinChannel until
|
|
1531
|
+
* @param elapsed Time elapsed (ms) from the local user calling joinChannel until this callback is triggered.
|
|
1534
1532
|
*/
|
|
1535
1533
|
onFirstLocalVideoFramePublished?(
|
|
1536
1534
|
source: VideoSourceType,
|
|
@@ -1916,9 +1914,11 @@ export interface IRtcEngineEventHandler {
|
|
|
1916
1914
|
/**
|
|
1917
1915
|
* Occurs when the token expires.
|
|
1918
1916
|
*
|
|
1919
|
-
*
|
|
1917
|
+
* 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:
|
|
1918
|
+
* In scenarios involving one channel:
|
|
1920
1919
|
* Call renewToken to pass in the new token.
|
|
1921
1920
|
* Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel.
|
|
1921
|
+
* In scenarios involving mutiple channels: Call updateChannelMediaOptionsEx to pass in the new token.
|
|
1922
1922
|
*
|
|
1923
1923
|
* @param connection The connection information. See RtcConnection.
|
|
1924
1924
|
*/
|
|
@@ -1927,10 +1927,14 @@ export interface IRtcEngineEventHandler {
|
|
|
1927
1927
|
/**
|
|
1928
1928
|
* Occurs when the token expires in 30 seconds.
|
|
1929
1929
|
*
|
|
1930
|
-
* When
|
|
1930
|
+
* 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:
|
|
1931
|
+
* In scenarios involving one channel:
|
|
1932
|
+
* Call renewToken to pass in the new token.
|
|
1933
|
+
* Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel.
|
|
1934
|
+
* In scenarios involving mutiple channels: Call updateChannelMediaOptionsEx to pass in the new token.
|
|
1931
1935
|
*
|
|
1932
1936
|
* @param connection The connection information. See RtcConnection.
|
|
1933
|
-
* @param token The token that
|
|
1937
|
+
* @param token The token that is about to expire.
|
|
1934
1938
|
*/
|
|
1935
1939
|
onTokenPrivilegeWillExpire?(connection: RtcConnection, token: string): void;
|
|
1936
1940
|
|
|
@@ -2933,7 +2937,7 @@ export abstract class IRtcEngine {
|
|
|
2933
2937
|
abstract getErrorDescription(code: number): string;
|
|
2934
2938
|
|
|
2935
2939
|
/**
|
|
2936
|
-
* Queries the
|
|
2940
|
+
* Queries the video codec capabilities of the SDK.
|
|
2937
2941
|
*
|
|
2938
2942
|
* @returns
|
|
2939
2943
|
* 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.
|
|
@@ -2953,11 +2957,7 @@ export abstract class IRtcEngine {
|
|
|
2953
2957
|
/**
|
|
2954
2958
|
* Preloads a channel with token, channelId, and uid.
|
|
2955
2959
|
*
|
|
2956
|
-
* 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.
|
|
2957
|
-
* 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.
|
|
2958
|
-
* 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.
|
|
2959
|
-
* One IRtcEngine instance supports preloading 20 channels at most. When exceeding this limit, the latest 20 preloaded channels take effect.
|
|
2960
|
-
* 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.
|
|
2960
|
+
* 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.
|
|
2961
2961
|
*
|
|
2962
2962
|
* @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.
|
|
2963
2963
|
* When preloading one channel, calling this method to pass in the new token.
|
|
@@ -2970,7 +2970,7 @@ export abstract class IRtcEngine {
|
|
|
2970
2970
|
* All numeric characters: 0 to 9.
|
|
2971
2971
|
* Space
|
|
2972
2972
|
* "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
|
|
2973
|
-
* @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
|
|
2973
|
+
* @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.
|
|
2974
2974
|
*
|
|
2975
2975
|
* @returns
|
|
2976
2976
|
* 0: Success.
|
|
@@ -3025,7 +3025,7 @@ export abstract class IRtcEngine {
|
|
|
3025
3025
|
* All numeric characters: 0 to 9.
|
|
3026
3026
|
* Space
|
|
3027
3027
|
* "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
|
|
3028
|
-
* @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
|
|
3028
|
+
* @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.
|
|
3029
3029
|
* @param options The channel media options. See ChannelMediaOptions.
|
|
3030
3030
|
*
|
|
3031
3031
|
* @returns
|
|
@@ -3077,15 +3077,18 @@ export abstract class IRtcEngine {
|
|
|
3077
3077
|
/**
|
|
3078
3078
|
* Renews the token.
|
|
3079
3079
|
*
|
|
3080
|
-
*
|
|
3080
|
+
* 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.
|
|
3081
3081
|
*
|
|
3082
3082
|
* @param token The new token.
|
|
3083
3083
|
*
|
|
3084
3084
|
* @returns
|
|
3085
3085
|
* 0: Success.
|
|
3086
3086
|
* < 0: Failure.
|
|
3087
|
-
* -2: The parameter is invalid. For example, the token is
|
|
3087
|
+
* -2: The parameter is invalid. For example, the token is empty.
|
|
3088
3088
|
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
3089
|
+
* 110: Invalid token. Ensure the following:
|
|
3090
|
+
* The user ID specified when generating the token is consistent with the user ID used when joining the channel.
|
|
3091
|
+
* The generated token is the same as the token passed in to join the channel.
|
|
3089
3092
|
*/
|
|
3090
3093
|
abstract renewToken(token: string): number;
|
|
3091
3094
|
|
|
@@ -3179,9 +3182,7 @@ export abstract class IRtcEngine {
|
|
|
3179
3182
|
/**
|
|
3180
3183
|
* Disables the video module.
|
|
3181
3184
|
*
|
|
3182
|
-
* This method
|
|
3183
|
-
* This method affects the internal engine and can be called after leaving the channel.
|
|
3184
|
-
* 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.
|
|
3185
|
+
* This method is used to disable the video module.
|
|
3185
3186
|
*
|
|
3186
3187
|
* @returns
|
|
3187
3188
|
* 0: Success.
|
|
@@ -3192,12 +3193,7 @@ export abstract class IRtcEngine {
|
|
|
3192
3193
|
/**
|
|
3193
3194
|
* Enables the local video preview and specifies the video source for the preview.
|
|
3194
3195
|
*
|
|
3195
|
-
*
|
|
3196
|
-
* Call setupLocalVideo to initialize the local preview.
|
|
3197
|
-
* Call enableVideo to enable the video module.
|
|
3198
|
-
* The local preview enables the mirror mode by default.
|
|
3199
|
-
* 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.
|
|
3200
|
-
* The video source type set in this method needs to be consistent with the video source type of VideoCanvas you set in setupLocalVideo.
|
|
3196
|
+
* This method is used to start local video preview and specify the video source that appears in the preview screen.
|
|
3201
3197
|
*
|
|
3202
3198
|
* @param sourceType The type of the video source. See VideoSourceType.
|
|
3203
3199
|
*
|
|
@@ -3210,8 +3206,6 @@ export abstract class IRtcEngine {
|
|
|
3210
3206
|
/**
|
|
3211
3207
|
* Stops the local video preview.
|
|
3212
3208
|
*
|
|
3213
|
-
* 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.
|
|
3214
|
-
*
|
|
3215
3209
|
* @param sourceType The type of the video source. See VideoSourceType.
|
|
3216
3210
|
*
|
|
3217
3211
|
* @returns
|
|
@@ -3247,7 +3241,7 @@ export abstract class IRtcEngine {
|
|
|
3247
3241
|
/**
|
|
3248
3242
|
* Sets the video encoder configuration.
|
|
3249
3243
|
*
|
|
3250
|
-
* 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.
|
|
3244
|
+
* 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.
|
|
3251
3245
|
*
|
|
3252
3246
|
* @param config Video profile. See VideoEncoderConfiguration.
|
|
3253
3247
|
*
|
|
@@ -3455,10 +3449,7 @@ export abstract class IRtcEngine {
|
|
|
3455
3449
|
/**
|
|
3456
3450
|
* Enables the audio module.
|
|
3457
3451
|
*
|
|
3458
|
-
* The audio
|
|
3459
|
-
* This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.
|
|
3460
|
-
* 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.
|
|
3461
|
-
* A successful call of this method resets enableLocalAudio, muteRemoteAudioStream, and muteAllRemoteAudioStreams. Proceed it with caution.
|
|
3452
|
+
* The audio module is enabled by default After calling disableAudio to disable the audio module, you can call this method to re-enable it.
|
|
3462
3453
|
*
|
|
3463
3454
|
* @returns
|
|
3464
3455
|
* 0: Success.
|
|
@@ -3469,8 +3460,7 @@ export abstract class IRtcEngine {
|
|
|
3469
3460
|
/**
|
|
3470
3461
|
* Disables the audio module.
|
|
3471
3462
|
*
|
|
3472
|
-
*
|
|
3473
|
-
* 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.
|
|
3463
|
+
* The audio module is enabled by default, and you can call this method to disable the audio module.
|
|
3474
3464
|
*
|
|
3475
3465
|
* @returns
|
|
3476
3466
|
* 0: Success.
|
|
@@ -3481,10 +3471,6 @@ export abstract class IRtcEngine {
|
|
|
3481
3471
|
/**
|
|
3482
3472
|
* Sets the audio profile and audio scenario.
|
|
3483
3473
|
*
|
|
3484
|
-
* You can call this method either before or after joining a channel.
|
|
3485
|
-
* 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.
|
|
3486
|
-
* In scenarios requiring high-quality audio, such as online music tutoring, Agora recommends you set profile as AudioProfileMusicHighQuality (4) and scenario as AudioScenarioGameStreaming (3).
|
|
3487
|
-
*
|
|
3488
3474
|
* @param profile The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType.
|
|
3489
3475
|
* @param scenario The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType.
|
|
3490
3476
|
*
|
|
@@ -3500,9 +3486,6 @@ export abstract class IRtcEngine {
|
|
|
3500
3486
|
/**
|
|
3501
3487
|
* Sets audio scenarios.
|
|
3502
3488
|
*
|
|
3503
|
-
* 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.
|
|
3504
|
-
* You can call this method either before or after joining a channel.
|
|
3505
|
-
*
|
|
3506
3489
|
* @param scenario The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType.
|
|
3507
3490
|
*
|
|
3508
3491
|
* @returns
|
|
@@ -3514,9 +3497,7 @@ export abstract class IRtcEngine {
|
|
|
3514
3497
|
/**
|
|
3515
3498
|
* Enables or disables the local audio capture.
|
|
3516
3499
|
*
|
|
3517
|
-
* 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.
|
|
3518
|
-
* 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.
|
|
3519
|
-
* 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.
|
|
3500
|
+
* 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.
|
|
3520
3501
|
*
|
|
3521
3502
|
* @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.
|
|
3522
3503
|
*
|
|
@@ -3529,7 +3510,7 @@ export abstract class IRtcEngine {
|
|
|
3529
3510
|
/**
|
|
3530
3511
|
* Stops or resumes publishing the local audio stream.
|
|
3531
3512
|
*
|
|
3532
|
-
* This method
|
|
3513
|
+
* 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.
|
|
3533
3514
|
*
|
|
3534
3515
|
* @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.
|
|
3535
3516
|
*
|
|
@@ -3542,9 +3523,7 @@ export abstract class IRtcEngine {
|
|
|
3542
3523
|
/**
|
|
3543
3524
|
* Stops or resumes subscribing to the audio streams of all remote users.
|
|
3544
3525
|
*
|
|
3545
|
-
* After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
|
|
3546
|
-
* Call this method after joining a channel.
|
|
3547
|
-
* 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.
|
|
3526
|
+
* 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.
|
|
3548
3527
|
*
|
|
3549
3528
|
* @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.
|
|
3550
3529
|
*
|
|
@@ -3562,8 +3541,6 @@ export abstract class IRtcEngine {
|
|
|
3562
3541
|
/**
|
|
3563
3542
|
* Stops or resumes subscribing to the audio stream of a specified user.
|
|
3564
3543
|
*
|
|
3565
|
-
* Call this method after joining a channel.
|
|
3566
|
-
*
|
|
3567
3544
|
* @param uid The user ID of the specified user.
|
|
3568
3545
|
* @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.
|
|
3569
3546
|
*
|
|
@@ -3576,9 +3553,7 @@ export abstract class IRtcEngine {
|
|
|
3576
3553
|
/**
|
|
3577
3554
|
* Stops or resumes publishing the local video stream.
|
|
3578
3555
|
*
|
|
3579
|
-
*
|
|
3580
|
-
* This method executes faster than the enableLocalVideo (false) method, which controls the sending of the local video stream.
|
|
3581
|
-
* This method does not affect any ongoing video recording, because it does not disable the camera.
|
|
3556
|
+
* 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.
|
|
3582
3557
|
*
|
|
3583
3558
|
* @param mute Whether to stop publishing the local video stream. true : Stop publishing the local video stream. false : (Default) Publish the local video stream.
|
|
3584
3559
|
*
|
|
@@ -3606,9 +3581,7 @@ export abstract class IRtcEngine {
|
|
|
3606
3581
|
/**
|
|
3607
3582
|
* Stops or resumes subscribing to the video streams of all remote users.
|
|
3608
3583
|
*
|
|
3609
|
-
* After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
|
|
3610
|
-
* Call this method after joining a channel.
|
|
3611
|
-
* 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.
|
|
3584
|
+
* 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.
|
|
3612
3585
|
*
|
|
3613
3586
|
* @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.
|
|
3614
3587
|
*
|
|
@@ -3641,8 +3614,6 @@ export abstract class IRtcEngine {
|
|
|
3641
3614
|
/**
|
|
3642
3615
|
* Stops or resumes subscribing to the video stream of a specified user.
|
|
3643
3616
|
*
|
|
3644
|
-
* Call this method after joining a channel.
|
|
3645
|
-
*
|
|
3646
3617
|
* @param uid The user ID of the specified user.
|
|
3647
3618
|
* @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.
|
|
3648
3619
|
*
|
|
@@ -3784,7 +3755,7 @@ export abstract class IRtcEngine {
|
|
|
3784
3755
|
/**
|
|
3785
3756
|
* Enables the reporting of users' volume indication.
|
|
3786
3757
|
*
|
|
3787
|
-
* 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.
|
|
3758
|
+
* 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.
|
|
3788
3759
|
*
|
|
3789
3760
|
* @param interval Sets the time interval between two consecutive volume indications:
|
|
3790
3761
|
* ≤ 0: Disables the volume indication.
|
|
@@ -4428,7 +4399,9 @@ export abstract class IRtcEngine {
|
|
|
4428
4399
|
/**
|
|
4429
4400
|
* Sets a preset voice beautifier effect.
|
|
4430
4401
|
*
|
|
4431
|
-
* 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.
|
|
4402
|
+
* 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:
|
|
4403
|
+
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4404
|
+
* Call setAudioProfile to set the profile parameter to AudioProfileMusicHighQuality (4) or AudioProfileMusicHighQualityStereo (5).
|
|
4432
4405
|
* You can call this method either before or after joining a channel.
|
|
4433
4406
|
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4434
4407
|
* This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
|
|
@@ -4446,10 +4419,11 @@ export abstract class IRtcEngine {
|
|
|
4446
4419
|
/**
|
|
4447
4420
|
* Sets an SDK preset audio effect.
|
|
4448
4421
|
*
|
|
4449
|
-
*
|
|
4422
|
+
* To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
|
|
4423
|
+
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4424
|
+
* 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.
|
|
4425
|
+
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4450
4426
|
* You can call this method either before or after joining a channel.
|
|
4451
|
-
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect.
|
|
4452
|
-
* This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
|
|
4453
4427
|
* If you call setAudioEffectPreset and set enumerators except for RoomAcoustics3dVoice or PitchCorrection, do not call setAudioEffectParameters; otherwise, setAudioEffectPreset is overridden.
|
|
4454
4428
|
* 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
|
|
4455
4429
|
* 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.
|
|
@@ -4465,9 +4439,11 @@ export abstract class IRtcEngine {
|
|
|
4465
4439
|
/**
|
|
4466
4440
|
* Sets a preset voice beautifier effect.
|
|
4467
4441
|
*
|
|
4468
|
-
*
|
|
4469
|
-
*
|
|
4442
|
+
* To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
|
|
4443
|
+
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4444
|
+
* 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.
|
|
4470
4445
|
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4446
|
+
* You can call this method either before or after joining a channel.
|
|
4471
4447
|
* This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
|
|
4472
4448
|
* 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
|
|
4473
4449
|
* 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.
|
|
@@ -4483,18 +4459,19 @@ export abstract class IRtcEngine {
|
|
|
4483
4459
|
/**
|
|
4484
4460
|
* Sets parameters for SDK preset audio effects.
|
|
4485
4461
|
*
|
|
4486
|
-
*
|
|
4462
|
+
* To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
|
|
4463
|
+
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4464
|
+
* 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:
|
|
4487
4465
|
* 3D voice effect: Sets the cycle period of the 3D voice effect.
|
|
4488
4466
|
* 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.
|
|
4467
|
+
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4489
4468
|
* You can call this method either before or after joining a channel.
|
|
4490
|
-
* To get better audio effect quality, Agora recommends setting the scenario parameter of setAudioProfile as AudioScenarioGameStreaming (3) before calling this method.
|
|
4491
|
-
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) AudioProfileIot or (6), or the method does not take effect.
|
|
4492
4469
|
* This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
|
|
4493
4470
|
* 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
|
|
4494
4471
|
*
|
|
4495
4472
|
* @param preset The options for SDK preset audio effects: RoomAcoustics3dVoice, 3D voice effect:
|
|
4496
|
-
*
|
|
4497
|
-
* 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:
|
|
4473
|
+
* 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.
|
|
4474
|
+
* 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:
|
|
4498
4475
|
* @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.
|
|
4499
4476
|
* 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.
|
|
4500
4477
|
* @param param2 If you set preset to RoomAcoustics3dVoice , you need to set param2 to 0.
|
|
@@ -4513,9 +4490,11 @@ export abstract class IRtcEngine {
|
|
|
4513
4490
|
/**
|
|
4514
4491
|
* Sets parameters for the preset voice beautifier effects.
|
|
4515
4492
|
*
|
|
4516
|
-
*
|
|
4517
|
-
*
|
|
4493
|
+
* To achieve better vocal effects, it is recommended that you call the following APIs before calling this method:
|
|
4494
|
+
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4495
|
+
* 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.
|
|
4518
4496
|
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4497
|
+
* You can call this method either before or after joining a channel.
|
|
4519
4498
|
* This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
|
|
4520
4499
|
* 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
|
|
4521
4500
|
*
|
|
@@ -4981,10 +4960,10 @@ export abstract class IRtcEngine {
|
|
|
4981
4960
|
/**
|
|
4982
4961
|
* Adjusts the capturing signal volume.
|
|
4983
4962
|
*
|
|
4984
|
-
*
|
|
4963
|
+
* If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead.
|
|
4985
4964
|
*
|
|
4986
4965
|
* @param volume The volume of the user. The value range is [0,400].
|
|
4987
|
-
* 0: Mute.
|
|
4966
|
+
* 0: Mute.
|
|
4988
4967
|
* 100: (Default) The original volume.
|
|
4989
4968
|
* 400: Four times the original volume (amplifying the audio signals by four times).
|
|
4990
4969
|
*
|
|
@@ -5008,11 +4987,10 @@ export abstract class IRtcEngine {
|
|
|
5008
4987
|
/**
|
|
5009
4988
|
* Adjusts the playback signal volume of all remote users.
|
|
5010
4989
|
*
|
|
5011
|
-
* This method
|
|
5012
|
-
* You can call this method either before or after joining a channel.
|
|
4990
|
+
* 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.
|
|
5013
4991
|
*
|
|
5014
4992
|
* @param volume The volume of the user. The value range is [0,400].
|
|
5015
|
-
* 0: Mute.
|
|
4993
|
+
* 0: Mute.
|
|
5016
4994
|
* 100: (Default) The original volume.
|
|
5017
4995
|
* 400: Four times the original volume (amplifying the audio signals by four times).
|
|
5018
4996
|
*
|
|
@@ -5026,11 +5004,12 @@ export abstract class IRtcEngine {
|
|
|
5026
5004
|
* Adjusts the playback signal volume of a specified remote user.
|
|
5027
5005
|
*
|
|
5028
5006
|
* 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.
|
|
5029
|
-
* Call this method after joining a channel.
|
|
5030
|
-
* The playback volume here refers to the mixed volume of a specified remote user.
|
|
5031
5007
|
*
|
|
5032
5008
|
* @param uid The user ID of the remote user.
|
|
5033
|
-
* @param volume
|
|
5009
|
+
* @param volume The volume of the user. The value range is [0,400].
|
|
5010
|
+
* 0: Mute.
|
|
5011
|
+
* 100: (Default) The original volume.
|
|
5012
|
+
* 400: Four times the original volume (amplifying the audio signals by four times).
|
|
5034
5013
|
*
|
|
5035
5014
|
* @returns
|
|
5036
5015
|
* 0: Success.
|
|
@@ -5046,7 +5025,7 @@ export abstract class IRtcEngine {
|
|
|
5046
5025
|
/**
|
|
5047
5026
|
* Sets the fallback option for the subscribed video stream based on the network conditions.
|
|
5048
5027
|
*
|
|
5049
|
-
* 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.
|
|
5028
|
+
* 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.
|
|
5050
5029
|
*
|
|
5051
5030
|
* @param option Fallback options for the subscribed stream. See STREAM_FALLBACK_OPTIONS.
|
|
5052
5031
|
*
|
|
@@ -5070,10 +5049,6 @@ export abstract class IRtcEngine {
|
|
|
5070
5049
|
/**
|
|
5071
5050
|
* Enables or disables extensions.
|
|
5072
5051
|
*
|
|
5073
|
-
* To call this method, call it immediately after initializing the IRtcEngine object.
|
|
5074
|
-
* If you want to enable multiple extensions, you need to call this method multiple times.
|
|
5075
|
-
* 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.
|
|
5076
|
-
*
|
|
5077
5052
|
* @param provider The name of the extension provider.
|
|
5078
5053
|
* @param extension The name of the extension.
|
|
5079
5054
|
* @param enable Whether to enable the extension: true : Enable the extension. false : Disable the extension.
|
|
@@ -5197,19 +5172,17 @@ export abstract class IRtcEngine {
|
|
|
5197
5172
|
/**
|
|
5198
5173
|
* Sets the volume of the in-ear monitor.
|
|
5199
5174
|
*
|
|
5200
|
-
*
|
|
5201
|
-
*
|
|
5202
|
-
* @param volume The volume of the in-ear monitor. The value range is [0,400].
|
|
5175
|
+
* @param volume The volume of the user. The value range is [0,400].
|
|
5203
5176
|
* 0: Mute.
|
|
5204
5177
|
* 100: (Default) The original volume.
|
|
5205
|
-
* 400: Four times the original volume.
|
|
5178
|
+
* 400: Four times the original volume (amplifying the audio signals by four times).
|
|
5206
5179
|
*/
|
|
5207
5180
|
abstract setInEarMonitoringVolume(volume: number): number;
|
|
5208
5181
|
|
|
5209
5182
|
/**
|
|
5210
|
-
*
|
|
5183
|
+
* Loads an extension.
|
|
5211
5184
|
*
|
|
5212
|
-
* This method
|
|
5185
|
+
* This method is used to add extensions external to the SDK (such as those from Extensions Marketplace and SDK extensions) to the SDK.
|
|
5213
5186
|
*
|
|
5214
5187
|
* @param path The extension library path and name. For example: /library/libagora_segmentation_extension.dll.
|
|
5215
5188
|
* @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.
|
|
@@ -5226,7 +5199,7 @@ export abstract class IRtcEngine {
|
|
|
5226
5199
|
/**
|
|
5227
5200
|
* Sets the properties of the extension provider.
|
|
5228
5201
|
*
|
|
5229
|
-
* 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.
|
|
5202
|
+
* 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.
|
|
5230
5203
|
*
|
|
5231
5204
|
* @param provider The name of the extension provider.
|
|
5232
5205
|
* @param key The key of the extension.
|
|
@@ -5245,9 +5218,7 @@ export abstract class IRtcEngine {
|
|
|
5245
5218
|
/**
|
|
5246
5219
|
* Registers an extension.
|
|
5247
5220
|
*
|
|
5248
|
-
*
|
|
5249
|
-
* Before calling this method, you need to call loadExtensionProvider to load the extension first.
|
|
5250
|
-
* For extensions external to the SDK (such as those from Extensions Marketplace and SDK Extensions), you need to call this method before calling setExtensionProperty.
|
|
5221
|
+
* 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.
|
|
5251
5222
|
*
|
|
5252
5223
|
* @param provider The name of the extension provider.
|
|
5253
5224
|
* @param extension The name of the extension.
|
|
@@ -5256,6 +5227,7 @@ export abstract class IRtcEngine {
|
|
|
5256
5227
|
* @returns
|
|
5257
5228
|
* 0: Success.
|
|
5258
5229
|
* < 0: Failure.
|
|
5230
|
+
* -3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library.
|
|
5259
5231
|
*/
|
|
5260
5232
|
abstract registerExtension(
|
|
5261
5233
|
provider: string,
|
|
@@ -5479,9 +5451,7 @@ export abstract class IRtcEngine {
|
|
|
5479
5451
|
/**
|
|
5480
5452
|
* Captures the screen by specifying the display ID.
|
|
5481
5453
|
*
|
|
5482
|
-
*
|
|
5483
|
-
* 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.
|
|
5484
|
-
* Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.
|
|
5454
|
+
* Captures the video stream of a screen or a part of the screen area.
|
|
5485
5455
|
*
|
|
5486
5456
|
* @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.
|
|
5487
5457
|
* @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen.
|
|
@@ -5502,9 +5472,9 @@ export abstract class IRtcEngine {
|
|
|
5502
5472
|
/**
|
|
5503
5473
|
* Captures the whole or part of a screen by specifying the screen rect.
|
|
5504
5474
|
*
|
|
5505
|
-
*
|
|
5475
|
+
* You can call this method either before or after joining the channel, with the following differences:
|
|
5506
5476
|
* 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.
|
|
5507
|
-
* 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.
|
|
5477
|
+
* 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.
|
|
5508
5478
|
*
|
|
5509
5479
|
* @param screenRect Sets the relative location of the screen to the virtual screen.
|
|
5510
5480
|
* @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.
|
|
@@ -5530,10 +5500,7 @@ export abstract class IRtcEngine {
|
|
|
5530
5500
|
/**
|
|
5531
5501
|
* Captures the whole or part of a window by specifying the window ID.
|
|
5532
5502
|
*
|
|
5533
|
-
*
|
|
5534
|
-
* 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.
|
|
5535
|
-
* 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.
|
|
5536
|
-
* 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:
|
|
5503
|
+
* 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:
|
|
5537
5504
|
*
|
|
5538
5505
|
* @param windowId The ID of the window to be shared.
|
|
5539
5506
|
* @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.
|
|
@@ -5637,8 +5604,6 @@ export abstract class IRtcEngine {
|
|
|
5637
5604
|
/**
|
|
5638
5605
|
* Stops screen capture.
|
|
5639
5606
|
*
|
|
5640
|
-
* After calling startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start screen capture, call this method to stop screen capture.
|
|
5641
|
-
*
|
|
5642
5607
|
* @returns
|
|
5643
5608
|
* 0: Success.
|
|
5644
5609
|
* < 0: Failure.
|
|
@@ -5662,14 +5627,14 @@ export abstract class IRtcEngine {
|
|
|
5662
5627
|
* Ensure that you call this method after leaving a channel.
|
|
5663
5628
|
*
|
|
5664
5629
|
* @param callId The current call ID. You can get the call ID by calling getCallId.
|
|
5665
|
-
* @param rating The
|
|
5630
|
+
* @param rating The value is between 1 (the lowest score) and 5 (the highest score).
|
|
5666
5631
|
* @param description A description of the call. The string length should be less than 800 bytes.
|
|
5667
5632
|
*
|
|
5668
5633
|
* @returns
|
|
5669
5634
|
* 0: Success.
|
|
5670
5635
|
* < 0: Failure.
|
|
5671
|
-
* -
|
|
5672
|
-
* -
|
|
5636
|
+
* -1: A general error occurs (no specified reason).
|
|
5637
|
+
* -2: The parameter is invalid.
|
|
5673
5638
|
*/
|
|
5674
5639
|
abstract rate(callId: string, rating: number, description: string): number;
|
|
5675
5640
|
|
|
@@ -5684,12 +5649,9 @@ export abstract class IRtcEngine {
|
|
|
5684
5649
|
* @returns
|
|
5685
5650
|
* 0: Success.
|
|
5686
5651
|
* < 0: Failure.
|
|
5652
|
+
* -1: A general error occurs (no specified reason).
|
|
5687
5653
|
* -2: The parameter is invalid.
|
|
5688
|
-
* -
|
|
5689
|
-
* The initialization of IRtcEngine fails. Reinitialize the IRtcEngine.
|
|
5690
|
-
* No user has joined the channel when the method is called. Please check your code logic.
|
|
5691
|
-
* The user has not left the channel when the rate or complain method is called. Please check your code logic.
|
|
5692
|
-
* The audio module is disabled. The program is not complete.
|
|
5654
|
+
* -7: The method is called before IRtcEngine is initialized.
|
|
5693
5655
|
*/
|
|
5694
5656
|
abstract complain(callId: string, description: string): number;
|
|
5695
5657
|
|
|
@@ -6002,7 +5964,7 @@ export abstract class IRtcEngine {
|
|
|
6002
5964
|
* If the orientation mode of the encoding video (OrientationMode) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.
|
|
6003
5965
|
* 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.
|
|
6004
5966
|
* Ensure that calling this method after enableVideo.
|
|
6005
|
-
* If you only want to add a watermark to the media push, you can call this method or the method.
|
|
5967
|
+
* If you only want to add a watermark to the media push, you can call this method or the startRtmpStreamWithTranscoding method.
|
|
6006
5968
|
* 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.
|
|
6007
5969
|
* 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.
|
|
6008
5970
|
* 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.
|
|
@@ -6632,14 +6594,11 @@ export abstract class IRtcEngine {
|
|
|
6632
6594
|
abstract sendAudioMetadata(metadata: string, length: number): number;
|
|
6633
6595
|
|
|
6634
6596
|
/**
|
|
6635
|
-
* Starts screen capture.
|
|
6597
|
+
* Starts screen capture from the specified video source.
|
|
6636
6598
|
*
|
|
6637
|
-
* This method
|
|
6638
|
-
* If you call this method to start screen capture, Agora recommends that you call stopScreenCaptureBySourceType to stop the capture and avoid using stopScreenCapture.
|
|
6599
|
+
* This method applies to the macOS and Windows only.
|
|
6639
6600
|
*
|
|
6640
|
-
* @param sourceType The type of the video source. See VideoSourceType.
|
|
6641
|
-
* Windows supports up to four screen capture video streams.
|
|
6642
|
-
* macOS supports only one screen capture video stream. You can only set this parameter to VideoSourceScreen (2).
|
|
6601
|
+
* @param sourceType The type of the video source. See VideoSourceType. On the macOS platform, this parameter can only be set to VideoSourceScreen (2).
|
|
6643
6602
|
* @param config The configuration of the captured screen. See ScreenCaptureConfiguration.
|
|
6644
6603
|
*
|
|
6645
6604
|
* @returns
|
|
@@ -6652,10 +6611,7 @@ export abstract class IRtcEngine {
|
|
|
6652
6611
|
): number;
|
|
6653
6612
|
|
|
6654
6613
|
/**
|
|
6655
|
-
* Stops screen capture.
|
|
6656
|
-
*
|
|
6657
|
-
* 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.
|
|
6658
|
-
* 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.
|
|
6614
|
+
* Stops screen capture from the specified video source.
|
|
6659
6615
|
*
|
|
6660
6616
|
* @param sourceType The type of the video source. See VideoSourceType.
|
|
6661
6617
|
*
|
|
@@ -6679,11 +6635,7 @@ export abstract class IRtcEngine {
|
|
|
6679
6635
|
/**
|
|
6680
6636
|
* Enables the local video preview.
|
|
6681
6637
|
*
|
|
6682
|
-
* You can call this method to enable local video preview.
|
|
6683
|
-
* Call setupLocalVideo to initialize the local preview.
|
|
6684
|
-
* Call enableVideo to enable the video module.
|
|
6685
|
-
* The local preview enables the mirror mode by default.
|
|
6686
|
-
* 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.
|
|
6638
|
+
* You can call this method to enable local video preview.
|
|
6687
6639
|
*
|
|
6688
6640
|
* @returns
|
|
6689
6641
|
* 0: Success.
|