Skip to content

Commit bd74952

Browse files
sda-robguoxianzhe
andauthored
[AUTO] Generate codes by terra (#1155)
Co-authored-by: guoxianzhe <[email protected]>
1 parent e45ad5a commit bd74952

12 files changed

+337
-223
lines changed

ts/Private/AgoraBase.ts

+61-60
Large diffs are not rendered by default.

ts/Private/AgoraMediaBase.ts

+14-12
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export enum MediaSourceType {
222222
*/
223223
PrimaryCameraSource = 2,
224224
/**
225-
* 3: The secondary camera.
225+
* 3: A secondary camera.
226226
*/
227227
SecondaryCameraSource = 3,
228228
/**
@@ -234,7 +234,7 @@ export enum MediaSourceType {
234234
*/
235235
SecondaryScreenSource = 5,
236236
/**
237-
* @ignore
237+
* 6. Custom video source.
238238
*/
239239
CustomVideoSource = 6,
240240
/**
@@ -726,7 +726,7 @@ export class VideoFrame {
726726
*/
727727
pixelBuffer?: Uint8Array;
728728
/**
729-
* @ignore
729+
* The meta information in the video frame. To use this parameter, please.
730730
*/
731731
metaInfo?: IVideoFrameMetaInfo;
732732
}
@@ -754,15 +754,17 @@ export enum MediaPlayerSourceType {
754754
*/
755755
export enum VideoModulePosition {
756756
/**
757-
* 1: The post-capturer position, which corresponds to the video data in the onCaptureVideoFrame callback.
757+
* 1: The location of the locally collected video data after preprocessing corresponds to the onCaptureVideoFrame callback. The observed video here has the effect of video pre-processing, which can be verified by enabling image enhancement, virtual background, or watermark.
758758
*/
759759
PositionPostCapturer = 1 << 0,
760760
/**
761761
* 2: The pre-renderer position, which corresponds to the video data in the onRenderVideoFrame callback.
762762
*/
763763
PositionPreRenderer = 1 << 1,
764764
/**
765-
* 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback.
765+
* 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. The observed video here has the effects of video pre-processing and encoding pre-processing.
766+
* To verify the pre-processing effects of the video, you can enable image enhancement, virtual background, or watermark.
767+
* To verify the pre-encoding processing effect, you can set a lower frame rate (for example, 5 fps).
766768
*/
767769
PositionPreEncoder = 1 << 2,
768770
}
@@ -1210,7 +1212,7 @@ export enum MediaRecorderStreamType {
12101212
*/
12111213
export enum RecorderState {
12121214
/**
1213-
* -1: An error occurs during the recording. See RecorderErrorCode for the reason.
1215+
* -1: An error occurs during the recording. See RecorderReasonCode for the reason.
12141216
*/
12151217
RecorderStateError = -1,
12161218
/**
@@ -1224,27 +1226,27 @@ export enum RecorderState {
12241226
}
12251227

12261228
/**
1227-
* The reason for the state change.
1229+
* @ignore
12281230
*/
12291231
export enum RecorderErrorCode {
12301232
/**
1231-
* 0: No error.
1233+
* @ignore
12321234
*/
12331235
RecorderErrorNone = 0,
12341236
/**
1235-
* 1: The SDK fails to write the recorded data to a file.
1237+
* @ignore
12361238
*/
12371239
RecorderErrorWriteFailed = 1,
12381240
/**
1239-
* 2: The SDK does not detect any audio and video streams, or audio and video streams are interrupted for more than five seconds during recording.
1241+
* @ignore
12401242
*/
12411243
RecorderErrorNoStream = 2,
12421244
/**
1243-
* 3: The recording duration exceeds the upper limit.
1245+
* @ignore
12441246
*/
12451247
RecorderErrorOverMaxDuration = 3,
12461248
/**
1247-
* 4: The recording configuration changes.
1249+
* @ignore
12481250
*/
12491251
RecorderErrorConfigChanged = 4,
12501252
}

ts/Private/AgoraMediaPlayerTypes.ts

+20-20
Original file line numberDiff line numberDiff line change
@@ -70,67 +70,67 @@ export enum MediaPlayerState {
7070
}
7171

7272
/**
73-
* Error codes of the media player.
73+
* @ignore
7474
*/
7575
export enum MediaPlayerError {
7676
/**
77-
* 0: No error.
77+
* @ignore
7878
*/
7979
PlayerErrorNone = 0,
8080
/**
81-
* -1: Invalid arguments.
81+
* @ignore
8282
*/
8383
PlayerErrorInvalidArguments = -1,
8484
/**
85-
* -2: Internal error.
85+
* @ignore
8686
*/
8787
PlayerErrorInternal = -2,
8888
/**
89-
* -3: No resource.
89+
* @ignore
9090
*/
9191
PlayerErrorNoResource = -3,
9292
/**
93-
* -4: Invalid media resource.
93+
* @ignore
9494
*/
9595
PlayerErrorInvalidMediaSource = -4,
9696
/**
97-
* -5: The media stream type is unknown.
97+
* @ignore
9898
*/
9999
PlayerErrorUnknownStreamType = -5,
100100
/**
101-
* -6: The object is not initialized.
101+
* @ignore
102102
*/
103103
PlayerErrorObjNotInitialized = -6,
104104
/**
105-
* -7: The codec is not supported.
105+
* @ignore
106106
*/
107107
PlayerErrorCodecNotSupported = -7,
108108
/**
109-
* -8: Invalid renderer.
109+
* @ignore
110110
*/
111111
PlayerErrorVideoRenderFailed = -8,
112112
/**
113-
* -9: An error with the internal state of the player occurs.
113+
* @ignore
114114
*/
115115
PlayerErrorInvalidState = -9,
116116
/**
117-
* -10: The URL of the media resource cannot be found.
117+
* @ignore
118118
*/
119119
PlayerErrorUrlNotFound = -10,
120120
/**
121-
* -11: Invalid connection between the player and the Agora Server.
121+
* @ignore
122122
*/
123123
PlayerErrorInvalidConnectionState = -11,
124124
/**
125-
* -12: The playback buffer is insufficient.
125+
* @ignore
126126
*/
127127
PlayerErrorSrcBufferUnderflow = -12,
128128
/**
129-
* -13: The playback is interrupted.
129+
* @ignore
130130
*/
131131
PlayerErrorInterrupted = -13,
132132
/**
133-
* -14: The SDK does not support the method being called.
133+
* @ignore
134134
*/
135135
PlayerErrorNotSupported = -14,
136136
/**
@@ -142,7 +142,7 @@ export enum MediaPlayerError {
142142
*/
143143
PlayerErrorIpExpired = -16,
144144
/**
145-
* -17: An unknown error.
145+
* @ignore
146146
*/
147147
PlayerErrorUnknown = -17,
148148
}
@@ -370,15 +370,15 @@ export class CacheStatistics {
370370
*/
371371
export class PlayerUpdatedInfo {
372372
/**
373-
* The ID of a media player.
373+
* @ignore
374374
*/
375375
playerId?: string;
376376
/**
377377
* The ID of a deivce.
378378
*/
379379
deviceId?: string;
380380
/**
381-
* The statistics about the media file being cached. If you call the openWithMediaSource method and set enableCache as true, the statistics about the media file being cached is updated every second after the media file is played. See CacheStatistics.
381+
* @ignore
382382
*/
383383
cacheStatistics?: CacheStatistics;
384384
}
@@ -411,7 +411,7 @@ export class MediaSource {
411411
*/
412412
enableCache?: boolean;
413413
/**
414-
* @ignore
414+
* Whether to allow the selection of different audio tracks when playing this media file: true : Allow to select different audio tracks. false : (Default) Do not allow to select different audio tracks. If you need to set different audio tracks for local playback and publishing to the channel, you need to set this parameter to true, and then call the selectMultiAudioTrack method to select the audio track.
415415
*/
416416
enableMultiAudioTrack?: boolean;
417417
/**

ts/Private/IAgoraLog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class LogConfig {
7676
*/
7777
filePath?: string;
7878
/**
79-
* The size (KB) of an agorasdk.log file. The value range is [128, 20480]. The default value is 1,024 KB. If you set fileSizeInKByte smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you set fileSizeInKByte greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB.
79+
* The size (KB) of an agorasdk.log file. The value range is [128,20480]. The default value is 2,048 KB. If you set fileSizeInKByte smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you set fileSizeInKByte greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB.
8080
*/
8181
fileSizeInKB?: number;
8282
/**

ts/Private/IAgoraMediaEngine.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ export abstract class IMediaEngine {
174174
/**
175175
* Creates a custom audio track.
176176
*
177-
* To publish a custom audio source to multiple channels, see the following steps:
177+
* Ensure that you call this method before joining a channel. To publish a custom audio source, see the following steps:
178178
* Call this method to create a custom audio track and get the audio track ID.
179-
* In ChannelMediaOptions of each channel, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true.
180-
* If you call pushAudioFrame, and specify trackId as the audio track ID set in step 2, you can publish the corresponding custom audio source in multiple channels.
179+
* Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true.
180+
* Call pushAudioFrame and specify trackId as the audio track ID set in step 2. You can then publish the corresponding custom audio source in the channel.
181181
*
182182
* @param trackType The type of the custom audio track. See AudioTrackType. If AudioTrackDirect is specified for this parameter, you must set publishMicrophoneTrack to false in ChannelMediaOptions when calling joinChannel to join the channel; otherwise, joining the channel fails and returns the error code -2.
183183
* @param config The configuration of the custom audio track. See AudioTrackConfig.
@@ -232,9 +232,14 @@ export abstract class IMediaEngine {
232232
): number;
233233

234234
/**
235-
* Pushes the external raw video frame to the SDK.
236-
*
237-
* If you call createCustomVideoTrack method to get the video track ID, set the customVideoTrackId parameter to the video track ID you want to publish in the ChannelMediaOptions of each channel, and set the publishCustomVideoTrack parameter to true, you can call this method to push the unencoded external video frame to the SDK.
235+
* Pushes the external raw video frame to the SDK through video tracks.
236+
*
237+
* To publish a custom video source, see the following steps:
238+
* Call createCustomVideoTrack to create a video track and get the video track ID.
239+
* Call joinChannel to join the channel. In ChannelMediaOptions, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true.
240+
* Call this method and specify videoTrackId as the video track ID set in step 2. You can then publish the corresponding custom video source in the channel. After calling this method, even if you stop pushing external video frames to the SDK, the custom video stream will still be counted as the video duration usage and incur charges. Agora recommends that you take appropriate measures based on the actual situation to avoid such video billing.
241+
* If you no longer need to capture external video data, you can call destroyCustomVideoTrack to destroy the custom video track.
242+
* If you only want to use the external video data for local preview and not publish it in the channel, you can call muteLocalVideoStream to cancel sending video stream or call updateChannelMediaOptions to set publishCustomVideoTrack to false.
238243
*
239244
* @param frame The external raw video frame to be pushed. See ExternalVideoFrame.
240245
* @param videoTrackId The video track ID returned by calling the createCustomVideoTrack method. The default value is 0.

0 commit comments

Comments
 (0)