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

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

Closed
3 tasks done
Psyjakes opened this issue Mar 26, 2024 · 4 comments
Closed
3 tasks done

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

Psyjakes opened this issue Mar 26, 2024 · 4 comments

Comments

@Psyjakes
Copy link

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

@codebytere codebytere added platform/windows blocked/need-repro Needs a test case to reproduce the bug 29-x-y labels Mar 26, 2024
@electron-issue-triage
Copy link

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.

@Psyjakes
Copy link
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

@electron-issue-triage electron-issue-triage bot removed the blocked/need-repro Needs a test case to reproduce the bug label Mar 27, 2024
@Psyjakes
Copy link
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

@georgexu99
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

3 participants