summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-11-01 06:33:26 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-11-01 06:33:26 -0500
commit2fe632d47c2c12aea423fdb837057d86d136e7c1 (patch)
tree5169c6a293e617a46cb4cd9d4ce872eea9c415a3 /www/js
parent5f452cb3add568b0b2dcc795e7885b6275f918e1 (diff)
inital commits - getting video branch to work #60 - implemented in quick scrub - works fine
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventCtrl.js35
-rw-r--r--www/js/app.js3
2 files changed, 37 insertions, 1 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 483e3d55..c5aad8d5 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -7,7 +7,7 @@
// and whether the new API has a better mechanism
angular.module('zmApp.controllers')
- .controller('zmApp.EventCtrl', ['$scope', '$rootScope', 'zm', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', '$ionicSlideBoxDelegate', '$ionicPosition', '$ionicPopover', '$ionicPopup', 'EventServer', '$cordovaBadge', '$cordovaLocalNotification', function ($scope, $rootScope, zm, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, $ionicSlideBoxDelegate, $ionicPosition, $ionicPopover, $ionicPopup, EventServer, $cordovaBadge, $cordovaLocalNotification) {
+ .controller('zmApp.EventCtrl', ['$scope', '$rootScope', 'zm', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', '$ionicSlideBoxDelegate', '$ionicPosition', '$ionicPopover', '$ionicPopup', 'EventServer', '$sce', '$cordovaBadge', '$cordovaLocalNotification', function ($scope, $rootScope, zm, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, $ionicSlideBoxDelegate, $ionicPosition, $ionicPopover, $ionicPopup, EventServer, $sce, $cordovaBadge, $cordovaLocalNotification) {
// events in last 5 minutes
// TODO https://server/zm/api/events/consoleEvents/5%20minute.json
@@ -15,6 +15,17 @@ angular.module('zmApp.controllers')
//---------------------------------------------------
// Controller main
//---------------------------------------------------
+
+ $scope.video={};
+ $scope.video.config = {
+ sources: [
+ {src: $sce.trustAsResourceUrl("http://173.228.105.6/zm/events/2/15/11/01/01/54/03/754-video.mp4"), type: "video/mp4"}
+
+ ],
+
+ theme: "lib/videogular-themes-default/videogular.css",
+
+ };
var loginData = ZMDataModel.getLogin();
@@ -705,8 +716,30 @@ angular.module('zmApp.controllers')
});
}
+
+
+
// now get event details to show alarm frames
var loginData = ZMDataModel.getLogin();
+
+
+ // grab video details
+ event.Event.video={};
+ var videoURL = loginData.url+"/events/"+event.Event.relativePath+event.Event.DefaultVideo;
+
+ console.log ("************** VIDEO IS " + videoURL);
+ event.Event.video.config = {
+ sources: [
+ {src:
+ $sce.trustAsResourceUrl(videoURL), type: "video/mp4"}
+
+ ],
+
+ theme: "lib/videogular-themes-default/videogular.css",
+
+ };
+
+
var myurl = loginData.apiurl + '/events/' + event.Event.Id + ".json";
ZMDataModel.zmLog("API for event details" + myurl);
$http.get(myurl)
diff --git a/www/js/app.js b/www/js/app.js
index 5e0a8a65..982a995e 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -15,6 +15,9 @@ angular.module('zmApp', [
'fileLogger',
'angular-carousel',
'angularAwesomeSlider',
+ 'com.2fdevs.videogular',
+ 'com.2fdevs.videogular.plugins.controls',
+ 'com.2fdevs.videogular.plugins.overlayplay'