|
@@ -117,6 +117,8 @@ ComontAlretViewControllerDelegate>
|
|
|
ComontAlretViewController *logoutAlertVC;
|
|
|
/*弹窗提示链接失败 网络或者云机*/
|
|
|
ComontAlretViewController *linkFailAlretVC;
|
|
|
+
|
|
|
+ NSTimer *forceStartTimer;//请知重启timer
|
|
|
}
|
|
|
@property (nonatomic, strong, nullable) RCVideoRecoderManager *recoderManager;
|
|
|
@property (nonatomic, strong, nullable) RCAudioRecoderMamager *audioRecoderMamager;
|
|
@@ -712,7 +714,9 @@ ComontAlretViewControllerDelegate>
|
|
|
else if ([messageType isEqualToString:@"TvStatus"]){/*获取TV投屏信息*/
|
|
|
[weakSelf getCouldPhoneTvStatusResponseFun:dataDict];
|
|
|
}
|
|
|
-
|
|
|
+ else if ([messageType isEqualToString:@"reboot"]){/*重启*/
|
|
|
+ [weakSelf stopForceStartTimerFun];
|
|
|
+ }
|
|
|
} failure:^(NSError *error) {
|
|
|
[self showNetErrorAlertFun:2];
|
|
|
}];
|
|
@@ -1056,7 +1060,7 @@ ComontAlretViewControllerDelegate>
|
|
|
}
|
|
|
|
|
|
//重启后重连 出来的
|
|
|
- if(_isRebootIngType){
|
|
|
+ if(_isRebootIngType && !forceStartTimer){
|
|
|
mainBlock(^{
|
|
|
[[iToast makeText:NSLocalizedString(@"player_link_reboot_suc_Tips",nil)] show];
|
|
|
});
|
|
@@ -1449,6 +1453,8 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
|
|
|
NSString *commondStr = @"{\"type\":\"reboot\"}";
|
|
|
[weakSelf send_data:commondStr];
|
|
|
|
|
|
+ [weakSelf startForceStartTimerFun];
|
|
|
+
|
|
|
//最后一帧 没显示正在重启问题
|
|
|
self->_canShowImgAndVoiceType = YES;
|
|
|
|
|
@@ -1509,6 +1515,36 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+#pragma mark 启动timer 30秒后检查是否软件重启成功
|
|
|
+- (void)startForceStartTimerFun
|
|
|
+{
|
|
|
+ if(forceStartTimer){
|
|
|
+ [forceStartTimer invalidate];
|
|
|
+ forceStartTimer = nil;
|
|
|
+ }
|
|
|
+
|
|
|
+ forceStartTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(gotoUpdateForceStartFun) userInfo:nil repeats:NO];
|
|
|
+ [[NSRunLoop currentRunLoop] addTimer:forceStartTimer forMode:NSRunLoopCommonModes];
|
|
|
+}
|
|
|
+
|
|
|
+- (void)gotoUpdateForceStartFun
|
|
|
+{
|
|
|
+ [self updateForceStartFun];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [weakSelf reconnectDevice];
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+- (void)stopForceStartTimerFun
|
|
|
+{
|
|
|
+ if(forceStartTimer){
|
|
|
+ [forceStartTimer invalidate];
|
|
|
+ forceStartTimer = nil;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 盒子链接成功后需要处理的各种各样事情
|
|
|
- (void)handlAllMsgAfterDidLinkFun
|
|
|
{
|