Commit Graph
80 Commits
Author SHA1 Message Date
Christian PillsburyandClaude Opus 4.8 0b8efb34bc refactor(spf): extract text-loader vocabulary to primitives behind a CueSink seam
Mirror of the v/a extraction for the text side. The text step vocabulary
(TextFrame/TextLoadStep/TextStepDeps/TextMessagePipelines/TextLoadTask/
TextTrackSegmentResolver + resolveCues/dispatchCues) and the cue-sink message
DTOs (AddCuesMessage/CueSegmentMeta) move out of the text loader / text-tracks
actor into primitives/. All DOM-free (generic over Cue), so they land in
primitives/ root.

The dispatch step reaches its sink through a structural CueSink seam instead of
the concrete TextTracksActor, so the pipeline names no actor; the loader keeps
only scheduling. actors/ (root) and engines/hls gain primitives references.

Net effect: relocation-pipelines now imports only core/media/primitives — zero
actors/behaviors. It's ready to move to primitives; only the DOM VTTCue in its
text step keeps it in behaviors/dom for now (slice 3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 11:08:06 -07:00
Christian PillsburyandClaude Opus 4.8 a09473a372 refactor(spf): extract loader step vocabulary to primitives; match box-time by track_id
Bundled as one WIP checkpoint — the changes interleave in relocation-pipelines.ts
and media/types, so they can't be split per-file. To be curated before the PR.

- Match box-time by track_id: the default relocation pipeline now uses
  findMediaTrack + readBaseMediaDecodeTime (init tkhd track_id → segment tfhd
  track_id) instead of the first-traf presumptive readers, so muxed ISO-BMFF
  (e.g. a clcp caption traf) reads the media track's origin rather than relying
  on box order. Adds MediaContainerData.trackId + a caption-first-muxing test.

- Rename relocation-steps → relocation-pipelines; reframe it as the
  config-supplied, loader-facing half of establishStartMediaTime (the relocation
  analog of track-switching's constraint/rule chain).

- Extract the loader step vocabulary + base steps and the SourceBuffer message
  DTOs out of the actors into primitives/, behind a structural AppendSink seam so
  the pipeline names no concrete actor; the loader actors keep only scheduling.

- Decouple the vocabulary from the DOM: add media/types SegmentData and make
  media/dom AppendData an alias, so the whole v/a load pipeline lives DOM-free in
  primitives/ root.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 10:55:27 -07:00
Christian PillsburyandClaude Opus 4.8 2733cba052 feat(spf): relocate non-zero-PTS sources to a 0-based timeline
Assets whose A/V encode starts at a non-zero native PTS (Mux instant clips,
Apple bipbop @10s) are relocated onto a 0-based presentation timeline via
`SourceBuffer.timestampOffset`, so buffer / model / `currentTime` / `seekable`
stay 0-based and the adapter is untouched.

- `establishStartMediaTime` reactor establishes each track's media-timeline
  origin once per source (the DOM-free half), running an injected
  `deriveStartMediaTime` seam over discovered container data.
- Default `deriveSharedMinStartMediaTime`: relocate every track by the `min`
  across selected A/V origins — preserves real A/V skew and keeps every DTS >= 0.
  Origins below NEAR_ZERO_ORIGIN_THRESHOLD (1s) are left native (ordinary
  ~0-PTS VOD isn't perturbed).
- `relocation-steps` message pipelines discover the origin (mdhd/tfdt head-peek)
  and stamp `timestampOffset`; text cues rebase by X-TIMESTAMP-MAP − origin.
- Wired into both the default and audio-only HLS engines.

See internal/design/spf/presentation-timeline-model.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 12:00:15 -07:00
Christian PillsburyandClaude Opus 4.8 c0cad09fd5 feat(spf): recover end-of-stream stall on skewed A/V
Make a complete VOD reach native `ended` (and loop) reliably even when audio
and video tracks end a few ms apart:

1. `end-of-stream` reactor gains LAST_SEGMENT_REACHED_SLACK (0.5s) on the
   "playhead reached the last segment" gate — a tiny final segment plus Chrome's
   audio-clock freeze otherwise deadlocks endOfStream().
2. New `recover-end-stall` behavior: on `waiting`, if the MediaSource is
   'ended' and the playhead is within endStallNudgeWindow (0.2s) of the
   reachable buffered end (getMinBufferedEnd over the SourceBuffers), nudge
   currentTime = duration to force native ended. Event-driven; inert for
   live / clean-ending streams.

ADR: internal/decisions/end-of-stream-av-skew-recovery.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:59:54 -07:00
Christian PillsburyandClaude Opus 4.8 57d3cb6574 feat(spf): parse VTT X-TIMESTAMP-MAP for text-segment metadata
Parse the WebVTT X-TIMESTAMP-MAP header (MPEGTS/LOCAL) and surface it as
text-segment metadata, so text-cue relocation can align cue times to the
relocated media timeline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:59:39 -07:00
Christian PillsburyandClaude Opus 4.8 2dd9304414 feat(spf): add mp4 box parser and decode-time origin extraction
Minimal fMP4 box parser (media/mp4/box.ts) plus decode-time origin extraction
(timestamp-origin.ts) reading mdhd timescale + tfdt baseMediaDecodeTime, and a
head-peek primitive to read the leading bytes of a segment stream. Foundation
for relocating non-zero-PTS sources onto a 0-based presentation timeline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:59:26 -07:00
Sam PottsandGitHub 028dadb385 feat(packages): i18n (#1708) 2026-07-10 12:58:47 +10:00
Santiago PuppoandGitHub 1a4cdb8373 refactor(spf): Changed adapter code to recycle engine on src change (#1813) 2026-07-09 13:41:53 -03:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
9850e0c346 chore: release main (#1599)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-07 13:08:22 -05:00
Santiago PuppoandGitHub a74b8c0993 refactor: Rename SPF background-looping-video into background-video (#1731) 2026-06-24 11:09:20 -03:00
23538e3649 feat(spf): text tracks switching (#1687)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 07:54:51 -07:00
Darius CepulisandGitHub d799be1063 feat(site): API reference pages for media elements (#1342) 2026-06-19 09:44:54 -07:00
bce79ec424 feat(spf): capability probing (#1676)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:22:49 -07:00
b89f1e944c feat(spf): multi cdn failover (#1671)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 08:20:43 -07:00
Santiago PuppoandGitHub 33873bc4ae feat(spf): Add maxResolution to SPF Background Video (#1654) 2026-06-17 11:36:02 -03:00
00aa6247b8 feat(spf): multi-cdn support (#1668)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 10:09:16 -07:00
d9f9efde88 fix(spf): refactor track switching to rules (#1658)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:48:34 -07:00
057f32573e feat(spf): multi-track audio + skills building features and behaviors (#1605)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 09:53:13 -07:00
Santiago PuppoandGitHub efc7c23b7b fix(spf): add emptied listener to track-current-time behavior (#1634) 2026-06-01 16:54:58 -03:00
Santiago PuppoandGitHub 3741e8de12 feat(spf): background looping video (phase 1) (#1602) 2026-06-01 16:13:26 -03:00
1a3cb45b29 feat(spf): basic audio only use case + use-case-composition doc-type + implementation skills (#1584)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 12:48:40 -07:00
Sam PottsandGitHub 760870fdf2 fix(core): disable toggle captions when there are no captions (#1598) 2026-05-26 09:49:50 +10:00
c9d6ccecdd docs(spf): seed feature registry, clusters reference, and document-feature skill (#1581)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 12:07:33 -07:00
1a3911151a chore(build): quiet tsdown size reports in local dev (#1569)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 11:38:26 +10:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
5f1c2370fa chore: release main (#1477)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-19 12:48:40 -07:00
c112b6248b fix(spf): conventions, per-type specialization, config threading (#1537)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 11:38:47 -07:00
8fa63c6567 feat(spf) discrete signals and behavior objects (#1508)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 08:32:44 -07:00
0cfd3bb395 feat(spf): HLS engine composition walkthrough + doc-driven cleanups (#1512)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:07:26 -07:00
Christian PillsburyandGitHub 69852ddeb0 docs/spf fundamental concepts (#1396)
Feedback from @decepulis treated as a fast follow/incremental improvement effort for expediency.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 11:16:56 -07:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
cce48c01fa chore: release main (#1375)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-27 13:47:20 -07:00
rahimandGitHub 84c9e540bd chore(root): migrate typecheck to @typescript/native-preview (tsgo) (#1400) 2026-04-23 11:11:50 +10:00
2f7212028c refactor(react): replace prototype-walking and inferred class props (#1376)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 09:20:46 -07:00
Wesley LuytenandGitHub 000c54e16a chore: release main (#1353) 2026-04-18 01:18:23 -07:00
Wesley LuytenandGitHub 8530316987 revert(packages): add server-only bundles (#1349) (#1354) 2026-04-17 11:44:53 -07:00
rahimandGitHub 3331fdaf25 fix(packages): add server-only bundles (#1349) 2026-04-16 00:59:14 -07:00
Wesley LuytenandGitHub 521774a95b chore: release main (#1341) 2026-04-14 17:19:40 -05:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
77faf060d4 chore: release main (#1339)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-14 17:11:09 -05:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
c2cb16bd8b chore: release main (#1336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-14 16:54:01 -05:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
da598b285a chore: release main (#1313)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-14 15:58:18 -05:00
Wesley LuytenandGitHub 8f1653efcd refactor(packages)!: replace DelegateMixin & ProxyMixin with MediaHost base classes (#1292) 2026-04-14 00:18:11 -05:00
Wesley LuytenandGitHub d67a3699e4 chore: release main (#1308) 2026-04-10 22:09:56 -07:00
Wesley LuytenandGitHub 12877c34fc chore: release main (#1232) 2026-04-10 15:18:11 -07:00
1346d869ae feat(spf): architecture reactors (#1218)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 13:38:24 -07:00
rahimandGitHub 071325de4d fix(utils): stable sort comparator and orphaned JSDoc (#1286) 2026-04-08 17:39:28 +10:00
rahimandGitHub b874dad306 fix(packages): workspace drift (#1270) 2026-04-07 21:15:23 -07:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
d75cd82ef8 chore: release main (#1212)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-03 17:56:01 -05:00
Wesley LuytenandGitHub dcb4587dba chore: release main (#1193) 2026-04-03 00:19:11 -07:00
Wesley LuytenGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
63a82c0f92 chore: release main (#1170)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-31 20:37:58 -05:00
Wesley LuytenandGitHub d7d6f70797 chore: release main (#1115) 2026-03-31 17:11:33 -07:00
3fc6cbb9bc poc(spf): migrate reactors from WritableState to TC39 Signals (#1112)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 13:24:39 -07:00