Miss any of our Open RFC calls?Watch the recordings here! »

use-media-recorder

2.0.3 • Public • Published

npm version

useMediaRecorder

MediaRecorder API using React hooks.

Table of Contents

Getting started

npm install --save use-media-recorder

  • Supports both video + audio and audio only recordings.
  • Currently it generates video/webm and audio/webm.

Usage

Video and audio

import { useMediaRecorder } from 'use-media-recorder'
const [isRecording, setIsRecording] = useState(false)
const [setCaptureRef, data, err] = useMediaRecorder({ isRecording })

Audio only

import { useMediaRecorder } from 'use-media-recorder'
const [isRecording, setIsRecording] = useState(false)
const [setCaptureRef, data, err] = useMediaRecorder({ isRecording, audioOnly: true })

Full example can be found here

Demo

git clone git@github.com:jagonzalr/useMediaRecorder.git
cd useMediaRecorder
npm intall
npm start

License

useMediaRecorder is MIT licensed.

Install

npm i use-media-recorder

DownloadsWeekly Downloads

33

Version

2.0.3

License

MIT

Unpacked Size

16.2 kB

Total Files

4

Last publish

Collaborators

  • avatar