Skip to content

Statistics HUD: fix video zoom, two-column layout, drop redundant lines#78

Open
oliversluke wants to merge 3 commits into
owenselles:mainfrom
oliversluke:fix/hud-video-zoom
Open

Statistics HUD: fix video zoom, two-column layout, drop redundant lines#78
oliversluke wants to merge 3 commits into
owenselles:mainfrom
oliversluke:fix/hud-video-zoom

Conversation

@oliversluke

@oliversluke oliversluke commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The Statistics HUD could zoom the streamed video and, on the tall Standard + Diagnostics layout, overflow off-screen. This fixes both and tidies the panel.

  • Zoom fix: the video and HUD were laid out as ZStack siblings; a UIViewControllerRepresentable can expand to the union of its siblings, so a tall HUD grew the layout and resizeAspectFill zoomed/cropped the picture. The HUD/menu/warning now live in an .overlay of the video, which is sized to the video and can never grow it.
  • Two-column Standard HUD when Diagnostics is on (core stats left, Debug right) — so the panel no longer runs off the bottom of the screen, and no longer disturbs the pause-menu sidebar.
  • Dropped the redundant free-form diagnostic lines (session summary, app-queue, sample/convert, display-layer, color, decoded-video) that duplicated the structured rows, plus the now-dead code and localization keys behind them.

Deliberately not included: the Release/Debug gating of the diagnostics section and the processing-delay relocation — that design is still under discussion and stays in draft #76.

Device-tested on Apple TV 4K. Build + swiftformat/swiftlint --strict clean.

🤖 Generated with Claude Code

The in-stream player laid the video and the HUD/pause-menu/time-warning
out as siblings of a ZStack. The video is a UIViewControllerRepresentable,
which — unlike a plain view — can expand to the union of its ZStack
siblings' content. A tall Standard statistics HUD (especially with
Diagnostics enabled) grew the ZStack past the screen, and the video's
resizeAspectFill gravity then zoomed/cropped the picture to fill the
taller bounds.

Move the HUD/menu/warning into an .overlay of the video. An overlay is
sized to the view it decorates and can never grow it, so the video's
bounds stay fixed to the screen regardless of how tall the HUD gets.
Positioning and transitions are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarikmudgal

Copy link
Copy Markdown
Collaborator

@oliversluke Just tested this PR fresh out :( seems to doesn't work with the zoom issue.

Simulator Screenshot - Apple TV 4K (3rd generation) - 2026-07-11 at 18 10 32 Simulator Screenshot - Apple TV 4K (3rd generation) - 2026-07-11 at 18 10 34 Simulator Screenshot - Apple TV 4K (3rd generation) - 2026-07-11 at 18 10 36

Standard still zoomed without the cleanup

@aarikmudgal

Copy link
Copy Markdown
Collaborator

I guess there were more changes than included in this PR

oliversluke and others added 2 commits July 11, 2026 18:50
The Standard statistics HUD fits the screen comfortably on its own, but
enabling Diagnostics appends the whole Debug section (~15-25 extra lines,
several of them wrapping sentences), roughly doubling the panel height so
the lower rows run off the bottom of the screen.

When Diagnostics is on, lay the Standard HUD out in two columns — core
stats (Network/Video/Audio/Session) on the left, Debug on the right —
which roughly halves the height so everything stays visible. Compact and
Standard-without-Diagnostics are unchanged (single column). Splits the
panel/column layout helpers so the fixed 380pt width now lives on each
column rather than the whole panel.

Complements owenselles#76 (which stops the tall HUD from zooming the video); this
keeps the extra Diagnostics rows on screen.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bottom of the Debug section carried six free-form sentence lines
left over from before the structured Network/Video/Audio/Session/Debug
rows existed. They largely repeat data now shown in those rows — e.g.
the session-summary line duplicates Resolution/FPS/Codec, the color and
decoded-video lines duplicate the Video Format row, and the app-queue /
display-layer "dropped" counts overlap Video Drops/freezes. The German
"App N in Warteschlange" reading of the ever-growing enqueued counter
was also misleading.

Remove the session-summary, app-queue, sample/convert, display-layer,
color-diagnostic, and decoded-video lines, keeping the conditional
fallback warning and RTC-log status. Also removes the now-orphaned code:
GFNStreamController.diagnosticSessionSummary, the StatsHUDView
detectedColorLabel helper, six AppLocalization formatters
(diagnosticSessionSummary, displayLayerMetrics, colorDiagnosticStatus,
decodedVideoStatus, hdrSupportLabel, decoderPathLabel), and their ten
now-dead L10n keys across all 34 locale files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oliversluke oliversluke changed the title Fix Statistics HUD zooming the streamed video Statistics HUD: fix video zoom, two-column layout, drop redundant lines Jul 11, 2026
@oliversluke

Copy link
Copy Markdown
Contributor Author

Pushed an update. On top of the overlay zoom fix, I folded in the two non-disputed pieces from #76:

  • Two-column Standard HUD when Diagnostics is on — the debug rows no longer get cut off at the bottom (that tall single column was also what was disturbing the pause-menu sidebar).
  • Removed the redundant free-form lines you flagged as obsolete/duplicate.

So this PR is now everything we'd aligned on for the HUD, minus the Release/Debug gating discussion — that one stays in the draft #76 until we settle it. Device-tested: video no longer zooms, Standard shows two columns, menu stays put. Build + lint clean. Thanks for the patience 🙏

@aarikmudgal

Copy link
Copy Markdown
Collaborator

Tested in FH6.

Debug:
Simulator Screenshot - Apple TV 4K (3rd generation) - 2026-07-12 at 17 15 05
Simulator Screenshot - Apple TV 4K (3rd generation) - 2026-07-12 at 17 15 04

Release:
Simulator Screenshot - Apple TV 4K (3rd generation) - 2026-07-12 at 17 25 22

@oliversluke Release run still showing the Debug column. Could you please check. Also, do we decide to keep "Processing delay" under debug section?

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