agora-electron-sdk 4.4.0-dev.2 → 4.4.0
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 +2 -7
- package/js/Private/AgoraBase.js +22 -22
- package/js/Private/AgoraMediaBase.js +1 -1
- package/js/Private/IAgoraRtcEngine.js +64 -64
- package/package.json +3 -3
- package/ts/Private/AgoraBase.ts +23 -23
- package/ts/Private/AgoraMediaBase.ts +19 -15
- package/ts/Private/IAgoraMediaPlayer.ts +11 -12
- package/ts/Private/IAgoraMusicContentCenter.ts +13 -1
- package/ts/Private/IAgoraRtcEngine.ts +193 -154
- package/ts/Private/IAgoraRtcEngineEx.ts +16 -18
- package/types/Private/AgoraBase.d.ts +23 -23
- package/types/Private/AgoraMediaBase.d.ts +19 -15
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +11 -12
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts +13 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +193 -154
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +16 -18
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
|
@@ -1338,8 +1338,6 @@ export interface IRtcEngineEventHandler {
|
|
|
1338
1338
|
/**
|
|
1339
1339
|
* Occurs when a user rejoins the channel.
|
|
1340
1340
|
*
|
|
1341
|
-
* When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
|
|
1342
|
-
*
|
|
1343
1341
|
* @param uid The ID of the user who rejoins the channel.
|
|
1344
1342
|
* @param connection The connection information. See RtcConnection.
|
|
1345
1343
|
* @param elapsed Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback.
|
|
@@ -1678,10 +1676,7 @@ export interface IRtcEngineEventHandler {
|
|
|
1678
1676
|
* Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) joins the channel.
|
|
1679
1677
|
*
|
|
1680
1678
|
* In a communication channel, this callback indicates that a remote user joins the channel. The SDK also triggers this callback to report the existing users in the channel when a user joins the channel.
|
|
1681
|
-
* In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17.
|
|
1682
|
-
* A remote user/host joins the channel.
|
|
1683
|
-
* A remote user switches the user role to the host after joining the channel.
|
|
1684
|
-
* A remote user/host rejoins the channel after a network interruption.
|
|
1679
|
+
* In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17.
|
|
1685
1680
|
*
|
|
1686
1681
|
* @param connection The connection information. See RtcConnection.
|
|
1687
1682
|
* @param remoteUid The ID of the user or host who joins the channel.
|
|
@@ -2511,7 +2506,13 @@ export interface IRtcEngineEventHandler {
|
|
|
2511
2506
|
): void;
|
|
2512
2507
|
|
|
2513
2508
|
/**
|
|
2514
|
-
*
|
|
2509
|
+
* The event callback of the extension.
|
|
2510
|
+
*
|
|
2511
|
+
* To listen for events while the extension is running, you need to register this callback.
|
|
2512
|
+
*
|
|
2513
|
+
* @param context The context information of the extension, see ExtensionContext.
|
|
2514
|
+
* @param key The key of the extension.
|
|
2515
|
+
* @param value The value of the extension key.
|
|
2515
2516
|
*/
|
|
2516
2517
|
onExtensionEventWithContext?(
|
|
2517
2518
|
context: ExtensionContext,
|
|
@@ -2520,17 +2521,31 @@ export interface IRtcEngineEventHandler {
|
|
|
2520
2521
|
): void;
|
|
2521
2522
|
|
|
2522
2523
|
/**
|
|
2523
|
-
*
|
|
2524
|
+
* Occurrs when the extension is enabled.
|
|
2525
|
+
*
|
|
2526
|
+
* The callback is triggered after the extension is successfully enabled.
|
|
2527
|
+
*
|
|
2528
|
+
* @param context The context information of the extension, see ExtensionContext.
|
|
2524
2529
|
*/
|
|
2525
2530
|
onExtensionStartedWithContext?(context: ExtensionContext): void;
|
|
2526
2531
|
|
|
2527
2532
|
/**
|
|
2528
|
-
*
|
|
2533
|
+
* Occurs when the extension is disabled.
|
|
2534
|
+
*
|
|
2535
|
+
* The callback is triggered after the extension is successfully disabled.
|
|
2536
|
+
*
|
|
2537
|
+
* @param context The context information of the extension, see ExtensionContext.
|
|
2529
2538
|
*/
|
|
2530
2539
|
onExtensionStoppedWithContext?(context: ExtensionContext): void;
|
|
2531
2540
|
|
|
2532
2541
|
/**
|
|
2533
|
-
*
|
|
2542
|
+
* Occurs when the extension runs incorrectly.
|
|
2543
|
+
*
|
|
2544
|
+
* In case of extension enabling failure or runtime errors, the extension triggers this callback and reports the error code along with the reasons.
|
|
2545
|
+
*
|
|
2546
|
+
* @param context The context information of the extension, see ExtensionContext.
|
|
2547
|
+
* @param error Error code. For details, see the extension documentation provided by the extension provider.
|
|
2548
|
+
* @param message Reason. For details, see the extension documentation provided by the extension provider.
|
|
2534
2549
|
*/
|
|
2535
2550
|
onExtensionErrorWithContext?(
|
|
2536
2551
|
context: ExtensionContext,
|
|
@@ -3008,7 +3023,33 @@ export abstract class IRtcEngine {
|
|
|
3008
3023
|
): number;
|
|
3009
3024
|
|
|
3010
3025
|
/**
|
|
3011
|
-
*
|
|
3026
|
+
* Preloads a channel with token, channelId, and userAccount.
|
|
3027
|
+
*
|
|
3028
|
+
* 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.
|
|
3029
|
+
*
|
|
3030
|
+
* @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.
|
|
3031
|
+
* When preloading one channel, calling this method to pass in the new token.
|
|
3032
|
+
* When preloading more than one channels:
|
|
3033
|
+
* If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token. When generating a wildcard token, ensure the user ID is not set as 0.
|
|
3034
|
+
* If you use different tokens to preload different channels, call this method to pass in your user ID, channel name and the new token.
|
|
3035
|
+
* @param channelId The channel name that you want to preload. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
|
|
3036
|
+
* All lowercase English letters: a to z.
|
|
3037
|
+
* All uppercase English letters: A to Z.
|
|
3038
|
+
* All numeric characters: 0 to 9.
|
|
3039
|
+
* "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
|
|
3040
|
+
* @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are as follows(89 in total):
|
|
3041
|
+
* The 26 lowercase English letters: a to z.
|
|
3042
|
+
* The 26 uppercase English letters: A to Z.
|
|
3043
|
+
* All numeric characters: 0 to 9.
|
|
3044
|
+
* Space
|
|
3045
|
+
* "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
|
|
3046
|
+
*
|
|
3047
|
+
* @returns
|
|
3048
|
+
* 0: Success.
|
|
3049
|
+
* < 0: Failure.
|
|
3050
|
+
* -2: The parameter is invalid. For example, the User Account is empty. You need to pass in a valid parameter and join the channel again.
|
|
3051
|
+
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
3052
|
+
* -102: The channel name is invalid. You need to pass in a valid channel name and join the channel again.
|
|
3012
3053
|
*/
|
|
3013
3054
|
abstract preloadChannelWithUserAccount(
|
|
3014
3055
|
token: string,
|
|
@@ -3034,14 +3075,12 @@ export abstract class IRtcEngine {
|
|
|
3034
3075
|
/**
|
|
3035
3076
|
* Joins a channel with media options.
|
|
3036
3077
|
*
|
|
3037
|
-
* This method
|
|
3038
|
-
* The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks.
|
|
3039
|
-
* The remote client: onUserJoined, if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile. When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client.
|
|
3040
|
-
* This method allows users to join only one channel at a time.
|
|
3041
|
-
* Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token.
|
|
3042
|
-
* If you choose the Testing Mode (using an App ID for authentication) for your project and call this method to join a channel, you will automatically exit the channel after 24 hours.
|
|
3078
|
+
* This method supports setting the media options when joining a channel, such as whether to publish audio and video streams within the channel. or whether to automatically subscribe to the audio and video streams of all remote users when joining a channel. By default, the user subscribes to the audio and video streams of all the other users in the channel, giving rise to usage and billings. To stop subscribing to other streams, set the options parameter or call the corresponding mute methods.
|
|
3043
3079
|
*
|
|
3044
|
-
* @param token The token generated on your server for authentication.
|
|
3080
|
+
* @param token The token generated on your server for authentication.
|
|
3081
|
+
* (Recommended) If your project has enabled the security mode (using APP ID and Token for authentication), this parameter is required.
|
|
3082
|
+
* If you have only enabled the testing mode (using APP ID for authentication), this parameter is optional. You will automatically exit the channel 24 hours after successfully joining in.
|
|
3083
|
+
* If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel.
|
|
3045
3084
|
* @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
|
|
3046
3085
|
* All lowercase English letters: a to z.
|
|
3047
3086
|
* All uppercase English letters: A to Z.
|
|
@@ -3056,7 +3095,7 @@ export abstract class IRtcEngine {
|
|
|
3056
3095
|
* -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
|
|
3057
3096
|
* -3: Fails to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
|
|
3058
3097
|
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
3059
|
-
* -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling stopEchoTest to stop the test
|
|
3098
|
+
* -8: The internal state of the IRtcEngine object is wrong. The typical cause is that after calling startEchoTest to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.
|
|
3060
3099
|
* -17: The request to join the channel is rejected. The typical cause is that the user is already in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
|
|
3061
3100
|
* -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
|
|
3062
3101
|
* -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
|
|
@@ -3427,7 +3466,7 @@ export abstract class IRtcEngine {
|
|
|
3427
3466
|
* Initializes the video view of a remote user.
|
|
3428
3467
|
*
|
|
3429
3468
|
* This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user.
|
|
3430
|
-
*
|
|
3469
|
+
* When using the recording service, the app does not need to bind a view, as it does not send a video stream. If your app does not recognize the recording service, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback.
|
|
3431
3470
|
* If you want to stop rendering the view, set view to null and then call this method again to stop rendering and clear the rendering cache.
|
|
3432
3471
|
*
|
|
3433
3472
|
* @param canvas The remote video view and settings. See VideoCanvas.
|
|
@@ -3456,7 +3495,7 @@ export abstract class IRtcEngine {
|
|
|
3456
3495
|
*
|
|
3457
3496
|
* After successfully calling this method, the SDK will automatically enable the best practice strategies and adjust key performance metrics based on the specified scenario, to optimize the video experience. Call this method before joining a channel.
|
|
3458
3497
|
*
|
|
3459
|
-
* @param scenarioType The type of video application scenario. See VideoApplicationScenarioType. ApplicationScenarioMeeting (1) is suitable for meeting scenarios.
|
|
3498
|
+
* @param scenarioType The type of video application scenario. See VideoApplicationScenarioType. ApplicationScenarioMeeting (1) is suitable for meeting scenarios. The SDK automatically enables the following strategies:
|
|
3460
3499
|
* In meeting scenarios where low-quality video streams are required to have a high bitrate, the SDK automatically enables multiple technologies used to deal with network congestions, to enhance the performance of the low-quality streams and to ensure the smooth reception by subscribers.
|
|
3461
3500
|
* The SDK monitors the number of subscribers to the high-quality video stream in real time and dynamically adjusts its configuration based on the number of subscribers.
|
|
3462
3501
|
* If nobody subscribers to the high-quality stream, the SDK automatically reduces its bitrate and frame rate to save upstream bandwidth.
|
|
@@ -3469,7 +3508,7 @@ export abstract class IRtcEngine {
|
|
|
3469
3508
|
* If someone subscribes to the low-quality stream, the SDK enables the low-quality stream and resets it to the SimulcastStreamConfig configuration used in the most recent calling of setDualStreamMode. If no configuration has been set by the user previously, the following values are used:
|
|
3470
3509
|
* Resolution: 480 × 272
|
|
3471
3510
|
* Frame rate: 15 fps
|
|
3472
|
-
* Bitrate: 500 Kbps (2) is suitable for 1v1 video call scenarios.
|
|
3511
|
+
* Bitrate: 500 Kbps ApplicationScenario1v1 (2) is suitable for 1v1 video call scenarios. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions.
|
|
3473
3512
|
*
|
|
3474
3513
|
* @returns
|
|
3475
3514
|
* 0: Success.
|
|
@@ -3628,7 +3667,10 @@ export abstract class IRtcEngine {
|
|
|
3628
3667
|
/**
|
|
3629
3668
|
* Sets the default video stream type to subscribe to.
|
|
3630
3669
|
*
|
|
3631
|
-
* The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream.
|
|
3670
|
+
* The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. Depending on the default behavior of the sender and the specific settings when calling setDualStreamMode, the scenarios for the receiver calling this method are as follows:
|
|
3671
|
+
* The SDK enables low-quality video stream adaptive mode (AutoSimulcastStream) on the sender side by default, meaning only the high-quality video stream is transmitted. Only the receiver with the role of the host can call this method to initiate a low-quality video stream request. Once the sender receives the request, it starts automatically sending the low-quality video stream. At this point, all users in the channel can call this method to switch to low-quality video stream subscription mode.
|
|
3672
|
+
* If the sender calls setDualStreamMode and sets mode to DisableSimulcastStream (never send low-quality video stream), then calling this method will have no effect.
|
|
3673
|
+
* If the sender calls setDualStreamMode and sets mode to EnableSimulcastStream (always send low-quality video stream), both the host and audience receivers can call this method to switch to low-quality video stream subscription mode.
|
|
3632
3674
|
*
|
|
3633
3675
|
* @param streamType The default video-stream type. See VideoStreamType.
|
|
3634
3676
|
*
|
|
@@ -3653,10 +3695,11 @@ export abstract class IRtcEngine {
|
|
|
3653
3695
|
/**
|
|
3654
3696
|
* Sets the video stream type to subscribe to.
|
|
3655
3697
|
*
|
|
3656
|
-
*
|
|
3698
|
+
* Depending on the default behavior of the sender and the specific settings when calling setDualStreamMode, the scenarios for the receiver calling this method are as follows:
|
|
3699
|
+
* The SDK enables low-quality video stream adaptive mode (AutoSimulcastStream) on the sender side by default, meaning only the high-quality video stream is transmitted. Only the receiver with the role of the host can call this method to initiate a low-quality video stream request. Once the sender receives the request, it starts automatically sending the low-quality video stream. At this point, all users in the channel can call this method to switch to low-quality video stream subscription mode.
|
|
3700
|
+
* If the sender calls setDualStreamMode and sets mode to DisableSimulcastStream (never send low-quality video stream), then calling this method will have no effect.
|
|
3701
|
+
* If the sender calls setDualStreamMode and sets mode to EnableSimulcastStream (always send low-quality video stream), both the host and audience receivers can call this method to switch to low-quality video stream subscription mode. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream.
|
|
3657
3702
|
* You can call this method either before or after joining a channel.
|
|
3658
|
-
* If the publisher has already called setDualStreamMode and set mode to DisableSimulcastStream (never send low-quality video stream), calling this method will not take effect, you should call setDualStreamMode again on the sending end and adjust the settings.
|
|
3659
|
-
* Calling this method on the receiving end of the audience role will not take effect.
|
|
3660
3703
|
* If you call both this method and setRemoteDefaultVideoStreamType, the setting of this method takes effect.
|
|
3661
3704
|
*
|
|
3662
3705
|
* @param uid The user ID.
|
|
@@ -3841,7 +3884,7 @@ export abstract class IRtcEngine {
|
|
|
3841
3884
|
/**
|
|
3842
3885
|
* Creates a media player object.
|
|
3843
3886
|
*
|
|
3844
|
-
* Before calling any APIs in the IMediaPlayer class, you need to call this method to create an instance of the media player.
|
|
3887
|
+
* Before calling any APIs in the IMediaPlayer class, you need to call this method to create an instance of the media player. If you need to create multiple instances, you can call this method multiple times.
|
|
3845
3888
|
*
|
|
3846
3889
|
* @returns
|
|
3847
3890
|
* An IMediaPlayer object, if the method call succeeds.
|
|
@@ -3964,7 +4007,6 @@ export abstract class IRtcEngine {
|
|
|
3964
4007
|
* Adjusts the volume during audio mixing.
|
|
3965
4008
|
*
|
|
3966
4009
|
* This method adjusts the audio mixing volume on both the local client and remote clients.
|
|
3967
|
-
* Call this method after startAudioMixing.
|
|
3968
4010
|
*
|
|
3969
4011
|
* @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
|
|
3970
4012
|
*
|
|
@@ -3977,7 +4019,7 @@ export abstract class IRtcEngine {
|
|
|
3977
4019
|
/**
|
|
3978
4020
|
* Adjusts the volume of audio mixing for publishing.
|
|
3979
4021
|
*
|
|
3980
|
-
* This method adjusts the volume of audio mixing for publishing (sending to other users).
|
|
4022
|
+
* This method adjusts the volume of audio mixing for publishing (sending to other users).
|
|
3981
4023
|
*
|
|
3982
4024
|
* @param volume The volume of audio mixing for local playback. The value ranges between 0 and 100 (default). 100 represents the original volume.
|
|
3983
4025
|
*
|
|
@@ -4001,8 +4043,6 @@ export abstract class IRtcEngine {
|
|
|
4001
4043
|
/**
|
|
4002
4044
|
* Adjusts the volume of audio mixing for local playback.
|
|
4003
4045
|
*
|
|
4004
|
-
* Call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
|
|
4005
|
-
*
|
|
4006
4046
|
* @param volume The volume of audio mixing for local playback. The value ranges between 0 and 100 (default). 100 represents the original volume.
|
|
4007
4047
|
*
|
|
4008
4048
|
* @returns
|
|
@@ -4014,7 +4054,7 @@ export abstract class IRtcEngine {
|
|
|
4014
4054
|
/**
|
|
4015
4055
|
* Retrieves the audio mixing volume for local playback.
|
|
4016
4056
|
*
|
|
4017
|
-
*
|
|
4057
|
+
* You can call this method to get the local playback volume of the mixed audio file, which helps in troubleshooting volume‑related issues.
|
|
4018
4058
|
*
|
|
4019
4059
|
* @returns
|
|
4020
4060
|
* ≥ 0: The audio mixing volume, if this method call succeeds. The value range is [0,100].
|
|
@@ -4025,7 +4065,7 @@ export abstract class IRtcEngine {
|
|
|
4025
4065
|
/**
|
|
4026
4066
|
* Retrieves the duration (ms) of the music file.
|
|
4027
4067
|
*
|
|
4028
|
-
* Retrieves the total duration (ms) of the audio.
|
|
4068
|
+
* Retrieves the total duration (ms) of the audio.
|
|
4029
4069
|
*
|
|
4030
4070
|
* @returns
|
|
4031
4071
|
* ≥ 0: The audio mixing duration, if this method call succeeds.
|
|
@@ -4048,7 +4088,7 @@ export abstract class IRtcEngine {
|
|
|
4048
4088
|
/**
|
|
4049
4089
|
* Sets the audio mixing position.
|
|
4050
4090
|
*
|
|
4051
|
-
* Call this method to set the playback position of the music file to a different starting position (the default plays from the beginning).
|
|
4091
|
+
* Call this method to set the playback position of the music file to a different starting position (the default plays from the beginning).
|
|
4052
4092
|
*
|
|
4053
4093
|
* @param pos Integer. The playback position (ms).
|
|
4054
4094
|
*
|
|
@@ -4061,9 +4101,7 @@ export abstract class IRtcEngine {
|
|
|
4061
4101
|
/**
|
|
4062
4102
|
* Sets the channel mode of the current audio file.
|
|
4063
4103
|
*
|
|
4064
|
-
* In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode.
|
|
4065
|
-
* You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
|
|
4066
|
-
* This method only applies to stereo audio files.
|
|
4104
|
+
* In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode.
|
|
4067
4105
|
*
|
|
4068
4106
|
* @param mode The channel mode. See AudioMixingDualMonoMode.
|
|
4069
4107
|
*
|
|
@@ -4116,8 +4154,6 @@ export abstract class IRtcEngine {
|
|
|
4116
4154
|
/**
|
|
4117
4155
|
* Sets the volume of the audio effects.
|
|
4118
4156
|
*
|
|
4119
|
-
* Call this method after playEffect.
|
|
4120
|
-
*
|
|
4121
4157
|
* @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume.
|
|
4122
4158
|
*
|
|
4123
4159
|
* @returns
|
|
@@ -4222,7 +4258,7 @@ export abstract class IRtcEngine {
|
|
|
4222
4258
|
abstract getVolumeOfEffect(soundId: number): number;
|
|
4223
4259
|
|
|
4224
4260
|
/**
|
|
4225
|
-
*
|
|
4261
|
+
* Gets the volume of a specified audio effect file.
|
|
4226
4262
|
*
|
|
4227
4263
|
* @param soundId The ID of the audio effect. The ID of each audio effect file is unique.
|
|
4228
4264
|
* @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume.
|
|
@@ -4302,6 +4338,8 @@ export abstract class IRtcEngine {
|
|
|
4302
4338
|
/**
|
|
4303
4339
|
* Releases a specified preloaded audio effect from the memory.
|
|
4304
4340
|
*
|
|
4341
|
+
* After loading the audio effect file into memory using preloadEffect, if you need to release the audio effect file, call this method.
|
|
4342
|
+
*
|
|
4305
4343
|
* @param soundId The ID of the audio effect. Each audio effect has a unique ID.
|
|
4306
4344
|
*
|
|
4307
4345
|
* @returns
|
|
@@ -4444,14 +4482,7 @@ export abstract class IRtcEngine {
|
|
|
4444
4482
|
/**
|
|
4445
4483
|
* Sets an SDK preset audio effect.
|
|
4446
4484
|
*
|
|
4447
|
-
*
|
|
4448
|
-
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4449
|
-
* 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.
|
|
4450
|
-
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4451
|
-
* You can call this method either before or after joining a channel.
|
|
4452
|
-
* If you call setAudioEffectPreset and set enumerators except for RoomAcoustics3dVoice or PitchCorrection, do not call setAudioEffectParameters; otherwise, setAudioEffectPreset is overridden.
|
|
4453
|
-
* 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
|
|
4454
|
-
* 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.
|
|
4485
|
+
* 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.
|
|
4455
4486
|
*
|
|
4456
4487
|
* @param preset The options for SDK preset audio effects. See AudioEffectPreset.
|
|
4457
4488
|
*
|
|
@@ -4464,14 +4495,7 @@ export abstract class IRtcEngine {
|
|
|
4464
4495
|
/**
|
|
4465
4496
|
* Sets a preset voice beautifier effect.
|
|
4466
4497
|
*
|
|
4467
|
-
*
|
|
4468
|
-
* Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely AudioScenarioGameStreaming (3).
|
|
4469
|
-
* 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
|
-
* Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
|
|
4471
|
-
* You can call this method either before or after joining a channel.
|
|
4472
|
-
* This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
|
|
4473
|
-
* 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
|
|
4474
|
-
* 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.
|
|
4498
|
+
* Call this method to set a preset voice changing effect for the local user who publishes an audio stream in a channel. After setting the voice changing effect, all users in the channel can hear the effect. You can set different voice changing effects for the user depending on different scenarios.
|
|
4475
4499
|
*
|
|
4476
4500
|
* @param preset The options for the preset voice beautifier effects: VoiceConversionPreset.
|
|
4477
4501
|
*
|
|
@@ -4551,8 +4575,6 @@ export abstract class IRtcEngine {
|
|
|
4551
4575
|
/**
|
|
4552
4576
|
* Changes the voice pitch of the local speaker.
|
|
4553
4577
|
*
|
|
4554
|
-
* You can call this method either before or after joining a channel.
|
|
4555
|
-
*
|
|
4556
4578
|
* @param pitch The local voice pitch. The value range is [0.5,2.0]. The lower the value, the lower the pitch. The default value is 1.0 (no change to the pitch).
|
|
4557
4579
|
*
|
|
4558
4580
|
* @returns
|
|
@@ -4564,7 +4586,7 @@ export abstract class IRtcEngine {
|
|
|
4564
4586
|
/**
|
|
4565
4587
|
* Set the formant ratio to change the timbre of human voice.
|
|
4566
4588
|
*
|
|
4567
|
-
* Formant ratio affects the timbre of voice. The smaller the value, the deeper the sound will be, and the larger, the sharper.
|
|
4589
|
+
* Formant ratio affects the timbre of voice. The smaller the value, the deeper the sound will be, and the larger, the sharper. After you set the formant ratio, all users in the channel can hear the changed voice. If you want to change the timbre and pitch of voice at the same time, Agora recommends using this method together with setLocalVoicePitch.
|
|
4568
4590
|
*
|
|
4569
4591
|
* @param formantRatio The formant ratio. The value range is [-1.0, 1.0]. The default value is 0.0, which means do not change the timbre of the voice. Agora recommends setting this value within the range of [-0.4, 0.6]. Otherwise, the voice may be seriously distorted.
|
|
4570
4592
|
*
|
|
@@ -4577,8 +4599,6 @@ export abstract class IRtcEngine {
|
|
|
4577
4599
|
/**
|
|
4578
4600
|
* Sets the local voice equalization effect.
|
|
4579
4601
|
*
|
|
4580
|
-
* You can call this method either before or after joining a channel.
|
|
4581
|
-
*
|
|
4582
4602
|
* @param bandFrequency The band frequency. The value ranges between 0 and 9; representing the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 250, 500, 1k, 2k, 4k, 8k, and 16k Hz. See AudioEqualizationBandFrequency.
|
|
4583
4603
|
* @param bandGain The gain of each band in dB. The value ranges between -15 and 15. The default value is 0.
|
|
4584
4604
|
*
|
|
@@ -4638,14 +4658,23 @@ export abstract class IRtcEngine {
|
|
|
4638
4658
|
abstract setHeadphoneEQParameters(lowGain: number, highGain: number): number;
|
|
4639
4659
|
|
|
4640
4660
|
/**
|
|
4641
|
-
*
|
|
4661
|
+
* Enables or disables the voice AI tuner.
|
|
4662
|
+
*
|
|
4663
|
+
* The voice AI tuner supports enhancing sound quality and adjusting tone style.
|
|
4664
|
+
*
|
|
4665
|
+
* @param enabled Whether to enable the voice AI tuner: true : Enables the voice AI tuner. false : (Default) Disable the voice AI tuner.
|
|
4666
|
+
* @param type Voice AI tuner sound types, see VoiceAiTunerType.
|
|
4667
|
+
*
|
|
4668
|
+
* @returns
|
|
4669
|
+
* 0: Success.
|
|
4670
|
+
* < 0: Failure.
|
|
4642
4671
|
*/
|
|
4643
4672
|
abstract enableVoiceAITuner(enabled: boolean, type: VoiceAiTunerType): number;
|
|
4644
4673
|
|
|
4645
4674
|
/**
|
|
4646
4675
|
* Sets the log file.
|
|
4647
4676
|
*
|
|
4648
|
-
* Deprecated: This method is deprecated.
|
|
4677
|
+
* Deprecated: This method is deprecated. Set the log file path by configuring the context parameter when calling initialize. Specifies an SDK output log file. The log file records all log data for the SDK’s operation.
|
|
4649
4678
|
*
|
|
4650
4679
|
* @param filePath The complete path of the log files. These log files are encoded in UTF-8.
|
|
4651
4680
|
*
|
|
@@ -4671,9 +4700,9 @@ export abstract class IRtcEngine {
|
|
|
4671
4700
|
/**
|
|
4672
4701
|
* Sets the output log level of the SDK.
|
|
4673
4702
|
*
|
|
4674
|
-
* Deprecated: This method is deprecated.
|
|
4703
|
+
* Deprecated: This method is deprecated. Set the log file level by configuring the context parameter when calling initialize. Choose a level to see the logs preceding that level.
|
|
4675
4704
|
*
|
|
4676
|
-
* @param level The log level
|
|
4705
|
+
* @param level The log level. See LogLevel.
|
|
4677
4706
|
*
|
|
4678
4707
|
* @returns
|
|
4679
4708
|
* 0: Success.
|
|
@@ -5276,7 +5305,12 @@ export abstract class IRtcEngine {
|
|
|
5276
5305
|
): number;
|
|
5277
5306
|
|
|
5278
5307
|
/**
|
|
5279
|
-
*
|
|
5308
|
+
* Sets the camera capture configuration.
|
|
5309
|
+
*
|
|
5310
|
+
* @param config The camera capture configuration. See CameraCapturerConfiguration.
|
|
5311
|
+
*
|
|
5312
|
+
* @returns
|
|
5313
|
+
* < 0: Failure.
|
|
5280
5314
|
*/
|
|
5281
5315
|
abstract setCameraCapturerConfiguration(
|
|
5282
5316
|
config: CameraCapturerConfiguration
|
|
@@ -5934,7 +5968,7 @@ export abstract class IRtcEngine {
|
|
|
5934
5968
|
* Each user can have up to five data streams simultaneously.
|
|
5935
5969
|
* Up to 60 packets can be sent per second in a data stream with each packet having a maximum size of 1 KB.
|
|
5936
5970
|
* Up to 30 KB of data can be sent per second in a data stream. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client.
|
|
5937
|
-
*
|
|
5971
|
+
* This method needs to be called after createDataStream and joining the channel.
|
|
5938
5972
|
* In live streaming scenarios, this method only applies to hosts.
|
|
5939
5973
|
*
|
|
5940
5974
|
* @param streamId The data stream ID. You can get the data stream ID by calling createDataStream.
|
|
@@ -6103,7 +6137,7 @@ export abstract class IRtcEngine {
|
|
|
6103
6137
|
* Call the registerLocalUserAccount method to register a user account, and then call the joinChannelWithUserAccount method to join a channel, which can shorten the time it takes to enter the channel.
|
|
6104
6138
|
* Call the joinChannelWithUserAccount method to join a channel.
|
|
6105
6139
|
* Ensure that the userAccount is unique in the channel.
|
|
6106
|
-
* To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a
|
|
6140
|
+
* To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a UID, then ensure all the other users use the UID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
|
|
6107
6141
|
*
|
|
6108
6142
|
* @param appId The App ID of your project on Agora Console.
|
|
6109
6143
|
* @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are as follow(89 in total):
|
|
@@ -6120,14 +6154,14 @@ export abstract class IRtcEngine {
|
|
|
6120
6154
|
abstract registerLocalUserAccount(appId: string, userAccount: string): number;
|
|
6121
6155
|
|
|
6122
6156
|
/**
|
|
6123
|
-
*
|
|
6157
|
+
* Join a channel using a user account and token, and set the media options.
|
|
6124
6158
|
*
|
|
6125
|
-
* To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a
|
|
6126
|
-
* If you choose the Testing Mode (using an App ID for authentication) for your project and call this method to join a channel, you will automatically exit the channel after 24 hours. This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks:
|
|
6127
|
-
* The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks.
|
|
6128
|
-
* The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods.
|
|
6159
|
+
* Before calling this method, if you have not called registerLocalUserAccount to register a user account, when you call this method to join a channel, the SDK automatically creates a user account for you. Calling the registerLocalUserAccount method to register a user account, and then calling this method to join a channel can shorten the time it takes to enter the channel. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billings. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a UID, then ensure all the other users use the UID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
|
|
6129
6160
|
*
|
|
6130
|
-
* @param token The token generated on your server for authentication.
|
|
6161
|
+
* @param token The token generated on your server for authentication.
|
|
6162
|
+
* (Recommended) If your project has enabled the security mode (using APP ID and Token for authentication), this parameter is required.
|
|
6163
|
+
* If you have only enabled the testing mode (using APP ID for authentication), this parameter is optional. You will automatically exit the channel 24 hours after successfully joining in.
|
|
6164
|
+
* If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel.
|
|
6131
6165
|
* @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
|
|
6132
6166
|
* All lowercase English letters: a to z.
|
|
6133
6167
|
* All uppercase English letters: A to Z.
|
|
@@ -6147,7 +6181,7 @@ export abstract class IRtcEngine {
|
|
|
6147
6181
|
* -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
|
|
6148
6182
|
* -3: Fails to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
|
|
6149
6183
|
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
6150
|
-
* -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling stopEchoTest to stop the test
|
|
6184
|
+
* -8: The internal state of the IRtcEngine object is wrong. The typical cause is that after calling startEchoTest to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.
|
|
6151
6185
|
* -17: The request to join the channel is rejected. The typical cause is that the user is already in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
|
|
6152
6186
|
* -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
|
|
6153
6187
|
* -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
|
|
@@ -6160,13 +6194,14 @@ export abstract class IRtcEngine {
|
|
|
6160
6194
|
): number;
|
|
6161
6195
|
|
|
6162
6196
|
/**
|
|
6163
|
-
*
|
|
6197
|
+
* Join a channel using a user account and token, and set the media options.
|
|
6164
6198
|
*
|
|
6165
|
-
*
|
|
6166
|
-
* The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks.
|
|
6167
|
-
* The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
|
|
6199
|
+
* Before calling this method, if you have not called registerLocalUserAccount to register a user account, when you call this method to join a channel, the SDK automatically creates a user account for you. Calling the registerLocalUserAccount method to register a user account, and then calling this method to join a channel can shorten the time it takes to enter the channel. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billings. If you want to stop subscribing to the media stream of other users, you can set the options parameter or call the corresponding mute method. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a UID, then ensure all the other users use the UID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
|
|
6168
6200
|
*
|
|
6169
|
-
* @param token The token generated on your server for authentication.
|
|
6201
|
+
* @param token The token generated on your server for authentication.
|
|
6202
|
+
* (Recommended) If your project has enabled the security mode (using APP ID and Token for authentication), this parameter is required.
|
|
6203
|
+
* If you have only enabled the testing mode (using APP ID for authentication), this parameter is optional. You will automatically exit the channel 24 hours after successfully joining in.
|
|
6204
|
+
* If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel.
|
|
6170
6205
|
* @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
|
|
6171
6206
|
* All lowercase English letters: a to z.
|
|
6172
6207
|
* All uppercase English letters: A to Z.
|
|
@@ -6183,6 +6218,13 @@ export abstract class IRtcEngine {
|
|
|
6183
6218
|
* @returns
|
|
6184
6219
|
* 0: Success.
|
|
6185
6220
|
* < 0: Failure.
|
|
6221
|
+
* -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
|
|
6222
|
+
* -3: Fails to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
|
|
6223
|
+
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
6224
|
+
* -8: The internal state of the IRtcEngine object is wrong. The typical cause is that after calling startEchoTest to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.
|
|
6225
|
+
* -17: The request to join the channel is rejected. The typical cause is that the user is already in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
|
|
6226
|
+
* -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
|
|
6227
|
+
* -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
|
|
6186
6228
|
*/
|
|
6187
6229
|
abstract joinChannelWithUserAccountEx(
|
|
6188
6230
|
token: string,
|
|
@@ -6339,9 +6381,8 @@ export abstract class IRtcEngine {
|
|
|
6339
6381
|
/**
|
|
6340
6382
|
* Enables the virtual metronome.
|
|
6341
6383
|
*
|
|
6342
|
-
*
|
|
6343
|
-
*
|
|
6344
|
-
* By default, the sound of the virtual metronome is published in the channel. If you do not want the sound to be heard by the remote users, you can set publishRhythmPlayerTrack in ChannelMediaOptions as false.
|
|
6384
|
+
* After enabling the virtual metronome, the SDK plays the specified audio effect file from the beginning, and controls the playback duration of each file according to beatsPerMinute you set in AgoraRhythmPlayerConfig. For example, if you set beatsPerMinute as 60, the SDK plays one beat every second. If the file duration exceeds the beat duration, the SDK only plays the audio within the beat duration.
|
|
6385
|
+
* By default, the sound of the virtual metronome is published in the channel. If you want the sound to be heard by the remote users, you can set publishRhythmPlayerTrack in ChannelMediaOptions as true.
|
|
6345
6386
|
*
|
|
6346
6387
|
* @param sound1 The absolute path or URL address (including the filename extensions) of the file for the downbeat. For example, C:\music\audio.mp4. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
|
|
6347
6388
|
* @param sound2 The absolute path or URL address (including the filename extensions) of the file for the upbeats. For example, C:\music\audio.mp4. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
|
|
@@ -6363,8 +6404,9 @@ export abstract class IRtcEngine {
|
|
|
6363
6404
|
/**
|
|
6364
6405
|
* Configures the virtual metronome.
|
|
6365
6406
|
*
|
|
6366
|
-
* After
|
|
6367
|
-
*
|
|
6407
|
+
* After calling startRhythmPlayer, you can call this method to reconfigure the virtual metronome.
|
|
6408
|
+
* After enabling the virtual metronome, the SDK plays the specified audio effect file from the beginning, and controls the playback duration of each file according to beatsPerMinute you set in AgoraRhythmPlayerConfig. For example, if you set beatsPerMinute as 60, the SDK plays one beat every second. If the file duration exceeds the beat duration, the SDK only plays the audio within the beat duration.
|
|
6409
|
+
* By default, the sound of the virtual metronome is published in the channel. If you want the sound to be heard by the remote users, you can set publishRhythmPlayerTrack in ChannelMediaOptions as true.
|
|
6368
6410
|
*
|
|
6369
6411
|
* @param config The metronome configuration. See AgoraRhythmPlayerConfig.
|
|
6370
6412
|
*/
|
|
@@ -6373,10 +6415,7 @@ export abstract class IRtcEngine {
|
|
|
6373
6415
|
/**
|
|
6374
6416
|
* Takes a snapshot of a video stream.
|
|
6375
6417
|
*
|
|
6376
|
-
* This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
|
|
6377
|
-
* Call this method after joining a channel.
|
|
6378
|
-
* When used for local video snapshots, this method takes a snapshot for the video streams specified in ChannelMediaOptions.
|
|
6379
|
-
* If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
|
|
6418
|
+
* This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
|
|
6380
6419
|
*
|
|
6381
6420
|
* @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
|
|
6382
6421
|
* @param filePath The local path (including filename extensions) of the snapshot. For example:
|
|
@@ -6487,7 +6526,7 @@ export abstract class IRtcEngine {
|
|
|
6487
6526
|
/**
|
|
6488
6527
|
* Sets whether to replace the current video feeds with images when publishing video streams.
|
|
6489
6528
|
*
|
|
6490
|
-
*
|
|
6529
|
+
* When publishing video streams, you can call this method to replace the current video feeds with custom images. Once you enable this function, you can select images to replace the video feeds through the ImageTrackOptions parameter. If you disable this function, the remote users see the video feeds that you publish.
|
|
6491
6530
|
*
|
|
6492
6531
|
* @param enable Whether to replace the current video feeds with custom images: true : Replace the current video feeds with custom images. false : (Default) Do not replace the current video feeds with custom images.
|
|
6493
6532
|
* @param options Image configurations. See ImageTrackOptions.
|
|
@@ -6818,131 +6857,131 @@ export enum MediaDeviceStateType {
|
|
|
6818
6857
|
}
|
|
6819
6858
|
|
|
6820
6859
|
/**
|
|
6821
|
-
*
|
|
6860
|
+
* @ignore
|
|
6822
6861
|
*/
|
|
6823
6862
|
export enum VideoProfileType {
|
|
6824
6863
|
/**
|
|
6825
|
-
*
|
|
6864
|
+
* @ignore
|
|
6826
6865
|
*/
|
|
6827
6866
|
VideoProfileLandscape120p = 0,
|
|
6828
6867
|
/**
|
|
6829
|
-
*
|
|
6868
|
+
* @ignore
|
|
6830
6869
|
*/
|
|
6831
6870
|
VideoProfileLandscape120p3 = 2,
|
|
6832
6871
|
/**
|
|
6833
|
-
*
|
|
6872
|
+
* @ignore
|
|
6834
6873
|
*/
|
|
6835
6874
|
VideoProfileLandscape180p = 10,
|
|
6836
6875
|
/**
|
|
6837
|
-
*
|
|
6876
|
+
* @ignore
|
|
6838
6877
|
*/
|
|
6839
6878
|
VideoProfileLandscape180p3 = 12,
|
|
6840
6879
|
/**
|
|
6841
|
-
*
|
|
6880
|
+
* @ignore
|
|
6842
6881
|
*/
|
|
6843
6882
|
VideoProfileLandscape180p4 = 13,
|
|
6844
6883
|
/**
|
|
6845
|
-
*
|
|
6884
|
+
* @ignore
|
|
6846
6885
|
*/
|
|
6847
6886
|
VideoProfileLandscape240p = 20,
|
|
6848
6887
|
/**
|
|
6849
|
-
*
|
|
6888
|
+
* @ignore
|
|
6850
6889
|
*/
|
|
6851
6890
|
VideoProfileLandscape240p3 = 22,
|
|
6852
6891
|
/**
|
|
6853
|
-
*
|
|
6892
|
+
* @ignore
|
|
6854
6893
|
*/
|
|
6855
6894
|
VideoProfileLandscape240p4 = 23,
|
|
6856
6895
|
/**
|
|
6857
|
-
*
|
|
6896
|
+
* @ignore
|
|
6858
6897
|
*/
|
|
6859
6898
|
VideoProfileLandscape360p = 30,
|
|
6860
6899
|
/**
|
|
6861
|
-
*
|
|
6900
|
+
* @ignore
|
|
6862
6901
|
*/
|
|
6863
6902
|
VideoProfileLandscape360p3 = 32,
|
|
6864
6903
|
/**
|
|
6865
|
-
*
|
|
6904
|
+
* @ignore
|
|
6866
6905
|
*/
|
|
6867
6906
|
VideoProfileLandscape360p4 = 33,
|
|
6868
6907
|
/**
|
|
6869
|
-
*
|
|
6908
|
+
* @ignore
|
|
6870
6909
|
*/
|
|
6871
6910
|
VideoProfileLandscape360p6 = 35,
|
|
6872
6911
|
/**
|
|
6873
|
-
*
|
|
6912
|
+
* @ignore
|
|
6874
6913
|
*/
|
|
6875
6914
|
VideoProfileLandscape360p7 = 36,
|
|
6876
6915
|
/**
|
|
6877
|
-
*
|
|
6916
|
+
* @ignore
|
|
6878
6917
|
*/
|
|
6879
6918
|
VideoProfileLandscape360p8 = 37,
|
|
6880
6919
|
/**
|
|
6881
|
-
*
|
|
6920
|
+
* @ignore
|
|
6882
6921
|
*/
|
|
6883
6922
|
VideoProfileLandscape360p9 = 38,
|
|
6884
6923
|
/**
|
|
6885
|
-
*
|
|
6924
|
+
* @ignore
|
|
6886
6925
|
*/
|
|
6887
6926
|
VideoProfileLandscape360p10 = 39,
|
|
6888
6927
|
/**
|
|
6889
|
-
*
|
|
6928
|
+
* @ignore
|
|
6890
6929
|
*/
|
|
6891
6930
|
VideoProfileLandscape360p11 = 100,
|
|
6892
6931
|
/**
|
|
6893
|
-
*
|
|
6932
|
+
* @ignore
|
|
6894
6933
|
*/
|
|
6895
6934
|
VideoProfileLandscape480p = 40,
|
|
6896
6935
|
/**
|
|
6897
|
-
*
|
|
6936
|
+
* @ignore
|
|
6898
6937
|
*/
|
|
6899
6938
|
VideoProfileLandscape480p3 = 42,
|
|
6900
6939
|
/**
|
|
6901
|
-
*
|
|
6940
|
+
* @ignore
|
|
6902
6941
|
*/
|
|
6903
6942
|
VideoProfileLandscape480p4 = 43,
|
|
6904
6943
|
/**
|
|
6905
|
-
*
|
|
6944
|
+
* @ignore
|
|
6906
6945
|
*/
|
|
6907
6946
|
VideoProfileLandscape480p6 = 45,
|
|
6908
6947
|
/**
|
|
6909
|
-
*
|
|
6948
|
+
* @ignore
|
|
6910
6949
|
*/
|
|
6911
6950
|
VideoProfileLandscape480p8 = 47,
|
|
6912
6951
|
/**
|
|
6913
|
-
*
|
|
6952
|
+
* @ignore
|
|
6914
6953
|
*/
|
|
6915
6954
|
VideoProfileLandscape480p9 = 48,
|
|
6916
6955
|
/**
|
|
6917
|
-
*
|
|
6956
|
+
* @ignore
|
|
6918
6957
|
*/
|
|
6919
6958
|
VideoProfileLandscape480p10 = 49,
|
|
6920
6959
|
/**
|
|
6921
|
-
*
|
|
6960
|
+
* @ignore
|
|
6922
6961
|
*/
|
|
6923
6962
|
VideoProfileLandscape720p = 50,
|
|
6924
6963
|
/**
|
|
6925
|
-
*
|
|
6964
|
+
* @ignore
|
|
6926
6965
|
*/
|
|
6927
6966
|
VideoProfileLandscape720p3 = 52,
|
|
6928
6967
|
/**
|
|
6929
|
-
*
|
|
6968
|
+
* @ignore
|
|
6930
6969
|
*/
|
|
6931
6970
|
VideoProfileLandscape720p5 = 54,
|
|
6932
6971
|
/**
|
|
6933
|
-
*
|
|
6972
|
+
* @ignore
|
|
6934
6973
|
*/
|
|
6935
6974
|
VideoProfileLandscape720p6 = 55,
|
|
6936
6975
|
/**
|
|
6937
|
-
*
|
|
6976
|
+
* @ignore
|
|
6938
6977
|
*/
|
|
6939
6978
|
VideoProfileLandscape1080p = 60,
|
|
6940
6979
|
/**
|
|
6941
|
-
*
|
|
6980
|
+
* @ignore
|
|
6942
6981
|
*/
|
|
6943
6982
|
VideoProfileLandscape1080p3 = 62,
|
|
6944
6983
|
/**
|
|
6945
|
-
*
|
|
6984
|
+
* @ignore
|
|
6946
6985
|
*/
|
|
6947
6986
|
VideoProfileLandscape1080p5 = 64,
|
|
6948
6987
|
/**
|
|
@@ -6962,127 +7001,127 @@ export enum VideoProfileType {
|
|
|
6962
7001
|
*/
|
|
6963
7002
|
VideoProfileLandscape4k3 = 72,
|
|
6964
7003
|
/**
|
|
6965
|
-
*
|
|
7004
|
+
* @ignore
|
|
6966
7005
|
*/
|
|
6967
7006
|
VideoProfilePortrait120p = 1000,
|
|
6968
7007
|
/**
|
|
6969
|
-
*
|
|
7008
|
+
* @ignore
|
|
6970
7009
|
*/
|
|
6971
7010
|
VideoProfilePortrait120p3 = 1002,
|
|
6972
7011
|
/**
|
|
6973
|
-
*
|
|
7012
|
+
* @ignore
|
|
6974
7013
|
*/
|
|
6975
7014
|
VideoProfilePortrait180p = 1010,
|
|
6976
7015
|
/**
|
|
6977
|
-
*
|
|
7016
|
+
* @ignore
|
|
6978
7017
|
*/
|
|
6979
7018
|
VideoProfilePortrait180p3 = 1012,
|
|
6980
7019
|
/**
|
|
6981
|
-
*
|
|
7020
|
+
* @ignore
|
|
6982
7021
|
*/
|
|
6983
7022
|
VideoProfilePortrait180p4 = 1013,
|
|
6984
7023
|
/**
|
|
6985
|
-
*
|
|
7024
|
+
* @ignore
|
|
6986
7025
|
*/
|
|
6987
7026
|
VideoProfilePortrait240p = 1020,
|
|
6988
7027
|
/**
|
|
6989
|
-
*
|
|
7028
|
+
* @ignore
|
|
6990
7029
|
*/
|
|
6991
7030
|
VideoProfilePortrait240p3 = 1022,
|
|
6992
7031
|
/**
|
|
6993
|
-
*
|
|
7032
|
+
* @ignore
|
|
6994
7033
|
*/
|
|
6995
7034
|
VideoProfilePortrait240p4 = 1023,
|
|
6996
7035
|
/**
|
|
6997
|
-
*
|
|
7036
|
+
* @ignore
|
|
6998
7037
|
*/
|
|
6999
7038
|
VideoProfilePortrait360p = 1030,
|
|
7000
7039
|
/**
|
|
7001
|
-
*
|
|
7040
|
+
* @ignore
|
|
7002
7041
|
*/
|
|
7003
7042
|
VideoProfilePortrait360p3 = 1032,
|
|
7004
7043
|
/**
|
|
7005
|
-
*
|
|
7044
|
+
* @ignore
|
|
7006
7045
|
*/
|
|
7007
7046
|
VideoProfilePortrait360p4 = 1033,
|
|
7008
7047
|
/**
|
|
7009
|
-
*
|
|
7048
|
+
* @ignore
|
|
7010
7049
|
*/
|
|
7011
7050
|
VideoProfilePortrait360p6 = 1035,
|
|
7012
7051
|
/**
|
|
7013
|
-
*
|
|
7052
|
+
* @ignore
|
|
7014
7053
|
*/
|
|
7015
7054
|
VideoProfilePortrait360p7 = 1036,
|
|
7016
7055
|
/**
|
|
7017
|
-
*
|
|
7056
|
+
* @ignore
|
|
7018
7057
|
*/
|
|
7019
7058
|
VideoProfilePortrait360p8 = 1037,
|
|
7020
7059
|
/**
|
|
7021
|
-
*
|
|
7060
|
+
* @ignore
|
|
7022
7061
|
*/
|
|
7023
7062
|
VideoProfilePortrait360p9 = 1038,
|
|
7024
7063
|
/**
|
|
7025
|
-
*
|
|
7064
|
+
* @ignore
|
|
7026
7065
|
*/
|
|
7027
7066
|
VideoProfilePortrait360p10 = 1039,
|
|
7028
7067
|
/**
|
|
7029
|
-
*
|
|
7068
|
+
* @ignore
|
|
7030
7069
|
*/
|
|
7031
7070
|
VideoProfilePortrait360p11 = 1100,
|
|
7032
7071
|
/**
|
|
7033
|
-
*
|
|
7072
|
+
* @ignore
|
|
7034
7073
|
*/
|
|
7035
7074
|
VideoProfilePortrait480p = 1040,
|
|
7036
7075
|
/**
|
|
7037
|
-
*
|
|
7076
|
+
* @ignore
|
|
7038
7077
|
*/
|
|
7039
7078
|
VideoProfilePortrait480p3 = 1042,
|
|
7040
7079
|
/**
|
|
7041
|
-
*
|
|
7080
|
+
* @ignore
|
|
7042
7081
|
*/
|
|
7043
7082
|
VideoProfilePortrait480p4 = 1043,
|
|
7044
7083
|
/**
|
|
7045
|
-
*
|
|
7084
|
+
* @ignore
|
|
7046
7085
|
*/
|
|
7047
7086
|
VideoProfilePortrait480p6 = 1045,
|
|
7048
7087
|
/**
|
|
7049
|
-
*
|
|
7088
|
+
* @ignore
|
|
7050
7089
|
*/
|
|
7051
7090
|
VideoProfilePortrait480p8 = 1047,
|
|
7052
7091
|
/**
|
|
7053
|
-
*
|
|
7092
|
+
* @ignore
|
|
7054
7093
|
*/
|
|
7055
7094
|
VideoProfilePortrait480p9 = 1048,
|
|
7056
7095
|
/**
|
|
7057
|
-
*
|
|
7096
|
+
* @ignore
|
|
7058
7097
|
*/
|
|
7059
7098
|
VideoProfilePortrait480p10 = 1049,
|
|
7060
7099
|
/**
|
|
7061
|
-
*
|
|
7100
|
+
* @ignore
|
|
7062
7101
|
*/
|
|
7063
7102
|
VideoProfilePortrait720p = 1050,
|
|
7064
7103
|
/**
|
|
7065
|
-
*
|
|
7104
|
+
* @ignore
|
|
7066
7105
|
*/
|
|
7067
7106
|
VideoProfilePortrait720p3 = 1052,
|
|
7068
7107
|
/**
|
|
7069
|
-
*
|
|
7108
|
+
* @ignore
|
|
7070
7109
|
*/
|
|
7071
7110
|
VideoProfilePortrait720p5 = 1054,
|
|
7072
7111
|
/**
|
|
7073
|
-
*
|
|
7112
|
+
* @ignore
|
|
7074
7113
|
*/
|
|
7075
7114
|
VideoProfilePortrait720p6 = 1055,
|
|
7076
7115
|
/**
|
|
7077
|
-
*
|
|
7116
|
+
* @ignore
|
|
7078
7117
|
*/
|
|
7079
7118
|
VideoProfilePortrait1080p = 1060,
|
|
7080
7119
|
/**
|
|
7081
|
-
*
|
|
7120
|
+
* @ignore
|
|
7082
7121
|
*/
|
|
7083
7122
|
VideoProfilePortrait1080p3 = 1062,
|
|
7084
7123
|
/**
|
|
7085
|
-
*
|
|
7124
|
+
* @ignore
|
|
7086
7125
|
*/
|
|
7087
7126
|
VideoProfilePortrait1080p5 = 1064,
|
|
7088
7127
|
/**
|
|
@@ -7102,7 +7141,7 @@ export enum VideoProfileType {
|
|
|
7102
7141
|
*/
|
|
7103
7142
|
VideoProfilePortrait4k3 = 1072,
|
|
7104
7143
|
/**
|
|
7105
|
-
*
|
|
7144
|
+
* @ignore
|
|
7106
7145
|
*/
|
|
7107
7146
|
VideoProfileDefault = 30,
|
|
7108
7147
|
}
|