<?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>274599</bug_id>
          
          <creation_ts>2024-05-23 11:04:40 -0700</creation_ts>
          <short_desc>REGRESSION(iOS 17.5): getUserMedia camera access doesn&apos;t work in the simulator</short_desc>
          <delta_ts>2024-05-27 07:02:38 -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>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>272551</dup_id>
          
          <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="Ali Juma">ajuma</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>jer.noble</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2037386</commentid>
    <comment_count>0</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2024-05-23 11:04:40 -0700</bug_when>
    <thetext>Prior to iOS 17.5, getUserMedia camera access worked in the simulator (in WKWebView-based apps but not in Safari) in the sense that after the user accepted the permission prompt, the web page would receive a test pattern simulating a video stream coming from the camera.

Chrome for iOS relies on this behavior for unit and integration tests involving camera permission prompts.

However, on iOS 17.5, this no longer works -- after the user accepts the prompt, the video capture fails. In the console, we get the following output on https://webrtc.github.io/samples/src/content/getusermedia/gum/:

[Log] Got stream with constraints: – {audio: false, video: true} (user-script:29, line 1)
[Log] Using video device: Mock video device 1 (user-script:29, line 1)
[Error] A MediaStreamTrack ended due to a capture failure</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2037613</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-05-24 06:28:37 -0700</bug_when>
    <thetext>&lt;rdar://problem/128678958&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2037767</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2024-05-24 14:33:20 -0700</bug_when>
    <thetext>Hi Ali: Could you please confirm which iOS version worked properly? Was it iOS 17.4, or even an earlier release?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2037951</commentid>
    <comment_count>3</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2024-05-26 14:34:43 -0700</bug_when>
    <thetext>(In reply to Brent Fulgham from comment #2)
&gt; Hi Ali: Could you please confirm which iOS version worked properly? Was it
&gt; iOS 17.4, or even an earlier release?

It was working in 17.4 (as well as in earlier releases).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038009</commentid>
    <comment_count>4</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-05-27 02:26:35 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 272551 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038011</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-05-27 02:27:54 -0700</bug_when>
    <thetext>This is probably a dupe of https://bugs.webkit.org/show_bug.cgi?id=272551.
@Ali, do you see release logging in the GPU process like:
&quot;Unable to set media environment, failing capture.&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038046</commentid>
    <comment_count>6</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2024-05-27 06:58:48 -0700</bug_when>
    <thetext>(In reply to youenn fablet from comment #5)
&gt; This is probably a dupe of https://bugs.webkit.org/show_bug.cgi?id=272551.
&gt; @Ali, do you see release logging in the GPU process like:
&gt; &quot;Unable to set media environment, failing capture.&quot;?

Yes, I do see that logging. Thanks for the pointer to the fix!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038050</commentid>
    <comment_count>7</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-05-27 07:02:38 -0700</bug_when>
    <thetext>(In reply to Ali Juma from comment #6)
&gt; (In reply to youenn fablet from comment #5)
&gt; &gt; This is probably a dupe of https://bugs.webkit.org/show_bug.cgi?id=272551.
&gt; &gt; @Ali, do you see release logging in the GPU process like:
&gt; &gt; &quot;Unable to set media environment, failing capture.&quot;?
&gt; 
&gt; Yes, I do see that logging. Thanks for the pointer to the fix!

It might be a fallout of https://bugs.webkit.org/show_bug.cgi?id=270995</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>