| Index: content/renderer/media/media_stream_audio_processor_options.cc
|
| diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc
|
| index 882d57c8c7bb62691615b2d0327faebeded69883..f70c0900e2532079568527bda19803b81ecbec1c 100644
|
| --- a/content/renderer/media/media_stream_audio_processor_options.cc
|
| +++ b/content/renderer/media/media_stream_audio_processor_options.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/logging.h"
|
| #include "base/path_service.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "content/common/media/media_stream_options.h"
|
| #include "content/renderer/media/rtc_media_constraints.h"
|
| #include "media/audio/audio_parameters.h"
|
| #include "third_party/WebKit/public/platform/WebMediaConstraints.h"
|
| @@ -41,6 +42,10 @@ struct {
|
| webrtc::MediaConstraintsInterface::kValueTrue },
|
| { webrtc::MediaConstraintsInterface::kTypingNoiseDetection,
|
| webrtc::MediaConstraintsInterface::kValueTrue },
|
| +#if defined(OS_WIN)
|
| + { content::kMediaStreamAudioDucking,
|
| + webrtc::MediaConstraintsInterface::kValueTrue },
|
| +#endif
|
| };
|
|
|
| } // namespace
|
| @@ -50,6 +55,12 @@ void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints) {
|
| bool already_set_value;
|
| if (!webrtc::FindConstraint(constraints, kDefaultAudioConstraints[i].key,
|
| &already_set_value, NULL)) {
|
| + // TODO(tommi): This adds the default constraints to the 'mandatory'
|
| + // section but it might make more sense to add these to the optional
|
| + // section since if for whatever reason the default implied constraints
|
| + // aren't supported on some platform then we should not fail the
|
| + // getUserMedia call. 'kMediaStreamAudioDucking' is an example where
|
| + // it is not supported on XP but is supported on newer versions.
|
| constraints->AddMandatory(kDefaultAudioConstraints[i].key,
|
| kDefaultAudioConstraints[i].value, false);
|
| } else {
|
|
|