bug修复
This commit is contained in:
+28
-19
@@ -151,17 +151,16 @@ Strong UIImage *screenShotImage;//截图
|
||||
|
||||
return;
|
||||
}
|
||||
if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
// if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
|
||||
[self monitorP2PCall];
|
||||
[self hiddenMonitoringUI:NO callWithErrorType:100 isReCall:YES];
|
||||
}else if ([self.contact.isActive isEqualToString:@"0"]){
|
||||
[self cameraConnectSeting];
|
||||
// }else if ([self.contact.isActive isEqualToString:@"0"]){
|
||||
|
||||
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"" message:@"请扫描产品外包装上的激活码来激活摄像头" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"前往扫描", nil];
|
||||
alert.tag = WEIJIHUO_ALERT;
|
||||
[alert show];
|
||||
|
||||
}
|
||||
// UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"" message:@"请扫描产品外包装上的激活码来激活摄像头" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"前往扫描", nil];
|
||||
// alert.tag = WEIJIHUO_ALERT;
|
||||
// [alert show];
|
||||
//
|
||||
// }
|
||||
}
|
||||
//环境校验
|
||||
-(void)checkNetStatus{
|
||||
@@ -237,19 +236,19 @@ Strong UIImage *screenShotImage;//截图
|
||||
_isReject=YES;
|
||||
_isStop = NO;
|
||||
_isPushNextView = NO;
|
||||
if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
// if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
[self connectDevice];
|
||||
}
|
||||
// }
|
||||
//监控竖屏时,各控件初始化(先)
|
||||
[self initComponentForPortrait];
|
||||
//监控横屏时,各控件初始化(后)
|
||||
[self initComponentForHorizontalScreen];
|
||||
|
||||
if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
|
||||
}else{
|
||||
// if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
//
|
||||
// }else{
|
||||
[self.yProgressView stop];
|
||||
}
|
||||
// }
|
||||
}
|
||||
#pragma mark --LoadBaseUI
|
||||
-(UIView *)canvasView{
|
||||
@@ -263,15 +262,25 @@ Strong UIImage *screenShotImage;//截图
|
||||
return _canvasView;
|
||||
}
|
||||
#pragma mark - 初始化设备 p2pConnect
|
||||
-(void)connectDevice{
|
||||
if ([GWP2PClient sharedClient].linkStatus==P2PLinkStatusOK) {
|
||||
_connectDevice = YES;
|
||||
-(void)cameraConnectSeting{
|
||||
//rtsp监控界面弹出修改
|
||||
[self monitorP2PCall];
|
||||
if (_isPushNextView) {
|
||||
return;
|
||||
}
|
||||
[self hiddenMonitoringUI:NO callWithErrorType:100 isReCall:YES];
|
||||
|
||||
}
|
||||
-(void)connectDevice{
|
||||
|
||||
UserModel *model=[dataContorl getUserInfo];
|
||||
NSString *userIDName=[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
|
||||
//初始化设备
|
||||
if (!_connectDevice) {
|
||||
NSLog(@"正在检查P2P连接状态");
|
||||
if ([GWP2PClient sharedClient].linkStatus == P2PLinkStatusOK) {
|
||||
[[GWP2PClient sharedClient] disconnect];
|
||||
}
|
||||
_connectDevice = [[GWP2PClient sharedClient] connectWithAccount:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2 sessionID1:model.sessionID sessionID2:model.sessionID2 customerIDs:nil];
|
||||
|
||||
if (_connectDevice) {
|
||||
@@ -295,7 +304,7 @@ Strong UIImage *screenShotImage;//截图
|
||||
return;
|
||||
}
|
||||
//p2p未连接
|
||||
if ([GWP2PClient sharedClient].linkStatus != P2PLinkStatusOK) {
|
||||
if (!_connectDevice) {
|
||||
[self connectDevice];
|
||||
if(_connectDevice){
|
||||
// 连接摄像头
|
||||
|
||||
Reference in New Issue
Block a user