Bug 1341409 - Fix omission of advanced constraints in applying camera constraints. r=jesup, a=jcristau
authorJan-Ivar Bruaroey <jib@mozilla.com>
Tue, 21 Feb 2017 14:41:58 -0500
changeset 378651 430629581ab99aa891327e2c9d72ab47b595d928
parent 378650 0842f492e64a2fe4b9139fed3cae0fea5a719583
child 378652 ba7e52e5c26a5d56e72afd2b00047df8bd8f0cf9
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, jcristau
bugs1341409
milestone53.0a2
Bug 1341409 - Fix omission of advanced constraints in applying camera constraints. r=jesup, a=jcristau MozReview-Commit-ID: 2qhuv5e6lv9
dom/media/webrtc/MediaTrackConstraints.cpp
--- a/dom/media/webrtc/MediaTrackConstraints.cpp
+++ b/dom/media/webrtc/MediaTrackConstraints.cpp
@@ -292,16 +292,20 @@ NormalizedConstraints::NormalizedConstra
 // This is only used to resolve competing constraints from concurrent requests,
 // something the spec doesn't cover.
 
 NormalizedConstraints::NormalizedConstraints(
     const nsTArray<const NormalizedConstraints*>& aOthers)
   : NormalizedConstraintSet(*aOthers[0])
   , mBadConstraint(nullptr)
 {
+  for (auto& entry : aOthers[0]->mAdvanced) {
+    mAdvanced.push_back(entry);
+  }
+
   // Create a list of member pointers.
   nsTArray<MemberPtrType> list;
   NormalizedConstraints dummy(dom::MediaTrackConstraints(), &list);
 
   // Do intersection of all required constraints, and average of ideals,
 
   for (uint32_t i = 1; i < aOthers.Length(); i++) {
     auto& other = *aOthers[i];