@@ -927,11 +927,7 @@ - (void)starP2PServer {
927927 }
928928 }
929929 NSLog (@" _sys_xp2p_info xp2pValue : %@ " ,xp2pValue);
930- __block int errorcode = 0 ;
931- dispatch_after (dispatch_time (DISPATCH_TIME_NOW, (int64_t )(1 * NSEC_PER_SEC)), dispatch_get_main_queue (), ^{
932- errorcode = [[TIoTCoreXP2PBridge sharedInstance ] startAppWith: @" " sec_key: @" " pro_id: self .productId?:@" " dev_name: self .deviceName?:@" " xp2pinfo: xp2pValue];
933- });
934- // int errorcode = [[TIoTCoreXP2PBridge sharedInstance] startAppWith:@"" sec_key:@"" pro_id:self.productId?:@"" dev_name:self.deviceName?:@"" xp2pinfo:xp2pValue];
930+ int errorcode = [[TIoTCoreXP2PBridge sharedInstance ] startAppWith: @" " sec_key: @" " pro_id: self .productId?:@" " dev_name: self .deviceName?:@" " xp2pinfo: xp2pValue];
935931
936932 if (errorcode == XP2P_ERR_VERSION) {
937933 UIAlertController *alertC = [UIAlertController alertControllerWithTitle: @" APP SDK 版本与设备端 SDK 版本号不匹配,版本号需前两位保持一致" message: nil preferredStyle: (UIAlertControllerStyleAlert)];
@@ -4010,10 +4006,7 @@ - (void)refushVideo:(NSNotification *)notify {
40104006 self.p2pReady = YES ;
40114007
40124008 // APP侧断网刚重连p2p成功后 重新拉流/推流
4013- dispatch_after (dispatch_time (DISPATCH_TIME_NOW, (int64_t )(1 * NSEC_PER_SEC)), dispatch_get_main_queue (), ^{
4014- [self refreshP2PPlayerAndStartCapture ];
4015- });
4016- // [self refreshP2PPlayerAndStartCapture];
4009+ [self refreshP2PPlayerAndStartCapture ];
40174010
40184011// [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(startHungupAction) object:nil];
40194012}
@@ -4163,10 +4156,7 @@ - (void)reconnectNetworkActioin {
41634156 // 更新objectModel里的p2pinfo 重起p2p服务
41644157 // 先stopService 防止 WIFI 4G互切问题
41654158 [[TIoTCoreXP2PBridge sharedInstance ] stopService: self .deviceName?:@" " ];
4166- dispatch_after (dispatch_time (DISPATCH_TIME_NOW, (int64_t )(1 * NSEC_PER_SEC)), dispatch_get_main_queue (), ^{
4167- [self restartP2PServer ];
4168- });
4169-
4159+ [self restartP2PServer ];
41704160
41714161 }
41724162// }
@@ -4234,10 +4224,7 @@ - (void)refreshP2PPlayerAndStartCapture {
42344224 [self getDeviceStatusWithType: action_voice qualityType: quality_standard completion: ^(BOOL finished) {
42354225 if (finished) {
42364226 // 当前如果还在通话页面,重连后刷新播放器
4237- // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
4238- [[TIoTP2PCommunicateUIManage sharedManager ] refreshP2PVideoPlayer ];
4239- // });
4240- // [[TIoTP2PCommunicateUIManage sharedManager] refreshP2PVideoPlayer];
4227+ [[TIoTP2PCommunicateUIManage sharedManager ] refreshP2PVideoPlayer ];
42414228 }else {
42424229 [MBProgressHUD showMessage: NSLocalizedString(@" reconnectFail_check_device_status" , @" 重连失败,请检查设备状态" ) icon: @" " ];
42434230 }
0 commit comments