record
Contents:
record(filepath)
Start a screen recording using the recorder for the current operating system. Recording is supported on macOS, Windows, and Linux. On Linux, an X11 display must be identified by the DISPLAY environment variable; Wayland-only sessions are not supported. An error is thrown on unsupported operating systems.
import { record } from "@guidepup/record";
(async () => {
// Start the screen recording.
const stopRecording = record("./recordings/screenRecording.mp4");
// ... perform some commands.
// Stop and finalize the screen recording.
await stopRecording();
})();
Parameters:
filepathstring The file path to save the screen recording to.
Returns: Function An async function returning Promise<void> that stops and finalizes the screen recording.