<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>188127</bug_id>
          
          <creation_ts>2018-07-27 15:53:44 -0700</creation_ts>
          <short_desc>[iOS] Don&apos;t deactivate audio session</short_desc>
          <delta_ts>2019-01-07 13:22:23 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Carlson">eric.carlson</reporter>
          <assigned_to name="Eric Carlson">eric.carlson</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>jonlee</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1445905</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-07-27 15:53:44 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445909</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-07-27 15:55:28 -0700</bug_when>
    <thetext>&lt;rdar://problem/42544143&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445916</commentid>
    <comment_count>2</comment_count>
      <attachid>345966</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-07-27 16:11:21 -0700</bug_when>
    <thetext>Created attachment 345966
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445936</commentid>
    <comment_count>3</comment_count>
      <attachid>345966</attachid>
    <who name="Jon Lee">jonlee</who>
    <bug_when>2018-07-27 16:57:36 -0700</bug_when>
    <thetext>Comment on attachment 345966
Patch

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

&gt; Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp:-167
&gt; -#endif

Can we write a test for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445943</commentid>
    <comment_count>4</comment_count>
      <attachid>345966</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-07-27 17:24:09 -0700</bug_when>
    <thetext>Comment on attachment 345966
Patch

Clearing flags on attachment: 345966

Committed r234339: &lt;https://trac.webkit.org/changeset/234339&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445944</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-07-27 17:24:11 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1446023</commentid>
    <comment_count>6</comment_count>
      <attachid>345966</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2018-07-28 15:28:56 -0700</bug_when>
    <thetext>Comment on attachment 345966
Patch

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

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

So why didn’t we keep it for WK2?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1446030</commentid>
    <comment_count>7</comment_count>
      <attachid>345966</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-07-28 17:12:52 -0700</bug_when>
    <thetext>Comment on attachment 345966
Patch

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

&gt;&gt; Source/WebCore/ChangeLog:12
&gt;&gt; +        app may also be playing audio.
&gt; 
&gt; 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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1492364</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2019-01-07 13:22:23 -0800</bug_when>
    <thetext>(In reply to Eric Carlson from comment #7)
&gt; Comment on attachment 345966 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=345966&amp;action=review
&gt; 
&gt; &gt;&gt; Source/WebCore/ChangeLog:12
&gt; &gt;&gt; +        app may also be playing audio.
&gt; &gt; 
&gt; &gt; So why didn’t we keep it for WK2?
&gt; 
&gt; I filed rdar://42678977 to add it back for WK2, but there are potential
&gt; issues we need to investigate first (eg. rdar://42672521, rdar://42267132).

Fixed in bug 193188.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>345966</attachid>
            <date>2018-07-27 16:11:21 -0700</date>
            <delta_ts>2018-07-27 17:24:09 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-188127-20180727161120.patch</filename>
            <type>text/plain</type>
            <size>1955</size>
            <attacher name="Eric Carlson">eric.carlson</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM0MzM2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ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