Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szastupov/raw-media-recorder
Record microphone audio to raw buffer
https://github.com/szastupov/raw-media-recorder
Last synced: 3 months ago
JSON representation
Record microphone audio to raw buffer
- Host: GitHub
- URL: https://github.com/szastupov/raw-media-recorder
- Owner: szastupov
- Created: 2017-10-19T20:22:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T13:49:41.000Z (about 7 years ago)
- Last Synced: 2024-10-09T23:05:51.083Z (3 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raw Media Recorder
Record audio from your microphone into AudioBuffer, useful when your browser (hi Safari 👋) doesn't support MediaRecorder or you don't want to decode from Opus.
## Install
``` yarn add raw-media-recorder ```or
``` npm install raw-media-recorder ```
## Usage
```javascript
let recorder = new RawMediaRecorder(new AudioContext())
recorder.onstart = () => {
// Indicate recording, for example
// this.setState({ recording: true })
}
recorder.onstop = () => {
// On recording stoped, for example
// this.setState({ recording: false })
}
recorder.ondata = data => {
// Data recorder as AudioBuffer
}// Start recording
recorder.start()// Stop recording
recorder.stop()
```