Skip to content

Commit 1d15983

Browse files
Bernini0anwar-t
andauthored
Added bundle_policy to peer_connection config (#114)
Co-authored-by: anwar-t <[email protected]>
1 parent 5962122 commit 1d15983

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/rtc_peerconnection_impl.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ static std::map<libwebrtc::CandidateNetworkPolicy,
3939
{libwebrtc::CandidateNetworkPolicy::kCandidateNetworkPolicyLowCost,
4040
webrtc::PeerConnectionInterface::kCandidateNetworkPolicyLowCost}};
4141

42+
static std::map<libwebrtc::BundlePolicy,
43+
webrtc::PeerConnectionInterface::BundlePolicy>
44+
bundle_policy_map = {
45+
{libwebrtc::kBundlePolicyBalanced,
46+
webrtc::PeerConnectionInterface::kBundlePolicyBalanced},
47+
{libwebrtc::kBundlePolicyMaxBundle,
48+
webrtc::PeerConnectionInterface::kBundlePolicyMaxBundle},
49+
{libwebrtc::kBundlePolicyMaxCompat,
50+
webrtc::PeerConnectionInterface::kBundlePolicyMaxCompat}};
51+
4252
static std::map<libwebrtc::IceTransportsType,
4353
webrtc::PeerConnectionInterface::IceTransportsType>
4454
ice_transport_type_map = {{libwebrtc::IceTransportsType::kAll,
@@ -382,7 +392,7 @@ bool RTCPeerConnectionImpl::Initialize() {
382392
config.servers.push_back(server);
383393
}
384394
}
385-
395+
config.bundle_policy = bundle_policy_map[configuration_.bundle_policy];
386396
config.sdp_semantics = sdp_semantics_map[configuration_.sdp_semantics];
387397
config.candidate_network_policy =
388398
candidate_network_policy_map[configuration_.candidate_network_policy];

0 commit comments

Comments
 (0)