2
0
Эх сурвалжийг харах

Fixed bugs 'stop SoundCLoud song on leave' and a variable being misspelled.

KrisVos130 9 жил өмнө
parent
commit
629cff07e3
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      app/app.js

+ 5 - 1
app/app.js

@@ -189,6 +189,7 @@ if (Meteor.isClient) {
     });
 
     Template.dashboard.onCreated(function() {
+        if (_sound !== undefined) _sound.stop();
         Meteor.subscribe("history");
     });
 
@@ -437,7 +438,7 @@ if (Meteor.isClient) {
                         events: {
                             'onReady': function(event) {
                                 event.target.playVideo();
-                                evenet.target.setVolume(volume);
+                                event.target.setVolume(volume);
                             }
                         }
                     });
@@ -514,6 +515,9 @@ if (Meteor.isClient) {
     Meteor.subscribe("chat");
 
     Template.room.onCreated(function () {
+        yt_player = undefined;
+        _sound = undefined;
+        console.log("Room created!");
         Session.set("videoShown", false);
         var tag = document.createElement("script");
         tag.src = "https://www.youtube.com/iframe_api";