fix(desktop): enable PulseAudio loopback flag so screen share starts on Linux
Chromium gates the PulseAudio loopback path behind the PulseaudioLoopbackForScreenShare feature flag. Without it, returning audio: 'loopback' from setDisplayMediaRequestHandler rejects the whole getDisplayMedia request, so screen share never starts when the user has "Share system audio" enabled. Also surface a clear warning toast on loopback failure (PipeWire-only without pulse compat, macOS without Catap) instead of failing silently — no auto-retry, since the picker selection is already consumed.
This commit is contained in:
@@ -306,6 +306,16 @@ export async function startScreenShare(room: Room): Promise<boolean> {
|
||||
} catch (err) {
|
||||
console.error('[ScreenShare] Failed to start screen share:', err);
|
||||
if (hwOverdrive) deactivateHwOverdrive();
|
||||
// Loopback unsupported (Linux without pulse, macOS without Catap) makes
|
||||
// the whole getDisplayMedia call reject. No auto-retry: the picker
|
||||
// selection was consumed, retrying would re-prompt it.
|
||||
if (config.shareAudio && err instanceof Error && err.name !== 'NotAllowedError') {
|
||||
useUIStore.getState().addToast(
|
||||
'Could not start stream with system audio. Disable "Share system audio" in the picker if your system does not support it.',
|
||||
'warning',
|
||||
8000,
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user