Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2170)

Unified Diff: content/renderer/media/user_media_client_impl.cc

Issue 1725213002: Fix hotword module constantly restarting on Pixel 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698