Merge pull request #97 from creotove/Feat/audio-waveform

Feat: basic audio waveform added.
This commit is contained in:
iza
2025-06-25 16:01:34 +03:00
committed by GitHub
4 changed files with 136 additions and 2 deletions

View File

@ -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>
);