Fix bug multi-language audio tracks are greyed out and unselectable in v3.2.1 - #841
Open
independent-arg wants to merge 14 commits into
Open
Fix bug multi-language audio tracks are greyed out and unselectable in v3.2.1#841independent-arg wants to merge 14 commits into
independent-arg wants to merge 14 commits into
Conversation
When you selected a video resolution (e.g., 1080p), selectedTrackIds.value retrieved that specific 1080p video format.In the YouTube / yt-dlp metadata structure, individual video formats only register the default audio track (for example, the English language 'lang:en|channels:2') within their audioTrackIds property.By passing that restricted array (['lang:en|channels:2']) to buildTrackOptions:The function checked whether each available track (Spanish, French, German, etc.) was present in that array. Since they were not included in the 1080p video format, it marked disabled: true for all other audio tracks (<option disabled>). As a result in the HTML, the browser/UI rendered all these tracks in gray, preventing the user from clicking or selecting any multi-language track other than the default one.
Added Spanish audio track option and updated tests to ensure all audio tracks remain active when a video resolution is selected.
independent-arg
marked this pull request as draft
August 20, 2026 20:07
Added 'alwaysShowResolutionHint' parameter to control resolution hint visibility.
Removed unnecessary blank line for cleaner code.
independent-arg
marked this pull request as ready for review
August 20, 2026 20:26
Added a test case to verify bitrate hints for audio tracks when a video resolution is selected.
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.
Problem
When selecting a video resolution (e.g. 1080p),
useMediaResolutionSelection.tswas passingselectedTrackIds.value?.audioTrackIdsasavailableTrackIdstobuildTrackOptions.Because individual video stream formats in
yt-dlpmetadata only reference the default audio track ID (e.g.,lang:en|channels:2),buildTrackOptionsflagged all other multi-language audio tracks (Spanish, French, German, etc.) as unavailable and rendered them withdisabled: true. This prevented users from selecting non-default audio tracks across both "Video + Audio" and "Audio Only" modes.#840
#826
Fix
1. Stop restricting audio tracks by the selected video resolution.
In
yt-dlp, multi-language audio streams can be freely combined with any video resolution format — the restriction was never correct to begin with. Insrc/composables/useMediaResolutionSelection.ts,audioTrackOptionsnow passesundefinedasavailableTrackIdstobuildTrackOptionsinstead ofselectedTrackIds.value?.audioTrackIds, so audio tracks are no longer disabled just because the currently selected format doesn't reference them.2. Keep the "available in ..." hint on enabled tracks.
buildTrackOptions(src/helpers/resolutionSelection.ts) previously only attached the resolution/bitrate hint (e.g."(Available in 130kbps, 49kbps)") or the unavailable suffix to disabled options — an enabled option always rendered with the bare label. Once audio tracks stopped being disabled, this hint disappeared entirely, including for tracks where it's genuinely useful info (verified against a real video with multiple audio-only bitrates).buildTrackOptionsnow takes an additionalalwaysShowResolutionHintparameter (defaultfalse, so existing video-track behavior is unchanged).useMediaResolutionSelection.tspassestrueonly for theaudioTrackOptionscall, so audio tracks keep showing where they're actually available even while enabled, without reintroducing the disabling bug.videoTrackOptionsis untouched.Tests
Unit tests in
tests/unit/useMediaResolutionSelection.spec.tswere updated/added to verify:disabled: false) regardless of the selected video resolution.Verified manually on Linux and Windows.
