Files
lume/packages/ark/src/components/note/preview/video.tsx
2023-12-28 11:31:47 +07:00

20 lines
448 B
TypeScript

import { MediaPlayer, MediaProvider } from "@vidstack/react";
import {
DefaultVideoLayout,
defaultLayoutIcons,
} from "@vidstack/react/player/layouts/default";
export function VideoPreview({ url }: { url: string }) {
return (
<MediaPlayer
src={url}
className="w-full overflow-hidden rounded-lg"
aspectRatio="16/9"
load="visible"
>
<MediaProvider />
<DefaultVideoLayout icons={defaultLayoutIcons} />
</MediaPlayer>
);
}