# react-ambient-player

> Video player backlight changing according to video content

Latest version **1.0.2** (published 2022-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-ambient-player
pnpm add react-ambient-player
yarn add react-ambient-player
bun add react-ambient-player
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-11-08 |
| First published | 2022-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 561.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Yiğithan Yücedağ |
| Maintainers | yigithanyucedag |
| Keywords | react, ambient, player, video, backlight |

## Links

- npm: https://www.npmjs.com/package/react-ambient-player
- Repository: https://github.com/yigithanyucedag/react-ambient-player
- Homepage: https://github.com/yigithanyucedag/react-ambient-player#readme
- Issues: https://github.com/yigithanyucedag/react-ambient-player/issues
- npm.io page: https://npm.io/package/react-ambient-player

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-11-08
- 1.0.1 — 2022-11-08
- 1.0.0 — 2022-11-08

## README

# React Ambient Player

[![npm version](https://img.shields.io/npm/v/react-ambient-player.svg?style=flat-square)](https://www.npmjs.com/package/react-ambient-player)
[![npm downloads](https://img.shields.io/npm/dm/react-ambient-player.svg?style=flat-square)](https://www.npmjs.com/package/react-ambient-player)

![Screenshot](docs/preview.png)

Video player backlight changing according to video content

## Installation

```
npm install react-ambient-player
```

## Usage

```jsx
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

<table>
<tr>
    <td align="center">
        <a href="https://github.com/yigithanyucedag">
            <img src="https://avatars.githubusercontent.com/u/25598773?v=4" width="100;" alt="yigithanyucedag"/>
            <br />
            <sub><b>Yiğithan</b></sub>
        </a>
    </td></tr>
</table>

---
_Source: https://npm.io/package/react-ambient-player · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
