Merge pull request #27301 from gumara-dev/fix_branch

Fix: 1:1 call - screen sharing no longer works after pressing the cancel button in Element-Desktop
This commit is contained in:
Robin 2024-04-09 18:43:57 +00:00 committed by GitHub
commit 8ce46d3de8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -170,8 +170,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
window.electron.on("openDesktopCapturerSourcePicker", () => {
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
finished.then(([source]) => {
if (!source) return;
this.ipc.call("callDisplayMediaCallback", source);
// getDisplayMedia promise does not return if no dummy is passed here as source
this.ipc.call("callDisplayMediaCallback", source ?? { id: "", name: "", thumbnailURL: "" });
});
});