PlayerViewController.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. //
  2. // PlayerViewController.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 "BaseViewController.h"
  10. #import "CloudPhoneModel.h"
  11. #import "PlayerView.h"
  12. #import <RCCloudPhoneSDK/RCAudioPlayer.h>
  13. #import <RCCloudPhoneSDK/RCCommandChannel.h>
  14. @protocol PlayerViewControllerDelegate <NSObject>
  15. @optional
  16. - (void)playerViewControllerBackWithPhoneIndex:(NSInteger)phoneIndex;
  17. - (void)shortcutBackWithPhoneID:(NSInteger)phoneID phoneVaild:(BOOL)phoneVaild; // 快捷方式 云手机已过期
  18. // 激活码试用云手机续费
  19. - (void)playerViewControllerActiveCodeRenewBackWithPhoneIndex:(NSInteger)phoneIndex;
  20. @end
  21. @class AdvertItemModel;
  22. @class PlayerControlView;
  23. @interface PlayerViewController : BaseViewController
  24. {
  25. __block NSInteger deviceShareStates;/*设备状态*/
  26. PlayerControlView *controlView;
  27. /**
  28. * @brief 标记是否有返回上一级
  29. */
  30. BOOL haveBack;
  31. PlayerView *mPlayerView;
  32. NSLock *connectLock;
  33. CIImage *saveCIImage; //保存流,取最后一张图片
  34. RCMAACPlayer *aacPlayer;
  35. UIView *wattingView;
  36. }
  37. @property(copy,nonatomic)NSString * _Nullable internetVideoPort;
  38. @property(copy,nonatomic)NSString *ip;
  39. @property(copy,nonatomic)NSString *deviceId;
  40. @property(nonatomic,assign)BOOL canControl;/*是否可以控制设备*/
  41. /**
  42. * @brief vpnStatus 1:开启 0:关闭
  43. */
  44. @property (nonatomic, assign) NSInteger vpnStatus;
  45. /**
  46. * @brief internetHttp websocket指令通道连接
  47. */
  48. @property (nonatomic, copy) NSString *internetHttp;
  49. @property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
  50. @property (nonatomic, strong) RCCommandChannelManager *businessCommandChannelManager;//业务通道
  51. /**
  52. * @brief 当前设备所在位置
  53. */
  54. @property(nonatomic, assign) NSInteger phoneIndex;
  55. /**
  56. * @brief 当前设备
  57. */
  58. @property(nonatomic, strong) CloudPhoneModel * _Nullable deviceModel;
  59. @property(nonatomic, strong) CloudPhoneModel * _Nonnull chaofenDeviceModel;//超分设备Model
  60. /**是否延迟发送打开app指令*/
  61. @property (nonatomic, assign) BOOL delayPostOpenAppOrder;
  62. /**
  63. * @brief 编码类型是否支持h265
  64. */
  65. @property(nonatomic, assign) BOOL isSupportH265Type;
  66. /**页面跳转-需不需要回收资源*/
  67. @property (nonatomic, assign) BOOL isNeedRecyclResource;
  68. /**音视频是否连接成功*/
  69. @property (nonatomic, assign) BOOL isConnectSuccess;
  70. /**0:初始状态 1:切换云手机超分 2:token失效超分*/
  71. @property (nonatomic, assign) NSInteger rbdNotification;
  72. /**
  73. * @brief 云手机类型 VIP星动云手机 SVIP星曜云手机 STAR 唔即云手机
  74. */
  75. @property(copy,nonatomic)NSString *buyVipType;
  76. //最后一帧回调
  77. @property (nonatomic, copy) void (^block)(void); //saveCIImageAction
  78. //返回回传 最后一帧
  79. @property (nonatomic, copy) void (^LastImageblock)(UIImage *image,NSString *deviceId,NSArray *cloudPhones); //saveCIImageAction
  80. //弹窗广告点击
  81. @property (nonatomic, copy) void (^AdvertBlock)(AdvertItemModel *model);
  82. @property (nonatomic, weak) id<PlayerViewControllerDelegate> delegate;
  83. @property (nonatomic, strong) UIAlertController *alertController;
  84. typedef void(^sureActionBlock)(UIAlertController *alertView);
  85. typedef void(^cancelActionBlock)(UIAlertController *alertController);
  86. typedef void(^completiongeBlock) (int stats , NSString *backData);
  87. /*更新云手机分辨率*/
  88. - (void)updatePhoneReslotings;
  89. - (void)addLoadingWithTipsView:(NSString *)tipsStr;
  90. -(void)showNewIndicator;
  91. -(void)removeNewIndicator;
  92. - (void)removeLoadingWithTipsView;
  93. -(void)initAlertWithTitle:(NSString *_Nullable)title message:(NSString *)message sureActionBlock:(sureActionBlock)sureActionBlock;
  94. - (void)saveCIImageAction:(NSString *)deviceId;
  95. - (void)toStopRecoder;
  96. - (void)toStopAudioRecoder;
  97. - (void)removeNSNotification;
  98. - (void)addNSNotification;
  99. - (void)initData;
  100. - (BOOL)initVideoServer;
  101. - (void)connectVideoServer;
  102. - (NSArray *)getAllIvar:(id)object;
  103. - (void)updatemPlayerView;
  104. - (void)tryAgain;
  105. - (void)requestIFrame;
  106. - (void)disconnectVideoServer;
  107. - (void)send_data:(NSString *)dataStr;
  108. - (void)toUpdateDeviceUse;
  109. - (void)phoneSelectWithIndex:(NSInteger)index;
  110. - (void)exitPlayerView;/*退出推拉流*/
  111. /**清除试用广告*/
  112. - (void)extensionClearTrialAD;
  113. - (void)showYearCardNoTime;
  114. - (void)offLineDevice:(CloudPhoneModel *)model;
  115. - (void)showChangPhoneTipsWithPhone:(NSInteger)index;
  116. #pragma mark - 提示框
  117. - (void)showAlertWithTitle:(NSAttributedString*_Nullable)atbTitle
  118. message:(NSAttributedString*_Nullable)atbmessage
  119. tilteAlignment:(NSTextAlignment)tilteAlignment
  120. messageAlignment:(NSTextAlignment)messageAlignment
  121. sureAction:(UIAlertAction*_Nullable)sureAction
  122. cancelAction:(UIAlertAction*_Nullable)cancelAction;
  123. - (void)openbusinessCommandChannelManagerrc_openURL;
  124. - (void)opencommandChannelManagerrc_openURL;
  125. @end