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 |