From 4486c74dd9f4f69c5cb733f06d0ee1b25aca416e Mon Sep 17 00:00:00 2001 From: jedarden Date: Fri, 8 May 2026 10:50:41 -0400 Subject: [PATCH] phase-8: implement 5 social media format presets for clip maker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update clip maker to match Phase 8 plan specifications: - Landscape: 1920×1080 (16:9) MP4 - YouTube, Twitter, Discord - Square: 1080×1080 (1:1) MP4 - Twitter, Instagram feed - Portrait: 1080×1920 (9:16) MP4 - TikTok, YouTube Shorts, IG Stories - GIF (compact): 640×360 (16:9) GIF - Discord embeds, forums - GIF (square): 480×480 (1:1) GIF - Twitter, Slack Each preset now has a fixed format (MP4 or GIF) matching the plan's specification, with export button dynamically updating to show the correct format type. Co-Authored-By: Claude Opus 4.7 --- .needle-predispatch-sha | 2 +- web/src/pages/clip-maker.ts | 60 ++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/.needle-predispatch-sha b/.needle-predispatch-sha index 0b4f85c..6e91a11 100644 --- a/.needle-predispatch-sha +++ b/.needle-predispatch-sha @@ -1 +1 @@ -f0639a6e36c5252bf95380dc6c6117d389f6eaae +524c02488fffe468318df33d8886a1b77511a31b diff --git a/web/src/pages/clip-maker.ts b/web/src/pages/clip-maker.ts index 574c1f7..5caab41 100644 --- a/web/src/pages/clip-maker.ts +++ b/web/src/pages/clip-maker.ts @@ -12,14 +12,16 @@ interface SocialPreset { height: number; ratio: string; icon: string; + format: 'mp4' | 'gif'; + target: string; } const SOCIAL_PRESETS: SocialPreset[] = [ - { name: 'Twitter / X', width: 1280, height: 720, ratio: '16:9', icon: '𝕏' }, - { name: 'Instagram Square', width: 1080, height: 1080, ratio: '1:1', icon: '▣' }, - { name: 'Instagram Story', width: 1080, height: 1920, ratio: '9:16', icon: '◱' }, - { name: 'TikTok / Reels', width: 1080, height: 1920, ratio: '9:16', icon: '▶' }, - { name: 'YouTube Shorts', width: 1080, height: 1920, ratio: '9:16', icon: '▷' }, + { name: 'Landscape', width: 1920, height: 1080, ratio: '16:9', icon: '🖥️', format: 'mp4', target: 'YouTube, Twitter, Discord' }, + { name: 'Square', width: 1080, height: 1080, ratio: '1:1', icon: '⬜', format: 'mp4', target: 'Twitter, Instagram feed' }, + { name: 'Portrait', width: 1080, height: 1920, ratio: '9:16', icon: '📱', format: 'mp4', target: 'TikTok, YouTube Shorts, IG Stories' }, + { name: 'GIF (compact)', width: 640, height: 360, ratio: '16:9', icon: '🎞️', format: 'gif', target: 'Discord embeds, forums' }, + { name: 'GIF (square)', width: 480, height: 480, ratio: '1:1', icon: '🖼️', format: 'gif', target: 'Twitter, Slack' }, ]; // Preview scale: limit longest side to 360px @@ -39,13 +41,13 @@ export function renderClipMakerPage(_params: Record): void { function buildHTML(): string { const presetOptions = SOCIAL_PRESETS.map((p, i) => - ``, + ``, ).join(''); return `

Clip Maker

-

Export replay highlights as MP4 or animated GIF, sized for social media.

+

Export replay highlights as MP4 or animated GIF with 5 social media format presets.

@@ -69,6 +71,7 @@ function buildHTML(): string { ${presetOptions}
+