Skip to main content

Interface: CastQueueProjection

Defined in: packages/cast/src/handoff-machine.ts:114

The castable projection of a JS-queue snapshot. items[p] came from snapshot.items[jsIndices[p]] — the parallel array is one half of the reconciliation mapping; the receiver-assigned itemIds (learned after queueLoad) are the other.

Properties

items

readonly items: readonly CastQueueItemInput[];

Defined in: packages/cast/src/handoff-machine.ts:115


jsIndices

readonly jsIndices: readonly number[];

Defined in: packages/cast/src/handoff-machine.ts:116


skipped

readonly skipped: readonly SkippedCastItem[];

Defined in: packages/cast/src/handoff-machine.ts:117


startIndex

readonly startIndex: number;

Defined in: packages/cast/src/handoff-machine.ts:119

Projection-space start index (what queueLoad receives).


startPosition

readonly startPosition: number;

Defined in: packages/cast/src/handoff-machine.ts:132

Seconds into the start item. 0 whenever startShifted — and 0 whenever the start item is live: a live handoff joins the live edge. Device truth behind the live rule (POCO F4 → Mi Smart Speaker, 2026-08-14): the Default Media Receiver honours a nonzero start position by seeking, and on an unseekable live stream (Icecast) that wedges it in BUFFERING at the requested offset forever — the "casting a live station loads forever" bug. HLS live fares no better: the receiver flapped through the wrong queue item before recovering. mpv's clock on a live stream is a stream-timeline offset anyway (FIP reported ~95 000 s), so the number was never a resumable position to begin with.


startShifted

readonly startShifted: boolean;

Defined in: packages/cast/src/handoff-machine.ts:139

true when the current JS entry was not castable and the start moved to the nearest castable one (at-or-after the cursor, wrapping to the first castable if nothing follows). The position resets to 0 with it — a position in one track means nothing in another.