From 20b3a754ce5b367f7ff1e50fc49cccf71bd4a30f Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 12 Feb 2019 15:45:08 -0500 Subject: add object detect frame in zmNinja too --- www/js/EventModalCtrl.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'www/js/EventModalCtrl.js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 5dde11a4..72214748 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -1876,6 +1876,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro tempAlarms = []; $scope.FrameArray = []; + //console.log ("FRAME ARRAY: "+JSON.stringify(data)); if (data.event && data.event.Frame) $scope.FrameArray = data.event.Frame; var ts = 0; @@ -1901,6 +1902,19 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (tempAlarms.length > 1) // don't do it for just one too $scope.alarm_images = tempAlarms; + if (data.event.Event.Notes.indexOf('detected:') != -1) { + + NVR.debug ("You have object detection! Adding object detect frame"); + $scope.alarm_images.unshift({ + frameid: 'objdetect', + id: 'doesntseemtobeusedhuh' + }); + NVR.debug ("Your ZM version is:"+NVR.getCurrentServerVersion()+" and your obj frame setting is:"+NVR.getLogin().showObjectDetectionFrame); + + } else { + NVR.debug ("No object detection found in notes"); + } + } $scope.constructFrame = function (fid) { -- cgit v1.2.3