pause song on map preview

This commit is contained in:
MathieuG-P
2023-03-01 21:43:07 +01:00
parent aba099e15a
commit b1833721d0
@@ -93,7 +93,12 @@ export const MapItem = memo(({hash, title, autor, songAutor, coverUrl, songUrl,
return diffLabel;
}
const openPreview = () => linkOpener.open(previewUrl, true);
const openPreview = () => {
if(audioPlayer.playing){
audioPlayer.pause();
}
linkOpener.open(previewUrl, true);
}
const copyBsr = () => navigator.clipboard.writeText(`!bsr ${mapId}`);
const toogleMusic = () => {
if(songPlaying){