You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ts/Private/AgoraBase.ts
+12-12
Original file line number
Diff line number
Diff line change
@@ -227,7 +227,7 @@ export enum ErrorCodeType {
227
227
*/
228
228
ErrJoinChannelRejected=17,
229
229
/**
230
-
* 18: Fails to leave the channel. Possible reasons include the following:The user has left the channel before calling the method. Stop calling this method to clear this error.The user calls the method to leave the channel before joining the channel. In this case, no extra operation is needed.
230
+
* 18: Fails to leave the channel. Possible reasons include the following:The user has left the channel before calling the leaveChannel method. Stop calling this method to clear this error.The user calls the leaveChannel method to leave the channel before joining the channel. In this case, no extra operation is needed.
231
231
*/
232
232
ErrLeaveChannelRejected=18,
233
233
/**
@@ -1332,7 +1332,7 @@ export class SimulcastStreamConfig {
1332
1332
*/
1333
1333
dimensions?: VideoDimensions;
1334
1334
/**
1335
-
* @ignore
1335
+
* Video receive bitrate (Kbps), represented by an instantaneous value. The default value is 65.
1336
1336
*/
1337
1337
kBitrate?: number;
1338
1338
/**
@@ -1655,7 +1655,7 @@ export enum AudioAinsMode {
1655
1655
*/
1656
1656
AinsModeAggressive=1,
1657
1657
/**
1658
-
* 2: Aggressive mode with low latency. The noise reduction delay of this mode is about only half of that of the balance and aggressive mode. It is suitable for scenarios that have high requirements on noise reduction with low latency, such as sing together online in real-time.
1658
+
* 2: Aggressive mode with low latency. The noise reduction delay of this mode is about only half of that of the balance and aggressive modes. It is suitable for scenarios that have high requirements on noise reduction with low latency, such as sing together online in realtime.
* 100: The streaming has been stopped normally. After you stop the media push, the SDK returns this value.
2482
+
* 100: The streaming has been stopped normally. After you stop the Media Push, the SDK returns this value.
2483
2483
*/
2484
2484
RtmpStreamUnpublishErrorOk=100,
2485
2485
}
@@ -3367,15 +3367,15 @@ export class VirtualBackgroundSource {
3367
3367
*/
3368
3368
background_source_type?: BackgroundSourceType;
3369
3369
/**
3370
-
* The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image.This parameter takes effect only when the type of the custom background image isBackgroundColor .
3370
+
* The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image.This parameter takes effect only when the type of the custom background image is BackgroundColor.
3371
3371
*/
3372
3372
color?: number;
3373
3373
/**
3374
-
* The local absolute path of the custom background image. PNG and JPG formats are supported. If the path is invalid, the SDK replaces the original background image with a white background image.This parameter takes effect only when the type of the custom background image isBackgroundImg .
3374
+
* The local absolute path of the custom background image. PNG and JPG formats are supported. If the path is invalid, the SDK replaces the original background image with a white background image.This parameter takes effect only when the type of the custom background image is BackgroundImg.
3375
3375
*/
3376
3376
source?: string;
3377
3377
/**
3378
-
* The degree of blurring applied to the custom background image. See BackgroundBlurDegree .This parameter takes effect only when the type of the custom background image isBackgroundBlur .
3378
+
* The degree of blurring applied to the custom background image. See BackgroundBlurDegree .This parameter takes effect only when the type of the custom background image is BackgroundBlur.
* To ensure that the data format of captured audio frame is as expected, Agora recommends that you set the audio data format as follows: After calling setRecordingAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object, the SDK will calculate the sampling interval according to the parameters set in this method, and triggers the onRecordAudioFrame callback according to the sampling interval.
827
+
* Gets the raw audio frame for playback.
828
+
* To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.
829
829
*
830
830
* @param channelId The channel ID.
831
831
* @param audioFrame The raw audio data. See AudioFrame .
* To ensure that the data format of captured audio frame is as expected, Agora recommends that you set the audio data format as follows: After calling setRecordingAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object, the SDK will calculate the sampling interval according to the parameters set in this method, and triggers the onRecordAudioFrame callback according to the sampling interval.
839
+
* Retrieves the mixed captured and playback audio frame.
840
+
* To ensure that the data format of mixed captured and playback audio frame meets the expectations, Agora recommends that you set the data format as follows: After calling setMixedAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onMixedAudioFrame callback according to the sampling interval.
841
841
*
842
842
* @param channelId The channel ID.
843
843
* @param audioFrame The raw audio data. See AudioFrame .
* Occurs each time the SDK receives a video frame captured by the local camera.
1001
-
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.Once the pre-processing is complete, you can directly modify videoFrame in this callback, and set the return value to true to send the modified video data to the SDK.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
1000
+
* Occurs each time the SDK receives a video frame before encoding.
1001
+
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios.After processing, you can send the processed video data back to the SDK in this callback.The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
1002
1002
*
1003
1003
* @param sourceType The type of the video source. See VideoSourceType .
1004
-
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420
1004
+
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:
1005
+
* macOS: YUV 420
1006
+
* Windows: YUV 420
1005
1007
*
1006
1008
* @returns
1007
-
* When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
1009
+
* When the video processing mode is ProcessModeReadOnly:
1010
+
* true: Reserved for future use.
1011
+
* false: Reserved for future use. When the video processing mode is ProcessModeReadWrite:
* The absolute path (including the filename extensions) of the recording file. For example:Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.mp4macOS: ~/Library/Logs/example.mp4Ensure that the directory for the log files exists and is writable.
1142
+
* @ignore
1137
1143
*/
1138
1144
storagePath?: string;
1139
1145
/**
1140
-
* The format of the recording file. See MediaRecorderContainerFormat .
1146
+
* @ignore
1141
1147
*/
1142
1148
containerFormat?: MediaRecorderContainerFormat;
1143
1149
/**
1144
-
* The recording content. See MediaRecorderStreamType .
1150
+
* @ignore
1145
1151
*/
1146
1152
streamType?: MediaRecorderStreamType;
1147
1153
/**
1148
-
* The maximum recording duration, in milliseconds. The default value is 120000.
1154
+
* @ignore
1149
1155
*/
1150
1156
maxDurationMs?: number;
1151
1157
/**
1152
-
* The interval (ms) of updating the recording information. The value range is [1000,10000]. Based on the value you set in this parameter, the SDK triggers the onRecorderInfoUpdated callback to report the updated recording information.
1158
+
* @ignore
1153
1159
*/
1154
1160
recorderInfoUpdateInterval?: number;
1155
1161
}
1156
1162
1157
1163
/**
1158
-
* The information about the file that is recorded.
1164
+
* @ignore
1159
1165
*/
1160
1166
exportclassRecorderInfo{
1161
1167
/**
1162
-
* The absolute path of the recording file.
1168
+
* @ignore
1163
1169
*/
1164
1170
fileName?: string;
1165
1171
/**
1166
-
* The recording duration (ms).
1172
+
* @ignore
1167
1173
*/
1168
1174
durationMs?: number;
1169
1175
/**
1170
-
* The size (byte) of the recording file.
1176
+
* @ignore
1171
1177
*/
1172
1178
fileSize?: number;
1173
1179
}
1174
1180
1175
1181
/**
1176
-
* Provides callback events for audio and video recording.
1182
+
* @ignore
1177
1183
*/
1178
1184
exportinterfaceIMediaRecorderObserver{
1179
1185
/**
1180
-
* Occurs when the recording state changes.
1181
-
* When the recording state changes, the SDK triggers this callback to report the current recording state and the reason for the change.
1182
-
*
1183
-
* @param channelId The channel name.
1184
-
* @param uid The user ID.
1185
-
* @param state The current recording state. See RecorderState .
1186
-
* @param error The reason for the state change. See RecorderErrorCode .
* Occurs when the recording information is updated.
1197
-
* After you successfully enable the audio and video recording, the SDK periodically triggers this callback based on the value of recorderInfoUpdateInterval set in MediaRecorderConfiguration . This callback reports the file name, duration, and size of the current recording file.
1198
-
*
1199
-
* @param channelId The channel name.
1200
-
* @param uid The user ID.
1201
-
* @param info The information about the file that is recorded. See RecorderInfo .
Copy file name to clipboardExpand all lines: ts/Private/IAgoraMediaEngine.ts
+3-3
Original file line number
Diff line number
Diff line change
@@ -144,21 +144,21 @@ export abstract class IMediaEngine {
144
144
145
145
/**
146
146
* Creates a customized audio track.
147
-
* When you need to publish multiple custom captured videos in the channel, you can refer to the following steps:Call this method to create a video track and get the video track ID.In ChannelMediaOptions of each channel, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true.If you call pushAudioFrame trackId as the video track ID set in step 2, you can publish the corresponding custom video source in multiple channels.
147
+
* When you need to publish multiple custom captured audios in the channel, you can refer to the following steps:Call this method to create a custom audio track and get the audio track ID.In ChannelMediaOptions of each channel, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true.If you call pushAudioFrame trackId as the audio track ID set in step 2, you can publish the corresponding custom audio source in multiple channels.
148
148
*
149
149
* @param trackType The type of the custom audio track. See AudioTrackType .
150
150
* @param config The configuration of the custom audio track. See AudioTrackConfig .
151
151
*
152
152
* @returns
153
-
* If the method call is successful, the video track ID is returned as the unique identifier of the video track.If the method call fails, a negative value is returned.
153
+
* If the method call is successful, the audio track ID is returned as the unique identifier of the audio track.If the method call fails, a negative value is returned.
154
154
*/
155
155
abstractcreateCustomAudioTrack(
156
156
trackType: AudioTrackType,
157
157
config: AudioTrackConfig
158
158
): number;
159
159
160
160
/**
161
-
* Destroys the specified video track.
161
+
* Destroys the specified audio track.
162
162
*
163
163
* @param trackId The custom audio track ID returned in createCustomAudioTrack .
Copy file name to clipboardExpand all lines: ts/Private/IAgoraMediaPlayer.ts
+8-31
Original file line number
Diff line number
Diff line change
@@ -175,20 +175,13 @@ export abstract class IMediaPlayer {
175
175
abstractselectAudioTrack(index: number): number;
176
176
177
177
/**
178
-
* Sets the private options for the media player.
179
-
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, call setPlayerOptionInInt("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, call setPlayerOptionInInt("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
184
+
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, call setPlayerOptionInString("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
192
185
*
193
186
* @param key The key of the option.
194
187
* @param value The value of the key.
@@ -204,24 +197,12 @@ export abstract class IMediaPlayer {
204
197
abstracttakeScreenshot(filename: string): number;
205
198
206
199
/**
207
-
* Gets the detailed information of the media stream.
208
-
* Call this method after calling getStreamCount .
209
-
*
210
-
* @param index The index of the media stream.
211
-
*
212
-
* @returns
213
-
* If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo .If the call fails, returns NULL.
* 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.
220
-
*
221
-
* @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.
222
-
*
223
-
* @returns
224
-
* 0: Success.< 0: Failure.
205
+
* @ignore
225
206
*/
226
207
abstractsetExternalSubtitle(url: string): number;
227
208
@@ -289,9 +270,10 @@ export abstract class IMediaPlayer {
289
270
abstractgetPublishSignalVolume(): number;
290
271
291
272
/**
292
-
* Destroys a video renderer object.
273
+
* Sets the view.
293
274
*
294
-
* @param view The HTMLElement object to be destroyed.
275
+
* @returns
276
+
* 0: Success.< 0: Failure.
295
277
*/
296
278
abstractsetView(view: any): number;
297
279
@@ -387,12 +369,7 @@ export abstract class IMediaPlayer {
387
369
): number;
388
370
389
371
/**
390
-
* Unregisters the video frame observer.
391
-
*
392
-
* @param observer The video observer, reporting the reception of each video frame. See IVideoFrameObserver .
0 commit comments