PlayerView.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //
  2. // PlayerView.h
  3. // VclustersGemini
  4. //
  5. // Created by APPLE on 2019/6/13.
  6. // Copyright © 2019 APPLE. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <GLKit/GLKit.h>
  10. #import "ShowImageView.h"
  11. #import "Masonry.h"
  12. NS_ASSUME_NONNULL_BEGIN
  13. @protocol PlayerViewDelegate <NSObject>
  14. @optional
  15. - (void)useInfoBtnBePressed:(id)sender;
  16. - (void)playerShowImageViewtouchesStr:(NSString *)commondStr;
  17. - (void)mueBtnBePressed:(id)sender;
  18. - (void)homeBtnBePressed:(id)sender;
  19. - (void)backBtnBePressed:(id)sender;
  20. @end
  21. @interface PlayerView : UIView
  22. @property(nonatomic,strong)ShowImageView *showImageView;
  23. /**
  24. * @brief openGL渲染视图
  25. *
  26. */
  27. @property(nonatomic,strong)GLKView *glkshowImageView;
  28. /**
  29. * @brief 悬浮控制按钮
  30. *
  31. *专业模式下隐藏,普通模式下显示。
  32. *注意横竖屏切换时需要注意坐标的转换。
  33. *自动置于屏幕边缘时要考虑灵动岛以及底部滑块的干扰问题,建议置于4个角。
  34. *
  35. */
  36. @property(nonatomic,strong)UIButton *controlBtn;
  37. @property (nonatomic, weak) id<PlayerViewDelegate> delegate;
  38. /**
  39. * @brief 标记是否为横屏
  40. *
  41. */
  42. @property(nonatomic,assign)BOOL isLan;
  43. /**
  44. * @brief 渲染图片
  45. *
  46. * @param ciImage 待渲染的图片数据源
  47. *
  48. */
  49. - (void)glkShowImage:(CIImage *)ciImage;
  50. /**
  51. * @brief 布局渲染视图横屏模式视图
  52. *
  53. * @param w_h_rate 原始图片宽高比
  54. *
  55. * @param isOpenVirtual 是否有打开虚拟按键视图
  56. *
  57. * @param isUsageMode 是否为专业模式
  58. *
  59. */
  60. - (void)setLanMas_makeWithImageRate:(CGFloat)w_h_rate isOpenVirtual:(BOOL)isOpenVirtual isUsageMode:(BOOL)isUsageMode;
  61. /**
  62. * @brief 布局渲染视图竖屏模式视图
  63. *
  64. * @param w_h_rate 原始图片宽高比
  65. *
  66. * @param isOpenVirtual 是否有打开虚拟按键视图
  67. *
  68. * @param isUsageMode 是否为专业模式
  69. *
  70. */
  71. - (void)setPoMas_makeWithImageRate:(CGFloat)w_h_rate isOpenVirtual:(BOOL)isOpenVirtual isUsageMode:(BOOL)isUsageMode;
  72. /**
  73. * @brief 默认布局渲染视图竖屏模式视图宽高比默认为9/16
  74. *
  75. * @param isOpenVirtual 是否有打开虚拟按键视图
  76. *
  77. * @param isUsageMode 是否为专业模式
  78. *
  79. */
  80. - (void)initPoMas_makeWithImageRate:(BOOL)isOpenVirtual isUsageMode:(BOOL)isUsageMode;
  81. @end
  82. NS_ASSUME_NONNULL_END