Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@scrypted/amcrest

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scrypted/amcrest - npm Package Compare versions

Comparing version 0.0.69 to 0.0.70

2

package.json
{
"name": "@scrypted/amcrest",
"version": "0.0.69",
"version": "0.0.70",
"description": "Amcrest Plugin for Scrypted",

@@ -5,0 +5,0 @@ "author": "Scrypted",

@@ -59,6 +59,18 @@ import AxiosDigestAuth from '@koush/axios-digest-auth';

const data = buffer.toString();
const parts = data.split(';');
let index: string;
try {
for (const part of parts) {
if (part.startsWith('index')) {
index = part.split('=')[1]?.trim();
}
}
}
catch (e) {
this.console.error('error parsing index', data);
}
// this.console?.log('event', data);
for (const event of Object.values(AmcrestEvent)) {
if (data.indexOf(event) !== -1) {
stream.emit('event', event);
stream.emit('event', event, index);
}

@@ -65,0 +77,0 @@ }

@@ -42,3 +42,9 @@ import sdk, { MediaObject, Camera, ScryptedInterface, Setting, ScryptedDeviceType, Intercom, FFMpegInput, ScryptedMimeTypes, PictureOptions } from "@scrypted/sdk";

events.on('error', e => ret.emit('error', e));
events.on('event', (event: AmcrestEvent) => {
events.on('event', (event: AmcrestEvent, index: string) => {
const channelNumber = this.getRtspChannel();
if (channelNumber) {
const idx = parseInt(index) + 1;
if (idx.toString() !== channelNumber)
return;
}
if (event === AmcrestEvent.MotionStart) {

@@ -45,0 +51,0 @@ this.motionDetected = true;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc