Issue 475372 in chromium: auto-select-desktop-capture-source is not working

1,442 views
Skip to first unread message

chro...@googlecode.com

unread,
Apr 9, 2015, 2:12:39 AM4/9/15
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Cr-Internals-Media Pri-2 Via-Wizard Type-Bug OS-Mac

New issue 475372 by a...@tokbox.com: auto-select-desktop-capture-source is
not working
https://code.google.com/p/chromium/issues/detail?id=475372

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36

Example URL:
https://meet.tokbox.com/

Steps to reproduce the problem:
1. Launch Chrome with the auto-select-desktop-capture-source flag eg.
`/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
--auto-select-desktop-capture-source="Entire screen"`
2. Go to https://meet.tokbox.com/testingAutoCapture
3. Once the page has loaded click on the green share screen button at the
bottom of the page.
4. Follow the prompts to install the screen sharing extension.
5. Reload the page once the extension has installed.
6. Click the green screen sharing button again.

What is the expected behavior?
The screen gets shared straight away without the window picker dialog
popping up.

What went wrong?
The window picker dialog pops up.

Did this work before? N/A

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes

Chrome version: 41.0.2272.118 Channel: stable
OS Version: OS X 10.9.5
Flash Version: Shockwave Flash 17.0 r0

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Apr 10, 2015, 3:59:43 AM4/10/15
to chromi...@chromium.org
Updates:
Status: Untriaged
Cc: kavv...@chromium.org
Labels: -OS-Mac OS-All M-41 Cr-Blink-Window-Dialog

Comment #1 on issue 475372 by kavv...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

adam@ thanks for the issue.

Tested the issue on windows 7, Linux Ubuntu 14.04 and Mac 10.10.2 using
chrome version 41.0.2272.118 with the mentioned steps

Observed that the pop up is shown to select the window to share.
Able to reproduce the issue on ALL OS.Considering this as non regression
issue as the issue seen from M35. The prior browser versions are not
compatible with this issue.
Marking it as Untriaged.Could any one from Dev team please look into this
issue.

chro...@googlecode.com

unread,
Apr 13, 2015, 5:10:42 PM4/13/15
to chromi...@chromium.org

Comment #3 on issue 475372 by chad.mce...@gmail.com:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

I can also confirm that this does not work for me on Mac 10.10.2 / Chrome
41.0.2272.118 (64-bit).

I have multiple monitors, and when i set the source like:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
--auto-select-desktop-capture-source="Screen 1"

it does not work, even though "Screen 1" was a valid name according to the
popup.

Philipp Hancke checked it and said that it worked for him on Ubuntu 14.04
using a localized source name "Gesamter Bildschirm".

chro...@googlecode.com

unread,
Apr 14, 2015, 3:33:43 AM4/14/15
to chromi...@chromium.org
Updates:
Status: Assigned
Owner: phog...@chromium.org

Comment #4 on issue 475372 by phog...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

Hello!

Here is the auto-selector code:
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/views/desktop_media_picker_views.cc&sq=package:chromium&rcl=1428982481&l=328.

if (!autoselect_source.empty() &&
base::ASCIIToUTF16(autoselect_source) == source.name) {
...
}

One possible reason for this is that the flag is in ASCII and the source
name is in UTF-16. I wonder if there could be some unexpected unicode chars
in your "Screen 1"? I don't have a multi-screen mac setup so I can debug
easily, but I'll try to see if I can repro on Linux (this should be mostly
platform-independent anyway).

Another possible explanation is that the code goes into a different code
path in the multi-screen scenario, and that the flag doesn't cover that.

chro...@googlecode.com

unread,
Apr 14, 2015, 8:20:56 AM4/14/15
to chromi...@chromium.org

Comment #5 on issue 475372 by a...@tokbox.com:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

It doesn't have to be multiscreen, I get the issue on a Mac with a single
screen when using "Entire screen" as the value as well.

chro...@googlecode.com

unread,
Apr 14, 2015, 8:57:56 AM4/14/15
to chromi...@chromium.org

Comment #6 on issue 475372 by phog...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

I can repro, and you are correct the flag doesn't work on mac. Turns out
the flag is jacked into the Aura window picker, which is used on CrOS,
Windows and Linux but no Mac. So it has never worked on Mac in particular.

I'll see if I can whip up a patch to fix that.

chro...@googlecode.com

unread,
Apr 14, 2015, 9:38:57 AM4/14/15
to chromi...@chromium.org

Comment #7 on issue 475372 by a...@tokbox.com:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

Thanks!

chro...@googlecode.com

unread,
Apr 14, 2015, 9:42:57 AM4/14/15
to chromi...@chromium.org

Comment #8 on issue 475372 by phog...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

Much to my surprise I was able to write 11 lines of objective-c and get
this working. Let's hope it's that simple.
https://codereview.chromium.org/1084913002/

chro...@googlecode.com

unread,
Apr 27, 2015, 4:36:53 AM4/27/15
to chromi...@chromium.org

Comment #9 on issue 475372 by bugdro...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372#c9

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/c6a64af09117b48524074e9a07a98f45de503ff8

commit c6a64af09117b48524074e9a07a98f45de503ff8
Author: phoglund <phog...@chromium.org>
Date: Mon Apr 27 08:24:55 2015

Implementing screenshare bypass flag on Mac.

The --auto-select-desktop-capture-source flag is quite useful for
testing since tools like Selenium generally can't interact with dialogs
we pop up in the browser. It is implemented for aura-using platforms
like Linux, CrOS and Windows and this patch adds it for Mac too.

BUG=475372

Review URL: https://codereview.chromium.org/1084913002

Cr-Commit-Position: refs/heads/master@{#327013}

[modify]
http://crrev.com/c6a64af09117b48524074e9a07a98f45de503ff8/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm

chro...@googlecode.com

unread,
Apr 27, 2015, 6:06:05 AM4/27/15
to chromi...@chromium.org
Updates:
Status: Fixed

Comment #10 on issue 475372 by phog...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

adam: feel free to test this in tomorrow's canary and see if it works for
you.

chro...@googlecode.com

unread,
Feb 12, 2016, 3:01:00 AM2/12/16
to chromi...@chromium.org

Comment #13 on issue 475372 by avishe...@gmail.com:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

Can anybody please tell me about setting
auto-select-desktop-capture-source='Entire Screen' in command line way on
Linux ?

chro...@googlecode.com

unread,
Feb 12, 2016, 4:14:04 AM2/12/16
to chromi...@chromium.org

Comment #14 on issue 475372 by phog...@chromium.org:
auto-select-desktop-capture-source is not working
https://code.google.com/p/chromium/issues/detail?id=475372

google-chrome --auto-select-desktop-capture-source='Entire Screen'
Reply all
Reply to author
Forward
0 new messages