Expose extra ICE params in RTCConfiguration on iOS

Bug: None
Change-Id: I16ca28055cd9ca371f1e21b5950cf759973da894
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213421
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33628}
This commit is contained in:
Yura Yaroshevich
2021-03-31 16:48:39 +03:00
committed by Commit Bot
parent 006206dda9
commit b9fa319586
2 changed files with 73 additions and 0 deletions

View File

@ -58,6 +58,11 @@
@synthesize rtcpVideoReportIntervalMs = _rtcpVideoReportIntervalMs;
@synthesize enableImplicitRollback = _enableImplicitRollback;
@synthesize offerExtmapAllowMixed = _offerExtmapAllowMixed;
@synthesize iceCheckIntervalStrongConnectivity = _iceCheckIntervalStrongConnectivity;
@synthesize iceCheckIntervalWeakConnectivity = _iceCheckIntervalWeakConnectivity;
@synthesize iceUnwritableTimeout = _iceUnwritableTimeout;
@synthesize iceUnwritableMinChecks = _iceUnwritableMinChecks;
@synthesize iceInactiveTimeout = _iceInactiveTimeout;
- (instancetype)init {
// Copy defaults.
@ -138,6 +143,22 @@
_allowCodecSwitching = config.allow_codec_switching.value_or(false);
_enableImplicitRollback = config.enable_implicit_rollback;
_offerExtmapAllowMixed = config.offer_extmap_allow_mixed;
_iceCheckIntervalStrongConnectivity =
config.ice_check_interval_strong_connectivity.has_value() ?
[NSNumber numberWithInt:*config.ice_check_interval_strong_connectivity] :
nil;
_iceCheckIntervalWeakConnectivity = config.ice_check_interval_weak_connectivity.has_value() ?
[NSNumber numberWithInt:*config.ice_check_interval_weak_connectivity] :
nil;
_iceUnwritableTimeout = config.ice_unwritable_timeout.has_value() ?
[NSNumber numberWithInt:*config.ice_unwritable_timeout] :
nil;
_iceUnwritableMinChecks = config.ice_unwritable_min_checks.has_value() ?
[NSNumber numberWithInt:*config.ice_unwritable_min_checks] :
nil;
_iceInactiveTimeout = config.ice_inactive_timeout.has_value() ?
[NSNumber numberWithInt:*config.ice_inactive_timeout] :
nil;
}
return self;
}
@ -271,6 +292,23 @@
nativeConfig->allow_codec_switching = _allowCodecSwitching;
nativeConfig->enable_implicit_rollback = _enableImplicitRollback;
nativeConfig->offer_extmap_allow_mixed = _offerExtmapAllowMixed;
if (_iceCheckIntervalStrongConnectivity != nil) {
nativeConfig->ice_check_interval_strong_connectivity =
absl::optional<int>(_iceCheckIntervalStrongConnectivity.intValue);
}
if (_iceCheckIntervalWeakConnectivity != nil) {
nativeConfig->ice_check_interval_weak_connectivity =
absl::optional<int>(_iceCheckIntervalWeakConnectivity.intValue);
}
if (_iceUnwritableTimeout != nil) {
nativeConfig->ice_unwritable_timeout = absl::optional<int>(_iceUnwritableTimeout.intValue);
}
if (_iceUnwritableMinChecks != nil) {
nativeConfig->ice_unwritable_min_checks = absl::optional<int>(_iceUnwritableMinChecks.intValue);
}
if (_iceInactiveTimeout != nil) {
nativeConfig->ice_inactive_timeout = absl::optional<int>(_iceInactiveTimeout.intValue);
}
return nativeConfig.release();
}