YBIBVideoView.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // YBIBVideoView.h
  3. // YBImageBrowserDemo
  4. //
  5. // Created by 波儿菜 on 2019/7/11.
  6. // Copyright © 2019 杨波. All rights reserved.
  7. //
  8. #import "YBIBVideoActionBar.h"
  9. #import "YBIBVideoTopBar.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @class YBIBVideoView;
  12. @protocol YBIBVideoViewDelegate <NSObject>
  13. @required
  14. - (BOOL)yb_isFreezingForVideoView:(YBIBVideoView *)view;
  15. - (void)yb_preparePlayForVideoView:(YBIBVideoView *)view;
  16. - (void)yb_startPlayForVideoView:(YBIBVideoView *)view;
  17. - (void)yb_finishPlayForVideoView:(YBIBVideoView *)view;
  18. - (void)yb_didPlayToEndTimeForVideoView:(YBIBVideoView *)view;
  19. - (void)yb_playFailedForVideoView:(YBIBVideoView *)view;
  20. - (void)yb_respondsToTapGestureForVideoView:(YBIBVideoView *)view;
  21. - (void)yb_cancelledForVideoView:(YBIBVideoView *)view;
  22. - (CGSize)yb_containerSizeForVideoView:(YBIBVideoView *)view;
  23. - (void)yb_autoPlayCountChanged:(NSUInteger)count;
  24. @end
  25. @interface YBIBVideoView : UIView
  26. @property (nonatomic, strong) UIImageView *thumbImageView;
  27. @property (nonatomic, weak) id<YBIBVideoViewDelegate> delegate;
  28. - (void)updateLayoutWithExpectOrientation:(UIDeviceOrientation)orientation containerSize:(CGSize)containerSize;
  29. @property (nonatomic, strong, nullable) AVAsset *asset;
  30. @property (nonatomic, assign, readonly, getter=isPlaying) BOOL playing;
  31. @property (nonatomic, assign, readonly, getter=isPlayFailed) BOOL playFailed;
  32. @property (nonatomic, assign, readonly, getter=isPreparingPlay) BOOL preparingPlay;
  33. @property (nonatomic, strong, readonly) UITapGestureRecognizer *tapGesture;
  34. - (void)reset;
  35. - (void)hideToolBar:(BOOL)hide;
  36. - (void)hidePlayButton;
  37. - (void)preparPlay;
  38. @property (nonatomic, assign) BOOL needAutoPlay;
  39. @property (nonatomic, assign) NSUInteger autoPlayCount;
  40. @property (nonatomic, strong, readonly) YBIBVideoTopBar *topBar;
  41. @property (nonatomic, strong, readonly) YBIBVideoActionBar *actionBar;
  42. @end
  43. NS_ASSUME_NONNULL_END