mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 05:50:52 +02:00
fix: check pendingNextIndex in play/pause button handler after track deletion
This commit is contained in:
parent
8327964f38
commit
7ff0d0ac95
1 changed files with 4 additions and 0 deletions
|
|
@ -1397,6 +1397,10 @@ playBtn.addEventListener('click', () => {
|
|||
playTrack(sel);
|
||||
} else if (currentIndex < 0 && sel >= 0) {
|
||||
playTrack(sel);
|
||||
} else if (currentIndex < 0 && pendingNextIndex >= 0) {
|
||||
const idx = pendingNextIndex;
|
||||
pendingNextIndex = -1;
|
||||
playTrack(idx);
|
||||
} else if (currentIndex < 0) {
|
||||
playTrack(0);
|
||||
} else if (audio.paused) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue