Skip to content

theonlyducks/videojs-ambilight

Repository files navigation

Video.js AmbiLight

Simple plugin ambilight effect in video.js player

Preview

Table of contents

Documentation

Getting started

Requirements

  • With npm npm install video.js
  • With yarn yarn add video.js

Installation

  • With npm npm install @theonlyducks/videojs-ambilight@latest
  • With yarn yarn add @theonlyducks/videojs-ambilight@latest

Usage

import '@theonlyducks/videojs-ambilight/styles';
import '@theonlyducks/videojs-ambilight';

Example

const video = videojs('my-video');
video.ambiLightPlugin();

Options

Example:

video.ambiLightPlugin({
	fps: 60,
	blur: 80,
	scale: 1.1,
	opacity: .9,
	saturate: 200
});
  • fps frames per second to change the border color. default 15
    • min: 15
    • max: 120
  • blur px amount of edge blur. default 50
    • min: 10
    • max: 100
  • scale image scale size. default 1
    • min: 1
    • max: 1.9
  • opacity amount that will be visible from the edge. default 1
    • min: 0
    • max: 1
  • saturate quantity in percentage of how much saturation the edge will have. default 200

Development

Install

yarn

Start server listening http://localhost:3000

yarn start

License

MIT © The Only Ducks

About

Simple plugin ambilight effect in video.js player

Resources

License

Stars

Watchers

Forks

Packages

No packages published