Commit Graph
43 Commits
Author SHA1 Message Date
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
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
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
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 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 8f1653efcd refactor(packages)!: replace DelegateMixin & ProxyMixin with MediaHost base classes (#1292) 2026-04-14 00:18:11 -05: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
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
rahimandGitHub c3641c888c fix(utils): polyfill AbortSignal.any for Chromium ≤115 (#1142) 2026-03-26 13:47:48 -07:00
rahimandGitHub 8e2e56e36e chore: upgrade typescript 6, vitest 4, align spf package (#1101) 2026-03-24 01:53:36 -07:00
Christian PillsburyandGitHub f5ecc93554 fix(spf): call sourceBuffer.abort() on AbortError to reset MSE parser state (#1081) 2026-03-23 08:45:09 -07:00
Christian PillsburyandGitHub 04f81a26e1 fix(spf): implement preload IDL attribute on SpfMedia (#1069) 2026-03-23 07:30:20 -07:00
801be291c3 fix(spf): propagate byteRange when building segment load tasks (#904)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 18:06:01 -07:00
Christian PillsburyandGitHub 6fcb8eb989 feat(spf): stream segment fetches via ReadableStream body (#890) 2026-03-11 12:00:04 -07:00
Christian PillsburyandGitHub 4bd287515f feat(spf): basic ManagedMediaSource support for Safari (#843) 2026-03-10 07:56:54 -07:00
Christian PillsburyandGitHub f50d509749 fix(spf): fix async teardown leaks and recreate engine on src change (#841) 2026-03-10 07:43:20 -07:00
Christian PillsburyandGitHub 54f71d62aa fix(spf): prefer MediaSource over ManagedMediaSource (#838) 2026-03-10 07:24:47 -07:00
Christian PillsburyandGitHub 71b5b415c5 fix(spf) subtitle change reactions (#835) 2026-03-10 07:12:29 -07:00
rahimandGitHub bd4e47b783 chore: fix repo biome lint errors (#804) 2026-03-09 21:10:18 -07:00
27a3993fb2 feat(spf): initial push of SPF (#784)
Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Wesley Luyten <me@wesleyluyten.com>
2026-03-09 17:32:24 -07:00