From 9b8b055d43be0baf1772eb1f35049fb912beb688 Mon Sep 17 00:00:00 2001 From: guoxianzhe Date: Tue, 3 Dec 2024 08:17:13 +0000 Subject: [PATCH] [AUTO] Generate codes by terra --- ts/Private/AgoraBase.ts | 65 +++++++------ ts/Private/AgoraMediaBase.ts | 44 ++++----- ts/Private/AgoraMediaPlayerTypes.ts | 2 +- ts/Private/IAgoraMediaPlayer.ts | 15 +-- ts/Private/IAgoraMediaPlayerSource.ts | 2 +- ts/Private/IAgoraRtcEngine.ts | 128 ++++++++++++++++++-------- ts/Private/IAgoraRtcEngineEx.ts | 12 ++- ts/Private/IAudioDeviceManager.ts | 13 ++- 8 files changed, 183 insertions(+), 98 deletions(-) diff --git a/ts/Private/AgoraBase.ts b/ts/Private/AgoraBase.ts index 506dae025..dbe3ed775 100644 --- a/ts/Private/AgoraBase.ts +++ b/ts/Private/AgoraBase.ts @@ -772,11 +772,11 @@ export enum OrientationMode { */ export enum DegradationPreference { /** - * @ignore + * 0: (Default) Automatic mode. The SDK will automatically select MaintainFramerate, MaintainBalanced or MaintainResolution based on the video scenario you set, in order to achieve the best overall quality of experience (QoE). */ MaintainAuto = -1, /** - * 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. + * 0: Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. Deprecated: This enumerator is deprecated. Use other enumerations instead. */ MaintainQuality = 0, /** @@ -1266,7 +1266,7 @@ export class EncodedVideoFrameInfo { */ export enum CompressionPreference { /** - * @ignore + * -1: (Default) Automatic mode. The SDK will automatically select PreferLowLatency or PreferQuality based on the video scenario you set to achieve the best user experience. */ PreferCompressionAuto = -1, /** @@ -1274,7 +1274,7 @@ export enum CompressionPreference { */ PreferLowLatency = 0, /** - * 1: (Default) High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized. + * 1: High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized. */ PreferQuality = 1, } @@ -2108,11 +2108,11 @@ export enum VideoApplicationScenarioType { */ ApplicationScenarioMeeting = 1, /** - * ApplicationScenario1v1 (2) is suitable for 1v1 video call scenarios. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. 2: 1v1 video call scenario. + * ApplicationScenario1v1 (2) This is applicable to the scenario. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. 2: 1v1 video call scenario. */ ApplicationScenario1v1 = 2, /** - * @ignore + * ApplicationScenarioLiveshow (3) This is applicable to the scenario. In this scenario, fast video rendering and high image quality are crucial. The SDK implements several performance optimizations, including automatically enabling accelerated audio and video frame rendering to minimize first-frame latency (no need to call enableInstantMediaRendering), and B-frame encoding to achieve better image quality and bandwidth efficiency. The SDK also provides enhanced video quality and smooth playback, even in poor network conditions or on lower-end devices. 3. Live show scenario. */ ApplicationScenarioLiveshow = 3, } @@ -2326,11 +2326,11 @@ export enum LocalVideoStreamReason { */ LocalVideoStreamReasonDeviceNotFound = 8, /** - * 9: (macOS only) The video capture device currently in use is disconnected (such as being unplugged). + * 9: The video capture device currently in use is disconnected (such as being unplugged). */ LocalVideoStreamReasonDeviceDisconnected = 9, /** - * 10: (macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid. + * 10: The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid. */ LocalVideoStreamReasonDeviceInvalidId = 10, /** @@ -2346,11 +2346,11 @@ export enum LocalVideoStreamReason { */ LocalVideoStreamReasonDeviceSystemPressure = 101, /** - * 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. + * 11: 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: + * 12: 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: * 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. @@ -2365,7 +2365,7 @@ export enum LocalVideoStreamReason { */ LocalVideoStreamReasonScreenCaptureWindowNotSupported = 20, /** - * 21: (Windows only) The screen has not captured any data available for window sharing. + * 21: (Windows and Android only) The currently captured window has no data. */ LocalVideoStreamReasonScreenCaptureFailure = 21, /** @@ -3282,41 +3282,45 @@ export enum VideoTranscoderError { } /** - * @ignore + * The source of the audio streams that are mixed locally. */ export class MixedAudioStream { /** - * @ignore + * The type of the audio source. See AudioSourceType. */ sourceType?: AudioSourceType; /** - * @ignore + * The user ID of the remote user. Set this parameter if the source type of the locally mixed audio steams is AudioSourceRemoteUser. */ remoteUserUid?: number; /** - * @ignore + * The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total): + * All lowercase English letters: a to z. + * All uppercase English letters: A to Z. + * All numeric characters: 0 to 9. + * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," Set this parameter if the source type of the locally mixed audio streams is AudioSourceRemoteChannel or AudioSourceRemoteUser. */ channelId?: string; /** - * @ignore + * The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack. Set this parameter if the source type of the locally mixed audio steams is AudioSourceCustom. */ trackId?: number; } /** - * @ignore + * The configurations for mixing the lcoal audio. */ export class LocalAudioMixerConfiguration { /** - * @ignore + * The number of the audio streams that are mixed locally. */ streamCount?: number; /** - * @ignore + * The source of the audio streams that are mixed locally. See MixedAudioStream. */ audioInputStreams?: MixedAudioStream[]; /** - * @ignore + * Whether the mxied audio stream uses the timestamp of the audio frames captured by the local microphone. true : (Default) Yes. Set to this value if you want all locally captured audio streams synchronized. false : No. The SDK uses the timestamp of the audio frames at the time when they are mixed. */ syncWithLocalMic?: boolean; } @@ -3854,15 +3858,22 @@ export class FaceShapeBeautyOptions { } /** - * @ignore + * Filter effect options. */ export class FilterEffectOptions { /** - * @ignore + * The absolute path to the local cube map texture file, which can be used to customize the filter effect. The specified .cude file should strictly follow the Cube LUT Format Specification; otherwise, the filter options do not take effect. The following is a sample of the .cude file: + * LUT_3D_SIZE 32 + * 0.0039215689 0 0.0039215682 + * 0.0086021447 0.0037950677 0 + * ... + * 0.0728652592 0.0039215689 0 + * The identifier LUT_3D_SIZE on the first line of the cube map file represents the size of the three-dimensional lookup table. The LUT size for filter effect can only be set to 32. + * The SDK provides a built-in built_in_whiten_filter.cube file. You can pass the absolute path of this file to get the whitening filter effect. */ path?: string; /** - * @ignore + * The intensity of the filter effect, with a range value of [0.0,1.0], in which 0.0 represents no filter effect. The default value is 0.5. The higher the value, the stronger the filter effect. */ strength?: number; } @@ -3924,7 +3935,7 @@ export enum VideoDenoiserMode { } /** - * The video noise reduction level. + * Video noise reduction level. */ export enum VideoDenoiserLevel { /** @@ -3932,7 +3943,7 @@ export enum VideoDenoiserLevel { */ VideoDenoiserLevelHighQuality = 0, /** - * 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed. + * 1: Promotes reducing performance consumption during video noise reduction. It prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this setting when the camera is fixed. */ VideoDenoiserLevelFast = 1, } @@ -4088,7 +4099,7 @@ export class AudioTrackConfig { */ enableLocalPlayback?: boolean; /** - * @ignore + * Whether to enable audio processing module: true Enable the audio processing module to apply the Automatic Echo Cancellation (AEC), Automatic Noise Suppression (ANS), and Automatic Gain Control (AGC) effects. false : (Default) Do not enable the audio processing module. This parameter only takes effect on AudioTrackDirect in custom audio capturing. */ enableAudioProcessing?: boolean; } @@ -4790,7 +4801,7 @@ export class ChannelMediaRelayConfiguration { /** * The information of the target channel ChannelMediaInfo. It contains the following members: channelName : The name of the target channel. token : The token for joining the target channel. It is generated with the channelName and uid you set in destInfos. * If you have not enabled the App Certificate, set this parameter as the default value null, which means the SDK applies the App ID. - * If you have enabled the App Certificate, you must use the token generated with the channelName and uid. If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels. uid : The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32 -1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random user ID. + * If you have enabled the App Certificate, you must use the token generated with the channelName and uid. If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels. uid : The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32 -1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random UID. */ destInfos?: ChannelMediaInfo[]; /** diff --git a/ts/Private/AgoraMediaBase.ts b/ts/Private/AgoraMediaBase.ts index 397114136..9f69b5ec0 100644 --- a/ts/Private/AgoraMediaBase.ts +++ b/ts/Private/AgoraMediaBase.ts @@ -106,23 +106,23 @@ export enum VideoSourceType { } /** - * @ignore + * The audio source type. */ export enum AudioSourceType { /** - * @ignore + * 0: (Default) Microphone. */ AudioSourceMicrophone = 0, /** - * @ignore + * 1: Custom audio stream. */ AudioSourceCustom = 1, /** - * @ignore + * 2: Media player. */ AudioSourceMediaPlayer = 2, /** - * @ignore + * 3: System audio stream captured during screen sharing. */ AudioSourceLoopbackRecording = 3, /** @@ -130,15 +130,15 @@ export enum AudioSourceType { */ AudioSourceMixedStream = 4, /** - * @ignore + * 5: Audio stream from a specified remote user. */ AudioSourceRemoteUser = 5, /** - * @ignore + * 6: Mixed audio streams from all users in the current channel. */ AudioSourceRemoteChannel = 6, /** - * @ignore + * 100: An unknown audio source. */ AudioSourceUnknown = 100, } @@ -536,11 +536,11 @@ export enum VideoPixelFormat { */ export enum RenderModeType { /** - * 1: Hidden mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). One dimension of the video may have clipped contents. + * 1: Hidden mode. The priority is to fill the window. Any excess video that does not match the window size will be cropped. */ RenderModeHidden = 1, /** - * 2: Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black. + * 2: Fit mode. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black. */ RenderModeFit = 2, /** @@ -876,27 +876,27 @@ export class Hdr10MetadataInfo { } /** - * @ignore + * The relative position of alphaBuffer and video frames. */ export enum AlphaStitchMode { /** - * @ignore + * 0: (Default) Only video frame, that is, alphaBuffer is not stitched with the video frame. */ NoAlphaStitch = 0, /** - * @ignore + * 1: alphaBuffer is above the video frame. */ AlphaStitchUp = 1, /** - * @ignore + * 2: alphaBuffer is below the video frame. */ AlphaStitchBelow = 2, /** - * @ignore + * 3: alphaBuffer is to the left of the video frame. */ AlphaStitchLeft = 3, /** - * @ignore + * 4: alphaBuffer is to the right of the video frame. */ AlphaStitchRight = 4, } @@ -1032,7 +1032,7 @@ export class ExternalVideoFrame { */ hdr10MetadataInfo?: Hdr10MetadataInfo; /** - * @ignore + * By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering. */ colorSpace?: ColorSpace; } @@ -1130,7 +1130,7 @@ export class VideoFrame { */ hdr10MetadataInfo?: Hdr10MetadataInfo; /** - * @ignore + * By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering. */ colorSpace?: ColorSpace; } @@ -1178,15 +1178,17 @@ export enum VideoModulePosition { } /** - * @ignore + * The snapshot configuration. */ export class SnapshotConfig { /** - * @ignore + * The local path (including filename extensions) of the snapshot. For example: + * Windows: C:\Users\\AppData\Local\Agora\\example.jpg + * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable. */ filePath?: string; /** - * @ignore + * The position of the snapshot video frame in the video pipeline. See VideoModulePosition. */ position?: VideoModulePosition; } diff --git a/ts/Private/AgoraMediaPlayerTypes.ts b/ts/Private/AgoraMediaPlayerTypes.ts index 88d156206..052833a23 100644 --- a/ts/Private/AgoraMediaPlayerTypes.ts +++ b/ts/Private/AgoraMediaPlayerTypes.ts @@ -439,7 +439,7 @@ export class MediaSource { */ startPos?: number; /** - * Whether to enable autoplay once the media file is opened: true : (Default) Enables autoplay. false : Disables autoplay. If autoplay is disabled, you need to call the play method to play a media file after it is opened. + * Whether to enable autoplay once the media file is opened: true : (Default) Yes. false : No. If autoplay is disabled, you need to call the play method to play a media file after it is opened. */ autoPlay?: boolean; /** diff --git a/ts/Private/IAgoraMediaPlayer.ts b/ts/Private/IAgoraMediaPlayer.ts index 610278a0e..6bfd6829c 100644 --- a/ts/Private/IAgoraMediaPlayer.ts +++ b/ts/Private/IAgoraMediaPlayer.ts @@ -154,8 +154,7 @@ export abstract class IMediaPlayer { * @param index The index of the media stream. This parameter must be less than the return value of getStreamCount. * * @returns - * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. - * If the call fails, returns null. + * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. null, if the method call fails. */ abstract getStreamInfo(index: number): PlayerStreamInfo; @@ -179,8 +178,8 @@ export abstract class IMediaPlayer { * * Call this method after calling open. * - * @param speed The playback speed. Agora recommends that you limit this value to a range between 50 and 400, which is defined as follows: - * 50: Half the original speed. + * @param speed The playback speed. Agora recommends that you set this to a value between 30 and 400, defined as follows: + * 30: 0.3 times the original speed. * 100: The original speed. * 400: 4 times the original speed. * @@ -495,7 +494,7 @@ export abstract class IMediaPlayer { * * You can call this method to switch the media resource to be played according to the current network status. For example: * When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate. - * When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate. After calling this method, if you receive the PlayerEventSwitchComplete event in the onPlayerEvent callback, the switch is successful; If you receive the PlayerEventSwitchError event in the onPlayerEvent callback, the switch fails. + * When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate. After calling this method, if you receive the onPlayerEvent callback report the PlayerEventSwitchComplete event, the switching is successful. If the switching fails, the SDK will automatically retry 3 times. If it still fails, you will receive the onPlayerEvent callback reporting the PlayerEventSwitchError event indicating an error occurred during media resource switching. * Ensure that you call this method after open. * To ensure normal playback, pay attention to the following when calling this method: * Do not call this method when playback is paused. @@ -503,7 +502,7 @@ export abstract class IMediaPlayer { * Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched. * * @param src The URL of the media resource. - * @param syncPts Whether to synchronize the playback position (ms) before and after the switch: true : Synchronize the playback position before and after the switch. false : (Default) Do not synchronize the playback position before and after the switch. Make sure to set this parameter as false if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios. + * @param syncPts Whether to synchronize the playback position (ms) before and after the switch: true : Synchronize the playback position before and after the switch. false : (Default) Do not synchronize the playback position before and after the switch. * * @returns * 0: Success. @@ -514,7 +513,9 @@ export abstract class IMediaPlayer { /** * Preloads a media resource. * - * You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop. Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again. + * You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop. + * Before calling this method, ensure that you have called open or openWithMediaSource to open the media resource successfully. + * Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again. * * @param src The URL of the media resource. * @param startPos The starting position (ms) for playing after the media resource is preloaded to the playlist. When preloading a live stream, set this parameter to 0. diff --git a/ts/Private/IAgoraMediaPlayerSource.ts b/ts/Private/IAgoraMediaPlayerSource.ts index 00530af68..42176f4a7 100644 --- a/ts/Private/IAgoraMediaPlayerSource.ts +++ b/ts/Private/IAgoraMediaPlayerSource.ts @@ -42,7 +42,7 @@ export interface IMediaPlayerSourceObserver { * * After calling the seek method, the SDK triggers the callback to report the results of the seek operation. * - * @param eventCode The player events. See MediaPlayerEvent. + * @param eventCode The player event. See MediaPlayerEvent. * @param elapsedTime The time (ms) when the event occurs. * @param message Information about the event. */ diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index c2bc2b9e7..b2f9ad4e1 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -1179,7 +1179,7 @@ export class ChannelMediaOptions { */ publishTranscodedVideoTrack?: boolean; /** - * @ignore + * Whether to publish the mixed audio track: true : Publish the mixed audio track. false : Do not publish the mixed audio track. */ publishMixedAudioTrack?: boolean; /** @@ -2389,7 +2389,7 @@ export interface IRtcEngineEventHandler { /** * Video frame rendering event callback. * - * After calling the startMediaRenderingTracing method or joining the channel, the SDK triggers this callback to report the events of video frame rendering and the indicators during the rendering process. Developers can optimize the indicators to improve the efficiency of the first video frame rendering. + * After calling the startMediaRenderingTracing method or joining a channel, the SDK triggers this callback to report the events of video frame rendering and the indicators during the rendering process. Developers can optimize the indicators to improve the efficiency of the first video frame rendering. * * @param connection The connection information. See RtcConnection. * @param uid The user ID. @@ -3320,7 +3320,9 @@ export abstract class IRtcEngine { * * @param enabled Whether to enable the image enhancement function: true : Enable the image enhancement function. false : (Default) Disable the image enhancement function. * @param options The image enhancement options. See BeautyOptions. - * @param type Source type of the extension. See MediaSourceType. + * @param type The type of the media source to which the filter effect is applied. See MediaSourceType. In this method, this parameter supports only the following two settings: + * Use the default value PrimaryCameraSource if you use camera to capture local video. + * Set this parameter to CustomVideoSource if you use custom video source. * * @returns * 0: Success. @@ -3367,7 +3369,17 @@ export abstract class IRtcEngine { ): FaceShapeAreaOptions; /** - * @ignore + * Sets the filter effect options and specifies the media source. + * + * @param enabled Whether to enable the filter effect: true : Yes. false : (Default) No. + * @param options The filter effect options. See FilterEffectOptions. + * @param type The type of the media source to which the filter effect is applied. See MediaSourceType. In this method, this parameter supports only the following two settings: + * Use the default value PrimaryCameraSource if you use camera to capture local video. + * Set this parameter to CustomVideoSource if you use custom video source. + * + * @returns + * 0: Success. + * < 0: Failure. */ abstract setFilterEffectOptions( enabled: boolean, @@ -3378,17 +3390,13 @@ export abstract class IRtcEngine { /** * Sets low-light enhancement. * - * The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect. - * Call this method after calling enableVideo. - * Dark light enhancement has certain requirements for equipment performance. The low-light enhancement feature has certain performance requirements on devices. If your device overheats after you enable low-light enhancement, Agora recommends modifying the low-light enhancement options to a less performance-consuming level or disabling low-light enhancement entirely. - * Both this method and setExtensionProperty can turn on low-light enhancement: - * When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). - * When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty. - * This method relies on the image enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally. + * You can call this method to enable the color enhancement feature and set the options of the color enhancement effect. * * @param enabled Whether to enable low-light enhancement: true : Enable low-light enhancement. false : (Default) Disable low-light enhancement. * @param options The low-light enhancement options. See LowlightEnhanceOptions. - * @param type The type of the video source. See MediaSourceType. + * @param type The type of the media source to which the filter effect is applied. See MediaSourceType. In this method, this parameter supports only the following two settings: + * Use the default value PrimaryCameraSource if you use camera to capture local video. + * Set this parameter to CustomVideoSource if you use custom video source. * * @returns * 0: Success. @@ -3403,17 +3411,13 @@ export abstract class IRtcEngine { /** * Sets video noise reduction. * - * Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding. You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect. - * Call this method after calling enableVideo. - * Video noise reduction has certain requirements for equipment performance. If your device overheats after you enable video noise reduction, Agora recommends modifying the video noise reduction options to a less performance-consuming level or disabling video noise reduction entirely. - * Both this method and setExtensionProperty can turn on video noise reduction function: - * When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). - * When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty. - * This method relies on the image enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally. + * You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect. If the noise reduction implemented by this method does not meet your needs, Agora recommends that you call the setBeautyEffectOptions method to enable the beauty and skin smoothing function to achieve better video noise reduction effects. The recommended BeautyOptions settings for intense noise reduction effect are as follows: lighteningContrastLevel LighteningContrastNormal lighteningLevel : 0.0 smoothnessLevel : 0.5 rednessLevel : 0.0 sharpnessLevel : 0.1 * * @param enabled Whether to enable video noise reduction: true : Enable video noise reduction. false : (Default) Disable video noise reduction. * @param options The video noise reduction options. See VideoDenoiserOptions. - * @param type The type of the video source. See MediaSourceType. + * @param type The type of the media source to which the filter effect is applied. See MediaSourceType. In this method, this parameter supports only the following two settings: + * Use the default value PrimaryCameraSource if you use camera to capture local video. + * Set this parameter to CustomVideoSource if you use custom video source. * * @returns * 0: Success. @@ -3431,14 +3435,13 @@ export abstract class IRtcEngine { * The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect. * Call this method after calling enableVideo. * The color enhancement feature has certain performance requirements on devices. With color enhancement turned on, Agora recommends that you change the color enhancement level to one that consumes less performance or turn off color enhancement if your device is experiencing severe heat problems. - * Both this method and setExtensionProperty can enable color enhancement: - * When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). - * When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty. * This method relies on the image enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally. * * @param enabled Whether to enable color enhancement: true Enable color enhancement. false : (Default) Disable color enhancement. * @param options The color enhancement options. See ColorEnhanceOptions. - * @param type The type of the video source. See MediaSourceType. + * @param type The type of the media source to which the filter effect is applied. See MediaSourceType. In this method, this parameter supports only the following two settings: + * Use the default value PrimaryCameraSource if you use camera to capture local video. + * Set this parameter to CustomVideoSource if you use custom video source. * * @returns * 0: Success. @@ -3464,9 +3467,9 @@ export abstract class IRtcEngine { * @param enabled Whether to enable virtual background: true : Enable virtual background. false : Disable virtual background. * @param backgroundSource The custom background. See VirtualBackgroundSource. To adapt the resolution of the custom background image to that of the video captured by the SDK, the SDK scales and crops the custom background image while ensuring that the content of the custom background image is not distorted. * @param segproperty Processing properties for background images. See SegmentationProperty. - * @param type The type of the video source. See MediaSourceType. In this method, this parameter supports only the following two settings: - * The default value is PrimaryCameraSource. - * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource. + * @param type The type of the media source to which the filter effect is applied. See MediaSourceType. In this method, this parameter supports only the following two settings: + * Use the default value PrimaryCameraSource if you use camera to capture local video. + * Set this parameter to CustomVideoSource if you use custom video source. * * @returns * 0: Success. @@ -3526,7 +3529,7 @@ export abstract class IRtcEngine { * If someone subscribes to the low-quality stream, the SDK enables the low-quality stream and resets it to the SimulcastStreamConfig configuration used in the most recent calling of setDualStreamMode. If no configuration has been set by the user previously, the following values are used: * Resolution: 480 × 272 * Frame rate: 15 fps - * Bitrate: 500 Kbps ApplicationScenario1v1 (2) is suitable for 1v1 video call scenarios. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. + * Bitrate: 500 Kbps ApplicationScenario1v1 (2) This is applicable to the scenario. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. ApplicationScenarioLiveshow (3) This is applicable to the scenario. In this scenario, fast video rendering and high image quality are crucial. The SDK implements several performance optimizations, including automatically enabling accelerated audio and video frame rendering to minimize first-frame latency (no need to call enableInstantMediaRendering), and B-frame encoding to achieve better image quality and bandwidth efficiency. The SDK also provides enhanced video quality and smooth playback, even in poor network conditions or on lower-end devices. * * @returns * 0: Success. @@ -4797,7 +4800,14 @@ export abstract class IRtcEngine { ): number; /** - * @ignore + * Sets the maximum frame rate for rendering local video. + * + * @param sourceType The type of the video source. See VideoSourceType. + * @param targetFps The capture frame rate (fps) of the local video. Sopported values are: 1, 7, 10, 15, 24, 30, 60. Set this parameter to a value lower than the actual video frame rate; otherwise, the settings do not take effect. + * + * @returns + * 0: Success. + * < 0: Failure. */ abstract setLocalRenderTargetFps( sourceType: VideoSourceType, @@ -4805,7 +4815,13 @@ export abstract class IRtcEngine { ): number; /** - * @ignore + * Sets the maximum frame rate for rendering remote video. + * + * @param targetFps The capture frame rate (fps) of the local video. Sopported values are: 1, 7, 10, 15, 24, 30, 60. Set this parameter to a value lower than the actual video frame rate; otherwise, the settings do not take effect. + * + * @returns + * 0: Success. + * < 0: Failure. */ abstract setRemoteRenderTargetFps(targetFps: number): number; @@ -5212,11 +5228,11 @@ export abstract class IRtcEngine { * Enables loopback audio capturing. * * If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end. - * 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. + * The macOS system's default sound card does not support recording functionality. As of v4.5.0, when you call this method for the first time, the SDK will automatically install the built-in AgoraALD virtual sound card developed by Agora. After successful installation, the audio routing will automatically switch to the virtual sound card and use it for audio capturing. * You can call this method either before or after joining a channel. * If you call the disableAudio method to disable the audio module, audio capturing will be disabled as well. If you need to enable audio capturing, call the enableAudio method to enable the audio module and then call the enableLoopbackRecording method. * - * @param enabled Sets whether to enable loopback audio capturing. true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing. + * @param enabled Sets whether to enable loopback audio capturing. true : Enable sound card capturing. You can find the name of the virtual sound card in your system's Audio Devices > Output. false : Disable sound card capturing. The name of the virtual sound card will not be shown in your system's Audio Devices > Output. * @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. * 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. * @@ -5654,7 +5670,7 @@ export abstract class IRtcEngine { * * Call this method after starting screen sharing or window sharing. * - * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration. + * @param captureParams The screen sharing encoding parameters. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration. * * @returns * 0: Success. @@ -5866,19 +5882,46 @@ export abstract class IRtcEngine { abstract stopLocalVideoTranscoder(): number; /** - * @ignore + * Starts local audio mixing. + * + * This method supports merging multiple audio streams into one audio stream locally. For example, merging the audio streams captured from the local microphone, and that from the media player, the sound card, and the remote users into one audio stream, and then publish the merged audio stream to the channel. + * If you want to mix the locally captured audio streams, you can set publishMixedAudioTrack in ChannelMediaOptions to true, and then publish the mixed audio stream to the channel. + * If you want to mix the remote audio stream, ensure that the remote audio stream has been published in the channel and you have subcribed to the audio stream that you need to mix. + * + * @param config The configurations for mixing the lcoal audio. See LocalAudioMixerConfiguration. + * + * @returns + * 0: Success. + * < 0: Failure. + * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. */ abstract startLocalAudioMixer(config: LocalAudioMixerConfiguration): number; /** - * @ignore + * Updates the configurations for mixing audio streams locally. + * + * After calling startLocalAudioMixer, call this method if you want to update the local audio mixing configuration. + * + * @param config The configurations for mixing the lcoal audio. See LocalAudioMixerConfiguration. + * + * @returns + * 0: Success. + * < 0: Failure. + * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. */ abstract updateLocalAudioMixerConfiguration( config: LocalAudioMixerConfiguration ): number; /** - * @ignore + * Stops the local audio mixing. + * + * After calling startLocalAudioMixer, call this method if you want to stop the local audio mixing. + * + * @returns + * 0: Success. + * < 0: Failure. + * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. */ abstract stopLocalAudioMixer(): number; @@ -6869,7 +6912,16 @@ export abstract class IRtcEngine { abstract getNativeHandle(): number; /** - * @ignore + * Takes a screenshot of the video at the specified observation point. + * + * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. + * + * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. + * @param config The configuration of the snaptshot. See SnapshotConfig. + * + * @returns + * 0: Success. + * < 0: Failure. */ abstract takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number; } @@ -6905,7 +6957,7 @@ export enum MediaDeviceStateType { */ MediaDeviceStateDisabled = 2, /** - * @ignore + * 3: The device is plugged in. */ MediaDeviceStatePluggedIn = 3, /** diff --git a/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index 926337b67..3390515fb 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -971,7 +971,17 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * @ignore + * Gets a video screenshot of the specified observation point using the connection ID. + * + * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. + * + * @param connection The connection information. See RtcConnection. + * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. + * @param config The configuration of the snaptshot. See SnapshotConfig. + * + * @returns + * 0: Success. + * < 0: Failure. */ abstract takeSnapshotWithConfigEx( connection: RtcConnection, diff --git a/ts/Private/IAudioDeviceManager.ts b/ts/Private/IAudioDeviceManager.ts index df1f45ea4..d238cde4d 100644 --- a/ts/Private/IAudioDeviceManager.ts +++ b/ts/Private/IAudioDeviceManager.ts @@ -181,12 +181,21 @@ export abstract class IAudioDeviceManager { abstract getPlaybackDeviceMute(): boolean; /** - * @ignore + * Sets the mute status of the audio capture device. + * + * @param mute Whether to mute the audio recording device: true : Mute the audio capture device. false : Unmute the audio capture device. + * + * @returns + * 0: Success. + * < 0: Failure. */ abstract setRecordingDeviceMute(mute: boolean): number; /** - * @ignore + * Gets whether the audio capture device is muted. + * + * @returns + * true : The microphone is muted. false : The microphone is unmuted. */ abstract getRecordingDeviceMute(): boolean;