setFaceShapeBeautyOptions abstract method

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

Sets face shaping effect options and specifies the media source.

Call this method to enhance facial features such as slimming the face, enlarging eyes, slimming the nose, etc., using preset parameters in one go. You can also adjust the overall intensity of the effect. Face shaping is a value-added service. See Billing Strategy for pricing details. On Android, this method is only supported on Android 4.4 and above. This method depends on the video enhancement dynamic library libagora_clear_vision_extension.dll. Deleting this library will cause the feature to fail to start. This feature requires high device performance. When calling this method, the SDK automatically checks the current device capabilities.

  • enabled Whether to enable the face shaping effect: true : Enable face shaping. false : (Default) Disable face shaping.
  • options Face shaping style options. See FaceShapeBeautyOptions.
  • type The media source type to which the effect is applied. See MediaSourceType. In this method, this parameter only supports the following two settings: When capturing local video using the camera, keep the default value primaryCameraSource. 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> setFaceShapeBeautyOptions(
    {required bool enabled,
    required FaceShapeBeautyOptions options,
    MediaSourceType type = MediaSourceType.primaryCameraSource});