|
@@ -1,6 +1,7 @@
|
|
History = new Mongo.Collection("history");
|
|
History = new Mongo.Collection("history");
|
|
|
|
|
|
if (Meteor.isClient) {
|
|
if (Meteor.isClient) {
|
|
|
|
+ var hpSound = undefined;
|
|
Template.register.events({
|
|
Template.register.events({
|
|
"submit form": function(e){
|
|
"submit form": function(e){
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
@@ -63,6 +64,9 @@ if (Meteor.isClient) {
|
|
"click .logout": function(e){
|
|
"click .logout": function(e){
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
Meteor.logout();
|
|
Meteor.logout();
|
|
|
|
+ if (hpSound !== undefined) {
|
|
|
|
+ hpSound.stop();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
"click .button-tunein": function(){
|
|
"click .button-tunein": function(){
|
|
@@ -76,6 +80,7 @@ if (Meteor.isClient) {
|
|
"click #play": function(){
|
|
"click #play": function(){
|
|
$("#play").hide();
|
|
$("#play").hide();
|
|
SC.stream("/tracks/172055891/", function(sound){
|
|
SC.stream("/tracks/172055891/", function(sound){
|
|
|
|
+ hpSound = sound;
|
|
sound._player._volume = 0.3;
|
|
sound._player._volume = 0.3;
|
|
sound.play();
|
|
sound.play();
|
|
$("#stop").on("click", function(){
|
|
$("#stop").on("click", function(){
|