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

Issue 737956 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

HLS audio is paused when in background

Reported by nekr.fab...@gmail.com, Jun 29 2017

Issue description

Steps to reproduce the problem:
1. Open on Android: https://omroep-pwa-bmrzqpwxnl.now.sh/
2. Tap "Live Radio"
3. In the opened popup tap "Start listening"
4. Press "Home" button on the device

What is the expected behavior?
Audio keeps playing

What went wrong?
Audio is paused and the tab becomes inactive

Did this work before? No 

Does this work in other browsers? Yes

Chrome version:   Channel: stable
OS Version: OS X 10.11.6
Flash Version: 

I'm not sure, but AFAIK HLS in Chrome went out of stable in M59 because before that I saw it only in Beta.

Also I'm not a HLS expert, maybe it isn't supposed to be used in <audio> elements and is being treated as a video and hence paused in background?
 
Update: using a HLS.js library allowed me to make it work in background, but it would be much better to use a native solution. Also works natively in background on iOS Safari.
Components: -Blink>Media Internals>Media
Cc: tguilbert@chromium.org
Cc: -tguilbert@chromium.org avayvod@chromium.org
Components: -Internals>Media Internals>Media>Audio
Owner: tguilbert@chromium.org
Status: Assigned (was: Unconfirmed)
Because HLS playback is implemented via android.media.MediaPlayer, different from every other media type, it's likely the renderer is told it has video track and so we pause it in the background to avoid wasting bandwidth and power without clear user consent (resuming via the notification/screen lock).
If it doesn't have the video track but we still pause it, it's a bug.
I think the first problem is that MediaResourceGetter doesn't get HLS metadata: https://cs.corp.google.com/clankium/src/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java?rcl=0&l=242
Second is that MediaPlayerRenderer doesn't receive and pass metadata on to the renderer side apart from the video size anyway.
Any updates on this?
Labels: Videostack-HLS

Sign in to add a comment