1.0.4 • Published 3 years ago

responsive-video-iframe v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Responsive video iframe

ResponsiveVideoIframe is a React component to create a responsive viedo iframe, preserving the aspect ratio (16:9).

npm GitHub last commit MIT License

Live Demo

Install

Recommended: get ResponsiveVideoIframe from npm:

npm install responsive-video-iframe --save
# or
yarn add responsive-video-iframe

Usage

Then you're ready to start making your document:

import { ResponsiveVideoIframe } from "responsive-video-iframe";

<ResponsiveVideoIframe url="https://www.youtube.com/embed/WSLMN6g_Od4" />

Props

Props you may want to specify include:

  • url - url of the video
  • allowfullscreen - default true
  • title - title of the iframe

License

MIT Licensed. Copyright (c) elBotija 2021.