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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/gulpfile.js +3 -1
  3. package/js/AgoraSdk.js +5 -5
  4. package/js/Private/AgoraBase.js +374 -333
  5. package/js/Private/AgoraMediaBase.js +293 -78
  6. package/js/Private/AgoraMediaPlayerTypes.js +12 -30
  7. package/js/Private/IAgoraH265Transcoder.js +2 -5
  8. package/js/Private/IAgoraLog.js +6 -5
  9. package/js/Private/IAgoraMediaEngine.js +2 -5
  10. package/js/Private/IAgoraMediaPlayer.js +4 -10
  11. package/js/Private/IAgoraMediaRecorder.js +2 -5
  12. package/js/Private/IAgoraMediaStreamingSource.js +2 -5
  13. package/js/Private/IAgoraMusicContentCenter.js +21 -68
  14. package/js/Private/IAgoraRhythmPlayer.js +14 -17
  15. package/js/Private/IAgoraRtcEngine.js +76 -130
  16. package/js/Private/IAgoraRtcEngineEx.js +5 -28
  17. package/js/Private/IAgoraSpatialAudio.js +6 -15
  18. package/js/Private/IAudioDeviceManager.js +2 -5
  19. package/js/Private/impl/AgoraMediaBaseImpl.js +11 -14
  20. package/js/Private/impl/IAgoraH265TranscoderImpl.js +43 -46
  21. package/js/Private/impl/IAgoraMediaEngineImpl.js +155 -172
  22. package/js/Private/impl/IAgoraMediaPlayerImpl.js +534 -546
  23. package/js/Private/impl/IAgoraMediaRecorderImpl.js +26 -29
  24. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +218 -251
  25. package/js/Private/impl/IAgoraRtcEngineExImpl.js +434 -436
  26. package/js/Private/impl/IAgoraRtcEngineImpl.js +2429 -2439
  27. package/js/Private/impl/IAgoraSpatialAudioImpl.js +167 -170
  28. package/js/Private/impl/IAudioDeviceManagerImpl.js +232 -235
  29. package/js/Private/internal/AgoraH265TranscoderInternal.js +33 -57
  30. package/js/Private/internal/AgoraMediaBaseInternal.js +9 -28
  31. package/js/Private/internal/AudioDeviceManagerInternal.js +24 -44
  32. package/js/Private/internal/IrisApiEngine.js +94 -145
  33. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +3 -23
  34. package/js/Private/internal/MediaEngineInternal.js +69 -94
  35. package/js/Private/internal/MediaPlayerInternal.js +105 -125
  36. package/js/Private/internal/MediaRecorderInternal.js +37 -64
  37. package/js/Private/internal/MusicContentCenterInternal.js +92 -129
  38. package/js/Private/internal/RtcEngineExInternal.js +219 -243
  39. package/js/Private/ti/AgoraBase-ti.js +2 -2
  40. package/js/Private/ti/AgoraMediaBase-ti.js +2 -2
  41. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
  42. package/js/Private/ti/IAgoraH265Transcoder-ti.js +2 -2
  43. package/js/Private/ti/IAgoraLog-ti.js +1 -1
  44. package/js/Private/ti/IAgoraMediaEngine-ti.js +1 -1
  45. package/js/Private/ti/IAgoraMediaPlayer-ti.js +2 -2
  46. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +2 -2
  47. package/js/Private/ti/IAgoraMediaRecorder-ti.js +1 -1
  48. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +1 -1
  49. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +2 -2
  50. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
  51. package/js/Private/ti/IAgoraRtcEngine-ti.js +7 -7
  52. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +1 -1
  53. package/js/Private/ti/IAgoraSpatialAudio-ti.js +1 -1
  54. package/js/Private/ti/IAudioDeviceManager-ti.js +1 -1
  55. package/js/Renderer/AgoraView.js +120 -146
  56. package/js/Renderer/IRenderer.js +43 -53
  57. package/js/Renderer/IRendererManager.js +119 -132
  58. package/js/Renderer/RendererCache.js +63 -96
  59. package/js/Renderer/RendererManager.js +35 -69
  60. package/js/Renderer/WebGLRenderer/index.js +77 -106
  61. package/js/Renderer/YUVCanvasRenderer/index.js +18 -40
  62. package/js/Utils.js +45 -64
  63. package/package.json +13 -7
  64. package/scripts/checkElectron.js +41 -0
  65. package/scripts/downloadPrebuild.js +54 -16
  66. package/scripts/synclib.js +6 -6
  67. package/ts/AgoraSdk.ts +1 -1
  68. package/ts/Private/AgoraBase.ts +282 -13
  69. package/ts/Private/AgoraMediaBase.ts +390 -32
  70. package/ts/Private/IAgoraLog.ts +4 -0
  71. package/ts/Private/IAgoraMediaEngine.ts +10 -21
  72. package/ts/Private/IAgoraMediaPlayer.ts +2 -0
  73. package/ts/Private/IAgoraRhythmPlayer.ts +12 -12
  74. package/ts/Private/IAgoraRtcEngine.ts +243 -237
  75. package/ts/Private/IAgoraRtcEngineEx.ts +34 -26
  76. package/ts/Private/IAudioDeviceManager.ts +4 -4
  77. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +30 -0
  78. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +181 -103
  79. package/ts/Private/internal/IrisApiEngine.ts +3 -7
  80. package/ts/Private/internal/MediaEngineInternal.ts +0 -1
  81. package/ts/Private/internal/RtcEngineExInternal.ts +14 -5
  82. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +5 -5
  83. package/ts/Renderer/AgoraView.ts +33 -4
  84. package/ts/Renderer/IRenderer.ts +1 -2
  85. package/ts/Renderer/IRendererManager.ts +41 -14
  86. package/ts/Renderer/RendererCache.ts +2 -2
  87. package/ts/Types.ts +1 -1
  88. package/ts/Utils.ts +15 -0
  89. package/types/AgoraSdk.d.ts +1 -1
  90. package/types/Private/AgoraBase.d.ts +277 -17
  91. package/types/Private/AgoraBase.d.ts.map +1 -1
  92. package/types/Private/AgoraMediaBase.d.ts +382 -32
  93. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  94. package/types/Private/IAgoraLog.d.ts +5 -1
  95. package/types/Private/IAgoraLog.d.ts.map +1 -1
  96. package/types/Private/IAgoraMediaEngine.d.ts +10 -21
  97. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  98. package/types/Private/IAgoraMediaPlayer.d.ts +2 -0
  99. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  100. package/types/Private/IAgoraRhythmPlayer.d.ts +12 -12
  101. package/types/Private/IAgoraRtcEngine.d.ts +219 -232
  102. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  103. package/types/Private/IAgoraRtcEngineEx.d.ts +30 -27
  104. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  105. package/types/Private/IAudioDeviceManager.d.ts +4 -4
  106. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +3 -1
  107. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
  108. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +13 -9
  109. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  110. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
  111. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -1
  112. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
  113. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  114. package/types/Renderer/AgoraView.d.ts +8 -2
  115. package/types/Renderer/AgoraView.d.ts.map +1 -1
  116. package/types/Renderer/IRenderer.d.ts.map +1 -1
  117. package/types/Renderer/IRendererManager.d.ts.map +1 -1
  118. package/types/Renderer/RendererCache.d.ts +1 -1
  119. package/types/Renderer/RendererCache.d.ts.map +1 -1
  120. package/types/Types.d.ts +1 -1
  121. package/types/Types.d.ts.map +1 -1
  122. package/types/Utils.d.ts +4 -0
  123. package/types/Utils.d.ts.map +1 -1
@@ -33,6 +33,9 @@ import {
33
33
  EncryptionConfig,
34
34
  EncryptionErrorType,
35
35
  ErrorCodeType,
36
+ FaceShapeArea,
37
+ FaceShapeAreaOptions,
38
+ FaceShapeBeautyOptions,
36
39
  FocalLengthInfo,
37
40
  HeadphoneEqualizerPreset,
38
41
  IAudioEncodedFrameObserver,
@@ -68,6 +71,7 @@ import {
68
71
  ScreenScenarioType,
69
72
  SegmentationProperty,
70
73
  SenderOptions,
74
+ SimulcastConfig,
71
75
  SimulcastStreamConfig,
72
76
  SimulcastStreamMode,
73
77
  SpatialAudioParams,
@@ -84,6 +88,7 @@ import {
84
88
  VideoCodecType,
85
89
  VideoContentHint,
86
90
  VideoDenoiserOptions,
91
+ VideoDimensions,
87
92
  VideoEncoderConfiguration,
88
93
  VideoFormat,
89
94
  VideoLayout,
@@ -95,6 +100,7 @@ import {
95
100
  VideoSubscriptionOptions,
96
101
  VideoTranscoderError,
97
102
  VirtualBackgroundSource,
103
+ VoiceAiTunerType,
98
104
  VoiceBeautifierPreset,
99
105
  VoiceConversionPreset,
100
106
  WatermarkOptions,
@@ -105,6 +111,7 @@ import {
105
111
  import {
106
112
  ContentInspectConfig,
107
113
  ContentInspectResult,
114
+ ExtensionContext,
108
115
  IAudioSpectrumObserver,
109
116
  MediaSourceType,
110
117
  RawAudioFrameOpModeType,
@@ -358,6 +365,30 @@ export enum StreamFallbackOptions {
358
365
  * @ignore
359
366
  */
360
367
  StreamFallbackOptionAudioOnly = 2,
368
+ /**
369
+ * @ignore
370
+ */
371
+ StreamFallbackOptionVideoStreamLayer1 = 3,
372
+ /**
373
+ * @ignore
374
+ */
375
+ StreamFallbackOptionVideoStreamLayer2 = 4,
376
+ /**
377
+ * @ignore
378
+ */
379
+ StreamFallbackOptionVideoStreamLayer3 = 5,
380
+ /**
381
+ * @ignore
382
+ */
383
+ StreamFallbackOptionVideoStreamLayer4 = 6,
384
+ /**
385
+ * @ignore
386
+ */
387
+ StreamFallbackOptionVideoStreamLayer5 = 7,
388
+ /**
389
+ * @ignore
390
+ */
391
+ StreamFallbackOptionVideoStreamLayer6 = 8,
361
392
  }
362
393
 
363
394
  /**
@@ -472,6 +503,10 @@ export class LocalVideoStats {
472
503
  * 1: Hardware encoding is applied for acceleration.
473
504
  */
474
505
  hwEncoderAccelerating?: number;
506
+ /**
507
+ * @ignore
508
+ */
509
+ simulcastDimensions?: VideoDimensions[];
475
510
  }
476
511
 
477
512
  /**
@@ -584,6 +619,10 @@ export class RemoteVideoStats {
584
619
  * The bitrate (Kbps) of the remote video received since the last count.
585
620
  */
586
621
  receivedBitrate?: number;
622
+ /**
623
+ * @ignore
624
+ */
625
+ decoderInputFrameRate?: number;
587
626
  /**
588
627
  * The frame rate (fps) of decoding the remote video.
589
628
  */
@@ -1206,6 +1245,10 @@ export class ChannelMediaOptions {
1206
1245
  * Whether the audio stream being published is filtered according to the volume algorithm: true : The audio stream is filtered. If the audio stream filter is not enabled, this setting does not takes effect. false : The audio stream is not filtered. If you need to enable this function, contact.
1207
1246
  */
1208
1247
  isAudioFilterable?: boolean;
1248
+ /**
1249
+ * @ignore
1250
+ */
1251
+ parameters?: string;
1209
1252
  }
1210
1253
 
1211
1254
  /**
@@ -1383,10 +1426,10 @@ export interface IRtcEngineEventHandler {
1383
1426
  /**
1384
1427
  * Occurs when a user leaves a channel.
1385
1428
  *
1386
- * This callback notifies the app that the user leaves the channel by calling leaveChannel. From this callback, the app can get information such as the call duration and statistics.
1429
+ * You can obtain information such as the total duration of a call, and the data traffic that the SDK transmits and receives.
1387
1430
  *
1388
1431
  * @param connection The connection information. See RtcConnection.
1389
- * @param stats The statistics of the call. See RtcStats.
1432
+ * @param stats Call statistics. See RtcStats.
1390
1433
  */
1391
1434
  onLeaveChannel?(connection: RtcConnection, stats: RtcStats): void;
1392
1435
 
@@ -1460,7 +1503,7 @@ export interface IRtcEngineEventHandler {
1460
1503
  /**
1461
1504
  * Reports the last mile network quality of each user in the channel.
1462
1505
  *
1463
- * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server. The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times. txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream.
1506
+ * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server. The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times. This callback provides feedback on network quality through sending and receiving broadcast packets within the channel. Excessive broadcast packets can lead to broadcast storms. To prevent broadcast storms from causing a large amount of data transmission within the channel, this callback supports feedback on the network quality of up to 4 remote hosts simultaneously by default. txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream.
1464
1507
  *
1465
1508
  * @param connection The connection information. See RtcConnection.
1466
1509
  * @param remoteUid The user ID. The network quality of the user with this user ID is reported. If the uid is 0, the local network quality is reported.
@@ -1615,6 +1658,8 @@ export interface IRtcEngineEventHandler {
1615
1658
  /**
1616
1659
  * Occurs when the renderer receives the first frame of the remote video.
1617
1660
  *
1661
+ * This callback is only triggered when the video frame is rendered by the SDK; it will not be triggered if the user employs custom video rendering.You need to implement this independently using methods outside the SDK.
1662
+ *
1618
1663
  * @param connection The connection information. See RtcConnection.
1619
1664
  * @param remoteUid The user ID of the remote user sending the video stream.
1620
1665
  * @param width The width (px) of the video stream.
@@ -1651,13 +1696,13 @@ export interface IRtcEngineEventHandler {
1651
1696
  /**
1652
1697
  * Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel.
1653
1698
  *
1654
- * There are two reasons for users to become offline:
1655
- * Leave the channel: When a user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel.
1656
- * Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections. It's recommended to use the Agora RTM SDK for reliable offline detection.
1699
+ * There are generally two reasons for users to become offline:
1700
+ * Leave the channel: When a user/host leaves the channel, the user/host sends a goodbye message.
1701
+ * Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections. It is recommended to use the Agora RTM SDK for reliable offline detection.
1657
1702
  *
1658
1703
  * @param connection The connection information. See RtcConnection.
1659
1704
  * @param remoteUid The ID of the user who leaves the channel or goes offline.
1660
- * @param reason Reasons why the user goes offline: UserOfflineReasonType.
1705
+ * @param reason Reasons why a remote user (in the communication profile) or host (in the live streaming profile) goes offline. See UserOfflineReasonType.
1661
1706
  */
1662
1707
  onUserOffline?(
1663
1708
  connection: RtcConnection,
@@ -1762,7 +1807,7 @@ export interface IRtcEngineEventHandler {
1762
1807
  * @param connection The connection information. See RtcConnection.
1763
1808
  * @param stats The statistics of the local video stream. See LocalVideoStats.
1764
1809
  */
1765
- onLocalVideoStats?(source: VideoSourceType, stats: LocalVideoStats): void;
1810
+ onLocalVideoStats?(connection: RtcConnection, stats: LocalVideoStats): void;
1766
1811
 
1767
1812
  /**
1768
1813
  * Reports the statistics of the video stream sent by each remote users.
@@ -1833,7 +1878,12 @@ export interface IRtcEngineEventHandler {
1833
1878
  ): void;
1834
1879
 
1835
1880
  /**
1836
- * @ignore
1881
+ * Occurs when the state of virtual metronome changes.
1882
+ *
1883
+ * When the state of the virtual metronome changes, the SDK triggers this callback to report the current state of the virtual metronome. This callback indicates the state of the local audio stream and enables you to troubleshoot issues when audio exceptions occur.
1884
+ *
1885
+ * @param state For the current virtual metronome status, see RhythmPlayerStateType.
1886
+ * @param errorCode For the error codes and error messages related to virtual metronome errors, see RhythmPlayerReason.
1837
1887
  */
1838
1888
  onRhythmPlayerStateChanged?(
1839
1889
  state: RhythmPlayerStateType,
@@ -2076,9 +2126,7 @@ export interface IRtcEngineEventHandler {
2076
2126
  ): void;
2077
2127
 
2078
2128
  /**
2079
- * Occurs when the user role switches during the interactive live streaming.
2080
- *
2081
- * The SDK triggers this callback when the local user switches their user role by calling setClientRole after joining the channel.
2129
+ * Occurs when the user role or the audience latency level changes.
2082
2130
  *
2083
2131
  * @param connection The connection information. See RtcConnection.
2084
2132
  * @param oldRole Role that the user switches from: ClientRoleType.
@@ -2093,9 +2141,9 @@ export interface IRtcEngineEventHandler {
2093
2141
  ): void;
2094
2142
 
2095
2143
  /**
2096
- * Occurs when the user role switching fails in the interactive live streaming.
2144
+ * Occurs when switching a user role fails.
2097
2145
  *
2098
- * In the live broadcasting channel profile, when the local user calls setClientRole to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role.
2146
+ * This callback informs you about the reason for failing to switching and your current user role.
2099
2147
  *
2100
2148
  * @param connection The connection information. See RtcConnection.
2101
2149
  * @param reason The reason for a user role switch failure. See ClientRoleChangeFailedReason.
@@ -2463,55 +2511,29 @@ export interface IRtcEngineEventHandler {
2463
2511
  ): void;
2464
2512
 
2465
2513
  /**
2466
- * The event callback of the extension.
2467
- *
2468
- * To listen for events while the extension is running, you need to register this callback.
2469
- *
2470
- * @param provider The name of the extension provider.
2471
- * @param extension The name of the extension.
2472
- * @param key The key of the extension.
2473
- * @param value The value of the extension key.
2514
+ * @ignore
2474
2515
  */
2475
- onExtensionEvent?(
2476
- provider: string,
2477
- extension: string,
2516
+ onExtensionEventWithContext?(
2517
+ context: ExtensionContext,
2478
2518
  key: string,
2479
2519
  value: string
2480
2520
  ): void;
2481
2521
 
2482
2522
  /**
2483
- * Occurs when the extension is enabled.
2484
- *
2485
- * The extension triggers this callback after it is successfully enabled.
2486
- *
2487
- * @param provider The name of the extension provider.
2488
- * @param extension The name of the extension.
2523
+ * @ignore
2489
2524
  */
2490
- onExtensionStarted?(provider: string, extension: string): void;
2525
+ onExtensionStartedWithContext?(context: ExtensionContext): void;
2491
2526
 
2492
2527
  /**
2493
- * Occurs when the extension is disabled.
2494
- *
2495
- * The extension triggers this callback after it is successfully destroyed.
2496
- *
2497
- * @param provider The name of the extension provider.
2498
- * @param extension The name of the extension.
2528
+ * @ignore
2499
2529
  */
2500
- onExtensionStopped?(provider: string, extension: string): void;
2530
+ onExtensionStoppedWithContext?(context: ExtensionContext): void;
2501
2531
 
2502
2532
  /**
2503
- * Occurs when the extension runs incorrectly.
2504
- *
2505
- * In case of extension enabling failure or runtime errors, the extension triggers this callback and reports the error code along with the reasons.
2506
- *
2507
- * @param provider The name of the extension provider.
2508
- * @param extension The name of the extension.
2509
- * @param error Error code. For details, see the extension documentation provided by the extension provider.
2510
- * @param message Reason. For details, see the extension documentation provided by the extension provider.
2533
+ * @ignore
2511
2534
  */
2512
- onExtensionError?(
2513
- provider: string,
2514
- extension: string,
2535
+ onExtensionErrorWithContext?(
2536
+ context: ExtensionContext,
2515
2537
  error: number,
2516
2538
  message: string
2517
2539
  ): void;
@@ -2693,6 +2715,10 @@ export enum MaxMetadataSizeType {
2693
2715
  * Media metadata.
2694
2716
  */
2695
2717
  export class Metadata {
2718
+ /**
2719
+ * The channel name.
2720
+ */
2721
+ channelId?: string;
2696
2722
  /**
2697
2723
  * The user ID.
2698
2724
  * For the recipient: The ID of the remote user who sent the Metadata.
@@ -2704,11 +2730,11 @@ export class Metadata {
2704
2730
  */
2705
2731
  size?: number;
2706
2732
  /**
2707
- * The buffer address of the sent or received Metadata.
2733
+ * The buffer address of the received Metadata.
2708
2734
  */
2709
2735
  buffer?: Uint8Array;
2710
2736
  /**
2711
- * The timestamp (ms) of Metadata.
2737
+ * The timestamp (ms) of when the Metadata is sent.
2712
2738
  */
2713
2739
  timeStampMs?: number;
2714
2740
  }
@@ -2902,8 +2928,6 @@ export abstract class IRtcEngine {
2902
2928
  * Creates and initializes IRtcEngine.
2903
2929
  *
2904
2930
  * All called methods provided by the IRtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread.
2905
- * Before calling other APIs, you must call createAgoraRtcEngine and initialize to create and initialize the IRtcEngine object.
2906
- * The SDK supports creating only one IRtcEngine instance for an app.
2907
2931
  *
2908
2932
  * @param context Configurations for the IRtcEngine instance. See RtcEngineContext.
2909
2933
  *
@@ -2968,7 +2992,6 @@ export abstract class IRtcEngine {
2968
2992
  * All lowercase English letters: a to z.
2969
2993
  * All uppercase English letters: A to Z.
2970
2994
  * All numeric characters: 0 to 9.
2971
- * Space
2972
2995
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
2973
2996
  * @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
2997
  *
@@ -3023,7 +3046,6 @@ export abstract class IRtcEngine {
3023
3046
  * All lowercase English letters: a to z.
3024
3047
  * All uppercase English letters: A to Z.
3025
3048
  * All numeric characters: 0 to 9.
3026
- * Space
3027
3049
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
3028
3050
  * @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
3051
  * @param options The channel media options. See ChannelMediaOptions.
@@ -3032,11 +3054,11 @@ export abstract class IRtcEngine {
3032
3054
  * 0: Success.
3033
3055
  * < 0: Failure.
3034
3056
  * -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.
3035
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
3057
+ * -3: Fails to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
3036
3058
  * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
3037
- * -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
3038
- * -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
3039
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
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 after calling startEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
3060
+ * -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
+ * -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
3040
3062
  * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
3041
3063
  */
3042
3064
  abstract joinChannel(
@@ -3054,17 +3076,16 @@ export abstract class IRtcEngine {
3054
3076
  * @returns
3055
3077
  * 0: Success.
3056
3078
  * < 0: Failure.
3057
- * -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.
3079
+ * -2: The value of a member in ChannelMediaOptions is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.
3058
3080
  * -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 possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
3081
+ * -8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
3060
3082
  */
3061
3083
  abstract updateChannelMediaOptions(options: ChannelMediaOptions): number;
3062
3084
 
3063
3085
  /**
3064
3086
  * Sets channel options and leaves the channel.
3065
3087
  *
3066
- * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
3067
- * If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time. This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress. After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback.
3088
+ * After calling this method, the SDK terminates the audio and video interaction, leaves the current channel, and releases all resources related to the session. After joining the channel, you must call this method to end the call; otherwise, the next call cannot be started. If you have called joinChannelEx to join multiple channels, calling this method will leave all the channels you joined. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel.
3068
3089
  *
3069
3090
  * @param options The options for leaving the channel. See LeaveChannelOptions.
3070
3091
  *
@@ -3095,15 +3116,12 @@ export abstract class IRtcEngine {
3095
3116
  /**
3096
3117
  * Sets the channel profile.
3097
3118
  *
3098
- * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming.
3099
- * To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile.
3100
- * This method must be called and set before joinChannel, and cannot be set again after joining the channel.
3101
- * The default video encoding bitrate are different in different channel profiles. See setVideoEncoderConfiguration.
3119
+ * You can call this method to set the channel profile. The SDK adopts different optimization strategies for different channel profiles. For example, in a live streaming scenario, the SDK prioritizes video quality. After initializing the SDK, the default channel profile is the live streaming profile.
3102
3120
  *
3103
3121
  * @param profile The channel profile. See ChannelProfileType.
3104
3122
  *
3105
3123
  * @returns
3106
- * 0(ERR_OK): Success.
3124
+ * 0: Success.
3107
3125
  * < 0: Failure.
3108
3126
  * -2: The parameter is invalid.
3109
3127
  * -7: The SDK is not initialized.
@@ -3111,14 +3129,11 @@ export abstract class IRtcEngine {
3111
3129
  abstract setChannelProfile(profile: ChannelProfileType): number;
3112
3130
 
3113
3131
  /**
3114
- * Sets the user role and level in an interactive live streaming channel.
3132
+ * Set the user role and the audience latency level in a live streaming scenario.
3115
3133
  *
3116
- * In the interactive live streaming profile, the SDK sets the user role as audience by default. You can call this method to set the user role as host. You can call this method either before or after joining a channel. If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel. If you call this method to switch the user role after joining a channel, the SDK automatically does the following:
3117
- * Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state.
3118
- * Triggers onClientRoleChanged on the local client.
3119
- * Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is set as ChannelProfileLiveBroadcasting) only.
3134
+ * By default,the SDK sets the user role as audience. You can call this method to set the user role as host. The user role (roles) determines the users' permissions at the SDK level, including whether they can publish audio and video streams in a channel.
3120
3135
  *
3121
- * @param role The user role in the interactive live streaming. See ClientRoleType.
3136
+ * @param role The user role. See ClientRoleType. If you set the user role as an audience member, you cannot publish audio and video streams in the channel. If you want to publish media streams in a channel during live streaming, ensure you set the user role as broadcaster.
3122
3137
  * @param options The detailed options of a user, including the user level. See ClientRoleOptions.
3123
3138
  *
3124
3139
  * @returns
@@ -3138,9 +3153,6 @@ export abstract class IRtcEngine {
3138
3153
  * Starts an audio device loopback test.
3139
3154
  *
3140
3155
  * To test whether the user's local sending and receiving streams are normal, you can call this method to perform an audio and video call loop test, which tests whether the audio and video devices and the user's upstream and downstream networks are working properly. After starting the test, the user needs to make a sound or face the camera. The audio or video is output after about two seconds. If the audio playback is normal, the audio device and the user's upstream and downstream networks are working properly; if the video playback is normal, the video device and the user's upstream and downstream networks are working properly.
3141
- * You can call this method either before or after joining a channel. When calling in a channel, make sure that no audio or video stream is being published.
3142
- * After calling this method, call stopEchoTest to end the test; otherwise, the user cannot perform the next audio and video call loop test and cannot join the channel.
3143
- * In live streaming scenarios, this method only applies to hosts.
3144
3156
  *
3145
3157
  * @param config The configuration of the audio and video call loop test. See EchoTestConfiguration.
3146
3158
  *
@@ -3153,6 +3165,8 @@ export abstract class IRtcEngine {
3153
3165
  /**
3154
3166
  * Stops the audio call test.
3155
3167
  *
3168
+ * After calling startEchoTest, you must call this method to end the test; otherwise, the user cannot perform the next audio and video call loop test and cannot join the channel.
3169
+ *
3156
3170
  * @returns
3157
3171
  * 0: Success.
3158
3172
  * < 0: Failure.
@@ -3217,9 +3231,7 @@ export abstract class IRtcEngine {
3217
3231
  /**
3218
3232
  * Starts the last mile network probe test.
3219
3233
  *
3220
- * This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method must be called before joining the channel, and is used to judge and predict whether the current uplink network quality is good enough.
3221
- * Do not call other methods before receiving the onLastmileQuality and onLastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted.
3222
- * A host should not call this method after joining a channel (when in a call).
3234
+ * This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
3223
3235
  *
3224
3236
  * @param config The configurations of the last-mile network probe test. See LastmileProbeConfig.
3225
3237
  *
@@ -3257,9 +3269,6 @@ export abstract class IRtcEngine {
3257
3269
  * Sets the image enhancement options.
3258
3270
  *
3259
3271
  * Enables or disables image enhancement, and sets the options.
3260
- * Call this method after calling enableVideo or startPreview.
3261
- * This method relies on the image enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
3262
- * This feature has high requirements on device performance. When calling this method, the SDK automatically checks the capabilities of the current device.
3263
3272
  *
3264
3273
  * @param enabled Whether to enable the image enhancement function: true : Enable the image enhancement function. false : (Default) Disable the image enhancement function.
3265
3274
  * @param options The image enhancement options. See BeautyOptions.
@@ -3277,6 +3286,38 @@ export abstract class IRtcEngine {
3277
3286
  type?: MediaSourceType
3278
3287
  ): number;
3279
3288
 
3289
+ /**
3290
+ * @ignore
3291
+ */
3292
+ abstract setFaceShapeBeautyOptions(
3293
+ enabled: boolean,
3294
+ options: FaceShapeBeautyOptions,
3295
+ type?: MediaSourceType
3296
+ ): number;
3297
+
3298
+ /**
3299
+ * @ignore
3300
+ */
3301
+ abstract setFaceShapeAreaOptions(
3302
+ options: FaceShapeAreaOptions,
3303
+ type?: MediaSourceType
3304
+ ): number;
3305
+
3306
+ /**
3307
+ * @ignore
3308
+ */
3309
+ abstract getFaceShapeBeautyOptions(
3310
+ type?: MediaSourceType
3311
+ ): FaceShapeBeautyOptions;
3312
+
3313
+ /**
3314
+ * @ignore
3315
+ */
3316
+ abstract getFaceShapeAreaOptions(
3317
+ shapeArea: FaceShapeArea,
3318
+ type?: MediaSourceType
3319
+ ): FaceShapeAreaOptions;
3320
+
3280
3321
  /**
3281
3322
  * Sets low-light enhancement.
3282
3323
  *
@@ -3400,9 +3441,7 @@ export abstract class IRtcEngine {
3400
3441
  /**
3401
3442
  * Initializes the local video view.
3402
3443
  *
3403
- * This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as null. In real-time interactive scenarios, if you need to simultaneously view multiple preview frames in the local video preview, and each frame is at a different observation position along the video link, you can repeatedly call this method to set different view s and set different observation positions for each view. For example, by setting the video source to the camera and then configuring two view s with position setting to PositionPostCapturerOrigin and PositionPostCapturer, you can simultaneously preview the raw, unprocessed video frame and the video frame that has undergone preprocessing (image enhancement effects, virtual background, watermark) in the local video preview.
3404
- * You can call this method either before or after joining a channel.
3405
- * 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.
3444
+ * This method initializes the video view of a local stream on the local device. It only affects the video seen by the local user and does not impact the publishing of the local video. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. The binding remains valid after leaving the channel. To stop rendering or unbind the local video from the view, set view as null.
3406
3445
  *
3407
3446
  * @param canvas The local video view and settings. See VideoCanvas.
3408
3447
  *
@@ -3415,9 +3454,9 @@ export abstract class IRtcEngine {
3415
3454
  /**
3416
3455
  * Sets video application scenarios.
3417
3456
  *
3418
- * After successfully calling this method, the SDK will automatically enable the best practice strategies and adjust key performance metrics based on the specified scenario, to optimize the video experience. Ensure that you call this method before joining a channel.
3457
+ * 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.
3419
3458
  *
3420
- * @param scenarioType The type of video application scenario. See VideoApplicationScenarioType. If set to ApplicationScenarioMeeting (1), the SDK automatically enables the following strategies:
3459
+ * @param scenarioType The type of video application scenario. See VideoApplicationScenarioType. ApplicationScenarioMeeting (1) is suitable for meeting scenarios. If set to ApplicationScenarioMeeting (1), the SDK automatically enables the following strategies:
3421
3460
  * 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.
3422
3461
  * 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.
3423
3462
  * If nobody subscribers to the high-quality stream, the SDK automatically reduces its bitrate and frame rate to save upstream bandwidth.
@@ -3430,7 +3469,7 @@ export abstract class IRtcEngine {
3430
3469
  * 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:
3431
3470
  * Resolution: 480 × 272
3432
3471
  * Frame rate: 15 fps
3433
- * Bitrate: 500 Kbps
3472
+ * Bitrate: 500 Kbps (2) is suitable for 1v1 video call scenarios. If set to (2), the SDK optimizes performance to achieve low latency and high video quality, enhancing image quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under poor network conditions.
3434
3473
  *
3435
3474
  * @returns
3436
3475
  * 0: Success.
@@ -3533,11 +3572,6 @@ export abstract class IRtcEngine {
3533
3572
  */
3534
3573
  abstract muteAllRemoteAudioStreams(mute: boolean): number;
3535
3574
 
3536
- /**
3537
- * @ignore
3538
- */
3539
- abstract setDefaultMuteAllRemoteAudioStreams(mute: boolean): number;
3540
-
3541
3575
  /**
3542
3576
  * Stops or resumes subscribing to the audio stream of a specified user.
3543
3577
  *
@@ -3581,9 +3615,9 @@ export abstract class IRtcEngine {
3581
3615
  /**
3582
3616
  * Stops or resumes subscribing to the video streams of all remote users.
3583
3617
  *
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.
3618
+ * After successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users. By default, the SDK subscribes to the video streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeVideo to false when calling joinChannel to join the channel, which will cancel the subscription to the video streams of all users upon joining the channel.
3585
3619
  *
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.
3620
+ * @param mute Whether to stop subscribing to the video streams of all remote users. true : Stop subscribing to the video streams of all remote users. false : (Default) Subscribe to the video streams of all remote users by default.
3587
3621
  *
3588
3622
  * @returns
3589
3623
  * 0: Success.
@@ -3591,17 +3625,10 @@ export abstract class IRtcEngine {
3591
3625
  */
3592
3626
  abstract muteAllRemoteVideoStreams(mute: boolean): number;
3593
3627
 
3594
- /**
3595
- * @ignore
3596
- */
3597
- abstract setDefaultMuteAllRemoteVideoStreams(mute: boolean): number;
3598
-
3599
3628
  /**
3600
3629
  * Sets the default video stream type to subscribe to.
3601
3630
  *
3602
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. The SDK defaults to enabling low-quality video stream adaptive mode (AutoSimulcastStream) on the sending end, which means the sender does not actively send low-quality video stream. The receiver with the role of the host can initiate a low-quality video stream request by calling this method, and upon receiving the request, the sending end automatically starts sending the low-quality video stream.
3603
- * Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel.
3604
- * If you call both this method and setRemoteVideoStreamType, the setting of setRemoteVideoStreamType takes effect.
3605
3632
  *
3606
3633
  * @param streamType The default video-stream type. See VideoStreamType.
3607
3634
  *
@@ -3630,7 +3657,7 @@ export abstract class IRtcEngine {
3630
3657
  * You can call this method either before or after joining a channel.
3631
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.
3632
3659
  * Calling this method on the receiving end of the audience role will not take effect.
3633
- * If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType, the settings in setRemoteVideoStreamType take effect.
3660
+ * If you call both this method and setRemoteDefaultVideoStreamType, the setting of this method takes effect.
3634
3661
  *
3635
3662
  * @param uid The user ID.
3636
3663
  * @param streamType The video stream type, see VideoStreamType.
@@ -3776,9 +3803,9 @@ export abstract class IRtcEngine {
3776
3803
  /**
3777
3804
  * Starts audio recording on the client and sets recording configurations.
3778
3805
  *
3779
- * The Agora SDK allows recording during a call. After successfully calling this method, you can record the audio of users in the channel and get an audio recording file. Supported formats of the recording file are as follows:
3806
+ * The Agora SDK allows recording during a call. After successfully calling this method, you can record the audio of users in the channel and get an audio recording file. Supported formats of audio files are as follows:
3780
3807
  * WAV: High-fidelity files with typically larger file sizes. For example, if the sample rate is 32,000 Hz, the file size for 10-minute recording is approximately 73 MB.
3781
- * AAC: Low-fidelity files with typically smaller file sizes. For example, if the sample rate is 32,000 Hz and the recording quality is AudioRecordingQualityMedium, the file size for 10-minute recording is approximately 2 MB. Once the user leaves the channel, the recording automatically stops. Call this method after joining a channel.
3808
+ * AAC: Low-fidelity files with typically smaller file sizes. For example, if the sample rate is 32,000 Hz and the recording quality is AudioRecordingQualityMedium, the file size for 10-minute recording is approximately 2 MB. Once the user leaves the channel, the recording automatically stops.
3782
3809
  *
3783
3810
  * @param config Recording configurations. See AudioRecordingConfiguration.
3784
3811
  *
@@ -3812,10 +3839,12 @@ export abstract class IRtcEngine {
3812
3839
  abstract stopAudioRecording(): number;
3813
3840
 
3814
3841
  /**
3815
- * Creates a media player instance.
3842
+ * Creates a media player object.
3843
+ *
3844
+ * Before calling any APIs in the IMediaPlayer class, you need to call this method to create an instance of the media player.
3816
3845
  *
3817
3846
  * @returns
3818
- * The IMediaPlayer instance, if the method call succeeds.
3847
+ * An IMediaPlayer object, if the method call succeeds.
3819
3848
  * An empty pointer, if the method call fails.
3820
3849
  */
3821
3850
  abstract createMediaPlayer(): IMediaPlayer;
@@ -3844,17 +3873,14 @@ export abstract class IRtcEngine {
3844
3873
  /**
3845
3874
  * Starts playing the music file.
3846
3875
  *
3847
- * This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged (AudioMixingStatePlaying) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged (AudioMixingStateStopped) callback on the local client.
3848
- * You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms.
3849
- * If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports 701.
3850
- * For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
3876
+ * For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports AudioMixingReasonCanNotOpen.
3851
3877
  *
3852
3878
  * @param filePath File path:
3853
3879
  * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example : C:\music\audio.mp4.
3854
3880
  * macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.
3855
3881
  * @param loopback Whether to only play music files on the local client: true : Only play music files on the local client so that only the local user can hear the music. false : Publish music files to remote clients so that both the local user and remote users can hear the music.
3856
3882
  * @param cycle The number of times the music file plays.
3857
- * 0: The number of playback times. For example, 0 means that the SDK does not play the music file while 1 means that the SDK plays once.
3883
+ * >0: The number of times for playback. For example, 1 represents playing 1 time.
3858
3884
  * -1: Play the audio file in an infinite loop.
3859
3885
  * @param startPos The playback position (ms) of the music file.
3860
3886
  *
@@ -3876,9 +3902,9 @@ export abstract class IRtcEngine {
3876
3902
  ): number;
3877
3903
 
3878
3904
  /**
3879
- * Stops playing and mixing the music file.
3905
+ * Stops playing the music file.
3880
3906
  *
3881
- * This method stops the audio mixing. Call this method when you are in a channel.
3907
+ * After calling startAudioMixing to play a music file, you can call this method to stop the playing. If you only need to pause the playback, call pauseAudioMixing.
3882
3908
  *
3883
3909
  * @returns
3884
3910
  * 0: Success.
@@ -3889,7 +3915,7 @@ export abstract class IRtcEngine {
3889
3915
  /**
3890
3916
  * Pauses playing and mixing the music file.
3891
3917
  *
3892
- * Call this method after joining a channel.
3918
+ * After calling startAudioMixing to play a music file, you can call this method to pause the playing. If you need to stop the playback, call stopAudioMixing.
3893
3919
  *
3894
3920
  * @returns
3895
3921
  * 0: Success.
@@ -3900,7 +3926,7 @@ export abstract class IRtcEngine {
3900
3926
  /**
3901
3927
  * Resumes playing and mixing the music file.
3902
3928
  *
3903
- * This method resumes playing and mixing the music file. Call this method when you are in a channel.
3929
+ * After calling pauseAudioMixing to pause the playback, you can call this method to resume the playback.
3904
3930
  *
3905
3931
  * @returns
3906
3932
  * 0: Success.
@@ -3915,7 +3941,7 @@ export abstract class IRtcEngine {
3915
3941
  * For the supported formats of audio files, see.
3916
3942
  * You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
3917
3943
  *
3918
- * @param index The audio track you want to specify. The value range is [0, getAudioTrackCount ()].
3944
+ * @param index The audio track you want to specify. The value should be greater than 0 and less than that of returned by getAudioTrackCount.
3919
3945
  *
3920
3946
  * @returns
3921
3947
  * 0: Success.
@@ -4050,7 +4076,7 @@ export abstract class IRtcEngine {
4050
4076
  /**
4051
4077
  * Sets the pitch of the local music file.
4052
4078
  *
4053
- * When a local music file is mixed with a local human voice, call this method to set the pitch of the local music file only. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (AudioMixingStatePlaying) callback.
4079
+ * When a local music file is mixed with a local human voice, call this method to set the pitch of the local music file only.
4054
4080
  *
4055
4081
  * @param pitch Sets the pitch of the local music file by the chromatic scale. The default value is 0, which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value between consecutive values is a chromatic value. The greater the absolute value of this parameter, the higher or lower the pitch of the local music file.
4056
4082
  *
@@ -4103,7 +4129,7 @@ export abstract class IRtcEngine {
4103
4129
  /**
4104
4130
  * Preloads a specified audio effect file into the memory.
4105
4131
  *
4106
- * To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
4132
+ * Ensure the size of all preloaded files does not exceed the limit. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
4107
4133
  *
4108
4134
  * @param soundId The audio effect ID. The ID of each audio effect file is unique.
4109
4135
  * @param filePath File path:
@@ -4124,10 +4150,10 @@ export abstract class IRtcEngine {
4124
4150
  /**
4125
4151
  * Plays the specified local or online audio effect file.
4126
4152
  *
4127
- * If you use this method to play an online audio effect file, Agora recommends that you cache the online audio effect file to your local device, call preloadEffect to preload the cached audio effect file into memory, and then call this method to play the audio effect. Otherwise, you might encounter playback failures or no sound during playback due to loading timeouts or failures. To play multiple audio effect files at the same time, call this method multiple times with different soundId and filePath. To achieve the optimal user experience, Agora recommends that do not playing more than three audio files at the same time. After the playback of an audio effect file completes, the SDK triggers the onAudioEffectFinished callback.
4153
+ * To play multiple audio effect files at the same time, call this method multiple times with different soundId and filePath. To achieve the optimal user experience, Agora recommends that you do not playing more than three audio files at the same time.
4128
4154
  *
4129
4155
  * @param soundId The audio effect ID. The ID of each audio effect file is unique. If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of soundId in preloadEffect.
4130
- * @param filePath The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example, C:\music\audio.mp4. Supported audio formats include MP3, AAC, M4A, MP4, WAV, and 3GP. See supported audio formats. If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of filePath in preloadEffect.
4156
+ * @param filePath The file path. The SDK supports URLs and absolute path of local files. The absolute path needs to be accurate to the file name and extension. Supported audio formats include MP3, AAC, M4A, MP4, WAV, and 3GP. If you have preloaded an audio effect into memory by calling preloadEffect, ensure that the value of this parameter is the same as that of filePath in preloadEffect.
4131
4157
  * @param loopCount The number of times the audio effect loops.
4132
4158
  * ≥ 0: The number of playback times. For example, 1 means looping one time, which means playing the audio effect two times in total.
4133
4159
  * -1: Play the audio file in an infinite loop.
@@ -4241,6 +4267,8 @@ export abstract class IRtcEngine {
4241
4267
  /**
4242
4268
  * Resumes playing all audio effect files.
4243
4269
  *
4270
+ * After you call pauseAllEffects to pause the playback, you can call this method to resume the playback.
4271
+ *
4244
4272
  * @returns
4245
4273
  * 0: Success.
4246
4274
  * < 0: Failure.
@@ -4250,6 +4278,8 @@ export abstract class IRtcEngine {
4250
4278
  /**
4251
4279
  * Stops playing a specified audio effect.
4252
4280
  *
4281
+ * When you no longer need to play the audio effect, you can call this method to stop the playback. If you only need to pause the playback, call pauseEffect.
4282
+ *
4253
4283
  * @param soundId The ID of the audio effect. Each audio effect has a unique ID.
4254
4284
  *
4255
4285
  * @returns
@@ -4261,6 +4291,8 @@ export abstract class IRtcEngine {
4261
4291
  /**
4262
4292
  * Stops playing all audio effects.
4263
4293
  *
4294
+ * When you no longer need to play the audio effect, you can call this method to stop the playback. If you only need to pause the playback, call pauseAllEffects.
4295
+ *
4264
4296
  * @returns
4265
4297
  * 0: Success.
4266
4298
  * < 0: Failure.
@@ -4399,14 +4431,7 @@ export abstract class IRtcEngine {
4399
4431
  /**
4400
4432
  * Sets a preset voice beautifier effect.
4401
4433
  *
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).
4405
- * You can call this method either before or after joining a channel.
4406
- * Do not set the profile parameter in setAudioProfile to AudioProfileSpeechStandard (1) or AudioProfileIot (6), or the method does not take effect.
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.
4408
- * After calling setVoiceBeautifierPreset, Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierPreset will be overwritten: setAudioEffectPreset setAudioEffectParameters setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset
4409
- * 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.
4434
+ * 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.
4410
4435
  *
4411
4436
  * @param preset The preset voice beautifier effect options: VoiceBeautifierPreset.
4412
4437
  *
@@ -4468,6 +4493,7 @@ export abstract class IRtcEngine {
4468
4493
  * You can call this method either before or after joining a channel.
4469
4494
  * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
4470
4495
  * 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
4496
+ * 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.
4471
4497
  *
4472
4498
  * @param preset The options for SDK preset audio effects: RoomAcoustics3dVoice, 3D voice effect:
4473
4499
  * 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.
@@ -4497,6 +4523,7 @@ export abstract class IRtcEngine {
4497
4523
  * You can call this method either before or after joining a channel.
4498
4524
  * This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music.
4499
4525
  * 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
4526
+ * 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.
4500
4527
  *
4501
4528
  * @param preset The option for the preset audio effect: SINGING_BEAUTIFIER : The singing beautifier effect.
4502
4529
  * @param param1 The gender characteristics options for the singing voice: 1 : A male-sounding voice. 2 : A female-sounding voice.
@@ -4610,10 +4637,15 @@ export abstract class IRtcEngine {
4610
4637
  */
4611
4638
  abstract setHeadphoneEQParameters(lowGain: number, highGain: number): number;
4612
4639
 
4640
+ /**
4641
+ * @ignore
4642
+ */
4643
+ abstract enableVoiceAITuner(enabled: boolean, type: VoiceAiTunerType): number;
4644
+
4613
4645
  /**
4614
4646
  * Sets the log file.
4615
4647
  *
4616
- * Deprecated: Use the mLogConfig parameter in initialize method instead. Specifies an SDK output log file. The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable. Ensure that you call initialize immediately after calling the IRtcEngine method, or the output log may not be complete.
4648
+ * Deprecated: This method is deprecated. Use the logConfig parameter in RtcEngineContext to set the log file path. Specifies an SDK output log file. The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable. Ensure that you call initialize immediately after calling the IRtcEngine method, or the output log may not be complete.
4617
4649
  *
4618
4650
  * @param filePath The complete path of the log files. These log files are encoded in UTF-8.
4619
4651
  *
@@ -4686,10 +4718,7 @@ export abstract class IRtcEngine {
4686
4718
  /**
4687
4719
  * Updates the display mode of the local video view.
4688
4720
  *
4689
- * After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream.
4690
- * Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method.
4691
- * During a call, you can call this method as many times as necessary to update the display mode of the local video view.
4692
- * This method only takes effect on the primary camera (PrimaryCameraSource). In scenarios involving custom video capture or the use of alternative video sources, you need to use setupLocalVideo instead of this method.
4721
+ * After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees and does not impact the publishing of the local video.
4693
4722
  *
4694
4723
  * @param renderMode The local video display mode. See RenderModeType.
4695
4724
  * @param mirrorMode The mirror mode of the local video view. See VideoMirrorModeType. If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
@@ -4781,6 +4810,11 @@ export abstract class IRtcEngine {
4781
4810
  streamConfig?: SimulcastStreamConfig
4782
4811
  ): number;
4783
4812
 
4813
+ /**
4814
+ * @ignore
4815
+ */
4816
+ abstract setSimulcastConfig(simulcastConfig: SimulcastConfig): number;
4817
+
4784
4818
  /**
4785
4819
  * Sets whether to enable the local playback of external audio source.
4786
4820
  *
@@ -4801,16 +4835,14 @@ export abstract class IRtcEngine {
4801
4835
  /**
4802
4836
  * Sets the format of the captured raw audio data.
4803
4837
  *
4804
- * Sets the audio format for the onRecordAudioFrame callback.
4805
- * Ensure that you call this method before joining a channel.
4806
- * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s).
4838
+ * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onRecordAudioFrame callback according to the sampling interval.
4807
4839
  *
4808
- * @param sampleRate The sample rate returned in the SDK, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4809
- * @param channel The number of channels returned by the SDK. You can set the value as 1 or 2:
4840
+ * @param sampleRate The sample rate returned in the callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4841
+ * @param channel The number of audio channels. You can set the value as 1 or 2.
4810
4842
  * 1: Mono.
4811
4843
  * 2: Stereo.
4812
4844
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
4813
- * @param samplesPerCall The number of data samples returned in the SDK, such as 1024 for the Media Push.
4845
+ * @param samplesPerCall The number of data samples, such as 1024 for the Media Push.
4814
4846
  *
4815
4847
  * @returns
4816
4848
  * 0: Success.
@@ -4824,18 +4856,16 @@ export abstract class IRtcEngine {
4824
4856
  ): number;
4825
4857
 
4826
4858
  /**
4827
- * Sets the audio data format for playback.
4859
+ * Sets the format of the raw audio playback data.
4828
4860
  *
4829
- * Sets the data format for the onPlaybackAudioFrame callback.
4830
- * Ensure that you call this method before joining a channel.
4831
- * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onPlaybackAudioFrame callback according to the sampling interval.
4861
+ * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval ≥ 0.01 (s). The SDK triggers the onPlaybackAudioFrame callback according to the sampling interval.
4832
4862
  *
4833
- * @param sampleRate The sample rate returned in the onPlaybackAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4834
- * @param channel The number of channels returned in the onPlaybackAudioFrame callback:
4863
+ * @param sampleRate The sample rate returned in the callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4864
+ * @param channel The number of audio channels. You can set the value as 1 or 2.
4835
4865
  * 1: Mono.
4836
4866
  * 2: Stereo.
4837
4867
  * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
4838
- * @param samplesPerCall The number of data samples returned in the onPlaybackAudioFrame callback, such as 1024 for the Media Push.
4868
+ * @param samplesPerCall The number of data samples, such as 1024 for the Media Push.
4839
4869
  *
4840
4870
  * @returns
4841
4871
  * 0: Success.
@@ -4849,11 +4879,15 @@ export abstract class IRtcEngine {
4849
4879
  ): number;
4850
4880
 
4851
4881
  /**
4852
- * Sets the audio data format reported by onMixedAudioFrame.
4882
+ * Set the format of the raw audio data after mixing for audio capture and playback.
4853
4883
  *
4854
- * @param sampleRate The sample rate (Hz) of the audio data, which can be set as 8000, 16000, 32000, 44100, or 48000.
4855
- * @param channel The number of channels of the audio data, which can be set as 1(Mono) or 2(Stereo).
4856
- * @param samplesPerCall Sets the number of samples. In Media Push scenarios, set it as 1024.
4884
+ * The SDK calculates the sampling interval based on the samplesPerCall, sampleRate and channel parameters set in this method. Sample interval (sec) = samplePerCall /(sampleRate × channel). Ensure that the sample interval 0.01 (s). The SDK triggers the onMixedAudioFrame callback according to the sampling interval.
4885
+ *
4886
+ * @param sampleRate The sample rate returned in the callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4887
+ * @param channel The number of audio channels. You can set the value as 1 or 2.
4888
+ * 1: Mono.
4889
+ * 2: Stereo.
4890
+ * @param samplesPerCall The number of data samples, such as 1024 for the Media Push.
4857
4891
  *
4858
4892
  * @returns
4859
4893
  * 0: Success.
@@ -4891,10 +4925,14 @@ export abstract class IRtcEngine {
4891
4925
  ): number;
4892
4926
 
4893
4927
  /**
4894
- * Sets the audio data format reported by onPlaybackAudioFrameBeforeMixing.
4928
+ * Sets the format of the raw audio playback data before mixing.
4895
4929
  *
4896
- * @param sampleRate The sample rate (Hz) of the audio data, which can be set as 8000, 16000, 32000, 44100, or 48000.
4897
- * @param channel The number of channels of the audio data, which can be set as 1 (Mono) or 2 (Stereo).
4930
+ * The SDK triggers the onPlaybackAudioFrameBeforeMixing callback according to the sampling interval.
4931
+ *
4932
+ * @param sampleRate The sample rate returned in the callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
4933
+ * @param channel The number of audio channels. You can set the value as 1 or 2.
4934
+ * 1: Mono.
4935
+ * 2: Stereo.
4898
4936
  *
4899
4937
  * @returns
4900
4938
  * 0: Success.
@@ -4976,7 +5014,11 @@ export abstract class IRtcEngine {
4976
5014
  /**
4977
5015
  * Whether to mute the recording signal.
4978
5016
  *
4979
- * @param mute true : The media file is muted. false : (Default) Do not mute the recording signal. If you have already called adjustRecordingSignalVolume to adjust the volume, then when you call this method and set it to true, the SDK will record the current volume and mute it. To restore the previous volume, call this method again and set it to false.
5017
+ * If you have already called adjustRecordingSignalVolume to adjust the recording signal volume, when you call this method and set it to true, the SDK behaves as follows:
5018
+ * Records the adjusted volume.
5019
+ * Mutes the recording signal. When you call this method again and set it to false, the recording signal volume will be restored to the volume recorded by the SDK before muting.
5020
+ *
5021
+ * @param mute true : Mute the recording signal. false : (Default) Do not mute the recording signal.
4980
5022
  *
4981
5023
  * @returns
4982
5024
  * 0: Success.
@@ -5153,8 +5195,6 @@ export abstract class IRtcEngine {
5153
5195
  * Enables in-ear monitoring.
5154
5196
  *
5155
5197
  * This method enables or disables in-ear monitoring.
5156
- * Users must use earphones (wired or Bluetooth) to hear the in-ear monitoring effect.
5157
- * You can call this method either before or after joining a channel.
5158
5198
  *
5159
5199
  * @param enabled Enables or disables in-ear monitoring. true : Enables in-ear monitoring. false : (Default) Disables in-ear monitoring.
5160
5200
  * @param includeAudioFilters The audio filter types of in-ear monitoring. See EarMonitoringFilterType.
@@ -5252,7 +5292,7 @@ export abstract class IRtcEngine {
5252
5292
  *
5253
5293
  * @returns
5254
5294
  * If the method call is successful, the video track ID is returned as the unique identifier of the video track.
5255
- * If the method call fails, a negative value is returned.
5295
+ * If the method call fails, 0xffffffff is returned.
5256
5296
  */
5257
5297
  abstract createCustomVideoTrack(): number;
5258
5298
 
@@ -5455,7 +5495,7 @@ export abstract class IRtcEngine {
5455
5495
  *
5456
5496
  * @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.
5457
5497
  * @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen.
5458
- * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters.
5498
+ * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration.
5459
5499
  *
5460
5500
  * @returns
5461
5501
  * 0: Success.
@@ -5553,7 +5593,7 @@ export abstract class IRtcEngine {
5553
5593
  *
5554
5594
  * Call this method after starting screen sharing or window sharing.
5555
5595
  *
5556
- * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters.
5596
+ * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration.
5557
5597
  *
5558
5598
  * @returns
5559
5599
  * 0: Success.
@@ -5611,13 +5651,7 @@ export abstract class IRtcEngine {
5611
5651
  abstract stopScreenCapture(): number;
5612
5652
 
5613
5653
  /**
5614
- * Retrieves the call ID.
5615
- *
5616
- * When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get the callId parameter, and pass it in when calling methods such as rate and complain. Call this method after joining a channel.
5617
- *
5618
- * @returns
5619
- * The current call ID, if the method succeeds.
5620
- * An empty string, if the method call fails.
5654
+ * @ignore
5621
5655
  */
5622
5656
  abstract getCallId(): string;
5623
5657
 
@@ -5826,8 +5860,6 @@ export abstract class IRtcEngine {
5826
5860
  /**
5827
5861
  * Gets the current connection state of the SDK.
5828
5862
  *
5829
- * You can call this method either before or after joining a channel.
5830
- *
5831
5863
  * @returns
5832
5864
  * The current connection state. See ConnectionStateType.
5833
5865
  */
@@ -5867,45 +5899,10 @@ export abstract class IRtcEngine {
5867
5899
  userPriority: PriorityType
5868
5900
  ): number;
5869
5901
 
5870
- /**
5871
- * Sets the built-in encryption mode.
5872
- *
5873
- * Deprecated: Use enableEncryption instead. The SDK supports built-in encryption schemes, AES-128-GCM is supported by default. Call this method to use other encryption modes. All users in the same channel must use the same encryption mode and secret. Refer to the information related to the AES encryption algorithm on the differences between the encryption modes. Before calling this method, please call setEncryptionSecret to enable the built-in encryption function.
5874
- *
5875
- * @param encryptionMode The following encryption modes:
5876
- * " aes-128-xts ": 128-bit AES encryption, XTS mode.
5877
- * " aes-128-ecb ": 128-bit AES encryption, ECB mode.
5878
- * " aes-256-xts ": 256-bit AES encryption, XTS mode.
5879
- * " sm4-128-ecb ": 128-bit SM4 encryption, ECB mode.
5880
- * " aes-128-gcm ": 128-bit AES encryption, GCM mode.
5881
- * " aes-256-gcm ": 256-bit AES encryption, GCM mode.
5882
- * "": When this parameter is set as null, the encryption mode is set as " aes-128-gcm " by default.
5883
- *
5884
- * @returns
5885
- * 0: Success.
5886
- * < 0: Failure.
5887
- */
5888
- abstract setEncryptionMode(encryptionMode: string): number;
5889
-
5890
- /**
5891
- * Enables built-in encryption with an encryption password before users join a channel.
5892
- *
5893
- * Deprecated: Use enableEncryption instead. Before joining the channel, you need to call this method to set the secret parameter to enable the built-in encryption. All users in the same channel should use the same secret. The secret is automatically cleared once a user leaves the channel. If you do not specify the secret or secret is set as null, the built-in encryption is disabled.
5894
- * Do not use this method for Media Push.
5895
- * For optimal transmission, ensure that the encrypted data size does not exceed the original data size + 16 bytes. 16 bytes is the maximum padding size for AES encryption.
5896
- *
5897
- * @param secret The encryption password.
5898
- *
5899
- * @returns
5900
- * 0: Success.
5901
- * < 0: Failure.
5902
- */
5903
- abstract setEncryptionSecret(secret: string): number;
5904
-
5905
5902
  /**
5906
5903
  * Enables or disables the built-in encryption.
5907
5904
  *
5908
- * In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel. All users in the same channel must use the same encryption mode and encryption key. After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. If you enable the built-in encryption, you cannot use the Media Push function.
5905
+ * After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again.
5909
5906
  *
5910
5907
  * @param enabled Whether to enable built-in encryption: true : Enable the built-in encryption. false : (Default) Disable the built-in encryption.
5911
5908
  * @param config Built-in encryption configurations. See EncryptionConfig.
@@ -5922,8 +5919,6 @@ export abstract class IRtcEngine {
5922
5919
  /**
5923
5920
  * Creates a data stream.
5924
5921
  *
5925
- * Creates a data stream. Each user can create up to five data streams in a single channel.
5926
- *
5927
5922
  * @param config The configurations for the data stream. See DataStreamConfig.
5928
5923
  *
5929
5924
  * @returns
@@ -5935,10 +5930,10 @@ export abstract class IRtcEngine {
5935
5930
  /**
5936
5931
  * Sends data stream messages.
5937
5932
  *
5938
- * Sends data stream messages to all users in a channel. The SDK has the following restrictions on this method:
5939
- * Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.
5940
- * Each client can send up to 6 KB of data per second.
5941
- * Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client.
5933
+ * After calling createDataStream, you can call this method to send data stream messages to all users in the channel. The SDK has the following restrictions on this method:
5934
+ * Each user can have up to five data streams simultaneously.
5935
+ * Up to 60 packets can be sent per second in a data stream with each packet having a maximum size of 1 KB.
5936
+ * 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.
5942
5937
  * Ensure that you call createDataStream to create a data channel before calling this method.
5943
5938
  * In live streaming scenarios, this method only applies to hosts.
5944
5939
  *
@@ -6104,10 +6099,9 @@ export abstract class IRtcEngine {
6104
6099
  /**
6105
6100
  * Registers a user account.
6106
6101
  *
6107
- * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel. After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and account of the local user. This method is optional. To join a channel with a user account, you can choose either of the following ways:
6108
- * Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel.
6109
- * Call the joinChannelWithUserAccount method to join the channel. The difference between the two ways is that the time elapsed between calling the registerLocalUserAccount method and joining the channel is shorter than directly calling joinChannelWithUserAccount.
6110
- * Ensure that you set the userAccount parameter; otherwise, this method does not take effect.
6102
+ * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel. This method is optional. If you want to join a channel using a user account, you can choose one of the following methods:
6103
+ * 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
+ * Call the joinChannelWithUserAccount method to join a channel.
6111
6105
  * Ensure that the userAccount is unique in the channel.
6112
6106
  * 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.
6113
6107
  *
@@ -6138,7 +6132,6 @@ export abstract class IRtcEngine {
6138
6132
  * All lowercase English letters: a to z.
6139
6133
  * All uppercase English letters: A to Z.
6140
6134
  * All numeric characters: 0 to 9.
6141
- * Space
6142
6135
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
6143
6136
  * @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):
6144
6137
  * The 26 lowercase English letters: a to z.
@@ -6152,11 +6145,11 @@ export abstract class IRtcEngine {
6152
6145
  * 0: Success.
6153
6146
  * < 0: Failure.
6154
6147
  * -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.
6155
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
6148
+ * -3: Fails to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
6156
6149
  * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
6157
- * -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
6158
- * -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state.
6159
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
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 after calling startEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
6151
+ * -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
+ * -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
6160
6153
  * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
6161
6154
  */
6162
6155
  abstract joinChannelWithUserAccount(
@@ -6178,7 +6171,6 @@ export abstract class IRtcEngine {
6178
6171
  * All lowercase English letters: a to z.
6179
6172
  * All uppercase English letters: A to Z.
6180
6173
  * All numeric characters: 0 to 9.
6181
- * Space
6182
6174
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
6183
6175
  * @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):
6184
6176
  * The 26 lowercase English letters: a to z.
@@ -6202,7 +6194,7 @@ export abstract class IRtcEngine {
6202
6194
  /**
6203
6195
  * Gets the user information by passing in the user account.
6204
6196
  *
6205
- * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
6197
+ * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and pass in the user account to get the UID of the remote user from the UserInfo object.
6206
6198
  *
6207
6199
  * @param userAccount The user account.
6208
6200
  *
@@ -6215,7 +6207,7 @@ export abstract class IRtcEngine {
6215
6207
  /**
6216
6208
  * Gets the user information by passing in the user ID.
6217
6209
  *
6218
- * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID.
6210
+ * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and passi in the UID.to get the user account of the specified user from the UserInfo object.
6219
6211
  *
6220
6212
  * @param uid The user ID.
6221
6213
  *
@@ -6243,7 +6235,6 @@ export abstract class IRtcEngine {
6243
6235
  * < 0: Failure.
6244
6236
  * -1: A general error occurs (no specified reason).
6245
6237
  * -2: The parameter is invalid.
6246
- * -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not a host.
6247
6238
  * -8: Internal state error. Probably because the user is not a broadcaster.
6248
6239
  */
6249
6240
  abstract startOrUpdateChannelMediaRelay(
@@ -6258,6 +6249,7 @@ export abstract class IRtcEngine {
6258
6249
  * @returns
6259
6250
  * 0: Success.
6260
6251
  * < 0: Failure.
6252
+ * -5: The method call was rejected. There is no ongoing channel media relay.
6261
6253
  */
6262
6254
  abstract stopChannelMediaRelay(): number;
6263
6255
 
@@ -6269,6 +6261,7 @@ export abstract class IRtcEngine {
6269
6261
  * @returns
6270
6262
  * 0: Success.
6271
6263
  * < 0: Failure.
6264
+ * -5: The method call was rejected. There is no ongoing channel media relay.
6272
6265
  */
6273
6266
  abstract pauseAllChannelMediaRelay(): number;
6274
6267
 
@@ -6280,6 +6273,7 @@ export abstract class IRtcEngine {
6280
6273
  * @returns
6281
6274
  * 0: Success.
6282
6275
  * < 0: Failure.
6276
+ * -5: The method call was rejected. There is no paused channel media relay.
6283
6277
  */
6284
6278
  abstract resumeAllChannelMediaRelay(): number;
6285
6279
 
@@ -6310,7 +6304,7 @@ export abstract class IRtcEngine {
6310
6304
  /**
6311
6305
  * Starts pushing media streams to the CDN directly.
6312
6306
  *
6313
- * Aogra does not support pushing media streams to one URL repeatedly. Media options Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (DirectCdnStreamingMediaOptions), you can refer to the following examples: If you want to push audio and video streams published by the host to the CDN, the media setting options should be set as follows: publishCustomAudioTrack is set as true and call the pushAudioFrame method publishCustomVideoTrack is set as true and call the pushVideoFrame method publishCameraTrack is set as false (the default value) publishMicrophoneTrack is set as false (the default value) As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in DirectCdnStreamingMediaOptions as true and call pushAudioFrame to push audio streams. Agora only supports pushing one audio and video streams or one audio streams to CDN.
6307
+ * Aogra does not support pushing media streams to one URL repeatedly. Media options Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (DirectCdnStreamingMediaOptions), you can refer to the following examples: If you want to push audio and video streams captured by the host from a custom source, the media setting options should be set as follows: publishCustomAudioTrack is set as true and call the pushAudioFrame method publishCustomVideoTrack is set as true and call the pushVideoFrame method publishCameraTrack is set as false (the default value) publishMicrophoneTrack is set as false (the default value) As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in DirectCdnStreamingMediaOptions as true and call pushAudioFrame to push audio streams. Agora only supports pushing one audio and video streams or one audio streams to CDN.
6314
6308
  *
6315
6309
  * @param eventHandler See onDirectCdnStreamingStateChanged and onDirectCdnStreamingStats.
6316
6310
  * @param publishUrl The CDN live streaming URL.
@@ -6343,7 +6337,15 @@ export abstract class IRtcEngine {
6343
6337
  ): number;
6344
6338
 
6345
6339
  /**
6346
- * @ignore
6340
+ * Enables the virtual metronome.
6341
+ *
6342
+ * In music education, physical education and other scenarios, teachers usually need to use a metronome so that students can practice with the correct beat. The meter is composed of a downbeat and upbeats. The first beat of each measure is called a downbeat, and the rest are called upbeats. In this method, you need to set the file path of the upbeat and downbeat, the number of beats per measure, the beat speed, and whether to send the sound of the metronome to remote users. After successfully calling this method, the SDK triggers the onRhythmPlayerStateChanged callback locally to report the status of the virtual metronome.
6343
+ * 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.
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.
6345
+ *
6346
+ * @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
+ * @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.
6348
+ * @param config The metronome configuration. See AgoraRhythmPlayerConfig.
6347
6349
  */
6348
6350
  abstract startRhythmPlayer(
6349
6351
  sound1: string,
@@ -6352,12 +6354,19 @@ export abstract class IRtcEngine {
6352
6354
  ): number;
6353
6355
 
6354
6356
  /**
6355
- * @ignore
6357
+ * Disables the virtual metronome.
6358
+ *
6359
+ * After calling startRhythmPlayer, you can call this method to disable the virtual metronome.
6356
6360
  */
6357
6361
  abstract stopRhythmPlayer(): number;
6358
6362
 
6359
6363
  /**
6360
- * @ignore
6364
+ * Configures the virtual metronome.
6365
+ *
6366
+ * 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.
6367
+ * 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. After calling startRhythmPlayer, you can call this method to reconfigure the virtual metronome. After successfully calling this method, the SDK triggers the onRhythmPlayerStateChanged callback locally to report the status of the virtual metronome.
6368
+ *
6369
+ * @param config The metronome configuration. See AgoraRhythmPlayerConfig.
6361
6370
  */
6362
6371
  abstract configRhythmPlayer(config: AgoraRhythmPlayerConfig): number;
6363
6372
 
@@ -6383,10 +6392,10 @@ export abstract class IRtcEngine {
6383
6392
  /**
6384
6393
  * Enables or disables video screenshot and upload.
6385
6394
  *
6386
- * When video screenshot and upload function is enabled, the SDK takes screenshots and uploads videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. Before calling this method, ensure that you have contacted to activate the video screenshot upload service.
6395
+ * When video screenshot and upload function is enabled, the SDK takes screenshots and uploads videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service.
6387
6396
  *
6388
- * @param enabled Whether to enable video screenshot and upload : true : Enables video screenshot and upload. false : Disables video screenshot and upload.
6389
- * @param config Configuration of video screenshot and upload. See ContentInspectConfig. When the video moderation module is set to video moderation via Agora self-developed extension(ContentInspectSupervision), the video screenshot and upload dynamic library libagora_content_inspect_extension.dll is required. Deleting this library disables the screenshot and upload feature.
6397
+ * @param enabled Whether to enalbe video screenshot and upload: true : Enables video screenshot and upload. false : Disables video screenshot and upload.
6398
+ * @param config Screenshot and upload configuration. See ContentInspectConfig. When the video moderation module is set to video moderation via Agora self-developed extension(ContentInspectSupervision), the video screenshot and upload dynamic library libagora_content_inspect_extension.dll is required. Deleting this library disables the screenshot and upload feature.
6390
6399
  *
6391
6400
  * @returns
6392
6401
  * 0: Success.
@@ -6555,9 +6564,7 @@ export abstract class IRtcEngine {
6555
6564
  /**
6556
6565
  * Enables audio and video frame instant rendering.
6557
6566
  *
6558
- * After successfully calling this method, the SDK enables the instant frame rendering mode, which can speed up the first frame rendering speed after the user joins the channel.
6559
- * Once the instant rendering function is enabled, it can only be canceled by calling the release method to destroy the IRtcEngine object.
6560
- * In this mode, the SDK uses Agora's custom encryption algorithm to shorten the time required to establish transmission links, and the security is reduced compared to the standard DTLS (Datagram Transport Layer Security). If the application scenario requires higher security standards, Agora recommends that you do not use this method.
6567
+ * After successfully calling this method, the SDK enables the instant frame rendering mode, which can speed up the first frame rendering after the user joins the channel.
6561
6568
  *
6562
6569
  * @returns
6563
6570
  * 0: Success.
@@ -6737,7 +6744,6 @@ export abstract class IRtcEngine {
6737
6744
  * All lowercase English letters: a to z.
6738
6745
  * All uppercase English letters: A to Z.
6739
6746
  * All numeric characters: 0 to 9.
6740
- * Space
6741
6747
  * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
6742
6748
  * @param uid The user ID of the remote user.
6743
6749
  */