New issue
Advanced search Search tips

Issue 874340 link

Starred by 27 users

Issue metadata

Status: Duplicate
Merged: issue 396091
Owner: ----
Closed: Aug 15
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Sign in to add a comment

chrome.desktopCapture API mishandles multi-monitor setups on Linux

Reported by, Aug 15

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36

Steps to reproduce the problem:
1. Attach and configure multiple monitors on a Linux desktop
2. Generate media stream with chrome.desktopCapture.chooseDesktopMedia(...)

What is the expected behavior?
The client should be able to choose one of the screens, windows, etc. and obtain the stream of *just* the specified content.

What went wrong?
Regardless of the user's choice of what to capture (in my testing even choosing a single window to capture is ignored), all monitors are streamed simultaneously as one larger screen.

In the attached screenshot, the smaller section on the left (2, outlined in red) is a secondary monitor; the section on the right )1, outlined in blue) is the main monitor. This screenshot was taken while screen sharing on Discord, which is one of the applications affected by this bug.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 68.0.3440.84  Channel: stable
OS Version: Debian 9.5 (Stretch)
Flash Version: Shockwave Flash 30.0 r0

This issue encompasses a multitude of other issues that arise from this bug, given that the chrome.desktopCapture API is widely used. The bug seems to have persisted for almost almost 4 years now, without any action to fix it.

The bug was previously discussed in
which was marked as a feature request. It discusses the bug in more depth, and includes some testing of affected applications.

Chrome on Windows and OSX properly handles multi-monitor setups. There is no reason to believe support for this feature on Linux is impossible; see
>   ...this is a bug, not a feature; feature-parity is missing in this regard -- X11 proto/spec supports this...

Further discussion/references, organized by where the bug manifested (listed roughly in order of usefulness):
Google Hangouts [Linked above]!msg/hangouts/JKc_v0lMTTg/gk7Rd5cZAgAJ


499 KB View Download
Also worth noting-- multiple temporary workarounds exist to deal with this bug:

...and I'm sure others exist. These are mostly application specific to Hangouts, though.

Comment 2 Deleted

Components: -Blink>GetUserMedia Blink>GetUserMedia>Desktop
Labels: Needs-Feedback
Unlike other bugs this one indicates that window sharing is broken. Can you confirm that window sharing in Hangouts will start stream the whole merged desktop?
Labels: Needs-Triage-M68
In Hangouts window sharing streams only one window, rather than the whole merged desktop. This is not the behavior I observed in Discord, which uses the chrome.desktopCapture API (potentially indirectly- it might make a call to Electron which calls desktopCapture).

However, full screen sharing still streams the merged desktop in Hangouts (attached screengrab).
408 KB View Download
Project Member

Comment 7 by, Aug 15

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit - Your friendly Sheriffbot
Mergedinto: 396091
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment