mirror of
https://github.com/koush/scrypted.git
synced 2026-02-09 08:42:19 +00:00
hikvision: dynamic/digital channel support
This commit is contained in:
4
plugins/hikvision/package-lock.json
generated
4
plugins/hikvision/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/hikvision",
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.53",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/hikvision",
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.53",
|
||||
"license": "Apache",
|
||||
"dependencies": {
|
||||
"@mhoc/axios-digest-auth": "^0.7.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/hikvision",
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.53",
|
||||
"description": "HikVision Plugin for Scrypted",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache",
|
||||
|
||||
@@ -81,7 +81,7 @@ export class HikVisionCameraAPI {
|
||||
this.console.log(data);
|
||||
for (const event of Object.values(HikVisionCameraEvent)) {
|
||||
if (data.indexOf(event) !== -1) {
|
||||
const channel = data.match(/<channelID>(.*?)</)?.[1];
|
||||
const channel = data.match(/<channelID>(.*?)</)?.[1] || data.match(/<dynChannelID>(.*?)</)?.[1];
|
||||
if (this.channel
|
||||
&& data.indexOf(`<channelID>${this.channel.substr(0, 1)}</channelID>`) === -1) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user