Skip to content

feat(player): draw in-stream subtitle renditions in Silo's appearance - #956

Closed
Quick104 wants to merge 1 commit into
mainfrom
feat/hls-rendition-text-style
Closed

Quick104 wants to merge 1 commit into
mainfrom
feat/hls-rendition-text-style

Conversation

@Quick104

@Quick104 Quick104 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #313 C1, C4; changes #314 C1, C4

AVPlayer draws a server HLS stream's subtitle renditions itself (a transcode's subtitle since #821). Those cues never reach Silo's subtitle overlay, so they appear in AVPlayer's default style, whatever the viewer chose in subtitle settings.

Approach

The player hands its subtitle appearance to AVPlayer as an AVTextStyleRule on every remote HLS item, and again whenever the appearance changes: text color and opacity, the box (transparent when there is none), size relative to AVPlayer's own, font family, and text edge. An appearance that matches the device leaves AVPlayer on the system caption style. Position and the caption window stay AVPlayer's, because a rule can move a cue line but not with the overlay's video-rect geometry.

Affects iOS, tvOS and macOS; the text style API and constants exist on all three.

Validation

  • Build: iOS, tvOS and macOS build-only checks (Debug, Xcode 27.0) succeeded on 8cfeda5.
  • Unit tests: 190 tests in the protocol V3, media authorization, rendition text style, Aether boundary and buffering contract classes passed on an iOS 27.0 simulator (iPhone 17), ad-hoc signed.
  • Not run: comparing the rendered result with the overlay on a device. tvOS and macOS have no test bundle.

Evidence

Evidence: link to follow

Risks

The mapping hasn't been compared with the overlay on screen. Size scale, box padding and edge weight may differ from the overlay and need a look on each device.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code shell and file tools; GitHub CLI; Xcode 27.0 (xcodebuild, XcodeGen) on a Mac build service
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated. A maintainer approved opening it; no human has run it on a device yet.
  • Adversarial review: a separate read-only Claude Code session (claude-opus-5-5) reviewed the change at high effort, including platform availability of textStyleRules and the CMTextMarkup constants. It found no problems.

🤖 Generated with Claude Code

Note

Draw in-stream HLS subtitle renditions in Silo's appearance

  • Adds HLSRenditionTextStyle, which converts the effective subtitle appearance into AVTextStyleRule markup attributes: foreground color and opacity, character background, relative font size, edge style, and font family. Matching the system appearance produces no rules, so AVPlayer keeps its own style.
  • PlayerViewModel.observeHLSRenditionTextStyle watches the appearance settings and passes recomputed rules to AetherPlaybackController.setHLSRenditionTextStyleRules.
  • AetherPlaybackController stores the rules and applies them to the current AVPlayer item, and re-applies whenever the engine publishes a new item. Rules apply only when the active load's options enable native remote HLS; other items are unchanged.
  • Adds XCTest coverage in HLSRenditionTextStyleTests.swift for default, shadow, and system-matching appearances.

Macroscope summarized 8cfeda5.

AVPlayer draws a server HLS stream's subtitle renditions itself, so they
never reached Silo's overlay and showed in AVPlayer's default style
whatever the viewer chose in subtitle settings.

The player now hands its appearance to AVPlayer as an AVTextStyleRule
on every remote HLS item, and again when the appearance changes: text
color and opacity, the box (transparent when there is none), size
relative to AVPlayer's own, font family and text edge. An appearance
that matches the device leaves AVPlayer on the device's caption style.
Position and the caption window stay AVPlayer's, because a rule can
move a cue line but not with the overlay's video-rect geometry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 122 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd2b9155-a870-45f6-b8d9-2eb468ed3612
Commits

Reviewing files that changed from the base of the PR and between f334794 and 8cfeda5.

Files selected for processing: 4
  • iosApp/Tests/HLSRenditionTextStyleTests.swift
  • iosApp/iosApp/Screens/Player/AetherPlaybackController.swift
  • iosApp/iosApp/Screens/Player/HLSRenditionTextStyle.swift
  • iosApp/iosApp/Screens/Player/PlayerViewModel.swift
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T13:29:10.916047Z 8cfeda5 PR opened
🔒 Security Review ✅ Completed 2026-10-30T13:29:37.182262Z 8cfeda5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@macroscopeapp

macroscopeapp Bot commented Oct 30, 2026

Copy link
Copy Markdown

Visible effect: server-HLS subtitles now use the configured Silo appearance instead of AVPlayer’s default styling (iosApp/iosApp/Screens/Player/HLSRenditionTextStyle.swift) — iPhone, iPhone Duo folded and open, iPad, Mac, and Apple TV. Evidence is missing; the Evidence section says only “link to follow.” Add before-and-after screenshots of the same stream and subtitle settings on each device, naming the device and build or commit (and whether the Duo is folded or open).

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@silo-triage silo-triage Bot added enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Oct 30, 2026
@Quick104

Copy link
Copy Markdown
Contributor Author

Superseded by #970, which combines this change with the rest of the stack for review.

@Quick104 Quick104 closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant