Skip to content

Commit 3b7ce2f

Browse files
CrokoMediaclaude
andcommitted
fix: adicionar browserExecutable em selectComposition() do Remotion
PROBLEMA: - selectComposition() não estava recebendo browserExecutable - Apenas renderStill() e renderMedia() tinham a configuração - Railway pode falhar ao selecionar composition sem Chromium correto SOLUÇÃO: Adicionar ...renderOptions em todas as chamadas de selectComposition() ARQUIVOS CORRIGIDOS: - app/api/content/[id]/generate-slides-v3/route.ts - app/api/content/[id]/preview-carousel/route.ts - app/api/audits/[id]/generate-audit-video/route.ts - app/api/content/[id]/generate-reel/route.ts - app/api/content/[id]/generate-reels-batch/route.ts AGORA TODAS AS FUNÇÕES REMOTION RECEBEM browserExecutable: 1. selectComposition() - Corrigido 2. renderStill() - Já tinha (spread ...renderOptions) 3. renderMedia() - Já tinha (spread ...renderOptions) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 38a41b4 commit 3b7ce2f

5 files changed

Lines changed: 7 additions & 2 deletions

File tree

app/api/audits/[id]/generate-audit-video/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export async function POST(
148148
serveUrl: bundleLocation,
149149
id: 'AuditResult',
150150
inputProps,
151+
...renderOptions,
151152
})
152153

153154
console.log(

app/api/content/[id]/generate-reel/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ export async function POST(
569569
serveUrl: bundleLocation,
570570
id: formatConfig.compositionId,
571571
inputProps,
572+
...renderOptions,
572573
})
573574

574575
console.log(

app/api/content/[id]/generate-reels-batch/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ async function renderSingleReel(
358358
serveUrl: bundleLocation,
359359
id: formatConfig.compositionId,
360360
inputProps,
361+
...renderOptions,
361362
})
362363

363364
console.log(

app/api/content/[id]/generate-slides-v3/route.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ export async function POST(
117117
const { renderStill, selectComposition } = require('@remotion/renderer')
118118

119119
// 3. Helper function para selectComposition
120-
const getStillComposition = async (loc: string, compId: string, props: Record<string, unknown>) => {
120+
const getStillComposition = async (loc: string, compId: string, props: Record<string, unknown>, options: Record<string, unknown>) => {
121121
return selectComposition({
122122
serveUrl: loc,
123123
id: compId,
124124
inputProps: props,
125+
...options,
125126
})
126127
}
127128

@@ -304,7 +305,7 @@ export async function POST(
304305
}
305306

306307
console.log(` 🎬 [V3] Selecionando composition: ${formatConfig.compositionId}`)
307-
const composition = await getStillComposition(bundleLocation, formatConfig.compositionId, stillInputProps)
308+
const composition = await getStillComposition(bundleLocation, formatConfig.compositionId, stillInputProps, renderOptions)
308309
console.log(` ✅ [V3] Composition selecionada`)
309310

310311
console.log(` 🎥 [V3] Iniciando renderStill...`)

app/api/content/[id]/preview-carousel/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export async function GET(
155155
serveUrl: bundleLocation,
156156
id: compositionId,
157157
inputProps,
158+
...renderOptions,
158159
})
159160

160161
await renderStill({

0 commit comments

Comments
 (0)