mirror of
https://github.com/lumehq/lume.git
synced 2025-10-10 02:02:40 +02:00
20 lines
448 B
TypeScript
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>
|
|
);
|
|
}
|