From 445dbcf856901bde8175829edf3a08400f830d56 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 10 Nov 2016 15:00:11 -0500 Subject: video automatically fits to screen #358 --- www/css/style.css | 27 +++++++++++++++++---------- www/js/EventModalCtrl.js | 10 ++++++++-- www/templates/events-modal.html | 14 ++++---------- 3 files changed, 29 insertions(+), 22 deletions(-) (limited to 'www') diff --git a/www/css/style.css b/www/css/style.css index 445bb8ba..7812a173 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -825,7 +825,10 @@ input[type=range]::-webkit-slider-thumb { float: left; } -.videogular-container-modal-width { +/* don't need these, responsive is on +and parent div is hard pixels + + .videogular-container-modal-width { height: auto; width: 100%; margin: auto; @@ -833,10 +836,11 @@ input[type=range]::-webkit-slider-thumb { } .videogular-container-modal-height { - height: 40%; + height: 100%; + width:auto; margin: auto; - overflow: hidden; -} + +}*/ videogular div.event-time { position: absolute; @@ -873,13 +877,7 @@ videogular div.event-time { box-sizing: border-box; } -body { - font-family: sans-serif; -} -* { - font-family: -apple-system, "Helvetica Neue", sans-serif; -} /* ---- grid ---- */ @@ -1148,3 +1146,12 @@ body { display: none !important; } } + +body { + font-family: sans-serif; + height:100%; +} + +* { + font-family: -apple-system, "Helvetica Neue", sans-serif; +} \ No newline at end of file diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 628cc1ff..d4dcf3f0 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -6,7 +6,7 @@ -angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$rootScope', 'zm', 'NVRDataModel', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce', 'carouselUtils', '$ionicPopup', '$translate', '$filter', function ($scope, $rootScope, zm, NVRDataModel, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce, carouselUtils, $ionicPopup, $translate, $filter) { +angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$rootScope', 'zm', 'NVRDataModel', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce', 'carouselUtils', '$ionicPopup', '$translate', '$filter', 'SecuredPopups', function ($scope, $rootScope, zm, NVRDataModel, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce, carouselUtils, $ionicPopup, $translate, $filter, SecuredPopups) { // from parent scope @@ -181,7 +181,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.onVideoError = function (event) { + if (!$scope.isModalActive) return; NVRDataModel.debug ("player reported a video error:"+JSON.stringify(event)); + $rootScope.zmPopup = SecuredPopups.show('alert', { + title: $translate.instant('kError'), + template: $rootScope.platformOS == 'desktop' ?$translate.instant('kVideoError'):$translate.instant('kVideoErrorMobile') + }); + }; @@ -1487,7 +1493,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.videoObject = { config: { autoPlay: true, - responsive:true, + responsive:false, nativeControls:false, playsInline:true, diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 24078df7..f9dd446d 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -2,7 +2,7 @@ - +
@@ -18,15 +18,8 @@
- - - -
- - +
+
@@ -45,6 +38,7 @@ +