/** * Choosing between a downloaded file and a server stream for video playback. * * Audio has preferred local files since the queue is built (the Rust queue * resolves `MediaSource::Local`), but video asks the repository for a stream URL * and never consults `downloads` — so a downloaded film was streamed anyway, * spending bandwidth that had already been spent and failing outright offline. * * Pure so it can be unit-tested: the component only supplies the two inputs and * the asset-URL converter. * * TRACES: UR-071 | DR-123 | UT-118 */ export interface VideoSourceInputs { /** Absolute on-disk path of a completed download, or null to stream. */ localPath: string | null; /** Stream URL the repository resolved (already transcoded if it had to be). */ remoteUrl: string; /** Whether the *remote* stream is a transcode. */ remoteNeedsTranscoding: boolean; /** Usually Tauri's `convertFileSrc`; injected so this module stays pure. */ toAssetUrl: (path: string) => string; } export interface VideoSourceDecision { /** What to hand the `