feat(video): server-generated poster thumbnails + HTTP Range streaming
- Dockerfile: add ffmpeg (Alpine). - static.js: new /thumbs/<id> — ffmpeg extracts the first frame (0.5s), caches it next to the file, serves as the video poster (cosmetic; 404s gracefully if ffmpeg unavailable). - static.js: /files now supports HTTP Range (206 Partial Content) + Accept-Ranges, which iOS requires to stream/seek video reliably (fixes the buffer-before-play / multi-tap); media (image/video/audio) now served inline, other files still download. Shared attachment auth refactored into one helper used by /files and /thumbs. - home.html: video poster points at /thumbs/<id>. build batch157. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
# Node 24 ships node:sqlite as a stable built-in (no flag), which db.js relies on.
|
||||
FROM node:24-alpine
|
||||
|
||||
# ffmpeg: server-side video poster thumbnails (see static.js /thumbs/<id>). Small on Alpine.
|
||||
RUN apk add --no-cache ffmpeg
|
||||
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app/server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user