Просмотр исходного кода

added autoplay to YT video player

AkiraLaine 9 лет назад
Родитель
Сommit
8d66aac8b2
2 измененных файлов с 11 добавлено и 7 удалено
  1. 1 1
      app/app.js
  2. 10 6
      app/templates/home.html

+ 1 - 1
app/app.js

@@ -959,7 +959,7 @@ if (Meteor.isClient) {
                             height: 540,
                             width: 960,
                             videoId: currentSong.id,
-                            playerVars: {controls: 0, iv_load_policy: 3, rel: 0, showinfo: 0},
+                            playerVars: {autoplay: 1, controls: 0, iv_load_policy: 3, rel: 0, showinfo: 0},
                             events: {
                                 'onReady': function(event) {
                                     event.target.seekTo(getTimeElapsed() / 1000);

+ 10 - 6
app/templates/home.html

@@ -1,11 +1,15 @@
 <template name="home">
     <div class="homepage">
-      {{> header}}
-      {{#if currentUser}}
-        {{> dashboard}}
-      {{else}}
-        {{> dashboard}}
-      {{/if}}
+        <!--<div class="alert alert-success alert-dismissible" role="alert" style="margin-bottom: 0">-->
+            <!--<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
+            <!--<strong>Hey there!</strong> Welcome to Musare, a modern, open-source, collaborative music app.-->
+        <!--</div>-->
+        {{> header}}
+        {{#if currentUser}}
+            {{> dashboard}}
+        {{else}}
+            {{> dashboard}}
+        {{/if}}
         <div class="push"></div>
     </div>
     {{> footer}}