<?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>262569</bug_id>
          
          <creation_ts>2023-10-03 14:19:31 -0700</creation_ts>
          <short_desc>REGRESSION (iOS 17): mediaDevices.enumerateDevices() breaks audio</short_desc>
          <delta_ts>2023-10-11 03:01:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebRTC</component>
          <version>Safari 17</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 17</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>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>evancarlson</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>joel</cc>
    
    <cc>saghul</cc>
    
    <cc>seanmacisaac</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1982222</commentid>
    <comment_count>0</comment_count>
    <who name="">evancarlson</who>
    <bug_when>2023-10-03 14:19:31 -0700</bug_when>
    <thetext>This is a regression between iOS 16 and iOS 17. 

It appears that when the microphone is disabled and mediaDevices.enumerateDevices() is called, audio only comes from the call speaker on the top of the phone (making it very hard to hear). 

Prior to iOS 17, audio came from both the call speaker on the top of the phone and from the device speakers on the bottom of the phone.

Minimal Repro:
1. Add an audio element to the &quot;choose camera, microphone and speaker&quot; demo: https://webrtc.github.io/samples/src/content/devices/input-output/
2. Set the audio constraint to false
3. Open the camera and play audio

This is impacting live web experiences for Sesame Street, Kraft, Pandora, &amp; more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1982281</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-10-03 16:44:24 -0700</bug_when>
    <thetext>&lt;rdar://problem/116433066&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983154</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-10-06 02:01:08 -0700</bug_when>
    <thetext>Can you be more specific about the repro steps.
I wrote https://codepen.io/youennf/pen/jOXQZEo to try reproducing.

In this webpage, I did the following:
1. click play (get some audio playing)
2. click enumerate (to call enumerateDevices).
3. Observe whether there is a change of audio.

I was not able to reproduce the issue with these 3 steps so far.

Is there a step where camera capture should also happen?
Which iOS device are you using for testing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983318</commentid>
    <comment_count>3</comment_count>
    <who name="">evancarlson</who>
    <bug_when>2023-10-06 13:25:32 -0700</bug_when>
    <thetext>Yes, I can reproduce the issue on the codepen with the following steps:

1. Click enumerate
2. Click start camera
3. Play audio

Note that if you skip step one, the audio plays as expected.

iOS 17.0.3, iPhone 12 Pro Max</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983654</commentid>
    <comment_count>4</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-10-09 05:12:36 -0700</bug_when>
    <thetext>I was able to reproduce as well with:
1. Click enumerate
2. Click start camera
3. Click enumerate
4. Play audio

The issue is probably that the auxiliary unit stays live while it should be stopped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983660</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-10-09 06:16:15 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/18835</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984256</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-10-11 03:01:32 -0700</bug_when>
    <thetext>Committed 269196@main (1bf29719b104): &lt;https://commits.webkit.org/269196@main&gt;

Reviewed commits have been landed. Closing PR #18835 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>