|
|
@@ -26,11 +26,11 @@ angular.module('goApp.background', ['famous.angular', 'goApp.data'])
|
26
|
26
|
$scope.preload();
|
27
|
27
|
}
|
28
|
28
|
});
|
29
|
|
- }
|
|
29
|
+ };
|
30
|
30
|
|
31
|
31
|
$scope.preload = function() {
|
32
|
32
|
$scope.current_video = $scope.videos[$scope.randomIntFromInterval(0,3)];
|
33
|
|
- console.log("> Preloading video: " + $scope.current_video)
|
|
33
|
+ console.log("> Preloading video: " + $scope.current_video);
|
34
|
34
|
var preload = new createjs.LoadQueue();
|
35
|
35
|
preload.addEventListener("complete", handleFileComplete);
|
36
|
36
|
// for (var i = 0; i < $scope.videos.length; i++) {
|
|
|
@@ -44,14 +44,14 @@ angular.module('goApp.background', ['famous.angular', 'goApp.data'])
|
44
|
44
|
$rootScope.$broadcast('background:loaded');
|
45
|
45
|
},1000);
|
46
|
46
|
}
|
47
|
|
- }
|
|
47
|
+ };
|
48
|
48
|
|
49
|
49
|
$scope.randomIntFromInterval = function(min,max) {
|
50
|
50
|
return Math.floor(Math.random()*(max-min+1)+min);
|
51
|
51
|
};
|
52
|
52
|
|
53
|
53
|
$scope.startBackgroundVideo = function() {
|
54
|
|
- console.log("> Playing background video")
|
|
54
|
+ console.log("> Playing background video");
|
55
|
55
|
var video = new VideoSurface({
|
56
|
56
|
size: [undefined, undefined],
|
57
|
57
|
autoplay: true,
|
|
|
@@ -68,7 +68,7 @@ angular.module('goApp.background', ['famous.angular', 'goApp.data'])
|
68
|
68
|
Transform.translate(0, 0, 0);
|
69
|
69
|
});
|
70
|
70
|
$scope.backgroundView.add(videoModifier).add(video);
|
71
|
|
- }
|
|
71
|
+ };
|
72
|
72
|
|
73
|
73
|
// Start Background Controller
|
74
|
74
|
|