Captions for uploaded videos (migration 066)
Video blocks get a Captions field and the hero a Video captions field, each a WebVTT upload drawn as <track kind="captions" default> on a video file. The media library takes .vtt (sniffed by its WEBVTT header, kept as is, always in /uploads/captions/) with its own tab. Newsletter parts leave the field out. nginx needs text/vtt in mime.types: docs/media-uploads.md, step 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
aaab1a945c
commit
33be618331
18 changed files with 123 additions and 43 deletions
|
|
@ -225,7 +225,7 @@ home.get("/front-page", (c) => {
|
|||
? { url: page.livestream_url, title: page.livestream_title }
|
||||
: null,
|
||||
video: page.video_url
|
||||
? { url: page.video_url, title: page.video_title }
|
||||
? { url: page.video_url, title: page.video_title, captions: page.video_captions }
|
||||
: null,
|
||||
event: shapeHeroEvent(db, heroEvent),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
GET /media the library, newest first, ?q=name,
|
||||
?type=image|video|audio,
|
||||
?folder=logos|images|thumbnails.
|
||||
?folder=logos|images|thumbnails|captions.
|
||||
Picks up images copied into the
|
||||
uploads folder by hand first
|
||||
(registerLooseFiles, at most every
|
||||
SCAN_EVERY_MS)
|
||||
POST /media upload one image (multipart: file,
|
||||
POST /media upload one image or .vtt (multipart: file,
|
||||
keep_original, folder: FOLDERS in
|
||||
media.js, default images)
|
||||
GET /media/:id/uses which records name this file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue