Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #29 from mxschmitt/patch-2
Browse files Browse the repository at this point in the history
fix: Compatibility with QuickTime Player on macOS
  • Loading branch information
jperl authored May 31, 2020
2 parents 2ecc52b + 7601e98 commit d2533c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "QA Wolf",
"name": "playwright-video",
"license": "BSD-3.0",
"license": "BSD-3-Clause-Clear",
"version": "1.0.2",
"description": "Capture a video of a Playwright page",
"main": "./build/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/VideoWriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class VideoWriter extends EventEmitter {
.inputFormat('image2pipe')
.inputFPS(this._framesPerSecond)
.outputOptions('-preset ultrafast')
.outputOptions('-pix_fmt yuv420p')
.on('error', (e) => {
this.emit('ffmpegerror', e.message);

Expand Down
2 changes: 1 addition & 1 deletion tests/VideoWriter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('VideoWriter', () => {
writer.write(
// White 1×1 PNG http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html
Buffer.from(
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJggg==',
'iVBORw0KGgoAAAANSUhEUgAAAAYAAACiCAYAAABiQbywAAAAKklEQVRYhe3JMQEAAAjDMMC/52EAARzp2XSS1NFcEwAAAAAAAAAAAD9gARW/BUBIVRRtAAAAAElFTkSuQmCC',
'base64',
),
);
Expand Down
2 changes: 2 additions & 0 deletions tests/saveVideo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { join } from 'path';
import { chromium, ChromiumBrowser } from 'playwright';
import { saveVideo } from '../src/saveVideo';

jest.setTimeout(10 * 1000)

describe('saveVideo', () => {
let browser: ChromiumBrowser;

Expand Down

0 comments on commit d2533c6

Please sign in to comment.