@@ -76,7 +76,7 @@ module.exports = {
this.timePaused = 0;
this.currentSong.startedAt = Date.now();
- this.nsp.emit("nextSong", this.currentSong);
+ this.nsp.emit("nextSong", this.currentSong, this.currentSong.startedAt);
}
@@ -248,9 +248,9 @@
local.youtubeReady();
- local.stationSocket.on("nextSong", function(currentSong) {
+ local.stationSocket.on("nextSong", function(currentSong, startedAt) {
local.currentSong = currentSong;
- local.startedAt = currentSong.startedAt;
+ local.startedAt = startedAt;
local.timePaused = 0;
local.playVideo();
});