summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/timeline.tsx
diff options
context:
space:
mode:
authorcreotove <creotove@gmail.com>2025-06-25 15:29:20 +0530
committercreotove <creotove@gmail.com>2025-06-25 15:29:20 +0530
commit7f0bcea4ca91eccb9e35f25804a4f6feed8c4e11 (patch)
tree18a2132f42be7a3d852b56d0397d7e64ff4bc225 /apps/web/src/components/editor/timeline.tsx
parent3989da93c379e319c02d47bac093e6c933e5adfe (diff)
downloadopencut-7f0bcea4ca91eccb9e35f25804a4f6feed8c4e11.tar.gz
Feat: basic audio waveform added.
Diffstat (limited to 'apps/web/src/components/editor/timeline.tsx')
-rw-r--r--apps/web/src/components/editor/timeline.tsx17
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx
index ce0ffa30..cc7d7f3a 100644
--- a/apps/web/src/components/editor/timeline.tsx
+++ b/apps/web/src/components/editor/timeline.tsx
@@ -35,6 +35,7 @@ import {
SelectTrigger,
SelectValue,
} from "../ui/select";
+import AudioWaveform from "./audio-waveform";
export function Timeline() {
// Timeline shows all tracks (video, audio, effects) and their clips.
@@ -1626,7 +1627,21 @@ function TimelineTrackContent({
);
}
- // Fallback for audio or videos without thumbnails
+ if (mediaItem.type === "audio") {
+ return (
+ <div className="w-full h-full flex items-center gap-2">
+ <div className="flex-1 min-w-0">
+ <AudioWaveform
+ audioUrl={mediaItem.url}
+ height={24}
+ className="w-full"
+ />
+ </div>
+ </div>
+ );
+ }
+
+ // Fallback for videos without thumbnails
return (
<span className="text-xs text-foreground/80 truncate">{clip.name}</span>
);