Skip to content

fix(player): play the chosen audio on the HLS fallback - #422

Merged
A-EDev merged 4 commits into
mainfrom
fix/hls-original-audio
Nov 5, 2026
Merged

A-EDev merged 4 commits into
mainfrom
fix/hls-original-audio

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A video that falls back to HLS now plays the audio chosen in the menu, usually the original. Before, it played whichever track YouTube listed first, often an auto-dubbed language, while the menu still showed the original.
  • The HLS track is matched by YouTube's audio content id, so a dub and an original in the same language stay apart. If the chosen language isn't offered, it plays the original.
  • The audio menu now changes the language on HLS. Before, it had no effect there.
  • hls-audio-track is added to the player log.

Related issue

No issue of its own. Found while auditing #339, #342 and #343.

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

  • pnpm test: 214 files, 1263 tests passed
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: passed
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: exit 0
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 63 suites, 1210 passed, 0 failed
  • I smoke-tested the affected desktop behavior. Device testing is pending with the owner.

Agent checks in pnpm tauri dev on macOS, isolated profile, hidden window, with HLS temporarily forced as the first source, one run each. Audio is the track hls.js reported, not listened to:

Video Before After
lGalJmyI78w (21 languages) Arabic dub American English, original
tHG9pCh7HjI (19 languages) Bangla dub American English, original
dQw4w9WgXcQ (no dubs) Default Default
Audio menu to German on the first video Not tried on main; the code had no HLS path for it German dub, no fatal errors

In both dubbed manifests no track has DEFAULT=YES, which is why hls.js took the first one.

Screenshots or recordings

Risk and compatibility

  • Playback: only the hls.js path changes. A live stream with no named audio tracks keeps its current behavior, but no live stream was run.

  • Only macOS was run. Windows and Linux use the same hls.js code.

  • No migrations, database changes, permissions, Rust changes, network changes or background work.

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.

  • User-facing documentation was updated where needed.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Breaking changes and upgrade steps are clearly documented.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 13:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@A-EDev
A-EDev merged commit 4712c8f into main Nov 5, 2026
7 checks passed
@A-EDev
A-EDev deleted the fix/hls-original-audio branch November 5, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants