setLowlightEnhanceOptions abstract method

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

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.

  • enabled Whether to enable low-light enhancement: true : Enable low-light enhancement. false : (Default) Disable low-light enhancement.
  • options The low-light enhancement options. See LowlightEnhanceOptions.
  • type The type of the video source. See MediaSourceType.

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.

Implementation

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