feat(core): expose video tracks & renditions on the SPF media adapter#1803
Open
spuppo-mux wants to merge 3 commits into
Open
feat(core): expose video tracks & renditions on the SPF media adapter#1803spuppo-mux wants to merge 3 commits into
spuppo-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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.