TCVideoPreview.h 965 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // TCVideoPreview.h
  3. // TCLVBIMDemo
  4. //
  5. // Created by xiang zhang on 2017/4/18.
  6. // Copyright © 2017年 tencent. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <TXLiteAVSDK_Professional/TXVideoEditerListener.h>
  10. @protocol TXVideoPreviewListener;
  11. @protocol TCVideoPreviewDelegate <NSObject>
  12. - (void)onVideoPlay;
  13. - (void)onVideoPause;
  14. - (void)onVideoResume;
  15. - (void)onVideoPlayProgress:(CGFloat)time;
  16. - (void)onVideoPlayFinished;
  17. @optional
  18. - (void)onVideoEnterBackground;
  19. - (void)onVideoWillEnterForeground;
  20. @end
  21. @interface TCVideoPreview : UIView<TXVideoPreviewListener>
  22. @property(nonatomic,weak) id<TCVideoPreviewDelegate> delegate;
  23. @property(nonatomic,strong) UIView *renderView;
  24. @property(nonatomic, readonly, assign) BOOL isPlaying;
  25. - (instancetype)initWithFrame:(CGRect)frame coverImage:(UIImage *)image;
  26. - (void)setPlayBtnHidden:(BOOL)isHidden;
  27. - (void)setPlayBtn:(BOOL)videoIsPlay;
  28. - (void)playVideo;
  29. - (void)removeNotification;
  30. @end