@react-native-aviation/recorder
v0.5.3
Published
Audio recording for Aviation — durable capture with optional zero-allocation PCM access
Maintainers
Readme
@react-native-aviation/recorder
Microphone recording for Aviation: start/stop/pause/resume, zero-copy frame access via a worklet, peaks, crash-recovery of pending recordings.
Requires core
This package has no JS import of @react-native-aviation/core, but it
ships native code that links against the core pod/framework — the
peerDependency on core is real and load-bearing:
yarn add @react-native-aviation/core react-native-nitro-modules
yarn add @react-native-aviation/recorder
cd ios && pod installInstalling the recorder without core will compile nothing useful: the iOS
pod declares s.dependency 'Aviation' and the Android module links
project(":react-native-aviation").
Usage
import { createRecorder } from '@react-native-aviation/recorder';
const recorder = createRecorder();
const unsubscribe = recorder.onEvent((event) => {
// level, capturelost, …
});
await recorder.start({ destination: `${path}/take1.aac` });
// …
const recording = await recorder.stop();Starting a recording pauses every playing aviation player (capture competes
for the microphone); on stop, players resume only if their interruption mode
is 'resume'. See the core docs (docs/interruptions.md) for details.
