Update
This commit is contained in:
@@ -5,6 +5,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
// Import centralized font management
|
||||
import { getFontStyle, loadTimelineFonts, WATERMARK_CONFIG } from '@/modules/editor/fonts';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
const useVideoExport = ({ timelineElements, dimensions, totalDuration, watermarked = false }) => {
|
||||
const [showConsoleLogs] = useState(true);
|
||||
@@ -542,7 +543,7 @@ const useVideoExport = ({ timelineElements, dimensions, totalDuration, watermark
|
||||
setExportStatus('Starting export...');
|
||||
|
||||
try {
|
||||
setExportStatus('Loading FFmpeg...');
|
||||
setExportStatus('Setting up...');
|
||||
|
||||
const ffmpeg = new FFmpeg();
|
||||
|
||||
@@ -710,7 +711,10 @@ const useVideoExport = ({ timelineElements, dimensions, totalDuration, watermark
|
||||
path: error.path,
|
||||
error: error,
|
||||
});
|
||||
setExportStatus(`Failed: ${error.message}`);
|
||||
|
||||
setExportStatus('Export failed.');
|
||||
|
||||
toast.error('Export failed. Please try again! If the problem persists, please contact us.');
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
setIsExporting(false);
|
||||
|
||||
Reference in New Issue
Block a user