Skip to content

Commit

Permalink
fix: 현재 실행 중인 음악 표시 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seongjunme committed Dec 2, 2021
1 parent 5b9d9b6 commit 967ec14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/socket/SocketHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ const socketHandler = (io: Server) => {
const targetRoom: socketInfo = utils.findRoom(socketData, socket.id);
if (socket.id !== targetRoom?.socketId[0]) return;
namespace.to(targetRoom.id).emit('changeMusicInfo', targetRoom.playList.getNextMusic());
namespace.to(targetRoom.id).emit('responsePlayList', targetRoom.playList.getPlayList());
});

socket.on('prevMusicReq', () => {
const targetRoom: socketInfo = utils.findRoom(socketData, socket.id);
if (socket.id !== targetRoom?.socketId[0]) return;
namespace.to(targetRoom.id).emit('changeMusicInfo', targetRoom.playList.getPreMusic());
namespace.to(targetRoom.id).emit('responsePlayList', targetRoom.playList.getPlayList());
});

socket.on('currentMusicReq', () => {
Expand Down

0 comments on commit 967ec14

Please sign in to comment.