RESOLVED FIXED 203293
WKWebView: audio tag sound stops when app goes to background on iOS 13
https://bugs.webkit.org/show_bug.cgi?id=203293
Summary WKWebView: audio tag sound stops when app goes to background on iOS 13
jcesarmobile
Reported 2019-10-23 08:01:57 PDT
Current Behaviour: When using an audio tag to reproduce sound on a WKWebView, the sound stops shortly after the apps goes to background. Only happens on iOS 13 (including 13.2 beta). Expected Behaviour: Sound should continue with the app in background as it did on iOS 12 and older Sample app reproducing the issue: https://github.com/jcesarmobile/background-audio-bug (note that the app has background mode enabled for audio and still doesn't prevent from pausing the audio)
Attachments
Radar WebKit Bug Importer
Comment 1 2019-10-23 10:45:26 PDT
Trent Brown
Comment 2 2019-11-29 02:42:10 PST
It appears that this is due to web audio from the wkwebview not having the same entitlement that safari has for background keeping background proccesses open.
Maxim Balyaba
Comment 3 2020-02-25 05:08:35 PST
Hello Trent Brown! Do you mean that it is not an issue ?
Joe Moore
Comment 4 2020-03-04 10:07:39 PST
Can someone please acknowledge this? It's a new bug, as far as I am aware, introduced with iOS 13 (or possibly more specifically 13.2) and is impacting countless applications and developers worldwide, myself included. Prior to this bug, audio playing on a page viewed in webkit worked perfectly fine, even after backgrounding the app or putting the phone to sleep. We have a significant amount of content that is nearly unusable as a result of this bug.
JTerr
Comment 5 2020-04-15 14:23:16 PDT
I am having this issue as well, is there any fix coming soon?
Pedro Furtado
Comment 6 2020-05-18 09:28:20 PDT
Any news in this issue? It affects ALL hybrid apps that play sounds in background in IOS environment.
Timothy Hatcher
Comment 7 2020-05-26 06:42:04 PDT
*** This bug has been marked as a duplicate of bug 205687 ***
JTerr
Comment 8 2020-05-26 07:50:35 PDT
(In reply to Timothy Hatcher from comment #7) > > *** This bug has been marked as a duplicate of bug 205687 *** I see this has been marked duplicate and resolved. Do you know when this will be live? I updated to ios 13.5 and i am still having issues today. Thank you for any information you can pass along.
Chris Dumez
Comment 9 2020-05-27 16:11:51 PDT
(In reply to Timothy Hatcher from comment #7) > > *** This bug has been marked as a duplicate of bug 205687 *** Why this you dupe this Tim? Did you verify this actually fixed this particular issue?
Pedro Furtado
Comment 10 2020-06-01 16:45:05 PDT
In which version of iOS it will be available?
JTerr
Comment 11 2020-06-02 07:52:49 PDT
Yes it would be very helpful to know which version of iOS this bug will be fixed on. Our entire WKWebview app audio has not worked in months. Thank you
Pedro Furtado
Comment 12 2020-06-02 13:29:17 PDT
Because of duplicated ticket related to this bug is resolved and released in iOS 13.5.1, this bug is fixed in iOS 13.5.1?
Pedro Furtado
Comment 13 2020-06-02 19:39:39 PDT
Please, can you reopen this bug? It was not fixed in iOS 13.5.1.
Chris Dumez
Comment 14 2020-06-02 20:31:43 PDT
(In reply to Pedro Furtado from comment #13) > Please, can you reopen this bug? It was not fixed in iOS 13.5.1. Did you validate that it was indeed not fixed in iOS 13.5.1. If so I will happily un-dupe.
Chris Dumez
Comment 15 2020-06-02 20:32:41 PDT
Reopening this the duping was wrong.
Joe Moore
Comment 16 2020-06-03 07:17:49 PDT
Can someone please prioritize this bug? I think the flurry of activity around this and the bug that this was (briefly) marked as a dupe of should be indicative of how many people are eager for this to be fixed. This appears to have been a problem for over a year at this point (per this bug: https://bugs.webkit.org/show_bug.cgi?id=198277).
Jon Levy
Comment 17 2020-06-03 08:16:06 PDT
I just want to add my voice others asking that this bug be treated as high priority.
JTerr
Comment 18 2020-06-03 08:59:05 PDT
^^^ I too would love to see this as a priority. I appreciate the help on this issue and hope we can resolve soon :)
Pedro Furtado
Comment 19 2020-06-05 08:24:32 PDT
Let's wait an official declaration of maintainers ...
Bernardo Oliveira
Comment 20 2020-06-09 01:05:44 PDT
Here I'm using the iOS 13.5.1 and audio still stops playing when a standalone web app is no longer in the foreground or in lock screen.
Chris Dumez
Comment 21 2020-06-11 14:37:58 PDT
We are actively working on this. The reason you are not seeing activity on this bug is because the fixes are not in WebKit but rather in other components of the system. We will comment here when we have this fully fixed.
Pedro Furtado
Comment 22 2020-06-11 19:33:24 PDT
Thank you so much for this feedback! We are looking forward to a release asap with this bugfix. Many apps that my company develops does not work properly for months. But we are happy to see this bug is now a high priority. Thanks again!
Pedro Furtado
Comment 23 2020-06-20 08:34:47 PDT
Is there some news available for us?
Chris Dumez
Comment 24 2020-06-20 09:47:01 PDT
(In reply to Pedro Furtado from comment #23) > Is there some news available for us? The news I have is that we have a complete fix and the corresponding radar has been marked as fixed. I have also validated that the fix is working. However, I am unable to comment on when the fix will ship. I will try and remember to update this bug when it does ship though.
Pedro Furtado
Comment 25 2020-06-20 10:17:10 PDT
Oh, that is a great, very great news! Thanks for feedback! Well, now we just have to wait a release with this fix asap, but knowing that is already fixed is a very good news!
Jon Levy
Comment 26 2020-06-20 12:03:27 PDT
Great news, that there is a fix! I eagerly await more information about when it will be deployed.
Adel Abdelli
Comment 27 2020-06-22 00:09:16 PDT
Hello, Do you know approximately when the fix will be released ? This bug is very problematic because our applications do not work anymore on IOS and we have a lot of pressure from our company. Please let inform us ..
Maxim Balyaba
Comment 28 2020-06-22 00:35:56 PDT
Looks like issue is fixed after latest iOS update. Tested on iphone xr ios 13.5.1
Pedro Furtado
Comment 29 2020-06-22 03:28:29 PDT
Negative. iOS 13.5.1 without this fix there. That's why we are waiting a release ...
Maxim Balyaba
Comment 30 2020-06-22 03:42:02 PDT
We are tested cordova ionic 4 app, with <audio> tag. Before it stops after 30sec app in background. Now all is fine (tested by different users and devices). Do you set background audio setting ? https://developer.apple.com/documentation/avfoundation/media_assets_playback_and_editing/creating_a_basic_video_player_ios_and_tvos/enabling_background_audio
Pedro Furtado
Comment 31 2020-06-22 03:44:53 PDT
Oh Yeah. But if the audio pause because of internet lack, or anything else, it not allow play again. In that case, only with the app in foreground is possible. So, bugfix is not released yet. But we are happy to see this released asap.
Pedro Furtado
Comment 32 2020-07-10 15:55:36 PDT
IOS 14 will have this bugfix? Please, say yes kkkkkk
Chris Dumez
Comment 33 2020-07-10 16:02:53 PDT
(In reply to Pedro Furtado from comment #32) > IOS 14 will have this bugfix? Please, say yes kkkkkk The fix should be present in iOS 14 beta 2 which got released a few days ago. I encourage people to test.
Cybronics
Comment 34 2020-07-13 06:55:17 PDT
(In reply to Chris Dumez from comment #33) > (In reply to Pedro Furtado from comment #32) > > IOS 14 will have this bugfix? Please, say yes kkkkkk > > The fix should be present in iOS 14 beta 2 which got released a few days > ago. I encourage people to test. can confirm. Thanks guys.
Pedro Furtado
Comment 35 2020-08-13 06:55:15 PDT
The bugs still happens in ios 14 beta. Oh god! Can you guys reopen the bug, please?
jcesarmobile
Comment 36 2020-08-21 07:18:34 PDT
The issue I reported is fixed, I've tested on iPadOS 14 beta 4 and beta 5, and verified that works on both. So if you are facing a similar problem, better report a new issue. You can try the sample app I provided to reproduce the issue, just updated the audio file because the link I used was down. https://github.com/jcesarmobile/background-audio-bug
Calvin Ho
Comment 37 2020-09-21 11:07:44 PDT
I confirm that this bug is fixed in iOS 14.0. Thanks!
Note You need to log in before you can comment on or make changes to this bug.