File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,20 @@ import fs from 'node:fs';
2
2
import timers from 'node:timers/promises' ;
3
3
import {
4
4
recorder ,
5
- screens ,
6
- audioDevices ,
5
+ screens as getScreens ,
6
+ audioDevices as getAudioDevices ,
7
7
videoCodecs ,
8
8
} from './index.js' ;
9
9
10
10
async function main ( ) {
11
- console . log ( 'Screens:' , await screens ( ) ) ;
12
- console . log ( 'Audio devices:' , await audioDevices ( ) ) ;
11
+ const screens = await getScreens ( ) ;
12
+ console . log ( 'Screens:' , screens ) ;
13
+ const audioDevices = await getAudioDevices ( ) ;
14
+ console . log ( 'Audio devices:' , audioDevices ) ;
13
15
console . log ( 'Video codecs:' , videoCodecs ) ;
14
16
15
17
console . log ( 'Preparing to record for 5 seconds' ) ;
16
- await recorder . startRecording ( ) ;
18
+ await recorder . startRecordingScreen ( { screenId : screens [ 0 ] . id , audioDeviceId : audioDevices [ 0 ] . id } ) ;
17
19
console . log ( 'Recording started' ) ;
18
20
await recorder . isFileReady ;
19
21
console . log ( 'File is ready' ) ;
Original file line number Diff line number Diff line change @@ -245,8 +245,8 @@ Get a list of windows.
245
245
[{
246
246
id: '69732482',
247
247
title: 'Unicorn',
248
- applicationName : 'Safari',
249
- applicationBundleIdentifier : 'com.apple.Safari',
248
+ appName : 'Safari',
249
+ appBundleIdentifier : 'com.apple.Safari',
250
250
isActive: true,
251
251
isOnScreen: true,
252
252
layer: 0,
You can’t perform that action at this time.
0 commit comments