Neolithic Populous Metropolis
Have ideas to improve npm?Join in the discussion! »

react-mp3-recorder

1.1.2 • Public • Published

react-mp3-recorder (demo)

Simple microphone recorder for React that captures mp3 audio.

NPM JavaScript Style Guide

Demo

Intro

This module exports a simple recording button for React which uses the wasm-optimized vmsg library under the hood to record and encode an MP3 directly from the microphone.

Capturing MP3 audio is much more efficient and practical than using the MediaStream recording API directly.

Install

npm install --save react-mp3-recorder
# or 
yarn add react-mp3-recorder

Usage

import React, { Component } from 'react'
 
import Recorder from 'react-mp3-recorder'
 
export default class App extends Component {
  render () {
    return (
      <Recorder
        onRecordingComplete={this._onRecordingComplete}
        onRecordingError={this._onRecordingError}
      />
    )
  }
 
  _onRecordingComplete = (blob) => {
    console.log('recording', blob)
  }
 
  _onRecordingError = (err) => {
    console.log('recording error', err)
  }
}

License

This module was bootstrapped with create-react-library.

Keywords

none

Install

npm i react-mp3-recorder

DownloadsWeekly Downloads

131

Version

1.1.2

License

MIT

Unpacked Size

633 kB

Total Files

7

Last publish

Collaborators

  • avatar