mirror of
https://github.com/zoriya/v10.git
synced 2026-08-12 08:59:02 +00:00
Reinstate text-cue relocation (dropped with relocation.ts) and, in the same pass, rearchitect the text-segment loader onto the v/a loader's composed-step model so relocation is a pipeline step, not a resolver wrapper. Text loader gains TextFrame / TextLoadStep / TextStepDeps / TextMessagePipelines mirroring segment-loader, with base resolveCuesStep + dispatchCuesStep (default: resolveCues -> dispatchCues). makeLoadTask now just runs the pipeline. The resolver reverts to a pure (url) => cues host primitive (the text analog of fetchBytes) -- composition-awareness moves entirely into the injected step, so composition state threads via compositionDeps into TextStepDeps. Relocation supplies relocatingTextPipelines (resolveWithMetadata -> relocateCues -> dispatchCues): cues + X-TIMESTAMP-MAP fetched in parallel, cues shifted by (mapCorrection - startMediaTime) using the primary A/V track's startMediaTime (video ?? audio, awaited). The engine bakes textMessagePipelines, mirroring video/audioMessagePipelines. Base steps are generic arrow consts (TextStepDeps is contravariant in C via textTracksActor.send). Sandbox-verified 0-based against the Mux asset_start_time=60 clip: active cue brackets the 0-based playhead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>