mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-01 19:26:52 +00:00
* fix(cli): pin website capture connections to public peers * style(cli): keep capture policy explanations within comment limits * test(cli): separate case-sensitive dotenv assertions * fix(cli): honor capture deadlines and bootstrap isolation * chore: trim redundant capture dotenv comments * fix(capture): join signal cleanup and guard leading options * docs(capture): trim redundant cleanup comment
20 lines
684 B
TypeScript
20 lines
684 B
TypeScript
export function captureBrowserArgs(
|
|
disableWebgl: boolean,
|
|
viewportWidth: number,
|
|
viewportHeight: number,
|
|
platform: NodeJS.Platform = process.platform,
|
|
): string[] {
|
|
const needsLinuxSandboxException = platform === "linux";
|
|
return [
|
|
...(needsLinuxSandboxException ? ["--no-sandbox"] : []),
|
|
"--disable-dev-shm-usage",
|
|
...(disableWebgl
|
|
? ["--disable-gpu"]
|
|
: ["--enable-webgl", "--ignore-gpu-blocklist", "--use-gl=angle", "--use-angle=swiftshader"]),
|
|
"--disable-blink-features=AutomationControlled",
|
|
"--disable-background-timer-throttling",
|
|
"--disable-renderer-backgrounding",
|
|
`--window-size=${viewportWidth},${viewportHeight}`,
|
|
];
|
|
}
|