Showing
2 changed files
with
9 additions
and
3 deletions
No preview for this file type
@@ -129,6 +129,11 @@ | @@ -129,6 +129,11 @@ | ||
129 | if (_socketService == nil) { | 129 | if (_socketService == nil) { |
130 | _socketService = [[YH_SocketService alloc]init]; | 130 | _socketService = [[YH_SocketService alloc]init]; |
131 | _socketService.delegate = self; | 131 | _socketService.delegate = self; |
132 | + _socketService.barrageViewController = self.barrageViewController; | ||
133 | + } | ||
134 | + | ||
135 | + if (_socketService && _socketService.barrageViewController == nil) { | ||
136 | + _socketService.barrageViewController = self.barrageViewController; | ||
132 | } | 137 | } |
133 | 138 | ||
134 | return _socketService; | 139 | return _socketService; |
@@ -383,8 +388,10 @@ | @@ -383,8 +388,10 @@ | ||
383 | 388 | ||
384 | dispatch_async(dispatch_get_main_queue(), ^{ | 389 | dispatch_async(dispatch_get_main_queue(), ^{ |
385 | if (EvtID == PUSH_ERR_NET_DISCONNECT) { | 390 | if (EvtID == PUSH_ERR_NET_DISCONNECT) { |
386 | - [self startRtmp];//不停的重试,只要在用户点击结束之前,都要进行重新连接操作。 | ||
387 | - // [self liveButtonPressed:_liveButton]; | 391 | + DLog(@"已经连接三次了"); |
392 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
393 | + ; | ||
394 | + }); | ||
388 | } | 395 | } |
389 | long long time = [(NSNumber*)[dict valueForKey:EVT_TIME] longLongValue]; | 396 | long long time = [(NSNumber*)[dict valueForKey:EVT_TIME] longLongValue]; |
390 | int mil = time % 1000; | 397 | int mil = time % 1000; |
@@ -1187,7 +1194,6 @@ | @@ -1187,7 +1194,6 @@ | ||
1187 | [self.view addSubview:self.barrageViewController.view]; | 1194 | [self.view addSubview:self.barrageViewController.view]; |
1188 | // self.barrageViewController.view.left = SCREEN_WIDTH; | 1195 | // self.barrageViewController.view.left = SCREEN_WIDTH; |
1189 | // self.barrageViewController.view.backgroundColor = [UIColor redColor]; | 1196 | // self.barrageViewController.view.backgroundColor = [UIColor redColor]; |
1190 | - self.socketService.barrageViewController = self.barrageViewController; | ||
1191 | } | 1197 | } |
1192 | 1198 | ||
1193 | /** | 1199 | /** |
-
Please register or login to post a comment