summaryrefslogtreecommitdiff
path: root/www/js/ModalCtrl.js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-12-24 07:19:04 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-12-24 07:19:04 -0500
commit7c05ffe1f5665ca17513343fa5cfb7cb16673f7b (patch)
treef489a67bb15d4dcf95188be97a08edd1dd3e165f /www/js/ModalCtrl.js
parent89969cf4d6dc308f68efc44d493f9a4a236a24cd (diff)
#121 - added a stop button - not really tested...
Former-commit-id: 5e2ddcc44e9d4a282eae4ec6e2cd174b983371ea
Diffstat (limited to 'www/js/ModalCtrl.js')
-rw-r--r--www/js/ModalCtrl.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js
index 0e1385cf..f92c6474 100644
--- a/www/js/ModalCtrl.js
+++ b/www/js/ModalCtrl.js
@@ -100,7 +100,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Down');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Down');
}
},
@@ -109,7 +109,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'DownLeft');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'DownLeft');
}
},
@@ -119,7 +119,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Left');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Left');
}
},
{
@@ -136,7 +136,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'UpLeft');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'UpLeft');
}
},
@@ -145,7 +145,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Up');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Up');
}
},
@@ -154,7 +154,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'UpRight');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'UpRight');
}
},
@@ -171,7 +171,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Right');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Right');
}
},
@@ -181,7 +181,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'DownRight');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'DownRight');
}
},
@@ -252,6 +252,10 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
// Send PTZ command to ZM
// Note: PTZ fails on desktop, don't bother about it
//-------------------------------------------------------------
+ $scope.controlPTZ = function (monitorId, cmd)
+ {
+ controlPTZ(monitorId, cmd);
+ };
function controlPTZ(monitorId, cmd) {
//curl -X POST "http://server.com/zm/index.php?view=request" -d
@@ -311,7 +315,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
view: "request",
request: "control",
id: monitorId,
- control: $scope.ptzMoveCommand + cmd,
+ control: cmd,
xge: "30", //wtf
yge: "30", //wtf
}