agora-electron-sdk 4.2.1 → 4.2.2-dev.6

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 (81) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/js/AgoraSdk.js +3 -1
  3. package/js/Private/AgoraBase.js +215 -61
  4. package/js/Private/AgoraMediaBase.js +13 -9
  5. package/js/Private/IAgoraRtcEngine.js +19 -56
  6. package/js/Private/IAgoraRtcEngineEx.js +2 -1
  7. package/js/Private/IAgoraSpatialAudio.js +3 -1
  8. package/js/Private/impl/IAgoraMediaEngineImpl.js +12 -6
  9. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +55 -16
  10. package/js/Private/impl/IAgoraRtcEngineImpl.js +105 -14
  11. package/js/Private/internal/MusicContentCenterInternal.js +3 -0
  12. package/js/Private/internal/RtcEngineExInternal.js +26 -6
  13. package/js/Private/ti/AgoraMediaBase-ti.js +13 -13
  14. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +3 -2
  15. package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
  16. package/js/Renderer/WebGLRenderer/index.js +19 -19
  17. package/js/Renderer/YUVCanvasRenderer/index.js +1 -1
  18. package/package.json +3 -3
  19. package/scripts/zipBuild.js +3 -1
  20. package/ts/AgoraSdk.ts +3 -1
  21. package/ts/Private/AgoraBase.ts +473 -185
  22. package/ts/Private/AgoraMediaBase.ts +104 -71
  23. package/ts/Private/AgoraMediaPlayerTypes.ts +10 -7
  24. package/ts/Private/IAgoraLog.ts +7 -3
  25. package/ts/Private/IAgoraMediaEngine.ts +88 -43
  26. package/ts/Private/IAgoraMediaPlayer.ts +173 -80
  27. package/ts/Private/IAgoraMediaPlayerSource.ts +17 -8
  28. package/ts/Private/IAgoraMusicContentCenter.ts +25 -4
  29. package/ts/Private/IAgoraRtcEngine.ts +1846 -854
  30. package/ts/Private/IAgoraRtcEngineEx.ts +311 -152
  31. package/ts/Private/IAgoraSpatialAudio.ts +97 -39
  32. package/ts/Private/IAudioDeviceManager.ts +75 -31
  33. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +12 -6
  34. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +72 -21
  35. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +134 -15
  36. package/ts/Private/internal/MusicContentCenterInternal.ts +4 -0
  37. package/ts/Private/internal/RtcEngineExInternal.ts +43 -13
  38. package/ts/Private/ti/AgoraMediaBase-ti.ts +13 -13
  39. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +3 -2
  40. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +2 -2
  41. package/ts/Renderer/WebGLRenderer/index.ts +26 -21
  42. package/ts/Renderer/YUVCanvasRenderer/index.ts +1 -1
  43. package/types/AgoraSdk.d.ts +3 -1
  44. package/types/AgoraSdk.d.ts.map +1 -1
  45. package/types/Private/AgoraBase.d.ts +467 -185
  46. package/types/Private/AgoraBase.d.ts.map +1 -1
  47. package/types/Private/AgoraMediaBase.d.ts +104 -68
  48. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  49. package/types/Private/AgoraMediaPlayerTypes.d.ts +10 -7
  50. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
  51. package/types/Private/IAgoraLog.d.ts +7 -3
  52. package/types/Private/IAgoraLog.d.ts.map +1 -1
  53. package/types/Private/IAgoraMediaEngine.d.ts +88 -43
  54. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  55. package/types/Private/IAgoraMediaPlayer.d.ts +173 -80
  56. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  57. package/types/Private/IAgoraMediaPlayerSource.d.ts +17 -8
  58. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
  59. package/types/Private/IAgoraMusicContentCenter.d.ts +17 -5
  60. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  61. package/types/Private/IAgoraRtcEngine.d.ts +1832 -851
  62. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  63. package/types/Private/IAgoraRtcEngineEx.d.ts +311 -152
  64. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  65. package/types/Private/IAgoraSpatialAudio.d.ts +97 -39
  66. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
  67. package/types/Private/IAudioDeviceManager.d.ts +75 -31
  68. package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
  69. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +2 -2
  70. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -1
  71. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +9 -5
  72. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -1
  73. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +16 -4
  74. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  75. package/types/Private/internal/MusicContentCenterInternal.d.ts +1 -0
  76. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
  77. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
  78. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  79. package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -1
  80. package/types/Renderer/WebGLRenderer/index.d.ts +1 -1
  81. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
@@ -17,16 +17,21 @@ export declare class RtcConnection {
17
17
  }
18
18
  /**
19
19
  * This interface class contains multi-channel methods.
20
- * Inherited from IRtcEngine .
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.
28
+ * If you are already in a channel, you cannot rejoin it with the same user ID.
29
+ * If you want to join the same channel from different devices, ensure that the user IDs are different for all devices.
30
+ * 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
31
  *
27
32
  * @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 .
33
+ * @param connection The connection information. See RtcConnection.
34
+ * @param options The channel media options. See ChannelMediaOptions.
30
35
  *
31
36
  * @returns
32
37
  * 0: Success.
@@ -35,27 +40,31 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
35
40
  * -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
36
41
  * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
37
42
  * -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.
43
+ * -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
44
  * -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
40
45
  * -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
41
46
  */
42
47
  abstract joinChannelEx(token: string, connection: RtcConnection, options: ChannelMediaOptions): number;
43
48
  /**
44
49
  * 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
50
  *
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.
51
+ * 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.
52
+ * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
53
+ * Calling leaveChannel will leave the channels when calling joinChannel and joinChannelEx at the same time.
54
+ *
55
+ * @param connection The connection information. See RtcConnection.
56
+ * @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
57
  *
50
58
  * @returns
51
- * 0: Success.< 0: Failure.
59
+ * 0: Success.
60
+ * < 0: Failure.
52
61
  */
53
62
  abstract leaveChannelEx(connection: RtcConnection, options?: LeaveChannelOptions): number;
54
63
  /**
55
64
  * Updates the channel media options after joining the channel.
56
65
  *
57
- * @param options The channel media options. See ChannelMediaOptions .
58
- * @param connection The connection information. See RtcConnection .
66
+ * @param options The channel media options. See ChannelMediaOptions.
67
+ * @param connection The connection information. See RtcConnection.
59
68
  *
60
69
  * @returns
61
70
  * 0: Success.
@@ -67,160 +76,205 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
67
76
  abstract updateChannelMediaOptionsEx(options: ChannelMediaOptions, connection: RtcConnection): number;
68
77
  /**
69
78
  * 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
79
  *
72
- * @param config Video profile. See VideoEncoderConfiguration .
73
- * @param connection The connection information. See RtcConnection .
80
+ * 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.
81
+ *
82
+ * @param config Video profile. See VideoEncoderConfiguration.
83
+ * @param connection The connection information. See RtcConnection.
74
84
  *
75
85
  * @returns
76
- * 0: Success.< 0: Failure.
86
+ * 0: Success.
87
+ * < 0: Failure.
77
88
  */
78
89
  abstract setVideoEncoderConfigurationEx(config: VideoEncoderConfiguration, connection: RtcConnection): number;
79
90
  /**
80
91
  * 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
92
  *
83
- * @param canvas The remote video view settings. See VideoCanvas .
84
- * @param connection The connection information. See RtcConnection .
93
+ * 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.
94
+ *
95
+ * @param canvas The remote video view settings. See VideoCanvas.
96
+ * @param connection The connection information. See RtcConnection.
85
97
  *
86
98
  * @returns
87
- * 0: Success.< 0: Failure.
99
+ * 0: Success.
100
+ * < 0: Failure.
88
101
  */
89
102
  abstract setupRemoteVideoEx(canvas: VideoCanvas, connection: RtcConnection): number;
90
103
  /**
91
104
  * Stops or resumes receiving the audio stream of a specified user.
92
105
  *
93
106
  * @param uid The ID of the specified user.
94
- * @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 .
107
+ * @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.
108
+ * @param connection The connection information. See RtcConnection.
96
109
  *
97
110
  * @returns
98
- * 0: Success. < 0: Failure.
111
+ * 0: Success.
112
+ * < 0: Failure.
99
113
  */
100
114
  abstract muteRemoteAudioStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
101
115
  /**
102
116
  * Stops or resumes receiving the video stream of a specified user.
117
+ *
103
118
  * 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
119
  *
105
120
  * @param uid The user ID of the remote user.
106
- * @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 .
121
+ * @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.
122
+ * @param connection The connection information. See RtcConnection.
108
123
  *
109
124
  * @returns
110
- * 0: Success.< 0: Failure.
125
+ * 0: Success.
126
+ * < 0: Failure.
111
127
  */
112
128
  abstract muteRemoteVideoStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
113
129
  /**
114
130
  * 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.
131
+ *
132
+ * 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
133
  *
117
134
  * @param uid The user ID.
118
- * @param streamType The video stream type: VideoStreamType .
119
- * @param connection The connection information. See RtcConnection .
135
+ * @param streamType The video stream type: VideoStreamType.
136
+ * @param connection The connection information. See RtcConnection.
120
137
  *
121
138
  * @returns
122
- * 0: Success.< 0: Failure.
139
+ * 0: Success.
140
+ * < 0: Failure.
123
141
  */
124
142
  abstract setRemoteVideoStreamTypeEx(uid: number, streamType: VideoStreamType, connection: RtcConnection): number;
125
143
  /**
126
144
  * 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.
128
145
  *
129
- * @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 .
146
+ * 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.
147
+ *
148
+ * @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.
149
+ * @param connection The connection information. See RtcConnection.
131
150
  *
132
151
  * @returns
133
- * 0: Success. < 0: Failure.
152
+ * 0: Success.
153
+ * < 0: Failure.
134
154
  */
135
155
  abstract muteLocalAudioStreamEx(mute: boolean, connection: RtcConnection): number;
136
156
  /**
137
157
  * 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
158
  *
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 .
159
+ * A successful call of this method triggers the onUserMuteVideo callback on the remote client.
160
+ * This method does not affect any ongoing video recording, because it does not disable the camera.
161
+ *
162
+ * @param mute Whether to stop publishing the local video stream. true : Stop publishing the local video stream. false : (Default) Publish the local video stream.
163
+ * @param connection The connection information. See RtcConnection.
142
164
  *
143
165
  * @returns
144
- * 0: Success.< 0: Failure.
166
+ * 0: Success.
167
+ * < 0: Failure.
145
168
  */
146
169
  abstract muteLocalVideoStreamEx(mute: boolean, connection: RtcConnection): number;
147
170
  /**
148
171
  * 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 .
150
172
  *
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 .
173
+ * 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.
174
+ * Call this method after joining a channel.
175
+ * 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.
176
+ *
177
+ * @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.
178
+ * @param connection The connection information. See RtcConnection.
153
179
  *
154
180
  * @returns
155
- * 0: Success. < 0: Failure.
181
+ * 0: Success.
182
+ * < 0: Failure.
156
183
  */
157
184
  abstract muteAllRemoteAudioStreamsEx(mute: boolean, connection: RtcConnection): number;
158
185
  /**
159
186
  * Stops or resumes subscribing to the video streams of all remote users.
187
+ *
160
188
  * 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
189
  *
162
- * @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 .
190
+ * @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.
191
+ * @param connection The connection information. See RtcConnection.
164
192
  *
165
193
  * @returns
166
- * 0: Success.< 0: Failure.
194
+ * 0: Success.
195
+ * < 0: Failure.
167
196
  */
168
197
  abstract muteAllRemoteVideoStreamsEx(mute: boolean, connection: RtcConnection): number;
169
198
  /**
170
199
  * 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
200
  *
173
- * @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.
201
+ * You can call this method to specify the audio streams of a user that you do not want to subscribe to.
202
+ * You can call this method either before or after joining a channel.
203
+ * The blocklist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams, and autoSubscribeAudio in ChannelMediaOptions.
204
+ * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
205
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
206
+ *
207
+ * @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
208
  * @param uidNumber The number of users in the user ID list.
175
- * @param connection The connection information. See RtcConnection .
209
+ * @param connection The connection information. See RtcConnection.
176
210
  *
177
211
  * @returns
178
- * 0: Success.< 0: Failure.
212
+ * 0: Success.
213
+ * < 0: Failure.
179
214
  */
180
215
  abstract setSubscribeAudioBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
181
216
  /**
182
217
  * 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.
184
218
  *
185
- * @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.
219
+ * You can call this method to specify the audio streams of a user that you want to subscribe to.
220
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
221
+ * You can call this method either before or after joining a channel.
222
+ * The allowlist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions.
223
+ * Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
224
+ *
225
+ * @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
226
  * @param uidNumber The number of users in the user ID list.
187
- * @param connection The connection information. See RtcConnection .
227
+ * @param connection The connection information. See RtcConnection.
188
228
  *
189
229
  * @returns
190
- * 0: Success.< 0: Failure.
230
+ * 0: Success.
231
+ * < 0: Failure.
191
232
  */
192
233
  abstract setSubscribeAudioAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
193
234
  /**
194
235
  * 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
236
  *
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.
237
+ * You can call this method to specify the video streams of a user that you do not want to subscribe to.
238
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
239
+ * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
240
+ * You can call this method either before or after joining a channel.
241
+ * The blocklist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
242
+ *
243
+ * @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.
198
244
  * @param uidNumber The number of users in the user ID list.
199
- * @param connection The connection information. See RtcConnection .
245
+ * @param connection The connection information. See RtcConnection.
200
246
  *
201
247
  * @returns
202
- * 0: Success.< 0: Failure.
248
+ * 0: Success.
249
+ * < 0: Failure.
203
250
  */
204
251
  abstract setSubscribeVideoBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
205
252
  /**
206
253
  * 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 .
208
254
  *
209
- * @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.
255
+ * You can call this method to specify the video streams of a user that you want to subscribe to.
256
+ * If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
257
+ * Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
258
+ * You can call this method either before or after joining a channel.
259
+ * The allowlist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
260
+ *
261
+ * @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
262
  * @param uidNumber The number of users in the user ID list.
211
- * @param connection The connection information. See RtcConnection .
263
+ * @param connection The connection information. See RtcConnection.
212
264
  *
213
265
  * @returns
214
- * 0: Success.< 0: Failure.
266
+ * 0: Success.
267
+ * < 0: Failure.
215
268
  */
216
269
  abstract setSubscribeVideoAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
217
270
  /**
218
271
  * Options for subscribing to remote video streams.
272
+ *
219
273
  * 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
274
  *
221
275
  * @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 .
276
+ * @param options The video subscription options. See VideoSubscriptionOptions.
277
+ * @param connection The connection information. See RtcConnection.
224
278
  *
225
279
  * @returns
226
280
  * 0: Success.
@@ -229,15 +283,22 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
229
283
  abstract setRemoteVideoSubscriptionOptionsEx(uid: number, options: VideoSubscriptionOptions, connection: RtcConnection): number;
230
284
  /**
231
285
  * 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.
286
+ *
287
+ * 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.
288
+ * For the best voice positioning, Agora recommends using a wired headset.
289
+ * Call this method after joining a channel.
233
290
  *
234
291
  * @param uid The user ID of the remote user.
235
- * @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.
292
+ * @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:
293
+ * -1.0: The remote voice comes from the left.
294
+ * 0.0: (Default) The remote voice comes from the front.
295
+ * 1.0: The remote voice comes from the right.
236
296
  * @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 .
297
+ * @param connection The connection information. See RtcConnection.
238
298
  *
239
299
  * @returns
240
- * 0: Success.< 0: Failure.
300
+ * 0: Success.
301
+ * < 0: Failure.
241
302
  */
242
303
  abstract setRemoteVoicePositionEx(uid: number, pan: number, gain: number, connection: RtcConnection): number;
243
304
  /**
@@ -246,28 +307,36 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
246
307
  abstract setRemoteUserSpatialAudioParamsEx(uid: number, params: SpatialAudioParams, connection: RtcConnection): number;
247
308
  /**
248
309
  * 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.
310
+ *
311
+ * 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.
312
+ * Call this method after initializing the remote view by calling the setupRemoteVideo method.
313
+ * 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
314
  *
251
315
  * @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 .
316
+ * @param renderMode The video display mode of the remote user. See RenderModeType.
317
+ * @param mirrorMode The mirror mode of the remote user view. See VideoMirrorModeType.
318
+ * @param connection The connection information. See RtcConnection.
255
319
  *
256
320
  * @returns
257
- * 0: Success.< 0: Failure.
321
+ * 0: Success.
322
+ * < 0: Failure.
258
323
  */
259
324
  abstract setRemoteRenderModeEx(uid: number, renderMode: RenderModeType, mirrorMode: VideoMirrorModeType, connection: RtcConnection): number;
260
325
  /**
261
326
  * 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
327
  *
264
- * @param connection The connection information. See RtcConnection .
265
- * @param enabled Sets whether to enable loopback audio capture:true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
328
+ * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.
329
+ * 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.
330
+ * This method only supports using one sound card for audio capturing.
331
+ *
332
+ * @param connection The connection information. See RtcConnection.
333
+ * @param enabled Sets whether to enable loopback audio capture: true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing.
266
334
  * @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
335
  * 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
336
  *
269
337
  * @returns
270
- * 0: Success.< 0: Failure.
338
+ * 0: Success.
339
+ * < 0: Failure.
271
340
  */
272
341
  abstract enableLoopbackRecordingEx(connection: RtcConnection, enabled: boolean, deviceName?: string): number;
273
342
  /**
@@ -280,24 +349,29 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
280
349
  abstract muteRecordingSignalEx(mute: boolean, connection: RtcConnection): number;
281
350
  /**
282
351
  * 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.
352
+ *
353
+ * 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.
354
+ * Call this method after joining a channel.
355
+ * The playback volume here refers to the mixed volume of a specified remote user.
284
356
  *
285
357
  * @param uid The user ID of the remote user.
286
358
  * @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 .
359
+ * @param connection The connection information. See RtcConnection.
288
360
  *
289
361
  * @returns
290
- * 0: Success.< 0: Failure.
362
+ * 0: Success.
363
+ * < 0: Failure.
291
364
  */
292
365
  abstract adjustUserPlaybackSignalVolumeEx(uid: number, volume: number, connection: RtcConnection): number;
293
366
  /**
294
367
  * Gets the current connection state of the SDK.
368
+ *
295
369
  * You can call this method either before or after joining a channel.
296
370
  *
297
- * @param connection The connection information. See RtcConnection .
371
+ * @param connection The connection information. See RtcConnection.
298
372
  *
299
373
  * @returns
300
- * The current connection state. See ConnectionStateType .
374
+ * The current connection state. See ConnectionStateType.
301
375
  */
302
376
  abstract getConnectionStateEx(connection: RtcConnection): ConnectionStateType;
303
377
  /**
@@ -306,79 +380,103 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
306
380
  abstract enableEncryptionEx(connection: RtcConnection, enabled: boolean, config: EncryptionConfig): number;
307
381
  /**
308
382
  * 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
383
  *
311
- * @param config The configurations for the data stream. See DataStreamConfig .
312
- * @param connection The connection information. See RtcConnection .
384
+ * 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.
385
+ *
386
+ * @param config The configurations for the data stream. See DataStreamConfig.
387
+ * @param connection The connection information. See RtcConnection.
313
388
  *
314
389
  * @returns
315
- * ID of the created data stream, if the method call succeeds.< 0: Failure.
390
+ * ID of the created data stream, if the method call succeeds.
391
+ * < 0: Failure.
316
392
  */
317
393
  abstract createDataStreamEx(config: DataStreamConfig, connection: RtcConnection): number;
318
394
  /**
319
395
  * 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.
396
+ *
397
+ * 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:
398
+ * Up to 60 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.
399
+ * Each client can send up to 30 KB of data per second.
400
+ * 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.
401
+ * A failed method call triggers the onStreamMessageError callback on the remote client.
402
+ * Ensure that you call createDataStreamEx to create a data channel before calling this method.
403
+ * 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
404
  *
323
405
  * @param streamId The data stream ID. You can get the data stream ID by calling createDataStreamEx.
324
406
  * @param data The message to be sent.
325
407
  * @param length The length of the data.
326
- * @param connection The connection information. See RtcConnection .
408
+ * @param connection The connection information. See RtcConnection.
327
409
  *
328
410
  * @returns
329
- * 0: Success.< 0: Failure.
411
+ * 0: Success.
412
+ * < 0: Failure.
330
413
  */
331
414
  abstract sendStreamMessageEx(streamId: number, data: Uint8Array, length: number, connection: RtcConnection): number;
332
415
  /**
333
416
  * 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.
417
+ *
418
+ * 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:
419
+ * If the orientation mode of the encoding video (OrientationMode) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.
420
+ * If the orientation mode of the encoding video (OrientationMode) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.
421
+ * 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.
422
+ * Ensure that you have called enableVideo before calling this method.
423
+ * 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.
424
+ * 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.
425
+ * 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.
426
+ * 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
427
  *
337
428
  * @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 .
429
+ * @param options The options of the watermark image to be added. See WatermarkOptions.
430
+ * @param connection The connection information. See RtcConnection.
340
431
  *
341
432
  * @returns
342
- * 0: Success.< 0: Failure.
433
+ * 0: Success.
434
+ * < 0: Failure.
343
435
  */
344
436
  abstract addVideoWatermarkEx(watermarkUrl: string, options: WatermarkOptions, connection: RtcConnection): number;
345
437
  /**
346
438
  * Removes the watermark image from the video stream.
347
439
  *
348
- * @param connection The connection information. See RtcConnection .
440
+ * @param connection The connection information. See RtcConnection.
349
441
  *
350
442
  * @returns
351
- * 0: Success.< 0: Failure.
443
+ * 0: Success.
444
+ * < 0: Failure.
352
445
  */
353
446
  abstract clearVideoWatermarkEx(connection: RtcConnection): number;
354
447
  /**
355
448
  * Agora supports reporting and analyzing customized messages.
449
+ *
356
450
  * 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
451
  */
358
452
  abstract sendCustomReportMessageEx(id: string, category: string, event: string, label: string, value: number, connection: RtcConnection): number;
359
453
  /**
360
454
  * Enables the reporting of users' volume indication.
455
+ *
361
456
  * 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
457
  *
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.
458
+ * @param interval Sets the time interval between two consecutive volume indications:
459
+ * ≤ 0: Disables the volume indication.
460
+ * > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
364
461
  * @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 .
462
+ * @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.
463
+ * @param connection The connection information. See RtcConnection.
367
464
  *
368
465
  * @returns
369
- * 0: Success.< 0: Failure.
466
+ * 0: Success.
467
+ * < 0: Failure.
370
468
  */
371
469
  abstract enableAudioVolumeIndicationEx(interval: number, smooth: number, reportVad: boolean, connection: RtcConnection): number;
372
470
  /**
373
471
  * Starts pushing media streams to a CDN without transcoding.
472
+ *
374
473
  * Ensure that you enable the Media Push service before using this function. See Enable Media Push.
375
474
  * Call this method after joining a channel.
376
475
  * 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.
476
+ * 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
477
  *
380
478
  * @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 .
479
+ * @param connection The connection information. See RtcConnection.
382
480
  *
383
481
  * @returns
384
482
  * 0: Success.
@@ -390,98 +488,144 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
390
488
  abstract startRtmpStreamWithoutTranscodingEx(url: string, connection: RtcConnection): number;
391
489
  /**
392
490
  * 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.
491
+ *
492
+ * 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.
493
+ * Ensure that you enable the Media Push service before using this function.
494
+ * Call this method after joining a channel.
495
+ * Only hosts in the LIVE_BROADCASTING profile can call this method.
496
+ * 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
497
  *
395
498
  * @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 .
499
+ * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
500
+ * @param connection The connection information. See RtcConnection.
398
501
  *
399
502
  * @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.
503
+ * 0: Success.
504
+ * < 0: Failure.
505
+ * -2: The URL is null or the string length is 0.
506
+ * -7: The SDK is not initialized before calling this method.
507
+ * -19: The Media Push URL is already in use, use another URL instead.
401
508
  */
402
509
  abstract startRtmpStreamWithTranscodingEx(url: string, transcoding: LiveTranscoding, connection: RtcConnection): number;
403
510
  /**
404
511
  * Updates the transcoding configuration.
512
+ *
405
513
  * 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
514
  *
407
- * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding .
408
- * @param connection The connection information. See RtcConnection .
515
+ * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
516
+ * @param connection The connection information. See RtcConnection.
409
517
  *
410
518
  * @returns
411
- * 0: Success.< 0: Failure.
519
+ * 0: Success.
520
+ * < 0: Failure.
412
521
  */
413
522
  abstract updateRtmpTranscodingEx(transcoding: LiveTranscoding, connection: RtcConnection): number;
414
523
  /**
415
524
  * 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.
525
+ *
526
+ * 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
527
  *
418
528
  * @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
529
  *
420
530
  * @returns
421
- * 0: Success.< 0: Failure.
531
+ * 0: Success.
532
+ * < 0: Failure.
422
533
  */
423
534
  abstract stopRtmpStreamEx(url: string, connection: RtcConnection): number;
424
535
  /**
425
536
  * 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
537
  *
428
- * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
429
- * @param connection The connection information. See RtcConnection .
538
+ * 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. This feature supports relaying media streams to a maximum of six 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:
539
+ * 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.
540
+ * If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.
541
+ * Call this method after joining the channel.
542
+ * This method takes effect only when you are a host in a live streaming channel.
543
+ * The relaying media streams across channels function needs to be enabled by contacting.
544
+ * Agora does not support string user accounts in this API.
545
+ *
546
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
547
+ * @param connection The connection information. See RtcConnection.
430
548
  *
431
549
  * @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.
550
+ * 0: Success.
551
+ * < 0: Failure.
552
+ * -1: A general error occurs (no specified reason).
553
+ * -2: The parameter is invalid.
554
+ * -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.
555
+ * -8: Internal state error. Probably because the user is not a broadcaster.
433
556
  */
434
557
  abstract startOrUpdateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
435
558
  /**
436
559
  * 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
560
  *
439
- * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
440
- * @param connection The connection information. See RtcConnection .
561
+ * 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.
562
+ * 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.
563
+ * If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.
564
+ * Call this method after joining the channel.
565
+ * This method takes effect only when you are a host in a live streaming channel.
566
+ * 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.
567
+ * The relaying media streams across channels function needs to be enabled by contacting.
568
+ * Agora does not support string user accounts in this API.
569
+ *
570
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
571
+ * @param connection The connection information. See RtcConnection.
441
572
  *
442
573
  * @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.
574
+ * 0: Success.
575
+ * < 0: Failure.
576
+ * -1: A general error occurs (no specified reason).
577
+ * -2: The parameter is invalid.
578
+ * -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.
579
+ * -8: Internal state error. Probably because the user is not a broadcaster.
444
580
  */
445
581
  abstract startChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
446
582
  /**
447
583
  * 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
584
  *
450
- * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration .
451
- * @param connection The connection information. See RtcConnection .
585
+ * 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.
586
+ *
587
+ * @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
588
+ * @param connection The connection information. See RtcConnection.
452
589
  *
453
590
  * @returns
454
- * 0: Success.< 0: Failure.
591
+ * 0: Success.
592
+ * < 0: Failure.
455
593
  */
456
594
  abstract updateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
457
595
  /**
458
596
  * 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
597
  *
461
- * @param connection The connection information. See RtcConnection .
598
+ * 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.
599
+ *
600
+ * @param connection The connection information. See RtcConnection.
462
601
  *
463
602
  * @returns
464
- * 0: Success.< 0: Failure.
603
+ * 0: Success.
604
+ * < 0: Failure.
465
605
  */
466
606
  abstract stopChannelMediaRelayEx(connection: RtcConnection): number;
467
607
  /**
468
608
  * 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
609
  *
471
- * @param connection The connection information. See RtcConnection .
610
+ * 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.
611
+ *
612
+ * @param connection The connection information. See RtcConnection.
472
613
  *
473
614
  * @returns
474
- * 0: Success.< 0: Failure.
615
+ * 0: Success.
616
+ * < 0: Failure.
475
617
  */
476
618
  abstract pauseAllChannelMediaRelayEx(connection: RtcConnection): number;
477
619
  /**
478
620
  * 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
621
  *
481
- * @param connection The connection information. See RtcConnection .
622
+ * After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelayEx.
623
+ *
624
+ * @param connection The connection information. See RtcConnection.
482
625
  *
483
626
  * @returns
484
- * 0: Success.< 0: Failure.
627
+ * 0: Success.
628
+ * < 0: Failure.
485
629
  */
486
630
  abstract resumeAllChannelMediaRelayEx(connection: RtcConnection): number;
487
631
  /**
@@ -494,28 +638,35 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
494
638
  abstract getUserInfoByUidEx(uid: number, connection: RtcConnection): UserInfo;
495
639
  /**
496
640
  * 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.
498
641
  *
499
- * @param enabled Whether to enable dual-stream mode:
500
- * true: Enable dual-stream mode.
501
- * 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 .
642
+ * 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:
643
+ * High-quality video stream: High bitrate, high resolution.
644
+ * 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.
645
+ *
646
+ * @param enabled Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode.
647
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
648
+ * @param connection The connection information. See RtcConnection.
504
649
  *
505
650
  * @returns
506
- * 0: Success.< 0: Failure.
651
+ * 0: Success.
652
+ * < 0: Failure.
507
653
  */
508
654
  abstract enableDualStreamModeEx(enabled: boolean, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
509
655
  /**
510
656
  * 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
657
  *
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 .
658
+ * 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:
659
+ * When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamModeEx (false).
660
+ * When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamModeEx (true).
661
+ * 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.
662
+ *
663
+ * @param mode The mode in which the video stream is sent. See SimulcastStreamMode.
664
+ * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
665
+ * @param connection The connection information. See RtcConnection.
516
666
  *
517
667
  * @returns
518
- * 0: Success.< 0: Failure.
668
+ * 0: Success.
669
+ * < 0: Failure.
519
670
  */
520
671
  abstract setDualStreamModeEx(mode: SimulcastStreamMode, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
521
672
  /**
@@ -524,26 +675,34 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
524
675
  abstract setHighPriorityUserListEx(uidList: number[], uidNum: number, option: StreamFallbackOptions, connection: RtcConnection): number;
525
676
  /**
526
677
  * 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
678
  *
529
- * @param connection The connection information. See RtcConnection .
679
+ * 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.
680
+ * Call this method after the joinChannelEx method.
681
+ * This method takes a snapshot of the published video stream specified in ChannelMediaOptions.
682
+ * If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
683
+ *
684
+ * @param connection The connection information. See RtcConnection.
530
685
  * @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.
686
+ * @param filePath The local path (including filename extensions) of the snapshot. For example:
687
+ * Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
688
+ * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
532
689
  *
533
690
  * @returns
534
- * 0: Success.< 0: Failure.
691
+ * 0: Success.
692
+ * < 0: Failure.
535
693
  */
536
694
  abstract takeSnapshotEx(connection: RtcConnection, uid: number, filePath: string): number;
537
695
  /**
538
696
  * Enables tracing the video frame rendering process.
697
+ *
539
698
  * 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.
699
+ * 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.
542
700
  *
543
- * @param connection The connection information. See RtcConnection .
701
+ * @param connection The connection information. See RtcConnection.
544
702
  *
545
703
  * @returns
546
- * 0: Success.< 0: Failure.
704
+ * 0: Success.
705
+ * < 0: Failure.
547
706
  */
548
707
  abstract startMediaRenderingTracingEx(connection: RtcConnection): number;
549
708
  }