123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- //
- // PlayerViewController.h
- // VclustersGemini
- //
- // Created by APPLE on 2019/6/13.
- // Copyright © 2019 APPLE. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "BaseViewController.h"
- #import "CloudPhoneModel.h"
- #import "PlayerView.h"
- #import <RCCloudPhoneSDK/RCAudioPlayer.h>
- #import <RCCloudPhoneSDK/RCCommandChannel.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; //保存流,取最后一张图片
- RCMAACPlayer *aacPlayer;
-
- UIView *wattingView;
- }
- @property(copy,nonatomic)NSString * _Nullable internetVideoPort;
- @property(copy,nonatomic)NSString *ip;
- @property(copy,nonatomic)NSString *deviceId;
- @property(nonatomic,assign)BOOL canControl;/*是否可以控制设备*/
- /**
- * @brief vpnStatus 1:开启 0:关闭
- */
- @property (nonatomic, assign) NSInteger vpnStatus;
- /**
- * @brief internetHttp websocket指令通道连接
- */
- @property (nonatomic, copy) NSString *internetHttp;
- @property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
- @property (nonatomic, strong) RCCommandChannelManager *businessCommandChannelManager;//业务通道
- /**
- * @brief 当前设备所在位置
- */
- @property(nonatomic, assign) NSInteger phoneIndex;
- /**
- * @brief 当前设备
- */
- @property(nonatomic, strong) CloudPhoneModel * _Nullable deviceModel;
- @property(nonatomic, strong) CloudPhoneModel * _Nonnull chaofenDeviceModel;//超分设备Model
- /**是否延迟发送打开app指令*/
- @property (nonatomic, assign) BOOL delayPostOpenAppOrder;
- /**
- * @brief 编码类型是否支持h265
- */
- @property(nonatomic, assign) BOOL isSupportH265Type;
- /**页面跳转-需不需要回收资源*/
- @property (nonatomic, assign) BOOL isNeedRecyclResource;
- /**音视频是否连接成功*/
- @property (nonatomic, assign) BOOL isConnectSuccess;
- /**0:初始状态 1:切换云手机超分 2:token失效超分*/
- @property (nonatomic, assign) NSInteger rbdNotification;
- /**
- * @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)offLineDevice:(CloudPhoneModel *)model;
- - (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;
- - (void)openbusinessCommandChannelManagerrc_openURL;
- - (void)opencommandChannelManagerrc_openURL;
- @end
|