修复链接摄像头的相关问题V1
This commit is contained in:
+10
-19
@@ -152,9 +152,9 @@ Strong UIImage *screenShotImage;//截图
|
||||
return;
|
||||
}
|
||||
if ([self.contact.isActive isEqualToString:@"1"]) {
|
||||
|
||||
[self cameraConnectSeting];
|
||||
|
||||
|
||||
[self monitorP2PCall];
|
||||
[self hiddenMonitoringUI:NO callWithErrorType:100 isReCall:YES];
|
||||
}else if ([self.contact.isActive isEqualToString:@"0"]){
|
||||
|
||||
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"" message:@"请扫描产品外包装上的激活码来激活摄像头" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"前往扫描", nil];
|
||||
@@ -163,16 +163,6 @@ Strong UIImage *screenShotImage;//截图
|
||||
|
||||
}
|
||||
}
|
||||
//加tab 栏后新增
|
||||
-(void)cameraConnectSeting{
|
||||
//rtsp监控界面弹出修改
|
||||
[self monitorP2PCall];
|
||||
//设置代理
|
||||
if (_isPushNextView) {
|
||||
return;
|
||||
}
|
||||
[self hiddenMonitoringUI:NO callWithErrorType:100 isReCall:YES];
|
||||
}
|
||||
//环境校验
|
||||
-(void)checkNetStatus{
|
||||
|
||||
@@ -274,7 +264,9 @@ Strong UIImage *screenShotImage;//截图
|
||||
}
|
||||
#pragma mark - 初始化设备 p2pConnect
|
||||
-(void)connectDevice{
|
||||
|
||||
if ([GWP2PClient sharedClient].linkStatus==P2PLinkStatusOK) {
|
||||
_connectDevice = YES;
|
||||
}
|
||||
UserModel *model=[dataContorl getUserInfo];
|
||||
NSString *userIDName=[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
|
||||
//初始化设备
|
||||
@@ -303,11 +295,11 @@ Strong UIImage *screenShotImage;//截图
|
||||
return;
|
||||
}
|
||||
//p2p未连接
|
||||
if (!_connectDevice) {
|
||||
if ([GWP2PClient sharedClient].linkStatus != P2PLinkStatusOK) {
|
||||
[self connectDevice];
|
||||
if(_connectDevice){
|
||||
// 连接摄像头
|
||||
[self monitorP2PCall];
|
||||
// 连接摄像头
|
||||
[self monitorP2PCall];
|
||||
}
|
||||
}
|
||||
WEAK_SELF;
|
||||
@@ -330,6 +322,7 @@ Strong UIImage *screenShotImage;//截图
|
||||
});
|
||||
|
||||
} ready:^{
|
||||
[self.view makeToast:@"连接成功"];
|
||||
//呼叫成功操作
|
||||
NSLog(@"连接摄像头成功 当前所在线程为%@",[NSThread currentThread]);
|
||||
//隐藏呼叫中的UI
|
||||
@@ -730,7 +723,6 @@ Strong UIImage *screenShotImage;//截图
|
||||
|
||||
if (self.contact.cameraId == model.cameraId ) {
|
||||
|
||||
|
||||
[guanxiiArr removeObject:model];
|
||||
//保存新关系数组
|
||||
[[DataCenter defaultDtacenter] setValue:guanxiiArr forKey:@"devicamerArr"];
|
||||
@@ -753,7 +745,6 @@ Strong UIImage *screenShotImage;//截图
|
||||
|
||||
UserModel*model=[[DataCenter defaultDtacenter]valueForKey:@"UserLogIn"];
|
||||
NSString *cameraId=self.contact.cameraId;
|
||||
;
|
||||
NSNumber *userId=model.userId;
|
||||
|
||||
[para setValue:cameraId forKey:@"cameraId"];
|
||||
|
||||
Reference in New Issue
Block a user