Bug 203293
Summary: | WKWebView: audio tag sound stops when app goes to background on iOS 13 | ||
---|---|---|---|
Product: | WebKit | Reporter: | jcesarmobile <juliosincesar> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Major | CC: | aaron, adel.abdelli.aa, bernardo.oliveira, cdumez, ch235, eric.carlson, jer.noble, jon, joshterry55, mbalyaba, pedro.felipe.azevedo.furtado, peng.liu6, protean, trent, webkit-bug-importer, webkit |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 13 |
jcesarmobile
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/56544807>
Trent Brown
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
Hello Trent Brown!
Do you mean that it is not an issue ?
Joe Moore
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
I am having this issue as well, is there any fix coming soon?
Pedro Furtado
Any news in this issue? It affects ALL hybrid apps that play sounds in background in IOS environment.
Timothy Hatcher
*** This bug has been marked as a duplicate of bug 205687 ***
JTerr
(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
(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
In which version of iOS it will be available?
JTerr
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
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
Please, can you reopen this bug? It was not fixed in iOS 13.5.1.
Chris Dumez
(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
Reopening this the duping was wrong.
Joe Moore
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
I just want to add my voice others asking that this bug be treated as high priority.
JTerr
^^^ 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
Let's wait an official declaration of maintainers ...
Bernardo Oliveira
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
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
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
Is there some news available for us?
Chris Dumez
(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
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
Great news, that there is a fix! I eagerly await more information about when it will be deployed.
Adel Abdelli
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
Looks like issue is fixed after latest iOS update.
Tested on iphone xr ios 13.5.1
Pedro Furtado
Negative. iOS 13.5.1 without this fix there. That's why we are waiting a release ...
Maxim Balyaba
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
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
IOS 14 will have this bugfix? Please, say yes kkkkkk
Chris Dumez
(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
(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
The bugs still happens in ios 14 beta. Oh god! Can you guys reopen the bug, please?
jcesarmobile
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
I confirm that this bug is fixed in iOS 14.0. Thanks!