Replace the per-type "Tier 1" / shared-min "Tier 2" split with one default
`deriveSharedMinStartMediaTime`: relocate every track by the `min` across the
selected A/V origins. Subsumes per-type — aligned origins reduce to each type's
own, skewed origins keep every DTS >= 0 while preserving A/V skew, and a single
selected type reduces to its own origin. Returns undefined until all selected
types are discovered (shared-min barrier). `derivePerTypeStartMediaTime` stays
as a barrier-free opt-out.
The loader stamp is now tier-agnostic: `stampStartMediaTime` applies the same
injected `derive` over `mediaContainerData` (not the raw own-origin), async with
an `awaitDefined` holdback and liveness guard. Engines resolve one
`deriveStartMediaTime` and feed it to both the reactor and
`relocationPipelinesFor(type, derive)` so model and buffer agree.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Key mediaContainerData by track *type* (video/audio), not track id: one
init+media pair per type, ABR rungs share the origin. relocationMessagePipelines
-> relocationPipelinesFor(type); the engines pass per-type.
- #4 fix: record the discovered segment's 0-based startTime and derive the origin
as baseMediaDecodeTime/timescale - segmentStartTime, so relocation is correct when
the first loaded segment isn't the 0th (non-zero initial currentTime, live/DVR).
Adds segmentStartTime to MediaContainerData.
- Rename derivePerTrackStartMediaTime -> derivePerTypeStartMediaTime; stampTracks
applies each type's origin to every track of that type.
- Add establish-start-media-time derive unit test.
Unit-verified (segmentStartTime=100 still yields origin 60) and end-to-end
sandbox-verified: start-at-300 buffers around the playhead (0-based); default
start-at-0 A/V + audio-only remain 0-based.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rearchitect presentation-timeline-model.md around the establishStartMediaTime
reactor (mediaContainerData slot, pure deriveStartMediaTime seam,
Track.startMediaTime consume, abortable awaitDefined apply); resolve the
reduce-hinge and startMediaTime-storage open questions.
Add a living Status & backlog to the spike plan so commits never bury
outstanding refactor/review work.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Consolidates the design-discovery for the timestampOffset-relocation
approach to non-zero-PTS: the three-timeline coordinate model
(media / presentation / wall-clock, with timestampOffset derived from
startTime - startMediaTime), the orthogonal capability axes
(relocation / parser / coordination), the discover -> reduce -> apply ->
consume architecture with branch-free always-present actors, and the open
hinges -- chief among them generalizing the live establishment behavior
for VOD. Draft; spike-stage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>