[go: nahoru, domu]

Skip to content

rockstarcoder333/React-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-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-recorder
# or
yarn add react-recorder

Usage

import React, { Component } from 'react'

import Recorder from 'react-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)
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published