1.0.11 • Published 8 months ago

camera-watch v1.0.11

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

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago