Skip to content

fpv video page: thumbnail poster + play overlay instead of black screen#82

Merged
itamarwe merged 1 commit into
claude/blog-post-clarifications-yvwp30from
claude/fpv-video-poster-overlay-yvwp30
Jul 5, 2026
Merged

fpv video page: thumbnail poster + play overlay instead of black screen#82
itamarwe merged 1 commit into
claude/blog-post-clarifications-yvwp30from
claude/fpv-video-poster-overlay-yvwp30

Conversation

@itamarwe

@itamarwe itamarwe commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Fixes the video-view page opening to a black rectangle instead of the clip's thumbnail with a play affordance.

Root cause: the <video> element had no poster attribute, so before its metadata loaded (preload="metadata") — or if the visitor never presses play — the browser just renders a black box. The only way to start playback was a small play/pause button in the transport bar below the video, with no visual cue on the video area itself.

Fix:

  • Wrap the <video> in a .video-stage container and set poster={thumbnailUrl} — the same field the gallery cards already use for their thumbnails, so it's guaranteed present for every video.
  • Add a centered .video-play-overlay play button (▶) on top of the poster, reusing the existing play/pause click handler. It's only rendered while paused and disappears once playback starts, so it never blocks interaction with a playing video.

Same pattern as the earlier viewer patches: this edits the built bundle (index-ObpdO5MX.js + its CSS) directly, since the source lives in fpv-drone-strikes-lebanon-dataset — the durable fix belongs there on the next rebuild.

Verified headlessly: node --check passes; the rendered DOM shows

<div class="video-stage">
  ``&lt;video src="https://.../videos/….mp4" poster="https://.../thumbnails/….jpg" ...&gt;``</video>
  <button class="video-play-overlay" aria-label="Play"></button>
</div>

(The video area itself still renders black in the sandbox screenshot only because this environment can't reach the CDN to fetch the actual thumbnail — same known limitation as the earlier scene-viewer checks.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01YVLz2Gms21jzv8S6NE1XaT


Generated by Claude Code

…k screen

The <video> element had no poster attribute, so before metadata loaded
(or if playback never started) the player was just a black box. Wraps
the video in a .video-stage container, sets poster=thumbnailUrl (same
field the gallery cards already use), and adds a centered play-button
overlay (reusing the existing play/pause handler) that's shown only
while paused and disappears once playback starts.

Verified headlessly: rendered DOM shows the poster attribute pointing
at the real CDN thumbnail and the overlay button positioned over the
video; JS passes node --check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVLz2Gms21jzv8S6NE1XaT
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
itamarwe-github-io Ready Ready Preview, Comment Jul 5, 2026 7:46pm

@itamarwe itamarwe merged commit e9cb4c9 into claude/blog-post-clarifications-yvwp30 Jul 5, 2026
3 checks passed
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