Spaces:
Running
Running
File size: 1,111 Bytes
c5b101c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
"use client"
import { Player } from "react-tuby"
import "react-tuby/css/main.css"
import { cn } from "@/lib/utils"
import { VideoInfo } from "@/types"
export function CartesianVideoPlayer({
video,
enableShortcuts = true,
className = "",
// currentTime,
}: {
video: VideoInfo
enableShortcuts?: boolean
className?: string
// currentTime?: number
}) {
return (
<div className={cn(
`w-full`,
`flex flex-col items-center justify-center`,
`rounded-xl overflow-hidden`,
className
)}>
<div className={cn(
`w-[calc(100%+16px)]`,
`-ml-2 -mr-2`,
`flex flex-col items-center justify-center`,
)}>
<Player
// playerRef={ref}
src={[
{
quality: "Full HD",
url: video.assetUrl,
}
]}
keyboardShortcut={enableShortcuts}
subtitles={[]}
poster={
`https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/resolve/main/videos/${video.id}.webp`
}
/>
</div>
</div>
)
} |