fix(subtitles): remove the subtitle outline when it is disabled - #1
Merged
Merged
Conversation
The desktop and iOS bridges pushed the outline as --sub-outline-size and --sub-outline-color. The bundled mpv revision (c0dd2b32) does not define those properties, so both writes failed silently and mpv kept drawing its default outline whenever custom styling was on; the outline color setting was dead for the same reason. --sub-border-size and --sub-border-color carry the outline on this revision and on newer mpv builds, where those names are aliases of --sub-outline-*.
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.
Summary
With custom subtitle styling enabled, the macOS and Windows desktop bridges pushed the subtitle outline as
sub-outline-size/sub-outline-color. The bundled mpv revision (c0dd2b32d52c66b9efa85a7ee69965569503f6b8, the revision documented innative/macos/mpv/README.md) does not define either property, so both writes were rejected silently: mpv kept drawing its default outline,Outline: Offchanged nothing, and the outline color swatches were dead for the same reason.The bridges now write
sub-border-size/sub-border-color, which exist in every mpv revision — newer builds alias--sub-outline-*to them. The iOS bridge in this repository carried the same two names and is fixed in the same commit.PR type
Why
The subtitle outline toggle and outline color had no effect whenever custom styling was on. The bundled runtime rejects
sub-outline-sizeandsub-outline-colorwithproperty not found, so the player never applied the user's setting and always rendered mpv's default outline. Writing--sub-border-*makes the size and color apply on the bundled revision while staying valid on newer mpv builds.Desktop scope
composeApp/src/desktopMain/native/macos/player_bridge.mmcomposeApp/src/desktopMain/native/windows/player_bridge.cppLinux desktop already used
--sub-border-*and is unchanged. The same property names iniosApp/iosApp/Player/MPVPlayerBridge.swiftare fixed in this commit because that bridge lives in this repository.Issue or approval
Root cause of NuvioMedia#593. Fork-only PR, based on the
enhancedbranch of this fork; nothing is submitted upstream from here.UI / behavior impact
Policy check
CONTRIBUTING.md.Scope boundaries
sub-border-styleis left as written: it is a no-op on the bundled revision, where outline-vs-box follows--sub-back-coloralpha, and it is required on newer mpv builds.Testing
libmpv.2.dylibon arm64 and on x86_64 under Rosetta (mpv-versionreads backmpv c0dd2b32d52c66b9efa85a7ee69965569503f6b8-dirty):sub-outline-size/sub-outline-color→MPV_ERROR_PROPERTY_NOT_FOUND;sub-border-size/sub-border-color→ accepted.sub-ass-override=force, red outline on black video, red-pixel count):sub-outline-size=0→ 8921 outline pixels (outline still drawn),sub-border-size=0→ 0 outline pixels,sub-border-size=2→ 6163 outline pixels. Identical results on the x86_64 runtime under Rosetta.clang++ -fsyntax-onlyagainst the bundled headers, then./gradlew :composeApp:packageReleaseDmg --rerun-taskson macOS 26.6.2 (Apple Silicon) succeeded. The packagedlibplayer_bridge.dylibinside the DMG containssub-border-size/sub-border-colorand nosub-outline-*.libmpv-2.dllis an unmaterialized Git LFS pointer in this checkout, and there is no Windows host available) and the iOS bridge (no MPVKit/Xcode build). Both are the same one-line rename to property names that every mpv revision accepts.Screenshots / Video
Not a UI change.
Breaking changes
None.
Linked issues
Fixes NuvioMedia#593.