From 40bb5b51986ab78f80980612029cb6443fbc0706 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 4 Nov 2016 16:43:09 -0400 Subject: automatic playback with timeout hack enabled for #359 --- www/js/EventModalCtrl.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'www/js/EventModalCtrl.js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 9a73b58f..abdf5052 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -166,8 +166,11 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.onPlayerReady = function(handle) { + // we need this timeout to avoid load interrupting + // play -- I suppose its an angular digest foo thing NVRDataModel.debug ("Player is ready"); - handle.stop(); + $timeout (function() {handle.play();},400); + // window.stop(); }; @@ -1460,11 +1463,12 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro //console.log("************** VIDEO IS " + videoURL); - + $scope.videoObject = { config: { - autoPlay: false, - startTime: -1, + autoPlay: true, + + playsInline:true, sources: [ { src: $sce.trustAsResourceUrl(videoURL), -- cgit v1.2.3