Add isPlaying state to MusicSlider

This commit is contained in:
Mathias committed 2025-03-01 15:47:12 +01:00
1 parent e633a5e004
commit 33a1715adc
5 files changed
+221 -215

No files matched your search

+2 -2
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 });
}
});