diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-01 06:33:26 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-01 06:33:26 -0500 |
| commit | 2fe632d47c2c12aea423fdb837057d86d136e7c1 (patch) | |
| tree | 5169c6a293e617a46cb4cd9d4ce872eea9c415a3 /www/js/EventCtrl.js | |
| parent | 5f452cb3add568b0b2dcc795e7885b6275f918e1 (diff) | |
inital commits - getting video branch to work #60 - implemented in quick scrub - works fine
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 35 |
1 files changed, 34 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) |
