From 53de9a079bcc91012be72518b58e5621019b3697 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 15 Mar 2021 21:29:48 -0300 Subject: resume canonical player when all sockets are ready this fixes an issue where a sync-playback received immediately during the resume would receive the paused status! in general, the canonical backend should always stay in line with the messages that the server sends out. --- socket.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/socket.js b/socket.js index fec66d7..284c767 100644 --- a/socket.js +++ b/socket.js @@ -283,6 +283,8 @@ function makeSocketServer() { if (readySockets && !readySockets.includes(socket)) { readySockets.push(socket) if (readySockets.length === sockets.length) { + const QP = server.canonicalBackend.queuePlayers.find(QP => QP.id === command.queuePlayer) + silenceEvents(QP, ['set-pause'], () => QP.setPause(false)) for (const socket of sockets) { socket.write(serializeCommandToData({ sender: 'server', -- cgit 1.3.0-6-gf8a5