New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 845016 link

Starred by 15 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

steals audio focus when playing muted video

Reported by mi...@mikelward.com, May 20 2018

Issue description

Example URL:
https://m.facebook.com

Steps to reproduce the problem:
1. Start playing a song in Google Play Music
2. Open Chrome, go to https://m.facebook.com, log in
3. Scroll to an auto playing video in the News Feed

What is the expected behavior?
It does not auto play, or if it auto plays silently it doesn't have any effect on another app that's playing music.

What went wrong?
Chrome shows a playback notification, Google Play Music pauses, as if Chrome had stolen audio focus.

Did this work before? N/A 

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? N/A

Chrome version: 66.0.3359.82  Channel: stable
OS Version: 8.1.99
Flash Version: 

Contents of chrome://gpu:
 

Comment 1 by mi...@mikelward.com, May 20 2018

Possibly related to issue 764133.
Labels: Needs-triage-Mobile
Cc: pnangunoori@chromium.org mlamouri@chromium.org
Labels: -Type-Bug Triaged-Mobile Type-Feature
This issue seems to be Feature Request. Also CC'ing mlamouri@ for further inputs.

mlamouri@ -- Could you please look into this issue as mentioned behavior is observed.

Thanks!
Components: -Internals>Media Blink>Media>Autoplay
Owner: mlamouri@chromium.org
Status: Assigned (was: Unconfirmed)
We do not take audio focus for muted autoplay today but the way we did doesn't work very well with the new autoplay policy: if the page is allowed to autoplay with sound, you will see a notification, even if the playback is muted.

Comment 5 by mi...@mikelward.com, May 21 2018

Issue 764133 suggests maybe it plays a silent audio placeholder.  If it's truly just showing a notification but not playing any audio or making any sound-related request, then maybe it's an Android platform bug.  Please double check and advise if I should file an Android bug.

Comment 6 by mi...@mikelward.com, May 21 2018

Interesting: it only shows the notification if I already tapped elsewhere on the page, e.g. if I "Liked" a different post several logical pages higher.
Cc: johnpallett@chromium.org
 Issue 849479  has been merged into this issue.
Labels: -Pri-2 -Type-Feature Pri-1 Type-Bug-Regression
Changing to a regression (since it's a change in behavior from a user perspective) and marking as P1
Status: Started (was: Assigned)
Cc: owe...@chromium.org avayvod@chromium.org
 Issue 714792  has been merged into this issue.
Cc: beccahughes@chromium.org jbanavatu@chromium.org
 Issue 853366  has been merged into this issue.
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/366dd847d9e3e82674496c103cb5af175a152475

commit 366dd847d9e3e82674496c103cb5af175a152475
Author: Mounir Lamouri <mlamouri@chromium.org>
Date: Tue Jun 19 17:20:04 2018

Autoplay: do not take audio focus until media element plays unmuted.

With the new autoplay policy, the heuristic to take audio focus for
muted autoplay no longer works and web pages ends up stealing audio
focus for no audible reasons.

Bug:  845016 
Change-Id: Ie34d3a66ac5027720fe4ee4546b4c320127f3870
Reviewed-on: https://chromium-review.googlesource.com/1087784
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568506}
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/AutoplayMutedNotificationTest.java
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/content/browser/media/media_web_contents_observer.cc
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/content/public/browser/web_contents_observer.h
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/content/renderer/media/stream/webmediaplayer_ms_unittest.cc
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/content/test/data/media/session/autoplay-muted.html
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/media/blink/webmediaplayer_impl_unittest.cc
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/third_party/blink/public/platform/web_media_player_client.h
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/third_party/blink/renderer/core/html/media/autoplay_policy.cc
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/third_party/blink/renderer/core/html/media/autoplay_policy.h
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/third_party/blink/renderer/core/html/media/html_media_element.cc
[modify] https://crrev.com/366dd847d9e3e82674496c103cb5af175a152475/third_party/blink/renderer/core/html/media/html_media_element.h

Status: Fixed (was: Started)
Not asking for a merge because the change is a bit involved and we are deep into M68 Beta release. If someone feels strongly, lmk.
Labels: Target-69
 Issue 864969  has been merged into this issue.
 Issue 865148  has been merged into this issue.

Sign in to add a comment