title: iOS 13 webaudio is totally broken for html audio elements within a webview
body: <p>I'm building a mobile game using cordova, using wkwebview, and I'm having a major issue with audio not working on iOS 13 (specifically iPadOS 13.2.2). I have several html audio elements connected to an AudioContext, and when I play one after the context has been resumed, there are no js errors and everything looks good from the js side. However, it doesn't play any sound, and on the native iOS side, it throws this error:</p>
  
  <pre><code>2019-11-15 18:27:09.610800-0500 MyApp[9045:99562] [assertion] Error acquiring assertion: &lt;NSError: 0x2811ddfe0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"&gt; {
      userInfo = {
          RBSAssertionAttribute = &lt;RBSLegacyAttribute: 0x111048cf0; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority&gt;;
      }
  }
  2019-11-15 18:27:09.610840-0500 MyApp[9045:99562] [ProcessSuspension]  0x108ee7138 - ProcessAssertion() PID 9045 Unable to acquire assertion for process with PID 9045
  2019-11-15 18:27:09.610894-0500 MyApp[9045:99269] [ProcessSuspension] 0x108ee7138 - ProcessAssertion::processAssertionWasInvalidated()
  </code></pre>
  
  <p>I've tried adding the "Audio, AirPlay, and Picture in Picture" and "Background processing" flags in the Background Modes tab of xcode, but they had no effect. Other things to note: it plays audio in the simulator even though it still throws the error, but fails to play on an actual device. Also, audio does play correctly using AudioBuffer's, it's just Audio elements that are affected. Unfortunately, I can't use AudioBuffers for my soundtrack because they're only designed for short sounds, and take way too long to load for full length songs.</p>
  
  <p>I've filed this as a webkit bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=204261" rel="noreferrer">https://bugs.webkit.org/show_bug.cgi?id=204261</a></p>
  
  <p>Has anyone been able to get html audio working on iOS 13, or know any workarounds?</p>