mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
fix 720p screens layout issue
~ add media queries + handle responsiveness on folder header
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export function handlePlayPause(
|
||||
currentIndex: number,
|
||||
audio: HTMLAudioElement,
|
||||
state: boolean,
|
||||
play: (index: number) => void
|
||||
) {
|
||||
if (audio.src === "") {
|
||||
play(currentIndex);
|
||||
} else if (audio.paused) {
|
||||
audio.play();
|
||||
state = true;
|
||||
} else {
|
||||
audio.pause();
|
||||
state = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user