From d90a9534c04299c7eedefaf4388801722562ad09 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 23 Nov 2016 16:24:56 -0400 Subject: updates for #379 and #383 - you will now see both an MP4 and a GIF icon. MP4 will show only if you are on desktop and using 264 branch --- www/css/style.css | 23 +++++++++++++++++++++++ www/img/gif-anim.png | Bin 0 -> 25359 bytes www/img/gif.svg | 10 ++++++++++ www/img/mp4.svg | 7 +++++++ www/js/EventCtrl.js | 26 ++++++++++++++++++++++++++ www/lang/locale-en.json | 2 ++ www/templates/events.html | 6 +++++- 7 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 www/img/gif-anim.png create mode 100644 www/img/gif.svg create mode 100644 www/img/mp4.svg (limited to 'www') diff --git a/www/css/style.css b/www/css/style.css index 7812a173..7ddc4374 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -6,6 +6,29 @@ font-style: normal; } + +.icon.gif-icon { + background-repeat: no-repeat; + background-position: 50%; + height: 100%; + /*background-image: url('../img/gif.svg');*/ + background-image: url('../img/gif-anim.png'); + background-size:contain; +} + + +.icon.mp4-icon { + background-repeat: no-repeat; + background-position: 50%; + height: 100%; + /*background-image: url('../img/gif.svg');*/ + background-image: url('../img/mp4.svg'); + background-size:contain; +} + + + + .icon-super-speed:before { font-family: "fontawesome"; content: "\f135"; diff --git a/www/img/gif-anim.png b/www/img/gif-anim.png new file mode 100644 index 00000000..1f7e8e3f Binary files /dev/null and b/www/img/gif-anim.png differ diff --git a/www/img/gif.svg b/www/img/gif.svg new file mode 100644 index 00000000..86f92951 --- /dev/null +++ b/www/img/gif.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/www/img/mp4.svg b/www/img/mp4.svg new file mode 100644 index 00000000..d26f884a --- /dev/null +++ b/www/img/mp4.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index dc52846e..830cc8d9 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -399,6 +399,13 @@ angular.module('zmApp.controllers') } + if (myevents[i].Event.imageMode == 'path') + //if (1) + myevents[i].Event.videoPath = myevents[i].Event.baseURL + "/events/" + myevents[i].Event.relativePath + myevents[i].Event.DefaultVideo; + else + myevents[i].Event.videoPath = myevents[i].Event.baseURL + "/index.php?view=view_video&eid=" + myevents[i].Event.Id; + + if (idfound) { $scope.events.push(myevents[i]); @@ -526,6 +533,16 @@ angular.module('zmApp.controllers') } + $scope.mp4warning = function() + { + $ionicPopup.alert( + { + title: $translate.instant('kNote'), + template: "{{'kVideoMp4Warning' | translate }}" + }); + }; + + $scope.showImage = function(p, r, f, fid, e, imode, id, parray, ndx) { var img; @@ -2121,6 +2138,15 @@ angular.module('zmApp.controllers') myevents[i].Event.BasePath = computeBasePath(myevents[i]); myevents[i].Event.relativePath = computeRelativePath(myevents[i]); myevents[i].Event.height = eventsListDetailsHeight; + + + if (myevents[i].Event.imageMode == 'path') + //if (1) + myevents[i].Event.videoPath = myevents[i].Event.baseURL + "/events/" + myevents[i].Event.relativePath + myevents[i].Event.DefaultVideo; + else + myevents[i].Event.videoPath = myevents[i].Event.baseURL + "/index.php?view=view_video&eid=" + myevents[i].Event.Id; + + if (idfound) $scope.events.push(myevents[i]); } diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 008d5e06..cb302ed6 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -211,6 +211,7 @@ "kNoMonitors" :"No monitors to display", "kNoMoreEvents" :"no more events", "kNormalPlay" :"normal play", + "kNote" : "Note", "kNow" :"now", "kOff" :"off", "kOn" :"on", @@ -345,6 +346,7 @@ "kVideoError" : "Video not playable.", "kVideoErrorMobile" : "Video not playable. Try enabling 'force image path for events' in Dev Settings. The format may also be incompatible with a mobile system view", "kVideoLoading" : "Loading Video", + "kVideoMp4Warning" : "It is currently not possible to know when video is fully downloaded. Please track file size of download.", "kWake" :"Wake", "kWarningLargeTimeline" :"A large value can affect timeline performance. If you find timeline performance slow, try reducing the value to 200 and work your way up from there.", "kWeek" :"Week", diff --git a/www/templates/events.html b/www/templates/events.html index cfb6fa0d..849d9e3e 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -64,9 +64,13 @@
{{event.Event.MonitorName}} ({{event.Event.Id}})     - + + + +
{{event.Event.Frames}}   {{event.Event.AlarmFrames}}   -- cgit v1.2.3