@molecule/app-audio-recording-expo
Provider bond · audio-recording · App (browser) · v1.0.1 · Apache-2.0
Expo microphone recording provider for molecule.dev.
npm install @molecule/app-audio-recording-exponpm · Source on GitHub · Implements @molecule/app-audio-recording
How it works
@molecule/app-audio-recording-expo is a provider bond on the app (browser) side: it implements the audio-recording core interface (@molecule/app-audio-recording) with a concrete vendor or library behind it.
Your code calls the core; you wire this provider once at startup. Swapping vendors later is one line in that wiring, not a rewrite.
import { setProvider } from '@molecule/app-audio-recording'
import { provider } from '@molecule/app-audio-recording-expo'
setProvider(provider)Works with: @molecule/app-audio-recording, @molecule/app-logger
Reference
Records AAC audio in an M4A file with the Expo SDK 53 microphone API.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { setProvider } from '@molecule/app-audio-recording'
import { provider } from '@molecule/app-audio-recording-expo'
setProvider(provider)
Add ["expo-audio", { "microphonePermission": "Allow $(PRODUCT_NAME) to record audio." }]
to expo.plugins in the Expo app config. The plugin sets the iOS microphone
usage description and adds the Android recording and audio settings permissions.
Runtime permission is requested when a recording starts.
On iOS, capture and play back in separate steps because Expo SDK 53 can deactivate the recording session when the last player pauses or ends.
The browser export uses the MediaRecorder bond. Native recordings return a byte-backed Blob and a portable file; keep any recording needed beyond the app cache lifetime by uploading it or copying it into persistent storage.
Type
provider
Installation
npm install @molecule/app-audio-recording-expo @molecule/app-audio-recording @molecule/app-audio-recording-media-recorder @molecule/app-logger expo-audio expo-file-system react-native
API
Constants
provider
Captures audio from the device microphone with Expo Audio.
const provider: RecordingProvider
Core Interface
Implements @molecule/app-audio-recording interface.
Bond Wiring
Setup function to register this provider with the core interface:
import { setProvider } from '@molecule/app-audio-recording'
import { provider } from '@molecule/app-audio-recording-expo'
export function setupAudioRecordingExpo(): void {
setProvider(provider)
}
Injection Notes
Requirements
Peer dependencies:
@molecule/app-audio-recording^1.0.0@molecule/app-logger^1.0.0expo-audio0.4.9expo-file-system18.1.11react-native0.79.6
Runtime Dependencies
@molecule/app-audio-recording@molecule/app-audio-recording-media-recorder@molecule/app-loggerexpo-audioexpo-file-systemreact-native