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

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 (103) hide show
  1. package/js/AgoraSdk.js +7 -5
  2. package/js/Private/AgoraBase.js +394 -1292
  3. package/js/Private/AgoraMediaBase.js +76 -340
  4. package/js/Private/AgoraMediaPlayerTypes.js +25 -122
  5. package/js/Private/IAgoraLog.js +5 -14
  6. package/js/Private/IAgoraMediaEngine.js +5 -2
  7. package/js/Private/IAgoraMediaPlayer.js +10 -4
  8. package/js/Private/IAgoraMediaRecorder.js +5 -2
  9. package/js/Private/IAgoraMediaStreamingSource.js +5 -12
  10. package/js/Private/IAgoraMusicContentCenter.js +68 -125
  11. package/js/Private/IAgoraRhythmPlayer.js +5 -10
  12. package/js/Private/IAgoraRtcEngine.js +141 -932
  13. package/js/Private/IAgoraRtcEngineEx.js +29 -13
  14. package/js/Private/IAgoraSpatialAudio.js +40 -53
  15. package/js/Private/IAudioDeviceManager.js +5 -2
  16. package/js/Private/impl/IAgoraMediaEngineImpl.js +156 -139
  17. package/js/Private/impl/IAgoraMediaPlayerImpl.js +538 -526
  18. package/js/Private/impl/IAgoraMediaRecorderImpl.js +29 -26
  19. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +264 -192
  20. package/js/Private/impl/IAgoraRtcEngineExImpl.js +419 -399
  21. package/js/Private/impl/IAgoraRtcEngineImpl.js +2352 -2207
  22. package/js/Private/impl/IAgoraSpatialAudioImpl.js +192 -169
  23. package/js/Private/impl/IAudioDeviceManagerImpl.js +235 -232
  24. package/js/Private/internal/AudioDeviceManagerInternal.js +44 -24
  25. package/js/Private/internal/IrisApiEngine.js +109 -76
  26. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +49 -29
  27. package/js/Private/internal/MediaEngineInternal.js +82 -58
  28. package/js/Private/internal/MediaPlayerInternal.js +132 -111
  29. package/js/Private/internal/MediaRecorderInternal.js +64 -38
  30. package/js/Private/internal/MusicContentCenterInternal.js +130 -100
  31. package/js/Private/internal/RtcEngineExInternal.js +265 -219
  32. package/js/Private/ti/AgoraBase-ti.js +2 -2
  33. package/js/Private/ti/AgoraMediaBase-ti.js +15 -15
  34. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
  35. package/js/Private/ti/IAgoraLog-ti.js +1 -1
  36. package/js/Private/ti/IAgoraMediaEngine-ti.js +1 -1
  37. package/js/Private/ti/IAgoraMediaPlayer-ti.js +2 -2
  38. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +2 -2
  39. package/js/Private/ti/IAgoraMediaRecorder-ti.js +1 -1
  40. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +1 -1
  41. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +5 -4
  42. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
  43. package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
  44. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +1 -1
  45. package/js/Private/ti/IAgoraSpatialAudio-ti.js +1 -1
  46. package/js/Private/ti/IAudioDeviceManager-ti.js +1 -1
  47. package/js/Renderer/AgoraView.js +145 -100
  48. package/js/Renderer/IRenderer.js +18 -17
  49. package/js/Renderer/IRendererManager.js +5 -2
  50. package/js/Renderer/RendererManager.js +208 -180
  51. package/js/Renderer/WebGLRenderer/index.js +111 -107
  52. package/js/Renderer/YUVCanvasRenderer/index.js +68 -51
  53. package/js/Utils.js +85 -36
  54. package/package.json +3 -3
  55. package/ts/AgoraSdk.ts +3 -1
  56. package/ts/Private/AgoraBase.ts +227 -86
  57. package/ts/Private/AgoraMediaBase.ts +69 -54
  58. package/ts/Private/AgoraMediaPlayerTypes.ts +4 -4
  59. package/ts/Private/IAgoraLog.ts +1 -1
  60. package/ts/Private/IAgoraMediaEngine.ts +42 -39
  61. package/ts/Private/IAgoraMediaPlayer.ts +98 -67
  62. package/ts/Private/IAgoraMediaPlayerSource.ts +15 -8
  63. package/ts/Private/IAgoraMusicContentCenter.ts +25 -4
  64. package/ts/Private/IAgoraRtcEngine.ts +951 -747
  65. package/ts/Private/IAgoraRtcEngineEx.ts +183 -157
  66. package/ts/Private/IAgoraSpatialAudio.ts +55 -32
  67. package/ts/Private/IAudioDeviceManager.ts +39 -25
  68. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +72 -21
  69. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +136 -15
  70. package/ts/Private/internal/RtcEngineExInternal.ts +8 -0
  71. package/ts/Private/ti/AgoraMediaBase-ti.ts +13 -13
  72. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +3 -2
  73. package/types/AgoraSdk.d.ts +3 -1
  74. package/types/AgoraSdk.d.ts.map +1 -1
  75. package/types/Private/AgoraBase.d.ts +221 -86
  76. package/types/Private/AgoraBase.d.ts.map +1 -1
  77. package/types/Private/AgoraMediaBase.d.ts +69 -51
  78. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  79. package/types/Private/AgoraMediaPlayerTypes.d.ts +4 -4
  80. package/types/Private/IAgoraLog.d.ts +1 -1
  81. package/types/Private/IAgoraMediaEngine.d.ts +42 -39
  82. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  83. package/types/Private/IAgoraMediaPlayer.d.ts +98 -67
  84. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  85. package/types/Private/IAgoraMediaPlayerSource.d.ts +15 -8
  86. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
  87. package/types/Private/IAgoraMusicContentCenter.d.ts +17 -5
  88. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  89. package/types/Private/IAgoraRtcEngine.d.ts +936 -744
  90. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  91. package/types/Private/IAgoraRtcEngineEx.d.ts +183 -157
  92. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  93. package/types/Private/IAgoraSpatialAudio.d.ts +55 -32
  94. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
  95. package/types/Private/IAudioDeviceManager.d.ts +39 -25
  96. package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
  97. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +9 -5
  98. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -1
  99. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +18 -6
  100. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  101. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
  102. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  103. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -1
@@ -17,74 +17,67 @@ export declare class RtcConnection {
17
17
  }
18
18
  /**
19
19
  * This interface class contains multi-channel methods.
20
+ *
20
21
  * Inherited from IRtcEngine .
21
22
  */
22
23
  export declare abstract class IRtcEngineEx extends IRtcEngine {
23
24
  /**
24
25
  * Joins a channel with the connection ID.
25
- * You can call this method multiple times to join more than one channel.If you are already in a channel, you cannot rejoin it with the same user ID.If you want to join the same channel from different devices, ensure that the user IDs are different for all devices.Ensure that the app ID you use to generate the token is the same as the app ID used when creating the IRtcEngine instance.
26
+ *
27
+ * You can call this method multiple times to join more than one channel. If you are already in a channel, you cannot rejoin it with the same user ID. If you want to join the same channel from different devices, ensure that the user IDs are different for all devices. Ensure that the app ID you use to generate the token is the same as the app ID used when creating the IRtcEngine instance.
26
28
  *
27
29
  * @param token The token generated on your server for authentication.
28
- * @param connection The connection information. See RtcConnection .
29
- * @param options The channel media options. See ChannelMediaOptions .
30
+ * @param connection The connection information. See RtcConnection.
31
+ * @param options The channel media options. See ChannelMediaOptions.
30
32
  *
31
33
  * @returns
32
- * 0: Success.
33
- * < 0: Failure.
34
- * -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.
35
- * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
36
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
37
- * -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.
38
- * -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.
39
- * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
40
- * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
34
+ * 0: Success. < 0: Failure. -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again. -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object. -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method. -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected (1) state. -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel. -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
41
35
  */
42
36
  abstract joinChannelEx(token: string, connection: RtcConnection, options: ChannelMediaOptions): number;
43
37
  /**
44
38
  * Sets channel options and leaves the channel.
45
- * This method lets the user leave the channel, for example, by hanging up or exiting the call.After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call.This method can be called whether or not a call is currently in progress. This method releases all resources related to the session.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After you leave the channel, the SDK triggers the onLeaveChannel callback.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.If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.Calling leaveChannel will leave the channels when calling joinChannel and joinChannelEx at the same time.
46
39
  *
47
- * @param connection The connection information. See RtcConnection .
48
- * @param options The options for leaving the channel. See LeaveChannelOptions .This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect.
40
+ * This method lets the user leave the channel, for example, by hanging up or exiting the call. After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call. This method can be called whether or not a call is currently in progress. This method releases all resources related to the session. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After you leave the channel, the SDK triggers the onLeaveChannel callback. 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. If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback. Calling leaveChannel will leave the channels when calling joinChannel and joinChannelEx at the same time.
41
+ *
42
+ * @param connection The connection information. See RtcConnection.
43
+ * @param options The options for leaving the channel. See LeaveChannelOptions.This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect.
49
44
  *
50
45
  * @returns
51
- * 0: Success.< 0: Failure.
46
+ * 0: Success. < 0: Failure.
52
47
  */
53
48
  abstract leaveChannelEx(connection: RtcConnection, options?: LeaveChannelOptions): number;
54
49
  /**
55
50
  * Updates the channel media options after joining the channel.
56
51
  *
57
- * @param options The channel media options. See ChannelMediaOptions .
58
- * @param connection The connection information. See RtcConnection .
52
+ * @param options The channel media options. See ChannelMediaOptions.
53
+ * @param connection The connection information. See RtcConnection.
59
54
  *
60
55
  * @returns
61
- * 0: Success.
62
- * < 0: Failure.
63
- * -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.
64
- * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
65
- * -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.
56
+ * 0: Success. < 0: Failure. -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. -8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method.
66
57
  */
67
58
  abstract updateChannelMediaOptionsEx(options: ChannelMediaOptions, connection: RtcConnection): number;
68
59
  /**
69
60
  * Sets the encoder configuration for the local video.
70
- * Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.The config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found.
71
61
  *
72
- * @param config Video profile. See VideoEncoderConfiguration .
73
- * @param connection The connection information. See RtcConnection .
62
+ * Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. The config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found.
63
+ *
64
+ * @param config Video profile. See VideoEncoderConfiguration.
65
+ * @param connection The connection information. See RtcConnection.
74
66
  *
75
67
  * @returns
76
- * 0: Success.< 0: Failure.
68
+ * 0: Success. < 0: Failure.
77
69
  */
78
70
  abstract setVideoEncoderConfigurationEx(config: VideoEncoderConfiguration, connection: RtcConnection): number;
79
71
  /**
80
72
  * Initializes the video view of a remote user.
81
- * This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view.The application specifies the uid of the remote video in the VideoCanvas method before the remote user joins the channel.If the remote uid is unknown to the application, set it after the application receives the onUserJoined callback. If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the onUserJoined callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams.To unbind the remote user from the view, set the view parameter to NULL.Once the remote user leaves the channel, the SDK unbinds the remote user.To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderModeEx method.
82
73
  *
83
- * @param canvas The remote video view settings. See VideoCanvas .
84
- * @param connection The connection information. See RtcConnection .
74
+ * This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. The application specifies the uid of the remote video in the VideoCanvas method before the remote user joins the channel. If the remote uid is unknown to the application, set it after the application receives the onUserJoined callback. If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the onUserJoined callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderModeEx method.
75
+ *
76
+ * @param canvas The remote video view settings. See VideoCanvas.
77
+ * @param connection The connection information. See RtcConnection.
85
78
  *
86
79
  * @returns
87
- * 0: Success.< 0: Failure.
80
+ * 0: Success. < 0: Failure.
88
81
  */
89
82
  abstract setupRemoteVideoEx(canvas: VideoCanvas, connection: RtcConnection): number;
90
83
  /**
@@ -92,7 +85,7 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
92
85
  *
93
86
  * @param uid The ID of the specified user.
94
87
  * @param mute Whether to stop receiving the audio stream of the specified user:true: Stop receiving the audio stream of the specified user.false: (Default) Resume receiving the audio stream of the specified user.
95
- * @param connection The connection information. See RtcConnection .
88
+ * @param connection The connection information. See RtcConnection.
96
89
  *
97
90
  * @returns
98
91
  * 0: Success. < 0: Failure.
@@ -100,34 +93,37 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
100
93
  abstract muteRemoteAudioStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
101
94
  /**
102
95
  * Stops or resumes receiving the video stream of a specified user.
96
+ *
103
97
  * This method is used to stop or resume receiving the video stream of a specified user. You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
104
98
  *
105
99
  * @param uid The user ID of the remote user.
106
100
  * @param mute Whether to stop receiving the video stream of the specified user:true: Stop receiving the video stream of the specified user.false: (Default) Resume receiving the video stream of the specified user.
107
- * @param connection The connection information. See RtcConnection .
101
+ * @param connection The connection information. See RtcConnection.
108
102
  *
109
103
  * @returns
110
- * 0: Success.< 0: Failure.
104
+ * 0: Success. < 0: Failure.
111
105
  */
112
106
  abstract muteRemoteVideoStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
113
107
  /**
114
108
  * Sets the stream type of the remote video.
115
- * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate.By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request.
109
+ *
110
+ * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx ( false ) , the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request.
116
111
  *
117
112
  * @param uid The user ID.
118
- * @param streamType The video stream type: VideoStreamType .
119
- * @param connection The connection information. See RtcConnection .
113
+ * @param streamType The video stream type: VideoStreamType.
114
+ * @param connection The connection information. See RtcConnection.
120
115
  *
121
116
  * @returns
122
- * 0: Success.< 0: Failure.
117
+ * 0: Success. < 0: Failure.
123
118
  */
124
119
  abstract setRemoteVideoStreamTypeEx(uid: number, streamType: VideoStreamType, connection: RtcConnection): number;
125
120
  /**
126
121
  * Stops or resumes publishing the local audio stream.
127
- * This method does not affect any ongoing audio recording, because it does not disable the audio capture device.
122
+ *
123
+ * This method does not affect any ongoing audio recording, because it does not disable the audio capture device. A successful call of this method triggers the onUserMuteAudio and onRemoteAudioStateChanged callbacks on the remote client.
128
124
  *
129
125
  * @param mute Whether to stop publishing the local audio stream:true: Stops publishing the local audio stream.false: (Default) Resumes publishing the local audio stream.
130
- * @param connection The connection information. See RtcConnection .
126
+ * @param connection The connection information. See RtcConnection.
131
127
  *
132
128
  * @returns
133
129
  * 0: Success. < 0: Failure.
@@ -135,21 +131,25 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
135
131
  abstract muteLocalAudioStreamEx(mute: boolean, connection: RtcConnection): number;
136
132
  /**
137
133
  * Stops or resumes publishing the local video stream.
138
- * A successful call of this method triggers the onUserMuteVideo callback on the remote client.This method does not affect any ongoing video recording, because it does not disable the camera.
139
134
  *
140
- * @param mute Whether to stop publishing the local video stream.true: Stop publishing the local video stream.false: (Default) Publish the local video stream.
141
- * @param connection The connection information. See RtcConnection .
135
+ * A successful call of this method triggers the onUserMuteVideo callback on the remote client. This method does not affect any ongoing video recording, because it does not disable the camera.
136
+ *
137
+ * @param mute Whether to stop publishing the local video stream.
138
+ * true: Stop publishing the local video stream.
139
+ * false: (Default) Publish the local video stream.
140
+ * @param connection The connection information. See RtcConnection.
142
141
  *
143
142
  * @returns
144
- * 0: Success.< 0: Failure.
143
+ * 0: Success. < 0: Failure.
145
144
  */
146
145
  abstract muteLocalVideoStreamEx(mute: boolean, connection: RtcConnection): number;
147
146
  /**
148
147
  * Stops or resumes subscribing to the audio streams of all remote users.
149
- * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel .
148
+ *
149
+ * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call. Call this method after joining a channel. If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel .
150
150
  *
151
151
  * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default.
152
- * @param connection The connection information. See RtcConnection .
152
+ * @param connection The connection information. See RtcConnection.
153
153
  *
154
154
  * @returns
155
155
  * 0: Success. < 0: Failure.
@@ -157,70 +157,77 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
157
157
  abstract muteAllRemoteAudioStreamsEx(mute: boolean, connection: RtcConnection): number;
158
158
  /**
159
159
  * Stops or resumes subscribing to the video streams of all remote users.
160
+ *
160
161
  * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
161
162
  *
162
163
  * @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.
163
- * @param connection The connection information. See RtcConnection .
164
+ * @param connection The connection information. See RtcConnection.
164
165
  *
165
166
  * @returns
166
- * 0: Success.< 0: Failure.
167
+ * 0: Success. < 0: Failure.
167
168
  */
168
169
  abstract muteAllRemoteVideoStreamsEx(mute: boolean, connection: RtcConnection): number;
169
170
  /**
170
171
  * Set the blocklist of subscriptions for audio streams.
171
- * You can call this method to specify the audio streams of a user that you do not want to subscribe to.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions .Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
172
+ *
173
+ * You can call this method to specify the audio streams of a user that you do not want to subscribe to. You can call this method either before or after joining a channel. The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions . Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
172
174
  *
173
175
  * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
174
176
  * @param uidNumber The number of users in the user ID list.
175
- * @param connection The connection information. See RtcConnection .
177
+ * @param connection The connection information. See RtcConnection.
176
178
  *
177
179
  * @returns
178
- * 0: Success.< 0: Failure.
180
+ * 0: Success. < 0: Failure.
179
181
  */
180
182
  abstract setSubscribeAudioBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
181
183
  /**
182
184
  * Sets the allowlist of subscriptions for audio streams.
183
- * You can call this method to specify the audio streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions .Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
185
+ *
186
+ * You can call this method to specify the audio streams of a user that you want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. You can call this method either before or after joining a channel. The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions . Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
184
187
  *
185
188
  * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
186
189
  * @param uidNumber The number of users in the user ID list.
187
- * @param connection The connection information. See RtcConnection .
190
+ * @param connection The connection information. See RtcConnection.
188
191
  *
189
192
  * @returns
190
- * 0: Success.< 0: Failure.
193
+ * 0: Success. < 0: Failure.
191
194
  */
192
195
  abstract setSubscribeAudioAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
193
196
  /**
194
197
  * Set the blocklist of subscriptions for video streams.
195
- * You can call this method to specify the video streams of a user that you do not want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
196
198
  *
197
- * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
199
+ * You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. You can call this method either before or after joining a channel. The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
200
+ *
201
+ * @param uidList The user ID list of users that you do not want to subscribe to.
202
+ * If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
198
203
  * @param uidNumber The number of users in the user ID list.
199
- * @param connection The connection information. See RtcConnection .
204
+ * @param connection The connection information. See RtcConnection.
200
205
  *
201
206
  * @returns
202
- * 0: Success.< 0: Failure.
207
+ * 0: Success. < 0: Failure.
203
208
  */
204
209
  abstract setSubscribeVideoBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
205
210
  /**
206
211
  * Set the allowlist of subscriptions for video streams.
207
- * You can call this method to specify the video streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
212
+ *
213
+ * You can call this method to specify the video streams of a user that you want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. You can call this method either before or after joining a channel. The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions .
208
214
  *
209
215
  * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
210
216
  * @param uidNumber The number of users in the user ID list.
211
- * @param connection The connection information. See RtcConnection .
217
+ * @param connection The connection information. See RtcConnection.
212
218
  *
213
219
  * @returns
214
- * 0: Success.< 0: Failure.
220
+ * 0: Success. < 0: Failure.
215
221
  */
216
222
  abstract setSubscribeVideoAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
217
223
  /**
218
224
  * Options for subscribing to remote video streams.
225
+ *
219
226
  * When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user.
220
227
  *
221
228
  * @param uid The user ID of the remote user.
222
- * @param options The video subscription options. See VideoSubscriptionOptions .
223
- * @param connection The connection information. See RtcConnection .
229
+ * @param options The video subscription options. See VideoSubscriptionOptions.
230
+ * @param connection The connection information. See RtcConnection.
224
231
  *
225
232
  * @returns
226
233
  * 0: Success.
@@ -229,15 +236,16 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
229
236
  abstract setRemoteVideoSubscriptionOptionsEx(uid: number, options: VideoSubscriptionOptions, connection: RtcConnection): number;
230
237
  /**
231
238
  * Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
232
- * This method sets the voice position and volume of a remote user.When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games.For the best voice positioning, Agora recommends using a wired headset.Call this method after joining a channel.
239
+ *
240
+ * This method sets the voice position and volume of a remote user. When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games. For the best voice positioning, Agora recommends using a wired headset. Call this method after joining a channel.
233
241
  *
234
242
  * @param uid The user ID of the remote user.
235
243
  * @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:-1.0: The remote voice comes from the left.0.0: (Default) The remote voice comes from the front.1.0: The remote voice comes from the right.
236
244
  * @param gain The volume of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original volume of the remote user). The smaller the value, the lower the volume.
237
- * @param connection The connection information. See RtcConnection .
245
+ * @param connection The connection information. See RtcConnection.
238
246
  *
239
247
  * @returns
240
- * 0: Success.< 0: Failure.
248
+ * 0: Success. < 0: Failure.
241
249
  */
242
250
  abstract setRemoteVoicePositionEx(uid: number, pan: number, gain: number, connection: RtcConnection): number;
243
251
  /**
@@ -246,28 +254,30 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
246
254
  abstract setRemoteUserSpatialAudioParamsEx(uid: number, params: SpatialAudioParams, connection: RtcConnection): number;
247
255
  /**
248
256
  * Sets the video display mode of a specified remote user.
249
- * After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.Call this method after initializing the remote view by calling the setupRemoteVideo method.During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
257
+ *
258
+ * After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees. Call this method after initializing the remote view by calling the setupRemoteVideo method. During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
250
259
  *
251
260
  * @param uid The user ID of the remote user.
252
- * @param renderMode The video display mode of the remote user. See RenderModeType .
253
- * @param mirrorMode The mirror mode of the remote user view. See VideoMirrorModeType .
254
- * @param connection The connection information. See RtcConnection .
261
+ * @param renderMode The video display mode of the remote user. See RenderModeType.
262
+ * @param mirrorMode The mirror mode of the remote user view. See VideoMirrorModeType.
263
+ * @param connection The connection information. See RtcConnection.
255
264
  *
256
265
  * @returns
257
- * 0: Success.< 0: Failure.
266
+ * 0: Success. < 0: Failure.
258
267
  */
259
268
  abstract setRemoteRenderModeEx(uid: number, renderMode: RenderModeType, mirrorMode: VideoMirrorModeType, connection: RtcConnection): number;
260
269
  /**
261
270
  * Enables loopback audio capturing.
262
- * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing.This method only supports using one sound card for audio capturing.
263
271
  *
264
- * @param connection The connection information. See RtcConnection .
272
+ * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end. macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing. This method only supports using one sound card for audio capturing.
273
+ *
274
+ * @param connection The connection information. See RtcConnection.
265
275
  * @param enabled Sets whether to enable loopback audio capture:true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
266
276
  * @param deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing.
267
277
  * Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing.
268
278
  *
269
279
  * @returns
270
- * 0: Success.< 0: Failure.
280
+ * 0: Success. < 0: Failure.
271
281
  */
272
282
  abstract enableLoopbackRecordingEx(connection: RtcConnection, enabled: boolean, deviceName?: string): number;
273
283
  /**
@@ -280,21 +290,23 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
280
290
  abstract muteRecordingSignalEx(mute: boolean, connection: RtcConnection): number;
281
291
  /**
282
292
  * Adjusts the playback signal volume of a specified remote user.
283
- * You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user.Call this method after joining a channel.The playback volume here refers to the mixed volume of a specified remote user.
293
+ *
294
+ * You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user. Call this method after joining a channel. The playback volume here refers to the mixed volume of a specified remote user.
284
295
  *
285
296
  * @param uid The user ID of the remote user.
286
297
  * @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
287
- * @param connection The connection information. See RtcConnection .
298
+ * @param connection The connection information. See RtcConnection.
288
299
  *
289
300
  * @returns
290
- * 0: Success.< 0: Failure.
301
+ * 0: Success. < 0: Failure.
291
302
  */
292
303
  abstract adjustUserPlaybackSignalVolumeEx(uid: number, volume: number, connection: RtcConnection): number;
293
304
  /**
294
305
  * Gets the current connection state of the SDK.
306
+ *
295
307
  * You can call this method either before or after joining a channel.
296
308
  *
297
- * @param connection The connection information. See RtcConnection .
309
+ * @param connection The connection information. See RtcConnection.
298
310
  *
299
311
  * @returns
300
312
  * The current connection state. See ConnectionStateType .
@@ -306,182 +318,191 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
306
318
  abstract enableEncryptionEx(connection: RtcConnection, enabled: boolean, config: EncryptionConfig): number;
307
319
  /**
308
320
  * Creates a data stream.
309
- * Creates a data stream. Each user can create up to five data streams in a single channel.Compared with createDataStreamEx , this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data.
310
321
  *
311
- * @param config The configurations for the data stream. See DataStreamConfig .
312
- * @param connection The connection information. See RtcConnection .
322
+ * Creates a data stream. Each user can create up to five data streams in a single channel. Compared with createDataStreamEx , this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data.
323
+ *
324
+ * @param config The configurations for the data stream. See DataStreamConfig.
325
+ * @param connection The connection information. See RtcConnection.
313
326
  *
314
327
  * @returns
315
- * ID of the created data stream, if the method call succeeds.< 0: Failure.
328
+ * ID of the created data stream, if the method call succeeds. < 0: Failure.
316
329
  */
317
330
  abstract createDataStreamEx(config: DataStreamConfig, connection: RtcConnection): number;
318
331
  /**
319
332
  * Sends data stream messages.
320
- * After calling createDataStreamEx , 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:Up to 60 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.Each client can send up to 30 KB of data per second.Each user can have up to five data streams simultaneously.A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message.
321
- * A failed method call triggers the onStreamMessageError callback on the remote client.Ensure that you call createDataStreamEx to create a data channel before calling this method.This method applies only to the COMMUNICATION profile or to the hosts in the LIVE_BROADCASTING profile. If an audience in the LIVE_BROADCASTING profile calls this method, the audience may be switched to a host.
333
+ *
334
+ * After calling createDataStreamEx , 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: Up to 60 packets can be sent per second in a channel with each packet having a maximum size of 1 KB. Each client can send up to 30 KB of data per second. Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message.
335
+ * A failed method call triggers the onStreamMessageError callback on the remote client. Ensure that you call createDataStreamEx to create a data channel before calling this method. This method applies only to the COMMUNICATION profile or to the hosts in the LIVE_BROADCASTING profile. If an audience in the LIVE_BROADCASTING profile calls this method, the audience may be switched to a host.
322
336
  *
323
337
  * @param streamId The data stream ID. You can get the data stream ID by calling createDataStreamEx.
324
338
  * @param data The message to be sent.
325
339
  * @param length The length of the data.
326
- * @param connection The connection information. See RtcConnection .
340
+ * @param connection The connection information. See RtcConnection.
327
341
  *
328
342
  * @returns
329
- * 0: Success.< 0: Failure.
343
+ * 0: Success. < 0: Failure.
330
344
  */
331
345
  abstract sendStreamMessageEx(streamId: number, data: Uint8Array, length: number, connection: RtcConnection): number;
332
346
  /**
333
347
  * Adds a watermark image to the local video.
334
- * This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one.
335
- * The watermark coordinates are dependent on the settings in the setVideoEncoderConfigurationEx method:If the orientation mode of the encoding video ( OrientationMode ) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.If the orientation mode of the encoding video (OrientationMode) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfigurationEx method; otherwise, the watermark image will be cropped.Ensure that you have called enableVideo before calling this method.This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray.If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings.If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview.If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
348
+ *
349
+ * This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one. The watermark coordinates are dependent on the settings in the setVideoEncoderConfigurationEx method: If the orientation mode of the encoding video ( OrientationMode ) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation. If the orientation mode of the encoding video ( OrientationMode ) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation. When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfigurationEx method; otherwise, the watermark image will be cropped. Ensure that you have called enableVideo before calling this method. This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray. If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings. If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview. If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
336
350
  *
337
351
  * @param watermarkUrl The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path.
338
- * @param options The options of the watermark image to be added. See WatermarkOptions .
339
- * @param connection The connection information. See RtcConnection .
352
+ * @param options The options of the watermark image to be added. See WatermarkOptions.
353
+ * @param connection The connection information. See RtcConnection.
340
354
  *
341
355
  * @returns
342
- * 0: Success.< 0: Failure.
356
+ * 0: Success. < 0: Failure.
343
357
  */
344
358
  abstract addVideoWatermarkEx(watermarkUrl: string, options: WatermarkOptions, connection: RtcConnection): number;
345
359
  /**
346
360
  * Removes the watermark image from the video stream.
347
361
  *
348
- * @param connection The connection information. See RtcConnection .
362
+ * @param connection The connection information. See RtcConnection.
349
363
  *
350
364
  * @returns
351
- * 0: Success.< 0: Failure.
365
+ * 0: Success. < 0: Failure.
352
366
  */
353
367
  abstract clearVideoWatermarkEx(connection: RtcConnection): number;
354
368
  /**
355
369
  * Agora supports reporting and analyzing customized messages.
370
+ *
356
371
  * Agora supports reporting and analyzing customized messages. This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes and each string not exceeding 100 bytes. To try out this function, contact and discuss the format of customized messages with us.
357
372
  */
358
373
  abstract sendCustomReportMessageEx(id: string, category: string, event: string, label: string, value: number, connection: RtcConnection): number;
359
374
  /**
360
375
  * Enables the reporting of users' volume indication.
376
+ *
361
377
  * This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. Once you call this method and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method.
362
378
  *
363
- * @param interval Sets the time interval between two consecutive volume indications:≤ 0: Disables the volume indication.> 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
379
+ * @param interval Sets the time interval between two consecutive volume indications:
380
+ * ≤ 0: Disables the volume indication.
381
+ * > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
364
382
  * @param smooth The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator.
365
- * @param reportVad true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
366
- * @param connection The connection information. See RtcConnection .
383
+ * @param reportVad true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.
384
+ * false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
385
+ * @param connection The connection information. See RtcConnection.
367
386
  *
368
387
  * @returns
369
- * 0: Success.< 0: Failure.
388
+ * 0: Success. < 0: Failure.
370
389
  */
371
390
  abstract enableAudioVolumeIndicationEx(interval: number, smooth: number, reportVad: boolean, connection: RtcConnection): number;
372
391
  /**
373
392
  * Starts pushing media streams to a CDN without transcoding.
374
- * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
375
- * Call this method after joining a channel.
376
- * Only hosts in the LIVE_BROADCASTING profile can call this method.
377
- * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
378
- * Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
393
+ *
394
+ * Ensure that you enable the Media Push service before using this function. See Enable Media Push . Call this method after joining a channel. Only hosts in the LIVE_BROADCASTING profile can call this method. If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
379
395
  *
380
396
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
381
- * @param connection The connection information. See RtcConnection .
397
+ * @param connection The connection information. See RtcConnection.
382
398
  *
383
399
  * @returns
384
- * 0: Success.
385
- * < 0: Failure.
386
- * -2: The URL is null or the string length is 0.
387
- * -7: The SDK is not initialized before calling this method.
388
- * -19: The Media Push URL is already in use, use another URL instead.
400
+ * 0: Success. < 0: Failure. -2: The URL is null or the string length is 0. -7: The SDK is not initialized before calling this method. -19: The Media Push URL is already in use, use another URL instead.
389
401
  */
390
402
  abstract startRtmpStreamWithoutTranscodingEx(url: string, connection: RtcConnection): number;
391
403
  /**
392
404
  * Starts Media Push and sets the transcoding configuration.
393
- * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.Ensure that you enable the Media Push service before using this function. Call this method after joining a channel.Only hosts in the LIVE_BROADCASTING profile can call this method.If you want to retry pushing streams after a failed push, make sure to call stopRtmpStreamEx first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
405
+ *
406
+ * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. Ensure that you enable the Media Push service before using this function. Call this method after joining a channel. Only hosts in the LIVE_BROADCASTING profile can call this method. If you want to retry pushing streams after a failed push, make sure to call stopRtmpStreamEx first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
394
407
  *
395
408
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
396
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
397
- * @param connection The connection information. See RtcConnection .
409
+ * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
410
+ * @param connection The connection information. See RtcConnection.
398
411
  *
399
412
  * @returns
400
- * 0: Success.< 0: Failure.-2: The URL is null or the string length is 0.-7: The SDK is not initialized before calling this method.-19: The Media Push URL is already in use, use another URL instead.
413
+ * 0: Success. < 0: Failure. -2: The URL is null or the string length is 0. -7: The SDK is not initialized before calling this method. -19: The Media Push URL is already in use, use another URL instead.
401
414
  */
402
415
  abstract startRtmpStreamWithTranscodingEx(url: string, transcoding: LiveTranscoding, connection: RtcConnection): number;
403
416
  /**
404
417
  * Updates the transcoding configuration.
405
- * Agora recommends that you use the server-side Media Push function. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated.
406
418
  *
407
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
408
- * @param connection The connection information. See RtcConnection .
419
+ * Agora recommends that you use the server-side Media Push function. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated.
420
+ *
421
+ * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
422
+ * @param connection The connection information. See RtcConnection.
409
423
  *
410
424
  * @returns
411
- * 0: Success.< 0: Failure.
425
+ * 0: Success. < 0: Failure.
412
426
  */
413
427
  abstract updateRtmpTranscodingEx(transcoding: LiveTranscoding, connection: RtcConnection): number;
414
428
  /**
415
429
  * Stops pushing media streams to a CDN.
416
- * Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
430
+ *
431
+ * Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
417
432
  *
418
433
  * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
419
434
  *
420
435
  * @returns
421
- * 0: Success.< 0: Failure.
436
+ * 0: Success. < 0: Failure.
422
437
  */
423
438
  abstract stopRtmpStreamEx(url: string, connection: RtcConnection): number;
424
439
  /**
425
440
  * Starts relaying media streams across channels or updates channels for media relay.
426
- * The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels.After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback, and this callback returns the state of the media stream relay. Common states are as follows:If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), it means that the SDK starts relaying media streams from the source channel to the destination channel.If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.Call this method after joining the channel.This method takes effect only when you are a host in a live streaming channel.The relaying media streams across channels function needs to be enabled by contacting .Agora does not support string user accounts in this API.
427
441
  *
428
- * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
429
- * @param connection The connection information. See RtcConnection .
442
+ * The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback, and this callback returns the state of the media stream relay. Common states are as follows: If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), it means that the SDK starts relaying media streams from the source channel to the destination channel. If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay. Call this method after joining the channel. This method takes effect only when you are a host in a live streaming channel. The relaying media streams across channels function needs to be enabled by contacting . Agora does not support string user accounts in this API.
443
+ *
444
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
445
+ * @param connection The connection information. See RtcConnection.
430
446
  *
431
447
  * @returns
432
- * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host.-8: Internal state error. Probably because the user is not an audience member.
448
+ * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host. -8: Internal state error. Probably because the user is not an audience member.
433
449
  */
434
450
  abstract startOrUpdateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
435
451
  /**
436
452
  * Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
437
- * Deprecated:This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead.After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel.If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.Call this method after joining the channel.This method takes effect only when you are a host in a live streaming channel.After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelayEx method to quit the current relay.The relaying media streams across channels function needs to be enabled by contacting .Agora does not support string user accounts in this API.
438
453
  *
439
- * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
440
- * @param connection The connection information. See RtcConnection .
454
+ * Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay. If the onChannelMediaRelayStateChanged callback returns RelayStateRunning (2) and RelayOk (0), and the onChannelMediaRelayEvent callback returns RelayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel. If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay. Call this method after joining the channel. This method takes effect only when you are a host in a live streaming channel. After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelayEx method to quit the current relay. The relaying media streams across channels function needs to be enabled by contacting . Agora does not support string user accounts in this API.
455
+ *
456
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
457
+ * @param connection The connection information. See RtcConnection.
441
458
  *
442
459
  * @returns
443
- * 0: Success.< 0: Failure.-1: A general error occurs (no specified reason).-2: The parameter is invalid.-7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host.-8: Internal state error. Probably because the user is not an audience member.
460
+ * 0: Success. < 0: Failure. -1: A general error occurs (no specified reason). -2: The parameter is invalid. -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not an host. -8: Internal state error. Probably because the user is not an audience member.
444
461
  */
445
462
  abstract startChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
446
463
  /**
447
464
  * Updates the channels for media stream relay.
448
- * Deprecated:This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead.After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method.After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code.Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged (RelayStateRunning, RelayOk); otherwise, the method call fails.
449
465
  *
450
- * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
451
- * @param connection The connection information. See RtcConnection .
466
+ * Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead. After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method. After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code. Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged ( RelayStateRunning , RelayOk ) ; otherwise, the method call fails.
467
+ *
468
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
469
+ * @param connection The connection information. See RtcConnection.
452
470
  *
453
471
  * @returns
454
- * 0: Success.< 0: Failure.
472
+ * 0: Success. < 0: Failure.
455
473
  */
456
474
  abstract updateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
457
475
  /**
458
476
  * Stops the media stream relay. Once the relay stops, the host quits all the target channels.
459
- * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports RelayStateIdle (0) and RelayOk (0), the host successfully stops the relay.If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the RelayErrorServerNoResponse (2) or RelayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops.
460
477
  *
461
- * @param connection The connection information. See RtcConnection .
478
+ * After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports RelayStateIdle (0) and RelayOk (0), the host successfully stops the relay. If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the RelayErrorServerNoResponse (2) or RelayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops.
479
+ *
480
+ * @param connection The connection information. See RtcConnection.
462
481
  *
463
482
  * @returns
464
- * 0: Success.< 0: Failure.
483
+ * 0: Success. < 0: Failure.
465
484
  */
466
485
  abstract stopChannelMediaRelayEx(connection: RtcConnection): number;
467
486
  /**
468
487
  * Pauses the media stream relay to all target channels.
469
- * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay .Call this method after startOrUpdateChannelMediaRelayEx .
470
488
  *
471
- * @param connection The connection information. See RtcConnection .
489
+ * After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay . Call this method after startOrUpdateChannelMediaRelayEx .
490
+ *
491
+ * @param connection The connection information. See RtcConnection.
472
492
  *
473
493
  * @returns
474
- * 0: Success.< 0: Failure.
494
+ * 0: Success. < 0: Failure.
475
495
  */
476
496
  abstract pauseAllChannelMediaRelayEx(connection: RtcConnection): number;
477
497
  /**
478
498
  * Resumes the media stream relay to all target channels.
479
- * After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels.Call this method after pauseAllChannelMediaRelayEx .
480
499
  *
481
- * @param connection The connection information. See RtcConnection .
500
+ * After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelayEx .
501
+ *
502
+ * @param connection The connection information. See RtcConnection.
482
503
  *
483
504
  * @returns
484
- * 0: Success.< 0: Failure.
505
+ * 0: Success. < 0: Failure.
485
506
  */
486
507
  abstract resumeAllChannelMediaRelayEx(connection: RtcConnection): number;
487
508
  /**
@@ -494,28 +515,30 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
494
515
  abstract getUserInfoByUidEx(uid: number, connection: RtcConnection): UserInfo;
495
516
  /**
496
517
  * Enables or disables dual-stream mode on the sender side.
497
- * After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:High-quality video stream: High bitrate, high resolution.Low-quality video stream: Low bitrate, low resolution.This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
518
+ *
519
+ * After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream: High-quality video stream: High bitrate, high resolution. Low-quality video stream: Low bitrate, low resolution. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
498
520
  *
499
521
  * @param enabled Whether to enable dual-stream mode:
500
522
  * true: Enable dual-stream mode.
501
523
  * false: (Default) Disable dual-stream mode.
502
- * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .
503
- * @param connection The connection information. See RtcConnection .
524
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
525
+ * @param connection The connection information. See RtcConnection.
504
526
  *
505
527
  * @returns
506
- * 0: Success.< 0: Failure.
528
+ * 0: Success. < 0: Failure.
507
529
  */
508
530
  abstract enableDualStreamModeEx(enabled: boolean, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
509
531
  /**
510
532
  * Sets the dual-stream mode on the sender side.
511
- * The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream (never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).The difference and connection between this method and enableDualStreamModeEx is as follows:When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamModeEx(false).When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamModeEx(true).Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence.
512
533
  *
513
- * @param mode The mode in which the video stream is sent. See SimulcastStreamMode .
514
- * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig .
515
- * @param connection The connection information. See RtcConnection .
534
+ * The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream . If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream (never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams). The difference and connection between this method and enableDualStreamModeEx is as follows: When calling this method and setting mode to DisableSimulcastStream , it has the same effect as enableDualStreamModeEx ( false ) . When calling this method and setting mode to EnableSimulcastStream , it has the same effect as enableDualStreamModeEx ( true ) . Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence.
535
+ *
536
+ * @param mode The mode in which the video stream is sent. See SimulcastStreamMode.
537
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
538
+ * @param connection The connection information. See RtcConnection.
516
539
  *
517
540
  * @returns
518
- * 0: Success.< 0: Failure.
541
+ * 0: Success. < 0: Failure.
519
542
  */
520
543
  abstract setDualStreamModeEx(mode: SimulcastStreamMode, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
521
544
  /**
@@ -524,26 +547,29 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
524
547
  abstract setHighPriorityUserListEx(uidList: number[], uidNum: number, option: StreamFallbackOptions, connection: RtcConnection): number;
525
548
  /**
526
549
  * Takes a snapshot of a video stream.
527
- * The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.Call this method after the joinChannelEx method.This method takes a snapshot of the published video stream specified in ChannelMediaOptions .If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
528
550
  *
529
- * @param connection The connection information. See RtcConnection .
551
+ * The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot. This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. Call this method after the joinChannelEx method. This method takes a snapshot of the published video stream specified in ChannelMediaOptions . If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
552
+ *
553
+ * @param connection The connection information. See RtcConnection.
530
554
  * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
531
- * @param filePath The local path (including filename extensions) of the snapshot. For example:Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpgmacOS: ~/Library/Logs/example.jpgEnsure that the path you specify exists and is writable.
555
+ * @param filePath The local path (including filename extensions) of the snapshot. For example:
556
+ * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
557
+ * macOS: ~/Library/Logs/example.jpg
558
+ * Ensure that the path you specify exists and is writable.
532
559
  *
533
560
  * @returns
534
- * 0: Success.< 0: Failure.
561
+ * 0: Success. < 0: Failure.
535
562
  */
536
563
  abstract takeSnapshotEx(connection: RtcConnection, uid: number, filePath: string): number;
537
564
  /**
538
565
  * Enables tracing the video frame rendering process.
539
- * By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process.
540
- * After the local user leaves the current channel, the SDK automatically resets the time point to the next time when the user successfully joins the channel.
541
- * The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the onVideoRenderingTracingResult callback.
542
566
  *
543
- * @param connection The connection information. See RtcConnection .
567
+ * By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process. After the local user leaves the current channel, the SDK automatically resets the time point to the next time when the user successfully joins the channel. The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the onVideoRenderingTracingResult callback.
568
+ *
569
+ * @param connection The connection information. See RtcConnection.
544
570
  *
545
571
  * @returns
546
- * 0: Success.< 0: Failure.
572
+ * 0: Success. < 0: Failure.
547
573
  */
548
574
  abstract startMediaRenderingTracingEx(connection: RtcConnection): number;
549
575
  }