Possibly screensharing fix for windows where they get deafened when screensharing with audio
All checks were successful
Queue Release Build / prepare (push) Successful in 14s
Deploy Web Apps / deploy (push) Successful in 9m24s
Queue Release Build / build-linux (push) Successful in 24m57s
Queue Release Build / build-windows (push) Successful in 25m21s
Queue Release Build / finalize (push) Successful in 1m43s

This commit is contained in:
2026-03-19 04:15:59 +01:00
parent 8f960be1e9
commit 1c7e535057
2 changed files with 12 additions and 3 deletions

View File

@@ -27,8 +27,14 @@ export class DesktopElectronScreenShareCapture {
return !!this.dependencies.getElectronApi()?.getSources && !this.isLinuxElectron();
}
shouldSuppressRemotePlaybackDuringShare(includeSystemAudio: boolean): boolean {
return includeSystemAudio && this.isWindowsElectron();
shouldSuppressRemotePlaybackDuringShare(
includeSystemAudio: boolean,
usingElectronDesktopCapture: boolean
): boolean {
// Chromium display-media capture can use own-audio suppression on modern
// builds. The Electron desktop-capturer fallback cannot, so keep the old
// Windows mute behavior only for that fallback path.
return includeSystemAudio && usingElectronDesktopCapture && this.isWindowsElectron();
}
async startCapture(

View File

@@ -340,7 +340,10 @@ export class ScreenShareManager {
includeSystemAudio: this.isScreenActive ? includeSystemAudio : false,
stream: this.isScreenActive ? this.activeScreenStream : null,
suppressRemotePlayback: this.isScreenActive
&& this.desktopElectronScreenShareCapture.shouldSuppressRemotePlaybackDuringShare(includeSystemAudio),
&& this.desktopElectronScreenShareCapture.shouldSuppressRemotePlaybackDuringShare(
includeSystemAudio,
captureMethod === 'electron-desktop'
),
forceDefaultRemotePlaybackOutput: this.isScreenActive
&& includeSystemAudio
&& captureMethod === 'linux-electron'