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
|
@@ -18,32 +18,46 @@ export declare class RtcConnection {
|
|
|
18
18
|
/**
|
|
19
19
|
* This interface class contains multi-channel methods.
|
|
20
20
|
*
|
|
21
|
-
* Inherited from IRtcEngine
|
|
21
|
+
* Inherited from IRtcEngine.
|
|
22
22
|
*/
|
|
23
23
|
export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
24
24
|
/**
|
|
25
25
|
* Joins a channel with the connection ID.
|
|
26
26
|
*
|
|
27
|
-
* You can call this method multiple times to join more than one channel.
|
|
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.
|
|
28
31
|
*
|
|
29
32
|
* @param token The token generated on your server for authentication.
|
|
30
33
|
* @param connection The connection information. See RtcConnection.
|
|
31
34
|
* @param options The channel media options. See ChannelMediaOptions.
|
|
32
35
|
*
|
|
33
36
|
* @returns
|
|
34
|
-
* 0: Success.
|
|
37
|
+
* 0: Success.
|
|
38
|
+
* < 0: Failure.
|
|
39
|
+
* -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.
|
|
40
|
+
* -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
|
|
41
|
+
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
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.
|
|
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.
|
|
44
|
+
* -102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.
|
|
45
|
+
* -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.
|
|
35
46
|
*/
|
|
36
47
|
abstract joinChannelEx(token: string, connection: RtcConnection, options: ChannelMediaOptions): number;
|
|
37
48
|
/**
|
|
38
49
|
* Sets channel options and leaves the channel.
|
|
39
50
|
*
|
|
40
|
-
* This method lets the user leave the channel, for example, by hanging up or exiting the call. After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call. This method can be called whether or not a call is currently in progress. This method releases all resources related to the session. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After you leave the channel, the SDK triggers the onLeaveChannel callback. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback.
|
|
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 joined by calling joinChannel and joinChannelEx.
|
|
41
54
|
*
|
|
42
55
|
* @param connection The connection information. See RtcConnection.
|
|
43
|
-
* @param options The options for leaving the channel. See LeaveChannelOptions.This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect.
|
|
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.
|
|
44
57
|
*
|
|
45
58
|
* @returns
|
|
46
|
-
* 0: Success.
|
|
59
|
+
* 0: Success.
|
|
60
|
+
* < 0: Failure.
|
|
47
61
|
*/
|
|
48
62
|
abstract leaveChannelEx(connection: RtcConnection, options?: LeaveChannelOptions): number;
|
|
49
63
|
/**
|
|
@@ -53,7 +67,11 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
53
67
|
* @param connection The connection information. See RtcConnection.
|
|
54
68
|
*
|
|
55
69
|
* @returns
|
|
56
|
-
* 0: Success.
|
|
70
|
+
* 0: Success.
|
|
71
|
+
* < 0: Failure.
|
|
72
|
+
* -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.
|
|
73
|
+
* -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
|
|
74
|
+
* -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.
|
|
57
75
|
*/
|
|
58
76
|
abstract updateChannelMediaOptionsEx(options: ChannelMediaOptions, connection: RtcConnection): number;
|
|
59
77
|
/**
|
|
@@ -65,7 +83,8 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
65
83
|
* @param connection The connection information. See RtcConnection.
|
|
66
84
|
*
|
|
67
85
|
* @returns
|
|
68
|
-
* 0: Success.
|
|
86
|
+
* 0: Success.
|
|
87
|
+
* < 0: Failure.
|
|
69
88
|
*/
|
|
70
89
|
abstract setVideoEncoderConfigurationEx(config: VideoEncoderConfiguration, connection: RtcConnection): number;
|
|
71
90
|
/**
|
|
@@ -77,18 +96,20 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
77
96
|
* @param connection The connection information. See RtcConnection.
|
|
78
97
|
*
|
|
79
98
|
* @returns
|
|
80
|
-
* 0: Success.
|
|
99
|
+
* 0: Success.
|
|
100
|
+
* < 0: Failure.
|
|
81
101
|
*/
|
|
82
102
|
abstract setupRemoteVideoEx(canvas: VideoCanvas, connection: RtcConnection): number;
|
|
83
103
|
/**
|
|
84
104
|
* Stops or resumes receiving the audio stream of a specified user.
|
|
85
105
|
*
|
|
86
106
|
* @param uid The ID of the specified user.
|
|
87
|
-
* @param mute Whether to stop receiving the audio stream of the specified user:true: Stop receiving the audio stream of the specified user.false: (Default) Resume receiving the audio stream of the specified user.
|
|
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.
|
|
88
108
|
* @param connection The connection information. See RtcConnection.
|
|
89
109
|
*
|
|
90
110
|
* @returns
|
|
91
|
-
* 0: Success.
|
|
111
|
+
* 0: Success.
|
|
112
|
+
* < 0: Failure.
|
|
92
113
|
*/
|
|
93
114
|
abstract muteRemoteAudioStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
|
|
94
115
|
/**
|
|
@@ -97,24 +118,26 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
97
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.
|
|
98
119
|
*
|
|
99
120
|
* @param uid The user ID of the remote user.
|
|
100
|
-
* @param mute Whether to stop receiving the video stream of the specified user:true: Stop receiving the video stream of the specified user.false: (Default) Resume receiving the video stream of the specified user.
|
|
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.
|
|
101
122
|
* @param connection The connection information. See RtcConnection.
|
|
102
123
|
*
|
|
103
124
|
* @returns
|
|
104
|
-
* 0: Success.
|
|
125
|
+
* 0: Success.
|
|
126
|
+
* < 0: Failure.
|
|
105
127
|
*/
|
|
106
128
|
abstract muteRemoteVideoStreamEx(uid: number, mute: boolean, connection: RtcConnection): number;
|
|
107
129
|
/**
|
|
108
130
|
* Sets the stream type of the remote video.
|
|
109
131
|
*
|
|
110
|
-
* Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx (
|
|
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.
|
|
111
133
|
*
|
|
112
134
|
* @param uid The user ID.
|
|
113
135
|
* @param streamType The video stream type: VideoStreamType.
|
|
114
136
|
* @param connection The connection information. See RtcConnection.
|
|
115
137
|
*
|
|
116
138
|
* @returns
|
|
117
|
-
* 0: Success.
|
|
139
|
+
* 0: Success.
|
|
140
|
+
* < 0: Failure.
|
|
118
141
|
*/
|
|
119
142
|
abstract setRemoteVideoStreamTypeEx(uid: number, streamType: VideoStreamType, connection: RtcConnection): number;
|
|
120
143
|
/**
|
|
@@ -122,37 +145,41 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
122
145
|
*
|
|
123
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.
|
|
124
147
|
*
|
|
125
|
-
* @param mute Whether to stop publishing the local audio stream:true: Stops publishing the local audio stream.false: (Default) Resumes publishing the local audio stream.
|
|
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.
|
|
126
149
|
* @param connection The connection information. See RtcConnection.
|
|
127
150
|
*
|
|
128
151
|
* @returns
|
|
129
|
-
* 0: Success.
|
|
152
|
+
* 0: Success.
|
|
153
|
+
* < 0: Failure.
|
|
130
154
|
*/
|
|
131
155
|
abstract muteLocalAudioStreamEx(mute: boolean, connection: RtcConnection): number;
|
|
132
156
|
/**
|
|
133
157
|
* Stops or resumes publishing the local video stream.
|
|
134
158
|
*
|
|
135
|
-
* A successful call of this method triggers the onUserMuteVideo callback on the remote client.
|
|
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.
|
|
136
161
|
*
|
|
137
|
-
* @param mute Whether to stop publishing the local video stream.
|
|
138
|
-
* true: Stop publishing the local video stream.
|
|
139
|
-
* false: (Default) Publish the local video stream.
|
|
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.
|
|
140
163
|
* @param connection The connection information. See RtcConnection.
|
|
141
164
|
*
|
|
142
165
|
* @returns
|
|
143
|
-
* 0: Success.
|
|
166
|
+
* 0: Success.
|
|
167
|
+
* < 0: Failure.
|
|
144
168
|
*/
|
|
145
169
|
abstract muteLocalVideoStreamEx(mute: boolean, connection: RtcConnection): number;
|
|
146
170
|
/**
|
|
147
171
|
* Stops or resumes subscribing to the audio streams of all remote users.
|
|
148
172
|
*
|
|
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.
|
|
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.
|
|
150
176
|
*
|
|
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.
|
|
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.
|
|
152
178
|
* @param connection The connection information. See RtcConnection.
|
|
153
179
|
*
|
|
154
180
|
* @returns
|
|
155
|
-
* 0: Success.
|
|
181
|
+
* 0: Success.
|
|
182
|
+
* < 0: Failure.
|
|
156
183
|
*/
|
|
157
184
|
abstract muteAllRemoteAudioStreamsEx(mute: boolean, connection: RtcConnection): number;
|
|
158
185
|
/**
|
|
@@ -160,64 +187,84 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
160
187
|
*
|
|
161
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.
|
|
162
189
|
*
|
|
163
|
-
* @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default.
|
|
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.
|
|
164
191
|
* @param connection The connection information. See RtcConnection.
|
|
165
192
|
*
|
|
166
193
|
* @returns
|
|
167
|
-
* 0: Success.
|
|
194
|
+
* 0: Success.
|
|
195
|
+
* < 0: Failure.
|
|
168
196
|
*/
|
|
169
197
|
abstract muteAllRemoteVideoStreamsEx(mute: boolean, connection: RtcConnection): number;
|
|
170
198
|
/**
|
|
171
199
|
* Set the blocklist of subscriptions for audio streams.
|
|
172
200
|
*
|
|
173
|
-
* You can call this method to specify the audio streams of a user that you do not want to subscribe to.
|
|
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.
|
|
174
206
|
*
|
|
175
|
-
* @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
|
|
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.
|
|
176
208
|
* @param uidNumber The number of users in the user ID list.
|
|
177
209
|
* @param connection The connection information. See RtcConnection.
|
|
178
210
|
*
|
|
179
211
|
* @returns
|
|
180
|
-
* 0: Success.
|
|
212
|
+
* 0: Success.
|
|
213
|
+
* < 0: Failure.
|
|
181
214
|
*/
|
|
182
215
|
abstract setSubscribeAudioBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
|
|
183
216
|
/**
|
|
184
217
|
* Sets the allowlist of subscriptions for audio streams.
|
|
185
218
|
*
|
|
186
|
-
* You can call this method to specify the audio streams of a user that you want to subscribe to.
|
|
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.
|
|
187
224
|
*
|
|
188
|
-
* @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
|
|
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.
|
|
189
226
|
* @param uidNumber The number of users in the user ID list.
|
|
190
227
|
* @param connection The connection information. See RtcConnection.
|
|
191
228
|
*
|
|
192
229
|
* @returns
|
|
193
|
-
* 0: Success.
|
|
230
|
+
* 0: Success.
|
|
231
|
+
* < 0: Failure.
|
|
194
232
|
*/
|
|
195
233
|
abstract setSubscribeAudioAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
|
|
196
234
|
/**
|
|
197
235
|
* Set the blocklist of subscriptions for video streams.
|
|
198
236
|
*
|
|
199
|
-
* You can call this method to specify the video streams of a user that you do not want to subscribe to.
|
|
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.
|
|
200
242
|
*
|
|
201
|
-
* @param uidList The user ID list of users that you do not want to subscribe to.
|
|
202
|
-
* If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
|
|
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.
|
|
203
244
|
* @param uidNumber The number of users in the user ID list.
|
|
204
245
|
* @param connection The connection information. See RtcConnection.
|
|
205
246
|
*
|
|
206
247
|
* @returns
|
|
207
|
-
* 0: Success.
|
|
248
|
+
* 0: Success.
|
|
249
|
+
* < 0: Failure.
|
|
208
250
|
*/
|
|
209
251
|
abstract setSubscribeVideoBlocklistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
|
|
210
252
|
/**
|
|
211
253
|
* Set the allowlist of subscriptions for video streams.
|
|
212
254
|
*
|
|
213
|
-
* You can call this method to specify the video streams of a user that you want to subscribe to.
|
|
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.
|
|
214
260
|
*
|
|
215
|
-
* @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
|
|
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.
|
|
216
262
|
* @param uidNumber The number of users in the user ID list.
|
|
217
263
|
* @param connection The connection information. See RtcConnection.
|
|
218
264
|
*
|
|
219
265
|
* @returns
|
|
220
|
-
* 0: Success.
|
|
266
|
+
* 0: Success.
|
|
267
|
+
* < 0: Failure.
|
|
221
268
|
*/
|
|
222
269
|
abstract setSubscribeVideoAllowlistEx(uidList: number[], uidNumber: number, connection: RtcConnection): number;
|
|
223
270
|
/**
|
|
@@ -237,15 +284,21 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
237
284
|
/**
|
|
238
285
|
* Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
|
|
239
286
|
*
|
|
240
|
-
* This method sets the voice position and volume of a remote user. When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games.
|
|
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.
|
|
241
290
|
*
|
|
242
291
|
* @param uid The user ID of the remote user.
|
|
243
|
-
* @param pan The voice position of the remote user. The value ranges from -1.0 to 1.0
|
|
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.
|
|
244
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.
|
|
245
297
|
* @param connection The connection information. See RtcConnection.
|
|
246
298
|
*
|
|
247
299
|
* @returns
|
|
248
|
-
* 0: Success.
|
|
300
|
+
* 0: Success.
|
|
301
|
+
* < 0: Failure.
|
|
249
302
|
*/
|
|
250
303
|
abstract setRemoteVoicePositionEx(uid: number, pan: number, gain: number, connection: RtcConnection): number;
|
|
251
304
|
/**
|
|
@@ -255,7 +308,9 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
255
308
|
/**
|
|
256
309
|
* Sets the video display mode of a specified remote user.
|
|
257
310
|
*
|
|
258
|
-
* After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
|
|
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.
|
|
259
314
|
*
|
|
260
315
|
* @param uid The user ID of the remote user.
|
|
261
316
|
* @param renderMode The video display mode of the remote user. See RenderModeType.
|
|
@@ -263,21 +318,25 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
263
318
|
* @param connection The connection information. See RtcConnection.
|
|
264
319
|
*
|
|
265
320
|
* @returns
|
|
266
|
-
* 0: Success.
|
|
321
|
+
* 0: Success.
|
|
322
|
+
* < 0: Failure.
|
|
267
323
|
*/
|
|
268
324
|
abstract setRemoteRenderModeEx(uid: number, renderMode: RenderModeType, mirrorMode: VideoMirrorModeType, connection: RtcConnection): number;
|
|
269
325
|
/**
|
|
270
326
|
* Enables loopback audio capturing.
|
|
271
327
|
*
|
|
272
|
-
* If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end.
|
|
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.
|
|
273
331
|
*
|
|
274
332
|
* @param connection The connection information. See RtcConnection.
|
|
275
|
-
* @param enabled Sets whether to enable loopback audio capture:true: Enable loopback audio capturing.false: (Default) Disable loopback audio capturing.
|
|
333
|
+
* @param enabled Sets whether to enable loopback audio capture: true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing.
|
|
276
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.
|
|
277
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.
|
|
278
336
|
*
|
|
279
337
|
* @returns
|
|
280
|
-
* 0: Success.
|
|
338
|
+
* 0: Success.
|
|
339
|
+
* < 0: Failure.
|
|
281
340
|
*/
|
|
282
341
|
abstract enableLoopbackRecordingEx(connection: RtcConnection, enabled: boolean, deviceName?: string): number;
|
|
283
342
|
/**
|
|
@@ -291,14 +350,17 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
291
350
|
/**
|
|
292
351
|
* Adjusts the playback signal volume of a specified remote user.
|
|
293
352
|
*
|
|
294
|
-
* You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user.
|
|
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.
|
|
295
356
|
*
|
|
296
357
|
* @param uid The user ID of the remote user.
|
|
297
358
|
* @param volume Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume.
|
|
298
359
|
* @param connection The connection information. See RtcConnection.
|
|
299
360
|
*
|
|
300
361
|
* @returns
|
|
301
|
-
* 0: Success.
|
|
362
|
+
* 0: Success.
|
|
363
|
+
* < 0: Failure.
|
|
302
364
|
*/
|
|
303
365
|
abstract adjustUserPlaybackSignalVolumeEx(uid: number, volume: number, connection: RtcConnection): number;
|
|
304
366
|
/**
|
|
@@ -309,7 +371,7 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
309
371
|
* @param connection The connection information. See RtcConnection.
|
|
310
372
|
*
|
|
311
373
|
* @returns
|
|
312
|
-
* The current connection state. See ConnectionStateType
|
|
374
|
+
* The current connection state. See ConnectionStateType.
|
|
313
375
|
*/
|
|
314
376
|
abstract getConnectionStateEx(connection: RtcConnection): ConnectionStateType;
|
|
315
377
|
/**
|
|
@@ -319,20 +381,26 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
319
381
|
/**
|
|
320
382
|
* Creates a data stream.
|
|
321
383
|
*
|
|
322
|
-
* Creates a data stream. Each user can create up to five data streams in a single channel.
|
|
384
|
+
* Creates a data stream. Each user can create up to five data streams in a single channel.
|
|
323
385
|
*
|
|
324
386
|
* @param config The configurations for the data stream. See DataStreamConfig.
|
|
325
387
|
* @param connection The connection information. See RtcConnection.
|
|
326
388
|
*
|
|
327
389
|
* @returns
|
|
328
|
-
* ID of the created data stream, if the method call succeeds.
|
|
390
|
+
* ID of the created data stream, if the method call succeeds.
|
|
391
|
+
* < 0: Failure.
|
|
329
392
|
*/
|
|
330
393
|
abstract createDataStreamEx(config: DataStreamConfig, connection: RtcConnection): number;
|
|
331
394
|
/**
|
|
332
395
|
* Sends data stream messages.
|
|
333
396
|
*
|
|
334
|
-
* After calling createDataStreamEx
|
|
335
|
-
*
|
|
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.
|
|
336
404
|
*
|
|
337
405
|
* @param streamId The data stream ID. You can get the data stream ID by calling createDataStreamEx.
|
|
338
406
|
* @param data The message to be sent.
|
|
@@ -340,20 +408,30 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
340
408
|
* @param connection The connection information. See RtcConnection.
|
|
341
409
|
*
|
|
342
410
|
* @returns
|
|
343
|
-
* 0: Success.
|
|
411
|
+
* 0: Success.
|
|
412
|
+
* < 0: Failure.
|
|
344
413
|
*/
|
|
345
414
|
abstract sendStreamMessageEx(streamId: number, data: Uint8Array, length: number, connection: RtcConnection): number;
|
|
346
415
|
/**
|
|
347
416
|
* Adds a watermark image to the local video.
|
|
348
417
|
*
|
|
349
|
-
* This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one. The watermark coordinates are dependent on the settings in the setVideoEncoderConfigurationEx method:
|
|
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.
|
|
350
427
|
*
|
|
351
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.
|
|
352
429
|
* @param options The options of the watermark image to be added. See WatermarkOptions.
|
|
353
430
|
* @param connection The connection information. See RtcConnection.
|
|
354
431
|
*
|
|
355
432
|
* @returns
|
|
356
|
-
* 0: Success.
|
|
433
|
+
* 0: Success.
|
|
434
|
+
* < 0: Failure.
|
|
357
435
|
*/
|
|
358
436
|
abstract addVideoWatermarkEx(watermarkUrl: string, options: WatermarkOptions, connection: RtcConnection): number;
|
|
359
437
|
/**
|
|
@@ -362,7 +440,8 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
362
440
|
* @param connection The connection information. See RtcConnection.
|
|
363
441
|
*
|
|
364
442
|
* @returns
|
|
365
|
-
* 0: Success.
|
|
443
|
+
* 0: Success.
|
|
444
|
+
* < 0: Failure.
|
|
366
445
|
*/
|
|
367
446
|
abstract clearVideoWatermarkEx(connection: RtcConnection): number;
|
|
368
447
|
/**
|
|
@@ -380,96 +459,137 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
380
459
|
* ≤ 0: Disables the volume indication.
|
|
381
460
|
* > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50.
|
|
382
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.
|
|
383
|
-
* @param reportVad true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.
|
|
384
|
-
* false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
|
|
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.
|
|
385
463
|
* @param connection The connection information. See RtcConnection.
|
|
386
464
|
*
|
|
387
465
|
* @returns
|
|
388
|
-
* 0: Success.
|
|
466
|
+
* 0: Success.
|
|
467
|
+
* < 0: Failure.
|
|
389
468
|
*/
|
|
390
469
|
abstract enableAudioVolumeIndicationEx(interval: number, smooth: number, reportVad: boolean, connection: RtcConnection): number;
|
|
391
470
|
/**
|
|
392
471
|
* Starts pushing media streams to a CDN without transcoding.
|
|
393
472
|
*
|
|
394
|
-
* Ensure that you enable the Media Push service before using this function. See Enable Media Push
|
|
473
|
+
* Ensure that you enable the Media Push service before using this function. See Enable Media Push.
|
|
474
|
+
* Call this method after joining a channel.
|
|
475
|
+
* Only hosts in the LIVE_BROADCASTING profile can call this method.
|
|
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.
|
|
395
477
|
*
|
|
396
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.
|
|
397
479
|
* @param connection The connection information. See RtcConnection.
|
|
398
480
|
*
|
|
399
481
|
* @returns
|
|
400
|
-
* 0: Success.
|
|
482
|
+
* 0: Success.
|
|
483
|
+
* < 0: Failure.
|
|
484
|
+
* -2: The URL is null or the string length is 0.
|
|
485
|
+
* -7: The SDK is not initialized before calling this method.
|
|
486
|
+
* -19: The Media Push URL is already in use, use another URL instead.
|
|
401
487
|
*/
|
|
402
488
|
abstract startRtmpStreamWithoutTranscodingEx(url: string, connection: RtcConnection): number;
|
|
403
489
|
/**
|
|
404
490
|
* Starts Media Push and sets the transcoding configuration.
|
|
405
491
|
*
|
|
406
|
-
* Agora recommends that you use the server-side Media Push function.
|
|
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.
|
|
407
497
|
*
|
|
408
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.
|
|
409
499
|
* @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
|
|
410
500
|
* @param connection The connection information. See RtcConnection.
|
|
411
501
|
*
|
|
412
502
|
* @returns
|
|
413
|
-
* 0: Success.
|
|
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.
|
|
414
508
|
*/
|
|
415
509
|
abstract startRtmpStreamWithTranscodingEx(url: string, transcoding: LiveTranscoding, connection: RtcConnection): number;
|
|
416
510
|
/**
|
|
417
511
|
* Updates the transcoding configuration.
|
|
418
512
|
*
|
|
419
|
-
* Agora recommends that you use the server-side Media Push function.
|
|
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.
|
|
420
514
|
*
|
|
421
515
|
* @param transcoding The transcoding configuration for Media Push. See LiveTranscoding.
|
|
422
516
|
* @param connection The connection information. See RtcConnection.
|
|
423
517
|
*
|
|
424
518
|
* @returns
|
|
425
|
-
* 0: Success.
|
|
519
|
+
* 0: Success.
|
|
520
|
+
* < 0: Failure.
|
|
426
521
|
*/
|
|
427
522
|
abstract updateRtmpTranscodingEx(transcoding: LiveTranscoding, connection: RtcConnection): number;
|
|
428
523
|
/**
|
|
429
524
|
* Stops pushing media streams to a CDN.
|
|
430
525
|
*
|
|
431
|
-
* Agora recommends that you use the server-side Media Push function.
|
|
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.
|
|
432
527
|
*
|
|
433
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.
|
|
434
529
|
*
|
|
435
530
|
* @returns
|
|
436
|
-
* 0: Success.
|
|
531
|
+
* 0: Success.
|
|
532
|
+
* < 0: Failure.
|
|
437
533
|
*/
|
|
438
534
|
abstract stopRtmpStreamEx(url: string, connection: RtcConnection): number;
|
|
439
535
|
/**
|
|
440
536
|
* Starts relaying media streams across channels or updates channels for media relay.
|
|
441
537
|
*
|
|
442
|
-
* The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback, and this callback returns the state of the media stream relay. Common states are as follows:
|
|
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.
|
|
443
545
|
*
|
|
444
546
|
* @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
|
|
445
547
|
* @param connection The connection information. See RtcConnection.
|
|
446
548
|
*
|
|
447
549
|
* @returns
|
|
448
|
-
* 0: Success.
|
|
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.
|
|
449
556
|
*/
|
|
450
557
|
abstract startOrUpdateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
|
|
451
558
|
/**
|
|
452
559
|
* Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels.
|
|
453
560
|
*
|
|
454
|
-
* Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.
|
|
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.
|
|
455
569
|
*
|
|
456
570
|
* @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
|
|
457
571
|
* @param connection The connection information. See RtcConnection.
|
|
458
572
|
*
|
|
459
573
|
* @returns
|
|
460
|
-
* 0: Success.
|
|
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.
|
|
461
580
|
*/
|
|
462
581
|
abstract startChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
|
|
463
582
|
/**
|
|
464
583
|
* Updates the channels for media stream relay.
|
|
465
584
|
*
|
|
466
|
-
* Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead. After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method. After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RelayEventPacketUpdateDestChannel (7) state code. Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged (
|
|
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.
|
|
467
586
|
*
|
|
468
587
|
* @param configuration The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
|
|
469
588
|
* @param connection The connection information. See RtcConnection.
|
|
470
589
|
*
|
|
471
590
|
* @returns
|
|
472
|
-
* 0: Success.
|
|
591
|
+
* 0: Success.
|
|
592
|
+
* < 0: Failure.
|
|
473
593
|
*/
|
|
474
594
|
abstract updateChannelMediaRelayEx(configuration: ChannelMediaRelayConfiguration, connection: RtcConnection): number;
|
|
475
595
|
/**
|
|
@@ -480,29 +600,32 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
480
600
|
* @param connection The connection information. See RtcConnection.
|
|
481
601
|
*
|
|
482
602
|
* @returns
|
|
483
|
-
* 0: Success.
|
|
603
|
+
* 0: Success.
|
|
604
|
+
* < 0: Failure.
|
|
484
605
|
*/
|
|
485
606
|
abstract stopChannelMediaRelayEx(connection: RtcConnection): number;
|
|
486
607
|
/**
|
|
487
608
|
* Pauses the media stream relay to all target channels.
|
|
488
609
|
*
|
|
489
|
-
* After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay
|
|
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.
|
|
490
611
|
*
|
|
491
612
|
* @param connection The connection information. See RtcConnection.
|
|
492
613
|
*
|
|
493
614
|
* @returns
|
|
494
|
-
* 0: Success.
|
|
615
|
+
* 0: Success.
|
|
616
|
+
* < 0: Failure.
|
|
495
617
|
*/
|
|
496
618
|
abstract pauseAllChannelMediaRelayEx(connection: RtcConnection): number;
|
|
497
619
|
/**
|
|
498
620
|
* Resumes the media stream relay to all target channels.
|
|
499
621
|
*
|
|
500
|
-
* After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels. Call this method after pauseAllChannelMediaRelayEx
|
|
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.
|
|
501
623
|
*
|
|
502
624
|
* @param connection The connection information. See RtcConnection.
|
|
503
625
|
*
|
|
504
626
|
* @returns
|
|
505
|
-
* 0: Success.
|
|
627
|
+
* 0: Success.
|
|
628
|
+
* < 0: Failure.
|
|
506
629
|
*/
|
|
507
630
|
abstract resumeAllChannelMediaRelayEx(connection: RtcConnection): number;
|
|
508
631
|
/**
|
|
@@ -516,29 +639,34 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
516
639
|
/**
|
|
517
640
|
* Enables or disables dual-stream mode on the sender side.
|
|
518
641
|
*
|
|
519
|
-
* After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:
|
|
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.
|
|
520
645
|
*
|
|
521
|
-
* @param enabled Whether to enable dual-stream mode:
|
|
522
|
-
* true: Enable dual-stream mode.
|
|
523
|
-
* false: (Default) Disable dual-stream mode.
|
|
646
|
+
* @param enabled Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode.
|
|
524
647
|
* @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
|
|
525
648
|
* @param connection The connection information. See RtcConnection.
|
|
526
649
|
*
|
|
527
650
|
* @returns
|
|
528
|
-
* 0: Success.
|
|
651
|
+
* 0: Success.
|
|
652
|
+
* < 0: Failure.
|
|
529
653
|
*/
|
|
530
654
|
abstract enableDualStreamModeEx(enabled: boolean, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
|
|
531
655
|
/**
|
|
532
656
|
* Sets the dual-stream mode on the sender side.
|
|
533
657
|
*
|
|
534
|
-
* The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream
|
|
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.
|
|
535
662
|
*
|
|
536
663
|
* @param mode The mode in which the video stream is sent. See SimulcastStreamMode.
|
|
537
664
|
* @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig.
|
|
538
665
|
* @param connection The connection information. See RtcConnection.
|
|
539
666
|
*
|
|
540
667
|
* @returns
|
|
541
|
-
* 0: Success.
|
|
668
|
+
* 0: Success.
|
|
669
|
+
* < 0: Failure.
|
|
542
670
|
*/
|
|
543
671
|
abstract setDualStreamModeEx(mode: SimulcastStreamMode, streamConfig: SimulcastStreamConfig, connection: RtcConnection): number;
|
|
544
672
|
/**
|
|
@@ -548,28 +676,33 @@ export declare abstract class IRtcEngineEx extends IRtcEngine {
|
|
|
548
676
|
/**
|
|
549
677
|
* Takes a snapshot of a video stream.
|
|
550
678
|
*
|
|
551
|
-
* The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot. This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
|
|
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
|
+
* When used for local video snapshots, this method takes a snapshot for the video streams 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.
|
|
552
683
|
*
|
|
553
684
|
* @param connection The connection information. See RtcConnection.
|
|
554
685
|
* @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
|
|
555
686
|
* @param filePath The local path (including filename extensions) of the snapshot. For example:
|
|
556
687
|
* Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
|
|
557
|
-
* macOS: ~/Library/Logs/example.jpg
|
|
558
|
-
* Ensure that the path you specify exists and is writable.
|
|
688
|
+
* macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
|
|
559
689
|
*
|
|
560
690
|
* @returns
|
|
561
|
-
* 0: Success.
|
|
691
|
+
* 0: Success.
|
|
692
|
+
* < 0: Failure.
|
|
562
693
|
*/
|
|
563
694
|
abstract takeSnapshotEx(connection: RtcConnection, uid: number, filePath: string): number;
|
|
564
695
|
/**
|
|
565
696
|
* Enables tracing the video frame rendering process.
|
|
566
697
|
*
|
|
567
|
-
* By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process.
|
|
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.
|
|
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.
|
|
568
700
|
*
|
|
569
701
|
* @param connection The connection information. See RtcConnection.
|
|
570
702
|
*
|
|
571
703
|
* @returns
|
|
572
|
-
* 0: Success.
|
|
704
|
+
* 0: Success.
|
|
705
|
+
* < 0: Failure.
|
|
573
706
|
*/
|
|
574
707
|
abstract startMediaRenderingTracingEx(connection: RtcConnection): number;
|
|
575
708
|
}
|