1.0.11 • Published 7 months ago

camera-watch v1.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
7 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

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago