minor fixes

This commit is contained in:
Ren Amamiya
2023-04-29 09:25:33 +07:00
parent a1385f87dc
commit be8b40c86d
10 changed files with 70 additions and 66 deletions
+5 -2
View File
@@ -1,8 +1,11 @@
import { MediaOutlet, MediaPlayer } from '@vidstack/react';
export default function VideoPreview({ url }: { url: string }) {
export default function VideoPreview({ url, size }: { url: string; size: string }) {
return (
<div onClick={(e) => e.stopPropagation()} className="relative mt-2 flex flex-col overflow-hidden rounded-lg">
<div
onClick={(e) => e.stopPropagation()}
className={`relative mt-2 flex flex-col overflow-hidden rounded-lg ${size === 'large' ? 'w-4/5' : 'w-2/3'}`}
>
<MediaPlayer src={url} poster="" controls>
<MediaOutlet />
</MediaPlayer>