Skip to content

[Bug]: Black Video When getUserMedia with chromeMediaSourceId === window.getMediaSourceId() #29458

Closed

Description

@phanmn

Preflight Checklist

Electron Version

13.0.1

What operating system are you using?

macOS

Operating System Version

macos BigSur 11.4

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

12.0.9

Expected Behavior

I'm using this function to capture my window (window which start app), it work ok on Windows (same electron version) but not working on mac

 await navigator.mediaDevices.getUserMedia({
    video: {
      mandatory: {
        chromeMediaSource: 'desktop',
        chromeMediaSourceId: sourceId,
      },
    })

sourceId value === window.getMediaSourceId()

Actual Behavior

Black video

Testcase Gist URL

No response

Additional Information

No response

Activity

  1. added
    bug/regression ↩️
    blocked/need-repro
    on Jun 2, 2021
  2. nornagon commented on Jun 23, 2021

    @nornagon
    Contributor

    Thanks for reporting this and helping to make Electron better!

    Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

    Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

    I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment.

    Thanks in advance! Your help is appreciated.

  3. phanmn commented on Jun 24, 2021

    @phanmn
    Author
  4. removed
    blocked/need-repro
    on Jul 7, 2021
  5. nornagon commented on Jul 9, 2021

    @nornagon
    Contributor

    Thanks. Here's a simplified version that doesn't use remote or the third-party module electron-context-menu: https://gist.github.com/925744c7c67347d67c5b29e91c31e37e

    Bisected to v13.0.0-beta.20...v13.0.0-beta.21. The Chromium roll in that range seems like the likely culprit: #28660.

  6. nornagon commented on Jul 9, 2021

    @nornagon
    Contributor

    Adding app.commandLine.appendSwitch('disable-features', 'WindowCaptureMacV2') works around this issue for now.

  7. self-assigned this
    on Jul 28, 2021
  8. VerteDinde commented on Aug 10, 2021

    @VerteDinde
    Member

    Looks like this has already been addressed upstream in Chrome here: https://source.chromium.org/chromium/chromium/src/+/5bc57681793ef5008225cf26900492f62f640dd0 Will see if we can cherry-pick this change into earlier versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

13-x-y14-x-ybug 🪲bug/regression ↩️

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions