src/widgets/PopcornPlayer.js
changeset 967 b4c6e64acb2d
parent 959 ee11ed1b739e
child 970 b1c3bf6eca78
--- a/src/widgets/PopcornPlayer.js	Wed Sep 26 18:55:36 2012 +0200
+++ b/src/widgets/PopcornPlayer.js	Tue Oct 02 12:05:15 2012 +0200
@@ -46,6 +46,9 @@
         }
         _params.controls = 0;
         _params.modestbranding = 1;
+        if (this.autostart || this.autoplay) {
+            _params.autoplay = 1;
+        }
         _url = _urlparts[0] + '?' + IriSP.jQuery.param(_params);
         
         var _popcorn = Popcorn.youtube(this.container, _url);
@@ -75,7 +78,11 @@
         }
         this.$.html(_videoEl);
         var _popcorn = Popcorn("#" + _tmpId);
+        if (this.autostart || this.autoplay) {
+            _popcorn.autoplay(true);
+        }
     }
+    
 
     // Binding functions to Popcorn