docs: multi-audio-track API design#1636
Open
ronald-urbina wants to merge 4 commits into
Open
Conversation
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@ronald-urbina is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a697759. Configure here.
luwes
reviewed
Jun 1, 2026
|
|
||
| ## Proposed Architecture | ||
|
|
||
| **Adapter (`SimpleHlsMedia`, in core).** `SimpleHlsMedia` is the boundary where SPF internals meet the rest of the stack. It gains an `audioTracks` read-only property (returning a list of track objects with `id`, `label`, `language`, `kind`, and `enabled`), a `selectAudioTrack(id)` method, and fires an `audiotrackschange` event whenever the track list or active selection changes. |
Collaborator
There was a problem hiding this comment.
There is no need for new API's on the media, they're covered by
https://github.com/muxinc/media-elements/tree/main/packages/media-tracks
Look for the hls.js implementation at #1609
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.

Adds a design doc for the multi-audio-track consumer API (issue #1261). SPF already handles audio renditions internally — this doc covers how to surface them through the existing feature/predicate/selector pattern used by
streamTypeandtextTrack, and explains why the text track DOM path doesn't apply to audio (MSE vs elements). Meant as a team read before we start coding.start to resolve 1261
Note
Low Risk
Documentation-only plus a trivial CSS class order change; no runtime or API behavior is modified in this PR.
Overview
Adds
internal/design/audio-track-api.md, a draft design for exposing SPF’s existing HLS audio renditions through the same feature / predicate / selector stack asstreamTypeandtextTrack(issue #1261).The doc spells out remaining implementation: wire
SimpleHlsMediawithMediaTracksMixinand a SPF-signal bridge (mirroringHlsJsMediaMediaTracksMixin), addaudioTrackFeatureandselectAudioTrack, and register the feature in all four store presets. It also states non-goals (no SPF engine changes; hls.js path largely done via #1664).PresetReference.astroonly reorders Tailwind classes on aMarkdownCodeskin import line (text-codevsinline-block); no preset or API reference data changes.Reviewed by Cursor Bugbot for commit 47e87ca. Bugbot is set up for automated code reviews on this repo. Configure here.