diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-03-15 21:29:48 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-03-15 21:29:48 -0300 |
commit | 53de9a079bcc91012be72518b58e5621019b3697 (patch) | |
tree | 7e4afe2585349f89f15260158e5ab9b27ef819e5 | |
parent | f46056bca47ec9373888a154209861acb6140e5a (diff) |
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.
-rw-r--r-- | socket.js | 2 |
1 files changed, 2 insertions, 0 deletions
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', |