use-media-recorder

    2.0.4 • 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

    43

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    15.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • jagonzalr