Video stills: Frame at on video blocks and the front page's video, and Tools > Video thumbnails (migration 074)

Frame at (a still from a YouTube or Facebook video at a typed time)
now also fills a video block's still and the front page's new Video
still, which the hero shows before its featured video plays. Tools >
Video thumbnails takes one from any link, to download or copy into a
field. All go through the existing POST /api/admin/video-frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-08 12:10:44 -05:00
parent 31d9f78120
commit 14a22ca44d
12 changed files with 240 additions and 13 deletions

View file

@ -107,6 +107,16 @@ export const frontPage = {
"A YouTube, Vimeo or Facebook link, or a video file: a filename in " +
"the uploads folder, or a link ending in .mp4 or .webm",
},
{
path: "video_still",
label: "Video still",
widget: "image",
crop: 16 / 9,
resolve: mediaUrl,
full: true,
frameFrom: "video_url",
help: "Shown before it plays. Default: YouTube's own thumbnail, or a video file's first frame. Frame at takes a still from a YouTube or Facebook video.",
},
{
path: "video_captions",
label: "Video captions",

View file

@ -408,8 +408,12 @@ export const blocksChild = {
resolve: mediaUrl,
full: true,
when: { path: "type", value: ["image", "video"] },
frameFrom: "href",
frameWhen: { path: "type", value: "video" },
help: (row) =>
row?.type === "video" ? "Still shown before it plays. Default: YouTube's own thumbnail." : undefined,
row?.type === "video"
? "Still shown before it plays. Default: YouTube's own thumbnail. Frame at takes a still from a YouTube or Facebook video."
: undefined,
},
{
path: "captions",

View file

@ -51,7 +51,8 @@ export type Hero = {
slides: HeroSlide[]
livestream: { url: string; title?: string | null } | null
/** A link to embed or a video file; see videoSource in embeds.ts. */
video: { url: string; title?: string | null; captions?: string | null } | null
/** `still` is shown before it plays; resolve it with mediaUrl. */
video: { url: string; title?: string | null; captions?: string | null; still?: string | null } | null
/** With the 'event' feature: the pinned event, else the countdown's. */
event: HeroEvent | null
}