setBeautyIntensity method
- required EffectBeautyMode beautyMode,
- required float intensity,
@detail api
@hiddensdk(audiosdk)
@author wangjunlin.3182
@brief Sets the beauty effect intensity.
@param beautyMode Basic beauty effect. See EffectBeautyMode{@link #EffectBeautyMode}.
@param intensity Beauty effect intensity in range of 0,1. When you set it to 0, the beauty effect will be turned off.
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.
@return
- 0: Success.
- –2: intensity is out of range.
- –1001: This API is not available for your current RTC SDK.
- <0: Failure. Effect SDK internal error. For specific error code, see error codes.
@note
- If you call this API before calling enableEffectBeauty{@link #RTCEngine#enableEffectBeauty}, the default settings of beauty effect intensity will adjust accordingly.
- If you destroy the engine, the beauty effect settings will be invalid.
Implementation
Future<int?> setBeautyIntensity(
{required EffectBeautyMode beautyMode, required float intensity}) async {
$a() => ($instance as $p_a.RTCEngine).setBeautyIntensity(
t_EffectBeautyMode.code_to_android(beautyMode), intensity);
$i() => ($instance as $p_i.ByteRTCEngine).setBeautyIntensity(
t_EffectBeautyMode.code_to_ios(beautyMode), intensity);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}