Add WEB_RTC_NON_CELLULAR enum, VI

PiperOrigin-RevId: 690941154
This commit is contained in:
Edwin Wu
2024-10-29 02:56:40 -07:00
committed by Copybara-Service
parent 0e4379ddc6
commit 7fca68d543
8 changed files with 50 additions and 43 deletions
+4 -3
View File
@@ -90,9 +90,10 @@ class WebRtcMedium {
PeerConnectionCallback callback) {
if (FeatureFlags::GetInstance()
.GetFlags()
.support_web_rtc_non_cellular_medium) {
// TODO(edwinwu): Add support for non-cellular networks.
impl_->CreatePeerConnection(std::nullopt, observer, std::move(callback));
.support_web_rtc_non_cellular_medium && non_cellular_) {
std::optional<webrtc::PeerConnectionFactoryInterface::Options> options;
options->network_ignore_mask |= rtc::ADAPTER_TYPE_CELLULAR;
impl_->CreatePeerConnection(options, observer, std::move(callback));
} else {
impl_->CreatePeerConnection(observer, std::move(callback));
}