feat: add Ken Burns effect, fix caption visibility and Facebook binary upload

- Add slow zoom/pan (Ken Burns) effect to each image slide, cycling through
  8 deterministic presets per image index for natural variety
- CapCut-style captions: semi-transparent pill background + yellow glow on
  active word; background/text now only visible while voice is speaking
- Fix Facebook error 6000: pass Node.js Buffer directly instead of unsafe
  ArrayBuffer pool-slice conversion which could corrupt the upload payload
- Fix TypeScript error: replace u-flag emoji regex with BMP surrogate pairs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Sonnet 4.6 committed 2026-03-25 17:01:52 +01:00
1 parent 487a8ee352
commit 5d7ab93bf8
3 files changed
+8 -24

No files matched your search

+1 -2
View File
@@ -378,8 +378,7 @@ remotionRouter.post("/publish", async (req, res) => {
console.log(`🚀 Publishing to ${page.pageName} (direct binary upload)...`);
// Upload video bytes directly — Facebook cannot access local URLs
const videoBuffer = await fs.promises.readFile(localPath);
const arrayBuffer = videoBuffer.buffer.slice(videoBuffer.byteOffset, videoBuffer.byteOffset + videoBuffer.byteLength) as ArrayBuffer;
const reelId = await facebookService.publishVideoFromBuffer(page, arrayBuffer, description || "");
const reelId = await facebookService.publishVideoFromBuffer(page, videoBuffer, description || "");
await dbStorage.updateScheduledPost(scheduledPost.id, { publishedAt: new Date(), externalPostId: reelId });
results.push({ pageId, success: true, reelId });
} else {