# redux-player

> Redux player

Latest version **0.0.3** (published 2016-11-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install redux-player
pnpm add redux-player
yarn add redux-player
bun add redux-player
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-11-02 |
| First published | 2016-10-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^6.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Xiaofan Wu |
| Maintainers | xiaofan2406 |
| Keywords | redux, redux-player, react, babel, webpack, eslint |

## Links

- npm: https://www.npmjs.com/package/redux-player
- Repository: https://github.com/xiaofan2406/redux-player
- Homepage: https://github.com/xiaofan2406/redux-player#readme
- Issues: https://github.com/xiaofan2406/redux-player/issues
- npm.io page: https://npm.io/package/redux-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

- 0.0.3 (latest) — 2016-11-02
- 0.0.2 — 2016-10-30
- 0.0.1 — 2016-10-30

## README

### Redux Player
 [![dependencies Status](https://david-dm.org/xiaofan2406/redux-player/status.svg)](https://david-dm.org/xiaofan2406/redux-player) [![devDependencies Status](https://david-dm.org/xiaofan2406/redux-player/dev-status.svg)](https://david-dm.org/xiaofan2406/redux-player?type=dev)


### Usage

```
npm i -S redux-player
```

```js
import { reducer as reduxPlayerReducer } from 'redux-player';


export default combineReducers({
  reduxPlayer: reduxPlayerReducer
});

```


### Actions
```js
import { actions } from 'redux-player';
or
import { setFrames } from 'redux-player/actions';

```

- `setFrames(frames)`:
  Initialize the play with an array of frames

  ```
  frames: [
    {
      action: Function, Async function,
      ...
    }
  ]
  ```

- `toggleShuffle()`:
  Toggle shuffle

- `toggleLoop()`:
  Toggle loop

- `next()`:
  Go to next frame

- `previous()`:
  Go to previous frame

- `play()`:
  Start playing all frames

- `stop()`:
  Reset play status
  

### Selectors
- `getFrames(state)`: get the list of frames

- `getCurrentFrame(state)`: get the current frame, which is going to be played next

- `getCurrent(state)`: get the index of the current frame

- `getIsLooping(state)`: get the looping status

- `getIsShuffle(state)`: get the shuffle status

- `getCanNext(state)`: get if can trigger action `next()`

- `getCanPrevious(state)`: get if can trigger action `previous()`

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