mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-08-11 11:19:24 +00:00
play-queue: peekNext() — expose the following track for queue-aware UIs (#719)
A results screen that offers "Up next: <song> — starting in 10s" needs to
know WHAT follows without reaching into queue internals. peekNext() returns
{filename, index, total} for the next track (null when nothing follows),
pure — peeking never plays or mutates.
First consumer: the note_detect results card's queue-advance strip (the
"Playlist Play All has no way to progress" tester issue).
Claude-Session: https://claude.ai/code/session_01Nm7tHs1Yvjjtnnu4nzJgdN
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
4b6cbe8b11
commit
28b0319e27
@@ -6778,6 +6778,14 @@ window.feedBack.playQueue = (function () {
|
||||
start: start, advance: advance, hasNext: hasNext, active: active, clear: clear,
|
||||
source: function () { return source; },
|
||||
remaining: function () { return active() ? list.length - idx - 1 : 0; },
|
||||
// What's coming, for consumers that RENDER the queue (a results
|
||||
// screen's "Up next: … starting in 10s" strip) without reaching into
|
||||
// queue internals. Null when nothing follows.
|
||||
peekNext: function () {
|
||||
return hasNext()
|
||||
? { filename: list[idx + 1], index: idx + 1, total: list.length }
|
||||
: null;
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user