Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu React Native
How-to guide

Record processed video in React Native

Record a processed MP4 from the Fabric camera view and optionally copy the finalized file to the media library.

Platform React Native SDK version 1.0.0 Updated Aug 19, 2026 Time 5 min

Prerequisites

Start recording

await NosmaiCameraSdk.startRecording();

Stop and save

const recording = await NosmaiCameraSdk.stopRecording();

console.log(recording.durationSeconds, recording.hasAudio);

await NosmaiCameraSdk.saveVideoToGallery(
  recording.uri,
  'nosmai-video'
);

The stop result contains a temporary local MP4 URI, duration, size, MIME type, and whether the finalized file includes audio.

Lifecycle rule

Stop recording before camera switch, app pause, navigation, or cleanup. If an optional package-audio track cannot be muxed, inspect E_RECORDING_AUDIO_MUX and verify the finalized result instead of assuming the video was lost.

Verify it worked

Record a short clip with a visible effect, wait for stopRecording, and play the returned URI. Confirm its duration, audio, orientation, and effect output.

Common errors

SymptomCauseFix
Recording does not startNosmaiCameraView is not ready or a session is already activeWait for camera startup and block duplicate record-button taps
E_RECORDING_AUDIO_MUXThe optional audio track could not be finalized with the videoInspect the result and verify native audio permissions and lifecycle

Next steps

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved