Bug 235469

Summary: getDisplayMedia() doesn't work with multiple screens
Product: WebKit Reporter: Teodor <teodor.atroshenko>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ajdalshov, bfulgham, eric.carlson, jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Apple Silicon)   
OS: macOS 10.15   

Description Teodor 2022-01-21 22:01:09 PST
We have received a report from a user who is running Mac Book Pro 13-inch with external 27-inch monitor (both in landscape orientation).

When they try to share their screen (call to `getDisplayMedia({ video: { cursor: 'motion', logicalSurface: true }, audio: false})`), only the primary monitor (27-inch) is listed, while the secondary monitor is not listed.
Comment 1 Radar WebKit Bug Importer 2022-01-28 22:02:18 PST
<rdar://problem/88217596>
Comment 2 Brent Fulgham 2022-02-12 23:03:08 PST
This is by design as we don’t currently have a screen picker.

We will consider this need for a future update.
Comment 3 Anders Johan Dalshov 2022-03-07 03:58:02 PST
(In reply to Teodor from comment #0)
> When they try to share their screen (call to `getDisplayMedia({ video: {
> cursor: 'motion', logicalSurface: true }, audio: false})`), only the primary
> monitor (27-inch) is listed, while the secondary monitor is not listed.


It's worth noticing that they can share any of the two screens, but since there is no screen picker implemented yet, the stream received from getDisplayMedia will be the display in which the browser instance is placed on when calling getDisplayMedia(). So a temporary workaround is simply move the browser window to the screen you want to share before initiating screen sharing.