Index: content/renderer/media/user_media_client_impl.cc |
diff --git a/content/renderer/media/user_media_client_impl.cc b/content/renderer/media/user_media_client_impl.cc |
index 16d1427bb0cc4c4eaf4337c695d05350d8076bb3..d9e7d65731b6f8965e71d22a96129482991cdfe5 100644 |
--- a/content/renderer/media/user_media_client_impl.cc |
+++ b/content/renderer/media/user_media_client_impl.cc |
@@ -69,8 +69,17 @@ void CopyBlinkRequestToStreamControls(const blink::WebUserMediaRequest& request, |
// TODO(hta): Get alternatives only mentioned in advanced array. |
CopyVector(audio_basic.deviceId.ideal(), |
&controls->audio.alternate_device_ids); |
- if (!audio_basic.hotwordEnabled.matches(false)) |
- controls->hotword_enabled = true; |
+ |
+ if (audio_basic.hotwordEnabled.hasExact()) { |
+ controls->hotword_enabled = audio_basic.hotwordEnabled.exact(); |
+ } else { |
+ for (const auto& audio_advanced : request.audioConstraints().advanced()) { |
+ if (audio_advanced.hotwordEnabled.hasExact()) { |
+ controls->hotword_enabled = audio_advanced.hotwordEnabled.exact(); |
+ break; |
+ } |
+ } |
+ } |
} |
if (!request.videoConstraints().isNull()) { |
const blink::WebMediaTrackConstraintSet& video_basic = |