Skip to content

Commit de26fba

Browse files
authored
fix(video): hide ffmpeg console windows on Windows (#43575)
`ffmpeg` can open a console from the hidden CLI daemon on Windows forward `windowsHide` and enable it only for video recording while preserving browser launches fixes <#43515>
1 parent 15cdc4e commit de26fba

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/playwright-core/src/server/videoRecorder.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ class FfmpegVideoRecorder {
209209
command: this._ffmpegPath,
210210
args,
211211
stdio: 'stdin',
212+
windowsHide: true,
212213
log: (message: string) => debugLogger.log('browser', message),
213214
tempDirectories: [],
214215
attemptToGracefullyClose: async () => {

‎packages/utils/processLauncher.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type LaunchProcessOptions = {
3030
args?: string[],
3131
env?: NodeJS.ProcessEnv,
3232
shell?: boolean,
33+
windowsHide?: boolean,
3334

3435
handleSIGINT?: boolean,
3536
handleSIGTERM?: boolean,
@@ -142,6 +143,7 @@ export async function launchProcess(options: LaunchProcessOptions): Promise<Laun
142143
env: options.env,
143144
cwd: options.cwd,
144145
shell: options.shell,
146+
windowsHide: options.windowsHide,
145147
stdio,
146148
};
147149
const spawnedProcess = childProcess.spawn(options.command, options.args || [], spawnOptions);

0 commit comments

Comments
 (0)