Bug 198277 - Audio stops playing when standalone web app is no longer in foreground
Summary: Audio stops playing when standalone web app is no longer in foreground
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 12
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-27 10:40 PDT by Wes Peter
Modified: 2020-01-20 05:04 PST (History)
15 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Peter 2019-05-27 10:40:25 PDT
Simple repro site at https://ios-standalone-bug.backgroundnoise.app

1. Write a web app that Includes an HTML <audio> element
2. Pin it to home screen on iOS with display:standalone in manifest.json
3. Launch the web app
4. Play the audio
5. Leave the web app

Expected:
Audio keeps playing

Actual:
Audio stops playing.

NOTE: If you play the audio in Safari and leave Safari it keeps playing in the background. This only affects standalone web apps/PWAs
Comment 1 Radar WebKit Bug Importer 2019-05-28 17:18:42 PDT
<rdar://problem/51202332>
Comment 2 Thalles Maia 2019-06-24 07:22:49 PDT
I'm also having this problem on https://podcatcher.app/
Comment 3 martin.spriggs 2019-09-19 15:31:07 PDT
Please get this on somebody's list. We have a very popular PWA with limited functionality on iOS 13 due to no background audio!
Comment 4 Alfred 2019-09-26 08:43:10 PDT
We use WKWebView in our app, and we also have this bug. I've looked sources for a little, and it seems that it is not actually a webkit bug, but something in iOS. Safari manages media via some complicated mechanisms, so it doesn't reproduces there.
Comment 5 Val Mitchell 2019-10-30 07:01:46 PDT
Please get somebody to work on the fix for this issue, this bug blatantly prevents users to have the same experience as native app users.
Comment 6 Orlach Pierre 2019-11-08 09:44:08 PST
Same Problem on my progressive Web app based on audio content. It was perfectly working with previous IOS. It's a huge step backwards for user experience.
Comment 7 Jon Levy 2019-11-24 14:44:54 PST
This is a big problem for our PWA, as well.
Comment 8 Jakub 2019-11-26 07:00:44 PST
I'm having this issue also we need to develop an only native app for Apple other support audio in the backgroung
Comment 9 isabelle 2020-01-08 04:57:46 PST
I'm also having this problem on https://podcasts.ba-ba-bam.com/be-lively-lexperience-bien-etre/
Comment 10 Jer Noble 2020-01-15 08:22:43 PST
Hi everyone, just a quick update: we have been investigating this issue but don’t yet have a solution. We understand that the current behavior blocks a lot of important use cases. But because the issues causing this behavior may be due to the underlying platform, investigation is being tracked inside Radar, rather than here on bugzilla. If we do identify a fix, we’ll ping this thread when that fix is available for testing. Thanks for your patience.
Comment 11 Jon Levy 2020-01-15 08:35:22 PST
(In reply to Jer Noble from comment #10)
It is wonderful to hear that this issue is being investigated!  Thank you for your hard work.  Is there a link to the bug report on Radar, so that I can track the progress?