Skip to content

desktopCapturer not capturing audio when USB speakers are Windows output #15829

Closed

Description

@Nate-gg
  • Node v8.11.3
  • Win 10
  • v3.0.4

Expected Behavior
When using desktopCapturer, audio source should be captured then stream is handled; app creates an AudioContext that is then analyzed and an audio visualizer is created.

Actual behavior
This works if the default windows audio source is speakers plugged into 3.5 jack. When using USB speakers it throws the error

Uncaught (in promise) DOMException: Count not start audio source

To Reproduce

desktopCapturer.getSources({types: ['screen']}, (error, sources) => {
  //if (error) throw error
  for (let i = 0; i < sources.length; ++i) {
     if (sources[i].name === 'Entire screen') {
        navigator.mediaDevices.getUserMedia({
          audio: { mandatory : { chromeMediaSource: 'desktop' }},
          video: { mandatory : { chromeMediaSource: 'desktop' }}
        })
        .then((stream) => handleStream(stream))
        return
     }
  }
})

Additional Information
My assumption is this may be a limitation in the way desktopCapturer captures audio, but based on the MediaDevices.getUserMedia() this should be possible. It seems having the available to select the audio source could also fix this issue

Activity

  1. welcome commented on Nov 25, 2018

    @welcome

    👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. islalobo commented on May 2, 2019

    @islalobo

    What's the status on this issue. We are also having trouble capturing user input audio.

  3. sofianguy commented on Aug 9, 2019

    @sofianguy
    Contributor

    Thank you for taking the time to report this issue and helping to make Electron better.

    The version of Electron you reported this on has been superseded by newer releases.

    If you're still experiencing this issue in Electron v4.2.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

    I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

    Thanks in advance! Your help is appreciated.

  4. added
    blocked/need-info ❌
    on Aug 9, 2019
  5. sofianguy commented on Aug 19, 2019

    @sofianguy
    Contributor

    Thank you for your issue!

    We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3-0-xblocked/need-info ❌bug 🪲platform/windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions