From a711b32fd585308284c96f05dc9772a9abca1e3a Mon Sep 17 00:00:00 2001 From: lucas_nz Date: Sat, 29 Aug 2020 21:29:50 +1200 Subject: display gif if api supports --- www/js/NVR.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'www/js/NVR.js') diff --git a/www/js/NVR.js b/www/js/NVR.js index f1c369c3..a9b552e7 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -2674,7 +2674,10 @@ angular.module('zmApp.controllers') //console.log("API VERSION RETURNED: " + JSON.stringify(success)); $rootScope.apiValid = true; - if (versionCompare(success.data.version, '1.32.0') != -1) { + if (versionCompare(success.data.version, '1.34.0') != -1) { + debug("objdetect supported in image.php"); + snapshotFrame = 'objdetect'; + } else if (versionCompare(success.data.version, '1.32.0') != -1) { debug("snapshot supported in image.php"); snapshotFrame = 'snapshot'; } else { -- cgit v1.2.3 From 1139b026aedbc609189a5b3cb7ef446e1ceec09d Mon Sep 17 00:00:00 2001 From: lucas_nz Date: Sat, 5 Sep 2020 11:41:25 +1200 Subject: select event view thumbnails type, replaces enableThumbs in dev options. Enables selection of different thumbnail types. If gif is selected limit the number of events returned to 5 to improve load time. --- www/js/NVR.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'www/js/NVR.js') diff --git a/www/js/NVR.js b/www/js/NVR.js index a9b552e7..5bdc23b9 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -188,7 +188,6 @@ angular.module('zmApp.controllers') 'timelineScale': -1, 'hideArchived': false, 'videoPlaybackSpeed': 2, - 'enableThumbs': true, 'enableStrictSSL': false, 'enableSlowLoading': false, 'isFullScreen': false, @@ -1562,10 +1561,9 @@ angular.module('zmApp.controllers') } + if (typeof loginData.eventViewThumbs == 'undefined') { - if (typeof loginData.enableThumbs == 'undefined') { - - loginData.enableThumbs = true; + loginData.eventViewThumbs = 'snapshot'; } @@ -2674,10 +2672,7 @@ angular.module('zmApp.controllers') //console.log("API VERSION RETURNED: " + JSON.stringify(success)); $rootScope.apiValid = true; - if (versionCompare(success.data.version, '1.34.0') != -1) { - debug("objdetect supported in image.php"); - snapshotFrame = 'objdetect'; - } else if (versionCompare(success.data.version, '1.32.0') != -1) { + if (versionCompare(success.data.version, '1.32.0') != -1) { debug("snapshot supported in image.php"); snapshotFrame = 'snapshot'; } else { -- cgit v1.2.3