Audio playback service
I received the following in an email from a user:
Sorry to bother you, but maybe your knowledge might shine a
light on an old "playing an audio stream stops after screen went off"
issue. I have 6 phones here, Android 5.0.2, three 6.0.1 and two 7.1.2
versions, all showing the same behaviour with almost all browsers,
running both the Webkit or Gecko engine. To reproduce the issue you can
do the following (note: site needs 1st party cookies and JS):
1) go to http://radio.dos.nl/ and select one of the radio stations (you
can swipe L/R between pages)
2) turn off screen, the sound continues for a few minutes
3) after some time the sound stops, BUT: a network dump shows that
the stream continues (!)
4) switch on the screen, the sound restarts, but all you hear is what
remains in the buffer and when the buffer is empty after some seconds,
the sound stops. And again: the (inaudible) network stream still
5) The inaudible network stream stops when the "stop" button is
selected, so apparently PB still has some control over the stream.
6) the inaudible network stream will not continue eternally, after some
time the inaudible stream stops anyway.
Apparently PB (and many many other browsers) do not agree with the OS
on what to do with the stream. OTOH: there are a few browsers which
work as expected: e.g. Chromium, Chrome, FireFox and Opera, although
the latter lacks mp3 support due to license issues.
What these working browsers have in common is a loudspeaker icon in the
top bar and when the top bar is pulled down, a control panel is shown,
even when the screen is locked (see attachments)
Would that small icon hide the solution to this problem? Is there maybe
some vague library call that is used for playing audio streams which
causes the icon and control panel to be present?