<?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>270628</bug_id>
          
          <creation_ts>2024-03-07 02:08:04 -0800</creation_ts>
          <short_desc>black borders appears for screen sharing</short_desc>
          <delta_ts>2024-03-14 03:39:28 -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>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>269961</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="shuming">ltsg0317</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2019311</commentid>
    <comment_count>0</comment_count>
    <who name="shuming">ltsg0317</who>
    <bug_when>2024-03-07 02:08:04 -0800</bug_when>
    <thetext>Steps to reproduce the problem:

const stream = await navigator.mediaDevices.getDisplayMedia({
   video: {
     width: &quot;700&quot;,
     height: &quot;400&quot;
    },,
   audio: false,
});
const screenTrack = stream.getVideoTracks()[0];
// $(&quot;localVideo&quot;) === video tag
$(&quot;localVideo&quot;).srcObject = new MediaStream([screenTrack]);
$(&quot;localVideo&quot;).play();


Safari version: &gt;= 16.3.1
OS Version: 14.3.1 (23D60)

demo: https://jsfiddle.net/ltsg0317/tuvb6Lyq/1/
pic: https://res.cloudinary.com/dhx2zug13/image/upload/v1709806033/webkit/screenshare_zdb2ou.png</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019534</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-03-07 20:01:40 -0800</bug_when>
    <thetext>I am able to reproduce this bug using Safari 17.4 on macOS Sonoma 17.4 and it shows Black Border around Screen while Chrome Canary 124 works without any issue and don&apos;t have any black border (more of mismatch in aspect ration like playing 16:10 or 4:3 on 16:9 screen).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019535</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-03-07 20:02:55 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #1)
&gt; I am able to reproduce this bug using Safari 17.4 on macOS Sonoma 17.4 and
&gt; it shows Black Border around Screen while Chrome Canary 124 works without
&gt; any issue and don&apos;t have any black border (more of mismatch in aspect ration
&gt; like playing 16:10 or 4:3 on 16:9 screen).

Also reproducible on Safari Technology Preview 190.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2020964</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-03-14 03:09:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/124607137&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2020971</commentid>
    <comment_count>4</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2024-03-14 03:39:28 -0700</bug_when>
    <thetext>Also might need https://bugs.webkit.org/show_bug.cgi?id=270568.

*** This bug has been marked as a duplicate of bug 269961 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>