Expose PeerConnection.restartIce in iOS SDK.

Bug: None
Change-Id: I76b95b3182e6b384fd68aecf4210c23459f76d2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209709
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33402}
This commit is contained in:
Yura Yaroshevich
2021-03-06 23:55:17 +03:00
committed by Commit Bot
parent d67253532f
commit 92d12707e0
2 changed files with 10 additions and 0 deletions

View File

@ -285,6 +285,12 @@ RTC_OBJC_EXPORT
addTransceiverOfType:(RTCRtpMediaType)mediaType
init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *)init;
/** Tells the PeerConnection that ICE should be restarted. This triggers a need
* for negotiation and subsequent offerForConstraints:completionHandler call will act as if
* RTCOfferAnswerOptions::ice_restart is true.
*/
- (void)restartIce;
/** Generate an SDP offer. */
- (void)offerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints
completionHandler:(nullable void (^)(RTC_OBJC_TYPE(RTCSessionDescription) * _Nullable sdp,

View File

@ -537,6 +537,10 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack(
nativeRtpTransceiver:nativeTransceiverOrError.MoveValue()];
}
- (void)restartIce {
_peerConnection->RestartIce();
}
- (void)offerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints
completionHandler:(void (^)(RTC_OBJC_TYPE(RTCSessionDescription) * sessionDescription,
NSError *error))completionHandler {