Skip to content

Subtitle appearance parity: default background should be Box; box fill wrongly applied to Shadow/Outline styles #31

Open

Description

@zZebrahz

Summary

Cross-client parity follow-up from the silo-apple subtitle appearance work. Two related problems in the shared appearance model / renderer:

  1. Default background style is None; it should be Box to match the new cross-client default and typical player expectations (Plex defaults to a translucent box). The Apple clients changed their default from shadow to box (black #000000 @ 75% opacity) in silo-apple. The server stores appearance values but has no server-side default — when no appearance is saved, each client applies its own DEFAULT, so this must change client-side here too.

    shared/src/commonMain/kotlin/org/siloserver/silo/model/settings/SubtitleAppearance.kt:54:

    val backgroundStyle: SubtitleBackgroundStylePreset = SubtitleBackgroundStylePreset.None,

    → should default to Box. Scope agreed on the Apple side: applies to anyone without a saved custom appearance (decode fallback uses DEFAULT too).

  2. The background box is drawn for Shadow and Outline styles, not just Box. In android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/SubtitleManager.kt:172-177, backgroundAlpha is zeroed only for None:

    val backgroundAlpha = if (appearance.backgroundStyle == SubtitleBackgroundStylePreset.None) {
        0
    } else {
        (appearance.backgroundOpacity.coerceIn(0, 100) * 255 / 100)
    }

    So selecting "Drop Shadow" renders a filled box plus a shadow edge, and "Outline" renders a filled box plus an outline. On Apple (and conceptually), the filled background belongs to the Box style only; Shadow/Outline should have a transparent background with just the edge treatment. Fix: apply backgroundOpacity alpha only when backgroundStyle == Box, else Color.TRANSPARENT.

What already works here

CaptionStyleCompat honors the alpha in the background color, so box translucency works correctly on Android (the Apple clients had a separate libass color-packing bug for this, fixed in silo-apple — nothing to port).

References

  • silo-apple commits: default-to-box (c276cb4), box opacity/BorderStyle work (e57686a, 2bda613) on the subtitles branch.

Activity

  1. zZebrahz commented on Jul 3, 2026

    @zZebrahz
    ContributorAuthor

    I can handle this later, was just filing a note

  2. added
    bug
    triaged
    and removed
    triaged
    on Sep 20, 2026
  3. added theissue type on Sep 20, 2026
  4. removed
    bug
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions