Index: content/renderer/media/webrtc/peer_connection_dependency_factory.cc |
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc |
index f2f7f1d109b24b975286dfeeea9a6e48fa2de036..92ea66bde071e455d0af997e4f958a7df71f3425 100644 |
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc |
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc |
@@ -98,6 +98,14 @@ void HarmonizeConstraintsAndEffects(RTCMediaConstraints* constraints, |
} |
DVLOG(1) << "Disabling constraint: " |
<< kConstraintEffectMap[i].constraint; |
+ } else if (kConstraintEffectMap[i].effect == |
+ media::AudioParameters::DUCKING && value && !is_mandatory) { |
+ // Special handling of the DUCKING flag that sets the optional |
+ // constraint to |false| to match what the device will support. |
+ constraints->AddOptional(kConstraintEffectMap[i].constraint, |
+ webrtc::MediaConstraintsInterface::kValueFalse, true); |
+ // No need to modify |effects| since the ducking flag is already off. |
+ DCHECK((*effects & media::AudioParameters::DUCKING) == 0); |
} |
} |
} |