I wrote a progressive web application that plays music using the web audio API. The usual journey of the user is to start playing music, and then switch to other applications while continuing to listen to music. This works fine until the android decides that other applications require more resources and closes my PWA without warning.
Is there a way to hint at the browser and OS, which, although they are not in the foreground, the user is still using a specific web application? I'm fine so that it can be removed in the background when the music is paused, but not until the user is still listening.
The main browser that interests me is Chrome for Android (although some kind of platform agnostic would be perfect).
lucas source
share