agora-electron-sdk 4.2.2-dev.4 → 4.2.2-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/js/Private/AgoraBase.js +139 -53
- package/js/Private/AgoraMediaBase.js +13 -7
- package/js/Private/IAgoraRtcEngine.js +11 -11
- package/js/Private/IAgoraRtcEngineEx.js +1 -1
- package/js/Private/IAgoraSpatialAudio.js +2 -2
- package/js/Private/impl/IAgoraMediaEngineImpl.js +12 -6
- package/js/Private/impl/IAgoraRtcEngineImpl.js +7 -7
- package/js/Private/internal/IrisApiEngine.js +13 -0
- package/js/Private/internal/MusicContentCenterInternal.js +3 -0
- package/js/Private/internal/RtcEngineExInternal.js +24 -7
- package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
- package/js/Renderer/WebGLRenderer/index.js +19 -19
- package/js/Renderer/YUVCanvasRenderer/index.js +1 -1
- package/package.json +3 -3
- package/scripts/zipBuild.js +3 -1
- package/ts/Private/AgoraBase.ts +296 -133
- package/ts/Private/AgoraMediaBase.ts +68 -34
- package/ts/Private/AgoraMediaPlayerTypes.ts +8 -5
- package/ts/Private/IAgoraLog.ts +7 -3
- package/ts/Private/IAgoraMediaEngine.ts +76 -35
- package/ts/Private/IAgoraMediaPlayer.ts +126 -64
- package/ts/Private/IAgoraMediaPlayerSource.ts +3 -1
- package/ts/Private/IAgoraRtcEngine.ts +1325 -530
- package/ts/Private/IAgoraRtcEngineEx.ts +227 -94
- package/ts/Private/IAgoraSpatialAudio.ts +71 -36
- package/ts/Private/IAudioDeviceManager.ts +61 -31
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +12 -6
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +9 -11
- package/ts/Private/internal/IrisApiEngine.ts +14 -0
- package/ts/Private/internal/MusicContentCenterInternal.ts +4 -0
- package/ts/Private/internal/RtcEngineExInternal.ts +36 -14
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +2 -2
- package/ts/Renderer/WebGLRenderer/index.ts +26 -21
- package/ts/Renderer/YUVCanvasRenderer/index.ts +1 -1
- package/types/Private/AgoraBase.d.ts +298 -135
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +69 -35
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaPlayerTypes.d.ts +8 -5
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
- package/types/Private/IAgoraLog.d.ts +7 -3
- package/types/Private/IAgoraLog.d.ts.map +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +76 -35
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +126 -64
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts +3 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +1326 -530
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +227 -94
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +71 -36
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
- package/types/Private/IAudioDeviceManager.d.ts +61 -31
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +2 -2
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +5 -5
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts +1 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
|
@@ -41,20 +41,31 @@ export class RtcConnection {
|
|
|
41
41
|
/**
|
|
42
42
|
* This interface class contains multi-channel methods.
|
|
43
43
|
*
|
|
44
|
-
* Inherited from IRtcEngine
|
|
44
|
+
* Inherited from IRtcEngine.
|
|
45
45
|
*/
|
|
46
46
|
export abstract class IRtcEngineEx extends IRtcEngine {
|
|
47
47
|
/**
|
|
48
48
|
* Joins a channel with the connection ID.
|
|
49
49
|
*
|
|
50
|
-
* You can call this method multiple times to join more than one channel.
|
|
50
|
+
* You can call this method multiple times to join more than one channel.
|
|
51
|
+
* If you are already in a channel, you cannot rejoin it with the same user ID.
|
|
52
|
+
* If you want to join the same channel from different devices, ensure that the user IDs are different for all devices.
|
|
53
|
+
* Ensure that the app ID you use to generate the token is the same as the app ID used when creating the IRtcEngine instance.
|
|
51
54
|
*
|
|
52
55
|
* @param token The token generated on your server for authentication.
|
|
53
56
|
* @param connection The connection information. See RtcConnection.
|
|
54
57
|
* @param options The channel media options. See ChannelMediaOptions.
|
|
55
58
|
*
|
|
56
59
|
* @returns
|
|
57
|
-
* 0: Success.
|
|
60
|
+
* 0: Success.
|
|
61
|
+
* < 0: Failure.
|
|
62
|
+
* -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.
|
|
63
|
+
* -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
|
|
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 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.
|
|
66
|
+
* -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.
|
|
67
|
+
* -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
|
|
68
|
+
* -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
|
|
58
69
|
*/
|
|
59
70
|
abstract joinChannelEx(
|
|
60
71
|
token: string,
|
|
@@ -65,13 +76,16 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
65
76
|
/**
|
|
66
77
|
* Sets channel options and leaves the channel.
|
|
67
78
|
*
|
|
68
|
-
* 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.
|
|
79
|
+
* 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.
|
|
80
|
+
* If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
|
|
81
|
+
* Calling leaveChannel will leave the channels joined by calling joinChannel and joinChannelEx.
|
|
69
82
|
*
|
|
70
83
|
* @param connection The connection information. See RtcConnection.
|
|
71
|
-
* @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.
|
|
84
|
+
* @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.
|
|
72
85
|
*
|
|
73
86
|
* @returns
|
|
74
|
-
* 0: Success.
|
|
87
|
+
* 0: Success.
|
|
88
|
+
* < 0: Failure.
|
|
75
89
|
*/
|
|
76
90
|
abstract leaveChannelEx(
|
|
77
91
|
connection: RtcConnection,
|
|
@@ -85,7 +99,11 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
85
99
|
* @param connection The connection information. See RtcConnection.
|
|
86
100
|
*
|
|
87
101
|
* @returns
|
|
88
|
-
* 0: Success.
|
|
102
|
+
* 0: Success.
|
|
103
|
+
* < 0: Failure.
|
|
104
|
+
* -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.
|
|
105
|
+
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
106
|
+
* -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.
|
|
89
107
|
*/
|
|
90
108
|
abstract updateChannelMediaOptionsEx(
|
|
91
109
|
options: ChannelMediaOptions,
|
|
@@ -101,7 +119,8 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
101
119
|
* @param connection The connection information. See RtcConnection.
|
|
102
120
|
*
|
|
103
121
|
* @returns
|
|
104
|
-
* 0: Success.
|
|
122
|
+
* 0: Success.
|
|
123
|
+
* < 0: Failure.
|
|
105
124
|
*/
|
|
106
125
|
abstract setVideoEncoderConfigurationEx(
|
|
107
126
|
config: VideoEncoderConfiguration,
|
|
@@ -117,7 +136,8 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
117
136
|
* @param connection The connection information. See RtcConnection.
|
|
118
137
|
*
|
|
119
138
|
* @returns
|
|
120
|
-
* 0: Success.
|
|
139
|
+
* 0: Success.
|
|
140
|
+
* < 0: Failure.
|
|
121
141
|
*/
|
|
122
142
|
abstract setupRemoteVideoEx(
|
|
123
143
|
canvas: VideoCanvas,
|
|
@@ -128,11 +148,12 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
128
148
|
* Stops or resumes receiving the audio stream of a specified user.
|
|
129
149
|
*
|
|
130
150
|
* @param uid The ID of the specified user.
|
|
131
|
-
* @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.
|
|
151
|
+
* @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.
|
|
132
152
|
* @param connection The connection information. See RtcConnection.
|
|
133
153
|
*
|
|
134
154
|
* @returns
|
|
135
|
-
* 0: Success.
|
|
155
|
+
* 0: Success.
|
|
156
|
+
* < 0: Failure.
|
|
136
157
|
*/
|
|
137
158
|
abstract muteRemoteAudioStreamEx(
|
|
138
159
|
uid: number,
|
|
@@ -146,11 +167,12 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
146
167
|
* 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.
|
|
147
168
|
*
|
|
148
169
|
* @param uid The user ID of the remote user.
|
|
149
|
-
* @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.
|
|
170
|
+
* @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.
|
|
150
171
|
* @param connection The connection information. See RtcConnection.
|
|
151
172
|
*
|
|
152
173
|
* @returns
|
|
153
|
-
* 0: Success.
|
|
174
|
+
* 0: Success.
|
|
175
|
+
* < 0: Failure.
|
|
154
176
|
*/
|
|
155
177
|
abstract muteRemoteVideoStreamEx(
|
|
156
178
|
uid: number,
|
|
@@ -161,14 +183,15 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
161
183
|
/**
|
|
162
184
|
* Sets the stream type of the remote video.
|
|
163
185
|
*
|
|
164
|
-
* Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx (
|
|
186
|
+
* 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.
|
|
165
187
|
*
|
|
166
188
|
* @param uid The user ID.
|
|
167
189
|
* @param streamType The video stream type: VideoStreamType.
|
|
168
190
|
* @param connection The connection information. See RtcConnection.
|
|
169
191
|
*
|
|
170
192
|
* @returns
|
|
171
|
-
* 0: Success.
|
|
193
|
+
* 0: Success.
|
|
194
|
+
* < 0: Failure.
|
|
172
195
|
*/
|
|
173
196
|
abstract setRemoteVideoStreamTypeEx(
|
|
174
197
|
uid: number,
|
|
@@ -181,11 +204,12 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
181
204
|
*
|
|
182
205
|
* 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.
|
|
183
206
|
*
|
|
184
|
-
* @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.
|
|
207
|
+
* @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.
|
|
185
208
|
* @param connection The connection information. See RtcConnection.
|
|
186
209
|
*
|
|
187
210
|
* @returns
|
|
188
|
-
* 0: Success.
|
|
211
|
+
* 0: Success.
|
|
212
|
+
* < 0: Failure.
|
|
189
213
|
*/
|
|
190
214
|
abstract muteLocalAudioStreamEx(
|
|
191
215
|
mute: boolean,
|
|
@@ -195,15 +219,15 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
195
219
|
/**
|
|
196
220
|
* Stops or resumes publishing the local video stream.
|
|
197
221
|
*
|
|
198
|
-
* A successful call of this method triggers the onUserMuteVideo callback on the remote client.
|
|
222
|
+
* A successful call of this method triggers the onUserMuteVideo callback on the remote client.
|
|
223
|
+
* This method does not affect any ongoing video recording, because it does not disable the camera.
|
|
199
224
|
*
|
|
200
|
-
* @param mute Whether to stop publishing the local video stream.
|
|
201
|
-
* true: Stop publishing the local video stream.
|
|
202
|
-
* false: (Default) Publish the local video stream.
|
|
225
|
+
* @param mute Whether to stop publishing the local video stream. true : Stop publishing the local video stream. false : (Default) Publish the local video stream.
|
|
203
226
|
* @param connection The connection information. See RtcConnection.
|
|
204
227
|
*
|
|
205
228
|
* @returns
|
|
206
|
-
* 0: Success.
|
|
229
|
+
* 0: Success.
|
|
230
|
+
* < 0: Failure.
|
|
207
231
|
*/
|
|
208
232
|
abstract muteLocalVideoStreamEx(
|
|
209
233
|
mute: boolean,
|
|
@@ -213,13 +237,16 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
213
237
|
/**
|
|
214
238
|
* Stops or resumes subscribing to the audio streams of all remote users.
|
|
215
239
|
*
|
|
216
|
-
* 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.
|
|
240
|
+
* 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.
|
|
241
|
+
* Call this method after joining a channel.
|
|
242
|
+
* 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.
|
|
217
243
|
*
|
|
218
|
-
* @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.
|
|
244
|
+
* @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.
|
|
219
245
|
* @param connection The connection information. See RtcConnection.
|
|
220
246
|
*
|
|
221
247
|
* @returns
|
|
222
|
-
* 0: Success.
|
|
248
|
+
* 0: Success.
|
|
249
|
+
* < 0: Failure.
|
|
223
250
|
*/
|
|
224
251
|
abstract muteAllRemoteAudioStreamsEx(
|
|
225
252
|
mute: boolean,
|
|
@@ -231,11 +258,12 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
231
258
|
*
|
|
232
259
|
* After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
|
|
233
260
|
*
|
|
234
|
-
* @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.
|
|
261
|
+
* @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.
|
|
235
262
|
* @param connection The connection information. See RtcConnection.
|
|
236
263
|
*
|
|
237
264
|
* @returns
|
|
238
|
-
* 0: Success.
|
|
265
|
+
* 0: Success.
|
|
266
|
+
* < 0: Failure.
|
|
239
267
|
*/
|
|
240
268
|
abstract muteAllRemoteVideoStreamsEx(
|
|
241
269
|
mute: boolean,
|
|
@@ -245,14 +273,19 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
245
273
|
/**
|
|
246
274
|
* Set the blocklist of subscriptions for audio streams.
|
|
247
275
|
*
|
|
248
|
-
* You can call this method to specify the audio streams of a user that you do not want to subscribe to.
|
|
276
|
+
* You can call this method to specify the audio streams of a user that you do not want to subscribe to.
|
|
277
|
+
* You can call this method either before or after joining a channel.
|
|
278
|
+
* The blocklist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams, and autoSubscribeAudio in ChannelMediaOptions.
|
|
279
|
+
* Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
|
|
280
|
+
* If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
|
|
249
281
|
*
|
|
250
|
-
* @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.
|
|
282
|
+
* @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.
|
|
251
283
|
* @param uidNumber The number of users in the user ID list.
|
|
252
284
|
* @param connection The connection information. See RtcConnection.
|
|
253
285
|
*
|
|
254
286
|
* @returns
|
|
255
|
-
* 0: Success.
|
|
287
|
+
* 0: Success.
|
|
288
|
+
* < 0: Failure.
|
|
256
289
|
*/
|
|
257
290
|
abstract setSubscribeAudioBlocklistEx(
|
|
258
291
|
uidList: number[],
|
|
@@ -263,14 +296,19 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
263
296
|
/**
|
|
264
297
|
* Sets the allowlist of subscriptions for audio streams.
|
|
265
298
|
*
|
|
266
|
-
* You can call this method to specify the audio streams of a user that you want to subscribe to.
|
|
299
|
+
* You can call this method to specify the audio streams of a user that you want to subscribe to.
|
|
300
|
+
* If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
|
|
301
|
+
* You can call this method either before or after joining a channel.
|
|
302
|
+
* The allowlist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions.
|
|
303
|
+
* Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
|
|
267
304
|
*
|
|
268
|
-
* @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.
|
|
305
|
+
* @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.
|
|
269
306
|
* @param uidNumber The number of users in the user ID list.
|
|
270
307
|
* @param connection The connection information. See RtcConnection.
|
|
271
308
|
*
|
|
272
309
|
* @returns
|
|
273
|
-
* 0: Success.
|
|
310
|
+
* 0: Success.
|
|
311
|
+
* < 0: Failure.
|
|
274
312
|
*/
|
|
275
313
|
abstract setSubscribeAudioAllowlistEx(
|
|
276
314
|
uidList: number[],
|
|
@@ -281,15 +319,19 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
281
319
|
/**
|
|
282
320
|
* Set the blocklist of subscriptions for video streams.
|
|
283
321
|
*
|
|
284
|
-
* You can call this method to specify the video streams of a user that you do not want to subscribe to.
|
|
322
|
+
* You can call this method to specify the video streams of a user that you do not want to subscribe to.
|
|
323
|
+
* If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
|
|
324
|
+
* Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
|
|
325
|
+
* You can call this method either before or after joining a channel.
|
|
326
|
+
* The blocklist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
|
|
285
327
|
*
|
|
286
|
-
* @param uidList The user ID list of users that you do not want to subscribe to.
|
|
287
|
-
* 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.
|
|
328
|
+
* @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.
|
|
288
329
|
* @param uidNumber The number of users in the user ID list.
|
|
289
330
|
* @param connection The connection information. See RtcConnection.
|
|
290
331
|
*
|
|
291
332
|
* @returns
|
|
292
|
-
* 0: Success.
|
|
333
|
+
* 0: Success.
|
|
334
|
+
* < 0: Failure.
|
|
293
335
|
*/
|
|
294
336
|
abstract setSubscribeVideoBlocklistEx(
|
|
295
337
|
uidList: number[],
|
|
@@ -300,14 +342,19 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
300
342
|
/**
|
|
301
343
|
* Set the allowlist of subscriptions for video streams.
|
|
302
344
|
*
|
|
303
|
-
* You can call this method to specify the video streams of a user that you want to subscribe to.
|
|
345
|
+
* You can call this method to specify the video streams of a user that you want to subscribe to.
|
|
346
|
+
* If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
|
|
347
|
+
* Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
|
|
348
|
+
* You can call this method either before or after joining a channel.
|
|
349
|
+
* The allowlist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
|
|
304
350
|
*
|
|
305
|
-
* @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.
|
|
351
|
+
* @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.
|
|
306
352
|
* @param uidNumber The number of users in the user ID list.
|
|
307
353
|
* @param connection The connection information. See RtcConnection.
|
|
308
354
|
*
|
|
309
355
|
* @returns
|
|
310
|
-
* 0: Success.
|
|
356
|
+
* 0: Success.
|
|
357
|
+
* < 0: Failure.
|
|
311
358
|
*/
|
|
312
359
|
abstract setSubscribeVideoAllowlistEx(
|
|
313
360
|
uidList: number[],
|
|
@@ -337,15 +384,21 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
337
384
|
/**
|
|
338
385
|
* Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
|
|
339
386
|
*
|
|
340
|
-
* 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.
|
|
387
|
+
* 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.
|
|
388
|
+
* For the best voice positioning, Agora recommends using a wired headset.
|
|
389
|
+
* Call this method after joining a channel.
|
|
341
390
|
*
|
|
342
391
|
* @param uid The user ID of the remote user.
|
|
343
|
-
* @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0
|
|
392
|
+
* @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0:
|
|
393
|
+
* -1.0: The remote voice comes from the left.
|
|
394
|
+
* 0.0: (Default) The remote voice comes from the front.
|
|
395
|
+
* 1.0: The remote voice comes from the right.
|
|
344
396
|
* @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.
|
|
345
397
|
* @param connection The connection information. See RtcConnection.
|
|
346
398
|
*
|
|
347
399
|
* @returns
|
|
348
|
-
* 0: Success.
|
|
400
|
+
* 0: Success.
|
|
401
|
+
* < 0: Failure.
|
|
349
402
|
*/
|
|
350
403
|
abstract setRemoteVoicePositionEx(
|
|
351
404
|
uid: number,
|
|
@@ -366,7 +419,9 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
366
419
|
/**
|
|
367
420
|
* Sets the video display mode of a specified remote user.
|
|
368
421
|
*
|
|
369
|
-
* 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.
|
|
422
|
+
* 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.
|
|
423
|
+
* Call this method after initializing the remote view by calling the setupRemoteVideo method.
|
|
424
|
+
* 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.
|
|
370
425
|
*
|
|
371
426
|
* @param uid The user ID of the remote user.
|
|
372
427
|
* @param renderMode The video display mode of the remote user. See RenderModeType.
|
|
@@ -374,7 +429,8 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
374
429
|
* @param connection The connection information. See RtcConnection.
|
|
375
430
|
*
|
|
376
431
|
* @returns
|
|
377
|
-
* 0: Success.
|
|
432
|
+
* 0: Success.
|
|
433
|
+
* < 0: Failure.
|
|
378
434
|
*/
|
|
379
435
|
abstract setRemoteRenderModeEx(
|
|
380
436
|
uid: number,
|
|
@@ -386,15 +442,18 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
386
442
|
/**
|
|
387
443
|
* Enables loopback audio capturing.
|
|
388
444
|
*
|
|
389
|
-
* If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.
|
|
445
|
+
* If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.
|
|
446
|
+
* 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.
|
|
447
|
+
* This method only supports using one sound card for audio capturing.
|
|
390
448
|
*
|
|
391
449
|
* @param connection The connection information. See RtcConnection.
|
|
392
|
-
* @param enabled Sets whether to enable loopback audio capture:true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
|
|
450
|
+
* @param enabled Sets whether to enable loopback audio capture: true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing.
|
|
393
451
|
* @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.
|
|
394
452
|
* 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.
|
|
395
453
|
*
|
|
396
454
|
* @returns
|
|
397
|
-
* 0: Success.
|
|
455
|
+
* 0: Success.
|
|
456
|
+
* < 0: Failure.
|
|
398
457
|
*/
|
|
399
458
|
abstract enableLoopbackRecordingEx(
|
|
400
459
|
connection: RtcConnection,
|
|
@@ -421,14 +480,17 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
421
480
|
/**
|
|
422
481
|
* Adjusts the playback signal volume of a specified remote user.
|
|
423
482
|
*
|
|
424
|
-
* 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.
|
|
483
|
+
* 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.
|
|
484
|
+
* Call this method after joining a channel.
|
|
485
|
+
* The playback volume here refers to the mixed volume of a specified remote user.
|
|
425
486
|
*
|
|
426
487
|
* @param uid The user ID of the remote user.
|
|
427
488
|
* @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
|
|
428
489
|
* @param connection The connection information. See RtcConnection.
|
|
429
490
|
*
|
|
430
491
|
* @returns
|
|
431
|
-
* 0: Success.
|
|
492
|
+
* 0: Success.
|
|
493
|
+
* < 0: Failure.
|
|
432
494
|
*/
|
|
433
495
|
abstract adjustUserPlaybackSignalVolumeEx(
|
|
434
496
|
uid: number,
|
|
@@ -444,7 +506,7 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
444
506
|
* @param connection The connection information. See RtcConnection.
|
|
445
507
|
*
|
|
446
508
|
* @returns
|
|
447
|
-
* The current connection state. See ConnectionStateType
|
|
509
|
+
* The current connection state. See ConnectionStateType.
|
|
448
510
|
*/
|
|
449
511
|
abstract getConnectionStateEx(connection: RtcConnection): ConnectionStateType;
|
|
450
512
|
|
|
@@ -460,13 +522,14 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
460
522
|
/**
|
|
461
523
|
* Creates a data stream.
|
|
462
524
|
*
|
|
463
|
-
* Creates a data stream. Each user can create up to five data streams in a single channel.
|
|
525
|
+
* Creates a data stream. Each user can create up to five data streams in a single channel.
|
|
464
526
|
*
|
|
465
527
|
* @param config The configurations for the data stream. See DataStreamConfig.
|
|
466
528
|
* @param connection The connection information. See RtcConnection.
|
|
467
529
|
*
|
|
468
530
|
* @returns
|
|
469
|
-
* ID of the created data stream, if the method call succeeds.
|
|
531
|
+
* ID of the created data stream, if the method call succeeds.
|
|
532
|
+
* < 0: Failure.
|
|
470
533
|
*/
|
|
471
534
|
abstract createDataStreamEx(
|
|
472
535
|
config: DataStreamConfig,
|
|
@@ -476,8 +539,13 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
476
539
|
/**
|
|
477
540
|
* Sends data stream messages.
|
|
478
541
|
*
|
|
479
|
-
* After calling createDataStreamEx
|
|
480
|
-
*
|
|
542
|
+
* 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:
|
|
543
|
+
* Up to 60 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.
|
|
544
|
+
* Each client can send up to 30 KB of data per second.
|
|
545
|
+
* 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.
|
|
546
|
+
* A failed method call triggers the onStreamMessageError callback on the remote client.
|
|
547
|
+
* Ensure that you call createDataStreamEx to create a data channel before calling this method.
|
|
548
|
+
* 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.
|
|
481
549
|
*
|
|
482
550
|
* @param streamId The data stream ID. You can get the data stream ID by calling createDataStreamEx.
|
|
483
551
|
* @param data The message to be sent.
|
|
@@ -485,7 +553,8 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
485
553
|
* @param connection The connection information. See RtcConnection.
|
|
486
554
|
*
|
|
487
555
|
* @returns
|
|
488
|
-
* 0: Success.
|
|
556
|
+
* 0: Success.
|
|
557
|
+
* < 0: Failure.
|
|
489
558
|
*/
|
|
490
559
|
abstract sendStreamMessageEx(
|
|
491
560
|
streamId: number,
|
|
@@ -497,14 +566,23 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
497
566
|
/**
|
|
498
567
|
* Adds a watermark image to the local video.
|
|
499
568
|
*
|
|
500
|
-
* 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:
|
|
569
|
+
* 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:
|
|
570
|
+
* If the orientation mode of the encoding video (OrientationMode) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.
|
|
571
|
+
* If the orientation mode of the encoding video (OrientationMode) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.
|
|
572
|
+
* 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.
|
|
573
|
+
* Ensure that you have called enableVideo before calling this method.
|
|
574
|
+
* 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.
|
|
575
|
+
* 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.
|
|
576
|
+
* 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.
|
|
577
|
+
* 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.
|
|
501
578
|
*
|
|
502
579
|
* @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.
|
|
503
580
|
* @param options The options of the watermark image to be added. See WatermarkOptions.
|
|
504
581
|
* @param connection The connection information. See RtcConnection.
|
|
505
582
|
*
|
|
506
583
|
* @returns
|
|
507
|
-
* 0: Success.
|
|
584
|
+
* 0: Success.
|
|
585
|
+
* < 0: Failure.
|
|
508
586
|
*/
|
|
509
587
|
abstract addVideoWatermarkEx(
|
|
510
588
|
watermarkUrl: string,
|
|
@@ -518,7 +596,8 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
518
596
|
* @param connection The connection information. See RtcConnection.
|
|
519
597
|
*
|
|
520
598
|
* @returns
|
|
521
|
-
* 0: Success.
|
|
599
|
+
* 0: Success.
|
|
600
|
+
* < 0: Failure.
|
|
522
601
|
*/
|
|
523
602
|
abstract clearVideoWatermarkEx(connection: RtcConnection): number;
|
|
524
603
|
|
|
@@ -545,12 +624,12 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
545
624
|
* ≤ 0: Disables the volume indication.
|
|
546
625
|
* > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
|
|
547
626
|
* @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.
|
|
548
|
-
* @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.
|
|
549
|
-
* 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.
|
|
627
|
+
* @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.
|
|
550
628
|
* @param connection The connection information. See RtcConnection.
|
|
551
629
|
*
|
|
552
630
|
* @returns
|
|
553
|
-
* 0: Success.
|
|
631
|
+
* 0: Success.
|
|
632
|
+
* < 0: Failure.
|
|
554
633
|
*/
|
|
555
634
|
abstract enableAudioVolumeIndicationEx(
|
|
556
635
|
interval: number,
|
|
@@ -562,13 +641,20 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
562
641
|
/**
|
|
563
642
|
* Starts pushing media streams to a CDN without transcoding.
|
|
564
643
|
*
|
|
565
|
-
* Ensure that you enable the Media Push service before using this function. See Enable Media Push
|
|
644
|
+
* Ensure that you enable the Media Push service before using this function. See Enable Media Push.
|
|
645
|
+
* Call this method after joining a channel.
|
|
646
|
+
* Only hosts in the LIVE_BROADCASTING profile can call this method.
|
|
647
|
+
* 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.
|
|
566
648
|
*
|
|
567
649
|
* @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.
|
|
568
650
|
* @param connection The connection information. See RtcConnection.
|
|
569
651
|
*
|
|
570
652
|
* @returns
|
|
571
|
-
* 0: Success.
|
|
653
|
+
* 0: Success.
|
|
654
|
+
* < 0: Failure.
|
|
655
|
+
* -2: The URL is null or the string length is 0.
|
|
656
|
+
* -7: The SDK is not initialized before calling this method.
|
|
657
|
+
* -19: The Media Push URL is already in use, use another URL instead.
|
|
572
658
|
*/
|
|
573
659
|
abstract startRtmpStreamWithoutTranscodingEx(
|
|
574
660
|
url: string,
|
|
@@ -578,14 +664,22 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
578
664
|
/**
|
|
579
665
|
* Starts Media Push and sets the transcoding configuration.
|
|
580
666
|
*
|
|
581
|
-
* Agora recommends that you use the server-side Media Push function.
|
|
667
|
+
* 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.
|
|
668
|
+
* Ensure that you enable the Media Push service before using this function.
|
|
669
|
+
* Call this method after joining a channel.
|
|
670
|
+
* Only hosts in the LIVE_BROADCASTING profile can call this method.
|
|
671
|
+
* 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.
|
|
582
672
|
*
|
|
583
673
|
* @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.
|
|
584
674
|
* @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
|
|
585
675
|
* @param connection The connection information. See RtcConnection.
|
|
586
676
|
*
|
|
587
677
|
* @returns
|
|
588
|
-
* 0: Success.
|
|
678
|
+
* 0: Success.
|
|
679
|
+
* < 0: Failure.
|
|
680
|
+
* -2: The URL is null or the string length is 0.
|
|
681
|
+
* -7: The SDK is not initialized before calling this method.
|
|
682
|
+
* -19: The Media Push URL is already in use, use another URL instead.
|
|
589
683
|
*/
|
|
590
684
|
abstract startRtmpStreamWithTranscodingEx(
|
|
591
685
|
url: string,
|
|
@@ -596,13 +690,14 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
596
690
|
/**
|
|
597
691
|
* Updates the transcoding configuration.
|
|
598
692
|
*
|
|
599
|
-
* Agora recommends that you use the server-side Media Push function.
|
|
693
|
+
* 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.
|
|
600
694
|
*
|
|
601
695
|
* @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
|
|
602
696
|
* @param connection The connection information. See RtcConnection.
|
|
603
697
|
*
|
|
604
698
|
* @returns
|
|
605
|
-
* 0: Success.
|
|
699
|
+
* 0: Success.
|
|
700
|
+
* < 0: Failure.
|
|
606
701
|
*/
|
|
607
702
|
abstract updateRtmpTranscodingEx(
|
|
608
703
|
transcoding: LiveTranscoding,
|
|
@@ -612,25 +707,37 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
612
707
|
/**
|
|
613
708
|
* Stops pushing media streams to a CDN.
|
|
614
709
|
*
|
|
615
|
-
* Agora recommends that you use the server-side Media Push function.
|
|
710
|
+
* 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.
|
|
616
711
|
*
|
|
617
712
|
* @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.
|
|
618
713
|
*
|
|
619
714
|
* @returns
|
|
620
|
-
* 0: Success.
|
|
715
|
+
* 0: Success.
|
|
716
|
+
* < 0: Failure.
|
|
621
717
|
*/
|
|
622
718
|
abstract stopRtmpStreamEx(url: string, connection: RtcConnection): number;
|
|
623
719
|
|
|
624
720
|
/**
|
|
625
721
|
* Starts relaying media streams across channels or updates channels for media relay.
|
|
626
722
|
*
|
|
627
|
-
* 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:
|
|
723
|
+
* 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:
|
|
724
|
+
* 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.
|
|
725
|
+
* If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.
|
|
726
|
+
* Call this method after joining the channel.
|
|
727
|
+
* This method takes effect only when you are a host in a live streaming channel.
|
|
728
|
+
* The relaying media streams across channels function needs to be enabled by contacting.
|
|
729
|
+
* Agora does not support string user accounts in this API.
|
|
628
730
|
*
|
|
629
731
|
* @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
|
|
630
732
|
* @param connection The connection information. See RtcConnection.
|
|
631
733
|
*
|
|
632
734
|
* @returns
|
|
633
|
-
* 0: Success.
|
|
735
|
+
* 0: Success.
|
|
736
|
+
* < 0: Failure.
|
|
737
|
+
* -1: A general error occurs (no specified reason).
|
|
738
|
+
* -2: The parameter is invalid.
|
|
739
|
+
* -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.
|
|
740
|
+
* -8: Internal state error. Probably because the user is not a broadcaster.
|
|
634
741
|
*/
|
|
635
742
|
abstract startOrUpdateChannelMediaRelayEx(
|
|
636
743
|
configuration: ChannelMediaRelayConfiguration,
|
|
@@ -640,13 +747,25 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
640
747
|
/**
|
|
641
748
|
* Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
|
|
642
749
|
*
|
|
643
|
-
* 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.
|
|
750
|
+
* 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.
|
|
751
|
+
* 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.
|
|
752
|
+
* If the onChannelMediaRelayStateChanged callback returns RelayStateFailure (3), an exception occurs during the media stream relay.
|
|
753
|
+
* Call this method after joining the channel.
|
|
754
|
+
* This method takes effect only when you are a host in a live streaming channel.
|
|
755
|
+
* 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.
|
|
756
|
+
* The relaying media streams across channels function needs to be enabled by contacting.
|
|
757
|
+
* Agora does not support string user accounts in this API.
|
|
644
758
|
*
|
|
645
759
|
* @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
|
|
646
760
|
* @param connection The connection information. See RtcConnection.
|
|
647
761
|
*
|
|
648
762
|
* @returns
|
|
649
|
-
* 0: Success.
|
|
763
|
+
* 0: Success.
|
|
764
|
+
* < 0: Failure.
|
|
765
|
+
* -1: A general error occurs (no specified reason).
|
|
766
|
+
* -2: The parameter is invalid.
|
|
767
|
+
* -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.
|
|
768
|
+
* -8: Internal state error. Probably because the user is not a broadcaster.
|
|
650
769
|
*/
|
|
651
770
|
abstract startChannelMediaRelayEx(
|
|
652
771
|
configuration: ChannelMediaRelayConfiguration,
|
|
@@ -656,13 +775,14 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
656
775
|
/**
|
|
657
776
|
* Updates the channels for media stream relay.
|
|
658
777
|
*
|
|
659
|
-
* 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 (
|
|
778
|
+
* 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.
|
|
660
779
|
*
|
|
661
780
|
* @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
|
|
662
781
|
* @param connection The connection information. See RtcConnection.
|
|
663
782
|
*
|
|
664
783
|
* @returns
|
|
665
|
-
* 0: Success.
|
|
784
|
+
* 0: Success.
|
|
785
|
+
* < 0: Failure.
|
|
666
786
|
*/
|
|
667
787
|
abstract updateChannelMediaRelayEx(
|
|
668
788
|
configuration: ChannelMediaRelayConfiguration,
|
|
@@ -677,31 +797,34 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
677
797
|
* @param connection The connection information. See RtcConnection.
|
|
678
798
|
*
|
|
679
799
|
* @returns
|
|
680
|
-
* 0: Success.
|
|
800
|
+
* 0: Success.
|
|
801
|
+
* < 0: Failure.
|
|
681
802
|
*/
|
|
682
803
|
abstract stopChannelMediaRelayEx(connection: RtcConnection): number;
|
|
683
804
|
|
|
684
805
|
/**
|
|
685
806
|
* Pauses the media stream relay to all target channels.
|
|
686
807
|
*
|
|
687
|
-
* 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
|
|
808
|
+
* 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.
|
|
688
809
|
*
|
|
689
810
|
* @param connection The connection information. See RtcConnection.
|
|
690
811
|
*
|
|
691
812
|
* @returns
|
|
692
|
-
* 0: Success.
|
|
813
|
+
* 0: Success.
|
|
814
|
+
* < 0: Failure.
|
|
693
815
|
*/
|
|
694
816
|
abstract pauseAllChannelMediaRelayEx(connection: RtcConnection): number;
|
|
695
817
|
|
|
696
818
|
/**
|
|
697
819
|
* Resumes the media stream relay to all target channels.
|
|
698
820
|
*
|
|
699
|
-
* After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelayEx
|
|
821
|
+
* After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelayEx.
|
|
700
822
|
*
|
|
701
823
|
* @param connection The connection information. See RtcConnection.
|
|
702
824
|
*
|
|
703
825
|
* @returns
|
|
704
|
-
* 0: Success.
|
|
826
|
+
* 0: Success.
|
|
827
|
+
* < 0: Failure.
|
|
705
828
|
*/
|
|
706
829
|
abstract resumeAllChannelMediaRelayEx(connection: RtcConnection): number;
|
|
707
830
|
|
|
@@ -721,16 +844,17 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
721
844
|
/**
|
|
722
845
|
* Enables or disables dual-stream mode on the sender side.
|
|
723
846
|
*
|
|
724
|
-
* 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:
|
|
847
|
+
* 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:
|
|
848
|
+
* High-quality video stream: High bitrate, high resolution.
|
|
849
|
+
* 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.
|
|
725
850
|
*
|
|
726
|
-
* @param enabled Whether to enable dual-stream mode:
|
|
727
|
-
* true: Enable dual-stream mode.
|
|
728
|
-
* false: (Default) Disable dual-stream mode.
|
|
851
|
+
* @param enabled Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode.
|
|
729
852
|
* @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
|
|
730
853
|
* @param connection The connection information. See RtcConnection.
|
|
731
854
|
*
|
|
732
855
|
* @returns
|
|
733
|
-
* 0: Success.
|
|
856
|
+
* 0: Success.
|
|
857
|
+
* < 0: Failure.
|
|
734
858
|
*/
|
|
735
859
|
abstract enableDualStreamModeEx(
|
|
736
860
|
enabled: boolean,
|
|
@@ -741,14 +865,18 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
741
865
|
/**
|
|
742
866
|
* Sets the dual-stream mode on the sender side.
|
|
743
867
|
*
|
|
744
|
-
* 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
|
|
868
|
+
* 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:
|
|
869
|
+
* When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamModeEx (false).
|
|
870
|
+
* When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamModeEx (true).
|
|
871
|
+
* 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.
|
|
745
872
|
*
|
|
746
873
|
* @param mode The mode in which the video stream is sent. See SimulcastStreamMode.
|
|
747
874
|
* @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
|
|
748
875
|
* @param connection The connection information. See RtcConnection.
|
|
749
876
|
*
|
|
750
877
|
* @returns
|
|
751
|
-
* 0: Success.
|
|
878
|
+
* 0: Success.
|
|
879
|
+
* < 0: Failure.
|
|
752
880
|
*/
|
|
753
881
|
abstract setDualStreamModeEx(
|
|
754
882
|
mode: SimulcastStreamMode,
|
|
@@ -769,17 +897,20 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
769
897
|
/**
|
|
770
898
|
* Takes a snapshot of a video stream.
|
|
771
899
|
*
|
|
772
|
-
* 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.
|
|
900
|
+
* 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.
|
|
901
|
+
* Call this method after the joinChannelEx method.
|
|
902
|
+
* When used for local video snapshots, this method takes a snapshot for the video streams specified in ChannelMediaOptions.
|
|
903
|
+
* If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
|
|
773
904
|
*
|
|
774
905
|
* @param connection The connection information. See RtcConnection.
|
|
775
906
|
* @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
|
|
776
907
|
* @param filePath The local path (including filename extensions) of the snapshot. For example:
|
|
777
908
|
* Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
|
|
778
|
-
* macOS: ~/Library/Logs/example.jpg
|
|
779
|
-
* Ensure that the path you specify exists and is writable.
|
|
909
|
+
* macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
|
|
780
910
|
*
|
|
781
911
|
* @returns
|
|
782
|
-
* 0: Success.
|
|
912
|
+
* 0: Success.
|
|
913
|
+
* < 0: Failure.
|
|
783
914
|
*/
|
|
784
915
|
abstract takeSnapshotEx(
|
|
785
916
|
connection: RtcConnection,
|
|
@@ -790,12 +921,14 @@ export abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
790
921
|
/**
|
|
791
922
|
* Enables tracing the video frame rendering process.
|
|
792
923
|
*
|
|
793
|
-
* 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.
|
|
924
|
+
* 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.
|
|
925
|
+
* 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.
|
|
794
926
|
*
|
|
795
927
|
* @param connection The connection information. See RtcConnection.
|
|
796
928
|
*
|
|
797
929
|
* @returns
|
|
798
|
-
* 0: Success.
|
|
930
|
+
* 0: Success.
|
|
931
|
+
* < 0: Failure.
|
|
799
932
|
*/
|
|
800
933
|
abstract startMediaRenderingTracingEx(connection: RtcConnection): number;
|
|
801
934
|
}
|