setFaceShapeAreaOptions abstract method

Future<void> setFaceShapeAreaOptions({
  1. required FaceShapeAreaOptions options,
  2. MediaSourceType type = MediaSourceType.primaryCameraSource,
})

Sets face shaping area options and specifies the media source.

If the preset face shaping effects set with setFaceShapeBeautyOptions do not meet expectations, you can use this method to configure face shaping area options and fine-tune individual facial areas for more refined results. 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.

  • options Face shaping area options. See FaceShapeAreaOptions.
  • 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> setFaceShapeAreaOptions(
    {required FaceShapeAreaOptions options,
    MediaSourceType type = MediaSourceType.primaryCameraSource});