Skip to content

feat(seo): play a silent loop as the link preview (DCN-50) - #9

Merged
leoisadev1 merged 1 commit into
mainfrom
leoplayz317/dcn-50-add-ogvideo-animated-link-preview
Oct 23, 2026
Merged

leoisadev1 merged 1 commit into
mainfrom
leoplayz317/dcn-50-add-ogvideo-animated-link-preview

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

A dithercn.dev link pasted into iMessage, Discord or Telegram shows a still card. The home page, and any page that falls back to the site-wide share card, now declares a silent 6-second loop as og:video so those apps play it. Slack and X keep the existing /og image.

 seo/metadata.ts  baseMetadata.openGraph
   images: [{ url: SITE.OG_IMAGE, 1200x630 }]   # unchanged
+  videos: [{ url: SITE.OG_VIDEO, secureUrl, type: "video/mp4", 2400x1260 }]
 public/
+└── og/og-video.mp4   # H.264, no audio, 460 KB

Docs pages build their own openGraph with createPageMetadata, which replaces the layout's, so they keep only their per-page card.

Evidence

After (poster frame of the loop)
Poster frame of the og:video loop

Built with SITE_URL=https://dithercn.dev pnpm build, served with next start, and compared with production.

  • Before: curl -s https://dithercn.dev/ has og:image https://dithercn.dev/og and no og:video.
    After: the only difference in the og/twitter tags is five new lines:
    <meta property="og:video" content="https://dithercn.dev/og/og-video.mp4"/>
    <meta property="og:video:secure_url" content="https://dithercn.dev/og/og-video.mp4"/>
    <meta property="og:video:type" content="video/mp4"/>
    <meta property="og:video:width" content="2400"/>
    <meta property="og:video:height" content="1260"/>
  • /docs and /docs/installation: no og:video, and og:image is still /og/docs/installation/image.png.
  • /og/og-video.mp4: 200, Content-Type: video/mp4, Accept-Ranges: bytes; curl -r 0-99 returns 206.
  • pnpm check, pnpm test, pnpm build and pnpm typecheck all pass.

Not tested: a real unfurl in iMessage, Discord or Telegram, which needs the deployed URL.

Merge Danger

Door: two-way. Reverting removes the tags and the file. Apps that already cached a preview keep it until their cache expires.

Blast radius: share metadata on the home page, the 404 page and any page using the default card. Adds a 460 KB static file.

Fixes DCN-50

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Note

Add Open Graph MP4 video to site SEO metadata

Adds SITE.OG_VIDEO in site.ts pointing to a new silent loop asset at public/og/og-video.mp4. The base metadata in metadata.ts now includes this video entry, using MP4 type and 2400×1260 dimensions, so link previews can play the loop.

Macroscope summarized f021c80.

The home page and other pages that use the site-wide share card now
declare /og/og-video.mp4 as og:video, so iMessage, Discord and Telegram
play it. og:image and the Twitter tags are unchanged. Docs pages set
their own card and get no video.

Fixes DCN-50

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

linear-code Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
DCN-50 Add og:video animated link preview

Problem

A dithercn.dev link pasted into iMessage, Discord or Telegram shows a still card. Leo approved a short silent loop of the site as the link preview, and these apps play an og:video when the page declares one.

Goal

The home page, and any page that falls back to the site-wide share card, declares the approved video as og:video. The still og:image (https://dithercn.dev/og) and the Twitter tags stay as they are, so Slack and X keep the current card. Docs pages keep only their own per-page card.

Acceptance criteria

  • ☐ The approved loop is served from a stable static path, https://dithercn.dev/og/og-video.mp4, as video/mp4 with range requests (206).
  • ☐ The home page's server-rendered HTML has og:video, og:video:secure_url, og:video:type (video/mp4), og:video:width (2400) and og:video:height (1260), all with the absolute production URL.
  • ☐ og:image, twitter:card and twitter:image on the home page are unchanged.
  • ☐ A docs page such as /docs/installation has no og:video tags.
  • ☐ No twitter:player tag.

How to verify

Build with pnpm build, run next start, then curl the home page and a docs page and grep for og:video. curl -sI the video for the content type and curl -r 0-99 for a 206.

Out of scope

  • Changing the /og image or any per-page docs card.
  • The launch gate (DCN-42).

Created with Claude Opus 5.5 in Claude Code.

Review in Linear

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
dithercn Ready Ready Preview Oct 23, 2026 9:52pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches pages that use the site's default link-preview details.

The PR appears safe to merge, with a small correction recommended for the declared video height.

Fix All in Claude CodeFindings

  1. P2 Video height is incorrect ▶

Summary

Adds a static MP4 and declares it in the default Open Graph metadata.

  • Default link previews include a silent video alongside the still image.

Reviews (1) · Last reviewed commit: "feat(seo): play a silent loop as the lin..." · Reviewed by Greptile

Comment thread seo/metadata.ts Resolved
@macroscopeapp

macroscopeapp Bot commented Oct 23, 2026

Copy link
Copy Markdown

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This change adds an automatically active Open Graph video integration and a production MP4 asset for link previews. The declared 2400×1260 dimensions are also disputed by an unresolved review comment reporting a 2400×1240 asset, which could affect preview sizing.

You can add or adjust custom eligibility rules. Learn more.

@leoisadev1
leoisadev1 merged commit 994a943 into main Oct 23, 2026
7 checks passed
@leoisadev1
leoisadev1 deleted the leoplayz317/dcn-50-add-ogvideo-animated-link-preview branch October 23, 2026 22:05

This branch was successfully deployed

1 active deployment
Preview — f021c800 Deployed Oct 23, 2026 by vercel[bot]
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.

1 participant