setLowlightEnhanceOptions abstract method

Future<void> setLowlightEnhanceOptions({
  1. required bool enabled,
  2. required LowlightEnhanceOptions options,
  3. MediaSourceType type = MediaSourceType.primaryCameraSource,
})

Sets the low-light enhancement feature.

You can call this method to enable the low-light enhancement feature and configure its effects. This method depends on the video enhancement dynamic library libagora_clear_vision_extension.dll. If this library is removed, the feature cannot be enabled properly. Low-light enhancement has certain performance requirements. After enabling it, if the device experiences severe overheating, it is recommended to lower the enhancement level to a less performance-intensive one or disable the feature. To achieve high-quality low-light enhancement (lowLightEnhanceLevelHighQuality), you must first call setVideoDenoiserOptions to enable video denoising. The corresponding settings are: For automatic mode (LowLightEnhanceAuto), video denoising must be set to high quality (videoDenoiserLevelHighQuality) and automatic mode (videoDenoiserAuto). For manual mode (LowLightEnhanceManual), video denoising must be set to high quality (videoDenoiserLevelHighQuality) and manual mode (videoDenoiserManual).

  • enabled Whether to enable the low-light enhancement feature: true : Enables low-light enhancement. false : (Default) Disables low-light enhancement.
  • options Low-light enhancement options for configuring the effect. See LowlightEnhanceOptions.
  • type The type of media source to which the effect is applied. See MediaSourceType. In this method, this parameter only supports the following two settings: When using the camera to capture local video, keep the default value primaryCameraSource. If you want to use custom captured video, set this parameter to customVideoSource.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> setLowlightEnhanceOptions(
    {required bool enabled,
    required LowlightEnhanceOptions options,
    MediaSourceType type = MediaSourceType.primaryCameraSource});