1.0.11 • Published 9 months ago

camera-watch v1.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

camera-watch

A Node.js module that monitors webcam usage state on Linux and macOS systems.

Installation

npm install camera-watch

Usage

import { watch } from "camera-watch";

watch({
  device: "video0", // optional, defaults to 'video0' on Linux; not required on macOS.
  onChange: (state) => {
    console.log("Camera state:", state);
  },
  onError: (error) => {
    console.error("Error:", error);
  },
});

Platform Support

  • Linux: Monitors camera usage by watching device access using lsof
  • macOS: Monitors camera state by watching VDCAssistant power state logs

License

MIT

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago