|
@@ -44,7 +44,7 @@
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(PCLoginDidPopFun) name:showTabbarNotification object:nil];
|
|
|
|
|
|
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setDataFun) name:webRtcLinkStateChangeNotification object:nil];
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mainSetDataFun) name:webRtcLinkStateChangeNotification object:nil];
|
|
|
|
|
|
|
|
|
[self drawAnyView];
|
|
@@ -500,6 +500,13 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
+- (void)mainSetDataFun
|
|
|
+{
|
|
|
+ KWeakSelf
|
|
|
+ mainBlock(^{
|
|
|
+ [weakSelf setDataFun];
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
#pragma mark 数据设置
|
|
|
- (void)setDataFun
|
|
@@ -527,11 +534,16 @@
|
|
|
NetButText = NSLocalizedString(@"mine_net_WAN",nil);
|
|
|
}
|
|
|
|
|
|
- RTCDataChannelState state = [webRtcManager shareManager].channelState;
|
|
|
+ RTCDataChannelState channelState = [webRtcManager shareManager].channelState;
|
|
|
+ RTCIceConnectionState ConnectionState = [webRtcManager shareManager].ConnectionState;
|
|
|
|
|
|
- if(state != RTCDataChannelStateOpen
|
|
|
- ||!ksharedAppDelegate.isWebSockLinkOKAginType//断开了
|
|
|
- )
|
|
|
+ if((ConnectionState == RTCIceConnectionStateConnected
|
|
|
+ && channelState == RTCDataChannelStateOpen)
|
|
|
+ //&& !ksharedAppDelegate.isWebSockLinkOKAginType//断开了
|
|
|
+ ){
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
NetButText = NSLocalizedString(@"mine_net_unLink",nil);
|
|
|
}
|