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

Issue 826715 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 814817
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

Audio focus behavior on Android

Reported by b.negova...@levi9.com, Mar 28 2018

Issue description

Device name: Motorola moto X (2nd gen)

From "Settings > About Chrome"
Application version:
Operating system: 6.1

Steps to reproduce:
I have question regarding behavior of audio focus and WebView.

I’m developing SDK which is used to display ads. Inside SDK we use WebView which needs to display ad and to display device volume inside HTML ad. So we have sample application which uses WebView and loads HTML ad (with video inside which auto plays). After that we need to register audio volume change event on android device and report it back to ad (with media stream volume) which will display that data. 

Implementation is that we request audio focus (inside SDK) and only if app (SDK) has audio focus we are going to report volume change to ad. Problem is when HTML ad which has video inside of it is loaded and video starts, WebView takes audio focus away from our host app. Is there any workaround for this issue, and if there is what we can do to maintain audio focus on app side? During testing I saw that while video is playing, audio focus is away from our sample app and returns after video finishes.

If you answer me ASAP it would be great.

Thanks in advance!



 
Labels: Needs-triage-Mobile
Cc: sandeepkumars@chromium.org
Components: Mobile>WebView
Labels: Triaged-Mobile Needs-Feedback
@b.negovanovic: Thanks for the report!!

Could you please help us with a sample app or .apk file where you're seeing this issue?

Thanks!!
@sandeepkumars I have attached apk with this message. Go to 3rd tab and select custom placement from the list, enter placement id 1147497 and click show creative.

You can see that when video starts playing app looses focus and in that case we retrun null, and when video ends app gains focus again and we show volume value.
mobileads-live-release.apk
2.7 MB Download
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 29 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by boliu@chromium.org, Mar 29 2018

Components: Internals>Media>Audio
maybe someone on the media team can answer your question

Without knowing anything in this area, I'm kind of amazed that the webview can steal audio focus from its own app.

Comment 6 by boliu@chromium.org, Mar 29 2018

Mergedinto: 814817
Status: Duplicate (was: Unconfirmed)
Actually, might be worth merging this to the other audio focus bug. Both boils down to:
what is the current behavior?
can that behavior be improved, maybe through new APIs?

Sign in to add a comment