fix 231
This commit is contained in:
@@ -1040,7 +1040,7 @@ export default function VideoEditor() {
|
||||
|
||||
if (saveResult.canceled) {
|
||||
toast.info("Export canceled");
|
||||
} else if (saveResult.success) {
|
||||
} else if (saveResult.success && saveResult.path) {
|
||||
handleExportSaved("GIF", saveResult.path);
|
||||
} else {
|
||||
setExportError(saveResult.message || "Failed to save GIF");
|
||||
@@ -1167,7 +1167,7 @@ export default function VideoEditor() {
|
||||
|
||||
if (saveResult.canceled) {
|
||||
toast.info("Export canceled");
|
||||
} else if (saveResult.success) {
|
||||
} else if (saveResult.success && saveResult.path) {
|
||||
handleExportSaved("Video", saveResult.path);
|
||||
} else {
|
||||
setExportError(saveResult.message || "Failed to save video");
|
||||
@@ -1232,11 +1232,16 @@ export default function VideoEditor() {
|
||||
// Build export settings from current state
|
||||
const sourceWidth = video.videoWidth || 1920;
|
||||
const sourceHeight = video.videoHeight || 1080;
|
||||
const aspectRatioValue =
|
||||
aspectRatio === "native"
|
||||
? getNativeAspectRatioValue(sourceWidth, sourceHeight, cropRegion)
|
||||
: getAspectRatioValue(aspectRatio);
|
||||
const gifDimensions = calculateOutputDimensions(
|
||||
sourceWidth,
|
||||
sourceHeight,
|
||||
gifSizePreset,
|
||||
GIF_SIZE_PRESETS,
|
||||
aspectRatioValue,
|
||||
);
|
||||
|
||||
const settings: ExportSettings = {
|
||||
@@ -1260,7 +1265,17 @@ export default function VideoEditor() {
|
||||
|
||||
// Start export immediately
|
||||
handleExport(settings);
|
||||
}, [videoPath, exportFormat, exportQuality, gifFrameRate, gifLoop, gifSizePreset, handleExport]);
|
||||
}, [
|
||||
videoPath,
|
||||
exportFormat,
|
||||
exportQuality,
|
||||
gifFrameRate,
|
||||
gifLoop,
|
||||
gifSizePreset,
|
||||
aspectRatio,
|
||||
cropRegion,
|
||||
handleExport,
|
||||
]);
|
||||
|
||||
const handleCancelExport = useCallback(() => {
|
||||
if (exporterRef.current) {
|
||||
@@ -1475,6 +1490,13 @@ export default function VideoEditor() {
|
||||
videoPlaybackRef.current?.video?.videoHeight || 1080,
|
||||
gifSizePreset,
|
||||
GIF_SIZE_PRESETS,
|
||||
aspectRatio === "native"
|
||||
? getNativeAspectRatioValue(
|
||||
videoPlaybackRef.current?.video?.videoWidth || 1920,
|
||||
videoPlaybackRef.current?.video?.videoHeight || 1080,
|
||||
cropRegion,
|
||||
)
|
||||
: getAspectRatioValue(aspectRatio),
|
||||
)}
|
||||
onExport={handleOpenExportDialog}
|
||||
selectedAnnotationId={selectedAnnotationId}
|
||||
|
||||
Reference in New Issue
Block a user