Skip to content

use lower minimum Windows version for excluding Vesktop audio - #1309

Merged
Vendicated merged 5 commits into
Vencord:mainfrom
vocaldll:fix/windows-10-22h2-loopback-audio
Sep 4, 2026
Merged

Vendicated merged 5 commits into
Vencord:mainfrom
vocaldll:fix/windows-10-22h2-loopback-audio

Conversation

@vocaldll

Copy link
Copy Markdown
Contributor

Follow-up to #1294, enabling loopbackWithoutChrome on Windows 10 22H2 (build 19045). This prevents other call participants from hearing their own voices through the screenshare audio.

Thanks to @maxxeddd for reporting that this also works on build 19045.

Tested on Windows 10 22H2 build 19045, where screensharing with audio works as expected.

Also tested on Windows 10 build 19041.1415, where loopbackWithoutChrome does not work but normal loopback does, so older builds continue using the fallback.

@Vendicated

Copy link
Copy Markdown
Member

Instead of hardcoding build number, it'd be better to check for support instead: navigator.mediaDevices.getSupportedConstraints().restrictOwnAudio

@vocaldll

Copy link
Copy Markdown
Contributor Author

Instead of hardcoding build number, it'd be better to check for support instead: navigator.mediaDevices.getSupportedConstraints().restrictOwnAudio

I just tested navigator.mediaDevices.getSupportedConstraints().restrictOwnAudio on Windows 10 build 19041.1415 and it returns true, which caused Vesktop to select loopbackWithoutChrome, but screensharing with audio then fails.

So it looks like this only checks whether Chromium recognizes the feature, not whether the Windows version actually supports it. I don’t think it can be used here without breaking the fallback on older Windows builds.

2026-08-24_15-25-28

@Vendicated

Copy link
Copy Markdown
Member

Where are you getting these specific windows build numbers from? Why would they matter for a chromium feature?

@vocaldll

Copy link
Copy Markdown
Contributor Author

Where are you getting these specific windows build numbers from? Why would they matter for a chromium feature?

I got 20348 from Microsoft: https://learn.microsoft.com/en-us/samples/microsoft/windows-classic-samples/applicationloopbackaudio-sample/, which says the API requires Windows 10 build 20348 or later, and that's what Chromium calls under the hood, see: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/media/audio/win/audio_low_latency_input_win.cc#1707

Obviously the documentation doesn't seem to be very accurate, as it worked on an older version than the documented 20348 (19045). Which also made me want to test it on an older Windows 10 version, (19041.1415), where it was not supported.

@ThaUnknown

Copy link
Copy Markdown

does something like

navigator.mediaDevices.getDisplayMedia({
  video: true,
  audio: {
    restrictOwnAudio: true
  }
})

fail inside chrome too?

@vocaldll

Copy link
Copy Markdown
Contributor Author

does something like

navigator.mediaDevices.getDisplayMedia({
  video: true,
  audio: {
    restrictOwnAudio: true
  }
})

fail inside chrome too?

No, the call itself succeeds (on 19041.1415). Chrome silently ignores it though and falls back to regular loopback (see image). The returned track reports restrictOwnAudio: false, even though getSupportedConstraints() reports true.

2026-08-24_16-33-32

@ThaUnknown

Copy link
Copy Markdown
EBAFNwpYiArcg15sJHd

this sounds fun, if if fails in a easy to catch way, then it might be worth to just always try lbwoc, and fallback to without if that fails

@Vendicated Vendicated changed the title fix: exclude Vesktop audio on Windows 10 22H2 use lower minimum Windows version for excluding Vesktop audio Sep 4, 2026
@Vendicated
Vendicated enabled auto-merge (squash) September 4, 2026 01:25
@Vendicated
Vendicated merged commit 84d6f17 into Vencord:main Sep 4, 2026
1 check passed
@vocaldll
vocaldll deleted the fix/windows-10-22h2-loopback-audio branch September 4, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants