New issue
Advanced search Search tips

Issue 623066 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

HTML5 Audio Tag stops playing in background

Reported by jws.f...@gmail.com, Jun 24 2016

Issue description

Example URL:
http://p.subfireplayer.net/

Steps to reproduce the problem:
0. ensure unified media flag is still enabled.
1. go to that page
2. start playing something
3. put the chrome page in the background by switching to a CPU intensive app like google docs or maps

What is the expected behavior?
Music will continue playing in the background, and can be paused through the notification drop-down at the top.

What went wrong?
Music will, after a time, simply stop playing. It will restart again immediately when the chrome page has focus.

Did this work before? Yes the previous 53 Dev release, all the way back to stable 50 (if the unified media flag is enabled)

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes 

Chrome version: 53.0.2774.4  Channel: dev
OS Version: 6.0.1
Flash Version: 

appears to be a regression of https://bugs.chromium.org/p/chromium/issues/detail?id=121898

This is new to this particular version of 53-dev. It was working perfectly with the previous 53-dev release (just 3 days ago) as well as the 52 dev and beta. It is working fine with GA 51 and 50 when the unified media flag is turned on.

I worry about this because if it affects not only my own use of the app, but if this bug gets into the WebView component, it will impact my intentions to package my app through PhoneGap and the Google Play Store, which has been on hold until the unified media feature becomes GA release with Chromium 52.

It does not seem to matter if the "require gesture" flag is on or off.
 
Components: -Internals>Media Internals>Media>Audio
Owner: qin...@chromium.org
Status: Assigned (was: Unconfirmed)
Issue reproducible, tested on Samsung Galaxy S6 Edge/MMB29K, Chrome Dev:53.0.2774.4.

Logcat @  http://go/chrome-androidlogs1/6/623066
Ah I think I know what happened, OnSuspend() and OnResume() function differently on Android. We made a change to help desktop suspend, but I think it cuts out audio on Android now.
Will test.

Cc: qin...@chromium.org
Labels: ReleaseBlock-Stable Proj-Spitzer M-52
Owner: dalecur...@chromium.org
Status: Started (was: Assigned)
Yup, it's what I thought, fix coming soon. Sorry about the trouble.

Comment 5 by jws.f...@gmail.com, Jun 24 2016

thanks :)
Thanks for the fast report!
Labels: Merge-Request-52
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 25 2016

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

commit a11de20c793b16d4dc4e5440097f8493666f0721
Author: dalecurtis <dalecurtis@chromium.org>
Date: Sat Jun 25 00:53:49 2016

Restrict OnSuspend() restrictions for audio to non-Android.

On Android suspend and resume work differently than other platforms,
the notifications are delivered a few seconds after an app is put
into the background. We don't want to suspend background audio in
these cases; full player suspend and resume is controlled by the
WebMediaPlayerImpl instead when necessary (video only, paused, etc).

BUG= 623066 
TEST=manual

Review-Url: https://codereview.chromium.org/2098703005
Cr-Commit-Position: refs/heads/master@{#402034}

[modify] https://crrev.com/a11de20c793b16d4dc4e5440097f8493666f0721/media/renderers/audio_renderer_impl.cc

Comment 9 by dimu@google.com, Jun 25 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 25 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84a0e4c0a9d8b6e2ba2850ee50f5d8612deff691

commit 84a0e4c0a9d8b6e2ba2850ee50f5d8612deff691
Author: Dale Curtis <dalecurtis@chromium.org>
Date: Sat Jun 25 01:08:05 2016

Merge M52: "Restrict OnSuspend() restrictions for audio to non-Android."

On Android suspend and resume work differently than other platforms,
the notifications are delivered a few seconds after an app is put
into the background. We don't want to suspend background audio in
these cases; full player suspend and resume is controlled by the
WebMediaPlayerImpl instead when necessary (video only, paused, etc).

BUG= 623066 
TEST=background page in bug, audio plays forever.

Review-Url: https://codereview.chromium.org/2098703005
Cr-Commit-Position: refs/heads/master@{#402034}
(cherry picked from commit a11de20c793b16d4dc4e5440097f8493666f0721)

Review URL: https://codereview.chromium.org/2098853003 .

Cr-Commit-Position: refs/branch-heads/2743@{#477}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/84a0e4c0a9d8b6e2ba2850ee50f5d8612deff691/media/renderers/audio_renderer_impl.cc

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified in M52-52.0.2743.59

Comment 13 by jws.f...@gmail.com, Jun 29 2016

Chrome dev 53.0.2782.2 just arrived on my Android phone (the one I used when I reported this in .2774.4). Bug appears to be fixed here. Many thanks.
I am using version 53.0.2785.97 and this appears to be an issue again. OS 5.1.0 
Thanks for the report, yes something broke since this was tested earlier and is tracked by  issue 644515 . A fix has landed on ToT and if all goes well I'll merge to M54 shortly.

Sign in to add a comment