Skip to content

[Bug]: DesktopCapturer API cannot start audio source #41697

Closed

Description

@Psyjakes

Preflight Checklist

Electron Version

29.1.5

What operating system are you using?

Windows

Operating System Version

Windows 10 10.0.19045 Build 19045

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

When I start the Desktop Capturer to record display video and audio it should use the default output audio stream even if it is from a usb device

Actual Behavior

When I use a usb output device (speakers and earphones) then I get a "DOMException: Could not start audio source".

Testcase Gist URL

No response

Additional Information

I use the exact method as shown on the docs page for DesktopCapturer
const audioStream = await navigator.mediaDevices.getUserMedia({ audio: { mandatory: { chromeMediaSource: ‘desktop’ } }, video: { mandatory: { chromeMediaSource: ‘desktop’ } } } as any);
The as any is inserted to move around typescript errors.

Please note this is not a duplicate of issue #41069
I was informed of the old version and updated. The instructions on the docs still gives the same error, but I have since found that the issue is only for usb output devices

Activity

  1. added
    blocked/need-repro
    on Mar 26, 2024
  2. moved this to 👀 Unsorted Items in 29-x-yon Mar 26, 2024
  3. electron-issue-triage commented on Mar 26, 2024

    @electron-issue-triage

    Hello @Psyjakes. 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.

    Now adding the blocked/need-repro Needs a test case to reproduce the bug label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

  4. Psyjakes commented on Mar 27, 2024

    @Psyjakes
    Author

    Hello thank you for the response you can find the test app at this link https://github.com/Psyjakes/DesktopCapture_TestBed.git please read the readme for instructions to start the app. I did make the repo public please let me know if you have trouble accessing it

  5. removed
    blocked/need-repro
    on Mar 27, 2024
  6. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 29-x-yon Mar 27, 2024
  7. Psyjakes commented on Apr 16, 2024

    @Psyjakes
    Author

    I did more testing and after removing my Logitech headphones driver software the desktop capturer worked to retrieve sound so it looks like there is a software permission clash when drivers are installed

  8. georgexu99 commented on Apr 16, 2024

    @georgexu99
    Contributor

    Thank you for reporting and investigating this issue. If it was indeed a software permission clash I'm going ahead and closing this thread! Feel free to reopen this if needed.

  9. pCoder3000 commented on Mar 10, 2026

    @pCoder3000

    I got the same problem with Vencord and my Logitech USB headset.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions