Add ios bindings for PeerConnectionState.

This change makes it possible for ios apps to use the new standards-compliant PeerConnectionState.

Originally reviewed as https://webrtc-review.googlesource.com/c/110502, with an added check to prevent calling unimplemented optional method.

Bug: webrtc:9977
Change-Id: Iebac8ce58d435e38450add51b8915575d0ffd934
Reviewed-on: https://webrtc-review.googlesource.com/c/111084
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25727}
This commit is contained in:
Jonas Olsson
2018-11-15 16:52:45 +01:00
committed by Commit Bot
parent 49a7843030
commit cfddbb7e14
4 changed files with 98 additions and 6 deletions

View File

@ -404,6 +404,11 @@ static int const kKbpsMultiplier = 1000;
});
}
- (void)peerConnection:(RTCPeerConnection *)peerConnection
didChangeConnectionState:(RTCPeerConnectionState)newState {
RTCLog(@"ICE+DTLS state changed: %ld", (long)newState);
}
- (void)peerConnection:(RTCPeerConnection *)peerConnection
didChangeIceGatheringState:(RTCIceGatheringState)newState {
RTCLog(@"ICE gathering state changed: %ld", (long)newState);