ZFLandScapeControlView2.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. //
  2. // ZFLandScapeControlView.h
  3. // ZFPlayer
  4. //
  5. // Copyright (c) 2016年 任子丰 ( http://github.com/renzifeng )
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining a copy
  8. // of this software and associated documentation files (the "Software"), to deal
  9. // in the Software without restriction, including without limitation the rights
  10. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. // copies of the Software, and to permit persons to whom the Software is
  12. // furnished to do so, subject to the following conditions:
  13. //
  14. // The above copyright notice and this permission notice shall be included in
  15. // all copies or substantial portions of the Software.
  16. //
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  23. // THE SOFTWARE.
  24. #import <UIKit/UIKit.h>
  25. #import "ZFSliderView.h"
  26. #if __has_include(<ZFPlayer/ZFPlayerController.h>)
  27. #import <ZFPlayer/ZFPlayerController.h>
  28. #else
  29. #import "ZFPlayerController.h"
  30. #endif
  31. NS_ASSUME_NONNULL_BEGIN
  32. @interface ZFLandScapeControlView2 : UIView
  33. /// 清晰度
  34. @property (nonatomic, strong) NSArray* pArr;
  35. @property (nonatomic, assign) NSInteger defaultPIndex;
  36. /// 顶部工具栏
  37. @property (nonatomic, strong, readonly) UIView *topToolView;
  38. /// 返回按钮
  39. @property (nonatomic, strong, readonly) UIButton *backBtn;
  40. /// 标题
  41. @property (nonatomic, strong, readonly) UILabel *titleLabel;
  42. /// 底部工具栏
  43. @property (nonatomic, strong, readonly) UIView *bottomToolView;
  44. /// 播放或暂停按钮
  45. @property (nonatomic, strong, readonly) UIButton *playOrPauseBtn;
  46. /// 播放的当前时间
  47. @property (nonatomic, strong, readonly) UILabel *currentTimeLabel;
  48. /// 滑杆
  49. @property (nonatomic, strong, readonly) ZFSliderView *slider;
  50. /// 视频总时间
  51. @property (nonatomic, strong, readonly) UILabel *totalTimeLabel;
  52. /// 锁定屏幕按钮
  53. @property (nonatomic, strong, readonly) UIButton *lockBtn;
  54. /// 横屏时候是否显示自定义状态栏(iOS13+),默认 NO.
  55. @property (nonatomic, assign) BOOL showCustomStatusBar;
  56. /// 播放器
  57. @property (nonatomic, weak) ZFPlayerController *player;
  58. /// slider滑动中
  59. @property (nonatomic, copy, nullable) void(^sliderValueChanging)(CGFloat value,BOOL forward);
  60. /// slider滑动结束
  61. @property (nonatomic, copy, nullable) void(^sliderValueChanged)(CGFloat value);
  62. /// 返回按钮点击回调
  63. @property (nonatomic, copy) void(^backBtnClickCallback)(void);
  64. /// 倍速按钮点击回调
  65. @property (nonatomic, copy) void(^speedBtnClickCallback)(CGFloat sp);
  66. /// 清晰度按钮点击回调
  67. @property (nonatomic, copy) void(^pBtnClickCallback)(NSInteger index,int currentSecond);
  68. /// 下一集
  69. @property (nonatomic, copy) void(^nextBtnClickCallback)(void);
  70. /// 如果是暂停状态,seek完是否播放,默认YES
  71. @property (nonatomic, assign) BOOL seekToPlay;
  72. /// 全屏模式
  73. @property (nonatomic, assign) ZFFullScreenMode fullScreenMode;
  74. /// 重置控制层
  75. - (void)resetControlView;
  76. /// 显示控制层
  77. - (void)showControlView;
  78. /// 隐藏控制层
  79. - (void)hideControlView;
  80. /// 隐藏二级控制层
  81. - (void)hideControlDetailView;
  82. /// 设置播放时间
  83. - (void)videoPlayer:(ZFPlayerController *)videoPlayer currentTime:(NSTimeInterval)currentTime totalTime:(NSTimeInterval)totalTime;
  84. /// 设置缓冲时间
  85. - (void)videoPlayer:(ZFPlayerController *)videoPlayer bufferTime:(NSTimeInterval)bufferTime;
  86. /// 是否响应该手势
  87. - (BOOL)shouldResponseGestureWithPoint:(CGPoint)point withGestureType:(ZFPlayerGestureType)type touch:(nonnull UITouch *)touch;
  88. /// 视频尺寸改变
  89. - (void)videoPlayer:(ZFPlayerController *)videoPlayer presentationSizeChanged:(CGSize)size;
  90. /// 视频view已经旋转
  91. - (void)videoPlayer:(ZFPlayerController *)videoPlayer orientationWillChange:(ZFOrientationObserver *)observer;
  92. /// 标题和全屏模式
  93. - (void)showTitle:(NSString *_Nullable)title fullScreenMode:(ZFFullScreenMode)fullScreenMode;
  94. /// 根据当前播放状态取反
  95. - (void)playOrPause;
  96. /// 播放按钮状态
  97. - (void)playBtnSelectedState:(BOOL)selected;
  98. /// 调节播放进度slider和当前时间更新
  99. - (void)sliderValueChanged:(CGFloat)value currentTimeString:(NSString *)timeString;
  100. /// 滑杆结束滑动
  101. - (void)sliderChangeEnded;
  102. @property (nonatomic, strong) UIImageView *changeStateImageView;
  103. @end
  104. @interface pcell1 : UITableViewCell
  105. @property(nonatomic,assign)NSInteger index;
  106. @property(nonatomic,assign)BOOL isSel;
  107. @property(nonatomic,assign)BOOL isNeedVip;
  108. @property(nonatomic,strong)NSArray *strArr;
  109. + (instancetype)cellWithTableView:(UITableView *)tableView;
  110. @property (nonatomic, strong) void(^tapBlock)(NSInteger index);
  111. @end
  112. @interface pcell2 : UITableViewCell
  113. @property(nonatomic,assign)NSInteger index;
  114. @property(nonatomic,assign)BOOL isSel;
  115. @property(nonatomic,strong)NSString *str;
  116. + (instancetype)cellWithTableView:(UITableView *)tableView;
  117. @property (nonatomic, strong) void(^tapBlock)(NSInteger index);
  118. @end
  119. NS_ASSUME_NONNULL_END