Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: webrtc/examples/objc/AppRTCDemo/ARDAppClient.m

Issue 1972483002: Pass around the candidate removals events in IOS clients Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge with head Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
index 86d18d1333c6b1bd58f77a366e557ff062e82010..8fb1841e391a16eb814235c21abd7a4dcc781eda 100644
--- a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
@@ -330,6 +330,7 @@ static BOOL const kARDAppClientEnableTracing = NO;
[_messageQueue insertObject:message atIndex:0];
break;
case kARDSignalingMessageTypeCandidate:
+ case kARDSignalingMessageTypeCandidateRemoval:
[_messageQueue addObject:message];
break;
case kARDSignalingMessageTypeBye:
@@ -410,6 +411,16 @@ static BOOL const kARDAppClientEnableTracing = NO;
}
- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ didRemoveIceCandidates:(NSArray<RTCIceCandidate *> *)candidates {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ ARDICECandidateRemovalMessage *message =
+ [[ARDICECandidateRemovalMessage alloc]
+ initWithRemovedCandidates:candidates];
+ [self sendSignalingMessage:message];
+ });
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
didOpenDataChannel:(RTCDataChannel *)dataChannel {
}
@@ -573,6 +584,12 @@ static BOOL const kARDAppClientEnableTracing = NO;
[_peerConnection addIceCandidate:candidateMessage.candidate];
break;
}
+ case kARDSignalingMessageTypeCandidateRemoval: {
+ ARDICECandidateRemovalMessage *candidateMessage =
+ (ARDICECandidateRemovalMessage *)message;
+ [_peerConnection removeIceCandidates:candidateMessage.candidates];
+ break;
+ }
case kARDSignalingMessageTypeBye:
// Other client disconnected.
// TODO(tkchin): support waiting in room for next client. For now just
« no previous file with comments | « no previous file | webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698