MGLiveManager.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // MGFaceManager.h
  3. // MGFaceDetection
  4. //
  5. // Created by megvii on 15/12/22.
  6. // Copyright © 2015Year megvii. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "MGLiveDetectionManager.h"
  10. #import "MGLiveConfig.h"
  11. @interface MGLiveManager : MGLicenseManager
  12. /**
  13. * 活体检测中是否开启录像 必须启动检测器之前设置,启动检测器之后是无法在开启录像的,默认 关闭
  14. */
  15. @property (nonatomic, assign) BOOL detectionWithMovier;
  16. /**
  17. * 活体检测中是否开启录制声音 必须启动检测器之前设置,启动检测器之后是无法在开启的,并且需要开启录像,设置才会有用。默认 关闭,
  18. */
  19. @property (nonatomic, assign) BOOL detectionWithSound;
  20. /**
  21. * 在活体动作非随机的情况下,设置动作序列,默认(1,2,3,4)
  22. */
  23. @property (nonatomic, copy) NSArray <NSNumber*> *actionArray;
  24. /**
  25. * 设置活体动作数量,最多4个,最少1个,默认3个
  26. */
  27. @property (nonatomic, assign) NSUInteger actionCount;
  28. /**
  29. * 每个活动动作的超时时间,单位秒, 默认10秒
  30. */
  31. @property (nonatomic, assign) NSUInteger actionTimeOut;
  32. /**
  33. * 是否动作为随机 默认 YES(随机)
  34. */
  35. @property (nonatomic, assign) BOOL randomAction;
  36. ///**
  37. // * 隐藏navigationbar 默认 yes
  38. // */
  39. //@property (nonatomic, assign) BOOL hideNavigationBar DEPRECATED_ATTRIBUTE;
  40. @property (nonatomic, assign) MGLiveDetectionType detectionType;
  41. /**
  42. * 在只有照镜子模式下的成功回调
  43. */
  44. @property (nonatomic, copy) faceQualitySuccess Qualityfinish;
  45. @property (nonatomic, copy) faceSettingError settingError;
  46. /**
  47. * 启动检测器
  48. *
  49. * @param viewController 开启活体检测器的 viewcontroller
  50. * @param finish 成功的回调
  51. * @param error 失败的回调
  52. *
  53. * @return 实例化该对象
  54. */
  55. - (void)startFaceDecetionViewController:(UIViewController *)viewController
  56. finish:(void(^)(FaceIDData *faceData, UIViewController *vc))finish
  57. error:(void(^)(MGLivenessDetectionFailedType errorType, UIViewController *vc))error;
  58. /**
  59. * 获取 活体检测 SDK版本号
  60. *
  61. * @return sdk 版本号
  62. */
  63. + (NSString *)LiveDetectionVersion;
  64. @end