摄像头自动重连5次
This commit is contained in:
parent
7c5930b6d0
commit
add3b8e0b0
|
|
@ -111,6 +111,9 @@ Strong MessageAlertView *popView;
|
||||||
@property(nonatomic,strong) ELPCircleConsoleView *directionView;
|
@property(nonatomic,strong) ELPCircleConsoleView *directionView;
|
||||||
Weak UIView *remoteView;//显示player的载体
|
Weak UIView *remoteView;//显示player的载体
|
||||||
Strong UIImage *screenShotImage;//截图
|
Strong UIImage *screenShotImage;//截图
|
||||||
|
//自动重试次数 5次
|
||||||
|
@property (assign, nonatomic) NSInteger retryTime;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
extern BOOL formLogIn;//连接页面是否来自登录界面
|
extern BOOL formLogIn;//连接页面是否来自登录界面
|
||||||
BOOL isfromCameraView;//未绑定鱼缸时,去绑定鱼缸 判断是否从摄像头界面进入
|
BOOL isfromCameraView;//未绑定鱼缸时,去绑定鱼缸 判断是否从摄像头界面进入
|
||||||
|
|
@ -353,6 +356,14 @@ Strong UIImage *screenShotImage;//截图
|
||||||
NSLog(@"[p2pCallDevice-Accept],paras=%@",parameters);
|
NSLog(@"[p2pCallDevice-Accept],paras=%@",parameters);
|
||||||
|
|
||||||
} reject:^(GWP2PCallError error, NSString *errorCode) {
|
} reject:^(GWP2PCallError error, NSString *errorCode) {
|
||||||
|
if (error==GWP2PCallErrorTimeout&&self.retryTime<5)
|
||||||
|
{
|
||||||
|
self.retryTime++;
|
||||||
|
[self monitorP2PCall];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
_isReject=YES;
|
_isReject=YES;
|
||||||
NSLog(@"摄像头连接失败");
|
NSLog(@"摄像头连接失败");
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
|
@ -361,6 +372,8 @@ Strong UIImage *screenShotImage;//截图
|
||||||
[self hiddenMonitoringUI:NO callWithErrorType:(NSInteger)error isReCall:NO];
|
[self hiddenMonitoringUI:NO callWithErrorType:(NSInteger)error isReCall:NO];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} ready:^{
|
} ready:^{
|
||||||
|
|
||||||
//呼叫成功操作
|
//呼叫成功操作
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue