Skip to content

Keep tvOS subtitles within the title-safe area - #95

Merged
Quick104 merged 1 commit into
mainfrom
subtitle-fast-fire-fixes
Jul 22, 2026
Merged

Quick104 merged 1 commit into
mainfrom
subtitle-fast-fire-fixes

Conversation

@zZebrahz

@zZebrahz zZebrahz commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep libass-composited subtitle images inside the tvOS title-safe area
  • translate the complete rendered image as one unit so multi-line cue spacing and alignment remain intact
  • leave iOS and macOS subtitle placement unchanged

Root cause

The subtitle renderer correctly produced every forced-English cue, but the tvOS overlay placed some final composited image frames below the display's safe area. The television cropped those pixels, which made the second speaker's line disappear and then made the rapid dialogue near the end of the scene appear to stop entirely.

This change resolves the final layer frame against safeAreaInsets on tvOS. It shifts a bounded image back inside the safe frame without resizing or restyling the authored subtitle output.

Validation

  • git diff --check origin/main...HEAD
  • reproduced the missing forced subtitles on a physical Apple TV before the fix
  • replayed the same forced-English track and confirmed the previously missing rapid dialogue before “I get paid in cash. Up front.” remained visible after the fix

Summary by CodeRabbit

  • Bug Fixes
    • Improved subtitle positioning on tvOS by keeping subtitle overlays within the title-safe area.
    • Prevented subtitles from extending beyond screen-safe boundaries while preserving existing subtitle rendering behavior.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 50ce36e3-d3ce-4b50-a548-3b1aa37acaef

📥 Commits

Reviewing files that changed from the base of the PR and between 7d9e7b4 and 9dd1495.

📒 Files selected for processing (1)
  • iosApp/iosApp/Screens/Player/Subtitles/SubtitleOverlayView.swift

📝 Walkthrough

Walkthrough

SubtitleOverlayView now resolves subtitle content geometry through a shared frame calculation. On tvOS, the calculation translates content into the safe-area region before both layout and image updates assign the contentsLayer frame.

Changes

Subtitle overlay geometry

Layer / File(s) Summary
Resolve and apply subtitle content frames
iosApp/iosApp/Screens/Player/Subtitles/SubtitleOverlayView.swift
layoutSubviews and updateContents use resolvedContentsFrame, which applies tvOS safe-area translation while preserving existing bounds or override behavior elsewhere.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: keeping tvOS subtitles within the title-safe area.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch subtitle-fast-fire-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@zZebrahz
zZebrahz marked this pull request as ready for review July 21, 2026 04:17
@Quick104
Quick104 merged commit 6885bdc into main Jul 22, 2026
1 check passed
@Quick104
Quick104 deleted the subtitle-fast-fire-fixes branch July 22, 2026 13:57
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