Skip to content

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

Closed as not planned
Closed as not planned

Description

@Psyjakes

Preflight Checklist

Electron Version

22.0.0

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

Actual Behavior

When I have more than one connected 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

Activity

  1. Psyjakes commented on Jan 22, 2024

    @Psyjakes
    Author

    Update on the issue, I tested with setting my audio output default to be the speakers and not my usb connected headset and it worked. This is still not ideal as the users of the app will have usb headsets

  2. jkleinsc commented on Mar 18, 2024

    @jkleinsc
    Member

    Thank you for reaching out!

    The version of Electron reported in this issue has reached end-of-life and is no longer supported, so this issue will be closed.

    If you're still experiencing this issue on a supported version of Electron, please file a new issue for that version of Electron.

    Thanks in advance! Your help is appreciated.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions