Does Screenwire work with both Node.js and Electron?
Yes. The package is built for both plain Node.js projects and Electron apps, with a small CommonJS API and no special bundler setup.
Open-source screen recording that feels simple to ship: no fragile setup, no install-time surprises, and no paid SDK lock-in.
Record screen, system audio, and microphone to MP4 on macOS and Windows using native OS APIs, with prebuilt binaries included from the start.
const recorder = require('screenwire')
const path = require('path')
const os = require('os')
const outputPath = path.join(os.homedir(), 'Desktop', 'recording.mp4')
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))
async function main() {
await recorder.startAsync(outputPath)
console.log('Recording started...')
await sleep(5000)
const status = await recorder.stopAsync()
console.log(status)
}
main()
// Screen + system audio + microphone (default)
await recorder.startAsync(outputPath)
// Screen + microphone only
await recorder.startAsync(outputPath, {
audio: false
})
// Screen + system audio only
await recorder.startAsync(outputPath, {
microphone: false
})
// Screen only
await recorder.startAsync(outputPath, {
audio: false,
microphone: false
})
audio controls system audio capture. microphone controls mic input. Both default to true.
| Option | Type | Default | Description |
|---|---|---|---|
| audio | boolean | true | Capture system audio played through speakers |
| microphone | boolean | true | Capture microphone input when available |
const recorder = require('screenwire')
const path = require('path')
const os = require('os')
const outputPath = path.join(os.homedir(), 'Desktop', 'recording.mp4')
recorder.start(outputPath, { microphone: false }, (status) => {
console.log('[status]', status)
})
setTimeout(() => {
recorder.stop((status) => {
console.log('[done]', status)
})
}, 5000)
Built on the native capture stack of each platform, with ScreenCaptureKit on macOS and a NativeAOT Windows bridge for video and audio capture.
Capture system audio and microphone input together, or disable either one with simple audio and microphone options.
Install the package and start recording. No Xcode, no .NET SDK, and no node-gyp required on the user’s machine.
Outputs standard H.264/AAC MP4 files directly to disk, ready for immediate playback or sharing.
Fits cleanly into modern async flows or older callback-based code without extra wrappers.
A small CommonJS API that drops into Node.js or Electron projects without extra bundler work.
| Platform | Video | System audio | Microphone | Status |
|---|---|---|---|---|
| macOS 13+ (Apple Silicon) | H.264 MP4 | ✓ | macOS 15+ | Stable |
| Windows 10/11 (x64) | H.264 MP4 | ✓ | ✓ | Stable |
| Linux | — | — | — | Not yet |
On macOS, Screen Recording permission is required and the OS prompts on first use. Microphone capture on macOS requires macOS 15 or newer.
On Windows, screen video is captured through GDI and ffmpeg, system audio uses direct WASAPI loopback COM interop, and microphone input uses NAudio when a device is available.
recorder.startAsync(outputPath[, options]) → Promise<string>
Starts recording to the given .mp4 path and resolves once recording is active.
recorder.stopAsync() → Promise<string>
Stops recording, finalizes the file, and resolves with the final status string once it is saved.
recorder.start(outputPath[, options], onStatus)
Callback version of startAsync. The onStatus(message) callback receives progress strings while recording starts and runs.
recorder.stop(onStatus)
Callback version of stopAsync. The onStatus(message) callback receives the final status string.
recorder.isRecording()
Returns true while a capture is in progress.
| String | Meaning |
|---|---|
Checking permissions... |
Verifying screen recording permission on macOS |
Preparing screen capture... |
Setting up the capture pipeline before recording starts |
Recording to /path/file.mp4 |
Recording is active and writing to the target file |
Stopping recording... |
Stop was called and the MP4 is being finalized |
Saved recording to /path/file.mp4 |
The recording file was successfully written |
We built Screenwire because we needed dependable screen recording inside an Electron app at BreakingPoint and the existing options were awkward to ship: ffmpeg-heavy wrappers, abandoned native modules, or paid SDKs with licensing friction. So we made a package that installs cleanly, uses the native APIs each platform already provides, and stays simple from first install to first recording.
Yes. The package is built for both plain Node.js projects and Electron apps, with a small CommonJS API and no special bundler setup.
Yes. Both are enabled by default, and you can disable either one with the audio or microphone option.
No. Screenwire ships with prebuilt binaries and uses native platform APIs, so developers can skip ffmpeg installs, Xcode setup, .NET SDKs, and node-gyp troubleshooting.
Today, Screenwire supports macOS 13+ on Apple Silicon and Windows 10/11 on x64. On macOS, microphone capture requires macOS 15+. Linux support is planned, but not available yet.
npm install screenwire
MIT licensed · Built and maintained by BreakingPoint