<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>203293</bug_id>
          
          <creation_ts>2019-10-23 08:01:57 -0700</creation_ts>
          <short_desc>WKWebView: audio tag sound stops when app goes to background on iOS 13</short_desc>
          <delta_ts>2020-09-21 11:07:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="jcesarmobile">juliosincesar</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aaron</cc>
    
    <cc>adel.abdelli.aa</cc>
    
    <cc>bernardo.oliveira</cc>
    
    <cc>cdumez</cc>
    
    <cc>ch235</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>jon</cc>
    
    <cc>joshterry55</cc>
    
    <cc>mbalyaba</cc>
    
    <cc>pedro.felipe.azevedo.furtado</cc>
    
    <cc>peng.liu6</cc>
    
    <cc>protean</cc>
    
    <cc>trent</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1582807</commentid>
    <comment_count>0</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2019-10-23 08:01:57 -0700</bug_when>
    <thetext>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&apos;t prevent from pausing the audio)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1582875</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-10-23 10:45:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/56544807&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1594162</commentid>
    <comment_count>2</comment_count>
    <who name="Trent Brown">trent</who>
    <bug_when>2019-11-29 02:42:10 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1622574</commentid>
    <comment_count>3</comment_count>
    <who name="Maxim Balyaba">mbalyaba</who>
    <bug_when>2020-02-25 05:08:35 -0800</bug_when>
    <thetext>Hello Trent Brown!
Do you mean that it is not an issue ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1625595</commentid>
    <comment_count>4</comment_count>
    <who name="Joe Moore">protean</who>
    <bug_when>2020-03-04 10:07:39 -0800</bug_when>
    <thetext>Can someone please acknowledge this? It&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1641986</commentid>
    <comment_count>5</comment_count>
    <who name="JTerr">joshterry55</who>
    <bug_when>2020-04-15 14:23:16 -0700</bug_when>
    <thetext>I am having this issue as well, is there any fix coming soon?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1653636</commentid>
    <comment_count>6</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-05-18 09:28:20 -0700</bug_when>
    <thetext>Any news in this issue? It affects ALL hybrid apps that play sounds in background in IOS environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1656019</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2020-05-26 06:42:04 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 205687 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1656032</commentid>
    <comment_count>8</comment_count>
    <who name="JTerr">joshterry55</who>
    <bug_when>2020-05-26 07:50:35 -0700</bug_when>
    <thetext>(In reply to Timothy Hatcher from comment #7)
&gt; 
&gt; *** 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1656664</commentid>
    <comment_count>9</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-05-27 16:11:51 -0700</bug_when>
    <thetext>(In reply to Timothy Hatcher from comment #7)
&gt; 
&gt; *** 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658109</commentid>
    <comment_count>10</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-01 16:45:05 -0700</bug_when>
    <thetext>In which version of iOS it will be available?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658295</commentid>
    <comment_count>11</comment_count>
    <who name="JTerr">joshterry55</who>
    <bug_when>2020-06-02 07:52:49 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658429</commentid>
    <comment_count>12</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-02 13:29:17 -0700</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658583</commentid>
    <comment_count>13</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-02 19:39:39 -0700</bug_when>
    <thetext>Please, can you reopen this bug? It was not fixed in iOS 13.5.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658593</commentid>
    <comment_count>14</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-06-02 20:31:43 -0700</bug_when>
    <thetext>(In reply to Pedro Furtado from comment #13)
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658594</commentid>
    <comment_count>15</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-06-02 20:32:41 -0700</bug_when>
    <thetext>Reopening this the duping was wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658684</commentid>
    <comment_count>16</comment_count>
    <who name="Joe Moore">protean</who>
    <bug_when>2020-06-03 07:17:49 -0700</bug_when>
    <thetext>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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658694</commentid>
    <comment_count>17</comment_count>
    <who name="Jon Levy">jon</who>
    <bug_when>2020-06-03 08:16:06 -0700</bug_when>
    <thetext>I just want to add my voice others asking that this bug be treated as high priority.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658712</commentid>
    <comment_count>18</comment_count>
    <who name="JTerr">joshterry55</who>
    <bug_when>2020-06-03 08:59:05 -0700</bug_when>
    <thetext>^^^ I too would love to see this as a priority. I appreciate the help on this issue and hope we can resolve soon :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1659593</commentid>
    <comment_count>19</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-05 08:24:32 -0700</bug_when>
    <thetext>Let&apos;s wait an official declaration of maintainers ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660609</commentid>
    <comment_count>20</comment_count>
    <who name="Bernardo Oliveira">bernardo.oliveira</who>
    <bug_when>2020-06-09 01:05:44 -0700</bug_when>
    <thetext>Here I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1661743</commentid>
    <comment_count>21</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-06-11 14:37:58 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1661825</commentid>
    <comment_count>22</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-11 19:33:24 -0700</bug_when>
    <thetext>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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664736</commentid>
    <comment_count>23</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-20 08:34:47 -0700</bug_when>
    <thetext>Is there some news available for us?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664740</commentid>
    <comment_count>24</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-06-20 09:47:01 -0700</bug_when>
    <thetext>(In reply to Pedro Furtado from comment #23)
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664741</commentid>
    <comment_count>25</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-20 10:17:10 -0700</bug_when>
    <thetext>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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664762</commentid>
    <comment_count>26</comment_count>
    <who name="Jon Levy">jon</who>
    <bug_when>2020-06-20 12:03:27 -0700</bug_when>
    <thetext>Great news, that there is a fix!  I eagerly await more information about when it will be deployed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664946</commentid>
    <comment_count>27</comment_count>
    <who name="Adel Abdelli">adel.abdelli.aa</who>
    <bug_when>2020-06-22 00:09:16 -0700</bug_when>
    <thetext>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 ..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664950</commentid>
    <comment_count>28</comment_count>
    <who name="Maxim Balyaba">mbalyaba</who>
    <bug_when>2020-06-22 00:35:56 -0700</bug_when>
    <thetext>Looks like issue is fixed after latest iOS update.
Tested on iphone xr ios 13.5.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664980</commentid>
    <comment_count>29</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-22 03:28:29 -0700</bug_when>
    <thetext>Negative. iOS 13.5.1 without this fix there. That&apos;s why we are waiting a release ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664982</commentid>
    <comment_count>30</comment_count>
    <who name="Maxim Balyaba">mbalyaba</who>
    <bug_when>2020-06-22 03:42:02 -0700</bug_when>
    <thetext>We are tested cordova ionic 4 app, with &lt;audio&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664983</commentid>
    <comment_count>31</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-06-22 03:44:53 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1670628</commentid>
    <comment_count>32</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-07-10 15:55:36 -0700</bug_when>
    <thetext>IOS 14 will have this bugfix? Please, say yes kkkkkk</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1670633</commentid>
    <comment_count>33</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-07-10 16:02:53 -0700</bug_when>
    <thetext>(In reply to Pedro Furtado from comment #32)
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1671017</commentid>
    <comment_count>34</comment_count>
    <who name="Cybronics">webkit</who>
    <bug_when>2020-07-13 06:55:17 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #33)
&gt; (In reply to Pedro Furtado from comment #32)
&gt; &gt; IOS 14 will have this bugfix? Please, say yes kkkkkk
&gt; 
&gt; The fix should be present in iOS 14 beta 2 which got released a few days
&gt; ago. I encourage people to test.

can confirm. Thanks guys.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679968</commentid>
    <comment_count>35</comment_count>
    <who name="Pedro Furtado">pedro.felipe.azevedo.furtado</who>
    <bug_when>2020-08-13 06:55:15 -0700</bug_when>
    <thetext>The bugs still happens in ios 14 beta. Oh god! Can you guys reopen the bug, please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1681964</commentid>
    <comment_count>36</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2020-08-21 07:18:34 -0700</bug_when>
    <thetext>The issue I reported is fixed, I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690355</commentid>
    <comment_count>37</comment_count>
    <who name="Calvin Ho">ch235</who>
    <bug_when>2020-09-21 11:07:44 -0700</bug_when>
    <thetext>I confirm that this bug is fixed in iOS 14.0. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>