cloudPhoneViewController.m 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. //
  2. // cloudPhoneViewController.m
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2024/6/20.
  6. //
  7. #import "cloudPhoneViewController.h"
  8. #import "cloudPhoneSetView.h"
  9. #import "PlayerViewController.h"
  10. #import "audioPlayingView.h"
  11. #import "DFPlayer.h"
  12. #import "audioPlayerViewController.h"
  13. #import "webRtcMsgModel.h"
  14. #import "webRtcPlayerViewController.h"
  15. #import "customRestartingBoxView.h"
  16. @interface cloudPhoneViewController ()
  17. @property (nonatomic,strong) cloudPhoneSetView *cloudPhoneSetV;
  18. @property (nonatomic,strong) webRtcMsgModel *webRtcMsgMod;
  19. @end
  20. @implementation cloudPhoneViewController
  21. - (void)viewDidLoad {
  22. [super viewDidLoad];
  23. // Do any additional setup after loading the view.
  24. //输入密码完成
  25. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didInpuPwdOkFun) name:didInputPWDNotification object:nil];
  26. [self.view setBackgroundColor:HWF5F7FAColor];
  27. [self.toolBar setHidden:YES];
  28. [self.navigationBar setHidden:YES];
  29. [self.navBarBGView setHidden:YES];
  30. [self drawAnyView];
  31. }
  32. - (void)drawAnyView{
  33. //顶底底部图片
  34. UIImageView *topImageV = [UIImageView new];
  35. topImageV.userInteractionEnabled = YES;
  36. topImageV.image = [UIImage imageNamed:@"cloudPhone_bg"];
  37. [self.view addSubview:topImageV];
  38. [topImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  39. make.top.mas_equalTo(0);
  40. make.left.mas_equalTo(0);
  41. make.right.mas_equalTo(0);
  42. make.bottom.mas_equalTo(0);
  43. }];
  44. CGFloat width = SCREEN_W;
  45. CGFloat height = SCREEN_H;
  46. BOOL isSmallPhoneType = NO;
  47. if(width == 375 && height == 667){
  48. isSmallPhoneType = YES;
  49. }
  50. CGFloat adjustSmallScale = 1.0;
  51. if(isSmallPhoneType){
  52. adjustSmallScale = 0.9;
  53. }
  54. CGFloat imageTopY = 54.0;
  55. if(isSmallPhoneType){
  56. imageTopY = 20.0;
  57. }
  58. //设置按钮
  59. UIButton *setButton = [[UIButton alloc] init];
  60. //[setButton setBackgroundImage:[UIImage imageNamed:@"cloudPhone_set"] forState:UIControlStateNormal];
  61. [setButton setImage:[UIImage imageNamed:@"cloudPhone_set"] forState:UIControlStateNormal];
  62. setButton.tag = 1;
  63. [setButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
  64. [self.view addSubview:setButton];
  65. //setButton.backgroundColor = [UIColor greenColor];
  66. [setButton mas_makeConstraints:^(MASConstraintMaker *make) {
  67. make.top.mas_equalTo(imageTopY);
  68. if(isSmallPhoneType){
  69. make.right.mas_equalTo(-5);
  70. }
  71. else{
  72. make.right.mas_equalTo(-16);
  73. }
  74. make.width.mas_equalTo(50);
  75. make.height.mas_equalTo(50);
  76. // make.top.mas_equalTo(imageTopY);
  77. // make.right.mas_equalTo(-16);
  78. // make.width.mas_equalTo(24);
  79. // make.height.mas_equalTo(24);
  80. }];
  81. //中间图片
  82. UIImageView *midImageV = [UIImageView new];
  83. midImageV.userInteractionEnabled = YES;
  84. midImageV.image = [UIImage imageNamed:@"cloudPhone_mid_img"];
  85. [self.view addSubview:midImageV];
  86. [midImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  87. make.width.mas_equalTo(326*WAUTOSCALE*adjustSmallScale);
  88. make.height.mas_equalTo(608*WAUTOSCALE*adjustSmallScale);
  89. make.centerX.mas_equalTo(0);
  90. make.centerY.mas_equalTo(-10);
  91. }];
  92. NSString *midTopTipImageStr = @"cloudPhone_topTip_img_cs";
  93. //欢迎
  94. //en-US 英文 ja-JP 日文
  95. NSArray *arLanguages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
  96. NSLog(@"arLanguages:%@",arLanguages);
  97. ///获取设备当前地区的代码和APP语言环境
  98. NSString *languageCode = [NSLocale preferredLanguages][0];
  99. //目前支持 中文(简体 繁体) 英文 日语
  100. if([languageCode rangeOfString:@"zh-Hans"].location != NSNotFound)
  101. {
  102. midTopTipImageStr = @"cloudPhone_topTip_img_cs";
  103. }
  104. else if([languageCode rangeOfString:@"zh-Hant"].location != NSNotFound)
  105. {
  106. midTopTipImageStr = @"cloudPhone_topTip_img_ct";
  107. }
  108. else{
  109. midTopTipImageStr = @"cloudPhone_topTip_img_en";
  110. }
  111. //提示文字图片
  112. UIImageView *midTopTipImageV = [UIImageView new];
  113. midTopTipImageV.image = [UIImage imageNamed:midTopTipImageStr];
  114. [midImageV addSubview:midTopTipImageV];
  115. [midTopTipImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  116. make.width.mas_equalTo(282*WAUTOSCALE*adjustSmallScale);
  117. make.height.mas_equalTo(84*WAUTOSCALE*adjustSmallScale);
  118. make.centerX.mas_equalTo(0);
  119. make.top.equalTo(midImageV.mas_top).offset(64);
  120. }];
  121. //进入云机
  122. UIButton*enterCloudPhoneButton = [[UIButton alloc] init];
  123. CGFloat w_btn = SCREEN_W - 15*2 - 50*2;
  124. // gradient
  125. CAGradientLayer *gl = [CAGradientLayer layer];
  126. gl.frame = CGRectMake(0,0,w_btn,44.f);
  127. gl.startPoint = CGPointMake(0, 0.5);
  128. gl.endPoint = CGPointMake(0.97, 0.5);
  129. gl.colors = @[(__bridge id)HW0CDEFDColor.CGColor, (__bridge id)HW058DFBColor.CGColor];
  130. gl.locations = @[@(0), @(1.0f)];
  131. [enterCloudPhoneButton.layer addSublayer:gl];
  132. [enterCloudPhoneButton setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
  133. //[enterCloudPhoneButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:(UIControlEventTouchUpInside)];
  134. [enterCloudPhoneButton setTitle:NSLocalizedString(@"cloudPhone_enter_tip",nil) forState:(UIControlStateNormal)];
  135. [enterCloudPhoneButton.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
  136. [enterCloudPhoneButton.layer setCornerRadius:21.f];
  137. enterCloudPhoneButton.layer.borderWidth = 1.5;
  138. enterCloudPhoneButton.layer.borderColor = [UIColor whiteColor].CGColor;
  139. enterCloudPhoneButton.clipsToBounds = YES;
  140. //enterCloudPhoneButton.tag = 2;
  141. [midImageV addSubview:enterCloudPhoneButton];
  142. [enterCloudPhoneButton mas_makeConstraints:^(MASConstraintMaker *make) {
  143. make.width.mas_equalTo(w_btn);
  144. make.height.mas_equalTo(42);
  145. make.centerX.mas_equalTo(0);
  146. make.bottom.equalTo(midImageV.mas_bottom).offset(-60);
  147. }];
  148. //扩大金融云机范围按钮
  149. UIButton *bigButton = [[UIButton alloc] init];
  150. bigButton.tag = 2;
  151. [bigButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
  152. [self.view addSubview:bigButton];
  153. //bigButton.backgroundColor = [UIColor greenColor];
  154. [bigButton mas_makeConstraints:^(MASConstraintMaker *make) {
  155. make.top.equalTo(midImageV.mas_top).offset(0);
  156. make.right.equalTo(midImageV.mas_right).offset(0);
  157. make.left.equalTo(midImageV.mas_left).offset(0);
  158. make.bottom.equalTo(midImageV.mas_bottom).offset(0);
  159. }];
  160. }
  161. #pragma mark 点击按钮
  162. - (void)didClickButtonFun:(UIButton*)but
  163. {
  164. if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable)
  165. {
  166. [[iToast makeText:NSLocalizedString(@"phone_network_fail_Tips",nil)] show];
  167. return;
  168. }
  169. // if (!ksharedAppDelegate.isWebSockLinkOKAginType) {//未链接
  170. // [[iToast makeText:NSLocalizedString(@"box_link_error_show_tip",nil)] show];
  171. // return;
  172. // }
  173. NSInteger tag = but.tag;
  174. HLog(@"%ld",tag);
  175. switch (tag) {
  176. case 1:
  177. {
  178. //数据埋点
  179. [[netWorkManager shareInstance] DataEmbeddingPointBy:2 withEventValue:@"Cloud_settings"];
  180. _cloudPhoneSetV = [cloudPhoneSetView new];
  181. [ksharedAppDelegate.window addSubview:_cloudPhoneSetV];
  182. [_cloudPhoneSetV mas_makeConstraints:^(MASConstraintMaker *make) {
  183. make.left.mas_equalTo(0);
  184. make.right.mas_equalTo(0);
  185. make.top.mas_equalTo(0);
  186. make.bottom.mas_equalTo(0);
  187. }];
  188. KWeakSelf
  189. _cloudPhoneSetV.didClickButtonFun = ^(NSInteger tag) {
  190. if (tag == 10) {//应用上传
  191. }
  192. else if (tag == 11){//重启
  193. [weakSelf didClickRestartFun];
  194. }
  195. else if (tag == 12){//恢复出厂
  196. [weakSelf RestoreFactoryAleartFun];
  197. }
  198. else if (tag == 13){//重启盒子
  199. [weakSelf didClickRestartBoxFun];
  200. }
  201. };
  202. }
  203. break;
  204. case 2:
  205. {
  206. //[self checkFullScreenWithTVShowStateFun];
  207. // PlayerViewController *vc = [PlayerViewController new];
  208. // [self pushViewController:vc animated:YES];
  209. //
  210. // if(ksharedAppDelegate.TvStatusMod.isTVShowType){
  211. // [[iToast makeText:NSLocalizedString(@"tv_p2p_ing",nil)] show];
  212. // }
  213. [self queryWebRtcMsgFun:YES];
  214. //数据埋点
  215. [[netWorkManager shareInstance] DataEmbeddingPointBy:2 withEventValue:@"Cloud_enter"];
  216. }
  217. break;
  218. default:
  219. break;
  220. }
  221. }
  222. #pragma mark 点击了重启空间
  223. - (void)didClickRestartFun
  224. {
  225. KWeakSelf
  226. /*弹窗提示重启*/
  227. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_restart_phone_tips",nil)
  228. msg:@""
  229. imageStr:@""
  230. cancelTitle:NSLocalizedString(@"other_cancel",nil)
  231. okTitle:NSLocalizedString(@"my_set_no_restart_phone_btn_ok",nil) isOkBtnHighlight:NO
  232. didClickOk:^{
  233. [weakSelf sureToRestartCloudPhoneFun];
  234. } didClickCancel:^{
  235. }];
  236. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  237. [self presentViewController:nextVC animated:YES completion:^{
  238. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  239. }];
  240. }
  241. #pragma mark 确认重启云机
  242. - (void)sureToRestartCloudPhoneFun{
  243. // /*重启云手机*/
  244. // 通过指令通道发送 {"type":"reboot"}
  245. [[webRtcManager shareManager] needToRebootFun];
  246. //提示语
  247. [[iToast makeText:NSLocalizedString(@"player_link_rebooting_Tips",nil)] show];
  248. }
  249. #pragma mark 点击恢复出厂
  250. - (void)RestoreFactoryAleartFun
  251. {
  252. KWeakSelf
  253. /*弹窗提示恢复出厂*/
  254. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factory_tips",nil)
  255. msg:NSLocalizedString(@"my_set_no_Restore_Factory_msg",nil)
  256. imageStr:@"icon_Restore_Factory_big"
  257. cancelTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil)
  258. okTitle:NSLocalizedString(@"other_cancel",nil) isOkBtnHighlight:YES
  259. didClickOk:^{
  260. } didClickCancel:^{
  261. //点击确定
  262. [weakSelf gotoResetFun];
  263. }];
  264. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  265. [self presentViewController:nextVC animated:YES completion:^{
  266. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  267. }];
  268. }
  269. #pragma mark 点击了恢复出厂
  270. - (void)gotoResetFun
  271. {
  272. [[webRtcManager shareManager] needToResetFun];
  273. [self RestoreFactoryingFun];
  274. }
  275. #pragma mark 恢复出厂中
  276. - (void)RestoreFactoryingFun
  277. {
  278. KWeakSelf
  279. /*弹窗提示恢复出厂*/
  280. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factorying_tips",nil)
  281. msg:NSLocalizedString(@"my_set_no_Restore_Factorying_msg",nil)
  282. imageStr:@""
  283. cancelTitle:NSLocalizedString(@"my_set_no_Restore_Factorying",nil)
  284. okTitle:@""
  285. isOkBtnHighlight:NO
  286. didClickOk:^{
  287. [weakSelf RestoreFactoryCompleteFun];
  288. } didClickCancel:^{
  289. }];
  290. [nextVC setButtonCountdownFun:180];//90
  291. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  292. [self presentViewController:nextVC animated:YES completion:^{
  293. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  294. }];
  295. }
  296. #pragma mark 恢复出厂倒计时结束
  297. - (void)RestoreFactoryCompleteFun
  298. {
  299. //KWeakSelf
  300. //瑞云发起重连
  301. //[[connectDeviceManager shareInstance] onConnectFun];
  302. /*弹窗提示恢复出厂*/
  303. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factory_ok_tips",nil)
  304. msg:@""
  305. imageStr:@""
  306. cancelTitle:NSLocalizedString(@"my_set_no_Restore_FactoryOK",nil)
  307. okTitle:@""
  308. isOkBtnHighlight:NO
  309. didClickOk:^{
  310. } didClickCancel:^{
  311. }];
  312. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  313. [self presentViewController:nextVC animated:YES completion:^{
  314. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  315. }];
  316. }
  317. #pragma mark 点击重启盒子
  318. - (void)didClickRestartBoxFun
  319. {
  320. KWeakSelf
  321. /*弹窗提示恢复出厂*/
  322. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"cloudPhone_restart_box_tip",nil)
  323. msg:NSLocalizedString(@"cloudPhone_restart_box_msg",nil)
  324. imageStr:@""
  325. cancelTitle:NSLocalizedString(@"other_cancel",nil)
  326. okTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil) isOkBtnHighlight:YES
  327. didClickOk:^{
  328. //点击确定
  329. [weakSelf gotoRestartBoxFun];
  330. } didClickCancel:^{
  331. }];
  332. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  333. [self presentViewController:nextVC animated:YES completion:^{
  334. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  335. }];
  336. }
  337. #pragma mark 重启盒子
  338. - (void)gotoRestartBoxFun{
  339. NSString* curSn = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
  340. NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
  341. [paraDict setValue:curSn forKey:@"sn"];
  342. [paraDict setValue:[NSNumber numberWithBool:YES] forKey:@"restartBox"];
  343. KWeakSelf
  344. [[netWorkManager shareInstance] CommonPostCallBackCode:restartTheBox Parameters:paraDict success:^(id _Nonnull responseObject) {
  345. SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
  346. if (model && model.status == 0) {
  347. [weakSelf RestartBoxingFun];
  348. }
  349. else
  350. {
  351. }
  352. } failure:^(NSError * _Nonnull error) {
  353. }];
  354. }
  355. #pragma mark 重启盒子中
  356. - (void)RestartBoxingFun
  357. {
  358. [webRtcManager shareManager].isReRestartIngBoxType = YES;
  359. customRestartingBoxView *view = [[customRestartingBoxView alloc] init];
  360. [ksharedAppDelegate.window addSubview:view];
  361. [view mas_makeConstraints:^(MASConstraintMaker *make) {
  362. make.left.mas_equalTo(0.f);
  363. make.bottom.mas_equalTo(0.f);
  364. make.right.mas_equalTo(0.f);
  365. make.top.mas_equalTo(0.f);
  366. }];
  367. }
  368. #pragma mark 重启盒子成功
  369. - (void)viewWillAppear:(BOOL)animated{
  370. [super viewWillAppear:animated];
  371. [self handelAudioPlayingViewFun];
  372. }
  373. - (void)viewWillDisappear:(BOOL)animated{
  374. [super viewWillDisappear:animated];
  375. }
  376. - (void)pushViewController:(UIViewController*)vc animated:(BOOL)animated
  377. {
  378. [self.navigationController pushViewController:vc animated:animated];
  379. }
  380. #pragma mark 处理音频播放中的视图状态
  381. - (void)handelAudioPlayingViewFun
  382. {
  383. audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
  384. if([DFPlayer sharedPlayer].state == DFPlayerStateBuffering
  385. ||[DFPlayer sharedPlayer].state == DFPlayerStatePlaying
  386. ||[DFPlayer sharedPlayer].state == DFPlayerStatePause){//播放中
  387. [self showAudioPlayingViewFun];
  388. }
  389. else{
  390. [self hideAudioPlayingViewFun];
  391. }
  392. KWeakSelf
  393. audioPlayingV.didClickButtonFun = ^(NSInteger tag) {
  394. if(tag == 1){
  395. [weakSelf hideAudioPlayingViewFun];
  396. }
  397. else if(tag == 5){
  398. [weakSelf AudioPlayingGotoAudioPlayerVCFun];
  399. }
  400. };
  401. }
  402. - (void)AudioPlayingGotoAudioPlayerVCFun{
  403. audioPlayerViewController *vc = [audioPlayerViewController new];
  404. vc.isfirstEnterType = NO;
  405. [self.navigationController pushViewController:vc animated:YES];
  406. }
  407. #pragma mark 显示音频播放中的视图
  408. - (void)showAudioPlayingViewFun
  409. {
  410. audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
  411. [self.view addSubview:audioPlayingV];
  412. if([DFPlayer sharedPlayer].state == DFPlayerStatePlaying){
  413. [audioPlayingV startRotatingImage];
  414. }
  415. else if ([DFPlayer sharedPlayer].state == DFPlayerStatePause){
  416. [audioPlayingV stopRotatingImage];
  417. }
  418. [audioPlayingV mas_makeConstraints:^(MASConstraintMaker *make) {
  419. make.height.mas_equalTo(49);
  420. make.left.mas_equalTo(0);
  421. make.right.mas_equalTo(0);
  422. make.bottom.mas_equalTo(-TABBARHEIGHT);
  423. }];
  424. }
  425. #pragma mark 隐藏音频播放中的视图
  426. - (void)hideAudioPlayingViewFun
  427. {
  428. // audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
  429. // [audioPlayingV removeFromSuperview];
  430. }
  431. #pragma mark 获取webrct 的链接信息
  432. -(void)queryWebRtcMsgFun:(BOOL)isPlayerType
  433. {
  434. if(isPlayerType){
  435. if(ksharedAppDelegate.DeviceWebRtcMsgMod && ksharedAppDelegate.DeviceWebRtcMsgMod.data.sn){
  436. [self gotoWebRtcVcBy:ksharedAppDelegate.DeviceWebRtcMsgMod];
  437. return;
  438. }
  439. [self showNewIndicatorWithCanBack:YES canTouch:NO];
  440. }
  441. NSMutableDictionary *paraDict = [NSMutableDictionary new];
  442. KWeakSelf
  443. [[netWorkManager shareInstance] CommonPostCallBackCode:webrctQueryByClient Parameters:paraDict success:^(id _Nonnull responseObject){
  444. if(isPlayerType){
  445. [weakSelf removeNewIndicator];
  446. }
  447. webRtcMsgModel *curModel = [[webRtcMsgModel alloc] initWithDictionary:responseObject error:nil];
  448. if(curModel && curModel.status == 0){
  449. ksharedAppDelegate.DeviceWebRtcMsgMod = curModel;
  450. if(isPlayerType){
  451. [weakSelf gotoWebRtcVcBy:curModel];
  452. }
  453. }
  454. else
  455. {
  456. if(isPlayerType && curModel.msg){
  457. [[iToast makeText:curModel.msg] show];
  458. }
  459. }
  460. } failure:^(NSError * _Nonnull error) {
  461. if(isPlayerType){
  462. [weakSelf removeNewIndicator];
  463. [[iToast makeText:NSLocalizedString(@"get_webrtcMsg_fail_tip",nil)] show];
  464. }
  465. }];
  466. }
  467. #pragma mark 跳转webrtc 页面
  468. - (void)gotoWebRtcVcBy:(webRtcMsgModel*)webRtcMsgMod
  469. {
  470. NSArray * vcArrs = self.navigationController.viewControllers;
  471. if(vcArrs.count != 1){
  472. return;
  473. }
  474. [cachesFileManager writeLogsWithMsg:@"webRtcPlayer push webRtcPlayerVC"];
  475. webRtcPlayerViewController *vc = [webRtcPlayerViewController new];
  476. vc.webRtcMsgMod = webRtcMsgMod;
  477. [self.navigationController pushViewController:vc animated:YES];
  478. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  479. ksharedAppDelegate.isCloudPhoneModeNotPrivacyModeOpenType = NO;
  480. ksharedAppDelegate.isCloudPhoneModeAndPrivacyModeOpenType = NO;
  481. ksharedAppDelegate.needToPushWebRtcVCType = NO;
  482. });
  483. }
  484. #pragma mark 输入密码完成
  485. - (void)didInpuPwdOkFun
  486. {
  487. KWeakSelf
  488. mainBlock(^{
  489. if(ksharedAppDelegate.isCloudPhoneModeAndPrivacyModeOpenType
  490. || ksharedAppDelegate.needToPushWebRtcVCType){
  491. [weakSelf queryWebRtcMsgFun:YES];
  492. }
  493. });
  494. }
  495. @end