Skip to content

fix(player): wire stream external subtitles to player UI and fix Windows bridge build - #606

Open
ayruki wants to merge 1 commit into
NuvioMedia:Devfrom
ayruki:fix/desktop-player-subtitles
Open

ayruki wants to merge 1 commit into
NuvioMedia:Devfrom
ayruki:fix/desktop-player-subtitles

Conversation

@ayruki

@ayruki ayruki commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Aligns NuvioDesktop with NuvioMobile's subtitle architecture, allowing stream-provided external subtitles to be properly mapped, displayed in the player subtitle selector drawer, and passed to the native player. It also fixes a Windows build issue during native bridge generation on paths containing non-ASCII characters.

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

Previously, stream-provided external subtitles were not mapped into runtime subtitle states, preventing subtitles provided directly by streams from appearing in the desktop subtitle selection drawer. In addition, externalSubtitles was included in player LaunchedEffect keys, causing unnecessary playback reload cycles. Finally, generating the Windows player bridge batch script failed on environments where user profiles or project paths contained non-ASCII characters.

Desktop scope

Affects desktop player shared code (Windows, macOS, Linux) for external subtitle mapping and playback stability. Also affects Windows-specific bridge build script generation in composeApp/build.gradle.kts.

Issue or approval

Fixes #588

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

Scope boundaries

This PR is strictly focused on subtitle track mapping and Windows native bridge compilation. It does not introduce new UI themes, modify external dependency versions, or alter libmpv core bindings.

Testing

Verified compilation on Windows using ./gradlew :composeApp:compileKotlinDesktop (BUILD SUCCESSFUL). Verified that stream-provided external subtitles appear in the subtitle drawer and render correctly on the native player surface, and verified that switching sources updates active subtitles without playback reload loops.

Screenshots / Video

Not a UI change

Breaking changes

None

Linked issues

Fixes #588

…ows bridge build

- Map StreamItem.externalSubtitles into runtime.addonSubtitles with dynamic language normalization and forced track detection
- Update activeExternalSubtitles on source switch in PlayerScreenRuntime
- Pass externalSubtitles to NativePlayerSurface and NativePlayerController
- Prevent player recreation loop in PlayerEngine.desktop by avoiding externalSubtitles in LaunchedEffect keys
- Fix buildWindowsPlayerBridge PowerShell script UTF-8 encoding for non-ASCII workspace paths
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.

[Feature]: Add custom subtitle font selection in Subtitles / Styling settings

1 participant