summaryrefslogtreecommitdiff
path: root/www/js/EventModalCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-11-10 15:00:11 -0500
committerPliable Pixels <pliablepixels@gmail.com>2016-11-10 15:00:11 -0500
commit445dbcf856901bde8175829edf3a08400f830d56 (patch)
treec821d499cc2f8af6f24ad9736f8c5c95e4ff8b35 /www/js/EventModalCtrl.js
parenta11e9426dcbbec7c5df39c29b99befa360feaea8 (diff)
video automatically fits to screen #358
Diffstat (limited to 'www/js/EventModalCtrl.js')
-rw-r--r--www/js/EventModalCtrl.js10
1 files changed, 8 insertions, 2 deletions
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,