Repository navigation
Conversation
…canvas On Android TV the libass overlay was cut 96 px left and right and 54 px top and bottom on a 1920x1080 screen, so signs an ASS script places near the frame edges were clipped. The overlay is a child of Media3's SubtitleView, and the TV insets that caption canvas by a 5% title-safe margin (titleSafeFraction = 0.05f), so libass was handed the inset frame. The title-safe inset stays for Media3 text and bitmap cues. The libass overlay is now placed over the displayed video rect in the canvas's own coordinates, and the canvas and content frame stop clipping it while it reaches outside the canvas. libass positions events in the script's PlayRes space with its own margins, so it needs the video's frame. This also replaces the Bottom-preset height constraint: the overlay keeps the video's frame instead of following the canvas into the letterbox bar, and no longer takes the detected-letterbox inset either.
With the playback controls showing, the TV pads the bottom of the caption canvas so text cues sit above the controls. A padded view clips its children to the padded area on every side, so the full-video libass overlay was cut at the title-safe inset again: signs at the left, right and top edges were sliced 96 px and 54 px in, mid-word, until the controls hid. While the overlay reaches past the canvas, the canvas now stops clipping to its padding as well as to its bounds. The overlay instead gets its own clip that hides only what lies below the lifted bottom, so ASS still stays out from under the controls as it did before.
…ked menu The phone pads the caption canvas's right side while a player menu is docked, so cues re-centre in the part of the picture left visible. Before the overlay was placed over the whole video it filled the padded canvas and followed. A placed overlay has an explicit width, so ASS kept the full video width and was cut at the menu's edge or drawn under it. A padded left or right side now bounds the placed overlay as it bounds Media3's cues. The overlay's params are written from the content frame's layout listener, after the canvas has been laid out, so a change to them now also has the canvas laid out again (the same request-then-place path the canvas itself uses) instead of relying on a later pass. The bridge takes the bottom clip as one visible height and has a named reset (fillHost) instead of sentinel arguments, and the overlay geometry tests live in their own class.
|
Warning Review limit reachedThis organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing. Next included review available in 23 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The Evidence section is still marked “pending upload,” so no playback captures are available. The shared playback code changes ASS subtitle placement relative to the video frame (and its clipping while TV controls are shown); this reaches Android phone, tablet, foldable folded and open, and Android TV. Please provide before-and-after captures of the same playback and media on each device, showing the affected letterbox/Bottom placement on the phone app and the edge-positioned subtitles with TV controls hidden and shown on TV; identify the device and build/commit for every capture. The geometry tests do not replace these visible-change captures. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
The Evidence section says this also changes phone subtitle placement when letterboxing is detected or the Bottom preset reaches into the bar. Geometry tests do not show that visible change. Please add before-and-after playback captures for those cases on an Android phone, tablet, and foldable (folded and open), identifying the build for each; for any device you omit, explain why the change cannot reach it. |
… fill it The fill path ignored whether fillHost changed the overlay's params, so an overlay leaving its full-video placement could keep its old bounds until some later layout. Pass the result as childrenChanged, as the placed path already does.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The linked evidence covers Android TV, but playback evidence is still missing for the phone app. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
Evidence is published at https://evidence.siloserver.org/r/silo-android/pr-1012/ (the body said "pending upload" briefly while it went up). It now includes Android phone captures of the synthetic letterbox file, with the player menu closed and docked, on main and this branch. On that emulator the canvas stayed on the full video frame, so the phone takes the unchanged fill path and looks the same before and after. Placement on letterbox-inset and Bottom-in-the-bar canvases, including the docked-menu bound, is covered by the geometry tests. Tablet and foldable run the same phone code and were not captured separately. |
Review summaryReviewed head: Fit: 8/10 · Readiness: 8/10 — conditional (CI is green) I found no verified defect in this PR. Drawing libass over the whole video is how ASS is meant to render: scripts position events in the video's own PlayRes space, so the title-safe inset was cutting off signs placed near the frame edges. The canvas math, the Fit. This fixes a real rendering bug in a core playback path, and it leaves Media3's text and bitmap cues alone. It stretches the boundary, though. The overlay stays a child of Media3's caption canvas and works around that canvas's insets with negative margins, clipping turned off on three views, a clip rect for the controls lift, and forced relayouts. If the overlay were a sibling of Readiness. Holding it at 8: this review didn't reproduce the bug live. The author's TV captures show the change. The phone letterbox and Bottom-in-the-bar paths are covered only by the new geometry tests, and those tests call helpers this PR adds, so they can't fail on the base. Candidates checked and not kept
TestsCI passes on this head. Locally, Validated featuresNo case recorded as passed on the 1.0 board touches this code. The Other checks
🤖 Claude Code (claude-opus-5-5) |
Problem
Related issue: N/A
Validation tasks: unblocks #324 C4; unblocks #323 C4
Paired pull requests (same report): Silo-Server/silo-server#4639, Silo-Server/silo-server#4640, Silo-Server/silo-server#4641, Silo-Server/silo-server#4642, #1010, #1011, #1013, Silo-Server/silo-apple#1237, Silo-Server/AetherEngine#30
Other clients: Apple N/A (Apple does not render ASS through this libass overlay or inset it to a title-safe canvas); Roku N/A (no libass overlay); Web N/A (no libass overlay)
On Android TV, ASS signs and positioned lines did not appear where the script puts them. The libass overlay is a child of Media3's caption canvas, and the TV insets that canvas by a 5% title-safe margin (96 px left and right, 54 px top and bottom at 1080p), so libass scaled the whole script into the inset frame: a sign at the frame's corner landed 96 px and 54 px inside it, and the script's layout no longer lined up with the picture. A detected letterbox narrowed the frame the same way.
Approach
The title-safe inset stays for Media3's text and bitmap cues. The libass overlay is now placed over the displayed video rectangle, in the canvas's own coordinates, and the canvas and the content frame stop clipping while the overlay reaches past the canvas. libass positions events in the script's PlayRes space with the script's own margins, so it needs the video's frame. This replaces the Bottom-preset height constraint: the overlay keeps the video's frame instead of following the canvas into the letterbox bar.
Two padding cases keep their old effect:
The overlay's params are written from the content frame's layout listener, so a change to them now also has the canvas laid out again through the existing request-then-place path.
Validation
./scripts/test-check-build-supply-chain.shand./scripts/check-build-supply-chain.sh: pass../gradlew testDebugUnitTest: pass, including table tests of the overlay rectangle (title-safe canvas, Bottom canvas in the bar, docked-menu padding) and the controls clip.:android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug :androidApp:lintVitalRelease :androidTvApp:lintVitalRelease: pass.:androidApp:assembleDebug :androidTvApp:assembleDebug: pass.mainand this branch (with the review follow-ups), with the controls hidden and shown (captures below).Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-1012/
Surface and build: Android TV emulator (Android 14, 1080p) and Android phone emulator (Android 16, landscape), debug builds of
mainand this branch. On the phone, the letterbox file kept the canvas on the full video frame, so the overlay takes the fill path and the captures (menu closed and docked) look the same before and after; the letterbox-inset and Bottom-in-the-bar placement paths, and the docked-menu bound on them, are covered by the geometry tests. Tablet and foldable use the same phone code path and were not captured.Risks
While the TV controls are up, ASS lines in the band the controls cover are hidden rather than squeezed above them. On TV, whenever libass is available, the caption canvas no longer clips its children, so a Media3 cue box positioned at the very edge can draw into the title-safe margin.
Checklist
AI Disclosure
Note
Fix ASS subtitle overlay to cover the whole video, not the title-safe area
Positions the libass overlay over the full video rectangle in canvas coordinates instead of constraining it to the inset caption canvas. New geometry helpers in SubtitleManager.kt translate the video rect into the canvas and clip only the portion hidden below the controls lift (bottom padding).
LibassBridge.placeOverlaynow sets overlay width, height, and margins from the derived rectangle;fillHostrestores match-parent sizing for the fallback path (see LibassBridge.java).SubtitleVideoRectSync.setCanvasClippingdisables child clipping on the subtitle view when the overlay overflows it.applyLayoutParamsandplaceSubtitleCanvasforce a relayout when overlay layout parameters change, even if the canvas bounds are unchanged.Macroscope summarized 1cdb13b.