|
@@ -103,6 +103,9 @@ if (Meteor.isClient) {
|
|
|
},
|
|
|
artist: function(){
|
|
|
return Session.get("artist");
|
|
|
+ },
|
|
|
+ duration: function(){
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -124,14 +127,14 @@ if (Meteor.isClient) {
|
|
|
SC.stream("/tracks/" + currentSong.song.id + "/", function(sound){
|
|
|
_sound = sound;
|
|
|
sound._player._volume = 0.3;
|
|
|
- //sound.play();
|
|
|
+ sound.play();
|
|
|
Session.set("title", currentSong.song.title || "Title");
|
|
|
Session.set("artist", currentSong.song.artist || "Artist");
|
|
|
Session.set("albumArt", currentSong.song.albumArt);
|
|
|
Session.set("duration", currentSong.song.duration);
|
|
|
+ Session.set("increment", 1400 / currentSong.song.duration);
|
|
|
setTimeout(function() { // HACK, otherwise seek doesn't work.
|
|
|
sound._player.seek(getTimeElapsed());
|
|
|
- console.log(sound._player.seek(getTimeElapsed()));
|
|
|
}, 500);
|
|
|
});
|
|
|
}
|
|
@@ -151,6 +154,8 @@ if (Meteor.isClient) {
|
|
|
size = data.history.length;
|
|
|
startSong();
|
|
|
}
|
|
|
+ $("#seeker-bar").width($("#seeker-bar").width() + Session.get("increment"));
|
|
|
+ console.log($("#seeker-bar").width());
|
|
|
}, 1000);
|
|
|
});
|
|
|
}
|