Skip to content

Commit 69cf4c5

Browse files
committed
Document bug on Wayland with audio sharing.
1 parent b263fa1 commit 69cf4c5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sources/code/main/windows/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ export default function createMainWindow(...flags:MainWindowFlags): BrowserWindo
547547
autoResize();
548548
win.on("resize", autoResize);
549549
});
550-
} else void sources.then(sources => {
550+
} else sources.then(sources => {
551551
let allowAudioSharing = false;
552552
// FIXME: L10N
553553
if (apiGuard.unixAudioSharing) allowAudioSharing = dialog.showMessageBoxSync(win, {
@@ -559,6 +559,11 @@ export default function createMainWindow(...flags:MainWindowFlags): BrowserWindo
559559
video: sources[0],
560560
...(allowAudioSharing ? { audio: "loopback" } : {})
561561
}); else callback(null as unknown as Electron.Streams);
562+
}).catch((error: unknown) => {
563+
if (error === "Failed to get sources.") {
564+
console.error("[BUG] On Wayland, getting no sources might cause portal crash in Chrome.");
565+
console.error(" You won't be able to screen share until app restart.");
566+
} else commonCatches.print(error);
562567
});
563568
},{ useSystemPicker: true });
564569

0 commit comments

Comments
 (0)