|
@@ -120,6 +120,7 @@ ComontAlretViewControllerDelegate>
|
|
|
|
|
|
/*弹窗提示链接失败 网络或者云机*/
|
|
|
ComontAlretViewController *linkFailAlretVC;
|
|
|
+ ComontAlretType2ViewController * linkFailAlretType2VC;
|
|
|
|
|
|
NSTimer *forceStartTimer;//请知重启timer
|
|
|
|
|
@@ -2229,7 +2230,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
|
|
|
if(linkFailAlretVC
|
|
|
||[connectDeviceManager shareInstance].isReInitType//瑞云重新init 耗时2-7s 他们说的
|
|
|
||(ksharedAppDelegate.isWebSockLinkOKAginType && type == 2) //重连上了但是延时消息来了
|
|
|
- ){
|
|
|
+ ||linkFailAlretType2VC){
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -2262,32 +2263,75 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
|
|
|
type = 1;
|
|
|
}
|
|
|
|
|
|
- NSString *linkErrTip = NSLocalizedString(@"player_link_fail_couldPhone_Tips",nil);
|
|
|
+ BOOL isPhoneNetWorkWrongType = NO;
|
|
|
+ NSString *linkErrTip = NSLocalizedString(@"player_link_fail_tip_type11",nil);
|
|
|
if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable){
|
|
|
- linkErrTip = NSLocalizedString(@"player_link_fail_phone_Tips",nil);
|
|
|
+ linkErrTip = NSLocalizedString(@"netWork_error_tip_content",nil);
|
|
|
+ isPhoneNetWorkWrongType = YES;
|
|
|
}
|
|
|
|
|
|
- linkErrTip = [[NSString alloc] initWithFormat:@"[%ld]%@",type,linkErrTip];
|
|
|
-
|
|
|
- KWeakSelf
|
|
|
- linkFailAlretVC= [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"player_link_fail_title",nil)
|
|
|
- msg:linkErrTip
|
|
|
- imageStr:nil
|
|
|
- cancelTitle:NSLocalizedString(@"single_sign_on_exit",nil)
|
|
|
- okTitle:NSLocalizedString(@"player_link_fail_tryAgain",nil) isOkBtnHighlight:YES
|
|
|
- didClickOk:^{
|
|
|
- [weakSelf tryAgainInLinkFailFun];
|
|
|
- [cachesFileManager writeLogsWithMsg:@"click tryAgain"];
|
|
|
+ if(type == 11 && !isPhoneNetWorkWrongType){
|
|
|
+ NSString* linkErrTitle = NSLocalizedString(@"player_link_fail_title_type11",nil);
|
|
|
+ linkErrTitle = [[NSString alloc] initWithFormat:@"[%ld]%@",type,linkErrTitle];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ linkFailAlretType2VC = [[ComontAlretType2ViewController alloc] initWithTitle:linkErrTitle msg:linkErrTip imageStr:nil cancelTitle:NSLocalizedString(@"single_sign_on_exit",nil) okTitle:NSLocalizedString(@"player_link_fail_tryAgain",nil) otherTitle:NSLocalizedString(@"my_set_no_restart_phone",nil) isOkBtnHighlight:YES didClickOk:^{
|
|
|
+ [weakSelf tryAgainInLinkFailFun];
|
|
|
+ [cachesFileManager writeLogsWithMsg:@"click tryAgain"];
|
|
|
+ } didClickCancel:^{
|
|
|
+ exit(0);
|
|
|
+ } didClickOther:^{//硬重启
|
|
|
+ [weakSelf needToRebootFun];
|
|
|
+ }];
|
|
|
+
|
|
|
|
|
|
- } didClickCancel:^{
|
|
|
- exit(0);
|
|
|
- }];
|
|
|
-
|
|
|
- linkFailAlretVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
-
|
|
|
- [self presentViewController:linkFailAlretVC animated:YES completion:^{
|
|
|
- self->linkFailAlretVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
- }];
|
|
|
+ linkFailAlretType2VC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:linkFailAlretType2VC animated:YES completion:^{
|
|
|
+ self->linkFailAlretType2VC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ NSString* linkErrTitle = @"";
|
|
|
+ if(type == 2
|
|
|
+ ||type==5
|
|
|
+ ||type==1
|
|
|
+ ||type==12){
|
|
|
+ linkErrTitle = NSLocalizedString(@"player_link_fail_title_type2",nil);
|
|
|
+ linkErrTip = NSLocalizedString(@"player_link_fail_tip_type2",nil);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ linkErrTitle = NSLocalizedString(@"player_link_fail_title_type3",nil);
|
|
|
+ linkErrTip = NSLocalizedString(@"player_link_fail_tip_type2",nil);
|
|
|
+ }
|
|
|
+
|
|
|
+ if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable){
|
|
|
+ linkErrTip = NSLocalizedString(@"netWork_error_tip_content",nil);
|
|
|
+ }
|
|
|
+
|
|
|
+ linkErrTitle = [[NSString alloc] initWithFormat:@"[%ld]%@",type,linkErrTitle];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ linkFailAlretVC= [[ComontAlretViewController alloc] initWithTiTle:linkErrTitle
|
|
|
+ msg:linkErrTip
|
|
|
+ imageStr:nil
|
|
|
+ cancelTitle:NSLocalizedString(@"single_sign_on_exit",nil)
|
|
|
+ okTitle:NSLocalizedString(@"player_link_fail_tryAgain",nil) isOkBtnHighlight:YES
|
|
|
+ didClickOk:^{
|
|
|
+ [weakSelf tryAgainInLinkFailFun];
|
|
|
+ [cachesFileManager writeLogsWithMsg:@"click tryAgain"];
|
|
|
+
|
|
|
+ } didClickCancel:^{
|
|
|
+ exit(0);
|
|
|
+ }];
|
|
|
+
|
|
|
+ linkFailAlretVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+ [linkFailAlretVC setMsgTextAlignment:NSTextAlignmentLeft];
|
|
|
+ [self presentViewController:linkFailAlretVC animated:YES completion:^{
|
|
|
+ self->linkFailAlretVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+ }
|
|
|
|
|
|
linkFailAlretVC.view.tag = type;
|
|
|
}
|
|
@@ -2295,6 +2339,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
|
|
|
- (void)tryAgainInLinkFailFun
|
|
|
{
|
|
|
linkFailAlretVC = nil;
|
|
|
+ linkFailAlretType2VC = nil;
|
|
|
|
|
|
if([[connectDeviceManager shareInstance] curConnectDeviceState] <= 3)
|
|
|
{
|