diff options
| author | iza <59828082+izadoesdev@users.noreply.github.com> | 2025-06-25 16:01:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-25 16:01:34 +0300 |
| commit | 2326faf52627622f28129c0371aba9df464594c3 (patch) | |
| tree | 443c2ab42af8154794456efbcfb84167b4db7d0f /apps/web/src/components/editor/timeline.tsx | |
| parent | 9ba57d86b60140e251e94c8fce955376bee6c5b1 (diff) | |
| parent | 7f0bcea4ca91eccb9e35f25804a4f6feed8c4e11 (diff) | |
| download | opencut-2326faf52627622f28129c0371aba9df464594c3.tar.gz | |
Merge pull request #97 from creotove/Feat/audio-waveform
Feat: basic audio waveform added.
Diffstat (limited to 'apps/web/src/components/editor/timeline.tsx')
| -rw-r--r-- | apps/web/src/components/editor/timeline.tsx | 17 |
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 f84a1863..c1b8f3e8 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.
@@ -1628,7 +1629,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>
);
|
