Bug 254652 - When using applyConstraints, a green screen appears for screen sharing
Summary: When using applyConstraints, a green screen appears for screen sharing
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-29 01:50 PDT by shuming
Modified: 2023-05-09 06:10 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shuming 2023-03-29 01:50:26 PDT
Steps to reproduce the problem:

const stream = await navigator.mediaDevices.getDisplayMedia({
   video: true,
   audio: false,
});
const screenTrack = stream.getVideoTracks()[0];
// $("localVideo") === video tag
$("localVideo").srcObject = new MediaStream([screenTrack]);
$("localVideo").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
Comment 1 Radar WebKit Bug Importer 2023-03-29 02:47:01 PDT
<rdar://problem/107359693>
Comment 2 youenn fablet 2023-03-29 02:51:53 PDT
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.
Comment 3 shuming 2023-03-29 03:16:38 PDT
(In reply to youenn fablet from comment #2)
> 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.

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/
Comment 4 youenn fablet 2023-03-29 03:23:59 PDT
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?
Comment 5 shuming 2023-03-29 19:59:04 PDT
(In reply to youenn fablet from comment #4)
> 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?

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
Comment 6 youenn fablet 2023-03-29 23:51:05 PDT
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)?
Comment 7 shuming 2023-04-02 22:28:59 PDT
(In reply to youenn fablet from comment #6)
> 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)?

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'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
Comment 8 sknth.n 2023-04-16 22:48:17 PDT
> (In reply to youenn fablet from comment #6)
> > 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)?
> 
> 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'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

I am able to observe the same bug that's reported here by shuming after the upgrade to 16.4.(In reply to shuming from comment #7)
Comment 9 sknth.n 2023-04-16 22:54:55 PDT
(In reply to sknth.n from comment #8)
> > (In reply to youenn fablet from comment #6)
> > > 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)?
> > 
> > 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'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
> 
> I am able to observe the same bug that's reported here by shuming after the
> upgrade to 16.4.(In reply to shuming from comment #7)

Full version is 16.4 (18615.1.26.11.23)
Comment 10 sknth.n 2023-05-09 06:10:12 PDT
Any update on this bug? We are not able to share independent windows because of this problem.