Redux actions and bindings for react-recorder
npm install react-recorder-reduxnpm install react-recorder-redux
This library provides Redux actions and bindings for the react-recorder library. The library provides a Recorder container component that can interact with the reducer provided.
You can see the Recorder in action here. Check out the source code here.
In your root reducer:
``js
import { combineReducers } from 'redux'
import { recorderReducer as recorder } from 'react-recorder-redux'
export default combineReducers({ recorder })
`
In your view components:
`js
import React from 'react'
import { Recorder } from 'react-recorder-redux'
export default () => (
Hello world.
Redux Store
The reducer provided attaches a single object to the main store object via the
recorder property. This object is reset when the Recorder unmounts. This object has the following properties:$3
Boolean. Whether the recorder is actively recording.
$3
String. Possible values are
['start', 'stop', 'pause', 'resume', 'none'] The most recent method called on the recorder. When the command updates, the corresponding method is called.$3
Object. The current stream object obtained by
getUserMedia.$3
Array. An array which contains
Blob objects corresponding to all the recordings made. When a new recording is made, it is appended to the end of the array.Action Creators
All actions can be imported by
import { actionName } from 'react-recorder-redux/actions', where actionName` is the action you wish to import.Starts the recording. Takes no arguments.
Stops the recording. Takes no arguments.
Pauses the recording. Takes no arguments.
Resumes the recording. Takes no arguments.