Bug 193188 - Deactivate audio session whenever possible
Summary: Deactivate audio session whenever possible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-06 23:42 PST by Eric Carlson
Modified: 2019-01-07 13:48 PST (History)
4 users (show)

See Also:


Attachments
Patch (21.52 KB, patch)
2019-01-07 00:53 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.33 MB, application/zip)
2019-01-07 02:44 PST, EWS Watchlist
no flags Details
Patch (21.71 KB, patch)
2019-01-07 09:43 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (21.74 KB, patch)
2019-01-07 10:04 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2019-01-06 23:42:57 PST
Deactivate the audio session when it is no longer possible to play audio, so an application that was interrupted by WebKit can resume playing. This should only happen for WK2, because we can't know if a WK1 host application plays audio itself.
Comment 1 Eric Carlson 2019-01-06 23:43:28 PST
<rdar://problem/42678977>
Comment 2 Eric Carlson 2019-01-07 00:53:48 PST
Created attachment 358483 [details]
Patch
Comment 3 EWS Watchlist 2019-01-07 02:44:16 PST
Comment on attachment 358483 [details]
Patch

Attachment 358483 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10656006

Number of test failures exceeded the failure limit.
Comment 4 EWS Watchlist 2019-01-07 02:44:18 PST
Created attachment 358489 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 5 Eric Carlson 2019-01-07 09:43:16 PST
Created attachment 358502 [details]
Patch
Comment 6 Eric Carlson 2019-01-07 10:04:45 PST
Created attachment 358504 [details]
Patch
Comment 7 Jer Noble 2019-01-07 13:19:33 PST
Comment on attachment 358504 [details]
Patch

r=me, with the nit that this area of the code needs some refactoring. We should investigate making it cheaper to access PlatformMediaSessionManager::sharedManager() when no sessions exist yet and move these global settings (and other DeprecatedGlobalSettings) directly into the PlatformMediaSessionManager itself.
Comment 8 Eric Carlson 2019-01-07 13:24:16 PST
(In reply to Jer Noble from comment #7)
> Comment on attachment 358504 [details]
> Patch
> 
> r=me, with the nit that this area of the code needs some refactoring. We
> should investigate making it cheaper to access
> PlatformMediaSessionManager::sharedManager() when no sessions exist yet and
> move these global settings (and other DeprecatedGlobalSettings) directly
> into the PlatformMediaSessionManager itself.

I filed bug 193206 for this.
Comment 9 WebKit Commit Bot 2019-01-07 13:47:59 PST
Comment on attachment 358504 [details]
Patch

Clearing flags on attachment: 358504

Committed r239694: <https://trac.webkit.org/changeset/239694>
Comment 10 WebKit Commit Bot 2019-01-07 13:48:01 PST
All reviewed patches have been landed.  Closing bug.