123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- //
- // PlayerViewController.h
- // VclustersGemini
- //
- // Created by APPLE on 2019/6/13.
- // Copyright © 2019 APPLE. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "BaseViewController.h"
- #import "PlayerView.h"
- #import <RCCloudPhoneSDK/RCAudioPlayer.h>
- #import <RCCloudPhoneSDK/RCCommandChannel.h>
- #import "PlayerControlButTipView.h"
- #import "Const.h"
- #import "playerShowSecretkeyView.h"
- #import "uploadFileDataModel.h"
- #import <RCCloudPhoneSDK/RCAudioPlayer.h>
- #import <RCCloudPhoneSDK/RCRecordManager.h>
- //#import <RCCloudPhoneSDK/RCCommandChannel.h>
- #import <RCCloudPhoneSDK/RCLiveSteamManager.h>
- #import "imageVersionRenewTipView.h"
- #import "backupsFileManager.h"
- #import "photosBackupsTaskModel.h"
- #import "AFNetworkReachabilityManager.h"
- #import "couldPhoneFileListModel.h"
- #import "USBInsertPopView.h"
- #import "cloudPhoneCommonModel.h"
- #import "ComontAlretViewController.h"
- #import "AudioSessionObject.h"
- #import "addLogObject.h"
- #import "ComontAlretType2ViewController.h"
- #import <YCDownloadSession.h>
- @protocol PlayerViewControllerDelegate <NSObject>
- @optional
- - (void)playerViewControllerBackWithPhoneIndex:(NSInteger)phoneIndex;
- - (void)shortcutBackWithPhoneID:(NSInteger)phoneID phoneVaild:(BOOL)phoneVaild; // 快捷方式 云手机已过期
- // 激活码试用云手机续费
- - (void)playerViewControllerActiveCodeRenewBackWithPhoneIndex:(NSInteger)phoneIndex;
- @end
- @class AdvertItemModel;
- @class PlayerControlView;
- @interface PlayerViewController : BaseViewController
- {
- __block NSInteger deviceShareStates;/*设备状态*/
- PlayerControlView *controlView;
- /**
- * @brief 标记是否有返回上一级
- */
- BOOL haveBack;
-
- PlayerView *mPlayerView;
- NSLock *connectLock;
- CIImage *saveCIImage; //保存流,取最后一张图片
- BOOL savelastImageFirst;//客户报 多次启动看到的 保存的最后一帧图没有变
-
- RCMAACPlayer *aacPlayer;
-
- UIView *wattingView;
- USBInsertPopView *curUSBInsertPopV;
-
- /*弹窗提示重启*/
- ComontAlretViewController *logoutAlertVC;
-
- //下载nas相关
- YCDownloadItem *curYCDownloadItem;
- }
- @property(copy,nonatomic)NSString * _Nullable internetVideoPort;
- @property(copy,nonatomic)NSString *ip;
- @property(copy,nonatomic)NSString *deviceId;
- @property(nonatomic,assign)BOOL canControl;/*是否可以控制设备*/
- @property(strong,nonatomic)PlayerControlButTipView *PlayerControlButTipV;
- /**
- * @brief vpnStatus 1:开启 0:关闭
- */
- @property (nonatomic, assign) NSInteger vpnStatus;
- /**
- * @brief internetHttp websocket指令通道连接
- */
- @property (nonatomic, copy) NSString *internetHttp;
- @property (nonatomic, strong) RCLiveSteamManager *liveStreamManager;
- /**是否延迟发送打开app指令*/
- @property (nonatomic, assign) BOOL delayPostOpenAppOrder;
- /**
- * @brief 编码类型是否支持h265
- */
- @property(nonatomic, assign) BOOL isSupportH265Type;
- /**页面跳转-需不需要回收资源*/
- @property (nonatomic, assign) BOOL isNeedRecyclResource;
- @property (nonatomic, assign) BOOL didRecyclResource;
- /**音视频是否连接成功*/
- @property (nonatomic, assign) BOOL isConnectSuccess;
- /**0:初始状态 1:切换云手机超分 2:token失效超分*/
- @property (nonatomic, assign) NSInteger rbdNotification;
- //第一次链接设备 要发送指令信息 实现单点登录
- @property (nonatomic, assign)BOOL didSendfristMsg;
- @property (nonatomic, assign) BOOL isPwdVCShow;//当前是否有密码页面
- //第一次链接设备 要发送指令信息 实现单点登录
- @property (nonatomic, assign)BOOL isLoginAgainType;
- //主动断开链接 后台之类的
- @property (nonatomic, assign)BOOL needToDissconnectType;
- //上传文件用到
- @property (nonatomic, copy) NSString * _Nullable taskUid;
- @property (nonatomic, copy) NSString * _Nullable fileName;
- @property (nonatomic, strong) NSData * _Nullable AllFileData;
- @property (nonatomic, strong) NSMutableArray * _Nullable cutFileDataArr;
- @property (nonatomic, assign) NSInteger indexOfUploadFlie;
- @property (nonatomic, assign) NSInteger cutFileEachPieceSzie;
- @property (nonatomic, strong) uploadFileDataModel *curUploadFileDataMod;
- @property (nonatomic, assign) BOOL isSuspendUploadType;
- @property (nonatomic, assign) long curUploadPostion;//当前上次片的位置
- //备份文件用到
- @property (nonatomic, copy) NSString * _Nullable backupsTaskUid;
- @property (nonatomic, copy) NSString * _Nullable backupsFileName;
- @property (nonatomic, strong) NSData * _Nullable backupsAllFileData;
- @property (nonatomic, strong) NSMutableArray * _Nullable backupsCutFileDataArr;
- @property (nonatomic, assign) NSInteger backupsIndexOfUploadFlie;
- //@property (nonatomic, assign) NSInteger cutFileEachPieceSzie;
- @property (nonatomic, strong) photosBackupsTaskModel *curPhotosBackupsTaskMod;
- @property (nonatomic, assign) long curBackupsPostion;//当前上次片的位置
- //下载缩略图用到
- @property (nonatomic, copy) NSString * _Nullable downloadThumbnailTaskUid;
- @property (nonatomic, strong) couldPhoneFileModel *curDownloadThumbnailModel;
- //下载文件用到
- @property (nonatomic, copy) NSString * _Nullable downloadFileTaskUid;
- @property (nonatomic, strong) couldPhoneFileModel *curDownloadFileModel;
- /**
- * @brief 云手机类型 VIP星动云手机 SVIP星曜云手机 STAR 唔即云手机
- */
- //@property(copy,nonatomic)NSString *buyVipType;
- //最后一帧回调
- @property (nonatomic, copy) void (^block)(void); //saveCIImageAction
- //返回回传 最后一帧
- @property (nonatomic, copy) void (^LastImageblock)(UIImage *image,NSString *deviceId,NSArray *cloudPhones); //saveCIImageAction
- //弹窗广告点击
- @property (nonatomic, copy) void (^AdvertBlock)(AdvertItemModel *model);
- @property (nonatomic, weak) id<PlayerViewControllerDelegate> delegate;
- @property (nonatomic, strong) UIAlertController *alertController;
- typedef void(^sureActionBlock)(UIAlertController *alertView);
- typedef void(^cancelActionBlock)(UIAlertController *alertController);
- typedef void(^completiongeBlock) (int stats , NSString *backData);
- /*更新云手机分辨率*/
- - (void)updatePhoneReslotings;
- - (void)addLoadingWithTipsView:(NSString *)tipsStr;
- -(void)showNewIndicator;
- -(void)removeNewIndicator;
- - (void)removeLoadingWithTipsView;
- -(void)initAlertWithTitle:(NSString *_Nullable)title message:(NSString *)message sureActionBlock:(sureActionBlock)sureActionBlock;
- - (void)saveCIImageAction:(NSString *)deviceId;
- - (void)toStopRecoder;
- - (void)toStopAudioRecoder;
- - (void)removeNSNotification;
- - (void)addNSNotification;
- - (void)initData;
- - (BOOL)initVideoServer;
- - (void)connectVideoServer;
- - (NSArray *)getAllIvar:(id)object;
- - (void)updatemPlayerView;
- - (void)tryAgain;
- - (void)requestIFrame;
- - (void)disconnectVideoServer;
- - (void)send_data:(NSString *)dataStr;
- - (void)toUpdateDeviceUse;
- - (void)phoneSelectWithIndex:(NSInteger)index;
- - (void)exitPlayerView;/*退出推拉流*/
- /**清除试用广告*/
- - (void)extensionClearTrialAD;
- - (void)showYearCardNoTime;
- - (void)showChangPhoneTipsWithPhone:(NSInteger)index;
- #pragma mark - 提示框
- - (void)showAlertWithTitle:(NSAttributedString*_Nullable)atbTitle
- message:(NSAttributedString*_Nullable)atbmessage
- tilteAlignment:(NSTextAlignment)tilteAlignment
- messageAlignment:(NSTextAlignment)messageAlignment
- sureAction:(UIAlertAction*_Nullable)sureAction
- cancelAction:(UIAlertAction*_Nullable)cancelAction;
- #pragma mark - 设置是否可以播放声音和动画
- -(void)setShowImgAndVoiceTypeFun:(bool)isCan;
- #pragma mark - 显示秘钥 后续忘记密码要
- -(void)showSecretkeyFun;
- - (void)recyclResource;
- @end
|