Spaces:
Paused
Paused
File size: 733 Bytes
c90a662 8f24b44 c90a662 8f24b44 c90a662 b9ae471 c90a662 2f34958 c90a662 |
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 |
"use client"
import { Video } from "@/app/types"
export const VideoPlayer = ({ video }: { video?: Video }) => {
if (typeof video === "undefined") {
return <div className="flex w-full h-screen items-center justify-center text-center">
<div>No video to display</div>
</div>
}
return (
<div className="w-full py-8 px-2">
<video
src={`${
process.env.NEXT_PUBLIC_DOWNLOAD_URL
}/${
video.ownerId
}/${
video.id
}.mp4?progress=${
video.progressPercent
}`}
muted
autoPlay
loop
controls
className="w-full rounded-md overflow-hidden"
/>
</div>
)
} |