Skip to content

Commit

Permalink
[AUTO] Generate codes by terra (#1184)
Browse files Browse the repository at this point in the history
Co-authored-by: guoxianzhe <[email protected]>
  • Loading branch information
sda-rob and guoxianzhe authored Apr 19, 2024
1 parent 99a8db8 commit 1aaa454
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 44 deletions.
51 changes: 25 additions & 26 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export enum ErrorCodeType {
*/
ErrSetClientRoleNotAuthorized = 119,
/**
* 120: Decryption fails. The user might have entered an incorrect password to join the channel. Check the entered password, or tell the user to try rejoining the channel.
* 120: Media streams decryption fails. The user might use an incorrect password to join the channel. Check the entered password, or tell the user to try rejoining the channel.
*/
ErrDecryptionFailed = 120,
/**
Expand Down Expand Up @@ -1447,11 +1447,11 @@ export enum SimulcastStreamMode {
*/
export class SimulcastStreamConfig {
/**
* The video dimension. See VideoDimensions. The default value is 160 × 120.
* The video dimension. See VideoDimensions. The default value is 50% of the high-quality video stream.
*/
dimensions?: VideoDimensions;
/**
* Video receive bitrate (Kbps), represented by an instantaneous value. The default value is 65.
* Video receive bitrate (Kbps), represented by an instantaneous value. This parameter does not need to be set. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you set.
*/
kBitrate?: number;
/**
Expand Down Expand Up @@ -1860,15 +1860,15 @@ export enum AudioScenarioType {
*/
export class VideoFormat {
/**
* The width (px) of the video frame.
* The width (px) of the video frame. The default value is 960.
*/
width?: number;
/**
* The height (px) of the video frame.
* The height (px) of the video frame. The default value is 540.
*/
height?: number;
/**
* The video frame rate (fps).
* The video frame rate (fps). The default value is 15.
*/
fps?: number;
}
Expand Down Expand Up @@ -2065,23 +2065,23 @@ export enum LocalAudioStreamReason {
*/
LocalAudioStreamReasonEncodeFailure = 5,
/**
* 6: No local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control plane of the device or if the microphone is working properly.
* 6: No local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control panel of the device or if the microphone is working properly.
*/
LocalAudioStreamReasonNoRecordingDevice = 6,
/**
* 7: No local audio capture device. Remind your users to check whether the speaker is connected to the device properly in the control plane of the device or if the speaker is working properly.
* 7: No local audio capture device. Remind your users to check whether the speaker is connected to the device properly in the control panel of the device or if the speaker is working properly.
*/
LocalAudioStreamReasonNoPlayoutDevice = 7,
/**
* @ignore
*/
LocalAudioStreamReasonInterrupted = 8,
/**
* 9: (Windows only) The ID of the local audio-capture device is invalid. Check the audio capture device ID.
* 9: (Windows only) The ID of the local audio-capture device is invalid. Prompt the user to check the audio capture device ID.
*/
LocalAudioStreamReasonRecordInvalidId = 9,
/**
* 10: (Windows only) The ID of the local audio-playback device is invalid. Check the audio playback device ID.
* 10: (Windows only) The ID of the local audio-playback device is invalid. Prompt the user to check the audio playback device ID.
*/
LocalAudioStreamReasonPlayoutInvalidId = 10,
}
Expand Down Expand Up @@ -2121,15 +2121,15 @@ export enum LocalVideoStreamReason {
*/
LocalVideoStreamReasonFailure = 1,
/**
* 2: No permission to use the local video capturing device. Remind the user to grant permissions and rejoin the channel. Deprecated: This enumerator is deprecated. Please use CAMERA in the onPermissionError callback instead.
* 2: No permission to use the local video capturing device. Prompt the user to grant permissions and rejoin the channel. Deprecated: This enumerator is deprecated. Please use CAMERA in the onPermissionError callback instead.
*/
LocalVideoStreamReasonDeviceNoPermission = 2,
/**
* 3: The local video capturing device is in use. Remind the user to check whether another application occupies the camera.
* 3: The local video capturing device is in use. Prompt the user to check if the camera is being used by another app, or try to rejoin the channel.
*/
LocalVideoStreamReasonDeviceBusy = 3,
/**
* 4: The local video capture fails. Remind your user to check whether the video capture device is working properly, whether the camera is occupied by another application, or try to rejoin the channel.
* 4: The local video capture fails. Prompt the user to check whether the video capture device is working properly, whether the camera is used by another app, or try to rejoin the channel.
*/
LocalVideoStreamReasonCaptureFailure = 4,
/**
Expand Down Expand Up @@ -2169,12 +2169,12 @@ export enum LocalVideoStreamReason {
*/
LocalVideoStreamReasonDeviceSystemPressure = 101,
/**
* 11: (macOS and Windows only) The shared windows is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window.
* 11: (macOS and Windows only) The shared window is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. Please prompt the user to unminimize the shared window.
*/
LocalVideoStreamReasonScreenCaptureWindowMinimized = 11,
/**
* 12: (macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios reporting this error code:
* When the local user closes the shared window, the SDK reports this error code.
* The local user closes the shared window.
* The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code.
* The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code.
*/
Expand Down Expand Up @@ -3439,7 +3439,7 @@ export class VideoCanvas {
*/
subviewUid?: number;
/**
* The video display window.
* The video display window. In one VideoCanvas, you can only choose to set either view or surfaceTexture. If both are set, only the settings in view take effect.
*/
view?: any;
/**
Expand Down Expand Up @@ -3473,8 +3473,7 @@ export class VideoCanvas {
*/
cropArea?: Rectangle;
/**
* (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as portrait-in-picture and watermarking.
* This property applies to macOS only.
* (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (Default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as portrait-in-picture and watermarking.
* The receiver can render alpha channel information only when the sender enables alpha transmission.
* To enable alpha transmission,.
*/
Expand Down Expand Up @@ -3722,7 +3721,7 @@ export class SegmentationProperty {
*/
modelType?: SegModelType;
/**
* The range of accuracy for identifying green colors (different shades of green) in the view. The value range is [0,1], and the default value is 0.5. The larger the value, the wider the range of identifiable shades of green. When the value of this parameter is too large, the edge of the portrait and the green color in the portrait range are also detected. Agora recommends that you dynamically adjust the value of this parameter according to the actual effect. This parameter only takes effect when modelType is set to SegModelGreen.
* The accuracy range for recognizing background colors in the image. The value range is [0,1], and the default value is 0.5. The larger the value, the wider the range of identifiable shades of pure color. When the value of this parameter is too large, the edge of the portrait and the pure color in the portrait range are also detected. Agora recommends that you dynamically adjust the value of this parameter according to the actual effect. This parameter only takes effect when modelType is set to SegModelGreen.
*/
greenCapacity?: number;
}
Expand Down Expand Up @@ -4526,7 +4525,7 @@ export class EncryptionConfig {
*/
encryptionKdfSalt?: number[];
/**
* @ignore
* Whether to enable data stream encryption: true : Enable data stream encryption. false : (Default) Disable data stream encryption.
*/
datastreamEncryptionEnabled?: boolean;
}
Expand All @@ -4540,11 +4539,11 @@ export enum EncryptionErrorType {
*/
EncryptionErrorInternalFailure = 0,
/**
* 1: Decryption errors. Ensure that the receiver and the sender use the same encryption mode and key.
* 1: Media stream decryption error. Ensure that the receiver and the sender use the same encryption mode and key.
*/
EncryptionErrorDecryptionFailure = 1,
/**
* 2: Encryption errors.
* 2: Media stream encryption error.
*/
EncryptionErrorEncryptionFailure = 2,
/**
Expand Down Expand Up @@ -4696,19 +4695,19 @@ export class UserInfo {
}

/**
* The audio filter of in-ear monitoring.
* The audio filter types of in-ear monitoring.
*/
export enum EarMonitoringFilterType {
/**
* 1<<0: Do not add an audio filter to the in-ear monitor.
* 1<<0: No audio filter added to in-ear monitoring.
*/
EarMonitoringFilterNone = 1 << 0,
/**
* 1<<1: Add an audio filter to the in-ear monitor. If you implement functions such as voice beautifier and audio effect, users can hear the voice after adding these effects.
* 1<<1: Add vocal effects audio filter to in-ear monitoring. If you implement functions such as voice beautifier and audio effect, users can hear the voice after adding these effects.
*/
EarMonitoringFilterBuiltInAudioFilters = 1 << 1,
/**
* 1<<2: Enable noise suppression to the in-ear monitor.
* 1<<2: Add noise suppression audio filter to in-ear monitoring.
*/
EarMonitoringFilterNoiseSuppression = 1 << 2,
/**
Expand Down
6 changes: 3 additions & 3 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export enum MediaSourceType {
*/
SecondaryScreenSource = 5,
/**
* 6. Custom video source.
* 6: Custom video source.
*/
CustomVideoSource = 6,
/**
Expand Down Expand Up @@ -680,7 +680,7 @@ export class VideoFrame {
*/
rotation?: number;
/**
* The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. It is required.
* The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. This parameter is required.
*/
renderTimeMs?: number;
/**
Expand Down Expand Up @@ -798,7 +798,7 @@ export class AudioFrame {
*/
samplesPerChannel?: number;
/**
* The number of bytes per sample. The number of bytes per audio sample, which is usually 16-bit (2-byte).
* The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).
*/
bytesPerSample?: BytesPerSample;
/**
Expand Down
4 changes: 4 additions & 0 deletions ts/Private/IAgoraMediaEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export abstract class IMediaEngine {
/**
* Pushes the external audio frame.
*
* Before calling this method to push external audio data, perform the following steps:
* Call createCustomAudioTrack to create a custom audio track and get the audio track ID.
* 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.
*
* @param frame The external audio frame. See AudioFrame.
* @param trackId The audio track ID. If you want to publish a custom external audio source, set this parameter to the ID of the corresponding custom audio track you want to publish.
*
Expand Down
24 changes: 12 additions & 12 deletions ts/Private/IAgoraRtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ export class RemoteAudioStats {
*/
rxAudioBytes?: number;
/**
* @ignore
* End-to-end audio delay (in milliseconds), which refers to the time from when the audio is captured by the remote user to when it is played by the local user.
*/
e2eDelay?: number;
}
Expand Down Expand Up @@ -823,11 +823,11 @@ export class PublisherConfiguration {
*/
export enum CameraDirection {
/**
* The rear camera.
* 0: The rear camera.
*/
CameraRear = 0,
/**
* The front camera.
* 1: (Default) The front camera.
*/
CameraFront = 1,
}
Expand Down Expand Up @@ -863,19 +863,19 @@ export class CameraCapturerConfiguration {
*/
cameraFocalLengthType?: CameraFocalLengthType;
/**
* This method applies to Windows only. The ID of the camera. The maximum length is MaxDeviceIdLengthType.
* The camera ID. The maximum length is MaxDeviceIdLengthType.
*/
deviceId?: string;
/**
* @ignore
*/
cameraId?: string;
/**
* Whether to follow the video aspect ratio set in setVideoEncoderConfiguration : true : (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame. false : Do not follow the system default audio playback device. The SDK does not change the aspect ratio of the captured video frame.
* (Optional) Whether to follow the video aspect ratio set in setVideoEncoderConfiguration : true : (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame. false : Do not follow the system default audio playback device. The SDK does not change the aspect ratio of the captured video frame.
*/
followEncodeDimensionRatio?: boolean;
/**
* The format of the video frame. See VideoFormat.
* (Optional) The format of the video frame. See VideoFormat.
*/
format?: VideoFormat;
}
Expand Down Expand Up @@ -1171,7 +1171,7 @@ export class ChannelMediaOptions {
*/
channelProfile?: ChannelProfileType;
/**
* @ignore
* Delay (in milliseconds) for sending audio frames. You can use this parameter to set the delay of the audio frames that need to be sent, to ensure audio and video synchronization. To switch off the delay, set the value to 0.
*/
audioDelayMs?: number;
/**
Expand Down Expand Up @@ -1584,7 +1584,7 @@ export interface IRtcEngineEventHandler {
* Occurs when the local video stream state changes.
*
* When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateFailed and error code of LocalVideoStreamReasonCaptureFailure in the following situations:
* The app switches to the background, and the system gets the camera resource.
* The app goes to the background and the system revokes the camera permission.
* The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of LocalVideoStreamStateCapturing and error code of LocalVideoStreamReasonCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment.
*
* @param source The type of the video source. See VideoSourceType.
Expand Down Expand Up @@ -5176,7 +5176,7 @@ export abstract class IRtcEngine {
* You can call this method either before or after joining a channel.
*
* @param enabled Enables or disables in-ear monitoring. true : Enables in-ear monitoring. false : (Default) Disables in-ear monitoring.
* @param includeAudioFilters The audio filter of in-ear monitoring: See EarMonitoringFilterType.
* @param includeAudioFilters The audio filter types of in-ear monitoring. See EarMonitoringFilterType.
*
* @returns
* 0: Success.
Expand Down Expand Up @@ -5598,7 +5598,7 @@ export abstract class IRtcEngine {
* @ignore
*/
abstract queryCameraFocalLengthCapability(): {
focalLengthInfos: FocalLengthInfo;
focalLengthInfos: FocalLengthInfo[];
size: number;
};

Expand Down Expand Up @@ -5629,7 +5629,7 @@ export abstract class IRtcEngine {
/**
* Retrieves the call ID.
*
* When a user joins a channel on a client, a callId is generated to identify the call from the client. Some methods, such as rate and complain, must be called after the call ends to submit feedback to the SDK. These methods require the callId parameter. Call this method after joining a channel.
* When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get the callId parameter, and pass it in when calling methods such as rate and complain. Call this method after joining a channel.
*
* @returns
* The current call ID, if the method succeeds.
Expand Down Expand Up @@ -5932,7 +5932,7 @@ export abstract class IRtcEngine {
*
* In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel. All users in the same channel must use the same encryption mode and encryption key. After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. If you enable the built-in encryption, you cannot use the Media Push function.
*
* @param enabled Whether to enable built-in encryption: true : Enable the built-in encryption. false : Disable the built-in encryption.
* @param enabled Whether to enable built-in encryption: true : Enable the built-in encryption. false : (Default) Disable the built-in encryption.
* @param config Built-in encryption configurations. See EncryptionConfig.
*
* @returns
Expand Down
4 changes: 2 additions & 2 deletions ts/Private/IAudioDeviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export abstract class IAudioDeviceManager {
abstract getPlaybackDevice(): string;

/**
* Retrieves the audio playback device associated with the device ID.
* Retrieves the information of the audio playback device.
*
* @returns
* An AudioDeviceInfo object, which contains the ID and device name of the audio devices.
Expand Down Expand Up @@ -105,7 +105,7 @@ export abstract class IAudioDeviceManager {
abstract getRecordingDevice(): string;

/**
* Retrieves the volume of the audio recording device.
* Retrieves the information of the audio recording device.
*
* @returns
* An AudioDeviceInfo object, which includes the device ID and device name.
Expand Down
2 changes: 1 addition & 1 deletion ts/Private/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5261,7 +5261,7 @@ export class IRtcEngineImpl implements IRtcEngine {
}

queryCameraFocalLengthCapability(): {
focalLengthInfos: FocalLengthInfo;
focalLengthInfos: FocalLengthInfo[];
size: number;
} {
const apiType = this.getApiTypeFromQueryCameraFocalLengthCapability();
Expand Down

0 comments on commit 1aaa454

Please sign in to comment.