NEPreviewRoomRtcController class Null safety
- Inheritance
-
- Object
- NERoomBaseController
- NERoomBaseRtcController
- NEPreviewRoomRtcController
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-only, inherited
- isSupported → bool
-
功能是否支持
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
addAttachment(
String name, dynamic attachment) → void -
inherited
-
addBeautyFilter(
String path) → Future< VoidResult> -
调用 addBeautyFilter 添加滤镜效果,并通过 setBeautyFilterLevel 设置滤镜强度。
滤镜效果可以和全局美颜效果互相叠加,但是不支持叠加多个滤镜。需要更换滤镜时,重复调用此接口使用新的滤镜资源即可。
添加滤镜时,需要通过 path 指定滤镜模型所在路径,支持 SD 卡上的绝对路径,或 asset 目录下的相对路径。
参数 level 用于指定滤镜强度,取值范围为
0,1
,默认为 0.5。取值越大,滤镜越明显,开发者可以根据业务需要自定义设置滤镜强度。 @param path 滤镜资源或模型所在路径。支持 SD 卡上的绝对路径,或 asset 目录下的相对路径。 SD卡:"/storage/emulated/0/Android/data/com.xxx/files/filter_portrait/filter_style_FN1"。 asset: "2D/bunny"。 @return callback 0: 方法调用成功。其他: 方法调用失败。 /inherited -
addBeautySticker(
String path) → Future< VoidResult> -
添加贴纸效果。
此接口用于加载贴纸资源,添加对应的贴纸效果。需要更换贴纸时,重复调用此接口使用新的贴纸资源即可。
使用滤镜、贴纸和美妆等自定义美颜效果之前,需要先准备好对应的美颜资源或模型。
贴纸效果可以和全局美颜、滤镜、美妆等效果互相叠加,但是不支持叠加多个贴纸。
@param path 贴纸资源所在路径。支持 SD 卡上的绝对路径,或 asset 目录下的相对路径。
SD卡:"/storage/emulated/0/Android/data/com.xxx/files/filter_portrait/filter_style_FN1"
asset: "2D/bunny"
@return 0: 方法调用成功。其他: 方法调用失败。
/
inherited
-
clearAttachments(
) → void -
inherited
-
enableBeauty(
bool isOpenBeauty) → Future< VoidResult> -
打开美颜功能,leave channel不会重置
接口目前主要用在需要临时关闭美颜,比如对比美颜前后的效果时才需要用到
@param isOpenBeauty true为打开美颜功能,false为关闭
@return callback 0: 方法调用成功。其他: 方法调用失败。
/
inherited
-
enableVirtualBackground(
bool enabled, NERoomVirtualBackgroundSource backgroundSource) → Future< VoidResult> -
inherited
-
getAttachment(
String name) → dynamic -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
removeAttachment(
String name) → void -
inherited
-
removeBeautyFilter(
) → Future< VoidResult> -
不需要使用滤镜效果时,调用 removeBeautyFilter 移除滤镜。
/
inherited
-
removeBeautySticker(
) → Future< VoidResult> -
取消贴纸效果。
@return 0: 方法调用成功。其他: 方法调用失败。
inherited
-
setBeautyEffect(
NERoomBeautyEffectType beautyType, double level) → Future< VoidResult> -
https://doc.yunxin.163.com/docs/jcyOTA0ODM/DQ1OTY0NjI?platformId=50002#全局美颜效果
调用 setBeautyEffect 开启指定美颜效果,并设置美颜强度。
@param beautyType 参数用于指定美颜效果。目前支持美白、磨皮等美颜效果,具体枚举值请参考下表。 NERoomBeautyEffectType
@param level 参数用于指定美颜强度。取值范围为
0,1
,各种美颜效果的默认值不同。取值越大,美颜强度越大,开发者可以根据业务需要自定义设置美颜强度。 @return callback 0: 方法调用成功。其他: 方法调用失败。 /inherited -
setBeautyFilterLevel(
double level) → Future< VoidResult> -
设置滤镜强度。
取值越大,滤镜强度越大,开发者可以根据业务需求自定义设置滤镜强度。
滤镜强度设置实时生效,更换滤镜后滤镜强度不变,如需调整,可以再次调用此接口重新设置滤镜强度。
@param level 滤镜强度。取值范围为
0 - 1
,默认值为 0.5 @return 0: 方法调用成功。其他: 方法调用失败。 /inherited -
startBeauty(
) → Future< VoidResult> -
example: https://doc.yunxin.163.com/docs/jcyOTA0ODM/DQ1OTY0NjI?platformId=50002#示例代码
启用美颜模块。
在开启视频之前,调用 startBeauty 开启美颜功能模块。开启美颜功能之后才能使用全局美颜、滤镜等美颜效果。
调用此接口后,开启美颜引擎。如果后续不再需要使用美颜功能,可以调用 stopBeauty 结束美颜功能模块,销毁美颜引擎并释放资源。
开启美颜功能模块后,默认开启全局美颜效果,您也可以通过 setBeautyEffect 或其他滤镜、贴纸相关接口设置美颜、滤镜等效果。
@return callback 0: 方法调用成功。其他: 方法调用失败。
/
inherited
-
startPreview(
) → Future< VoidResult> - 开启预览
-
stopBeauty(
) → Future< VoidResult> -
结束美颜功能模块。
如果后续不再需要使用美颜功能,可以调用 stopBeauty 结束美颜功能模块,SDK 会自动销毁美颜引擎并释放资源。
/
inherited
-
stopPreview(
) → Future< VoidResult> - 关闭预览
-
switchCamera(
) → Future< VoidResult> -
切换摄像头
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited