UGCKitRecordControlView.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Copyright (c) 2019 Tencent. All rights reserved.
  2. #import "UGCKitSlideButton.h"
  3. #import "UGCKitTheme.h"
  4. #import "SDKHeader.h"
  5. #import "UGCKitVideoRecordProcessView.h"
  6. #import "UGCKitSlideOptionControl.h"
  7. NS_ASSUME_NONNULL_BEGIN
  8. typedef NS_ENUM(NSInteger,SpeedMode)
  9. {
  10. SpeedMode_VerySlow,
  11. SpeedMode_Slow,
  12. SpeedMode_Standard,
  13. SpeedMode_Quick,
  14. SpeedMode_VeryQuick,
  15. };
  16. typedef NS_ENUM(NSInteger, UGCKitRecordButtonStyle) {
  17. UGCKitRecordButtonStylePhoto, ///< 拍照
  18. UGCKitRecordButtonStyleRecord, ///< 录制
  19. UGCKitRecordButtonStylePause, ///< 暂停
  20. };
  21. @interface UGCKitRecordControlView : UIView
  22. @property (assign, nonatomic) NSTimeInterval minDuration;
  23. @property (assign, nonatomic) NSTimeInterval maxDuration;
  24. @property (assign, nonatomic) TXVideoAspectRatio videoRatio;
  25. @property (assign, nonatomic) BOOL isFrontCamera;
  26. @property (assign, nonatomic) BOOL musicButtonEnabled;
  27. @property (assign, nonatomic) BOOL speedControlEnabled;
  28. @property (assign, nonatomic) BOOL photoModeEnabled;
  29. @property (assign, nonatomic) BOOL countDownModeEnabled;
  30. @property (assign, nonatomic) BOOL torchOn;
  31. @property (assign, nonatomic) UGCKitRecordButtonStyle recordButtonStyle;
  32. @property (strong, nonatomic) UGCKitSlideButton *btnRatioGroup;
  33. @property (strong, nonatomic) UGCKitTheme *theme;
  34. @property (strong, nonatomic) UIButton *btnBeauty;
  35. @property (strong, nonatomic) UIButton *btnMusic;
  36. @property (strong, nonatomic) UIButton *btnAudioEffect;
  37. @property (strong, nonatomic) UIButton *btnCountDown;
  38. @property (strong, nonatomic) UIView *bottomMask;
  39. @property (strong, nonatomic) UIButton *btnStartRecord;
  40. @property (strong, nonatomic) UIButton *btnFlash;
  41. @property (strong, nonatomic) UIButton *btnCamera;
  42. @property (strong, nonatomic) UIButton *btnDelete;
  43. @property (strong, nonatomic) UGCKitVideoRecordProcessView *progressView;
  44. @property (strong, nonatomic) UILabel *recordTimeLabel;
  45. @property (assign, nonatomic) SpeedMode speedMode;
  46. @property (assign, nonatomic) BOOL controlButtonsHidden;
  47. @property (strong, nonatomic) UIView *speedView;
  48. @property (strong, nonatomic) NSArray<UIButton*> *speedBtnList;
  49. @property (strong, nonatomic) UIButton *speedChangeBtn;
  50. @property (strong, nonatomic) UGCKitSlideOptionControl *recordButtonSwitchControl;
  51. - (instancetype)initWithFrame:(CGRect)frame minDuration:(NSTimeInterval)minDuration maxDuration:(NSTimeInterval)maxDuration;
  52. - (void)setMinDuration:(NSTimeInterval)minDuration maxDuration:(NSTimeInterval)maxDuration;
  53. /// 设置各组件开关后必须调用此方法生成View
  54. - (void)setupViews;
  55. - (void)setSelectedSpeed:(SpeedMode)tag;
  56. @end
  57. NS_ASSUME_NONNULL_END