import type { CastDevice } from '../specs/types.nitro'; /** * Handle held by whoever registered an output. * * Deliberately narrow. Transport and position/state feedback do **not** go * through here — an output installs itself on the engine natively, so decoder * commands are redirected to it and its position and state flow back through * the coordinator on the same path the local decoder uses. What is left is the * part JS still has to know: which output owns playback, and where in the * player's own queue it currently is. */ export interface PlaybackOutputHandle { /** This output now owns playback. `device` surfaces through `useCastState`. */ claim(device: CastDevice): void; /** Hand playback back to the local engine. */ release(): void; /** * The output moved to a different item, given as an index into the player's * queue. Receivers advance on their own, and the player's queue position has * to follow or the UI highlights the wrong row. */ publishQueueIndex(index: number): void; /** Unregister. Releases first if this output still owns playback. */ dispose(): void; }