Fix screensharing in 1:1 calls (#9612)

Co-authored-by: Robin Townsend <robin@robin.town>
This commit is contained in:
David Baker 2022-11-29 08:46:50 +00:00 committed by GitHub
parent 6b3098d8fe
commit 55d3522fcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -293,11 +293,13 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
isScreensharing = await this.props.call.setScreensharingEnabled(false);
} else {
if (PlatformPeg.get().supportsDesktopCapturer()) {
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
const { finished } = Modal.createDialog<[string]>(DesktopCapturerSourcePicker);
const [source] = await finished;
if (!source) return;
isScreensharing = await this.props.call.setScreensharingEnabled(true, source);
isScreensharing = await this.props.call.setScreensharingEnabled(true, {
desktopCapturerSourceId: source,
});
} else {
isScreensharing = await this.props.call.setScreensharingEnabled(true);
}