WebAudio does not play in the background on iOS both because audio doesn't play when the category is set to `AVAudioSessionCategoryAmbient`, and because the AudioContext is paused when the web process is forwarded the `UIApplicationWillResignActiveNotification` notification.
This notification isn't forwarded when the WebView is hosted in SafariViewController so the AudioContext is not paused, so it resumes playing when the application is foregrounded even if the view controller is not in the foreground.
Created attachment 418188 [details]
Created attachment 418227 [details]
Patch for landing
Committed r271779: <https://trac.webkit.org/changeset/271779>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 418227 [details].