UNPKG

onvif-ptz-cli

Version:

Node.js cli tool for controlling PTZ cameras via the ONVIF protocol.

13 lines (10 loc) 266 B
import onvif from "node-onvif"; export async function createDevice({ baseUrl, path, username, password }) { const device = new onvif.OnvifDevice({ xaddr: baseUrl + path, user: username, pass: password, }); await device.init(); return device; }