Added regex function to format songname
This commit is contained in:
1 parent
f15c03b7cd
commit
3d7bd274c2
2 files changed
+34
-4
No files matched your search
+2
-2
@@ -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':
|
||||
|
||||
Reference in new issue
Block a user