<?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>293949</bug_id>
          
          <creation_ts>2025-06-03 04:35:18 -0700</creation_ts>
          <short_desc>OverconstrainedError in getUserMedia on iOS 18.1 Simulator</short_desc>
          <delta_ts>2025-06-11 04:15:22 -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>WebKit Nightly Build</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="milen">milen.yordanov</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2121340</commentid>
    <comment_count>0</comment_count>
    <who name="milen">milen.yordanov</who>
    <bug_when>2025-06-03 04:35:18 -0700</bug_when>
    <thetext>I&apos;m testing an app in iOS 18.1 Simulator, iPhone 16.

1) Call `await navigator.mediaDevices.enumerateDevices()`. Returns two input devices:

InputDeviceInfo {deviceId: &quot;&quot;, kind: &quot;audioinput&quot;, label: &quot;&quot;, groupId: &quot;&quot;, …}
InputDeviceInfo {deviceId: &quot;&quot;, kind: &quot;videoinput&quot;, label: &quot;&quot;, groupId: &quot;&quot;, …}

2) Call `stream = await navigator.mediaDevices.getUserMedia({video: true})` This fails with the following error:

OverconstrainedError {message: &quot;Invalid constraint&quot;, constraint: &quot;&quot;, name: &quot;OverconstrainedError&quot;}

3) Call `stream = await navigator.mediaDevices.getUserMedia({audio: true})`.
The user grants microphone access. The call succeeds and returns a stream. No errors.

4) Call `await navigator.mediaDevices.enumerateDevices()`. Returns ONE input device:

InputDeviceInfo {deviceId: &quot;18D5FE168D21164D9C4ED78C74A6A6D2A572513C&quot;, kind: &quot;audioinput&quot;, label: &quot;MicrophoneBuiltIn&quot;, groupId: &quot;FD080DBDD6AA6F6F23AE94E8627078192F0F58C3&quot;, …}


Expected behavior:
If no camera is available, then enumerateDevices() should not return a device of kind &quot;videoinput&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2121514</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-06-03 15:29:29 -0700</bug_when>
    <thetext>Thank you for the report! Does this reproduce with the latest simulator?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2121613</commentid>
    <comment_count>2</comment_count>
    <who name="milen">milen.yordanov</who>
    <bug_when>2025-06-04 00:33:23 -0700</bug_when>
    <thetext>I tested it on the latest iOS 18.5 Simulator, iPhone 16, and the result remains the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122696</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-06-10 04:36:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/152938326&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122954</commentid>
    <comment_count>4</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2025-06-11 01:55:25 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/46594</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122972</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-06-11 04:15:20 -0700</bug_when>
    <thetext>Committed 296083@main (22a5e4f2aa67): &lt;https://commits.webkit.org/296083@main&gt;

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

    </bug>

</bugzilla>