Per window audio from getUserMedia

#1

Is there anyway to capture audio from only a window and now the entire desktop? I know its possible because discord has manage to do it with their screenshare.
so far, i have tried this

chrome.desktopCapture.chooseDesktopMedia(['screen', 'window', 'audio'], callback)


  const stream = await navigator.mediaDevices.getUserMedia({
    audio: {
      mandatory: {
        chromeMediaSource: "desktop",
        chromeMediaSourceId: id,
      }
    },
    video: {
      mandatory: {
        chromeMediaSource: "desktop",
        chromeMediaSourceId: id,
        maxFrameRate: 60
      }
    }
  })

But it seems to capture the sounds of every window.