Closed VityaSchel closed 2 years ago
I contacted them and they said it hasn't been added yet. Here's a very simple version I wrote for myself using some of their libraries:
type IKVideoProps = { path: string; t: Transformation; }; function IKVideo({ path, t }: IKVideoProps) { const ikClient = useMemo(() => { return new ImageKit({ urlEndpoint: ImageKitEndpoint, transformationPosition: "query", }); }, []); const videoURL = ikClient.url({ path, transformation: [t], }); return ( <video controls width={t.width} height={t.height}> <source src={videoURL} type="video/mp4" /> </video> ); }
Added in version 2.0.0 - https://github.com/imagekit-developer/imagekit-react#video-resizing
I contacted them and they said it hasn't been added yet. Here's a very simple version I wrote for myself using some of their libraries: