Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Desktop Capture] Why use GetUserMedia with chromeMediaSource : 'desktop', focus on the window application? #62

Open
jbeurel opened this issue Dec 11, 2018 · 0 comments

Comments

@jbeurel
Copy link

jbeurel commented Dec 11, 2018

Hi.

Like in the Desktop Capture example, I use getUserMedia() (or webkitGetUserMedia()) to get the Desktop app video stream:

navigator.mediaDevices
      .getUserMedia({
        audio: false,
        video: {
          mandatory: {
            chromeMediaSource: 'desktop',
            chromeMediaSourceId: source.id,
            minWidth: 1920,
            maxWidth: 1920,
            minHeight: 1080,
            maxHeight: 1080,
            maxFrameRate: 25,
          },
        },
      })
      .then()
      .catch();

When I use this function, the window selected is focused and go to the foreground. How to avoid this behaviour? I need to stay focused on my Electron application.

Thanks a lot.

Jo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant