Skip to content

fix(music): play AAC songs for their real length on macOS - #202

Merged
A-EDev merged 2 commits into
mainfrom
fix/music-aac-length
Oct 25, 2026
Merged

A-EDev merged 2 commits into
mainfrom
fix/music-aac-length

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Music player follow-up 3 of 4. Stacked on feat/music-side-pane (PR #201); review and merge in order.

  • WebKit on macOS reports YouTube's fragmented MP4 audio (itag 140 and 139) at exactly twice its length. The file's header is right (mvhd, mdhd and sidx agree) and the clock runs at normal speed, so a song played to its real end and then ran on in silence. Opus is reported correctly. This also affected the Medium quality setting, which already picked AAC.
  • The engine keeps each song's listed length (approxDurationMs, or the song's own length for a download). When the element reports well past it, the player shows the listed length and ends the song there, so the next one starts on time.

Related issue

Change type

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

Validation

  • pnpm test: 754 tests passed, 0 failed
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: not run on this branch (no Rust changes); clean at the top of the stack
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: not run on this branch (no Rust changes); no new warnings at the top of the stack
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: not run on this branch (no Rust changes); 825 passed, 0 failed at the top of the stack
  • I smoke-tested the affected desktop behavior. macOS: a 4:05 song reported at 8:10 now shows 4:05, and the next song started at the real end.
  • OS/device: the owner tested a local build of the whole stack on macOS. Windows and Linux were not run; the correction only applies when the reported length is well past the listed one.

Screenshots or recordings

Risk and compatibility

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.
  • User-facing documentation was updated where needed (changelog entry in v0.1.0-beta3.txt).
  • Dependency and lockfile changes are intentional and limited to this PR. No dependency changes.
  • Breaking changes and upgrade steps are clearly documented. No breaking changes.

Copilot AI balanced review requested due to automatic review settings October 25, 2026 19:16

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.

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 force-pushed the fix/music-aac-length branch from ac8055b to 59cba8d Compare October 25, 2026 19:36
@A-EDev
A-EDev changed the base branch from feat/music-side-pane to main October 25, 2026 19:36
@A-EDev
A-EDev merged commit ff68a3c into main Oct 25, 2026
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