npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hikvision-node-win

v2.0.2

Published

[Windows]This module will provide a serial of node api to get the pictures of video using hikvision api.

Downloads

1

Readme

海康威视node扩展---Windows

一、项目说明

本项目是基于海康威视的开放接口(Windows 64版本)进行二次开发而成的 nodeJs 扩展模块。 本次更新优化了流程控制并增加了双通道播放的功能。

二、模块说明

1. 模块简介

模块名称: hikvision-node-win
简介: 本模块仅支持双流通道同时播放
示例服务程序:testHkNode.js
此示例程序依赖于: express, express-ws

2. 模块安装

npm install hikvision-node-win

3. 使用模块

const hkvision = require("hikvision-node-win");

4. 模块接口说明

  • 已知错误码 |错误码|含义| |:--:|:--:| |0| 成功| |300| 未登录| |301| 参数太少| |302| 流通道错误| |1|用户名密码错误。注册时输入的用户名或者密码错误。| |7|连接设备失败。设备不在线或网络原因引起的连接超时等。| |12|接口调用次序错误。| |17|参数错误。SDK接口中给入的输入或输出参数为空,或者参数格式或值不符合要求。| |800|网络流量超过设备能力上限| |其他|见海康接口错误码|

  • 获取当前版本号信息

    函数: version()

    返回值:版本号

  • 设备初始化

    函数: initDev()

    返回值: 0成功;其他见错误码表

  • 设备登录

    函数: loginDev(ip, port, name, password)

    |参数|含义|说明| |:-:|:-:|:-:| |ip|目标地址| ipv4地址(15位)| |port | 目标端口号| 4位(8000)| |name | 用户名| 5位(admin) |password| 用户密码| 8位 |

    返回值: 0成功;其他见错误码表

  • 设备注销

    函数: logoutDev()

    返回值: 0成功;其他见错误码表

  • 获取实时预览码流

    函数: realPlay(channel, way, cb)

    |参数|含义|说明| |:-:|:-:|:-:| |channel|视频通道号| 从0开始 | |way|流通道| 1 / 2 | |cb|图片流回调函数| function(type, buf)|

    返回值: 0成功;其他见错误码表

  • 获取实时播放

    函数: getRealplayHandle()

    返回值: 实时播放句柄

    注:需在调用完realPlay后立即获取

  • 停止实时播放

    函数: stopRealPlay(handle, way)

    |参数|含义|说明| |:-:|:-:|:-:| |handle|播放句柄| 通过接口获取 |way|流通道| 1 / 2

    返回值: 0成功;其他见错误码表

  • 获取回放流

    函数: playBack(channel, way, beginTime, endTime, cb)

    |参数|含义|说明| |:-:|:-:|:-:| |channel|通道号| 从0开始 |way|流通道| 1 / 2 |beginTime|开始日期 | 形如: 20211028000000| |endTime|结束日期 | 形如:20211028235959| |cb|码流回调函数| function(type, buf)|

    返回值: 0成功;其他见错误码表

    注: 调用此接口后须调用 playBackStart 方可开始回放

  • 获取回放句柄

    函数: getPlaybackHandle()

    返回值: 回放句柄

    注:需在调用完playBack后立即获取

  • 开始回放

    函数: playBackStart(handle)

    |参数|含义|说明| |:-:|:-:|:-:| |handle|播放句柄| 通过getPlaybackHandle接口获取

    返回值: 0成功; 其他见错误码表

  • 停止回放

    函数: playBackStop(handle, way)

    |参数|含义|说明| |:-:|:-:|:-:| |handle|播放句柄| 通过getPlaybackHandle接口获取 |way|流通道| 1 / 2

    返回值: 0成功; 其他见错误码表