feat(refboard): server-generated video posters via ffmpeg
Upload pipeline now extracts poster frame (JPEG) and metadata (width, height, duration) from videos at upload time using ffmpeg. Server: - Add ffmpeg to Docker image (Alpine) - video-utils.js: probeVideo() and extractPoster() using ffprobe/ffmpeg - Upload response includes poster_asset_key and duration Frontend: - VideoObject gains poster and duration fields in scene format - VideoSprite accepts posterAssetKey + TextureManager, loads poster as a regular image texture on construction (no <video> needed) - Server poster loaded/released via TextureManager ref counting - addVideoFromUpload passes poster and duration through to scene data - image-drop.ts forwards poster_asset_key from upload response Result: videos with server posters render as images by default. Zero <video> elements needed for thumbnails. Only explicit play creates a media element.
This commit is contained in:
@@ -55,7 +55,9 @@ function handleUploadResult(
|
||||
}
|
||||
|
||||
if (mediaType === 'video' && assetKey) {
|
||||
sceneManager.addVideoFromUpload(assetKey, finalW, finalH, x, y);
|
||||
const posterKey: string | undefined = imgData.poster_asset_key;
|
||||
const duration: number | undefined = imgData.duration;
|
||||
sceneManager.addVideoFromUpload(assetKey, finalW, finalH, x, y, posterKey, duration);
|
||||
} else if (assetKey) {
|
||||
sceneManager.addImageFromUpload(assetKey, finalW, finalH, x, y);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user