Skip to content

Commit

Permalink
Basic support for IVS Rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyd0g committed Feb 15, 2024
1 parent b6cbc12 commit 8caea43
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/amcrest/src/amcrest-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { getDeviceInfo } from './probe';
export enum AmcrestEvent {
MotionStart = "Code=VideoMotion;action=Start",
MotionStop = "Code=VideoMotion;action=Stop",
CrossLineStart="Code=CrossLineDetection;action=Start",
CrossLineStop="Code=CrossLineDetection;action=Stop",
CrossRegionStart="Code=CrossRegionDetection;action=Start",
CrossRegionStop="Code=CrossRegionDetection;action=Stop",
AudioStart = "Code=AudioMutation;action=Start",
AudioStop = "Code=AudioMutation;action=Stop",
TalkInvite = "Code=_DoTalkAction_;action=Invite",
Expand Down
14 changes: 14 additions & 0 deletions plugins/amcrest/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@ class AmcrestCamera extends RtspSmartCamera implements VideoCameraConfiguration,
else if (event === AmcrestEvent.MotionStop) {
// use resetMotionTimeout
}
if (event === AmcrestEvent.CrossLineStart) {
this.motionDetected = true;
resetMotionTimeout();
}
else if (event === AmcrestEvent.CrossLineStop) {
// use resetMotionTimeout
}
if (event === AmcrestEvent.CrossRegionStart) {
this.motionDetected = true;
resetMotionTimeout();
}
else if (event === AmcrestEvent.CrossRegionStop) {
// use resetMotionTimeout
}
else if (event === AmcrestEvent.AudioStart) {
this.audioDetected = true;
}
Expand Down

0 comments on commit 8caea43

Please sign in to comment.