Simple embed responsive video(YouTube, Vimeo, Daily Motion, Coub) overlay module.
npm install iframe-video-overlaySimple embed responsive video(YouTube, Vimeo, Daily Motion, Coub) overlay module.
Example
https://codepen.io/mickyholbrook/pen/yLYvNEr
------
Installation
npm
npm i iframe-video-overlay
Load the required JS to your entry JS file:
let IFrameVideoOverlay = require('iframe-video-overlay');
or
import IFrameVideoOverlay from 'iframe-video-overlay';
Load the required stylesheet to your entry CSS file:
@import "node_modules/iframe-video-overlay/index";
Cloning git repository
1. Go to your project directory
2. git clone https://github.com/dmitriyakkerman/iframe-video-overlay.git .
Put the required stylesheet link in HEAD tag:
Put the script at the bottom of your markup:
------
Usage
Create root element, specify video ID inside "data-id" attribute.
el
type
youtube
imageSrc
false
playButton
playButton.iconSrc, playButton.width, playButton.height and playButton.percentage options.
playButton.iconSrc
playButton.width
playButton.percentage or 10% of root element
playButton.height
playButton.percentage or 10% of root element
playButton.percentage