JXVideoPlayerVC.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #import <UIKit/UIKit.h>
  2. #import <AVFoundation/AVFoundation.h>
  3. #import "JXWaitView.h"
  4. @class AVPlayer;
  5. @class AVPlayerItem;
  6. @class MyPlayerLayerView;
  7. @class JXImageView;
  8. @class AppDelegate;
  9. @class JXLabel;
  10. @interface JXVideoPlayerVC : UIViewController<UITextFieldDelegate,UIGestureRecognizerDelegate> {
  11. NSString *kTracksKey;
  12. NSString *kPlayableKey;
  13. NSString *kStatusKey;
  14. NSString *kRateKey;
  15. NSString *kCurrentItemKey;
  16. NSString *kDurationKey;
  17. NSString *kTimedMetadataKey;
  18. AVPlayer *_player;
  19. AVPlayerItem * mPlayerItem;
  20. AVURLAsset *_asset;
  21. MyPlayerLayerView *playerLayerView;
  22. UISlider *movieTimeControl;
  23. UILabel* isPlayingAdText;
  24. BOOL _isIniting;
  25. BOOL isSeeking;
  26. BOOL _isNeed90;
  27. BOOL seekToZeroBeforePlay;
  28. float restoreAfterScrubbingRate;
  29. id timeObserver;
  30. NSTimer* timerShowPeak;
  31. NSArray *adList;
  32. JXWaitView* _wait;
  33. UITapGestureRecognizer* _singleTap;
  34. UIProgressView *_progressView;
  35. CGFloat _curProFloat; // 当前进度条总进度 progress 值
  36. CGFloat _n; // 进度条走了多少
  37. }
  38. @property (nonatomic, strong,setter=setPauseBtn:) UIButton* pauseButton;
  39. @property (nonatomic, strong) UISlider *movieTimeControl;
  40. @property (nonatomic, strong) MyPlayerLayerView *playerLayerView;
  41. @property (nonatomic, strong) JXLabel *playStatus;
  42. @property (nonatomic, strong) UILabel* timeCur;
  43. @property (nonatomic, strong) UILabel* timeEnd;
  44. @property (nonatomic, strong) UIView* parent;
  45. @property (nonatomic, strong) NSString* filepath;
  46. @property (nonatomic, strong) NSURL *movieURL;
  47. @property (nonatomic, weak) id delegate;
  48. @property (assign) SEL didClick;
  49. @property (assign) SEL didPlayNext;
  50. @property (assign) SEL didOpen;
  51. @property (assign) BOOL isVideo;
  52. @property (assign) BOOL isPause;
  53. @property (nonatomic,assign,setter=setIsOpened:)BOOL isOpened;
  54. @property (assign) BOOL isUserPause;
  55. @property (assign) BOOL isFullScreen;
  56. @property (assign) long long timeLen;
  57. -(void)open:(NSString*)filePath;
  58. -(void)prepareToPlayItemWithURL:(NSURL *)newMovieURL;
  59. - (IBAction)beginScrubbing:(id)sender;
  60. - (IBAction)scrub:(id)sender;
  61. - (IBAction)endScrubbing:(id)sender;
  62. - (void)stop;
  63. - (void)play:(id)sender;
  64. - (void)pause:(id)sender;
  65. - (BOOL)isPlaying;
  66. - (void)setSliderHidden:(BOOL)b;
  67. - (void)set90;
  68. -(void)setFrame:(CGRect)frame;
  69. @end