mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 14:00:54 +02:00
fix: advance to next track when deleted current track finishes playing
This commit is contained in:
parent
154f003787
commit
8327964f38
1 changed files with 6 additions and 0 deletions
|
|
@ -1359,6 +1359,12 @@ function onTimeupdate(e) {
|
||||||
function onEnded(e) {
|
function onEnded(e) {
|
||||||
if (e.target !== audio) return;
|
if (e.target !== audio) return;
|
||||||
if (isCrossfading) return;
|
if (isCrossfading) return;
|
||||||
|
if (pendingNextIndex >= 0) {
|
||||||
|
const idx = pendingNextIndex;
|
||||||
|
pendingNextIndex = -1;
|
||||||
|
playTrack(idx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (repeatMode === 'one') {
|
if (repeatMode === 'one') {
|
||||||
playTrack(currentIndex);
|
playTrack(currentIndex);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue