@scrypted/amcrest
Advanced tools
Comparing version 0.0.56 to 0.0.57
{ | ||
"name": "@scrypted/amcrest", | ||
"version": "0.0.56", | ||
"version": "0.0.57", | ||
"description": "Amcrest Plugin for Scrypted", | ||
@@ -36,3 +36,6 @@ "author": "Scrypted", | ||
"multiparty": "^4.2.2" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.11.0" | ||
} | ||
} |
@@ -12,2 +12,3 @@ import AxiosDigestAuth from '@koush/axios-digest-auth'; | ||
TalkHangup = "Code=_DoTalkAction_;action=Hangup", | ||
TalkPulse = "Code=_DoTalkAction_;action=Pulse", | ||
AlarmIPCStart = "Code=AlarmIPC;action=Start", | ||
@@ -14,0 +15,0 @@ AlarmIPCStop = "Code=AlarmIPC;action=Stop", |
@@ -37,2 +37,4 @@ import sdk, { MediaObject, Camera, ScryptedInterface, Setting, ScryptedDeviceType, Intercom, FFMpegInput, ScryptedMimeTypes } from "@scrypted/sdk"; | ||
let pulseTimeout: NodeJS.Timeout; | ||
events.on('close', () => ret.emit('error', new Error('close'))); | ||
@@ -63,2 +65,7 @@ events.on('error', e => ret.emit('error', e)); | ||
} | ||
else if (event === AmcrestEvent.TalkPulse) { | ||
clearTimeout(pulseTimeout); | ||
pulseTimeout = setTimeout(() => this.binaryState = false, 30000); | ||
this.binaryState = true; | ||
} | ||
}) | ||
@@ -65,0 +72,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
180526
570
1