add electron launch flags option

This commit is contained in:
Vendicated 2023-09-28 01:28:38 +02:00
parent 4d8492cf48
commit e93b07001a
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 4 additions and 2 deletions

View file

@ -4,3 +4,5 @@
# all permissions at the defaults (public repos read only, 0 permissions):
# https://github.com/settings/personal-access-tokens/new
GITHUB_TOKEN=
ELECTRON_LAUNCH_FLAGS="--ozone-platform-hint=auto --enable-webrtc-pipewire-capturer --enable-features=WaylandWindowDecorations"

View file

@ -8,4 +8,4 @@ import "./utils/dotenv";
import { spawnNodeModuleBin } from "./utils/spawn.mjs";
spawnNodeModuleBin("electron", ["."]);
spawnNodeModuleBin("electron", [".", ...(process.env.ELECTRON_LAUNCH_FLAGS?.split(" ") ?? [])]);

View file

@ -48,7 +48,7 @@ export function registerScreenShareHandler() {
`Vesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify([data])}, true)`
);
callback(video ? { video } : {});
callback(video ? { video: sources[0] } : {});
return;
}