Giter Site home page Giter Site logo

yigithanyucedag / react-ambient-player Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 1.22 MB

Video player backlight changing according to video content

Home Page: https://www.npmjs.com/package/react-ambient-player

TypeScript 94.10% CSS 5.90%
ambient backlight player react video youtube

react-ambient-player's Introduction

React Ambient Player

npm version npm downloads

Screenshot

Video player backlight changing according to video content

Installation

npm install react-ambient-player

Usage

import React from "react";
import AmbientPlayer from "react-ambient-player";

const App = () => {
  return (
    <AmbientPlayer
      videoProps={{
        width: 640,
        height: 360,
      }}
      sources={[
        {
          src: "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",
          type: "video/webm",
        },
        {
          src: "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
          type: "video/mp4",
        },
      ]}
    />
  );
};

export default App;

Props

Name Type Default Description
sources Array<{ src: string; type: string; }> undefined Array of sources to be used by the video element.
interval number 5000 Frame extraction interval in milliseconds.
videoProps VideoHTMLAttributes<HTMLVideoElement> undefined Props to be passed to the video element.

License

MIT

Author

yigithanyucedag
Yiğithan

react-ambient-player's People

Contributors

yigithanyucedag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-ambient-player's Issues

Global CSS cannot be imported from within node_modules.

The Global CSS import are deprecated.

this is the error:

(node:2596) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use node --trace-deprecation ... to show where the warning was created)
error - ./node_modules/react-ambient-player/style.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-ambient-player/AmbientPlayer.js
Import trace for requested module:
./node_modules/react-ambient-player/style.css
./node_modules/react-ambient-player/AmbientPlayer.js
./node_modules/react-ambient-player/index.js
wait - compiling /_error (client and server)...
error - ./node_modules/react-ambient-player/style.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-ambient-player/AmbientPlayer.js

Import trace for requested module:
./node_modules/react-ambient-player/style.css
./node_modules/react-ambient-player/AmbientPlayer.js
./node_modules/react-ambient-player/index.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.