Merge pull request #160 from Zagrios/hotfix/pause-song-on-map-preview

[hotfix] pause song on map preview
This commit is contained in:
MathieuG-P
2023-03-01 21:44:27 +01:00
committed by GitHub
@@ -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){