记录
开始
安装到您的工程 :
npm install @guidepup/record
自动选择平台
使用 record 以选择当前操作系统的记录器 :
import { record } from "@guidepup/record";
const stopRecording = record("./recordings/screenRecording.mp4");
// ... perform some commands.
await stopRecording();
在 Linux 上,自动选择使用 X11 记录器并需要 DISPLAY
环境变量。 仅Wayland会话不支持.
窗口
在 Windows 上开始屏幕记录 :
import { windowsRecord } from "@guidepup/record";
(async () => {
// Start the screen recording passing the location to save the recording.
const stopRecording = windowsRecord("./recordings/screenRecording.mp4");
// ... perform some commands.
// Stop the screen recording.
await stopRecording();
})();
麦克OS
在MacOS上开始屏幕录制.
import { macOSRecord } from "@guidepup/record";
(async () => {
// Start the screen recording passing the location to save the recording.
const stopRecording = macOSRecord("./recordings/screenRecording.mov");
// ... perform some commands.
// Stop the screen recording.
await stopRecording();
})();
链接
使用 X11 显示器在 Linux 上启动屏幕记录 。 这个 DISPLAY
环境变量必须识别显示。 只有Wayland会议不是
由此记录器支持.
import { linuxRecord } from "@guidepup/record";
(async () => {
// Start the screen recording passing the location to save the recording.
const stopRecording = linuxRecord("./recordings/screenRecording.mp4");
// ... perform some commands.
// Stop the screen recording.
await stopRecording();
})();