controller of hikivision's IP Camera

Usage no npm install needed!

<script type="module">
  import hikivisioncontroller from 'https://cdn.skypack.dev/hikivisioncontroller';


hikivision IP Cameras PTZ Controller and Video Graber Node.js implements based on hik's offical SDK

Usage example:

var {context,controller,graber}=require("hikivisioncontroller");

let c=new context();
await c.init("","admin","iampassword");//get an IP-Camera's context

let g=new graber(c);//start a graber of the camera images
g.onjpg(console.log);//images data callback

let ct=new controller(c);//start a PTZ Controller
await ct.refreshXYZ();//make Controller know the X,Y,Zoom Values now.

//Xrange:0-1 Yrange:0-1 ZoomRange:0-2
await ct.goX(0.7);// goX

await ct.goY(0.1);//then goY

//or something else...