enableEffectBeauty method

Future<int?> enableEffectBeauty(
  1. bool enable
)

@detail api @hiddensdk(audiosdk) @author wangjunlin.3182 @brief Enables/Disables basic beauty effects. @param enable Whether to enable basic beauty effects.
- true: Enables basic beauty effects. - false: (Default) Disables basic beauty effects. @return - 0: Success. - –1001: This method is not available for your current RTC SDK. - -12: This method is not available in the Audio SDK. - <0: Failure. Effect SDK internal error. For specific error code, see Error Code Table. @note - You cannot use the basic beauty effects and the advanced effect features at the same time. See how to use advanced effect features for more information. - You need to integrate Effect SDK before calling this API. Effect SDK v4.4.2+ is recommended. - Call setBeautyIntensity{@link #RTCEngine#setBeautyIntensity} to set the beauty effect intensity. If you do not set the intensity before calling this API, the default intensity will be enabled. The default values for the intensity of each beauty mode are as follows: 0.7 for brightning, 0.8 for smoothing, 0.5 for sharpening, and 0.7 for clarity. - This API is not applicable to screen capturing.

Implementation

Future<int?> enableEffectBeauty(bool enable) async {
  $a() => ($instance as $p_a.RTCEngine).enableEffectBeauty(enable);
  $i() => ($instance as $p_i.ByteRTCEngine).enableEffectBeauty(enable);

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}