PlayerViewController.h 6.1 KB

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