only pass partial info
This commit is contained in:
parent
b87bcaefe9
commit
f7b7931847
1 changed files with 6 additions and 6 deletions
|
@ -33,18 +33,18 @@ export function registerScreenShareHandler() {
|
|||
process.platform === "linux" &&
|
||||
(process.env.XDG_SESSION_TYPE === "wayland" || !!process.env.WAYLAND_DISPLAY);
|
||||
|
||||
if (isWayland) {
|
||||
const video = sources[0];
|
||||
callback(video ? { video } : {});
|
||||
return;
|
||||
}
|
||||
|
||||
const data = sources.map(({ id, name, thumbnail }) => ({
|
||||
id,
|
||||
name,
|
||||
url: thumbnail.toDataURL()
|
||||
}));
|
||||
|
||||
if (isWayland) {
|
||||
const video = data[0];
|
||||
callback(video ? { video } : {});
|
||||
return;
|
||||
}
|
||||
|
||||
const choice = await request.frame
|
||||
.executeJavaScript(`Vesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify(data)})`)
|
||||
.then(e => e as StreamPick)
|
||||
|
|
Loading…
Reference in a new issue