5 ms·
Yes, MobileSafari plays music (with <audio> and direct links to MP3/M4A, etc.) quite well. The biggest issue with this as a path to replace native audio playbac
by jrk 16y ago
Yes, MobileSafari plays music (with <audio> and direct links to MP3/M4A, etc.) quite well. The biggest issue with this as a path to replace native audio playback apps is how the browser manages resources for background tasks (tabs): they are thrown into a single pool and garbage collected when resources become constrained.
This directly mirrors how the OS manages suspended/background apps, but with the critical difference that the OS specially treats apps which are registered for different background services, like background audio playback, avoiding eviction for things like this which are effectively under active use, even when they are not on-screen.
The solution, I'd argue, is for Apple (and the web working groups, in general) to bring the same sorts of OS design concerns to browsers—in this case, richer interfaces for more intelligent handling of background tasks by both the runtime and the tasks, themselves.
- Tichy 16y agoI was only thinking recently that "background tasks" might be a missing ingredient for HTML 5. They probably don't make sense with traditional desktop browsers, as it is sufficient to keep a tab open with the app. But on mobile browsers it is a different story.
- jrk 16y agoThey aren't as essential for desktop browsers (now), since the relative resource constraints on a given tab are so much smaller, but just as relevant as "desktop" runtimes scale down in power/up in efficiency demands, and as the apps run within them scale up in resource demands. Just look to how much RAM your 25 browser tabs burn, and how warm a single tab with Flash ads can keep your MacBook Air.
- Tichy 16y agoSure, but Background tasks wouldn't alleviate the problem, I think? The tasks would still have to be coded in a "nice" way.