feat(spf): expose video tracks & renditions on the SPF media adapter - #1803
feat(spf): expose video tracks & renditions on the SPF media adapter#1803spuppo-mux wants to merge 3 commits into
Conversation
|
@spuppo-mux is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d499e24. Configure here.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Re-implemented in #1826 |

Part 1 of #1795 (video → audio → streamType → live → parity/autoplay).
What: SimpleHlsMedia now projects the SPF engine's video renditions onto the standard videoTracks / videoRenditions DOM surface (read, write, events) so a quality menu binds to it with no adapter-specific code, matching HlsJsMedia.
How:
videoRenditionssignal (newderiveVideoRenditionsbehavior, mirroringderiveCdnPriority): projects the resolved presentation's video switching set, clears on src unload, skips writes when a reload carries the same set.SimpleHlsMediaMediaTracksMixin) subscribes to that signal via effect, builds one selected main video track + a VideoRendition per level, and writes selection back:selectedIndex→userVideoTrackSelection = { selectedIndex },-1→ clear (ABR).Design decisions:
codecs.join(','), FrameRate → number). Kept them in the mixin file since they are only used there, but could move as helpers later.Trade-offs / open questions:
Test plan:
Note
Medium Risk
Touches playback quality selection and DOM track projection with bidirectional sync; scope is bounded by tests and mirrors existing patterns, but wrong wiring could affect ABR or UI selection state.
Overview
SimpleHlsMedia now exposes the standard
videoTracks/videoRenditionssurface (read, write, events) so quality UIs can bind without adapter-specific APIs, aligned with the Hls.js media path.On the SPF HLS engine, a new
deriveVideoRenditionsbehavior (patterned afterderiveCdnPriority) derives selectable quality levels from the resolved presentation’s first video switching set into avideoRenditionssignal, clears on unload, and skips redundant signal writes when a reload keeps the same rendition ids.getVideoRenditionsin track-selection utilities performs the presentation →VideoRenditionInfomapping.In core,
SimpleHlsMediaMediaTracksMixinsubscribes to that signal, builds one main track with aVideoRenditionper level (includingFrameRate→ numeric frame rate), reflects active playback and selected manual pin from engine state, and mapsvideoRenditions.selectedIndextouserVideoTrackSelection({ id }pins a level;-1clears for ABR). Subscriptions re-wire on eachsrcchange because the adapter recreates the engine per assignment.Reviewed by Cursor Bugbot for commit e98b473. Bugbot is set up for automated code reviews on this repo. Configure here.