Add isPlaying state to MusicSlider
This commit is contained in:
@ -221,7 +221,7 @@ module.exports = (io) => (socket) => {
|
||||
if (currentRoomId) socket.emit("room-code", currentRoomId);
|
||||
});
|
||||
|
||||
socket.on("submit-frequency", ({ frequency }) => {
|
||||
socket.on("submit-frequency", ({ frequency, isPlaying }) => {
|
||||
const roomId = roomController.getUserRoom(socket.id);
|
||||
if (!roomId) return;
|
||||
|
||||
@ -229,7 +229,7 @@ module.exports = (io) => (socket) => {
|
||||
if (userRole !== 'composer') return;
|
||||
|
||||
if (gameController.updateFrequency(roomId, frequency)) {
|
||||
socket.to(roomId).emit("frequency-update", { frequency });
|
||||
socket.to(roomId).emit("frequency-update", { frequency, isPlaying });
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user