UGCKitPlayerView.h 899 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2019 Tencent. All rights reserved.
  2. #import <UIKit/UIKit.h>
  3. #import "UGCKitTheme.h"
  4. @protocol VideoPreviewDelegate <NSObject>
  5. @optional
  6. - (void)onVideoPlay;
  7. - (void)onVideoPause;
  8. - (void)onVideoResume;
  9. - (void)onVideoPlayProgress:(CGFloat)time;
  10. - (void)onVideoPlayFinished;
  11. @optional
  12. - (void)onVideoEnterBackground;
  13. - (void)onVideoWillEnterForeground;
  14. @end
  15. @interface UGCKitPlayerView : UIView
  16. @property(nonatomic,weak) id<VideoPreviewDelegate> delegate;
  17. @property(nonatomic,strong) UIView *renderView;
  18. @property(nonatomic, readonly, assign) BOOL isPlaying;
  19. - (instancetype)initWithFrame:(CGRect)frame coverImage:(UIImage *)image theme:(UGCKitTheme *)theme;
  20. - (void)setPlayBtnHidden:(BOOL)isHidden;
  21. - (void)setPlayBtn:(BOOL)videoIsPlay;
  22. - (void)playVideo;
  23. - (void)removeNotification;
  24. - (void)stopObservingAudioNotification;
  25. - (void)startObservingAudioNotification;
  26. @end