Since this is a situation that changes almost daily, I will send an updated answer. This applies to recent releases of these browsers, but may change tomorrow!
My music app is HTML5 and needs to be run in the background. Support for this depends on the mobile browser.
- Safari on iOS: Continues playing one or two songs in the background
- Android Native Browser: will play one song and then stop
- Firefox on Android: stops when the screen locks or browser lose focus or song.
- Dolphin on Android: plays in the background, but eventually stops
- Opera on Android: great background support! Javascript continues to work, and music continues to play even when the screen is turned off or Opera goes to the background. Opera even switches play / pause to the notification page. Yay
Here is a related SO issue.
source share