PlayerViewController.h 8.0 KB

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