Files
lume/packages/ark/src/components/note/preview/video.tsx
T
2023-12-31 20:53:51 +07:00

20 lines
453 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 my-1 overflow-hidden rounded-lg"
aspectRatio="16/9"
load="visible"
>
<MediaProvider />
<DefaultVideoLayout icons={defaultLayoutIcons} />
</MediaPlayer>
);
}