feat: re-add trending column

This commit is contained in:
2024-03-30 10:50:45 +07:00
parent 7271e9ea87
commit 09aa2ecafc
3 changed files with 30 additions and 60 deletions

View File

@@ -1,30 +1,14 @@
import {
MediaControlBar,
MediaController,
MediaMuteButton,
MediaPlayButton,
MediaTimeDisplay,
MediaTimeRange,
} from "media-chrome/dist/react";
export function VideoPreview({ url }: { url: string }) {
return (
<div className="my-1">
<MediaController>
<video
slot="media"
src={url}
preload="auto"
muted
className="h-auto w-full"
/>
<MediaControlBar>
<MediaPlayButton />
<MediaTimeRange />
<MediaTimeDisplay />
<MediaMuteButton />
</MediaControlBar>
</MediaController>
<div className="my-1 overflow-hidden rounded-xl">
<video
className="h-auto w-full bg-neutral-100 text-sm dark:bg-neutral-900"
controls
muted
>
<source src={url} type="video/mp4" />
Your browser does not support the video tag.
</video>
</div>
);
}