fix: Windows audio mute fix
This commit is contained in:
@@ -49,9 +49,19 @@ export class DesktopElectronScreenShareCapture {
|
||||
|
||||
const sources = await electronApi.getSources();
|
||||
const selection = await this.resolveSourceSelection(sources, options.includeSystemAudio);
|
||||
|
||||
// On Windows, electron-desktop loopback audio captures all system output
|
||||
// including the app's voice playback, creating echo for watchers or
|
||||
// requiring total voice muting for the sharer. The getDisplayMedia path
|
||||
// handles this correctly via restrictOwnAudio — if we fell back here,
|
||||
// share video only so voice chat stays functional.
|
||||
const effectiveIncludeSystemAudio = this.isWindowsElectron()
|
||||
? false
|
||||
: selection.includeSystemAudio;
|
||||
|
||||
const captureOptions = {
|
||||
...options,
|
||||
includeSystemAudio: selection.includeSystemAudio
|
||||
includeSystemAudio: effectiveIncludeSystemAudio
|
||||
};
|
||||
|
||||
if (!selection.source) {
|
||||
@@ -59,7 +69,7 @@ export class DesktopElectronScreenShareCapture {
|
||||
}
|
||||
|
||||
this.logger.info('Selected Electron desktop source', {
|
||||
includeSystemAudio: selection.includeSystemAudio,
|
||||
includeSystemAudio: effectiveIncludeSystemAudio,
|
||||
sourceId: selection.source.id,
|
||||
sourceName: selection.source.name
|
||||
});
|
||||
@@ -73,7 +83,7 @@ export class DesktopElectronScreenShareCapture {
|
||||
}
|
||||
|
||||
return {
|
||||
includeSystemAudio: selection.includeSystemAudio,
|
||||
includeSystemAudio: effectiveIncludeSystemAudio,
|
||||
stream: await navigator.mediaDevices.getUserMedia(constraints)
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user