| 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..029e82f94612928ef156b00dd0427f81df2f1928 100644
|
| --- a/content/renderer/media/rtc_media_constraints.cc
|
| +++ b/content/renderer/media/rtc_media_constraints.cc
|
| @@ -4,7 +4,7 @@
|
| #include "content/renderer/media/rtc_media_constraints.h"
|
|
|
| #include "base/logging.h"
|
| -
|
| +#include "base/string_util.h"
|
| #include "content/common/media/media_stream_options.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaConstraints.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
|
| @@ -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 (StartsWithASCII(new_constraint.key, "internal", true))
|
| + continue;
|
| +
|
| DVLOG(3) << "MediaStreamConstraints:" << new_constraint.key
|
| << " : " << new_constraint.value;
|
| native_constraints->push_back(new_constraint);
|
| @@ -58,4 +66,9 @@ RTCMediaConstraints::GetOptional() const {
|
| return optional_;
|
| }
|
|
|
| +void RTCMediaConstraints::AddOptional(const std::string& key,
|
| + const std::string& value) {
|
| + optional_.push_back(Constraint(key, value));
|
| +}
|
| +
|
| } // namespace content
|
|
|