]> git.parisson.com Git - mezzo.git/commitdiff
Autoplay video when overlay opens
authorJérémy Fabre <Jeremy@iMac-de-Jeremy-2.fritz.box>
Tue, 14 Feb 2017 08:49:31 +0000 (09:49 +0100)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy-2.fritz.box>
Tue, 14 Feb 2017 08:49:31 +0000 (09:49 +0100)
app/static/src/js/index.js
app/static/src/js/modules/instagram.js [new file with mode: 0644]
app/static/src/js/modules/video-overlay.js
app/static/src/js/modules/video.js

index bedd48d83ac081f76678b4650dec4d1fa6fe9ab4..c9be516d75348bc53a8f9ec0339563fb5e3d02b5 100644 (file)
@@ -19,6 +19,7 @@ var HomeMenu = require('./modules/home-menu');
 var Audio = require('./modules/audio');
 var Video = require('./modules/video');
 var VideoOverlay = require('./modules/video-overlay');
+var Instagram = require('./modules/instagram');
 
 //
 // Init all the modules
@@ -41,3 +42,4 @@ window[HomeMenu] = new HomeMenu();
 window[Audio] = new Audio();
 window['Video'] = new Video();
 window[VideoOverlay] = new VideoOverlay();
+window[Instagram] = new Instagram();
diff --git a/app/static/src/js/modules/instagram.js b/app/static/src/js/modules/instagram.js
new file mode 100644 (file)
index 0000000..f261edc
--- /dev/null
@@ -0,0 +1,19 @@
+var Instagram = function() {
+
+    this.feed = null;
+
+    //
+    // Init
+    //
+    this.init();
+
+};
+
+Instagram.prototype.init = function() {
+
+    var that = this;
+
+
+};
+
+module.exports = Instagram;
index ab99782dd8f638632df33390d9a3475c58513077..a95a52fd056524d7b10f07f3249678cd711d42f1 100644 (file)
@@ -55,8 +55,9 @@ VideoOverlay.prototype.openOverlay = function(url) {
 
     that.$overlayContent.load(url, function() {
 
-        window['Video'].init();
+        var player = window['Video'].init();
         setTimeout(function() {
+            player.play();
             that.$overlayLoader.hide();
             that.$overlayContent.addClass('loaded');
         }, 2000);
index 4238d58d8983eb561a58ed6d0bb62bcf791ee6b1..a2fc443895dab01215b892ea99ff62e9f21823da 100644 (file)
@@ -56,9 +56,9 @@ Video.prototype.init = function() {
         });
 
     });
-    console.log(playlist);
 
     that.player.playlist(playlist);
+    return that.player;
 
 };