Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/playwright-core/src/server/videoRecorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ class FfmpegVideoRecorder {
command: this._ffmpegPath,
args,
stdio: 'stdin',
// ffmpeg has no window of its own, so hiding its console on Windows is safe here,
// unlike for browser/driver processes. See https://github.com/microsoft/playwright/issues/43515.
windowsHide: true,
log: (message: string) => debugLogger.log('browser', message),
tempDirectories: [],
attemptToGracefullyClose: async () => {
Expand Down
5 changes: 5 additions & 0 deletions packages/utils/processLauncher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export type LaunchProcessOptions = {
args?: string[],
env?: NodeJS.ProcessEnv,
shell?: boolean,
// Only pass this for child processes that have no window of their own (e.g. ffmpeg).
// See https://github.com/microsoft/playwright/issues/43515: passing this unconditionally
// for every launched process previously broke Inspector, codegen and UI mode.
windowsHide?: boolean,

handleSIGINT?: boolean,
handleSIGTERM?: boolean,
Expand Down Expand Up @@ -142,6 +146,7 @@ export async function launchProcess(options: LaunchProcessOptions): Promise<Laun
env: options.env,
cwd: options.cwd,
shell: options.shell,
windowsHide: options.windowsHide,
stdio,
};
const spawnedProcess = childProcess.spawn(options.command, options.args || [], spawnOptions);
Expand Down