Added regex function to format songname

This commit is contained in:
Jamon committed 2024-08-12 09:09:39 +12:00
1 parent f15c03b7cd
commit 3d7bd274c2
2 files changed
+34 -4

No files matched your search

+2 -2
View File
@@ -2247,7 +2247,7 @@ function startGame() {
const songPosition = (Date.now() / 1000 - data.startTime - serverClientTimeDiff) % currentSongDuration;
setupAudio(data.song, songPosition);
currentSongName = data.song.split('/').pop();
currentSongName = data.songName;
updateSongDurationBar();
}
@@ -2549,7 +2549,7 @@ socket.on('bullet_impact', (data) => {
const songPosition = 0; // Start from the beginning for 'change' action
setupAudio(data.song, songPosition);
currentSongName = data.song.split('/').pop();
currentSongName = data.songName;
updateSongDurationBar();
break;
case 'stop':