wulkano / Aperture

Record the screen on macOS
MIT License
1.23k stars 111 forks source link

Fix example file #36

Closed albinekb closed 7 years ago

albinekb commented 7 years ago

Added await to startRecording, otherwise the recording won't be ~5s, since it takes some time to start the recording 😄

before:

❯ node example.js
Audio sources: [ { id: 'AppleHDAEngineInput:1B,0,1,0:1',
    name: 'Built-in Microphone' } ]
Recording for 5 seconds
Video saved in the current directory

~/Devel/git/aperture update-example
❯ mediainfo --Inform="Video;%Duration%" recording.mp4
3300

3.3s

After

❯ node example.js
Audio sources: [ { id: 'AppleHDAEngineInput:1B,0,1,0:1',
    name: 'Built-in Microphone' } ]
Recording for 5 seconds
Recording started
Video saved in the current directory

~/Devel/git/aperture update-example
❯ mediainfo --Inform="Video;%Duration%" recording.mp4
5100

5.1s