Skip to content

Let video popups take an explicit height for the poster box - #69

Closed
pelkiegr wants to merge 1 commit into
mhoogenbosch:masterfrom
pelkiegr:fix/video-poster-height
Closed

pelkiegr wants to merge 1 commit into
mhoogenbosch:masterfrom
pelkiegr:fix/video-poster-height

Conversation

@pelkiegr

@pelkiegr pelkiegr commented Oct 14, 2026 •

Copy link
Copy Markdown

Follow-up to #67, as discussed there.

Problem: a camera_entity popup sizes its stream area from the poster's pixel size until the first frame. NVR snapshots are often anamorphic: my LaView/Hikvision NVR serves a 704×480 still of a 4:3 picture, and its substream is 640×360 with SAR 3:4. The poster therefore shows at 640×436 and the box jumps to 640×480 when #67's display-aspect sizing kicks in. JFIF in the snapshot says 1:1, so the app can't detect it from the image.

Fix: media.video takes an optional height. When set, the provisional box and the poster use it until the first frame, and the poster no longer overrides it. When it's absent, behavior is unchanged: 16:9 provisional, then the poster's aspect. Small pure helpers (provisionalVideoHeight, posterVideoHeight) with VideoPosterHeightTest (5 cases).

Tested: onn 4K Streaming Box (Android 14). With height: 480 the poster and live video now line up with no jump.

The ha-pipup side sends it from media_height: mhoogenbosch/ha-pipup#42.

🤖 Generated with Claude Code

A camera_entity popup sized its stream area from the poster's pixel
size until the first frame. NVR snapshots are often anamorphic (704x480
for a 4:3 picture), so the poster showed too short and the box jumped
when the stream reported its display aspect. An optional media.video
height now fixes the box until then; without it nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mhoogenbosch

Copy link
Copy Markdown
Owner

Merged via #72, together with #70 and #71: your commit is in master as-is, GitHub just marks this one "closed" because it went in as a fast-forward. Released in v0.28.0, with ha-pipup 1.27.0.

Thanks for all three! One fix on top, in #72: buttonsInline on a media-only popup put the buttons in the header row that gets removed when there's no title, message or icon, so they now keep their own row. Tested on a Fire TV: full-bleed WHEP with the Live badge, inline ✕ in your frosted style, media-only + inline buttons, and an RTSP video with a fixed height.

@pelkiegr
pelkiegr deleted the fix/video-poster-height branch October 14, 2026 22:53
davbebawy pushed a commit to davbebawy/PiPup that referenced this pull request Oct 30, 2026
…angelog for mhoogenbosch#69-mhoogenbosch#71

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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