PlayerViewController.h 7.1 KB

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