This is a react library for a video inside of a modal
npm install @baskvava/react-video-modal
or
yarn add @baskvava/react-video-modal
import React, { useState } from "react";
import { ModalVideo, useToggle } from "@baskvava/react-video-modal";
function App() {
const { isOpen, toggle, close } = useToggle();
return (
<div className="App">
<button onClick={toggle}>Open Video Modal</button>
<ModalVideo
title="video"
header="Fixed width Video"
width={800}
isOpen={isOpen}
onClosed={close}
url="https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
/>
</div>
);
}
export default App;
install the node package
yarn install
run example
yarn dev