<?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>254652</bug_id>
          
          <creation_ts>2023-03-29 01:50:26 -0700</creation_ts>
          <short_desc>When using applyConstraints, a green screen appears for screen sharing</short_desc>
          <delta_ts>2023-05-09 06:10:12 -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 16</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 13</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></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="shuming">ltsg0317</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>sknth.n</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1944908</commentid>
    <comment_count>0</comment_count>
    <who name="shuming">ltsg0317</who>
    <bug_when>2023-03-29 01:50:26 -0700</bug_when>
    <thetext>Steps to reproduce the problem:

const stream = await navigator.mediaDevices.getDisplayMedia({
   video: true,
   audio: false,
});
const screenTrack = stream.getVideoTracks()[0];
// $(&quot;localVideo&quot;) === video tag
$(&quot;localVideo&quot;).srcObject = new MediaStream([screenTrack]);
$(&quot;localVideo&quot;).play();
try {
   screenTrack.applyConstraints({
      height: 480,
   });
} catch (error) {
   console.error(error);
}


Safari version: 16.3
OS Version: 13.2.1 (22D68) Ventura


Currently measured 16.2-16.4 are reproduced and in Ventura system, in other systems normal, it seems to be Ventura system bugs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944925</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-29 02:47:01 -0700</bug_when>
    <thetext>&lt;rdar://problem/107359693&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944927</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-03-29 02:51:53 -0700</bug_when>
    <thetext>https://jsfiddle.net/ctea73ns/ seems to work for me in Safari 16.4 and macOS 13.3.
@shuming, can you check?
Marking as configuration changed, please reopen if you can reproduce in latest macOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944929</commentid>
    <comment_count>3</comment_count>
    <who name="shuming">ltsg0317</who>
    <bug_when>2023-03-29 03:16:38 -0700</bug_when>
    <thetext>(In reply to youenn fablet from comment #2)
&gt; https://jsfiddle.net/ctea73ns/ seems to work for me in Safari 16.4 and macOS
&gt; 13.3.
&gt; @shuming, can you check?
&gt; Marking as configuration changed, please reopen if you can reproduce in
&gt; latest macOS.

I have some problems with the restore step, I need to execute applyConstraints after the end of play;
like this:
https://jsfiddle.net/ltsg0317/0tu2b81L/2/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944930</commentid>
    <comment_count>4</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-03-29 03:23:59 -0700</bug_when>
    <thetext>Oh I see, when you are talking about green screen, is it a a very thin green rectangle?
Can you upload a screenshot so that I validate that I am reproducing what you are seeing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945231</commentid>
    <comment_count>5</comment_count>
    <who name="shuming">ltsg0317</who>
    <bug_when>2023-03-29 19:59:04 -0700</bug_when>
    <thetext>(In reply to youenn fablet from comment #4)
&gt; Oh I see, when you are talking about green screen, is it a a very thin green
&gt; rectangle?
&gt; Can you upload a screenshot so that I validate that I am reproducing what
&gt; you are seeing?

Thank you for your reply, the picture has been replied to in the mailbox, if not received can also be seen through the link below: 

https://res.cloudinary.com/dhx2zug13/image/upload/v1680144889/webkit/uzhikbvmuwkqglcvclbd.png</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945258</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-03-29 23:51:05 -0700</bug_when>
    <thetext>Thanks shaming, I was not able to reproduce the full green rectangle.
Did you validate on macOS 13.3?
Can you provide a sysdiagnose and send it directly to me (youenn@apple.com)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946125</commentid>
    <comment_count>7</comment_count>
    <who name="shuming">ltsg0317</who>
    <bug_when>2023-04-02 22:28:59 -0700</bug_when>
    <thetext>(In reply to youenn fablet from comment #6)
&gt; Thanks shaming, I was not able to reproduce the full green rectangle.
&gt; Did you validate on macOS 13.3?
&gt; Can you provide a sysdiagnose and send it directly to me (youenn@apple.com)?

I upgraded my macOS system to MacOS 13.3, Safari 16.4, the green screen is gone; but a new problem appeared, when I screen share, after clicking Allow to share window, I can&apos;t select the page, only after the upgrade, here is the picture: 

https://res.cloudinary.com/dhx2zug13/image/upload/v1680499660/webkit/jtbnsf68thr9x0wzruk1.png

No matter how I click, it stays like this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1949084</commentid>
    <comment_count>8</comment_count>
    <who name="">sknth.n</who>
    <bug_when>2023-04-16 22:48:17 -0700</bug_when>
    <thetext>
&gt; (In reply to youenn fablet from comment #6)
&gt; &gt; Thanks shaming, I was not able to reproduce the full green rectangle.
&gt; &gt; Did you validate on macOS 13.3?
&gt; &gt; Can you provide a sysdiagnose and send it directly to me (youenn@apple.com)?
&gt; 
&gt; I upgraded my macOS system to MacOS 13.3, Safari 16.4, the green screen is
&gt; gone; but a new problem appeared, when I screen share, after clicking Allow
&gt; to share window, I can&apos;t select the page, only after the upgrade, here is
&gt; the picture: 
&gt; 
&gt; https://res.cloudinary.com/dhx2zug13/image/upload/v1680499660/webkit/
&gt; jtbnsf68thr9x0wzruk1.png
&gt; 
&gt; No matter how I click, it stays like this

I am able to observe the same bug that&apos;s reported here by shuming after the upgrade to 16.4.(In reply to shuming from comment #7)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1949085</commentid>
    <comment_count>9</comment_count>
    <who name="">sknth.n</who>
    <bug_when>2023-04-16 22:54:55 -0700</bug_when>
    <thetext>(In reply to sknth.n from comment #8)
&gt; &gt; (In reply to youenn fablet from comment #6)
&gt; &gt; &gt; Thanks shaming, I was not able to reproduce the full green rectangle.
&gt; &gt; &gt; Did you validate on macOS 13.3?
&gt; &gt; &gt; Can you provide a sysdiagnose and send it directly to me (youenn@apple.com)?
&gt; &gt; 
&gt; &gt; I upgraded my macOS system to MacOS 13.3, Safari 16.4, the green screen is
&gt; &gt; gone; but a new problem appeared, when I screen share, after clicking Allow
&gt; &gt; to share window, I can&apos;t select the page, only after the upgrade, here is
&gt; &gt; the picture: 
&gt; &gt; 
&gt; &gt; https://res.cloudinary.com/dhx2zug13/image/upload/v1680499660/webkit/
&gt; &gt; jtbnsf68thr9x0wzruk1.png
&gt; &gt; 
&gt; &gt; No matter how I click, it stays like this
&gt; 
&gt; I am able to observe the same bug that&apos;s reported here by shuming after the
&gt; upgrade to 16.4.(In reply to shuming from comment #7)

Full version is 16.4 (18615.1.26.11.23)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1954019</commentid>
    <comment_count>10</comment_count>
    <who name="">sknth.n</who>
    <bug_when>2023-05-09 06:10:12 -0700</bug_when>
    <thetext>Any update on this bug? We are not able to share independent windows because of this problem.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>