The open-source CapCut alternative
fix: ts error causing audio waveform signal issue
Maze Winther8bbb41a3cb76
diff --git a/apps/web/src/hooks/use-aspect-ratio.ts b/apps/web/src/hooks/use-aspect-ratio.tsindex e3e85141..4bc7cfd5 100644--- a/apps/web/src/hooks/use-aspect-ratio.ts+++ b/apps/web/src/hooks/use-aspect-ratio.ts@@ -1,12 +1,17 @@import { useEditorStore } from "@/stores/editor-store";import { useMediaStore, getMediaAspectRatio } from "@/stores/media-store";import { useTimelineStore } from "@/stores/timeline-store";+import { useProjectStore } from "@/stores/project-store";export function useAspectRatio() {- const { canvasSize, canvasMode, canvasPresets } = useEditorStore();+ const { canvasPresets } = useEditorStore();+ const { activeProject } = useProjectStore();const { mediaItems } = useMediaStore();const { tracks } = useTimelineStore();+ const canvasSize = activeProject?.canvasSize || { width: 1920, height: 1080 };+ const canvasMode = activeProject?.canvasMode || "preset";+// Find the current preset based on canvas sizeconst currentPreset = canvasPresets.find((preset) =>