feat(player): add IQueueService orchestrating album playback above the single-slot player (P11 11.F)

Queue owns ordered tracks, current index, skip-fwd/back, and auto-advance via the player's TrackEnded hook; binds through Attach (no ctor growth, no service-locator). Player-bar skip controls; empty-queue play unchanged. Adds QueueService unit tests.
This commit is contained in:
daniel-c-harvey
2026-06-16 00:04:44 -04:00
parent 56e205082d
commit 2b42e01cd0
14 changed files with 771 additions and 2 deletions
@@ -40,6 +40,15 @@ public interface IPlayerService
/// <see cref="OnStateChanged"/> (throttled to ~10/s during streaming).
/// </summary>
event Action? StateChanged;
/// <summary>
/// Raised once when the current track reaches its natural end of playback (the JS
/// end-of-stream callback), distinct from a stop/unload/track-switch. This is the single
/// hook the play-queue subscribes to in order to auto-advance to the next track. It does
/// NOT fire when playback is stopped, the track is switched, or the player is unloaded —
/// only on organic completion — so an orchestrator can treat it as "advance the queue."
/// </summary>
event Action? TrackEnded;
// Control methods
Task InitializeAsync();