Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2020-12-26 08:40:58 +01:00
parent eae3c1c496
commit 1dc1bc68db
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 8 additions and 16 deletions

View File

@ -482,22 +482,14 @@ export default class CallHandler {
return;
}
const selectDesktopCapturerSource = async (
sources: Array<ElectronDesktopCapturerSource>,
): Promise<ElectronDesktopCapturerSource> => {
console.log(DesktopCapturerSourcePicker);
const params = {
sources: sources,
};
const {finished} = Modal.createDialog(DesktopCapturerSourcePicker, params);
const [source] = await finished;
console.log("Dialog closed with", source);
return source;
};
call.placeScreenSharingCall(remoteElement, localElement, selectDesktopCapturerSource);
call.placeScreenSharingCall(
remoteElement,
localElement,
async (sources: Array<ElectronDesktopCapturerSource>) : Promise<ElectronDesktopCapturerSource> => {
const {finished} = Modal.createDialog(DesktopCapturerSourcePicker, {sources});
const [source] = await finished;
return source;
});
} else {
console.error("Unknown conf call type: %s", type);
}