注:sdk 6.3.0 之后支持 高级美颜功能
//美颜相关 api
- (instancetype)initWithBeautyConfig:(VHPublishConfig*)config handleError:(void(^)(NSError *error))handle;//视频直播
- (void)useBeautifyModule:(id<IVHBeautifyModule>)module HandleError:(void(^)(NSError *error))handle;//互动直播(横竖屏需传方向参数)
//美颜demoUI 建议自己按照自己需求实现
// libUIModel.a UIModel/BeautyView目录下实现pod 'VHLiveSDK' ,’6.3.0’
pod 'VHLiveSDK_Interactive', ‘6.3.0’
pod 'VHBeautifyKit','1.0.5',:subspecs => ['FURender']- (void)enableBeautify:(BOOL)enable
[self.beautyKit enableBeautify:YES/NO];//开启或关闭
注意:
//创建互动直播需要传方向参数,横向传2,竖屏传3
[[self.beautKit currentModule] setCaptureImageOrientation:(self.interfaceOrientation == UIInterfaceOrientationLandscapeRight)?2:3];直播美颜 error为空可使用美颜
[[VHallLivePublish alloc] initWithBeautyConfig:config handleError:^(NSError *error) {
self.isBeauty = (error!=nil)?NO:YES;//是否可以使用美颜功能
}];
互动美颜 error为空可使用美颜
[_localRenderView useBeautifyModule:[self.beautKit currentModule]
HandleError:^(NSError * _Nonnull error) {
self.isEnableBeauty = (error!=nil)?NO:YES;//是否可以使用美颜
}];VHBFURender/VHBeautifyEffectList.h 或 《微吼云美颜附录表》