@vitrin/web-video-player
v0.2.0
Published
Downloads
3
Readme
Vitrine Video Player Component
A React component for playing mobile-friendly videos, with a story-like timeline for easier navigation through the video. Check out a sample. This component is used on Vitrine's web client.
npm i @vitrin/web-video-player
import { Video } from '@vitrin/web-video-player'
import '@vitrin/web-video-player/styles'
// ...
export const MyApp = () => (
// ...
<Video url='https://my.cdn/some-video-url'
timeline={[{ t: 1.2 }, { t: 3.5 }]} />
// ...
)
You need to have React 17+ installed, ideally with a bundler handling css files. If not, you can link the stylesheets directly from
node_modules/@vitrin/web-video-player/dist/index.css
.
Contribution
npm start # --> runs the preview of the component
npm run build # --> builds the component for production
npm test # --> runs the tests
npm run coverage # --> runs the tests and reports the coverage