Add isPlaying state to MusicSlider

This commit is contained in:
2025-03-01 15:47:12 +01:00
parent e633a5e004
commit 33a1715adc
5 changed files with 221 additions and 215 deletions

View File

@ -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 });
}
});