chore: remove all Remotion references from Electron main + UI
- Cleaned Electron main.ts: removed Remotion bundle path, compositor path, and predownloadBrowser() - Set BRADLY_SERVE_URL from Express port for headless rendering - Cleaned GlobalSettingsPanel: removed Remotion-specific frame capture code - Removed stale remotion:bundle script from package.json - Zero Remotion dependencies, imports, or functional code remain
This commit is contained in:
@@ -37,29 +37,16 @@ export const GlobalSettingsPanel: React.FC<GlobalSettingsPanelProps> = ({
|
||||
const player = playerRef?.current;
|
||||
if (!player) return;
|
||||
|
||||
// Find the remotion-player container and grab its inner canvas/iframe
|
||||
const playerContainer = document.querySelector('[data-remotion-player]') ?? document.querySelector('.remotion-player');
|
||||
// Find the BradlyPlayer container and capture its content
|
||||
const playerContainer = document.querySelector('[data-bradly-player]');
|
||||
if (!playerContainer) {
|
||||
// Fallback: find the iframe or video element
|
||||
const iframe = document.querySelector('iframe');
|
||||
if (iframe) {
|
||||
// Can't capture cross-origin iframe, but for same-origin:
|
||||
try {
|
||||
const iframeDoc = iframe.contentDocument;
|
||||
if (iframeDoc) {
|
||||
const canvas = document.createElement('canvas');
|
||||
const body = iframeDoc.body;
|
||||
canvas.width = body.scrollWidth;
|
||||
canvas.height = body.scrollHeight;
|
||||
// This is a simplistic approach - Remotion doesn't expose easy screenshot
|
||||
}
|
||||
} catch { /* cross-origin */ }
|
||||
}
|
||||
// Fallback: use the render API endpoint
|
||||
alert('📸 Exportar frame: Usa el botón "Renderizar" con formato PNG para capturar frames.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Use html2canvas-like approach: create a temporary canvas from the player
|
||||
// For now, use a simple screenshot via the Remotion player's renderToCanvas
|
||||
alert('📸 Exportar frame: Esta función requiere @remotion/renderer para renderizar frames individuales. Próximamente disponible.');
|
||||
// TODO: Implement canvas-based screenshot from BradlyPlayer viewport
|
||||
alert('📸 Exportar frame: Usa el botón "Renderizar" con formato PNG para capturar frames.');
|
||||
}, [playerRef]);
|
||||
|
||||
const matchingPresets = EXPORT_PRESETS.filter(p => p.aspect === aspectRatio);
|
||||
|
||||
Reference in New Issue
Block a user