Chromium Code Reviews| Index: content/renderer/media/rtc_media_constraints.cc |
| diff --git a/content/renderer/media/rtc_media_constraints.cc b/content/renderer/media/rtc_media_constraints.cc |
| index 9118152f0bc9230272dacbec4efdb5d26999bc4e..a54825dfdb6c6b0180923641ee51acd175566f56 100644 |
| --- a/content/renderer/media/rtc_media_constraints.cc |
| +++ b/content/renderer/media/rtc_media_constraints.cc |
| @@ -26,6 +26,14 @@ void GetNativeMediaConstraints( |
| if (new_constraint.key == kMediaStreamSource || |
| new_constraint.key == kMediaStreamSourceId) |
| continue; |
| + |
| + // Ignore internal constraints set by JS. |
| + // TODO(jiayl): replace the hard coded string with |
| + // webrtc::MediaConstraintsInterface::kInternalConstraintPrefix when |
| + // the Libjingle change is rolled. |
| + if (new_constraint.key.find("internal") == 0) |
|
tommi (sloooow) - chröme
2013/05/21 08:03:24
if "internal" is a prefix, should we use StartsWit
jiayl
2013/05/21 16:57:15
Done.
|
| + continue; |
| + |
| DVLOG(3) << "MediaStreamConstraints:" << new_constraint.key |
| << " : " << new_constraint.value; |
| native_constraints->push_back(new_constraint); |
| @@ -58,4 +66,10 @@ RTCMediaConstraints::GetOptional() const { |
| return optional_; |
| } |
| +void RTCMediaConstraints::AddOptional( |
| + const std::string& key, const std::string& value) { |
| + webrtc::MediaConstraintsInterface::Constraint new_constraint(key, value); |
| + optional_.push_back(new_constraint); |
| +} |
| + |
| } // namespace content |