Simple plugin ambilight effect in video.js player
- With npm
npm install video.js
- With yarn
yarn add video.js
- With npm
npm install @theonlyducks/videojs-ambilight@latest
- With yarn
yarn add @theonlyducks/videojs-ambilight@latest
import '@theonlyducks/videojs-ambilight/styles';
import '@theonlyducks/videojs-ambilight';
const video = videojs('my-video');
video.ambiLightPlugin();
Example:
video.ambiLightPlugin({
fps: 60,
blur: 80,
scale: 1.1,
opacity: .9,
saturate: 200
});
fps
frames per second to change the border color. default15
- min: 15
- max: 120
blur
px amount of edge blur. default50
- min: 10
- max: 100
scale
image scale size. default1
- min: 1
- max: 1.9
opacity
amount that will be visible from the edge. default1
- min: 0
- max: 1
saturate
quantity in percentage of how much saturation the edge will have. default200
Install
yarn
Start server listening http://localhost:3000
yarn start