Browse Source

1.ping方案完成 webrtc链接改为用IP地址直接连接

huangxiaodong 11 months ago
parent
commit
d14ac864e6

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Notification.h

@@ -154,4 +154,7 @@
 /* PC扫码后*/
 #define showTabbarNotification                 @"showTabbarNot"
 
+/* ping 完后重连*/
+#define didPingBestWebRtcIPRoomNotification                 @"didPingBestWebRtcIPRoomNot"
+
 #endif /* Notification_h */

+ 2 - 0
创维盒子/双子星云手机/webRtc/webRtcPingManager/webRtcPingManager.m

@@ -70,6 +70,8 @@
             [HWDataManager setObjectWithKey:@"Const_best_webRtc_IPRoom" value:bestdict];
         }
         [[webRtcManager shareManager] relinkWebRtcFun];
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:didPingBestWebRtcIPRoomNotification object:nil];
         return;
     }
     

+ 3 - 0
创维盒子/双子星云手机/webRtc/webRtcPlayerViewController.m

@@ -959,6 +959,9 @@
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didInpuPwdOkFun) name:didInputPWDNotification object:nil];
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange:)  name:NetWorkChangeNotification        object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(relinkWebRtcFun)  name:didPingBestWebRtcIPRoomNotification        object:nil];
+    
 }
 
 - (void)removeKVOObserverFun