chore: PLAYWRIGHT_FFMPEG_PATH env variable

This commit is contained in:
Yury Semikhatsky 2024-08-09 10:01:38 -07:00
parent 5cc1e7b299
commit e44cf1853d

View file

@ -905,7 +905,7 @@ class FrameSession {
async _createVideoRecorder(screencastId: string, options: types.PageScreencastOptions): Promise<void> { async _createVideoRecorder(screencastId: string, options: types.PageScreencastOptions): Promise<void> {
assert(!this._screencastId); assert(!this._screencastId);
const ffmpegPath = registry.findExecutable('ffmpeg')!.executablePathOrDie(this._page.attribution.playwright.options.sdkLanguage); const ffmpegPath = process.env.PLAYWRIGHT_FFMPEG_PATH || registry.findExecutable('ffmpeg')!.executablePathOrDie(this._page.attribution.playwright.options.sdkLanguage);
this._videoRecorder = await VideoRecorder.launch(this._crPage._page, ffmpegPath, options); this._videoRecorder = await VideoRecorder.launch(this._crPage._page, ffmpegPath, options);
this._screencastId = screencastId; this._screencastId = screencastId;
} }