Skip to content

Commit 025d68c

Browse files
[AUTO] Generate code by terra (#1005)
Co-authored-by: LichKing-2234 <[email protected]>
1 parent b8932ed commit 025d68c

11 files changed

+179
-359
lines changed

ts/AgoraSdk.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export * from './Utils';
2525
const instance = new RtcEngineExInternal();
2626

2727
/**
28-
* IRtcEngineEx
28+
* Creates one IRtcEngineEx object.
2929
* Currently, the Agora RTC SDK v4.x supports creating only one IRtcEngineEx object for each app.
3030
*
3131
* @returns

ts/Private/AgoraBase.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export enum ErrorCodeType {
227227
*/
228228
ErrJoinChannelRejected = 17,
229229
/**
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.
231231
*/
232232
ErrLeaveChannelRejected = 18,
233233
/**
@@ -1332,7 +1332,7 @@ export class SimulcastStreamConfig {
13321332
*/
13331333
dimensions?: VideoDimensions;
13341334
/**
1335-
* @ignore
1335+
* Video receive bitrate (Kbps), represented by an instantaneous value. The default value is 65.
13361336
*/
13371337
kBitrate?: number;
13381338
/**
@@ -1655,7 +1655,7 @@ export enum AudioAinsMode {
16551655
*/
16561656
AinsModeAggressive = 1,
16571657
/**
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 real time.
16591659
*/
16601660
AinsModeUltralowlatency = 2,
16611661
}
@@ -1941,9 +1941,9 @@ export enum LocalVideoStreamError {
19411941
*/
19421942
LocalVideoStreamErrorCaptureFailure = 4,
19431943
/**
1944-
* @ignore
1944+
* 5: The local video encoding fails.
19451945
*/
1946-
LocalVideoStreamErrorCodecNotSupport = 5,
1946+
LocalVideoStreamErrorEncodeFailure = 5,
19471947
/**
19481948
* @ignore
19491949
*/
@@ -2479,7 +2479,7 @@ export enum RtmpStreamPublishErrorType {
24792479
*/
24802480
RtmpStreamPublishErrorInvalidPrivilege = 16,
24812481
/**
2482-
* 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.
24832483
*/
24842484
RtmpStreamUnpublishErrorOk = 100,
24852485
}
@@ -3367,15 +3367,15 @@ export class VirtualBackgroundSource {
33673367
*/
33683368
background_source_type?: BackgroundSourceType;
33693369
/**
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.
33713371
*/
33723372
color?: number;
33733373
/**
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.
33753375
*/
33763376
source?: string;
33773377
/**
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.
33793379
*/
33803380
blur_degree?: BackgroundBlurDegree;
33813381
}
@@ -4574,15 +4574,15 @@ export enum ConfigFetchType {
45744574
}
45754575

45764576
/**
4577-
* The information about the media streams to be recorded.
4577+
* @ignore
45784578
*/
45794579
export class RecorderStreamInfo {
45804580
/**
4581-
* The name of the channel in which the media streams publish.
4581+
* @ignore
45824582
*/
45834583
channelId?: string;
45844584
/**
4585-
* The ID of the user whose media streams you want to record.
4585+
* @ignore
45864586
*/
45874587
uid?: number;
45884588
}

ts/Private/AgoraMediaBase.ts

+31-36
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ export enum VideoSourceType {
5858
*/
5959
VideoSourceTranscoded = 10,
6060
/**
61-
* @ignore
61+
* 11: The third camera.
6262
*/
6363
VideoSourceCameraThird = 11,
6464
/**
65-
* @ignore
65+
* 12:The fourth camera.
6666
*/
6767
VideoSourceCameraFourth = 12,
6868
/**
69-
* @ignore
69+
* 13:The third screen.
7070
*/
7171
VideoSourceScreenThird = 13,
7272
/**
73-
* @ignore
73+
* 14:The fourth screen.
7474
*/
7575
VideoSourceScreenFourth = 14,
7676
/**
@@ -824,8 +824,8 @@ export interface IAudioFrameObserverBase {
824824
onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;
825825

826826
/**
827-
* Gets the captured audio frame.
828-
* 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.
829829
*
830830
* @param channelId The channel ID.
831831
* @param audioFrame The raw audio data. See AudioFrame .
@@ -836,8 +836,8 @@ export interface IAudioFrameObserverBase {
836836
onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;
837837

838838
/**
839-
* Gets the captured audio frame.
840-
* 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.
841841
*
842842
* @param channelId The channel ID.
843843
* @param audioFrame The raw audio data. See AudioFrame .
@@ -997,14 +997,20 @@ export interface IVideoFrameObserver {
997997
): boolean;
998998

999999
/**
1000-
* 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.
10021002
*
10031003
* @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
10051007
*
10061008
* @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:
1012+
* true: Sets the SDK to receive the video frame.
1013+
* false: Sets the SDK to discard the video frame.
10081014
*/
10091015
onPreEncodeVideoFrame?(
10101016
sourceType: VideoSourceType,
@@ -1129,61 +1135,55 @@ export enum RecorderErrorCode {
11291135
}
11301136

11311137
/**
1132-
* The recording configuration.
1138+
* @ignore
11331139
*/
11341140
export class MediaRecorderConfiguration {
11351141
/**
1136-
* 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
11371143
*/
11381144
storagePath?: string;
11391145
/**
1140-
* The format of the recording file. See MediaRecorderContainerFormat .
1146+
* @ignore
11411147
*/
11421148
containerFormat?: MediaRecorderContainerFormat;
11431149
/**
1144-
* The recording content. See MediaRecorderStreamType .
1150+
* @ignore
11451151
*/
11461152
streamType?: MediaRecorderStreamType;
11471153
/**
1148-
* The maximum recording duration, in milliseconds. The default value is 120000.
1154+
* @ignore
11491155
*/
11501156
maxDurationMs?: number;
11511157
/**
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
11531159
*/
11541160
recorderInfoUpdateInterval?: number;
11551161
}
11561162

11571163
/**
1158-
* The information about the file that is recorded.
1164+
* @ignore
11591165
*/
11601166
export class RecorderInfo {
11611167
/**
1162-
* The absolute path of the recording file.
1168+
* @ignore
11631169
*/
11641170
fileName?: string;
11651171
/**
1166-
* The recording duration (ms).
1172+
* @ignore
11671173
*/
11681174
durationMs?: number;
11691175
/**
1170-
* The size (byte) of the recording file.
1176+
* @ignore
11711177
*/
11721178
fileSize?: number;
11731179
}
11741180

11751181
/**
1176-
* Provides callback events for audio and video recording.
1182+
* @ignore
11771183
*/
11781184
export interface IMediaRecorderObserver {
11791185
/**
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 .
1186+
* @ignore
11871187
*/
11881188
onRecorderStateChanged?(
11891189
channelId: string,
@@ -1193,12 +1193,7 @@ export interface IMediaRecorderObserver {
11931193
): void;
11941194

11951195
/**
1196-
* 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 .
1196+
* @ignore
12021197
*/
12031198
onRecorderInfoUpdated?(
12041199
channelId: string,

ts/Private/IAgoraMediaEngine.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,21 @@ export abstract class IMediaEngine {
144144

145145
/**
146146
* 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.
148148
*
149149
* @param trackType The type of the custom audio track. See AudioTrackType .
150150
* @param config The configuration of the custom audio track. See AudioTrackConfig .
151151
*
152152
* @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.
154154
*/
155155
abstract createCustomAudioTrack(
156156
trackType: AudioTrackType,
157157
config: AudioTrackConfig
158158
): number;
159159

160160
/**
161-
* Destroys the specified video track.
161+
* Destroys the specified audio track.
162162
*
163163
* @param trackId The custom audio track ID returned in createCustomAudioTrack .
164164
*

ts/Private/IAgoraMediaPlayer.ts

+8-31
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,13 @@ export abstract class IMediaPlayer {
175175
abstract selectAudioTrack(index: number): number;
176176

177177
/**
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.
180-
*
181-
* @param key The key of the option.
182-
* @param value The value of the key.
183-
*
184-
* @returns
185-
* 0: Success.< 0: Failure.
178+
* @ignore
186179
*/
187180
abstract setPlayerOptionInInt(key: string, value: number): number;
188181

189182
/**
190183
* Sets the private options for the media player.
191-
* 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.
192185
*
193186
* @param key The key of the option.
194187
* @param value The value of the key.
@@ -204,24 +197,12 @@ export abstract class IMediaPlayer {
204197
abstract takeScreenshot(filename: string): number;
205198

206199
/**
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.
200+
* @ignore
214201
*/
215202
abstract selectInternalSubtitle(index: number): number;
216203

217204
/**
218-
* Stops pushing media streams to a CDN.
219-
* 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
225206
*/
226207
abstract setExternalSubtitle(url: string): number;
227208

@@ -289,9 +270,10 @@ export abstract class IMediaPlayer {
289270
abstract getPublishSignalVolume(): number;
290271

291272
/**
292-
* Destroys a video renderer object.
273+
* Sets the view.
293274
*
294-
* @param view The HTMLElement object to be destroyed.
275+
* @returns
276+
* 0: Success.< 0: Failure.
295277
*/
296278
abstract setView(view: any): number;
297279

@@ -387,12 +369,7 @@ export abstract class IMediaPlayer {
387369
): number;
388370

389371
/**
390-
* Unregisters the video frame observer.
391-
*
392-
* @param observer The video observer, reporting the reception of each video frame. See IVideoFrameObserver .
393-
*
394-
* @returns
395-
* 0: Success.< 0: Failure.
372+
* @ignore
396373
*/
397374
abstract unregisterMediaPlayerAudioSpectrumObserver(
398375
observer: IAudioSpectrumObserver

0 commit comments

Comments
 (0)