Bug 188127 - [iOS] Don't deactivate audio session
Summary: [iOS] Don't deactivate audio session
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-27 15:53 PDT by Eric Carlson
Modified: 2019-01-07 13:22 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.91 KB, patch)
2018-07-27 16:11 PDT, 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 2018-07-27 15:53:44 PDT
r233435 includes a change that deactivates the shared audio session when there are no more active media elements. This is a good in WK2 because it allows other applications to resume playing audio when WebKit stops playing, but it is potentially bad in WK1 where the host app may also be playing audio. Remove the code for now.
Comment 1 Eric Carlson 2018-07-27 15:55:28 PDT
<rdar://problem/42544143>
Comment 2 Eric Carlson 2018-07-27 16:11:21 PDT
Created attachment 345966 [details]
Patch
Comment 3 Jon Lee 2018-07-27 16:57:36 PDT
Comment on attachment 345966 [details]
Patch

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

> Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp:-167
> -#endif

Can we write a test for this?
Comment 4 WebKit Commit Bot 2018-07-27 17:24:09 PDT
Comment on attachment 345966 [details]
Patch

Clearing flags on attachment: 345966

Committed r234339: <https://trac.webkit.org/changeset/234339>
Comment 5 WebKit Commit Bot 2018-07-27 17:24:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Adler 2018-07-28 15:28:56 PDT
Comment on attachment 345966 [details]
Patch

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

> Source/WebCore/ChangeLog:12
> +        r233435 includes a change that deactivates the shared audio session when there are no more
> +        active media sessions. This is a good in WK2 because it allows other applications to resume
> +        playing audio when WebKit stops playing, but it is potentially bad in WK1 where the host
> +        app may also be playing audio.

So why didn’t we keep it for WK2?
Comment 7 Eric Carlson 2018-07-28 17:12:52 PDT
Comment on attachment 345966 [details]
Patch

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

>> Source/WebCore/ChangeLog:12
>> +        app may also be playing audio.
> 
> So why didn’t we keep it for WK2?

I filed rdar://42678977 to add it back for WK2, but there are potential issues we need to investigate first (eg. rdar://42672521, rdar://42267132).
Comment 8 Eric Carlson 2019-01-07 13:22:23 PST
(In reply to Eric Carlson from comment #7)
> Comment on attachment 345966 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=345966&action=review
> 
> >> Source/WebCore/ChangeLog:12
> >> +        app may also be playing audio.
> > 
> > So why didn’t we keep it for WK2?
> 
> I filed rdar://42678977 to add it back for WK2, but there are potential
> issues we need to investigate first (eg. rdar://42672521, rdar://42267132).

Fixed in bug 193188.