🎥 Make videos programmatically with React
condense
Jonny Burgerfc95af338df1
diff --git a/packages/renderer/src/browser/BrowserRunner.ts b/packages/renderer/src/browser/BrowserRunner.tsindex e9c0c68e55..2068160c6a 100644--- a/packages/renderer/src/browser/BrowserRunner.ts+++ b/packages/renderer/src/browser/BrowserRunner.ts@@ -76,8 +76,7 @@ export class BrowserRunner {}start(options: LaunchOptions): void {- const {handleSIGINT, handleSIGTERM, handleSIGHUP, dumpio, env, pipe} =- options;+ const {handleSIGINT, handleSIGTERM, handleSIGHUP, dumpio, pipe} = options;let stdio: Array<'ignore' | 'pipe'>;if (pipe) {if (dumpio) {@@ -101,8 +100,8 @@ export class BrowserRunner {// process tree with `.kill(-pid)` command. @see// https://nodejs.org/api/child_process.html#child_process_options_detacheddetached: process.platform !== 'win32',- env,stdio,+ env: process.env,});if (dumpio) {diff --git a/packages/renderer/src/browser/LaunchOptions.ts b/packages/renderer/src/browser/LaunchOptions.tsindex e7048f9cb4..e3f34ae861 100644--- a/packages/renderer/src/browser/LaunchOptions.ts+++ b/packages/renderer/src/browser/LaunchOptions.ts@@ -19,16 +19,8 @@ import type {Product} from './Product';export interface BrowserLaunchArgumentOptions {headless?: boolean | 'chrome';- userDataDir?: string;- devtools?: boolean;- debuggingPort?: number;args: string[];}-export type ChromeReleaseChannel =- | 'chrome'- | 'chrome-beta'- | 'chrome-canary'- | 'chrome-dev';export interface LaunchOptions {executablePath?: string;@@ -37,7 +29,6 @@ export interface LaunchOptions {handleSIGHUP?: boolean;timeout?: number;dumpio?: boolean;- env?: Record<string, string | undefined>;pipe?: boolean;product?: Product;extraPrefsFirefox?: Record<string, unknown>;diff --git a/packages/renderer/src/browser/Launcher.ts b/packages/renderer/src/browser/Launcher.tsindex 5b609b58d0..edccf124c9 100644--- a/packages/renderer/src/browser/Launcher.ts+++ b/packages/renderer/src/browser/Launcher.ts@@ -56,13 +56,11 @@ class ChromeLauncher implements ProductLauncher {dumpio = false,executablePath,pipe = false,- env = process.env,handleSIGINT = true,handleSIGTERM = true,handleSIGHUP = true,defaultViewport,timeout = 30000,- debuggingPort,} = options;const chromeArguments = args;@@ -73,13 +71,7 @@ class ChromeLauncher implements ProductLauncher {})) {if (pipe) {- assert(- !debuggingPort,- 'Browser should be launched with either pipe or debugging port - not both.'- );chromeArguments.push('--remote-debugging-pipe');- } else {- chromeArguments.push(`--remote-debugging-port=${debuggingPort || 0}`);}}@@ -129,7 +121,6 @@ class ChromeLauncher implements ProductLauncher {handleSIGTERM,handleSIGINT,dumpio,- env,pipe: false,});@@ -186,14 +177,12 @@ class FirefoxLauncher implements ProductLauncher {const {dumpio = false,executablePath = null,- env = process.env,handleSIGINT = true,handleSIGTERM = true,handleSIGHUP = true,defaultViewport,timeout = 30000,extraPrefsFirefox = {},- debuggingPort = null,} = options;const firefoxArguments = [];@@ -204,7 +193,7 @@ class FirefoxLauncher implements ProductLauncher {return argument.startsWith('--remote-debugging-');})) {- firefoxArguments.push(`--remote-debugging-port=${debuggingPort || 0}`);+ firefoxArguments.push(`--remote-debugging-port=0`);}let userDataDir: string | undefined;@@ -260,7 +249,6 @@ class FirefoxLauncher implements ProductLauncher {handleSIGTERM,handleSIGINT,dumpio,- env,});let browser;@@ -319,12 +307,7 @@ class FirefoxLauncher implements ProductLauncher {}defaultArgs(options: BrowserLaunchArgumentOptions): string[] {- const {- devtools = false,- headless = !devtools,- args = [],- userDataDir = null,- } = options;+ const {headless = true, args = []} = options;const firefoxArguments = ['--no-remote'];@@ -334,19 +317,10 @@ class FirefoxLauncher implements ProductLauncher {firefoxArguments.push('--wait-for-browser');}- if (userDataDir) {- firefoxArguments.push('--profile');- firefoxArguments.push(userDataDir);- }-if (headless) {firefoxArguments.push('--headless');}- if (devtools) {- firefoxArguments.push('--devtools');- }-if (args.every((arg) => {return arg.startsWith('-');