diff --git a/packages/puppeteer-core/src/node/ScreenRecorder.ts b/packages/puppeteer-core/src/node/ScreenRecorder.ts index ad284612d3b..4096d1ca48f 100644 --- a/packages/puppeteer-core/src/node/ScreenRecorder.ts +++ b/packages/puppeteer-core/src/node/ScreenRecorder.ts @@ -177,7 +177,9 @@ export class ScreenRecorder extends PassThrough { concatMap(([{timestamp: previousTimestamp, buffer}, {timestamp}]) => { return from( Array( - Math.round(DEFAULT_FPS * (timestamp - previousTimestamp)) + Math.round( + DEFAULT_FPS * Math.max(timestamp - previousTimestamp, 0) + ) ).fill(buffer) ); }),