0.4.0 • Published 4 years ago

@berlitz/record-button v0.4.0

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

RecordButton npm version

The record button will record audio from the users microphone and stores the audio blob. This component comes in 4 states readyToRecord, recording, readyToPlay and playing which is triggered each time the button is clicked with a smooth transition between each state.

There is also a reset/retry button to allow the user to redo the recording which will only visible after a recording.

For easier translations this component has several text props for each string used and the onRecordComplete prop is a callback function to retrieve the audio blob after the recording.

Installation

yarn add @berlitz/record-button

Props

ArgumentTypeRequiredDefault
onRecordCompletefunction() => {}
onStartRecordingfunction() => {}
onStopRecordingfunction() => {}
playingTextstringStop Listening
readyToPlayTextstringPlay Audio
readyToRecordTextstringStart Recording
recordingTextstringStop Recording
retryTextstringRetry
timeLimitMsnumber

Usage

import RecordButton from '@berlitz/record-button'
const MyApp = () => <RecordButton />
0.4.0

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

5 years ago

0.2.2

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago