UNPKG

node-camera

Version:

This `gphoto2` wrapper for Node.js enables you to capture images, bursts, timelapses or even video.

11 lines (9 loc) 290 B
import { Camera, Identificator } from "../src"; Camera.listCameras() .then(list => { if (list.length) { const CanonEOS7D = new Camera(list[0]); CanonEOS7D.captureImage({ filename: "photo.%C", forceOverwrite: true }); } }) .catch(e => console.log(`error: ${e}`));