Bug 202537 - [iOS] WebContent process can be interrupted during suspension; loses "Now Playing" status
Summary: [iOS] WebContent process can be interrupted during suspension; loses "Now Pla...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-03 10:51 PDT by Jer Noble
Modified: 2019-10-03 18:09 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.79 KB, patch)
2019-10-03 10:54 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (5.42 KB, patch)
2019-10-03 11:02 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (5.53 KB, patch)
2019-10-03 11:07 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (5.55 KB, patch)
2019-10-03 14:29 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2019-10-03 10:51:58 PDT
[iOS] WebContent process can be interrupted during suspension; loses "Now Playing" status
Comment 1 Jer Noble 2019-10-03 10:52:32 PDT
<rdar://problem/55952707>
Comment 2 Jer Noble 2019-10-03 10:54:23 PDT
Created attachment 380139 [details]
Patch
Comment 3 Jer Noble 2019-10-03 11:02:40 PDT
Created attachment 380141 [details]
Patch
Comment 4 Eric Carlson 2019-10-03 11:05:43 PDT
Comment on attachment 380139 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380139&action=review

> Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:200
> +#if USE(AUDIO_SESSION)
> +    if (!anyOfSessions([] (auto& session) { return session.state() == PlatformMediaSession::Playing; }))
> +        maybeDeactivateAudioSession();
> +#endif

As we discussed, this should only happen when we're in the background
Comment 5 Jer Noble 2019-10-03 11:07:24 PDT
Created attachment 380143 [details]
Patch
Comment 6 Jer Noble 2019-10-03 14:29:50 PDT
Created attachment 380160 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2019-10-03 18:09:50 PDT
Comment on attachment 380160 [details]
Patch for landing

Clearing flags on attachment: 380160

Committed r250694: <https://trac.webkit.org/changeset/250694>
Comment 8 WebKit Commit Bot 2019-10-03 18:09:51 PDT
All reviewed patches have been landed.  Closing bug.