PlayerViewController.h 5.9 KB

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