From 0aba5655e37dfbba8bba999510bf8c263f801642 Mon Sep 17 00:00:00 2001 From: Levan Abashidze Date: Sun, 21 Mar 2021 04:00:41 +0400 Subject: [PATCH] Add duration between frames Receive duration variable inside afterWritingImageFile function and write after each record inside images list file. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 11c4ebb..17682e2 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ class PuppeteerVideoRecorder { await this.fsHandler.init(outputFolder); const { imagesPath,imagesFilename, appendToFile } = this.fsHandler; await this.screenshots.init(page, imagesPath, { - afterWritingImageFile: (filename) => appendToFile(imagesFilename, `file '${filename}'\n`) + afterWritingImageFile: (filename,duration) => appendToFile(imagesFilename, `file '${filename}'\nduration ${duration}\n`) }); }